Systems Chapter0 - Page 1
全文
(2) Outlines . Signals and Linear Systems Random Processes Analog Modulation (Skip) Analog-to-Digital Conversion Baseband digital Transmission Digital Transmission through Bandlimited Channels Digital Transmission via Carrier Modulation Channel Capacity and Coding (Skip) Spread Spectrum Communication Systems Radio Communication Channel. FJU-EE – YUJL – Simulations of Communication Systems– Systems Chapter0 - Page 3. Grade . Homework (30%) Midterm Presentation (20%) Final Presentation and Report (50%). FJU-EE – YUJL – Simulations of Communication Systems– Systems Chapter0 - Page 4.
(3) Before start our course . . What is a communication system ? What is difference between digital and analog communication system ? What kind of topics are in communication system ?. FJU-EE – YUJL – Simulations of Communication Systems– Systems Chapter0 - Page 1. 1. What is a communication system? . What is electrical engineering (EE) ? . . Production and transmission of electrical energy Transmission of information. Communication systems are . Systems designed to transmit information. FJU-EE – YUJL – Simulations of Communication Systems– Systems Chapter0 - Page 2. 2.
(4) Difference of comm. system . In electric energy system . . In communication systems . . Waveforms are usually known Waveform present at user is unknown Otherwise, no information would be transmitted, there would be no need for communication. The transmission of information implies the communication of message that are not known ahead of time (a priori). FJU-EE – YUJL – Simulations of Communication Systems– Systems Chapter0 - Page 3. 3. Noise and comm. system . If there were no noise . . We would communicate messages electrically to the destination using an infinitely small amount of power. Noise limits our ability to communicate. FJU-EE – YUJL – Simulations of Communication Systems– Systems Chapter0 - Page 4. 4.
(5) Goal of communication system . Transmit and Receive information . With small power (energy) Î SNR,. . CNR. With small error Î Probability. . Error Rate. Under noisy channel Î AWGN Î Fading. Channel. FJU-EE – YUJL – Simulations of Communication Systems– Systems Chapter0 - Page 5. 5. Digital and Analog Source . Digital information source . Produces a finite set of possible message Î Ex:. . Typewriter. Analog information source . Produces messages that are defined on a continuum Î Ex:. Microphone. FJU-EE – YUJL – Simulations of Communication Systems– Systems Chapter0 - Page 6. 6.
(6) Digital and Analog System . Digital communication system . . Transfers information from a digital source to the sink. Analog communication system . Transfers information from an analog source to the sink. FJU-EE – YUJL – Simulations of Communication Systems– Systems Chapter0 - Page 7. 7. Digital communication system . Digital waveform . Have only a discrete set of values Î. . Analog waveform . . Ex: Binary waveform has only two values. Have a continuous range of values. Electronic digital communication system . Usually have digital waveforms However, it can have analog waveforms Î Î. Ex: 1000Hz sine wave for binary 1 and 500Hz for binary 0 Still called “Digital communication system”. FJU-EE – YUJL – Simulations of Communication Systems– Systems Chapter0 - Page 8. 8.
(7) Why Digital ? . . Relatively inexpensive digital circuits may be used Privacy is preserved by using data encryption Data from voice, video and data sources may be merged and transmitted over a common digital transmission system In long distance system, noise does not accumulate from repeater to repeater. FJU-EE – YUJL – Simulations of Communication Systems– Systems Chapter0 - Page 9. 9. Why Digital ? (Cont.) . Regenerative repeaters . Noise are not accumulated. FJU-EE – YUJL – Simulations of Communication Systems– Systems Chapter0 - Page 10. 10.
(8) Why digital ? (Cont.). . Errors in detected data may be small, even when a large amount of noise on the received signal Error may often be corrected by the use of coding. . Disadvantage of Digital communication. . Generally, more bandwidth is required than that for Analog systems Synchronization is required. . . Digital System are becoming more and more popular ! But we have to know analog system also ! 11. FJU-EE – YUJL – Simulations of Communication Systems– Systems Chapter0 - Page 11. Communication system Information input m(t) . Three subsystem . To user m’(t). Transmitter Channel Receiver. Signal Processing Transmitter Carrier Circuits s(t). Receiver Signal Processing. Carrier Circuits. FJU-EE – YUJL – Simulations of Communication Systems– Systems Chapter0 - Page 12. r(t). Transmission Medium (Channel) Noise n(t). 12.
(9) Typical digital comm. system. FJU-EE – YUJL – Simulations of Communication Systems– Systems Chapter0 - Page 13. 13. Digital comm. transformation . Transformation from one signal space to another Seven basic groups . Formatting and source coding Modulation / demodulation Channel coding Multiplexing and multiple access Spreading Encryption Synchronization. FJU-EE – YUJL – Simulations of Communication Systems– Systems Chapter0 - Page 14. 14.
(10) In this course . . . Basic mathematical concepts of digital communication will be given Some numerical examples using MATLAB is also given But, the implementation technique and application is weakly given . Please use references for these topics. FJU-EE – YUJL – Simulations of Communication Systems– Systems Chapter0 - Page 15. 15.
(11) MATLAB Tutorial. Referenced from Tolga Kurt [1]. Getting Started Matlab - Matrix laboratory A high-level technical computing language and interactive environment Useful for : analyzing data developing algorithms and applications. 23/09/2004. ELG 4174. 2.
(12) Defining vectors and matrices –(1/2) Defining a matrix Rows are separated by semicolons. Semicolons will prevent the results display on the command window. To display type the name of the variable.. 23/09/2004. ELG 4174. 3. Defining vectors and matrices –(2/2) Definition with increments:. 23/09/2004. ELG 4174. 4.
(13) Basic Operations Element by element operations: A+B A-B A*B A.*B A/B A./B A^B A.' A' A^-1 23/09/2004. Element by element addition Element by element subtraction Matrix multiplication Element by element multiplication A*inv(B) Element by element division Matrix power Transpose Complex conjugate transpose Matrix inverse - inv(A) ELG 4174. 5. Graphs Using built in function. 23/09/2004. ELG 4174. 6.
(14) Writing a function – (1/2). 23/09/2004. ELG 4174. 7. Writing a function – (2/2). 23/09/2004. ELG 4174. 8.
(15) Calling a function. 23/09/2004. ELG 4174. 9. M-file example-1 for t=1:itmax %%Generate two random shifted A=R1*(randint(64,1,2)*2-1); BPSK B=R2*(randint(64,1,2)*2-1); clear close all Tran=A+B*j; clc list=[.5 .6 .7 .8 .9 1] count=0; for k=list; av=av+mean(abs(Tran).^2)/itmax; count=count+1 R1=sqrt(k); end R2=sqrt(1-k); son(count)=10*log10(mx2/av); mx2=0; end itmax=100000; 23/09/2004 ELG 4174 10 plot(list,son) av=0;.
(16) M-file example-1 % MATLAB script that generates the probability of error versus the signal to noise ratio. initial_snr=0; final_snr=12; snr_step=0.75; tolerance=eps; % Tolerance used for the integration plus_inf=20; % This is practically infinity snr_in_dB=initial_snr:snr_step:final_snr; for i=1:length(snr_in_dB), snr=10^(snr_in_dB(i)/10); Pe_2(i)=1-quad8('bdt_int2',0,plus_inf,tolerance,[],snr,2); Pe_4(i)=1-quad8('bdt_int2',0,plus_inf,tolerance,[],snr,4); Pe_8(i)=1-quad8('bdt_int2',0,plus_inf,tolerance,[],snr,8); Pe_16(i)=1-quad8('bdt_int2',0,plus_inf,tolerance,[],snr,16); Pe_32(i)=1-quad8('bdt_int2',0,plus_inf,tolerance,[],snr,32); end; 23/09/2004. ELG 4174. 11. M-file example-1 % Plotting commands follow t=snr_in_dB; semilogy(t,Pe_2,'-',t,Pe_4,'--',t,Pe_8,'-.',t,Pe_16,':',t,Pe_32,'-') legend('M=2','M=4','M=8','M=16','M=32',0); axis([initial_snr,final_snr,1e-16,1e0]) xlabel('Input SNR per Bit','fontsize',16,'fontname','Arial') ylabel('Symbol Error Rate (SER)','fontsize',16,'fontname','Arial') set(findobj('Type','line'),'LineWidth',2) set(findobj('fontname','Helvetica'),'fontname','Times new Roman','fontsize',16) title('Symbol error probability for biorthogonal signals') hold off. 23/09/2004. ELG 4174. 12.
(17) M-file example-2 f=(0:0.5*10^4:40*10^9); w=2*pi*f; h=exp(i*w.^2*(-2.7*10^-22)); Hp=phase(h); hp=Hp*180/pi; plot(f, hp); xlabel('frequency'); ylabel('Hp'). 23/09/2004. ELG 4174. 13. Useful References http://www.genie.uottawa.ca/~ieee/pdffiles/matlab.ppt http://webclass.ncu.edu.tw/~junwu/index.html http://www.cs.nthu.edu.tw/~jang/mlbook/ http://caig.cs.nctu.edu.tw/course/NM/slides/MatlabTutorial.pdf http://users.ece.gatech.edu/~bonnie/book/TUTORIAL/tutorial.html Contemporary communication systems using MATLAB / J. G. Proakis, M. Salehi. MATLAB programming for engineers / Stephen J. Chapman. Simulation and Software Radio for Mobile Communications, Chapter 2, H. Harada and R. Prasad …. 23/09/2004. ELG 4174. 14.
(18) Signals and Linear Systems. 1.1 Linear Time Invariant (LTI) system 1.2 Fourier Series 1.3 Fourier Transform 1.4 Power and Energy 1.5 Lowpass Equivalent of Bandpass Signals. 1. 1.1 Linear Time Invariant (LTI) system . . Most communication channels, transmitter and receiver are well modeled as LTI system LTI system means a time shift in the input signal causes the same time shift in the output signal x(t). LTI System. then given x(t − t0 ),. y(t). output y (t − t0 ). 2.
(19) Impulse Response . For arbitrary input ???. LTI System. . Impulse response h(t). LTI System. 3. Convolution Integral . For continuous LTI system ∞. ∞. −∞. −∞. y (t ) = x(t ) ∗ h(t ) = ∫ h(τ ) x(t − τ ) dτ = ∫ x(τ )h(t − τ )dτ Input-output. relationship of LTI system h(t) is impulse response of the system x(t) is input signal y(t) is output signal. 4.
(20) Convolution Sum . For discrete system LTI System h(t) y ( n) =. ∑ x h(t − i). i =−∞. i. n. ∑ x h( n − i ). i =−∞. =. y (t ) =. t. i. n. ∑ x(i)h(n − i). i =−∞. = x ( n) * h( n). At time t. 5. Time and Frequency domain ? . . Some signals are easier to visualize in the frequency domain Some signals are easier to visualize in the time domain Ex: Sine wave Frequency. domain : 3 data (frequency, Amplitude, Phase) Time domain : lots of information to define accurately . Frequency domain analysis tools ÆFourier Series and Fourier Transform. 6.
(21) 1.2 Fourier Series . Fourier Series An. equation to calculate frequency, amplitude and phase of each sine wave needed to make up any periodic signals. . FT (Fourier Transform) Extension. of Fourier Series for Non-periodic signals Mathematical formula using Integrals . DFT (Discrete Fourier Transform) A. . discrete numerical equivalent using sums instead of integral. FFT (Fast Fourier Transform) Just. a computational fast way to calculate DFT 7. Complex exponential input and LTI . Input-output relation of LTI system ∞. y (t ) = x(t ) ∗ h(t ) = ∫ h(τ ) x(t − τ )dτ −∞. . Let input be complex exponential : Then the output is ∞. ∞. −∞. −∞. x(t ) = Ae j 2π f0t. y (t ) = ∫ h(τ ) Ae j 2π f0 (t −τ ) dτ = [ ∫ h(τ ) Ae − j 2π f0τ dτ ] Ae j 2π f0t = H ( f 0 ) x(t ) ∞. H ( f ) = ∫ h(τ ) Ae − j 2π f τ dτ : Frequency response of h(t ) −∞. . The output is complex exponential with the same frequency of input 8.
(22) Exponential Fourier Series . Any periodic signal x(t) with period T0 can be expressed ∞ by j 2π nf t j 2π nt / T ∞ j 2π nt / T x(t ) =. ∑xe. n =−∞. where. Î Î. 0. {. with basis : e. 0. =e. 0. }. n =−∞. Fourier series coefficient xn is. xn = Î. n. 1 T0. α + T0. ∫α. x(t )e − j 2π nt / T0 dt. f 0 = 1 T0 is fundamental frequency. is nth harmonics −T0 α = 0 or is usually used nf 0. 2. 9. Real-valued periodic signal . x(t) should be periodic if Fourier series is applied x(t) can be real or complex-valued signal If x(t) is real-valued signal Fourier. series coefficient {xn} are complex {xn} are Hermitian symmetry Î x− n =. 1 T0. α + T0. ∫α. x(t )e j 2π nt / T0 dt =. 1 α +T0 x(t )e − j 2π nt / T0 dt ]* = xn* [∫ T0 α. xn = x− n , ∠xn = −∠x− n Î Î. Real part(Magnitude) is even Imaginary part(Phase) is odd 10.
(23) Trigonometric Fourier series . Can be applied to real, periodic signals 1 α +T0 1 α +T0 − j 2π nt / T0 x t e dt = x(t )[cos(2π nt / T0 ) − j sin(2π nt / T0 )]dt ( ) T0 ∫α T0 ∫α 2 α +T0 2 α +T0 an = ∫ x(t ) cos(2π nt / T0 )dt , bn = ∫ x(t ) sin(2π nt / T0 )dt T0 α T0 α a − jbn a + jbn xn = n , x− n = n 2 2 xn =. . Using Hermitian symmetry x(t ) =. ∞. ∑xe. n =−∞. n. j 2π nt / T0. x− n = xn*. a0 ∞ = + ∑ [an cos(2π nt / T0 ) + bn sin(2π nt / T0 )] 2 n =1. AC component DC component 11. Polar form of Fourier series . Can be applied to real, periodic signals b Using the relation: a cos φ + b sin φ = a 2 + b 2 cos(φ − arctan ) a Define : cn = an2 + bn2 , θ n = − arctan. . bn an. Then. a0 ∞ x(t ) = + ∑ [an cos(2π nt / T0 ) + bn sin(2π nt / T0 )] 2 n =1 a0 ∞ = + ∑ cn cos(2π nt / T0 + θ n ) 2 n =1 12.
(24) Discrete Spectrum . Relations between FS coefficient For. real-valued periodic signal. xn =. an = 2 Re[ xn ] , bn = −2 Im[ xn ]. an − jbn 2. cn = xn , θ n = ∠xn . Discrete Spectrum Magnitude. spectrum: xn vs. n or nf 0 ∠xn vs. n or nf 0 Phase spectrum:. n. 13. FS and real-even(odd) signal . Real and even signal: Then. bn =. 2 T0. α + T0. ∫α. x(t ) = x(−t ). x(t ) sin(2π nt / T0 )dt = 0 Odd Even. All xn. are real Fourier series consists of all cosine functions . x(−t ) = − x(t ) 2 α +T0 an = ∫ x(t ) cos(2π nt / T0 )dt = 0 T0 α. Real and odd signal: Then All xn. are imaginary Fourier series consists of all sine functions. 14.
(25) IP1-1: FS of a rectangular signal train . Periodic rectangular signal. x(t). ⎧ A, t < t0 ⎪ t ⎪A x(t ) = AΠ ( ) = ⎨ , t = ±t0 2t0 ⎪2 ⎪0, otherwise ⎩ . Real and Even signal xn = =. 1 T0. α + T0. ∫α. x(t ) cos(2π nt / T0 )dt =. A. − T0 2. −t 0. −T0. 1 T0. ∫. + t0. − t0. t0 T0 2. t. T0. A cos(2π nt / T0 )dt. 2 At0 2nt sinc( 0 ) T0 T0 15. IP1-1 : FS Coefficient . If A = 1, T0 = 4, and t0 = 1: n ⎧ = sinc( ), a bn = 0 ⎪⎪ n 2 ⎨ ⎪cn = sinc( n ) , θ n = 0, π ⎪⎩ 2. . Sinc function is very important function to the analysis of communication system. 16.
(26) IP1-1 : FS Coefficient . From figure 1.4 Discrete. spectrum with an=0 for n=±2, ±4, … Fourier Series. 1. 0.9. 0.8. Amplitude. 0.7. 0.6. 0.5. 0.4. 0.3. 0.2. 0.1. 0 −20. −15. −10. −5. 0. 5. 10. 15. 20. Time Index. 17. IP1-1 : FS Coefficient From figure 1.3 Approximation. becomes closer to original signal x(t) as n. increases. 1.2. 1.2 n=1. 1 0.8. 0.8. 0.6. 0.6. 0.4. 0.4. 0.2. 0.2. 0 −0.2 −4. n=3. 1. 0 −2. 0. 2. −0.2 −4. 4. −2. 0. 2. 4. Fourier Series 1.2. 1.2 n=7. 1 0.8 0.6 0.4 0.2 0 −0.2 −4. n=15. 1. Amplitude. . 0.8 0.6 0.4 0.2 0. −2. 0. 2. 4. −0.2 −4. −2. 0. 2. 4. Time. 18.
(27) IP1-1 : Plot commands 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18.. figure (2) subplot(221) plot(t,B(1,:),'b-','MarkerSize',7,'LineWidth',1.5); legend('n=1') subplot(222) plot(t,B(2,:),'k--','MarkerSize',7,'LineWidth',1.5); legend('n=3') subplot(223) plot(t,B(3,:),'r-.','MarkerSize',7,'LineWidth',1.5); legend('n=7') subplot(224) plot(t,B(5,:),'b:','MarkerSize',7,'LineWidth',2.0); legend('n=15') xlabel('Time','fontsize',15,'fontname','Arial') ylabel('Amplitude','fontsize',15,'fontname','Arial') title('Fourier Series','fontsize',15,'fontname','Arial') saveas(gcf, 'IP_01_01b', 'fig') print -depsc -tiff IP_01_01b. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.. x=[-6:0.1:6]; y=normal(x,0,1); figure x1=[-18:0.1:18];y1=[y(1:length(y)1),y,y(1:length(y)-1)]; plot(x1,y1,'LineWidth',1.5) xlabel('Time','fontsize',15,'fontname','Arial') ylabel('Amplitude','fontsize',15,'fontname','Arial') title('Gaussian signal waveform','fontsize',15,'fontname','Arial') saveas(gcf, 'IP_01_03b', 'fig') print -depsc -tiff IP_01_03b. 19. Fseries.m 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14.. function xx=fseries(funfcn,a,b,n,tol,p1,p2,p3) j=sqrt(-1); args0=[]; for nn=1:nargin-5 # of input arguments args0=[args0,',p',int2str(nn)]; end args=[args0,')']; Execute the instruction in ‘string’ t=b-a; xx(1)=eval(['1/(',num2str(t),').*quad(funfcn,a,b,tol,[]',args]) ; for i=1:n b ∫a funfcn(t , p1, p 2,...)dt new_fun = 'exp_fnct' ; args=[',', num2str(i), ',', num2str(t), args0, ')' ] ; xx(i+1)=eval(['1/(',num2str(t),').*quad(new_fun,a,b,tol,[],funfcn',args]); end 20.
(28) lambda.m 1. 2.. 3.. 4. 5. 6. 7. 8. 9.. function y=lambda(x) % y=lambda(x) generates a triangular signal y=(x+1).*(x>-1 & x<0)+(x==0)+(x+1).*(x>0 & x<1); function y=normal(x,m,s) % FUNCTION y=NORMAL(x,m,s) % Gaussian distribution % m=mean % s=standard deviation y=(1/sqrt(2*pi*s^2))*exp(-((xm).^2)/(2*s^2));. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.. function y=exp_fnct(x,funfcn,k,T,p1,p2,p3) % y=exp_fnct(x,funfcn,k,T,p1,p2,p3) % Returns the function funfcn(x) times % the exponential factor exp(-j*2*pi*k/T*x) j=sqrt(-1) ; 1 α +T0 xn = ∫ x(t )e − j 2π nt / T0 dt args=[]; T0 α for nn=1:nargin-4 args=[args,',p',int2str(nn)]; end args=[args,')'] ; y=eval([funfcn,'(x',args,'.*exp(j*2*pi*x*k/T)']); 21. IP1-2: magnitude and phase spectral . Periodic triangular signal. ⎧t + 1, −1 < t ≤ 0 ⎪ x(t ) = Λ (t ), for t ≤ 4 = ⎨−t + 1, 0 < t < 1 ⎪0, otherwise ⎩ . . t=-1. t=0. t=1. Note: the parameter tol in fseries.m will seriously influence the simulation results. t0l=0.1Ætol=0.0001. 22.
(29) IP1-2: magnitude and phase spectral The Discrete Magnitude Spectrum 0.14. Amplitude. 0.12 0.1 0.08 0.06 0.04 0.02 0 −25. −20. −15. −10. −5. 0. 5. 10. 15. 20. 25. 15. 20. 25. Time The Discrete Phase Spectrum. Amplitude. 4. 2. 0. −2. −4 −25. −20. −15. −10. −5. 0. 5. 10. Time. 23. IP1-3: magnitude and phase spectral . Periodic Gaussian signal x(t ) =. 2π. e. −. t2 2. , for t ≤ 6. t0l=0.1Ætol=0.0001 Gaussian signal waveform 0.4. 0.35. 0.3. 0.25. Amplitude. . 1. 0.2. 0.15. 0.1. 0.05. 0 −20. −15. −10. −5. 0. 5. 10. 15. 20. Time. 24.
(30) IP1-3: magnitude and phase spectral The Discrete Magnitude Spectrum 0.1. Amplitude. 0.08. x(t ) = 0.06 0.04. 1 2π. e. −. t2 2. , for t ≤ 6. 0.02 0 −25. −20. −15. −10. −5. 0. 5. 10. 15. 20. 25. 15. 20. 25. Time The Discrete Phase Spectrum. Amplitude. 4. 2. 0. −2. −4 −25. −20. −15. −10. −5. 0. 5. 10. Time. 25. 1.2.1 Periodic Signals and LTI Systems . The output of LTI system with periodic input From. eq(1.2.3), if input is a complex exponential, the output of LTI system is also a complex exponential with the same frequency as the input but the magnitude and phase are changed If the input is a period signal, the output signal is also periodic x(t ) =. ∞. ∑xe. n =−∞. Then. n. j 2π nt / T0. , y (t ) =. ∞. ∑ye. n =−∞. n. j 2π nt / T0. x(t). LTI System. y(t). the relation between xn and yn ???. 26.
(31) Periodic Signals and LTI Systems . From convolution integral ∞. y (t ) = ∫ x(t − τ )h(τ )dτ = ∫ −∞. =. −∞. ∞. ∑ x {∫ n. n =−∞. . ∞. ∞. −∞. h(τ )e. − j 2π nτ / T0. ∞. ∑xe. n =−∞. dτ }e. n. j 2π n ( t −τ ) / T0. j 2π nt / T0. ∞. H ( f ) = ∫ h(t )e − j 2π ft dt ⇒ H (nf 0 ) = H ( −∞. . We have . ∞. ∑ye. n =−∞. Define transfer function of LTI. yn = xn H (. =. h(τ )dτ n. j 2π nt / T0. ∞ n ) = ∫ h(t )e − j 2π t ( n / T0 ) dt −∞ T0. n ) T0. If we know xn (x(t)) and H(f) or h(t), we can get yn (y(t)) 27. IP1-4: Filtering of Periodic Signals . Triangle pulse and Filter LTI System H(f). Sum of below. H(f0). x0*H(f0). H(f1). x1*H(f1). H(f3) H(f5). x3*H(f3) x5*H(f5) 28.
(32) IP1-4 : Filtering of Periodic Signals . Fourier series of Lambda signal xn = =. . 1 T0. ∫. T0 / 2. −T0 / 2. x(t )e − j 2π nt / T0 dt =. 1 1 1 ∞ − jπ nt ( ) Λ t e dt = Λ (t )e− jπ nt dt ∫ ∫ 2 −1 2 −∞. 1 1 n F [Λ (t )] f = n / 2 = sinc 2 ( ) 2 2 2. Period =To=2 Æ fundamental frequency=fo=0.5. Transfer function :using numerical approach (FFT) H ( nΔF ) = H ( f ) f = nΔF = Ts DFT {hn } h(t). H(f) DFT ∆F. TS. FS. ∆T. 29. IP1-4 : Filtering of Periodic Signals . Selection of time parameter ∆T According. 1. 1. to property of DFT ΔT = ΔF and Ts = Fs. We want ΔF = f 0 ⇒ ΔT = 1 f 0 = 2 and ΔF = 1 2 . Selection of time parameter Ts Depends. on the number of frequency bins we want to observe If N is given, then FS = N ΔF ⇒ TS = ΔT N = 2 / 80 = 1/ 40 (in pp16) . Usage of fftshift: generally, we want to display the frequency responses between H (− N 2) ~ H ( N 2) H=fft(h). returns H(0)~H(N-1) H1=fftshift(H) returns H (− N 2) ~ H ( N 2) 30.
(33) IP1-4 : Filtering of Periodic Signals 3. 4. 5. 6. 7. 8. 9. 10.. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.. fs=1/ts; h=[zeros(1,20),t(21:61),zeros(1, 20)]; % transfer function H=fft(h)/fs; % frequency resolution df=fs/80; f=[0:df:fs]-fs/2; % rearrange H H1=fftshift(H); y=x.*H1(21:61); % Plotting commands follow. 31. IP1-4 : Filtering of Periodic Signals Frequency Response of System 0.7 0.6. Amplitude. 2.. % IP1-4 Chapter 1. echo on n=[-20:1:20]; % FS coefficients of x(t) vector x=.5*(sinc(n/2)).^2; % sampling interval ts=1/40; % time vector t=[-.5:ts:1.5]; % impulse response. 0.5 0.4 0.3 0.2 0.1 0 −20. −15. −10. −5. 0. 5. 10. 15. 20. 15. 20. Frequency Frequency Response of System 0.7 0.6. Amplitude. 1.. 0.5 0.4 0.3 0.2 0.1 0 −20. −15. −10. −5. 0. 5. 10. n. 32.
(34) IP1-4 : Filtering of Periodic Signals Input Signal 0.5. Amplitude. 0.4 0.3 0.2 0.1 0 −20. −15. −10. −5. 0. 5. 10. 15. 20. 5. 10. 15. 20. n Outptu Signal 0.35. Amplitude. 0.3 0.25 0.2 0.15 0.1 0.05 0 −20. −15. −10. −5. 0. n. 33. IP1-4 : Filtering of Periodic Signals . Questions: What. is the difference if we set ts=1/20 or ts=1/80. Can we still get the correct output signals? How to compute xn by using fft method? (xn is a periodic continuous signal) What is the difference if we select h(t), t=0~2 to perform the fft operation ?. 34.
(35) Homework #1 . Problems 1.1,. 1.2, 1.3, 1.7, 1.8. 35. 1.3 Fourier Transform . FT is the extension of FS to non-periodic signal Definition of Fourier transform Fourier. transform. Î X ( f ) = F [ x(t )] = Inverse. ∫. −∞. x(t )e − j 2π ft dt. Fourier transform. −1 Î x(t ) = F [ X ( f )] =. . ∞. ∫. ∞. −∞. X ( f )e j 2π ft df. For a real signal x(t), X(f) is Hermitian Symmetry X (− f ) = X * ( f ) Magnitude. spectrum is even about the origin (f=0) Phase spectrum is odd about the origin 36.
(36) Properties of FT . Linearity F [α x1 (t ) + β x2 (t )] = α F [ x1 (t )] + β F [ x2 (t )]. . Duality If X ( f ) = F [ x(t )]. . , Then F [ X (t )] = x(− f ). Time Shift A. shift in the time domain results in a phase shift in the frequency domain F ( x(t − t0 )) = e − j 2π ft0 X ( f ). . {Note :. e − j 2π ft0 X ( f ) = X ( f ). }. Scaling: An. expansion in the time domain results in a contraction in the frequency domain, and vice versa 1 f F [ x(at )] =. a. X( ) , a ≠ 0 a. 37. Properties of FT . Modulation Multiplication. by an exponential in the time domain corresponds to a frequency shift in the frequency domain. F [e j 2π f0t x(t )] = X ( f − f 0 ). 1 F [ x(t ) cos(2π f 0 t )] = [ X ( f − f 0 ) + X ( f + f 0 )] 2. x(t) X(f). cos -f0. f0. -f0. f0 38.
(37) Properties of FT . Differentiation Differentiation. in the time domain corresponds to multiplication by j2πf in the frequency domain d x(t )] = j 2π f ⋅ X ( f ) dt dn F [ n x(t )] = ( j 2π f ) n ⋅ X ( f ) dt F[. . Convolution. Convolution. in the time domain is equivalent to multiplication in the frequency domain, and vice versa F [ x(t ) ∗ y (t )] = X ( f )Y ( f ) F [ x(t ) y (t )] = X ( f ) ∗ Y ( f ) 39. Properties of FT . Parseval’s relation ∫ x(t ) y (t )dt = ∫ X ( f )Y ∞. *. −∞. ∞. −∞. *. ( f )df. Energy. can be evaluated in the frequency domain instead of the time domain. . Rayleigh’s relation . ∫. ∞. −∞. x(t ) x* (t )dt = ∫. ∞. −∞. x(t ) dt = ∫ 2. ∞. −∞. 2. X ( f ) df. 40.
(38) More on FT pairs . See Table 1.1 at page 20 . Delta function ÅÆ Flat Time / Frequency shift Sin / cos input Æ impulses in the frequency domain sgn / unit step input Rectangular ÅÆ sinc Lambda ÅÆ sinc2 Differentiation Pulse train with period T0 Periodic signal Æ impulses in the frequency domain. 41. FT of periodic signals . For a periodic signal with period T0 x(t) can be expressed with FS coefficient Take FT X ( f ) = F [ x(t )] = F [∑ ∞n =−∞ xn e j 2π nt / T ]. x(t ) =. ∞. ∑xe. n =−∞. n. j 2π nt / T0. 0. = ∑ n =−∞ xn F [e j 2π nt / T0 ] = ∑ n =−∞ xnδ ( f − ∞. ∞. n ) T0. FT. of periodic signal consists of impulses at multiples of the harmonics (fundamental frequency 1/T0) of the original signal. . Ex: x(t ) = ∑ n =−∞ δ (t − nT0 ) ⇒ X ( f ) = ∞. 1 T0. ∑. ∞. δ(f − n =−∞. n ) T0. 42.
(39) FS versus FT . FS coefficient can be expressed using FT Define. truncated signal. ⎧ ⎪ x(t ) xT0 (t ) = ⎨ ⎪⎩0. T0 T <t≤ 0 2 2 , otherwise. ,−. FT. of truncated signal: X T ( f ) = F [ xT (t )] Expression of FS coefficient 0. xn =. 1 T0. =. 1 T0. ∫. T0. ∫. ∞. 0. −∞. x(t )e − j 2π nt / T0 dt =. 0. 1 T0. xT0 (t )e − j 2π nt / T0 dt =. ∫. T0. 0. xT0 (t )e − j 2π nt / T0 dt. n 1 X T0 ( ) T0 T0 43. Spectrum of the signal . Fourier transform of the signal is called the Spectrum of the signal Generally. Î Î. complex Magnitude spectrum Phase spectrum. 44.
(40) 1.3.1 Sampling Theorem . . Basis for the relation between continuous-time signal and discrete-time signals A bandlimited signal can be completely described in terms of its sample values taken at intervals Ts as long as Ts ≤ 1/(2W) X(f). x(t). 1. Ts. f. W. -W. 45. Impulse sampling . Sampled waveform ∞ . . xδ (t ) = x(t ) ∑ δ (t − nTs ) =. Take FT. n =−∞. ∞. ∑ x(nT )δ (t − nT ) s. n =−∞. s. ∞. ∞. X δ ( f ) = F [ xδ (t )] = F [ x(t ) ∑ δ (t − nTs )] = X ( f ) ∗ F [ ∑ δ (t − nTs )] n =−∞. = X ( f )∗. 1 Ts. n =−∞. ∞. n. n =−∞. s. 1. ∞. n. ∑ δ(f − T ) = T ∑ X(f − T ) s n =−∞. s. Xδ(f) 1/Ts. xδ(t). Ts. -W. W 1/(2Ts). 1/Ts 46. f.
(41) Reconstruction of signal . Low pass filter With. Bandwidth 1/(2Ts) and Gain of Ts Low pass filter. Xδ(f). W 1/(2Ts). -W. X ( f ) = Ts X δ ( f ),. 1/Ts. f. for f < W. 47. Reconstruction from sampled signal . If we have sampled values {…. x(-2Ts), x(-Ts), 0, x(Ts), x(2Ts) …} With Nyquist interval (or Nyquist rate) Î Ts = 1/(2W) . Then we can reconstruct x(t) using x(t ) =. ∞. ∑ x(nT ) sinc(2W (t − nT )). n =−∞. . s. s. Example: Figure 1.17 at page 24. 48.
(42) Reconstruction from sampled signal. 49. Aliasing or Spectral folding . If sampling rate is Ts > 1/(2W) Spectrum. is overlapped We can not reconstruct original signal with under-sampled values Anti-aliasing methods are needed X(f) 1/Ts. X(f). -W. W. f. -W. W 1/Ts. f 50.
(43) Aliasing . We only sample the signal at intervals We. don’t know what happens between the samples. 51. Aliasing . We must sample fast enough to see the most rapid changes in the signal This. . is Sampling theorem. If we do not sample fast enough Some. higher frequencies can be incorrectly interpreted as lower. ones. 52.
(44) Aliasing . Called “aliasing” because one frequency looks like another. 53. Discrete Time Fourier Transform . Z-transform : X ( z ) = ∑ n =−∞ x[n]z − n Discrete Time Fourier Transform (DTFT) of discrete time sequence ∞ x[n] X ( f ) = X ( z) = x[n]e − j 2π fnT ∞. δ. . ∑. z = e − j 2 π fTs. s. n =−∞. From sampling theorem, we have FT versus DTFT relation xδ (t ) = x(t )∑ n =−∞ δ (t − nTs ) = ∑ n =−∞ x(nTs )δ (t − nTs ) ∞. ∞. X δ ( f ) = F [ xδ (t )] = F [∑ n =−∞ x(nTs )δ (t − nTs )] = ∑ n =−∞ x(nTs ) F [δ (t − nTs )] ∞. = ∑ n =−∞ x[n]e − j 2π fnTs ∞. 1 Xδ ( f ) = Ts. ∞. n. n =−∞. s. ∞. (DTFT). ∑ X ( f − T ) X ( z). (from Sampling Theorem). X ( f ) = Ts X δ ( f ) = Ts ∑ n =−∞ x[n]e − j 2π fnTs , ∞. for f < W 54.
(45) Discrete Fourier Transform . DFT of discrete time sequence x[n],n=0~N-1 DFT : X (k ) = ∑ n =1 x[n]e − j 2π nk / N N. IDFT : x[n] = (1 N ) ∑ k =1 X (k )e j 2π nk / N N. . Relation between DTFT and DFT. X δ ( f = kf 0 ) = ∑ n =1 x[n]e − j 2π kf0 nTs = ∑ n =1 x[n]e − j 2π nk / N = X (k ) N. N. where f 0Ts = Ts T0 = N . Relation between FT and DFT X ( f ) = Ts X δ ( f ),. for f < W , and X δ ( f = kf 0 ) = X (k ). ⇒ X ( f = kf 0 ) = Ts X (k ) . Relation between FS and DFT xk = (1 T0 ) X T0 (kf 0 ), and X ( f = kf 0 ) = Ts X (k ) ⇒ xk = (1 T0 ) Ts X (k ) = (1 N ) X (k ). 55. Summary xk = FS : xk =. 1 T0. α + T0. ∫α. 1 X (kf 0 ) T0. x(t )e − j 2π kt / T0 dt. xk = (1 N ) X (k ). DFT : X (k ) = ∑ n =1 x[n]e − j 2π nk / N. ∞. FT : X ( f ) = ∫ x(t )e − j 2π ft dt −∞. X ( f = kf 0 ) = Ts X (k ). X ( f ) = Ts X δ ( f ). N. DTFT : X δ ( f ) = ∑ n =−∞ x[n]e − j 2π fnTs ∞. X δ ( f = kf 0 ) = X (k ) 56.
(46) FFT in Matlab . A sequence of length N=2m of samples of x(t) taken at Ts Ts. satisfies Nyquist condition Ts is called time resolution . FFT gives a sequence of length N of sampled Xd(f) in the frequency interval [0, fs=1/Ts] samples are apart by Δf = f s / N Δf is called frequency resolution Î Frequency resolution is improved by increasing N. The . 57. DFT in Matlab . FFT(Fast Fourier Transform) is an Efficient numerical method to compute DFT See fft.m and fftseq.m, for more information Time and frequency is not appeared explicitly N is chosen to be N=2m Î Zero padding is used if N is not power of 2 Zero padding. h(t). H(f). DFT TS. ∆T. ∆F FS. 58.
(47) Zero padding in FFT . Padding zeros at time resolution Ts Maximum. frequency is unchanged = Fs Number of sequence in changed from L to N Frequency resolution is increased from Fs L to ΔF = Fs / N . Let. . The frequency response are X (k ) = ∑ x[n]e π X (k ) = ∑ x[n]e π = ∑ x[n]e We conclude that. x[n], n=0,1," , L -1 x[n] = x[n], n=0,1," , L -1, and x[n] = 0, n=L," , N -1, N = 2 K ≥ L L. − j 2 nk / L. n =1 N. − j 2 nk / N. n =1. . L −1. − j 2π n ( Lk / N ) / L. n =1. = X ( Lk / N ). X (0) = X (0), X (1) = X ( L N ), X (2) = X (2 L N )," , X ( N − 1) = X (( N − 1) L N ) 59. IP1-5: Fourier Transfoerm . Plot the frequency responses of x1(t) and x2(t). . Parameters setting: BW ∝ 1/ 2, set W = 10 × 1/ 2 = 5 ⇒ Fs = 2W = 10 ⇒ ts = 0.1 default drequency resolution ΔF = 0.01Hz. . Select t=[-5,5] as a time period for x1(t) and x2(t) 60.
(48) IP1-5: Fourier Transfoerm. 3. 4. 5. 6. 7. 8. 9. 10. 11.. 61. IP1-5: Fourier Transfoerm Frequency Response of System 2. Amplitude. 2.. df=0.01; fs=10; ts=1/fs; t=[-5:ts:5]; x1=(t+1).*(t>=-1 & t<=0)+(t>=0 & t<=1); x2=(t).*(t>=0 & t<=1)+(t>=1 & t<=2); [X1,x11,df1]=fftseq(x1,ts,df); [X2,x21,df2]=fftseq(x2,ts,df); X11=X1/fs; X21=X2/fs; f=[0:df1:df1*(length(x11)-1)]-fs/2;. 1.5. 1. 0.5. 0 −5. −4. −3. −2. −1. 0. 1. 2. 3. 4. 5. Frequency Frequency Response of System 4. 2. Phase. 1.. 0. −2. −4 −0.2. −0.15. −0.1. −0.05. 0. Frequency. 0.05. 0.1. 0.15. 62.
(49) IP1-6: Fourier Transform . Plot the frequency response of x(t) ⎧t + 2 −2 ≤ t ≤ −1 ⎪ 1 −1 ≤ t ≤ 1 ⎪ x(t ) = ⎨ ⎪ −t + 2 1 < t ≤ 2 ⎪⎩ 0 otherwise. . X ( f ) = 4sin c 2 (2 f ) − sin c 2 ( f ). Parameters setting:. BW ∝ 1/ 4, set W = 10 × 1/ 4 = 2.5 ⇒ Fs = 2W = 5 ⇒ ts = 0.2 default drequency resolution ΔF = 0.01Hz . Select t=[-4,4] as a time period for x1(t) and x2(t) 63. IP1-6: Fourier Transfoerm Magnitude−pectrum of x(t) derived analytically 3 2.5 2 1.5 1 0.5 0 −2.5. −2. −1.5. −1. −0.5. 0. 0.5. 1. 1.5. 2. 2.5. 2. 2.5. Frequency Magnitude−pectrum of x(t) derived numerically 3 2.5 2 1.5 1 0.5 0 −2.5. −2. −1.5. −1. −0.5. 0. Frequency. 0.5. 1. 1.5. 64.
(50) Frequency domain analysis of LTI system . The output of LTI system . . y (t ) = x(t ) ∗ h(t ). Take FT (using convolution theorem) . Y ( f ) = X ( f )H ( f ) Î. Where the Transfer Function of the system ∞. H ( f ) = F [h(t )] = ∫ h(t )e − j 2π ft dt −∞. . The relation between input-output spectra . Y( f ) = X ( f ) H( f ) ∠Y ( f ) = ∠X ( f ) + ∠H ( f ). 65. IP1-7: LTI system analysis . Plot the frequency response of x(t) t+2 −2 ≤ t ≤ 0 ⎧ ⎪ 1 0 < t ≤1 ⎪⎪ x(t ) = ⎨2 + 2 cos(0.5π t ) 1 < t ≤ 3 ⎪ 1 3<t ≤ 4 ⎪ 0 otherwise ⎪⎩. . Parameters setting: Fs = 5 ⇒ ts = 0.2 default drequency resolution ΔF = 0.01Hz. . Select t=[-5,5] as a time period for x(t) 66.
(51) IP1-7: LTI system analysis . Ideal LPF Input Signal 8. 1.5. 6. Amplitude. Amplitude. Input Signal 2. 1. 0.5. 0 −5. 0. 4. 2. 0 −4. 5. −2. Time. 2. 4. Output Signal 2.5. 0.8. 2. Amplitude. Amplitude. LPF Frequency Response 1. 0.6 0.4 0.2 0 −4. 0. Frequency. 1.5 1 0.5. −2. 0. 2. 0 −5. 4. 0. Frequency. 5. Time. 67. IP1-7: LTI system analysis Selective frequency filter Input Signal. 2. 8. 1.5. 6. Amplitude. Amplitude. Input Signal. 1. 0.5. 0 −5. 0. 4. 2. 0 −4. 5. −2. Time. 2. 4. 5. 10. Output Signal 3. 0.8. 2.5. Amplitude. 1. 0.6 0.4 0.2 0 −5. 0. Frequency. Impulse Response. Amplitude. . 2 1.5 1 0.5. 0. Time. 5. 0 −10. −5. 0. Time. 68.
(52) IP1-7: LTI system analysis . Remarks: how to compute output sequence precisely ? By. FFT. x(t ) → x[n] ⇒ X (kf o ) = Ts X [k ] ( x(t ) ↔ X ( f ) and x[n] ↔ X [k ]). h(t ) → h[n] ⇒ H (kf o ) = Ts H [k ] y (t ) = x(t ) ∗ h(t ) → Y ( f ) = X ( f ) H ( f ) ⇒ Y (kf o ) = X (kf o ) H (kf o ) ⇒ TsY [k ] = Ts X [k ]Ts H [k ] ⇒ Y [k ] = Ts X [k ]H [k ] ⇒ y[n] = IDFT (Y [k ]) By. partially FFT (used in text). x(t ) → x[n] ⇒ X (kf o ) = Ts X [k ] ( x(t ) ↔ X ( f ) and x[n] ↔ X [k ]) h(t ) → H ( f ) ⇒ H (kf o ) y (t ) = x(t ) ∗ h(t ) → Y ( f ) = X ( f ) H ( f ) ⇒ Y (kf o ) = X (kf o ) H (kf o ) ⇒ TsY [k ] = Ts X [k ]H (kf o ) ⇒ Y [k ] = X [k ]H (kf o ) ⇒ y[n] = IDFT (Y [k ]) 69. IP1-7: LTI system analysis . Remarks: how to compute output sequence precisely ? By. discrete convolution (used by text, but the authors made a mistake x(t ) → x[n], h(t ) → h[n] ∞. y (t ) = x(t ) ∗ h(t ) = ∫ x(τ ) ∗ h(t − τ )dτ ≈ ∑ x(kTs )h(t − kTs )Ts −∞. k. y (nTs ) = y[n] = ∑ x[k ]h(n − k )Ts = Ts x[n]* h[n] n. The. above result is consistent to that by FFT. When the data and channel are transferred from continuous into discrete, the discrete output signal either by FFT multiplication or by direct convolution is equal to the continuous one up to a constant sampling period TS 70.
(53) Some remarks on short signal . FT works on signals of infinite duration But, we only measure the signal for a short time. . FFT works as if the data is periodic all the time. . 71. Frequency leakage . If the period exactly fits the measurement time, the frequency spectrum is correct If not, frequency spectrum is incorrect. . It is broadened due to the window effect.. . 72.
(54) Homework #2 . Problems 1.10,. 1.12, 1.14, 1.15, 1.18. 73. 1.4 Power and Energy . Definition of Power in communication systems . . . Normalized Power . . Instantaneous power p (t ) = v(t )i (t ) T /2 1 T /2 Average Power P = lim 1 ( ) lim p t dt = v(t )i (t )dt T →∞ T ∫−T / 2 T →∞ T ∫−T / 2 Rms (Root mean square) value 1 T /2 2 X rms = lim ∫ x (t )dt T →∞ T −T / 2 Average Power for resistive load 2 Vrms 1 T /2 2 1 T /2 2 2 P = lim ∫ v (t )dt R = R lim ∫ i (t )dt = = RI rms = Vrms I rms T →∞ T −T / 2 T →∞ T −T / 2 R Used by communication engineers R is assumed to be 1Ω. Average Normalized Power. 1 T /2 2 w (t )dt T →∞ T ∫−T / 2. P = lim. 74.
(55) Definitions . Decibel gain of system P ( dB ) = 10 log( . P average power out ) = 10 log( out ) (unit: dB) average power in Pin. If dB is known Î. Î Î Î. Pout = 10 P ( dB ) /10 Pin. 0 dB : Pout = Pin 3 /10 3 dB : Pout = 10 Pin = 2 Pin 1 −3 /10 10 P = P = Pin out in -3dB : 2. 75. Definitions . Decibel SNR(signal-to-noise ratio) 1 T /2 2 s (t )dt Psignal Vrms − signal T →∞ T ∫−T / 2 = 10 log( ) = 10 log( ) = 20 log( ) 1 T /2 2 Pnoise V rms − noise lim ∫ n (t )dt T / 2 − T →∞ T lim. ( S / N ) dB. . Decibel power level with respect to 1mW actual power level (Watt ) ) 10−3 = 30 + 10 log(actual power level (Watt )). dBm = 10 log(. 76.
(56) Power and Energy . For a real signal x(t), energy and power of x(t) are defined respectively by ∞. 1 T /2 2 x (t )dt T →∞ T ∫−T / 2. PX = lim. E X = ∫ x (t )dt 2. −∞. . Energy-type signal: A signal with finite energy Ex:. . Power-type signal: A signal with positive and finite power Ex:. . x(t) = ∏(t) x(t) = cos(t). All periodic signals are power-type signal.. 77. Energy Spectral Density . . Energy spectral density of energy-type signal gives the distribution of energy at various frequency of signal For a real-valued signal x(t), Autocorrelation function = R (τ ) = ∫ x(t ) x(t + τ )dτ = x(t ) ∗ x(−t ) ESD = g ( f ) = X ( f ) = F [ x(t ) ∗ x (t )] = F [ ∫ x(t ) x(t + τ ) dτ ] = F [ R (τ )] ∞. x. 2. −∞. ∞. *. X. Energy. =. −∞. ∞. ∞. −∞. −∞. E X = ∫ x 2 (t )dt = ∫. x. ∞. X ( f ) df = ∫ g X ( f )df 2. −∞. 78.
(57) Power Spectral Density . For a real-valued power-type signal x(t), Autocorrelation PSD. function =. 1 T →∞ T. Rx (τ ) = lim. = S X ( f ) = F [ Rx (τ )]. Power. =. ∫. T /2. −T / 2. x(t ) x(t + τ )dτ. ∞. PX = ∫ S X ( f )df −∞. . PSD is always a real nonnegative function of frequency. . Find average normalized power 1 T /2 2 x (t )dt T →∞ T ∫−T / 2. ∞. Px = ∫ S x ( f )df = Rx (0) = lim −∞. 79. More on PSD . For a periodic x(t) with period T0 and FS coefficient xn. ∞ 1 T /2 1 T /2 ⎛ ∞ j 2π nt / T0 ⎞ ⎛ Rx (τ ) = lim ∫ x(t ) x(t + τ )dτ = ∫ ⎜ ∑ xn e xk e j 2π k ( t +τ ) / T0 ∑ ⎟ ⎜ T →∞ T −T / 2 T −T / 2 ⎝ n =−∞ ⎠ ⎝ k =−∞. = ∑ k xk e j 2π kf0τ 2. is S x ( f ) = F{Rx (τ )} = ∑ k xk δ ( f − kf 0 ) Discrete spectrum ! All powers are concentrated at the harmonics 2 Î Power at the nth harmonics at n/T0 is xn PSD. 2. 80. ⎞ ⎟ dt ⎠.
(58) PSD and LTI system x(t) Sx(f) . H(f). y(t) Sy(f). Output ESD 2. g y ( f ) = H ( f ) gx ( f ). . Output PSD 2. S y ( f ) = H ( f ) Sx ( f ). 81. PSD for discrete time signals . For an aperiodic sampled signal {… , x[-1], x[0], x[1], …} E = T ∑ x [ n] ∞. X. s. 2. n =−∞. N 1 PX = lim x 2 [ n] ∑ N →∞ 2 N + 1 n =− N. . For a periodic sampled signal: N −1. E X = Ts ∑ x 2 [n] n=0. 1 PX = N. N −1. ∑ x [ n] 2. n=0. 82.
(59) IP1-8: Power Spectrum . Plot the PSD of x(t) ⎧cos(2π × 47t ) + cos(2π × 219t ) 0 ≤ t ≤ 10 x(t ) = ⎨ 0 otherwise ⎩. . Parameters setting: ts = 0.001, t = [0 : ts :10]. . . . Spectrum.m : compute Sx(f) using Welch PSD method with nonoverlapped window nonparametric PSD estimator psd=spectrum(x,1024) : returns two vectors, one is mean vector and another is variance vector. specplot(psd,fs) : plot spectrum of data in psd with three curves, psd(mean), psd(mean+variance) and psd(mean-variance) 83. IP1-8: Power Spectrum Pxx − X Power Spectral Density. 10. Pxx − X Power Spectral Density. 5. 10. 10 No noise. SNR=10dB. 0. 10. 0. 10 −10. 10. −20. 10. −5. 0. 100. 200 300 Frequency. 400. 500. Pxx − X Power Spectral Density. 4. 10. 0. 200 300 Frequency. 400. 500. Pxx − X Power Spectral Density. 4. 10. 100. 10 SNR=0dB. SNR=−10dB. 2. 10. 2. 10 0. 10. 0. 10. −2. 10. −4. 10. −2. 0. 100. 200 300 Frequency. 400. 500. 10. 0. 100. 200 300 Frequency. 400. 500. 84.
(60) 1.5 Lowpass Equivalent of Bandpass Signals . Bandpass signal All. frequency components are located in the neighborhood of a central frequency f0. . Lowpass signal All. frequency components are located around the zero frequency. BP signal. -f0. X(f). 2W. f0. LP signal. -W. X(f). 0 W. 85. Why? . . To increase the efficiency of communication system, bandpass signal is used But, the analysis and design is usually done with lowpass signal. 86.
(61) Analytic signal . Define analytic signal as (in time domain) z (t ) = x(t ) + jxˆ (t ) where xˆ (t ). . is Hilbert transform of x(t). Hilbert transform xˆ (t ) = x(t ) ∗ h(t ) where h(t ) = 1 π t H(f). Î. = F[h(t)] corresponds to a –90° phase shift ⎧− j, f > 0 H ( f ) = − j sgn( f ) = ⎨ ⎩ j, f < 0. 87. Analytic signal . Define analytic signal as Z ( f ) = X ( f ) + jXˆ ( f ) = X ( f ) + j (− j sgn( f )) X ( f ) = 2u−1 ( f ) X ( f ) where u−1 ( f ). BP signal. -f0. is unit step function. Analytic signal Z(f). X(f). f0. -f0. f0 88.
(62) Lowpass Equivalent . Move central frequency of analytic signal to zero by using modulation X l ( f ) = Z ( f + f 0 ) = 2u−1 ( f + f 0 ) X ( f + f 0 ). . LP equivalent signal. Analytic signal. Xl(f). Z(f). -f0. f0. -f0. 0. f0 89. Lowpass Equivalent . In time domain xl (t ) = z (t )e. . − j 2π f 0 t. From analytic signal, we have z (t ) = x(t ) + jx (t ) = xl (t )e j 2π f0t. x(t ) = Re[ xl (t )e j 2π f0 t ] x (t ) = Im[ xl (t )e j 2π f0 t ]. . In general, xl(t) is a complex signal xl (t ) = xc (t ) + jxs (t ) = V (t )e jΘ (t ). Θ(t ) = arctan. xs (t ) xc (t ). Quadrature (sine) component of x(t) In-phase(cosine) component of x(t) V (t ) = xc2 (t ) + xs2 (t ) 90.
(63) Cartesian Coordinate System . From. . We have. . Or. z (t ) = x(t ) + jx (t ) = xl (t )e j 2π f0t = [ xc (t ) + jxs (t )][cos(2π f 0 t ) + j sin(2π f 0 t )]. x(t ) = xc (t ) cos(2π f 0 t ) − xs (t ) sin(2π f 0 t ) x (t ) = xc (t ) sin(2π f 0 t ) + xs (t ) cos(2π f 0 t ). xc (t ) = x(t ) cos(2π f 0 t ) + x (t ) sin(2π f 0 t ) xs (t ) = x (t ) cos(2π f 0 t ) − x(t ) sin(2π f 0 t ). 91. Polar Coordinate System xl (t ) = V (t )e jΘ (t ) , we have z (t ) = x(t ) + jx (t ) = xl (t )e j 2π f0t = V (t )e j 2π f0t e jΘ ( t ). . From. . Then. . Envelope is independent of f0 Phase depends on f0. . x(t ) = Re[V (t )e j 2π f0t e jΘ (t ) ] = V (t ) cos(2π f 0 t + Θ(t )) x (t ) = Im[V (t )e j 2π f0t e jΘ (t ) ] = V (t ) sin(2π f 0 t + Θ(t )) V (t ) = x 2 (t ) + x 2 (t ) x (t ) Θ(t ) = arctan( − 2π f o t ) x(t ). 92.
(64) IP1-9: BP to LP transformation Given BP signal x(t) x(t ) = sinc(100t ) cos(2π × 200t ). 93. IP1-9: BP to LP transformation BP Signal. input signal x(t). 1. 0.5. 0. −0.5. −1 −2. −1.5. −1. −0.5. 0. 0.5. 1. 1.5. 2. time −3. 6. magnitude spectrum. . x 10. 5 4 3 2 1. 0 −500. −400. −300. −200. −100. 0. frequency. 100. 200. 300. 400. 500. 94.
(65) IP1-9: BP to LP transformation In−phase component,f0=200. Envelope component,f0=200 1.2. input signal imag. input signal real. 1. 0.5. 0. −0.5 −2. −1. 0. 1. 1 0.8 0.6 0.4 0.2 0 −2. 2. −1. time. 0. 1. 2. time. magnitude spectrum. LP signal 0.012 0.01 0.008 0.006 0.004 0.002 0 −500. −400. −300. −200. −100. 0. 100. 200. 300. 400. 500. frequency 95. IP1-9: BP to LP transformation In−phase component,f0=200. Envelope component,f0=200 1.2. input signal imag. input signal real. 1. 0.5. 0. −0.5. −1 −2. −1. 0. 1. 1 0.8 0.6 0.4 0.2 0 −2. 2. −1. time. 0. 1. 2. time. magnitude spectrum. LP signal 0.012 0.01 0.008 0.006 0.004 0.002 0 −500. −400. −300. −200. −100. 0. 100. 200. 300. 400. 500. frequency 96.
(66) Baseband Digital Transmission 5.2 Binary Signal Transmission 5.3 Multiamplitude Signal Transmission 5.4 Multidimensional Signals. 1. 5.2 Binary Signal Transmission Data Rate: R [bps] Binary Input 01101001…. Channel noise AWGN n(t). Mapping 0 → s0 (t ), 0 ≤ t ≤ Tb 1 → s1 (t ), 0 ≤ t ≤ Tb. Bit time interval Tb = 1/R. r (t ) = si (t ) + n(t ) i = 0,1 , 0 ≤ t ≤ Tb. S0 S1 S1 S0 S1. Receiver will determine whether 0 or 1 is sent by observing r(t). Bit time interval Tb = 1/R. Optimum receiver : Minimize the probability of error 2.
(67) Optimum receiver for AWGN channel Consists of 2 Blocks Binary Digital Signal + AWGN. Correlator Or Matched Filter Get information using received signal (Only two signals s0(t) and s1(t) are expected). Detector. Output Data. Determine which signal is received using the output of Correlator or Matched filter. 3. Signal Correlator Cross-correlates the received signal r(t) with the two possible. transmitted signal s0(t) and s1(t) t. r0 (t ) = ∫ r (τ ) s0 (τ )dτ 0. t. ∫ ( ) dτ 0. r(t). s0 (t ). Detector. s1 (t ). Output Data. t. ∫ ( ) dτ 0. t. r1 (t ) = ∫ r (τ ) s1 (τ )dτ 0. Samples at t=Tb 4.
(68) Illustrative Problem 5.1: orthogonal binary signal Two possible transmitted signal s0(t) and s1(t), orthogonal binary. signal. S0(t). A. A Tb. ∫. Tb. 0. Tb. -A. Correlator output (at t = T0) r(t)= S0(t)+n(t). S1(t). Tb. Tb. 0. 0. r0 = ∫ s02 (τ )dτ + ∫ s0 (τ )n(τ )dτ. ( )dτ. = A2Tb + n0 = ℑ + n0 Signal energy orthogonal. s0 (t ) s1 (t ). ∫. Tb. 0. Tb. Tb. 0. 0. r1 = ∫ s0 (τ ) s1 (τ )dτ + ∫ s1 (τ )n(τ )dτ. ( )dτ. = n1. Noise component 5. Illustrative Problem 5.1: orthogonal binary signal Output of correlator (Noise free case). ∫ r(t)= S0(t). t. ( )dτ. 0. ℑ. s0 (t ). Tb. s1 ( t ). ∫. t. ( )dτ. 0. ℑ/2 Tb. ∫ r(t)= S1(t). t 0. ℑ/2 ( )dτ. Tb. s0 (t ) s1 ( t ). ∫. t 0. ℑ. ( )dτ. Tb6.
(69) Illustrative Problem 5.1: orthogonal binary signal Noise effects N ☛ AWGN : E[n(t )] = 0, E[n(τ )n(t )] = 0 δ (t − τ ) 2 ☛ n0, n1 are Gaussian process ¾ With zero mean Tb. Tb. 0. 0. Tb. Tb. 0. 0. E[n0 ] = E[ ∫ s0 (τ )n(τ )dτ ] = ∫ s0 (τ ) E[n(τ )]dτ = 0 E[n1 ] = E[ ∫ s1 (τ )n (τ )dτ ] = ∫ s1 (τ ) E[n (τ )]dτ = 0. ¾ And variances. σ i2 = E[ni2 ] = E[ ∫. Tb. ∫. 0. =∫. Tb. 0. =. ∫. N0 2. Tb. 0. ∫. Tb. 0. Tb. 0. si (t ) si (τ )n(t )n(τ )dtdτ ]. si (t ) si (τ ) E[n(t ) n(τ )]dtdτ = si2 (t ). (∫. Tb. 0. ). δ (t − τ )dτ dt =. N0 2. N0 2. ∫. Tb. Tb. 0. 0. ∫ ∫. Tb. 0. si (t ) si (τ )δ (t − τ )dtdτ. si2 (t )dt =. N0 ℑ , i = 1, 2 2. 7. Illustrative Problem 5.1: orthogonal binary signal p (r0 | s0 (t )). pdf of r0 and r1. p ( r1 | s0 (t )). ∫ r(t)= S0(t)+n(t). r(t)= S1(t)+n(t). Tb 0. ( )dτ. s0 (t ). r0. =. 2 2 1 e − r1 / 2σ = 2πσ. 1 2πσ. e − ( r0 −ℑ). 2. / 2σ 2. s1 ( t ). ∫. Tb 0. Tb. ∫. 0. ∫. 0. ( )dτ. ( )dτ. s0 (t ). r 0. r1. r0. ℑ p (r1 | s1 (t )). p( r0 | s1 (t )). s1 ( t ) Tb. r. ( )dτ. r1. 0. ℑ 8.
(70) Matched Filter Alternative to signal correlator s(t) + n(t). Matched Filter h(t)=s(Tb-t). ; convolution. Tb. ☛ y (Tb ) = ∫0 s(τ )h (t − τ )dτ. y(t). t =Tb. Tb. = ∫ s(τ ) s (Tb − t + τ )dτ 0. Tb. t =Tb. = ∫ s (τ ) s (τ )dτ = ℑ 0. Identical output to correlator. 9. Illustrative Problem 5.2 Output of matched filter hi(t)=si(Tb-t) r(t)= S0(t). ℑ Tb 2Tb. Tb ℑ/2. Tb. Tb. Tb 2Tb ℑ/2. r(t)= S1(t) Tb. Tb 2Tb. Tb. t t. t. ℑ Tb Tb 2Tb. t 10.
(71) The detector Decides the transmitted signal is s0(t) or s1(t) by observing the. output of correlator (r0 or r1). Optimum Detector ☛ Detector that has minimum probability of error. 11. Illustrative Problem 5.3 (Bdt_f57.m) Optimal Detector : if binary signals are equally probable and. have equal energies. ☛ 0 ( s0(t) is sent ) if r0 > r1 ☛ 1 ( s1(t) is sent ) if r0 < r1. r0 r1. r0 > r1 r0 < r1. 0 1. Probability of error ☛ If s0(t) is transmitted, but it detects s1(t) p (r0 | s0 (t )). p (r1 | s0 (t )). r ℑ r1. Probability of error, Pe(0). 12.
(72) Illustrative Problem 5.3 (Bdt_f57.m) Probability of error ☛ If s0(t) is transmitted r0 = ℑ+ n0. r1 = n1 ☛ BER:. Pe (0) = P( r1 > r0 | s0 sent) = P ( n1 > ℑ + n0 ) = P ( n1 − n0 > ℑ) =. 1 2π. ∫. ⎛ ℑ ⎞ 1 ⎛ ℑ ⎞ 2 e − x / 2 dx ≡ Q ⎜ = erfc ⎟ ⎜ ⎟ ℑ / N0 N 2 2 N 0 ⎠ 0 ⎠ ⎝ ⎝. ∞. ☛ ℑ N 0 is called SNR. 13. Illustrative Problem 5.3 (Bdt_f57.m) ☛ Same result can be obtained when s1(t) is transmittedÆPe(1) ☛ Pe=Pe(0)P(0)+Pe(1)P(1)=Pe(0)[P(0)+P(1)]=Pe(0) ☛ See Figure 5.7, page 180 (Bdt_f57.m) ¾ Probability of error for orthogonal signals ☛ Pe decreases exponentially as the SNR increases ☛ Q(.) and erfc(.) 1 Q( x) = 2π 2 erfc( x ) =. ∫. ∞. x. −. t2 2. e dt , probability of N (0,1) in [ x, ∞ ). 1 −t2 e dt , probability of N (0, ) in ( −∞, − x ] & [ x, ∞ ) ∫ 2 π x 1 x Q ( x ) = erfc( ) 2 2 ∞. erfc( x ) = 2Q ( 2 x ). 14.
(73) Illustrative Problem 5.3 (Bdt_f57.m). 15. Illustrative Problem 5.3 (Bdt_f57.m) 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14.. initial_snr=0; final_snr=15; snr_step=0.25; snr_in_dB=initial_snr:snr_step:final_snr; for i=1:length(snr_in_dB), snr=10^(snr_in_dB(i)/10); Pe(i)=Qfunct(sqrt(snr)); echo off; end; echo on; semilogy(snr_in_dB,Pe); xlabel('Input SNR per Bit') ylabel('Bit Error Rate (BER)') set(findobj('Type','line'),'LineWidth',2) 16.
(74) Monte Carlo Simulation Sometimes the analysis of detector performance is difficult to. perform The probability of errors can be estimated by using software to model the received sequences, make decisions by the receiver and count the number of error bits. There are many ways to perform the Monte-Carlo simulations, depending on the parts in communication systems you want to evaluate. The number of samples (N) required to estimate an error probability P(m) based on Monte-Carlo method satisfies N>>1/P(m). A rule of thumb is N>10/P(m). (Sec2.7) 17. Illustrative Problem 5.4 Simulation Model: see Fig. 5.8. Uniform random number generator Binary data source. Gaussian random number generator n0 Output ⊕ r 0/ E 0 detector data r1 1/ E ⊕ n1 Gaussian random r0 = ℑ + n0 ⎫ ⎬ if s0 (t) is sent number generator r1 = n1 ⎭ Compare Error counter. r0 = n0. ⎫ ⎬ if s1 (t) is sent r1 = ℑ + n1 ⎭ 18.
(75) Illustrative Problem 5.4 Simulation Model: see Fig. 5.8 ☛ Define SNR : SNR = ℑ , SNR (dB ) = 10log SNR 10 N0. SNR = 10. SNR ( dB ). 10. =e. Suitable in multi -user scenario. ln10⋅SNR ( dB ) 10. ☛ Signal generator using uniform random number with a range of [0,1] ☛ Noise generator: ℑN 0 ℑ ℑ ℑ σ2 = ) ⇔σ = = ( ⇔ ℑ = σ 2 SNR 2 2 SNR 2 SNR Used in textbook. Simulation result : smldPe54.m Theoretical result :. ⎛ ℑ ⎞ Pe = Q ⎜ ⎟=Q N 0 ⎝ ⎠. (. ). SNR =. ⎛ SNR ⎞ 1 erfc ⎜ ⎟ 2 2 ⎝ ⎠ 19. Illustrative Problem 5.4 SNRindB1=0:1:12; 2. SNRindB2=0:0.1:12; 3. for i=1:length(SNRindB1), 4. % simulated error rate 5. smld_err_prb(i)=smldPe54(SNRindB1(i)); 6. echo off ; 7. end; 8. echo on ; 9. for i=1:length(SNRindB2), 10. SNR=exp(SNRindB2(i)*log(10)/10); 11. % theoretical error rate 1.. 12. theo_err_prb(i)=Qfunct(sqrt(SNR)); 13. 14. 15. 16. 17. 18. 19. 20. 21. 22.. echo off ; end; echo on; % Plotting commands follow semilogy(SNRindB1,smld_err_prb,'*r'); hold semilogy(SNRindB2,theo_err_prb,'-b'); xlabel('Input SNR per Bit') ylabel('Bit Error Rate (BER)') set(findobj('Type','line'),'LineWidth',2). 20.
(76) Illustrative Problem smldPe54 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20.. 21. function [p]=smldPe54(snr_in_dB) 22. % [p]=smldPe54(snr_in_dB) 23. % SMLDPE54 finds the probability of error for the given 24. % snr_in_dB, signal to noise ratio in dB. 25. E=1; 26. SNR=exp(snr_in_dB*log(10)/10); % signal to noise ratio sgma=E/sqrt(2*SNR); % sigma, standard deviation of noise 27. 28. N=10000; 29. % generation of the binary data source 30. for i=1:N, temp=rand; % a uniform random variable over (0,1) 31. 32. if (temp<0.5), dsource(i)=0; % with probability 1/2, source output is 33. 0 34. else dsource(i)=1; % with probability 1/2, source output is 1 35. end 36. end; 37. % detection, and probability of error calculation 38. numoferr=0; 39. for i=1:N,. Can be improved by vector operation. % matched filter outputs if (dsource(i)==0), r0=E+gngauss(sgma); r1=gngauss(sgma); % if the source output is "0" else r0=gngauss(sgma); r1=E+gngauss(sgma); % if the source output is "1" end; % detector follows if (r0>r1), decis=0; % decision is "0" else decis=1; % decision is "1" end; if (decis~=dsource(i)), % if it is an error, increase the error counter numoferr=numoferr+1; end; end; p=numoferr/N; % probability of error e. 21. Illustrative Problem 5.4. 22.
(77) Antipodal Signals for binary signal transmission Antipodal ☛ If one signal is negative of other Tb. Tb Tb. Tb. Choose s0(t) = s(t), s1(t) = -s(t) to transmit binary signal, where. s(t) is arbitrary with energy ℑ. Then received signal is r (t ) = ± s (t ) + n(t ),. 0 ≤ t ≤ Tb. Are there any advantages using antipodal signal instead of. orthogonal signal ?. 23. Optimum Receiver with Antipodal signal Matched Filter or Correlator. ∫ r(t)= s(t)+n(t). t 0. ( )dτ. correlator. s (t ). detector. Output decision. s (Tb − t ). Matched Filter. Sample at t = Tb Tb. ℑ. Correlator output s(t) -s(t). -ℑ. Tb 24.
(78) Noise component with Antipodal signals Let r (t ) = s(t ) + n(t ) be transmitted Output of correlator (or Matched filter) Tb. r = A2Tb + ∫ s (t )n(t )dt = ℑ + n 0. Noise component Signal energy. Statistics of n and r ☛ n is Gaussian, with zero mean E[n]=0 ☛ With Variance T T σ 2 = E[n 2 ] = ∫ ∫ s(t ) s (τ ) E[n(t )n(τ )]dtdτ 0 0 b. =. N0 2. Tb. Tb. 0. 0. ∫ ∫. ☛ Therefore. n ∈ N (0,. b. N0 2. s (t ) s (τ )δ (t − τ )dtdτ =. ∫. Tb. 0. s 2 (t )dt =. N0 ℑ 2. N 0ℑ Nℑ ) and r ∈ N ( ℑ, 0 ) 2 2. 25. Optimum detector Optimal detector and pdf r(t)= ±s(t)+n(t). ∫ s (t ). t. 0. ( )dτ. r = ±ℑ + n. s(t) -s(t). r>0 r<0. correlator. p( r | s(t )) = p( r | 0) 2 2 1 = e − ( r −ℑ) / 2σ 2πσ. p (r | − s (t )) = p (r |1) 2 2 1 = e − ( r +ℑ) / 2σ 2πσ. r -ℑ. 0. ℑ. Probability of error 26.
(79) BER & Benefit of antipodal signal Probability of error : if binary signals are equally probable and. have equal energies. ☛ Pe = P0 Pe (0) + P1 Pe (1) = Pe (0) = P( r < 0 | s(t ) sent) =. =. 1 2π. ∫. −ℑ / σ. −∞. 1 2πσ. ∫. 0. −∞. e − ( r −ℑ). 2. / 2σ 2. dr. 2 2ℑ ℑ ) e − r / 2 dr = Q ( ) = Q ( σ N0. ☛ Orthogonal signal case. Pe = Q(. ℑ ) N0. Antipodal signal is 3dB more efficient than orthogonal signal ☛ Antipodal signal gives better performance (3dB) with same signal energy ℑ ☛ Same performance with Antipodal signal energy ℑ/2 as orthogonal signal with. energy ℑ.. 27. Illustrative Problem 5.5 Binary Antipodal Simulation: see Fig. 5.13. Uniform random number generator Binary data source. Gaussian random number generator. ±E. ⊕. n. r. r = ±ℑ + n. detector. Output data. Compare Error counter 28.
(80) Illustrative Problem 5.5 Binary Antipodal Simulation: (ip_05_05a.m) ☛ Define SNR : SNR = ℑ , SNR (dB ) = 10log SNR 10 N0. SNR = 10. SNR ( dB ). 10. =e. ln10⋅SNR ( dB ) 10. ☛ Signal generator using uniform random number with a range of [0,1] ☛ Noise generator: ℑN 0 ℑ ℑ ℑ σ2 = ) ⇔σ = = ( ⇔ ℑ = σ 2 SNR 2 2 SNR 2 SNR. Simulation result : (smldPe55a.m, content has been modified) Theoretical result :. ⎛ 2ℑ ⎞ Pe = Q ⎜ ⎟=Q N 0 ⎠ ⎝. (. ). 2 SNR =. 1 erfc 2. (. SNR. ) 29. Illustrative Problem smldPe55 (modified) 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18.. function [p]=smldPe55(snr_in_dB) E=1; SNR=exp(snr_in_dB*log(10)/10); % signal-to-noise ratio sgma=E/sqrt(2*SNR); % sigma, standard deviation of noise N=1000000; temp1=rand(N,1); temp2=find(temp1>0.5); dsource=zeros(N,1); dsource(temp2)=1; % The detection, and probability of error calculation follows. temp3=sgma*randn(N,1); r=ones(N,1)*(-E); r(temp2)=E; r=r+temp3; decis=zeros(N,1); decis(find(r>0))=1; numoferr=sum(abs(dsource-decis)); p=numoferr/N % probability of error 30.
(81) Illustrative Problem 5.5 −1. 10. Simulation Result Theoretical Result. −2. Bit Error Rate (BER). 10. −3. 10. −4. 10. −5. 10. −6. 10. 0. 2. 4 6 Input SNR (E/No)(dB). 8. 10 31. On-Off signals for binary signal transmission On-Off signals ☛ No signal for 0 ☛ Arbitrary signal s(t) for 1 Received waveform. Tb. 0. Tb. 1. if 0 is trasnmitted ⎧ n (t ), r (t ) = ⎨ ⎩ s(t ) + n (t ), if 1 is trasnmitted. Are there any advantages using On-Off signal ?. 32.
(82) Optimum detector Detector and pdf r(t)= 0,s(t). ∫. p(r | 0) =. 2πσ. 0. ( )dτ. ⎛n ⎝ℑ+ n. correlator r = ⎜. s (t ). 1. t. e. p (r | s (t )) =. − r 2 / 2σ 2. 0 s(t). r>α r<α. 1 2πσ. e − ( r −ℑ). 2. / 2σ 2. r 0. α. ℑ. Probability of error Optimum detector minimize Pe 33. Benefits of On-Off signals Optimal detector : if binary signals are equally probable and. have equal energies ☛ Minimum Pe when. α OPT =. ℑ 2. Probability of error : Pe (α OPT ) = Q(. ℑ ) 2 N0. Performance ☛ 6 dB worse than Antipodal signal ☛ 3 dB worse than Orthogonal signal. Signal Energy ☛ Average transmitted energy is 3dB less than Antipodal and Orthogonal signal ☛ Generally, SNR is defined by Eave/N0. Then on-off and antipodal signals have. identical BER. 34.
(83) Illustrative Problem 5.6 On-Off signaling simulation. Uniform random number generator Binary data source. Gaussian random number generator. 0⇒ 0. 1 ⇒ E⊕. n. r. detector. Output data. Compare Error counter 35. Illustrative Problem 5.6 On-Off signaling simulation (ip_05_06a.m) ℑ ☛ Define SNR : SNR =. N0. SNR = 10. , SNR (dB ) = 10log10 SNR. SNR ( dB ). 10. =e. ln10⋅SNR ( dB ) 10. ☛ Signal generator using uniform random number with a range of [0,1] ☛ Noise generator: ℑN 0 ℑ ℑ ℑ σ2 = ) ⇔σ = = ( ⇔ ℑ = σ 2 SNR 2 2 SNR 2 SNR. Simulation result : (smldPe56.m) Theoretical result :. ⎛ ℑ ⎞ ⎛ SNR ⎞ Pe = Q ⎜ ⎟ = Q⎜ ⎟ N 2 2 0 ⎠ ⎝ ⎠ ⎝ 36.
(84) Illustrative Problem 5.6 0. 10. Simulation Result Theoretical Result. −1. Bit Error Rate (BER). 10. −2. 10. −3. 10. −4. 10. −5. 10. 0. 5 10 Input SNR (E/No)(dB). 15 37. Signal Constellation Diagram for Binary Signal Antipodal. On-Off. Orthogonal s1(t) (0,ℑ). s(t) (-ℑ,0). (0,0) (ℑ,0) s(t). (ℑ,0). s0(t) (ℑ,0). Performance comparison Type Antipodal On-Off Orthogonal. Signals. Energy. Coordinates. Pe. Avg Power. s(t). ℑ. (ℑ,0). -s(t). ℑ. (-ℑ,0). ⎛ 2ℑ ⎞ Q ⎜⎜ ⎟⎟ ⎝ N0 ⎠. ℑ. 0. 0. (0,0). s(t). ℑ. (ℑ,0). s0(t). ℑ. (ℑ,0). s1(t). ℑ. (0,ℑ). ⎛ ℑ Q ⎜⎜ ⎝ 2 N0. ⎛ Q ⎜⎜ ⎝. ℑ N0. ℑ 2. ⎞ ⎟⎟ ⎠. ⎞ ⎟⎟ ⎠. ℑ 38.
(85) Illustrative Problem 5.7 (Orthogonal signaling) Noise effects and Constellation : (ip_05_07a.m) ☛ If s0(t) is transmitted r0 = ℑ + n0 r1 = n1 ☛ If s1(t) is transmitted. r0 = n0 r1 = ℑ + n1. Can you explain why performance of Antipodal > Orthogonal >. On-Off using this figure ?. 39. Illustrative Problem 5.7 Noise effects and Constellation : See Figure 5.18 Signal constellation of orthogonal signals, σ2=0.1 2. Signal 1 Signal 2. Coefficient in axis Y. 1.5. 1. 0.5. 0. −0.5. −1 −1. −0.5. 0 0.5 1 Coefficient in axis X. 1.5. 2 40.
(86) Illustrative Problem 5.7 Noise effects and Constellation : See Figure 5.18 Signal constellation of orthogonal signals, σ2=0.3 2. Signal 1 Signal 2. Coefficient in axis Y. 1.5. 1. 0.5. 0. −0.5. −1 −1. −0.5. 0 0.5 1 Coefficient in axis X. 1.5. 2 41. Illustrative Problem 5.7 Noise effects and Constellation : See Figure 5.18 2. Signal constellation of orthogonal signals, σ =0.5 2. Signal 1 Signal 2. Coefficient in axis Y. 1.5. 1. 0.5. 0. −0.5. −1 −1. −0.5. 0 0.5 1 Coefficient in axis X. 1.5. 2 42.
(87) Illustrative Problem 5.7 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14.. sigma=[0.1 0.3 0.5]; for ii=1:length(sigma) n0=sigma(ii)*randn(100,1); n1=sigma(ii)*randn(100,1); n2=sigma(ii)*randn(100,1); n3=sigma(ii)*randn(100,1); x1=1.+n0; y1=n1; x2=n2; y2=1.+n3; tt=num2str(sigma(ii)); figure plot(x1,y1,'o',x2,y2,'*') axis('square'). 15. grid on 16. axis([-1 2 -1 2]) 17. title(['Signal constellation of orthogonal. 18. 19. 20. 21. 22. 23. 24. 25. 26.. signals, {\sigma}^{2}=',num2str(sigma(ii))], 'fontsize',15) xlabel('Coefficient in axis X','fontsize',15) ylabel('Coefficient in axis Y','fontsize',15) set(findobj('Type','line'),'LineWidth',2.0) set(findobj('fontname','Helvetica'),'fontna me','Arial','fontsize',15) legend('Signal 1','Signal 2','fontsize',15,'fontname','Arial') hold off aa=['IP_05_07' num2str(ii)]; print('-depsc','-tiff',aa) end 43. Baseband Digital Transmission 5.3 Multiamplitude Signal Transmission. 44.
(88) Binary Vs. Multiamplitude signal Binary signal ☛ 1 bit of information ☛ Two level to represent 0 and 1 If we use multiple amplitude levels ☛ We can transmit multiple bits per signal waveform Questions : ☛ Probability of Error Vs. Bandwidth ???. 45. Signal waveform with 4 amplitude levels Normalized pulse whose energy is 1 ⎧⎪ 1 , 0 ≤ t ≤ T g (t ) = ⎨ T ⎪⎩0 , otherwise. Consider 4 equally spaced Amplitude Am = (2m − 3)d ,. m = 0,1, 2,3. or Am = {−3d , −d , d ,3d }. 4 waveform called PAM(Pulse Amplitude Modulated) signal ☛ sm (t ) = Am g (t ), 0 ≤ t ≤ T ☛ See figure 5.19. 46.
(89) Signal waveform with 4 amplitude levels s0 ( t ). s1 (t ). T 0. t. s2 (t ). T 0. d T. t. −d T. −3d T. s3 ( t ). 0. T. t. 3d T. 0. T. t. Signal Constellation Diagram ☛ One dimensional signal : g(t) is basis S0(t) 00. S1(t) 01. -3d. -d. S2(t) 11. S3(t) 10. d. 3d. g(t). Euclidean distance = 2d 47. Signal waveform with 4 amplitude levels Transmit 2 bits of information per waveform ☛ Assign information to waveform ¾ 00 Æ s0(t) ¾ 01 Æ s1(t) ¾ 11 Æ s2(t) ¾ 10 Æ s3(t). Definition of Symbol ☛ Each pair of information bits {00, 01, 10, 11} is called a symbol ☛ Time duration T is called Symbol Duration ¾ If Bit rate R =1/Tb, then Symbol interval T = 2Tb and baud rate = 1/T=R/2. 48.
(90) More on Symbol and Symbol interval. Information 0100110… Source. Tb 2Tb. s0(t) s1(t) s2(t) s3(t). 00 01 11 10. Bit rate R=1/Tb. Modulator M=2k. Symbol. T=2Tb. ….. Ex: 9600bps = 4800sps (baud rate) 49. Received Signal AWGN channel assumption r (t ) = si (t ) + n(t ),. m = 0,1, 2,3, 0 ≤ t ≤ T. White Gaussian process With power spectrum N0/2. Receiver determines which of 4 signal waveform was transmitted. by observing the received signal r(t) ☛ Optimum receiver is deigned by minimizing the probability of error. 50.
(91) Optimum receiver for AWGN channel Implementation r(t). Correlator (Matched filter). Decision Output. Amplitude Detector. ☛ Correlator Samples at t=T r(t). T. t. r = ∫ r (t ) g (t )dt. ∫ ( ) dτ. 0. 0. T. = ∫ { Ai g (t ) + n(t )}g (t )dt 0. T. T. 0. 0. = ∫ Ai g 2 (t )dt + ∫ g (t )n(t )dt. g(t). = Ai + n 51. Optimum receiver for AWGN channel Statistics of correlator output ☛ Noise component : Gaussian with Zero mean and Variance of T. T. 0. 0. E[n] = E[ ∫ g (t )n(t )dt ] = ∫ g (t ) E[n(t )]dt = 0. σ 2 = E[n 2 ] =. N0 2. ∫. T. 0. g 2 (t )dt =. N0 2. ☛ Received signal P(r | si (t )) =. -3d. -d. 1 2πσ. e − ( r − Ai ). d. 2. / 2σ 2. , Ai = −3d , −d , d ,3d. 3d 52.
(92) Optimum Detector If all symbols are equally probable , the optimum detector is the. smallest distance criterion, where the thresholds are set at (2d,0,2d) A = min D = r − A , i = 0,1, 2,3 i. i. -3d. -2d. -d. i. 0. d. 2d. 3d. Average Probability of Symbol Error. 3 3 ∞ 1 − x2 / 2 3 ⎛ d 2 ⎞ 3 ⎛ 2d 2 ⎟ = Q⎜ P4 = P( r − Am > d ) = ∫ e dx = Q ⎜ 4 2 d / σ 2π 2 ⎜⎝ σ 2 ⎟⎠ 2 ⎜⎝ N 0. ⎞ ⎟ ⎟ ⎠ 53. Probability of Error 2 ⎞ ⎛ P4 = 3 Q ⎜ 2d ⎟. ⎜ ⎝. 2. N 0 ⎟⎠. Using Average transmitted signal energy / symbol (bit): ℑav = ∑ Pi ℑi = i. ℑav 1 4 T 2 2 2 s t dt d d = ⇒ = ( ) 5 ∑ k 4 k =1 ∫0 5. ℑav = 2ℑavb ⇒ d 2 =. 2ℑavb 5. SER, see figure 5.21 ⎞ 3 ⎛ 4ℑavb ⎞ 3 ⎛ 4 P4 = Q ⎜ = Q SNR ⎟ ⎜ ⎟⎟ 2 ⎜⎝ 5 N 0 ⎟⎠ 2 ⎜⎝ 5 ⎠. 54.
(93) Probability of Error 0. 10. Simulation Result. −1. Bit Error Rate (BER). 10. −2. 10. −3. 10. −4. 10. 0. 2. 4 6 8 Input SNR (Eavb/No)(dB). 10. 12. 55. Illustrative Problem 5.8 4-ary PAM simulation : see Fig. 5.22 Error counter compare Uniform RNG. X. Mapping to Amplitude levels. Am. +. r. N (0, σ 2 ). detector r = Am + n. Aˆ m. Gaussian random Number Generator. Figure 5.22: Block diagram of four level PAM for Monte Carlo Simulation 56.
(94) Illustrative Problem 5.8 4-ary PAM simulation : see Fig. 5.22 ☛ Signal generator using uniform random number with a range of [0,1] S0(t) -3d 0. S1(t) d 0.25. S2(t) -d 0.5. S3(t) 3d 0.75. SNR ( dB ) ℑ 10 ☛ Define SNR : SNR = avb = 10 =e N0. 1. ln10⋅SNR ( dB ) 10. 2ℑavb ⎫ 2 5 ⎪⎪ ⇒ d = 4 SNR ⎬ 2 5 N0 ⎪ σ 2 σ = 2 ⎪⎭ 2 2 ☛ Noise generator: σ 2 = 5d (set d = 1) or d 2 = 4σ SNR (set σ = 1) 4 SNR 5 d2 =. Simulation result : ip_05_08a.m, smldPe58.m 57. Illustrative Problem 5.8 4-ary PAM simulation : see Fig. 5.22 0. 10. Simulation Result Theoretical Result. −1. Bit Error Rate (BER). 10. −2. 10. −3. 10. −4. 10. 0. 2. 4 6 8 Input SNR (Eavb/No)(dB). 10. 12. 58.
數據
相關文件
double-slit experiment is a phenomenon which is impossible, absolutely impossible to explain in any classical way, and.. which has in it the heart of quantum mechanics -
experiment may be said to exist only in order to give the facts a chance of disproving the
¾ To fetch a Web page, browser establishes TCP connection to the machine where the page is and sends a message over the connection asking for the
To convert a string containing floating-point digits to its floating-point value, use the static parseDouble method of the Double class..
We will design a simple and effective iterative algorithm to implement “The parallel Tower of Hanoi problem”, and prove its moving is an optimal
The purpose of this research is to explore the important and satisfaction analysis of experiential marketing in traditional bakery industry by using Importance-Performance and
The purpose of this study is that in the future planning of new or converted semiconductor plant, the plant facilities to be demand for the plant systems
This research project is to analyze and research a specific laser configuration to obtain complete knowledge、technologies and experiences to transfer to the project initiator for