20062ee113_1_Spring2006EE113Projectsolution

20062ee113_1_Spring2006EE113Projectsolution - Spring 2006...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Spring 2006 EE I 13 Project Solution ( Due 6;”8306 ) w(n): Additive white Gaussian random noise: w(n) --> N(O, 0:) Received signal r(n): r(n) = Acos(0.25x - n + 0.25x)+ w(n) Following Step 1 to construct y1(n) and 322(31): y1 (n) = r(n) - cos(0.257r - n) 2 (A 005(02513: - n + 0.257.?) + w(n)) - cos(0.257r - n) = A 004025;: - n + 0257:)- cos(0.25n' - n)+ w(n)- 005(0257: - n) = g [005(057: - n + 0.25%) + cos(0.25:r)]+ w(n)- cos(0.257r - n) = §COS(0.257F)+ g—coswjar - n + 0.25:1")+ w(n)- 005(0257: - n) y2 (n) = r(n) - sin(0.257: - n) = (A 00501259": - n + 0.257.?)+ w(n)) - sin(0.257r - n) z A cos(0.259r - n + 0.253")- sin(0.257r - n)+ w(n) - sin(0.252r - n) : wg—[sin(0.52r - n + 0253)— sin(0.257r)]+ w(n) - sin(0.25rr . n) = * gsin(0.257r) + gsinfiljz - n + 0257:) + w(n)- sin(0.257r - :2) Following Step 2 to construct 21 and 22: 2 N—l 2| = E y} (n) “:0 A N—l 2 N—] = A cos(0.257z)+ EX cos(0.57r - n + 0256+ E21 w(n)- cos(0.25:r - n) ":0 n=o 2% () z=— n 2 Nn=0y2 N—l N—] = —A sin(0.257r)+ £2 sin(0.57: - n + 0.257;)4- a; Z w(n)- sin(0.25:r - n) “=0 n=0 silo-W025”) = cos(0.57r - n. + 0.25%) + j sin(0.5;-r - n + 0.253) N—l N—l _ .N Z Cr05(05):. _ n + : Re[z ej{0_5;rln+0.25;r)] = Re[e}.-0.25x . 1 J )3 and n=0 "=0 AH N4 '05 025} '025 1"jN Zsin(0.57:-n+0.259r)= [m Zed ' ’W" ’T = [m e’" ’T' n=lJ fi=9 1 _ Therefore, 2 = A cos(0 257:)+ iRe ef'o'zs” -1_ jN +3? w(n)- 005(0 257: - n) I ' N l—j N n=0 ' N—l A . 1— j” 2 22 = —A sin(0.257r)+ —- lm eJ'D'ZSN - ]+ —Z w(n)- sin(0.25;rr - n) N 1— j N “:0 IfN is multiple of 4, then 21 and 22 can be reduced to N—] zI = A cos(0.257z') + % Z w(n)- cos(0.25:r - n) 2nfi-l 22 2 ~14 sin (0257:) + E Z w(n) - sin(0.257r o 31) I520 Note, because w(n) is additive white Gaussian random noise, therefore 2] and 22 are also Gaussion random variables. Following step 3 to construct z : 2 2 2—2] +32 2 is chi-square variable with probability density function: 432+” 2 l 2 12(3)):2 :6 20 0' 0' Where 3220, 21 —>N(ml,0‘2) 22 —>N(m2,0'2) 52 2m]: +31322 E(z)=20'2 +s2 var(z)= 40'4 + 410'2 -32 Part Ia): To find 13(2), we need to find m1, m2 and 0'2 mI : 19(21): E[A cos(0.25:r) + w(n)- cos(0.252r - 71)] H=U = A cos(0.257z)+ % Ni E(w(n)) - cos(0.257: - n) z A cos(0.2522') n20 m2 : E(Zz): E[- Asin(0.257r)+F N-l 2 2 N-l 2 n=0 w(n)-sin(0.257r-n)] : —A sin(0.257r) + E Z E(w(n))- sin(0.252r - n) = —A sin(0.25:r) “:0 Assume N is multiple 0f4 and w(n) is I.I.D, N—] 2 n=0 2 A 0.25 — cos( 7r)+ N Vela—21) = "a fl F 2 : EL? N—I 2 n=0 2 N =E N—l Z “’(n. )- cos(0.25x . n] )J. nlzfl 3 N J 3 N-l 2 _ E w2 (MI (3082(02591' - nl 111:0 N J (1120 N—] Z (:052 (0.25:: - H!) "1%) 2 .O'w. N—] 'Z nl=0 1 + cos(0.5:r - n1) 2 [N fl 2 E(w2(n,cosz(0.252r 411) N-l 2w n2 :0 w(n).cos(o.25fl.n)]_ml w( )-cos(0.25:r-n (n2)-cos(0.257r-n2 Part 1b): var(z)= 40'4 +40"2 -5 = '—2-0‘w + v“, N N Part 10): N MAE” A2 N 40-2 _ e w u I w) 40: {4; 20:] Part 23) ForN=8,0'§=l, 2 2 2 1 0' :#—-0'w:— N 4 .1: (y) = 26‘“ - 10(0) ffafsc__a1'am : 2 To) S 10—3 f2e'2’dy =10‘3 -) To 2 15.11100): 3.454 U Part 213) ffaf.sc_afam = 104 Lew-c! : Use Albersheim formula to estimate SNRdeLhw SNRdL-t_bw 4.54 0.62 0.62 = —5 logm + + ' log") ] 0_3 ]+ 0.121n[10_3 )ln[ = 10.7231(db) SNRm(db) = SNRdeW — 10 logo (8) + 3 = 4.6922(db) 9 SNRM =104-69m = 2.9459, A = #2404592?“ = 2.4273 0223-03, N For N:l6,o*§ : , 02 H31; :1 N w 8 L = 4e“ - 10(0) ffblh'c_alarm = fz(y Z S 10,3 f4e‘4ydy =10‘3 -) To = 035-111(10): 1,727 Part 2d) _‘ —3 ffa!s‘c_a!arm “ footed I 0‘9 Use Albersheim formula to estimate SNRMJW SNRdeb) =—510gm(i)+ 6.2+fl— «logm In 0‘63 +0.12ln 0‘63 In 0‘9 +1.71n W/1+0.44 10 10 1—0.9 = 10.7231(db) gamma) = SNR — 1 010ng 6) + 3 =1.6819(db) A = w/Z-IOI'GSWIO =1.7164 del_ bw 9 SNRm =10'-“”“° =1.4729, Part 3a) With N =16,A=0,Ji :1,T0 21.7164 See the attached matlab code for the false alarm probability estimation. By simulating 100,000 ensembles, the f Ema,“ = 0.00087 S 10'3 Part 3b) With N=16,A =.1.7164,a§j=1,1"0 21.7164 See the attached matlab code for the detection probability estimation. By simulating 100,000 ensembles, the f detect m l 2 0.9. ' 0.9 1 — 0.9 ll Matlab code: % Spring 2006 EE113 Project Close all; clear all; var_w = 1; T0 = 3*var_w*log(l 0)X2; % threshold % Part 2a 21 =1 -quad1(‘2*exp(-2*((0)"2.+x)).*besseli(0,sqrt(x)*4*(0)"2)‘,0,T0) % Part 2b % Plot Chi-Square pdf A=2.5; upper_limit = 99; x=l inspacefl), upper_limit,1000); y=2*exp(-2*((A)"2.+x)).*besseli(0,sqrt(x)*4*(A)’\2); figure“ ); subplot(3,l , l); ‘ plotbcsy); hold on; subplot(3, l ,2); plot(x,2*exp(-2*((A)"2.+x))); subplot(3,l ,3); plot(x,besseli(0,sqrt(x)*4*(A)"2)); % Part 2b using Albersheim method p#d=0.9; p_fa=1 0’13; N=8; AA=log(O.62/p_fa); BB=IOs(p_df(1-p_d)); SNR_albersheim_db=- 5*Iog1 0(1)+(6.2+4.54fsqrt(1+0.44))*log1 0(AA+O.1 2*AA*BB+] .?*BB) SN R_in_db=SN R_albersheimr_db-10*logIOCN)+3 SN.R_in=l 0"(SN R_in_db;‘ l 0) A_1=sqrt(2* SNR_in) % Part 20 24:1-quadI('4*exp(—4*((O)"2.+x)).*besseli(O,sqrt(x)*4*(O)"2)',0,T0r’2) % Part 2d using Albersheim method p_d=0.9; p_fa=10"-3; N=1 6; AA=log(0.62fp_fa); BB=log(p_df(1-p_d)); SN R_al bersheim_db=- 5*Iog10(l)+(6.2+4-54/sqrt(]+0.44))*log10(AA+O.12*AA*BB+1.7*BB) SNR_in_db=SN R_a1bersheim_db-] 0*log10(N)+3 SNR_in=1 0"(SNR_in_dbf1 0) A_2=sqrt(2*SNR_in) % Part 3a % Example: Generating arbitrary random number: % to generate a 5-by-5 array of random numbers with a mean of .6 % that are distributed with a variance of 0.1 % x = .6 + sqrt(0. l) * randn(5) false_alarm=0; samples=100000 for m=l :samples w=randn(1,16); r=w; yl =0; y2=0; for k=0z15 y1=y1+r(k--1)*cos(0.25*pi*k); y2=y2+r(k--1)*sin(0.25*pi*k); end 2] =y] *2! 16; 22=y2*2fl 6; z(m)=z 1 A2+22”‘2; if (2(m) > 3*10g( 10)f4) false_alarm=false_alarm+l ; end end false__alann falseflalarmflprobability : false_alann/samples % Part 3b detect = 0; samples=100000 for m:] :samples wrandn(1,16); y1=0; y2=0; for k20:15 _ y1=y1+(A_fl2*cos(0.25*pi*k+0.25*pi)+r(k+1))*cos(0.25*pi*k); y2=y2+(A_2*cos(0.25*pi*k+0.25*pi)+r(k+1))*sin(0.25*pi*k); end zl=yl*2r’l6; 22=y2*2f] 6; z(m)=z] H"2+z2"‘2; if (2(m) > 3*Iog(10)f4) detect=detect+1 ; end end detect detect _pr0bability = detectfsamples ...
View Full Document

Page1 / 8

20062ee113_1_Spring2006EE113Projectsolution - Spring 2006...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online