1 / 17

Communication Systems Simulation - III Harri Saarnisaari

Communication Systems Simulation - III Harri Saarnisaari Part of Simulations and Tools for Telecommunication Course. Random Number Generation. Many simulators include random number generators you can use those These should be validated If not already accepted by your community

milly
Download Presentation

Communication Systems Simulation - III Harri Saarnisaari

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. Communication Systems Simulation - III Harri Saarnisaari Part ofSimulations and Tools for Telecommunication Course

  2. Random Number Generation • Many simulators include random number generators • you can use those • These should be validated • If not already accepted by your community • But you always can questionnaire those, especially new generators • Here we consider some aspects of validation

  3. Random Number Generation • Complex additive white Gaussian noise is usually met in communication simulations • Used to model thermal noise • Properties: • I and Q channels (real and imaginary part) • Zero mean • I and Q independent • White • Flat power spectrum density (PSD) • Impulsive autocorrelation (impulse at zero flag) • I and Q are Gaussian

  4. RNG example • We use MATLAB to do some tests • MATLAB has randn m-file that generates zero mean, unit variance random variables • RNGs use an initial value (state, seed) from which they start • This should be randomized • In MATLAB (5) you may add command RANDN('state',sum(100*clock))to your startup file to set the generator to a different state each time you start

  5. RNG example %create complex white Gaussian signal with N elements N=10000; n=randn(N,1)+j*randn(N,1); • Is it zero mean? %check mean MEAN=mean(n) plot([real(n) imag(n)]) legend('real','imag') title('mean of real and imaginary part')

  6. The larger N is the close zero the mean is N=1000, mean 0.0177 + 0.0263i N=10 000, mean 0.0044 - 0.0017i However, if you repeat the trial several times and calculate the average the result is zero.

  7. RNG example %check variance, should be 2 now since %we have a sum of two Gaussian processes with var 1 VAR=var(n) • N=1000, VAR=1.9617 • N=10 000, VAR=2.0292 • The larger N is, the closer VAR is 2

  8. RNG example • I and Q independent, how it is measured? • Cross correlation should be zero • Cross correlation coefficient should be zero %check independency of I and Q %since maximum is N (if fully correlated sequences %the result is scaled by N plot(xcorr(real(n),imag(n))/N) %same is verified by calculating correlation coefficient, where %results are normalized by standard deviations XCORR=corrcoef(real(n),imag(n))

  9. N=1000 XCORR = 1.0000 -0.0600 -0.0600 1.0000 Correlation 6 % N= 10 000 XCORR = 1.0000 0.0296 0.0296 1.0000 Correlation 3 % The larger N the Closer independency I and Q are

  10. RNG example • Whiteness? • Autocorrelation impulsive • PSD flat %check whiteness, %maximum autocorrelation 2N plot(abs(xcov(n))) title('autocorrelation') psd(n) %uses Welch method title('PSD')

  11. Quite impulsive

  12. Quite flat

  13. RNG example • Gaussianity? • Histogram • Statistical tests (not considered herein) %check Gaussianity hist([real(n) imag(n)],50) %50 bars legend('real','imag') title('histograms')

  14. Quite Gaussian shapes

  15. Fading channels • To create fading channels you have to understand what they are • In fading channels signal and possibly its delayed versions are multiplied by random (tap) coefficients • Rayleigh fading channel • Taps are zero mean, complex Gaussian variables with a variance set so that SNR is what is wanted • Equally, amplitude is Rayleigh distributed and phase is uniformly distributed between 0 and 2

  16. Fading channels • Rician fading channels • Taps are non-zero mean complex Gaussian variables with a variance and amplitude set so that SNR is what is wanted • Alternatively, amplitude is Rician distributed and phase is uniformly distributed between 0 and 2 • Also other fading channels exist

  17. Fading channels • Changing mean and variance of a zero mean unit variance complex Gaussian variance x to m and 2 • Multiply by  and add m, i.e., new x = x+m • In fading channels one is usually interested the amplitude of the tap, not the phase • Create taps as rayleigh * exp(j*2*pi*rand) • Or rician * exp(j*2*pi*rand) • Some MATLAB toolboxes include generation of Rayleigh and Rician variables, otherwise you may create them from two Gaussian variables

More Related