Upcoming SlideShare
×

Digital Signal Processing Tutorial:Chapt 1 signal and systems

7,574 views

Published on

1 Comment
32 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• =====very nice website.====

Are you sure you want to  Yes  No
Views
Total views
7,574
On SlideShare
0
From Embeds
0
Number of Embeds
333
Actions
Shares
0
0
1
Likes
32
Embeds 0
No embeds

No notes for slide

Digital Signal Processing Tutorial:Chapt 1 signal and systems

1. 1. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 1Chapt 01Signal and SystemsDigital Signal ProcessingPrePrepared byIRDC India
2. 2. 10/7/2009 2Copyright© with Authors. All right reservedFor education purpose.Commercialization of this material isstrictly not allowed without permissionfrom author.e-TECHNote from IRDC Indiainfo@irdcindia.com
3. 3. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 3Signal• Definition: It is the function that describes the variation of aphysical variable with respect to independent variable( time,space etc.) in a physical process.Mathematically,S=f(x)Where s is signal /function and x independent variableExamples:1) Change in temperature sensed by the sensor placed in boiler.T=f(t)Here, time t is independent variable.t(msec) 1 2 3 4 5Temp(0C) 29 31 35 45 45
4. 4. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 4Contd..2) The digital data to be sent over a transmission channelt(msec) 0 1 2 3 4 5Digitaldata0 1 1 0 1 03) Pixel intensities in an image2 5 7 4 12 1 6 2 4 910 7 4 4 4 2 9 3 1 28 11 14 4 1 9 7 5 11 121 2 3 2 3 6 8 13 4 56 7 8 15 0 10 7 9 6 56 6 7 8 4 3 11 8 9 07 8 5 6 4 5 13 4 4 47 8 9 8 9 8 7 5 7 77 5 4 3 3 4 5 6 14 114 12 12 1 5 7 2 1 9 9Image, I=f(x,y)In this example intensity in image is thefunction / or signal which is dependent onindependent variable spatial coordinate xand y.
5. 5. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 5Contd..4) The voltage across capacitorRCteV /−=5) share value fluctuation in stock market during year ( month wise)Month Jan Feb Mar Apr May Jun Jul Aug SepSharevalue(Rs)200 214 214 245 198 200 210 200 234
6. 6. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 6Common Discrete time signalsIt is general practice to represent complex signals by using commonor standards signals.In descrete time signals independent variable,t, can be equivalently seen as nT where T is samling period andn is sample number. Thuis , n becomes independent variable indescrete time signal. Some of the common signals are given here.a)Unit impulse function01;0;0≠=nn=)(nδb) Unit step function u(n):0≥n0<nIt is defined as u(n) = 100≥n0<nc)Unit ramp function ( r(n)):r(n) = n0
7. 7. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 7e-TECHNoteThis PPT is sponsored byIRDC Indiawww.irdcindia.com
8. 8. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 8Contd..d) Exponential function:It is expressed as asanAenf =)(When a ia negative when a is positive)sin()( φω += nanf)cos()( φω += nanffπω 2=φe) Sinusoidal functionsine function ,cosine functionis the angular frequency of functionwhere A is the amplitude of functionis the phase of the function.f) Sgn functionIt is defined as1, n>0Sgn(n)= 0,n=0-1,n<0g) Decaying/growing sinusoidal
9. 9. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 9Signal RepresentationDiscrete time signals can be represented as followsGraphical Representation0x(n)Sequence Representation{ }3021)( =nx ;......2)1(;1)0( == xx{ }25212310)( −−↑nx....2)2(,1)1(,2)0(,3)1(,1)2(,0)3(,0)4( ==−==−=−=−=− xxxxxxxFunctional representation=02/2)( nnnxelsewherenn8540≤≤≤≤=nnnx3)(2evennoddn==
10. 10. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 10ProblemsSketch following signals=02/2)( nnnxelsewherenn8540≤≤≤≤=nnnx3)(2evennoddn==−−=nnnx5320)(4422>≤≤≤nnn123
11. 11. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 11Signal Operations• Addition/Subtraction – corresponding samples from both signals would beadded, subtracted• Amplitude Scaling- each sample of the signal would be scaled by scalingfactor• Delaying• Advancing•Time reversing•Rate Changing
13. 13. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 13Time ReversingOriginal signal x(n)1234n0TR & Delayingx(n)x(-n+1)x(-n-1)TR & AdvancingTime Reversed x(n)1234n0x(-n)x(n)1234n0x(n)1234n0
14. 14. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 14Rate ChangingRate changing – Multirate Signal Processing– changing the sampling rate of signalUp samplingDown samplingOriginal signalx(n)1234n0x(n)x(n)1234n0x(n/2)x(n)13n0x(2n)
15. 15. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 15e-TECHNoteThis PPT is sponsored byIRDC Indiawww.irdcindia.com
16. 16. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 16Signal Classification• Periodic and Aperiodic Signals• Even and Odd signals• Energy and Power signal• Deterministic and stochastic signal
17. 17. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 17Periodic and Aperiodic Signals•A signal is periodic if it satisfies periodicity property x(n+kN)=x(n)where N is a fundamental period and k is any integer•If signal is periodic with fundamental period N, it sis also periodic for anyinteger multiple of NtTptA signal which doesnt satisfy periodicity property is called aperiodic signal
18. 18. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 18Calculation of Periodicity• Sum of two or more periodic signals is also a periodic signal• If xa[n] and xb[n] are two periodic singals with funfadmentalperiod Na and Nb respectively, then singal y[n]=xa[n]+xb[n] is aperiodic singal with fundamental period N given byN= Na*Nb/(GCD(Na,Nb)where GCD greatest common divisor of Na & Nb
19. 19. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 19Even and Odd signals• Signal which satisfiesx(n)=x(-n) for all values for nis called as even signaln0• Signal which satisfiesx(n)=-x(-n) for all values for nis called as odd signal n0Any signal can be expressed in termsof odd and even signal)()()( nxnxnx oddeven +=2)()( nxnxxeven−+=2)()( nxnxxodd−−=where and
20. 20. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 20Energy and Power Signal•The signal x(n) is said to be an energy signal if its energy, ascalculated by following equation , is finite and non-zero.∑−=∞→=NNnNnxEnergy2)(lim•The signal x(n) is said to be an power signal if its power, ascalculated by following equation , is finite and non-zero.∑−=∞→ +=NNnNnxNPower2)(121lim
21. 21. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 21Problem(1)• identify signals if it is power or energy signala) u(n) b) 0.5nu(n)∑∑∞∞∞=−∞===0221)(nnxE21112221lim1121lim1121lim)(121lim=++=++=+=+=∞→∞→−=∞→−=∞→∑∑NNNNNNnNNNnNNNNnxNPa)∑=+−−=212111NNnNNnaaaa 1≠aWe know ,wherePower signal
22. 22. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 22e-TECHNoteThis PPT is sponsored byIRDC Indiawww.irdcindia.com
23. 23. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 23Solution3475.0125.010125.05.0)(02022==−−==−== ∑∑∑∞∞∞∞=−nnxEEnergy signal∑=+−−=212111NNnNNnaaaa 1≠aWe know ,where
24. 24. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 24Quiz1. Sketch∑∞=−=0)()(kknnx δ2. Can step sequence be represented in terms of impulses? If yes how?3. Signal is to be down sampled by a factor of 2.5. Is it possible? If yes ,how?4. Verify odd-even signal equation for the signal x(n)={1 2 3 4}5 Given DTS as { }23221231)( −−−=↑nxSketch a) x(n-3) , b)x(3-n), c) x(-n-1) , d)x(2n) u(2-n) f)x(n-2)∂(n+2)
25. 25. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 25System•DefinitionSystem is device that follows unique relationship betweenexcitation and response( input and output)A discrete-time system is essentially an algorithm forconverting one sequence (called the input) into another sequence(called the output)∫x(n) y(n)y(n)=f[x(n)]f[.] denotes the specificsystem
26. 26. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 26Examples of system• Differentiator y(n)= x(n)-x(n-1)• Square law modulator y(n)= [ x(n)]2• Interpolator/ upsampler=0)()(mnxnyotherwisefMmultipleson =
27. 27. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 27System Representation• Impulse response (in time domain)h[n]={1 -1} , h[n]= { 1 0.8 0.54 0.24 0.006}•Relation between input and outputas seen in system examples•Difference equationy[n]= x[n]- x[n-1] , y[n]= y[n-1] + ax[n] +bx[n-2]•Transfer function( in z-domain)H(z)= 1/(z+1)
28. 28. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 28e-TECHNoteThis PPT is sponsored byIRDC Indiawww.irdcindia.com
29. 29. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 29System Classification• Continuous /discrete time systems• Time variant/invariant systems• Memory less/memory systems( Static/dynamic system)• Causal/anti-causal/non-causal system• Linear/non-linear systems• Lumped/distributed-parameter systems• Stable/unstable systems• Invertible and non-invertible systems
30. 30. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 30Continuous /discrete time systemsIs there any applicationwhich exist only in digitaland not in analog ?If the system process CTS, then system is said to be continuoustime system.e.g. R-C circuit, transmitting antennaIf the system process DTS, then system is said to be discrete timesystem.e.g. Digital adder
31. 31. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 31Lumped/distributed-parameter systems• If the component used in system has identicalvalues of physical parameters( current, voltages etc)throughout its area and can be considered as asingle point (node) in the system , it is called aslumped parameter system• e.g normal components like resistor, capacitor inlow frequency applications etcV1V1V1V1• If the component used in system has differentvalues of physical parameters ( current, voltages etc)throughout its area and cannot be considered as asingle point (node) in the system , it is called aslumped parameter system•E.g. transmission lines, microwave tubes whichnormally used in high frequencyV1V2V3V4
32. 32. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 32Memory less/memory systems( Static/dynamicsystem)A system for which the output depends only on a present inputand thus , not requires memory, is called as memory less (static )system.e.g. y(n)= a*x(n) , y(n)=x2(n)A system for which the output depends on past and/or futurevalues of the input in addition to the present values of input ,hence it needs memory, delay elements, is called asmemory systeme.g. y(n)=x(n)+x(n+2) , y(n)=x(n-2)
33. 33. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 33Causal/anti-causal/non-causal systemA system for which the output at any instatnt depends only on thepast or present values of the input( not on future samples) iscalled as causal systemy(n)= n*x(n) , y(n)=x(n) +x(n-1)A system for which the output at any instatnt depends also onfuture values of the iput , is called as non-causal systeme.g. y(n)=x(n2) , y(n)=x(-n) , y(n)=x(n)+x(n+1)
34. 34. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 34e-TECHNoteThis PPT is sponsored byIRDC Indiawww.irdcindia.com
35. 35. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 35Stable/unstable systemsThe system is said to be stable if any bounded input signalresults in bounded output signalbounded signals u(n) , e-anThe system is said to be unstable if the system givesunbounded output signal in response to bounded inputsignalunbounded signals r(n) , n*u(n)
36. 36. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 36Invertible/non-invertible systemsThe system whose output can be used to determineinput uniquely and exactly, is called as invertible system.e.g. y=2xbut y=x2 is not an invertible system as it would give twopossible inputs ( +ve and –ve)Hence , system defined by y=x2 is non-invertible system
37. 37. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 37Linear /non-linear SystemsIf system holds superposition property , it is called as linear systemif system violates superposition property, it is called as nonlinear systemHX1(n)X2(n)+abY(n)HHSuperposition property of a system with any two inputs x1(n) and x2(n) isdefined asH{a x1(n) +b x2 (n) }= a H{x1(n)} +b H{x2(n) }=a y1(n) +b y2(n)X1(n)X2(n)ab+ Y(n)
38. 38. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 38Problems1) y(n)=nx(n)y1(n)=nx1(n)y2(n)= nx2(n)ay1(n)+by2(n)= nax1(n)+ nbx2(n)=n[ax1(n)+bx2(n)] …..AH[ax1(n)+bx2(n)]= n[ax1(n)+bx2(n)] …..BA=B Linear system2) y(n)=x2(n)y1(n)=x12(n)y2(n)=x22(n)ay1(n)+by2(n)=ax12(n)+bx22(n) ….AH[ax1(n)+bx2(n)]= [ax1(n)+bx2(n)]2= a2x12(n)+b2x22(n)+2abx1(n)x2(n)………BA != BNon-linear system
39. 39. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 39Time Variant/Invariant SystemsA system is said to be time-invariant if its input-outputrelationship does not change with timeA system is said to be time-variant if its input-outputrelationship changes with timeIn other words if a time shift or delay at the inputproduces identical time shift at the output , then systemis said to be time invariant system.i.e. H{x(n-a)}=y(n-a)Other wise it is said to be time variant
40. 40. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 40e-TECHNoteThis PPT is sponsored byIRDC Indiawww.irdcindia.com
41. 41. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 41Contd..HShift by aH Shift by aX(n) y(n-a)X(n) y(n-a)Output of shifted input , y(n,k)Shifted output, y(n-k)
42. 42. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 42Problems1) Y(n)=x(n)+ x(n-1)o/p of delayed input by ki.e. y(n,k)=x(n-k)+x(n-1-k)Delayed o/p by kY(n-k)= x(n-k)+x(n-k-1)Y(n,k)=y(n-k)System is time-invariant2)Y(n)=nx(n)o/p of delayed input by ki.e. y(n,k)=nx(n-k)Delayed o/p by kY(n-k)= (n-k)x(n-k)Y(n,k) !=y(n-k)System is time-variant3) Y(n)=x(-n)o/p of delayed input by ki.e. y(n,k)=x(-n-k) as x(n) x(n-k) x(-n-k)Delayed o/p by kY(n-k)= x(-(n-k))=x(-n+k)Y(n,k)=y(n-k) System is time-variant
43. 43. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 43DT System with Differential equationsSystem relationship between input and outputOutput is a function of input as well as outputs and can be well describedby differential equation∑ ∑= =−+−−=NkMkkk knxbknyany1 0)()()(where {ak} and {bk} are constant parameters that specify thesystem and are independent of x(n) and y(n)
44. 44. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 44IIR and FIR systemsIIR is recursive structureFIR is non-recursive structure
45. 45. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 45e-TECHNoteThis PPT is sponsored byIRDC Indiawww.irdcindia.com
46. 46. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 46ConvolutionDefinition: It is the tool or operation to determine the response ofthe LTI systemConvolution between two DT signals x(n) and h(n) is expressedas∑∑∞−∞=∞−∞=−=−==kkknxkhorkxknhnxnhny)()()()()(*)()(Example: x(n) is input , h(n) = [ 1 0.8 0.4 0.01]x(n)= { 1 3 2 1 2 2 1 1 3 2} y(n)= {1 }
47. 47. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 47Properties of Convolution• h(n) * x(n) = x(n)*h(n)• h(n)* [ax(n)] = a [h(n)*x(n)] where a is constant• h(n)*[x1(n)+x2(n)]=h(n)*x1(n)+h(n)*x2(n)• h(n)*[x1(n)*x2(n)]=[h(n)*x1(n)]*x2(n)
48. 48. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 48Convolution: Graphical MethodSteps :1) Reverse one of the signal to get h(-k)2) Shift right above signal by n to get h(n-k)3) Multiply (dot product) h(n-k) with x(k) to get sample y(n)4) Repeat step 2 and 3 to get sample y(n) for all values of n
49. 49. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 49Contd..]30112[)( −−=↑nx ]121[)( −=↑nhh(k)kh(-k)kx(k)k0 00
50. 50. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 50Contd..h(-k)k0k0x(k)Shift by 0 to get y(0)0 4 1 0 0 0 = 5 = y(0)
51. 51. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 51Contd..h(-1-k)k0k0x(k)Shift by -1 to get y(-1)0 0 2 0 0 0 0 = 2 = y(-1)
52. 52. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 52Contd..h(-2-k)k0k0x(k)Shift by -2 to get y(-2)0 0 0 0 0 0 0 0 = 0 = y(n) for n < -1
53. 53. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 53e-TECHNoteThis PPT is sponsored byIRDC Indiawww.irdcindia.com
54. 54. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 54Contd..h(1-k)k0k0x(k)Shift by 1 to get y(1)-2 2 -1 0 0 = -1 = y(1)
55. 55. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 55Contd..h(2-k)k0k0x(k)Shift by 2 to get y(2)0 -1 -2 0 0 = -3 = y(2)
56. 56. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 56Contd..h(3-k)k0k0x(k)Shift by 3 to get y(3)0 0 1 0 -3 = -2 = y(3)
57. 57. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 57Contd..h(4-k)k0k0x(k)Shift by 4 to get y(4)0 0 0 0 -6 = -6 = y(4)
58. 58. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 58Contd..h(5-k)k0k0x(k)Shift by 5 to get y(5)0 0 0 0 3 = 3 = y(5)
59. 59. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 59Contd..h(6-k)k0k0x(k)Shift by 6 to get y(6)0 0 0 0 0 0 0 = 0 = y(n) for n>5
60. 60. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 60e-TECHNoteThis PPT is sponsored byIRDC Indiawww.irdcindia.com
61. 61. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 61Contd..]30112[)( −−=↑nx ]121[)( −=↑nhh(k)kx(k)k0 0*= 0]3623152[)( −−−−=↑nylength (x)= N1=3length (h)=N2=5Thus,length (y)=N1+N2-1=7
62. 62. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 62301126022430112−−−−−−Convolution: Tabular method]30112[)( −−=↑nx ]121[)( −=↑nhh(n)x(n)30112 −−121−]3623152[)( −−−−=↑ny
63. 63. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 63Problems• Compute convolution for the following signals:– A)– B)– C)]1231[)(↑=nx ]11[)( =nh]54321[)(↑=nx ]11[)( −=nh]12312[)( −=nx ]1234[)( =nh
64. 64. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 64CorrelationThe cross-correlation of x(n) and y(n) is given by∑∞−∞=−=nxy lnynxlr )()()( ∑∞−∞=+=nxy nylnxlr )()()(or....3,2,1,0 ±±±=lforIf signal x(n) and y(n) are same i.e. y(n)=x(n), then auto-correlation is givenby∑∞−∞=−=nxx lnxnxlr )()()(....3,2,1,0 ±±±=lfor)()( lrlr yxxy −=
65. 65. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 65Contd..Computation of correlation is same as computation of convolutionwithout folding operation e.g.]3217312[)( −−=↑nx ]52142211[)( −−−=↑ny3217312 −−↑xy11224125−−−10 -5 15 35 5 10 -15-4 2 -6 -14 -2 -4 62 -1 3 7 1 2 -38 -4 12 28 4 8 -12-4 2 -6 -14 -2 -4 64 -2 -6 14 2 4 -6-2 1 -3 -7 -1 -2 32 -1 3 7 1 2 -3rxy=[ 10 -9 19 36 -14 33 0 7 13 -18 16 -7 5 -3]
66. 66. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 66e-TECHNoteThis PPT is sponsored byIRDC Indiawww.irdcindia.com
67. 67. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 67Quiz• Find the output of the system if input x(n) and impulse responseh(n) are given by ( May 2003, 4 marks)•Determine the autocorrelation of the following signals (Dec 97 , 5marks)– i) x(n)={ 1 2 1 1} ii) y(n)= { 1 1 2 1}– What is your conclusion?021)(===nxotherwisenn11,0,2−=−= )3()2()1()()( −−−+−−= nnnnnh δδδδ
68. 68. 10/7/2009e-TECHNote from IRDC Indiainfo@irdcindia.com 68End of Chapter 01Queries ???