1 / 33

By: Dr. Uri Mahlab

Simulation in Digital Communication. By: Dr. Uri Mahlab. Chapter # 2 Random Processes. By: Dr. Uri Mahlab. Generation of Random Variables. Most computer software libraries include a uniform random number generator. Such a random number generator a number

terrel
Download Presentation

By: Dr. Uri Mahlab

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Simulation in Digital Communication By: Dr. Uri Mahlab

  2. Chapter # 2 Random Processes By: Dr. Uri Mahlab

  3. Generation of Random Variables • Most computer software libraries include a • uniform random number generator. • Such a random number generator a number • between 0 and 1 with equal probability. • We call the output of the random number • generator a random variable. • If A denotes such a random variable, its • range is the interval

  4. Is called the probability density function F(A) is called the probability distribution function Where:

  5. F(A) f(A) 1 1 A A 0 1 0 1 Fig 1 (a) (b) Figure: Probability density function f(A) and the probability distribution function F(A) of a uniformly distributed random variable A.

  6. If we wish to generate uniformly distributed noise in an interval (b,b+1), it can be accomplished simply by using the output A of the random number generator and shifting it by an amount b. Thus a new random variable B can be defined as Which now has a meanvalue

  7. F(B) f(B) 1 1 B B 0 0 (b) (a) Fig 2 Figure : Probability density function and the probability distribution function of zero- mean uniformly distributed random variable

  8. F(C) 1 A=f(C) C C 0 Fig.3 Figure : Inverse mapping from the uniformly distributed random variable A to the new random variable C

  9. Example 2.1Generate a random variable C that has the linear probability density function shown in Figure (a);I.e., F(C) f(C) 1 1 C C 0 2 (b) 0 2 Fig - 4 (a) Figure : linear probability density function and the corresponding probability distribution function Answer ip_02_01

  10. Thus we generate a random variable C with probability function F(C) ,as shown in Figure 2.4(b). In Illustartive problem 2.1 the inverse mapping C= (A) was simple. In some cases it is not. • Lets try to generate random numbers that have a normal distribution function. • Noise encountered in physical systems is often characterized by the normal,or Gaussian probability distribution, which is illustrated in Figure 2.5. The probability density function is given by Gaussian Normal Noise

  11. F(C) f(C) 1 C C Fig 5 0 0 (b) (a) Gaussian probability density function and the corresponding probability distribution function.

  12. Unfortunately,the integral cannot be expressed in terms of simple functions. Consequently the inverse mapping is difficult to achieve. A way has been found to circumvent this problem. From probability theory it is known that a Rayleigh distributed random variable R, with probability distribution function

  13. Is related to a pair of Gaussian random variables C and D through the transformation

  14. Where A is a uniformly distributed random variable in the interval(0,1). Now, if we generate a second uniformly distributed random variable B and define Then from transformation,we obtain two statistically independent Gaussian distributed random variables C and D.

  15. Gaussian Normal Noise u=rand; % a uniform random variable in (0,1) z=sgma*(sqrt(2*log(1/(1-u)))); % a Rayleigh distributed random variable u=rand; % another uniform random variable in (0,1) gsrv1=m+z*cos(2*pi*u); gsrv2=m+z*sin(2*pi*u); Gngauss.m

  16. Example 2.2: [Generation of samples of a multivariate gaussian process] Generate samples of a multivariate Gaussian random process X(t) having a specified mean value mx and a covarianceCx Answer ip_02_02

  17. Example 2.3: generate a sequence of 1000(equally spaced) samples of gauss Markov process from the recursive relation Answer ip_02_03

  18. Power spectrum of random processes and white processes A stationary random process X(t) is characterized in the frequency domain by its power spectrum which is the fourier transform of the autocorrelation function of the random process.that is, Conversely, the autocorrelation function of a stationary process X(t) is obtained from the power spectrum by means of the inverse fourier transform;I.e.,

  19. Definition:A random process X(t) is called a white process if it has a flat power spectrum, I.e., if is a constant for all f frequency

  20. Example 2.4: 1) Generate a discrete-time sequence of N=1000 i.i.d. uniformly distributed random in interval (-1/2,1/2) and compute the autocorrelation of the sequence {Xn} defined as 2) Determine the power spectrum of the sequence {Xn} by computing the discrete Fourier transform (DFT) of Rx(m) The DFT,which is efficiently computed by use of the fast Fourier transform (FFT) algorithm, is defined as Answer Matlab: M-file ip_02_04

  21. Example 2.5: compute the auto correlation Rx(t) for the random process whose power spectrum is given by Answer Matlab: M-file ip_02_05

  22. Linear Filtering of Random Processes Suppose that a stationary random process X(t) is passed through a liner time-invariant filter that is characterized in the time domain by its impulse response h(t) and in the frequency domain by its frequency response.

  23. The auto correlation function of y(t) is In the Frequency domain

  24. Example 2.6 suppose that a white random process X(t) with power spectrum Sx(f)= 1 for all f excites a linear filter with impulse response Determine the power spectrum Sy(f)of the filteroutput. Answer Matlab: M-file ip_02_06

  25. Example 2.7 Compute the autocorrelation function Ry(t) corresponding to Sy(f)in the Illustrative problem 2.6 for the specified Sx(f)=1 Answer Matlab: M-file ip_02_07

  26. Example 2.8 Suppose that a white random process with samples{X(n)} is passed through linear filter with impulse response Determine the power spectrum of the output process{Y(n)} Answer Matlab: M-file ip_02_08

  27. Lowpass and Bandpass processes • Definition:A random process is called lowpass if its power spectrum is large in the vicinity of f=0 and small (approaching 0) at high frequencies. • In other words, a lowpass random process has most of its power concentrated at low frequencies . • Definition: A lowpass random process x (t) is band limited if the power spectrum Sx(f)=0 for Sx(f)>B. The parameter B is called the bandwidth of the random process

  28. Example # 9:consider the problem of generating samples of a lowpass random process by passing a white noise sequence {Xn}through a lowpass filter. The input sequence is an I.I.d. sequence of uniformly distributed random variables on the interval (-0.5,0.5 ). The lowpass filter has the impulse response. And is characterized by the input-output recursive(difference)equation. Compute the output sequence{yn} and determine the autocorrelation function Rx(m) and Ry(m),as indicated in problem 2.4 Determine the power spectra Sx(f) and Sy(f) by computing the DFT of Rx(m) and Ry(m) Answer Matlab: M-file ip_02_09

  29. N=1000; % The maximum value of n M=50; Rxav=zeros(1,M+1); Ryav=zeros(1,M+1); Sxav=zeros(1,M+1); Syav=zeros(1,M+1); for i=1:10, % take the ensemble average ove 10 realizations X=rand(1,N)-(1/2); % Generate a uniform number sequence on (-1/2,1/2) Y(1)=0; %should be x(1) !!!!! for n=2:N, Y(n) = 0.9*Y(n-1) + X(n); % note that Y(n) means Y(n-1) end; Rx=Rx_est(X,M); % Autocorrelation of {Xn} Ry=Rx_est(Y,M); % Autocorrelation of {Yn} Sx=fftshift(abs(fft(Rx))); % Power spectrum of {Xn} Sy=fftshift(abs(fft(Ry))); % Power spectrum of {Yn} Rxav=Rxav+Rx; Ryav=Ryav+Ry; Sxav=Sxav+Sx; Syav=Syav+Sy; end; Rxav=Rxav/10; Ryav=Ryav/10; Sxav=Sxav/10; Syav=Syav/10; % Plotting commands follow »

  30. Definition: • A random process is called bandpass if its power spectrum is large in a band of frequencies centered in the neighborhood of a central frequency fo and relatively small outside of this band of frequencies. • A random process is called narrowband if its bandwidth B<< fo • Bandpass processes are suit for representing modulated signals. • In communication the information-bearing signal is usually a • lowpass random process that modulates a carrier for • transmission over a bandpass communication channel. Thus • the modulated signal is bandpass random process.

  31. Example # 10:[Generation of samples a bandpass random process]Generate samples of a bandpass random process by first generating samples of two statistically independent random processesXC(t)and XS(t) and using these to modulate the quadrature carriers cos( 2 ) and sin 2 ,as shown in figure 7. + - Answer Matlab: M-file ip_02_10 Figure 7: generation of a bandpass random process

  32. N=1000; % number of samples for i=1:2:N, [X1(i) X1(i+1)]=gngauss; [X2(i) X2(i+1)]=gngauss; end; % standard Gaussian input noise processes A=[1 -0.9]; % lowpass filter parameters B=1; Xc=filter(B,A,X1); Xs=filter(B,A,X2); fc=1000/pi; % carrier frequency for i=1:N, band_pass_process(i)=Xc(i)*cos(2*pi*fc*i)-Xs(i)*sin(2*pi*fc*i); end; % T=1 is assumed % Determine the autocorrelation and the spectrum of the band-pass process M=50; bpp_autocorr=Rx_est(band_pass_process,M); bpp_spectrum=fftshift(abs(fft(bpp_autocorr))); % plotting commands follow

More Related