You are on page 1of 4

Lab 1

Stochastic Signals
Overview…The signals we have to deal with in practice are, in most cases,
not deterministic. A speech signal, for example, cannot be described by an equation.
Nonetheless, it has certain characteristics that distinguish it from, say, a television signal.
In fact, almost all signals that we have to handle in communications, and in many other
fields of engineering and science, are of stochastic nature (also called random). A
stochastic signal has two facets: at a fixed time instant its value is a random variable, and
as a function of time the random variables might be interrelated. The definition of the
random signal is done via its statistical properties: probability density function, joint
density function, mean, autocorrelation, and so on. In a theoretical problem, these
quantitative descriptions apply to the ensemble of all realizations of the random process.
A stochastic process is characterized by its (time-dependent) pdf, as well as the joint pdf
between RVs (Auto-Correlation) at two arbitrary time instants, and all higher order pdf's.
If the pdf's do not depend on the definition of the time origin, the process is stationary;
otherwise it is called a non-stationary process. Furthermore, if the characteristics of a
stochastic process can be correctly estimated from one sample function, it's called
Ergodic.

In this lab… we shall spend time on understanding the fundamental concepts


related to random variables and stochastic processes. We would like to equip ourselves
with the ability to define and characterize stochastic processes and the associated
parameters.
Warning: Since these exercises require the estimation of ensemble properties via
averaging, very large sample sets must be used. Use very large sample sets (8000-10000)
so that your results are nearly perfect. It will cause memory problems though!

       Problem 1: Random Variables


      a) The Generation : Use MATLAB to generate the random variables: a Uniform
random variable, a Gaussian       random variable, and a Rayleigh distributed random
variable of appropriate length.
      b) The Moments: Write functions to compute mean and variance of the above
variables.
      c) The PDF : Write a MATLAB function to view the 'pdf' of each of them. Prove that
it's a valid pdf. {Hint:       You can take help for HIST, BAR}
      d) Mathematical Proof: Plot the pdf of a Gaussian random variable of characteristics
similar to the above using       mathematical relationship. Comment on the results.
      e) Playing with the Moments: Create a Gaussian random variable with zero mean, and
1 variance. Get another       random variable with mean = -1, and variance 0.25 from the
first random variable. What are your comments?
      f) Independent Random Variables: We should write our own functions to generate
random variables.       Independence random variables are often desired. (Why?).
      g) Covariance & Correlation: We need to understand these 'buzz-words' of the field
you are into. Write       functions to compute both covariance and correlation and apply
on the independent random variables of part       'f'.

      Problem 2: Random Processes      


      Hint: In the exercises below examine properties of the signals from the following
three random processes.       Each should be made into a MATLAB program rp*,m that
will create a matrix of size M*N containing       random numbers.
      function v=rp1(M,N); %Random Process #1
            a=0.02;
            b=5;
            Mc=ones(M,1)*b*sin((1:N)*pi/N);
            Ac=a*ones(M,1)*[1:N];
            V=(rand(M,N)-0.5).*Mc+Ac;

      function v=rp2(M,N); %Random Process #2


            Ar=rand(M,1)*ones(1,N);
            Mr=rand(M,1)*ones(1,N);
            V=((rand(M,N)-0.5)*0.5).*Mr+Ar;

      function v=rp3(M,N); %Random Process #3


            a=0.5;
            m=3;
            V=(rand(M,N)-0.5)*m+a;

      a) Stationary and Ergodic : Generate four members of each process above of length
100 (M=4, N=100) and       display them with subplot. Decide by inspection of the four
representative signals whether each process is       ergodic and/or stationary.
      b) Expected Values via Ensembled Averages : Compute the ensemble mean and
standard deviation for each       of the three processes, and plot versus time. This can be
done by generating many signals for each process,       so let M=80 and N=100. From the
plot of the mean and standard deviation, decide about the stationarity of       the
processes.
      c) Expected Values and Time Averages : Describe each stochastic process. If
possible, determine a formula       for the underlying pdf for each process. Decide on that
basis whether the processes are ergodic and/or       stationary. Calculate the theoretical
mean and variance for each. Then compare your results with those       obtained by the
measurements.
      d) Ergodic Process : For an ergodic process, the pdf can be estimated via time
