Random Signals for Engineers using MATLAB and Mathcad Copyright 1999 Springer Verlag NY Example 7.10 Performance Curves In the example we will derive and plot the performance curves for an incoherent receiver. In chapter 7.5 we derived the performance curve for a coherent receiver and plotted its performance in example 7.4. The techniques parallel the coherent case but the integrals that have to be evaluated are more complex. With the help of Matlab this can be accomplished with little difficulty. An expression for the performance of the incoherent receiver is determined from the density functions f 0(q) and f1(q). These density functions are derived the receiver. We then find the mean and variance of q using f0(q) and f1(q) and assuming that that they are gaussian. The density functions are integrated and PD and PF are formed as a function of the threshold . We begin by forming the variable x, T Y 0 0 x r t sin t dt A sin t nt sin t dt syms A om t th n N0 ker=expand((A*sin(om*t+th)+n)*sin(om*t)); pretty(ker) 2 A sin(om t) cos(th) + sin(om t) A cos(om t) sin(th) + sin(om t) n The first integral expression is with T 2 k1=int(A*sin(om*t)^2*cos(th),t,0,2*pi/om) k1 = pi/om*A*cos(th) syms T subs(k1,om,2*pi/T) ans = 1/2*T*A*cos(th) The second integral evaluates to zero. When we take the expected value of x or E[x] the last term evaluates to zero because E[n(t)] = 0. We have E x 1 T A cos 2 E y 1 T A sin 2 Similarly we find The variance is formed by the integral T T V x| E n(t ) n( ) sin( t ) sin( ) d dt 0 0 T T V x| E n(t ) n( ) sin( t ) sin( ) d dt 0 0 The E[n(t) n()] is N0/2 (t - ) the integral becomes with T 2 2 N0 V x| (sin( t )) 2 dt 2 0 'V[x| q] =' Vxq=N0/2*int(sin(om*t)^2,t,0,2*pi/om) ans = V[x| q] = Vxq = 1/2*N0*pi/om sig2=subs(Vxq,om,2*pi/T) sig2 = 1/4*N0*T Similarly for V[y| ] = 2 The gaussian for f1(x,y) can now be formed as 1 1 f1 x, y | exp 2 2 2 2 2 2 AT AT x cos( ) y sin( ) 2 2 We now change variables from x,y to q and 0 by the standard integral transformation x q cos(0 ) x q sin(0 ) Performing the substitutions in f1(x,y) using Matlab syms x y q th0 th kerexp=(q*cos(th0)-1/2*T*A*cos(th))^2+(q*sin(th0)-1/2*T*A*sin(th))^2; kers=simplify(expand(kerexp)) kerf=maple('combine','-q*cos(th0)*T*A*cos(th)+q^2q*sin(th0)*T*A*sin(th)+1/4*T^2*A^2,trig') kers = -q*cos(th0)*T*A*cos(th)+q^2-q*sin(th0)*T*A*sin(th)+1/4*T^2*A^2 kerf = -q*T*A*cos(-th0+th)+q^2+1/4*T^2*A^2 and combining the first and third term we have pretty(-q*T*A*cos(th0-th)+q^2+1/4*T^2*A^2) 2 -q T A cos(-th0 + th) + q 2 + 1/4 T 2 A In order to complete the transformation of variables in a density function we must determine the Jacobian of the transformation in accordance with chapter 4.5. Forming the determinant of the Jacobian we have jac=jacobian([q*cos(th0) ; q*sin(th0)], [q th0]) jac = [ cos(th0), -q*sin(th0)] [ sin(th0), q*cos(th0)] simplify(det(jac)) ans = q The Jacobian is therefore given below and the det(J) = |J | = q. The density function f 1(q,0) becomes 2 q 1 2 A T 1 f 1 q ,0 | exp 2 exp 2 q 2 q A T cos( 0 ) 2 2 2 2 We have shown in Chapter 4.8 that a rectangular to polar transformation of a gaussian yields a uniform distribution of the angle variable 0 that has a value 1/2 with limits 0 0 2 . Evaluating the marginal distribution f1(q) we have 2 f 1 (q| ) f 1 (q ,0 | ) d0 0 2 A T 2 q 2 2 q 1 f1 q | exp exp q A T cos( 0 ) d 0 2 2 2 2 2 2 0 Recognizing the integral as a Bessel function we have 2 1 exp 2 0 2 q AT q A T cos( 0 ) d 0 2 I 0 2 2 2 A T 2 q 2 q q AT f1 q | exp I 0 2 2 2 2 2 2 The next integration is to remove the conditional variable by integrating over its range. The density function for was assumed to be uniform with amplitude 1/2 with limits 0 2 .Setting up this integral we have 2 f 1 (q ) f (q| ) f d 1 0 Since f(q|) is independent of it factors from the integral. The integral evaluates to 1 and we have f1(q) = f1(q| ). The density function for H0, f0(q) can be found from f1(q) by letting A = 0 and I0(0) = 1 f 0 q q2 exp 2 2 2 q The PF can now be found by syms eta sig maple('assume',sym('sig>0')); PF=int(q/sig^2*exp(-q^2/2/sig^2),q,eta,inf); pretty(PF) 2 eta exp(- 1/2 -----) 2 sig~ We can similarly find PD() but in this case an analytical expression for the integral cannot be found. However, it can be evaluated numerically using Matlab 2 A T 2 q 2 q q A T f1 q 2 exp I 0 2 2 2 2 PD f1 q dq Let z = q/ and dz = dq/ and = A T / 2 and = / we have PD z e z 2 2 2 I 0 z dz Since this integral is equal to unity when -> - we can express PD in terms of the Marcam integral Q(). This integral is evaluated numerically by Matlab function marcam function y=f7_6(x,alp) % kernel of marcam integral y=x.*exp(-(x.^2+alp^2)/2).*besseli(0,alp*x); function y=marcam(alp,beta) %numerically evaluates the Marcam integral y=1-quad('F7_6',0,beta,[],[],alp); . Q , 1 z e z 2 2 2 I 0 z dz 0 At this point we can compare the performance of the coherent and incoherent cases. For the coherent receiver we have from Equation 7.5-16 and the normalized threshold = /. We can also express E = (A T)2 / 4 or 2 = E/2 . From Example 7.5 for the coherent case PFC ( ) 1 cnorm( ) PDC ( , ) 1 cnorm( ) For the incoherent case we can summarize the formulas 2 PFI ( ) exp 2 PDI ( , ) Q( , ) In order to plot the results we will make use of the gaussian probability graph used in Example 7.8 and define the signal to noise ratio in term of the log function ic( p, m, ) sqrt (2) erfinv (2 p 1) m En( x ) 10 x 10 First we plot the curve for a given PF = 0.001. For the incoherent case we find that syms x PF a betai=solve('exp(-x^2/2)-PF') betai = [ (-2*log(PF))^(1/2)] [ -(-2*log(PF))^(1/2)] betai=sqrt(-2*log(0.001)) betai = 3.7169 For the coherent case we can also solve for c for the same given PF betac=sqrt(2)*1*erfinv(2*(1-0.001) -1) +0 betac = 3.0902 Expressing PDI and PDC in term of the signal to noise ratio and and taking ic to plot in probability graph format we have the two plot functions y=2:0.4:14; pow=sqrt(2*10.^(y/10)); for i=1:length(y) pin(i)=sqrt(2)*erfinv(2*marcam(pow(i),betai)-1); pco(i)=sqrt(2)*erfinv(2*(1-cnorm(betac-pow(i),0,1))-1); end The two curves are plotted on common axes for comparison. Since we are plotting using probability graphs we introduce the calibration for the Detection Probability axis from Example 7.8 . On the graph we will show the grid lines for probabilities of 0.95, 0.98, 0.99 and 0.995 . p=[ .001 .003 .01 .02 .05 .10 .25 .5 .75 .9 .95 .98 .99 .995 .999]; tick=sqrt(2)*1*erfinv(2*p -1) + 0; label1=str2mat('0.001','0.003','0.01','0.02','0.05','0.1','0.25','0.5') ; label2=str2mat('0.75','0.9','0.95','0.98','0.99','0.995','0.999' ); label=[label1;label2]; plot(pin,y,pco,y) axis([-2 3 2 14]) set(gca,'Xtick',tick,'XTickLabel',label); ylabel 'S/N in DB';xlabel 'Prob. of Detection' title('Performance Curve for PF= 0.001'); grid on; Performance Curve for PF= 0.001 14 12 S/N in DB 10 8 6 4 2 0.05 0.1 0.25 0.5 0.75 0.9 Prob. of Detection 0.95 0.980.990.995 The graph show that for a PF = 0.001 or 1 in 1000 false alarm rate we have for a 12 db signal to noise ratio and increase in PD from 0.98 to 0.995 in going from incoherent to coherent detection.