Random Signals for Engineers using MATLAB and Mathcad Copyright 1999 Springer Verlag NY Example 6.7 Correlation Function for Shot Noise In the example we will derive of the correlation function for shot noise. This procedure is a two step process as shown in the diagram in example 6.4. The first part of the process, the differentiation of the Poisson process, was covered in this example 6.4. We will illustrate two forms of shot noise which depend upon the assumed linear transfer function. The transformation by the linear process represented by h(t) that is a ramp function will be covered in this example. When h(t) is an exponential will be covered in example 6.8. To illustrate the process ,we first will generate a shot noise waveform. This begins by generating a set of random time points in the interval [0 - 10] and then summing impulses at these points the impulses responses will be of the form of ramps or exponential. Let t=10*rand(10,1); T=1; The ramp input form, which is also called transit delay, is given by function function y=f6_7(t,T) %impulse ramp function y=t.*stepfun(t,0)-(t-T).*stepfun(t,T)-T*stepfun(t,T); The shot noise output is given by the summation. When an impulse is applied to a linear system with an impulse response function h(t), the output is h(t). When we sum the output of all the inputs due the linearity property of linear systems we obtain by the function function y=f6_7_1(x,t,T) %summation function of f6_7 y=zeros(1,length(x)); for i=1:length(t) u=x-t(i); y=y+f6_7(u,T); end The impulse response and the output is plotted below tp=0:.05:2; ts=0:.05:10; subplot(1,2,1); plot(tp,f6_7(tp,T));xlabel 'time - sec';ylabel 'Impulse' subplot(1,2,2);plot(ts,f6_7_1(ts,t,T));xlabel 'time - sec';ylabel 'Noise' 1 3 0.9 2.5 0.8 0.7 2 Noise Impulse 0.6 0.5 1.5 0.4 1 0.3 0.2 0.5 0.1 0 0 0.5 1 time - sec 1.5 0 2 0 5 time - sec 10 The power density function response can be obtained by using the transform relationships. First we transform RZZ to SZZ and we must change t2 - t1 = in RZZ S ZZ 2 2 The expected value of y(t) is first computed E y t E z t ht dt H 0 For the power density function for the output we have S YY S ZZ H 2 2 H H 2 2 2 The first term can be simplified to 2 2 H 2 2 H 0 2 2 and the inverse of SYY or RYY is formed. The first term which contains and impulse becomes a constant and the second term represents a convolution in the time domain to obtain RYY 2 H 0 h h d 2 The covariance expression becomes CYY RYY E Y h h d 2 and the variance becomes 2 h 2 d We can now calculate the variances for the shot noise made up of the ramp functions. The details of this process will be amplified further in Example 6.8. The impulse response given above as h(t) can be transformed to H(term by term using Matlab. We use the Maple Heaviside function for the step function so the symbolic processing can correctly recognize it. Using the Fourier transform we obtain syms t x om Hom=maple('fourier','t*Heaviside(t)-(t-x)*Heaviside(t-x)-x*Heaviside(tx),t,om') Hom = i*(pi*Dirac(1,om)+i/om^2)-i*(-i*x*exp(-i*x*om)*(pi*Dirac(om)i/om)+exp(-i*x*om)*(pi*Dirac(1,om)+i/om^2)) Hom=-1/om^2-i*(-x*exp(-i*x*om)/om+i*exp(-i*x*om)/om^2); pretty(Hom) 1 / x exp(-i x om) i exp(-i x om)\ - --- - i |- -------------- + --------------| 2 | om 2 | om \ om / Obtaining the magnitude function using symbolic capability of Matlab pretty(simplify(Hom*subs(Hom,om,-om))) 2 (2 + i exp(i x om) x om - exp(i x om) - i exp(-i x om) x om + x / - exp(-i x om)) / / 4 om Rewriting using the exponential notation for simplicity. Mhomsc= 1/om^4*(2-2*cos(om*x)+om^2*x^2-2*om*x*sin(om*x)); pretty(Mhomsc) Substitution of sines and cosines for the exponential we obtain 2 2 2 - 2 cos(om x) + x om - 2 om x sin(om x) ------------------------------------------4 om and limit(Mhomsc,om,0) ans = 1/4*x^4 2 om H() can be found by evaluation of | H() |2 directly and taking the srqt of the result or by integration of the impulse function H0=int(t,t,0,x) H0 = 1/2*x^2 and the power spectrum for y(t) becomes S YY 1 2 2 cos T 2 T sin T 2 T 2 4 2 2 2 T and the variance is by direct evaluation syms lam sigyy=int( lam*t^2,t,0,x) sigyy = 1/3*x^3*lam Another form of the impulse response of the linear transfer function is the exponential. The computations need to obtain the power density function can be repeated using the form of ht e ct for t > 0 and for the transfer function by using Matlab (Maple) Fourier transform capability syms c cgt=sym('c>0'); maple('assume',cgt); maple('fourier','exp(-c*t)*Heaviside(t),t,om') ans = 1/(c+i*om) hom=1/(c+i*om); mhom=simplify(hom*subs(hom,om,-om)) mhom = -1/(c+i*om)/(-c+i*om) The denominator can be expanded den=expand((c+i*om)*(-c+i*om)) den = -c^2-om^2 pretty(1/-den) 1 --------2 2 c~ + om By the formulas for output power density function we have \ 2 2 ( ) SYY ( ) S ZZ ( ) H ( ) 2 2 2 c c 2 2 The delta function forces the evaluation of the rest of the expression at = 0 we have to invert 2 2 ( ) SYY ( ) 2 2 c c 2 the expression can be rewritten to allow symbolic inverse transformation. Inverse transforming using Matlab we obtain cgt=sym('c>0'); maple('assume',cgt); maple('invfourier','2*pi*lam^2*Dirac(om)/c^2+lam/(c^2+om^2),om,tau') ans = 1/2*lam*(2*lam+c*exp(-c*tau)*Heaviside(tau)+c*exp(c*tau)*Heaviside(tau))/c^2 to obtain after rewriting syms tau pretty( lam^2/c^2+ lam/2/c*exp(-c*abs(tau))) 2 lam lam exp(-c~ | tau |) ---- + 1/2 -------------------2 c~ c~ We can notice that E[y(t)] = | H(0)| and then the covariance function becomes CYY ( ) RYY ( ) and the variance becomes y2 c c 2c e c 2c We can compare the non-impulsive portion of the power density functions for both forms of the linear transfer function. For the ramp and for the exponential we have omp=0.01:.05:8; SRYM=subs(Mhomsc,x,1); SRY=2*subs(SRYM,om,omp); SEY=2./(2^2+omp.^2); figure plot(omp,SRY,omp,SEY) 0.5 0.45 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 0 1 2 3 4 5 6 7 8