averaging. Test your function       for the simple case of a stationary process with a
Gaussian pdf:
      v=randn(1,N); Pick the length of N to be 100 and 1000.
      e) For the process rp*.m that are ergodic, determine their pdf approximately using
your pdf M-file. Do the       measurement for N=100, 1000, 8000. Plot the three estimated
pdf's and the theoretical pdf using subplot.       Compare the results and comment on the
convergence as N gets large.

Amplitude Modulation
Overview…A very naïve but intuitively rich method of transmitting
information, one of the possible ways to utilize the same medium for multiple users, and
the most widely explored technique of communication systems is Amplitude modulation
(AM). AM, frequently referred to as linear modulation, is the family of modulation
schemes in which the amplitude of a sinusoidal carrier is changed as a function of the
modulating signal. This class of modulation scheme consists of DSB-AM (double-
sideband AM), conventional amplitude modulation, SSB-AM (single-sideband AM), and
VSB-AM (vestigial-sideband AM). These systems are widely used in broadcasting (AM
radio and TV video), point-to-point communication and multiplexing applications, for
example, in telephone sytesms. AM systems are usually characterized by a relatively low
bandwidth requirement and power inefficiency in comparison to the angle-modulation
schemes.

In this lab… we'll develop our intuition towards the concept of passband
systems. Primarily, we'll focus on AM and its variations, mentioned above. Lastly, we
will move towards problem-solving section….the ultimate aim of this lab!

      Problem 1: Conventional AM
      The time representation of Conventional AM signal is:
            
      where Ac is the carrier amplitude, fc is the carrier frequency, a is the modulation
index, and mn(t) is the       normalized message signal.
      The message signal

                  
      Modulates the carrier using a conventional AM scheme. It is
assumed that fc = 250       Hz and t0 = 0.15; the modulation index is a = 0.85.
            a) Derive an expression for the modulated signal. What will be the BW of this
signal?
            b) Determine and plot the spectra of the message and the modulated signals. Find
the BW.
            c) If the message signal is periodic with a period equal to t0, determine the power
in the modulated signal             and the modulation efficiency.
            d) If a noise signal is added to the message signal such that the SNR at the output
of the demodulator is             10dB, find the power content of the noise signal.      
      Problem 2: DSB-AM
      a) Use the same modulating signal as above and implement a DSB-Amplitude
Modulator. (In DSB-SC AM,       the modulating signal is directly applied as the
amplitude of the carrier.)
            
      b) What happened to the following :
      Time-Domain outlook, Frequency Domain view, BW, Power, and SNR.
      c) Implement a coherent demodulator. Demodulate the modulated signal u(t) and
recover m(t). Plot the results       in both domains
      Problem 3: SSB-AM
      a) Use the same modulating signal as above and implement a USSB-Amplitude
Modulator. (In SSB-SC AM,       the modulating signal is directly applied as the
amplitude of the carrier.)            
            
      where H(.) stands for Hibert Transform
      b) You should observe the Time-Domain outlook, Frequency Domain view, BW,
Power, and SNR. Is there       any obvious advantage(s)/disadvantage(s) of SSB to DSB?
      c) Implement a coherent demodulator for SSB-AM. Demodulate the modulated signal
u(t) and recover m(t).       Plot the results in both domains.                 
      Problem 4: Conventional Demodulation Schemes: The Envelope Detection
      a) Implement the square-law demodulation of AM signals. Show results using the
signals created above.
      b) Use the Hilbert Transform method to perform envelope detection.
      Problem 5: Further Investigation
      So far in this lab, we have used only one modulating signal. This might be dangerous
for our newly built       concepts, for obvious reasons. Now use the following modulating
signal with fc = 250 Hz and to = 0.1. This       signal is periodic with To = 0.2. This signal
is DSB-SC Amplitude Modulated and transmitted via a       microwave channel.
Moreover, it's known that the channel will add a Gaussian Noise of variance 0.00247.

            
      a) Determine modulated signal u(t).
      b) Determine the spectra of m(t) and u(t).
      c) Determine power in the transmitted signal.
      d) Calculate the SNR at the receiver.
      e) Plot the demodulated output using your function implemented in Problem 2.
      

                                                                                                                                           

You might also like