1 / 29

By: Dr. Uri Mahlab

Simulation in Digital Communication. By: Dr. Uri Mahlab. chapter # 1 Signal and Linear Systems. By: Dr. Uri Mahlab. Fourier Series. Xn - are called the Fourier series coefficients of the signal x(t). Open Matlab now. Example # 1. A. -to. to. Plot a sinc function.

rue
Download Presentation

By: Dr. Uri Mahlab

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. Simulation in Digital Communication By: Dr. Uri Mahlab

  2. chapter # 1 Signal and Linear Systems By: Dr. Uri Mahlab

  3. Fourier Series Xn - are called the Fourier series coefficients of the signal x(t)

  4. Open Matlab now

  5. Example # 1 A -to to • Plot a sinc function. FT of ( ) x=(-10:0.1:10); plot(x,sinc(x)) grid Answer Matlab: M-file ip_01_01

  6. Example # 2 ; A program to compute the Fourier Series Coefficients a b A Periodic Signal

  7. A To- -to to To/2 To Example # 2.1 ; This function creates the rectangular function: x=(-3:0.1:3); % function y=rect_function(x) % y=rect_function(x) generates a rectangular signal y=(x>-1 & x<0)+(x==0)+(x>0 & x<1); plot(x,y); axis([ -5 5 -1 2]);

  8. A To- -to to To/2 To Example # 2.2 ; This function creates the triangular function: x=(-3:0.1:3); % 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); plot(x,y); axis([ -5 5 -1 2]);

  9. This function computes the Fourier Series coefficients: function=‘lambda’; a=-3; b=3; n=24; tol=0.05; xx=fseries(function,a,b,n,tol); plot(abs(xx)); A=-3; b=3; n=24; tol=0.05; xx=fseries(lambda,a,b,n,tol,p1,p2,p3); plot(abs(xx));

  10. function xx=fseries(funfcn,a,b,n,tol,p1,p2,p3) %FSERIES Returns the Fourier series coefficients. % XX=FSERIES(FUNFCN,A,B,N,TOL,P1,P2,P3) % funfcn=The given function, in an m-file. % It can depend on up to three parameters % p1,p2, and p3. The function is given % over one period extending from 'a' to 'b' % xx=vector of length n+1 of Fourier Series % Coefficients, xx0,xx1,...,xxn. % p1,p2,p3=parameters of funfcn. % tol=the error level. j=sqrt(-1); args=[]; for nn=1:nargin-5 args=[args,',p',int2str(nn)]; end args=[args,')']; t=b-a; xx(1)=eval(['1/(',num2str(t),').*quad(funfcn,a,b,tol,[]',args]); for i=1:n newfun=['exp(-j*2*pi*x*(',int2str(i),')/(',num2str(t),')).*',funfcn]; xx(i+1)=eval(['1/(',num2str(t),').*quad(newfun,a,b,tol,[]',args]); end

  11. Magnitude and phase spectra x=(-3:0.1:3); % 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); plot(x,y); axis([ -5 5 -1 2]); Determine and plot the discrete magnitude and the phase spectra of the periodic signal x(t) with a period equal 8 and defined as Answer Matlab: M-file ip_01_02

  12. Magnitude and phase spectra # 3 Determine and plot the discrete magnitude and the phase spectra of the periodic signal x(t) with a period equal 8 and defined as Answer Matlab: M-file ip_01_03

  13. Periodic Signal & Linear Systems Linear System

  14. Example # 4: filtering of periodic Signals X(t) A t 1 -1 x(t) y(t) h(t) h(t) 1 1 • Determine the Fourier Series coefficients of x(t). • Plot the discrete spectrum of x(t) • Plot the discrete spectrum of the output y(t). Answer Matlab: M-file ip_01_04

  15. Fourier transform

  16. Fourier transforms properties Linearity Duality Time Shift Scale

  17. Fourier transforms properties continue Modulation Differentiation Convolution Parseval’s relation

  18. Example # 5: Fourier Transform Plot the magnitude and the phase spectra of signals x1(t) and x2(t). x1(t) x2(t) 1 1 1 2 -1 1 Answer Matlab: M-file ip_01_05

  19. Sampling theorem samples=(1 1 -1 2 -2 1 2); x=sinc(t+3)+sinc(t+2)-sinc(t+1)+2*sinc(t) -2*sinc(t-1)+sinc(t-2)+2*sinc(t-3); Answer sincuri.m

  20. Example # 6:Analytical and numerical derivation of the Fourier transform X(t) 1 -2 -1 0 1 2 • Determine the Fourier transform of x(t) analytically and plot the • spectrum of x(t). • Determine the Fourier transform numerically (by Matlab) and • plot the spectrum of x(t) Answer Matlab: M-file ip_01_06

  21. Example # 7:LTI system analysis in the frequency domain 1 1 2 X(t) h(t) -2 0 1 3 4 • Determine the FFT of the Signal • If the Signal is passed through an ideal LPF with BW of 1.5 Hz • find the output of the filter and plot it. • If the signal is passed through a filter whose impulse response is • h(t) derive the expression of the filter output. Answer Matlab: M-file ip_01_07

  22. Power and Energy Power Spectral density

  23. Example # 8:Power and power spectrum • The signal x(t) has a duration of 10 and is the sum of two • sinusoidal signals of unit amplitude one with frequency of • 47Hz, and the other with frequency 219hz. • The signal is Sampled at a rate of 1000 samples/sec. • Find the power content and the power spectral density for this signal Answer Matlab: M-file ip_01_08

  24. Lowpass equivalent of bandPass Signals Analytical Signal Hilbert transform of x(t)

  25. Envelope Phase

  26. Matlab: M-file: analytic(x) Returns the analytic signal corresponding to signal x Matlab: M-file: loweq(x) Returns the lowpass equivalent of the signal x Matlab: M-file: quadcomp(x) Returns the in phase and quadrature components of the signal x Matlab: M-file: env_phas(x) Returns the envelope and phase of the band pass signal x

  27. Example # 9:Bandpass to lowpass transformation • The signal x(t) is given as • Plot this signal and its magnitude spectrum. • With fo=200Hz, find the lowpass equivalent and plot its • magnitude spectrum. • Plot the in phase and the quadrature components and the envelop • of this signal • Repeat for fo=100Hz Answer Matlab: M-file ip_01_09

More Related