assignment
DESCRIPTION
Assignment 01 StochasticTRANSCRIPT
QUESTION
Consider a communication system that is required to transmit 48 simultaneous conversations
from site A to site B using “packets” of voice information. The simplest design for the
communication system would transmit 48 packets every 10-ms in each direction.
This is an inefficient design, since it is known that on the average about 2/3 of all packets
contain silence and hence no speech information.
In other words, on the average the 48 speakers only produce about active (no silence) packets
per 10-ms period. We therefore need to design another system that transmits only active
packets every 10-ms.
SOLUTION
As shown in the figure, the inputs are given to the MUX whose output if M. For this design
to be efficient, M needs to be less than 48. Hence the aim is to transmit M packets instead of
48 and following the condition that M < 48
The active speech packets that are the active packets are not fully utilized but only 1/3 part of
speech contain active speech. We will represent the active speech by A.
Now there are two possible conditions for the value of A i.e. A > M or A < M
When the value of A is less than M than there is no problem and the active packets would be
accurately transmitted. But when A > M, A-M packets would be discarded, but the overall
discard ratio decreases as the value of M increases.
Following is the code that plots discard ratio against M. It gives a sound idea of what value of
M should be chosen, and how the compromise should be made between discard ratio and
transmission lines.
Code:
discard_fraction=zeros(1,49);
for m=1:48 % M is the number of line used
dif=0; % Number of active packets discarded in respective trial discard=0; % Total number of discarded packets active=0; % Total number of active packets produced P=zeros(1,1000); % It contains values of active speech in repective % repeatition
for n=1:1000 for b=1:48 if rand(1,1)<=(1/3)% Randomly generating Active Speech P(:,n)=P(:,n)+ 1; % Counting and saving Active Speech % packets of respective repeatition end end
if (P(1,n)>m) % If active packets exceed number of lines dif=(P(1,n))-m; %Number of active packets being %discarded in respective trial
discard=discard+dif; % Total number of discarded packets %being updated end
end
active=sum(P(1,:)); %Adding all the active speech packets produced
discard_fraction(:,m)=discard/active; %Fraction of active speech %discarded
end
discard_fraction(1,1)=1; t=0:48; plot(t,discard_fraction,'-o') xlabel('Transmission rate: M packets/10 ms'); ylabel('Discard fraction'); grid on
Second Method
Code
n=100; A=zeros(1,n); Active_packets=0; Discarded_packets=0; Discard_fraction=zeros(1,31); p=zeros(1,(users+1));
% Calculating Probability using Binomial Distribution Formula
for i=1:n for k=1:users c=factorial(n); g=factorial(k); r=factorial(n-k); p(:,k)=(c/(g.*r)); end end
for k=1:48 Active_packets=Active_packets+((k).*p(:,k)); end
Active_packets;
for M=0:30 for k=(M+1):users Discarded_packets= Discarded_packets + ((k-M).*p(:,(k+1))); end
Discard_fraction(:,(M+1))= Discarded_packets/Active_packets; Discarded_packets=0;
end Discard_fraction;
M=0:30; plot(M, Discard_fraction,'-o') xlabel('Transmission rate: M packets/10 ms'); ylabel('Discard fraction'); grid on
Conclusion Graph between the Discard Fraction and transmission rate is plotted by two different
techniques that is, using Nk(n) and pk. From this we can have a fair idea of what value of M
to be chosen to get the desired results. Both of these graphs suggest that the value of M
should be chosen to be about 30.
If ones concern is cost, that we can compromise on voice transmission quality and can further
reduce M by taking the help of these graphs. And if the concern is transmission quality than
we can accordingly chose value of M.