SIGNALS AND SYSTEMS احسان احمد عرساڻي Chapter 2 S. No. Topic 3 Sinusoidal and complex exponential signals Singularity function signals and their properties Signal energy and signal power 4 Orthogonal signals 1 2 5 Signal representation by Generalised Fourier Series Continuous and discrete-time No. of Lecture s 2 2 2 2 2 Sinusoidal Signals The only natural wave The only natural oscillation The Simple Harmonic motion xt A cos2ft All other waves are composite waves and combinations of several sine waves Sinusoidal Signals Euler’s theorem A sinusoidal signal can be represented using complex exponentials e j cos j sin e j cos j sin e j e j 2 cos e j e j 2 j sin e j e j cos 2 j e e sin 2j j The decaying sinusoid cos(2πfot+Ø) e(-t/ ) e(-t/ ) cos(2πfot+Ø) 10 5 0 -5 -10 -5 -4 -3 -2 -1 0 1 2 3 4 5 Singularity Function Signals Unit Impulse 1 0.8 Impulse Abrupt amplitude 0.6 0.4 change 0.2 0 -2 -1.5 -1 -0.5 0 0.5 time (seconds) 1 1.5 2 1 1.5 2 1 1.5 2 Unit Step u(t) 1 Step amplitude 0.8 Constant 0.6 0.4 0.2 0 -2 -1.5 -1 -0.5 0 0.5 time (seconds) Unit Ramp r(t) 2 Ramp Linear change/constant rate of change amplitude 1.5 1 0.5 0 -2 -1.5 -1 -0.5 0 time (second) 0.5 Impulse اِمپلس 4 0.125 3.5 3 delta(t) 2.5 0.25 2 1.5 0.5 1 0.5 0 -2 -1.5 -1 -0.5 1 x(t ) 0 0 t 0.5 1 for t for elsewhere 1.5 2 Impulse اِمپلس 8 0.125 7 6 5 4 0.25 3 0.5 2 1 0 -1 -0.8 -0.6 -0.4 -0.2 0 1 t 1 x(t ) 0 0.2 0.4 0.6 for t for elsewhere 0.8 1 Impulse اِمپلس 4 0.125 3.5 3 x(t) 2.5 2 1.5 1 0.25 0.5 0.5 0 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 time (seconds) t 1 x(t ) e 2 0.4 0.6 0.8 1 Properties of impulse (t) (-t)= (t) (at)= (t) Time-shifted impulse t 0 1 t 0 elsewhere (t- ) Unit Impulse 1 0.8 amplitude 0.6 0.4 0.2 0 -2 -1.5 -1 -0.5 0 0.5 time (seconds) 1 1.5 2 Properties of impulse (t) (-t)= (t) (at)= (t) Time-shifted impulse (t- ) at 0 1 at 0 elsewhere t 0 1 at 0 elsewhere t 0 1 t 0 elsewhere t 0 1 t 0 elsewhere t 0 1 t 0 elsewhere Properties of impulse (t) t 0 1 t 0 elsewhere t 1 1 t 1 0 elsewhere 1 t 1 0 t 1 0 elsewhere 1 t 1 0 t 1 0 elsewhere u(t) 1 0.5 0 -1.5 -1 -0.5 0 0.5 1 1.5 -1 -0.5 0 0.5 1 1.5 -1 -0.5 0 0.5 1 1.5 0.5 0 -1.5 1 u(t+1) t 1 1 t 1 0 elsewhere u(t-1) 1 0.5 0 -1.5 Properties of impulse (t) t 0 1 t 0 elsewhere t0 1 t dt 0 elsewhere t t t dt ut Impulse doesn’t have a specific amplitude It has a specific strength instead Properties of impulse (t) xt t x0 t xt t t0 xt0 t t0 t xt t x0 for t 0 t xt t t xt for t t 0 0 0 1 t 1 ut 1 0 t 1 1 t 0 u t 0 t 0 1 u(t) 1 t 1 u t 1 0 t 1 0.5 0 -3 -2 -1 0 1 2 3 -2 -1 0 1 2 3 -2 -1 0 1 2 3 0.5 0 -3 1 u(-t-1) 1 t 1 u t 1 0 t 1 u(t-1) 1 0.5 0 -3 1 t 0 u t 0 t 0 1 t 0 u t 0 t 0 1 u t 1 0 t 1 0 t 1 0 1 t 0 u t 0 t 0 1 t 1 u t 1 0 t 1 u(t) 1 0.5 0 -3 -2 -1 0 1 2 3 -2 -1 0 1 2 3 -2 -1 0 1 2 3 u(-t) 1 0.5 0 -3 u(-t+1) 1 0.5 0 -3 Ramp Signal r(t) t 0 At Ar t 0 otherwise 5 4 r(t) 3 2 1 0 -2 -1 0 1 2 time (seconds) 3 4 5 Shifted Ramp Signal r(t- ) t At Ar t otherwise 0 r(t+1) r(t-1) r(t) At t 0 Ar t otherwise 0 4 2 0 -2 4 -1 0 1 2 3 4 5 -1 0 1 2 3 4 5 -1 0 1 2 3 4 5 2 0 -2 6 4 2 0 -2 Scaled Ramp Signal r(at) t 0 Aat Ar at 0 otherwise at 0 Aat Ar at 0 otherwise r(t) 10 5 r(2t) 0 -2 10 0 1 2 3 4 5 -1 0 1 2 3 4 5 -1 0 1 2 3 4 5 5 0 -2 10 r(0.5t) -1 5 0 -2 Time Reversed Ramp Signal r(-t) t 0 At Ar t otherwise 0 t0 At Ar t otherwise 0 5 4 r(-t) 3 2 1 0 -5 -4 -3 -2 -1 0 time (seconds) 1 2 3 4 5 Signal Energy and Signal Power Oppenheim Page 5 to 7 No examples Continuous and Discrete No concepts explained Carlson Page 70 to 74 3 examples Continuous only Concepts explained Signal Energy It has no specific unit Its unit depends on the unit of the x(t) itself It is the concept of energy carried in a signal irrespective of the system lim T 2 Ext Ex x t dt T T lim N 2 Exn Ex x n N N Example lim 1 T 2 ER v t dt T R T A buzzer has the resistance of 20Ω A rectanguar pulse is applied to the buzzer t 5 vt 12 volts 4 Compute the Energy consmed by the buzzer Joules 12 10 voltage (volts) 8 6 4 2 0 0 1 2 3 4 time (seconds) 5 6 ER 28.8 Joules 7 8 A rectangular pulse Plot the following rectangular pulse t 1 xt 2 4 2.5 2 1.5 x(t) 1 0.5 0 -0.5 -3 -2 -1 0 1 time (seconds) 2 3 4 5 Example continued lim T 2 2 Ev v t dt v s T T lim T 2 2 Ei i t dt A s T T 3 7 Ei i t dt i t dt i t dt 2 3 2 2 3 7 7 Ei 0dt 0.6 dt 0dt A 2s 2 3 Ei 0.36t 3 7 7 A s Ev v t dt v t dt v 2 t dt v 2s 3 2 3 As Ei 0.367 3 A s 7 7 Ev 0dt 12 dt 0dt v 2s 2 3 7 2 7 2 Ev 144t 3 2 Ei 1.44 A2s 3 2 7 v 2s Ev 1447 3 v2s Ev 1444 v2s Ev 576 v 2s Signal Power It has no specific unit lim 1 T 2 Pxt Px x t dt T 2T T Its unit depends on the unit of the x(t) itself It is the concept of N lim 1 2 P x n Px x n power carried in a N 2N 1 N signal irrespective of the system Energy Signal and Power Signal Energy Signal A signal with finite energy is an Energy Signal Power Signal 0<Ex<∞ Note Px=0 Finite average energy divided by infinite time A signal with finite power is a Power signal 0<Px<∞ Note Ex= ∞ Finite average power multiplied by infinite time vt e u t An Example 3t Energy Power T Ev limT e 3t u t dt 2 T Ev e 6t dt 0 1 6t Ev e 0 6 1 Ev e e 0 6 1 Ev 6 The average Power will be zero, b/c average energy is finite 1 0.8 0.6 0.4 0.2 0 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 3 Periodic Signals Cannot be an Energy signal Each cycle/period contains a finite energy Total Energy is the sum of energy in all the cycles There are inifite number of cycles Therefore, total energy becomes infinite But Engergy per unit time (Power) remains finite Therefore, all the Periodic Signals are Power Signals Neither Energy Signal nor Power Signal Examples Infinite Energy and Zero Power 0.1 u t 1 Eg. xt t 1 0.8 0.6 0.4 0.2 0 -2 Infinite Engery and Infinite Power Eg. yt r t Impulse signal -1 0 1 2 3 4 5 Convolution Mathematically: رياضتا جڏهن ته هڪ فرضي ويريئيبل آهي x(t ) * h(t ) x( )h(t )d Where is a dummy variable It is integral of one function as weighted by the other function جنهن جو وزن ٻيو،اهو هڪ فنڪشن جو اهڙو انٽيگرل آهي .فنڪشن متعين ڪري ٿو Procedure طريقه ڪار x(t ) * y (t ) x( ) y(t )d Replace t with in x(t) and y(t) جاء تي رکو ِ جيt ۾y(t) ۽x(t) فنڪشن Time-reverse the function y( ) to find y(- ) لهوy(- ) کي وقت جي محور تي ابتو ڪريy( ) فنڪشن Shift the function y(- ) by t units to find y(t- ) لهوy(t- ) ايڪا سيريt کيy(t- ) فنڪشن An Example ڪ مثال ُ ِه 0.5e 0.5t h(t ) 0 for t 4 for t 4 1 x(t ) 0 for t 0 for t 0 x(t) 1 0.5 0 -1 0 1 2 3 4 t (sec) 5 6 7 8 9 0 1 2 3 4 t (sec) 5 6 7 8 9 h(t) 0.6 0.4 0.2 0 -1 for 4 for 4 h(t-tau) h(-tau) x(tau) 1 x( ) 0 0.5e 0.5 h( ) 0 for 0 for 0 1 0.5 0 -6 -4 -2 0 2 4 6 8 0.4 0.2 0 -6 -4 -2 0 2 4 6 8 0.4 0.2 0 -6 -4 -2 0 2 4 6 8 t 0.5e 0.5(t ) h(t ) 0 for t for t Case I: t<4 Case 2: t>4 There’s no overlap x(t ) * y (t ) x( ) y (t )d xt * y (t ) 00.5e 4 xt * y (t ) 0 0.5 t d There’s overlap that increases logarithmcally t x t * y (t ) 1 0.5e 0.5t d 4 t x t * y (t ) 0.5 e 0.5t d 4 x t * y (t ) 0.5e 0 .5 t t e 0.5 d 4 x t * y (t ) e 0.5t e 0.5 t 4 x t * y (t ) e 0.5t e 0.5t e 2 Convoltion of x(t) and y(t) xt * y (t ) 1 e 2e 0.5t 1 x(t)*y(t) 0.8 0.6 0.4 0.2 0 -2 0 2 4 6 t (sec) 8 10 12 14 An Exercise Question ڪ مشقي سوال ُ ِه Find لهو 𝑦(𝑡) = 𝑎(𝑡) ∗ 𝑏(𝑡) Exercise 4.12 (Carlson) 1 for t 1 b(t ) for t 1 0 et a(t ) 0 for t 1 for t 1 a(t) 0.4 0.2 0 -5 -4 -3 -2 -1 0 1 2 3 4 5 -4 -3 -2 -1 0 1 2 3 4 5 b(t) 1 0.5 0 -5 ( t ) e a(t ) 0 ( t ) e for t 1 a(t ) for t 1 0 for 1 t for 1 t a(-tau) 0.4 0.2 b(tau) a(t-tau) 0 -5 0.4 -4 -3 -2 -1 0 1 -4 -3 -2 -1 0 1 -4 -3 -2 -1 0 1 2 3 4 5 2 3 4 5 2 3 4 5 0.2 0 -5 t 1 0.5 0 -5 Case 1: 0 ≤ 𝑡 ≤ ∞ e t y (t ) d t e d 1 t 1 y (t ) e e y (t ) 0 e y (t ) e e y (t ) 0 e y (t ) e t y (t ) e t t 1 t 1 t t t 1 t 1 t 1 t t 1 y (t ) e Case 2: −∞ ≤ 𝑡 ≤ 0 y (t ) y (t ) e t 1 1 y(t)=a(t)*b(t) 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 -5 -4 -3 -2 -1 0 1 2 3 4 5 Test Question امتحاني سوال Find the convolution of 𝑥(𝑡) and ℎ(𝑡). جو ڪنووليوشن لهوℎ(𝑡) )𝑡(𝑥 ۽ x(t ) 2 cos(2t ) e t h(t ) 0 for t 0 elsewhere 0 0 y t e e j 2 t d e e j 2 t d 0 0 y t e e j 2t e j 2 d e e j 2t e j 2 d y t h xt d y t 2 e u cos2 t d y t e y t 2 e cos2 t d e j 2 t e j 2 t y t 2 e d 2 0 y t e j 2t e 0 1 j 2 d e j 2t 0 0 j 2t e 0 0 y t e j 2t e e j 2 d e j 2t e e j 2 d 0 h e u xt 2 cos2 t y t e e j 2 t e j 2 t d e for t 0 ht 0 elsewhere xt 2 cos2t t 1 j 2 e d 0 1 j 2 d e j 2t 1 j 2 e d 0 y t e j 2t y t e j 2t y t e j 2t y t e j 2t 1 1 e 1 j 2 0 e j 2t e 1 j 2 1 j 2 1 j 2 1 1 e e 0 e j 2t e e 0 1 j 2 1 j 2 1 1 0 1 e j 2t 0 1 1 j 2 1 j 2 1 1 e j 2t 1 j 2 1 j 2 1 1 1 1 j 2t j 2t 1 j 2 1 j 2 y t e e e e 1 j 2 1 j 2 1 1 y t e j 2t e 0 e j 2t e0 2 2 1 4 1 4 1 1 j 2t y t e j 2t e 2 2 1 4 1 4 e j 2t e j 2t 1 1 j 2t j 2t y t e e 2 2 2 2 1 4 1 4 2 y t cos2t 2 1 4 0 From Exercise مشق مان Find and sketch convolution of the function x(t) with itself. for 3 t 3 elsewhere 1 xt 0 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 -10 -8 -6 -4 -2 0 2 4 6 8 10 Convolution Exercise xt xt 1 3 x xt d t 3 0.9 0.8 0.7 0.6 xt xt 3 1d t 3 xt xt 0.5 0.4 0.3 0.2 3 t 3 xt xt 3 t 3 xt xt 3 t 3 xt xt 6 t 0.1 0 -10 -8 -6 -4 -2 3 3 t 0 2 4 3 6− 𝑡 𝑥 𝑡 ∗𝑥 𝑡 =ቊ 0 6 8 3t 𝑡≤6 𝑡>6 10 𝑡 < −6 −6 ≤ 𝑡 < 0 𝑡=0 0<𝑡≤6 𝑡>6 𝑛𝑜 𝑜𝑣𝑒𝑟𝑙𝑎𝑝 𝑝𝑎𝑟𝑡𝑖𝑎𝑙 𝑜𝑣𝑒𝑟𝑙𝑎𝑝 𝑐𝑜𝑚𝑝𝑙𝑒𝑡𝑒 𝑜𝑣𝑒𝑟𝑙𝑎𝑝 𝑝𝑎𝑟𝑡𝑖𝑎𝑙 𝑜𝑣𝑒𝑟𝑙𝑎𝑝 𝑛𝑜 𝑜𝑣𝑒𝑟𝑙𝑎𝑝 𝑡=0 𝑐𝑜𝑚𝑝𝑙𝑒𝑡𝑒 𝑜𝑣𝑒𝑟𝑙𝑎𝑝 ൞0 < 𝑡 ≤ 6 𝑝𝑎𝑟𝑡𝑖𝑎𝑙 𝑜𝑣𝑒𝑟𝑙𝑎𝑝 𝑡 >6 𝑛𝑜 𝑜𝑣𝑒𝑟𝑙𝑎𝑝 6 5 4 3 2 1 0 -10 -8 -6 -4 -2 0 t 2 4 6 8 10 Properties of Convolution Commutative Associative f t * g t g t * f t f t *g t * ht f t * g t * ht Distributive f t *g t ht f t * g t f t * ht Discrete-time convolution xn 1 hn 3 1 4 3 1 1 2 3 1 2 4 2 3 yn yn xn* hn ? yn 2 xmhn m n M 1 xmhn m n ( L 1) 4 3 x[n] 2 1 0 -1 -2 -3 -4 -3 -2 -1 1 0 time index n 2 3 4 5 4 x[n] 2 0 -2 4 h[n] 2 0 -2 h[-n] 4 2 0 -2 -5 -4 -3 -2 -1 0 1 time index (n) 2 3 4 5 xn 1 2 3 h n 4 2 1 1 4 3 3 2 1 1 2 3 x[m] = {0 1 2 -3 1 4 3 -1 2} h[-m] = {4 2 1 -3 -2 -1 3 0 0} Sum = 0×4+1×2+2×1-3×-3+1×-2+4×-1+3×31×0+2×0 Sum=0+2+2+9-2-4+9-0+0=16 Impulse Response System’s zero-state response to a unit impulse applied at t=0. Represented by h(t) Unit Impulse 1 0.8 System amplitude 0.6 0.4 0.2 0 -2 -1.5 -1 -0.5 0 0.5 time (seconds) t 1 1.5 2 h(t) Causality Revisited ℎ(𝑡) = 0 𝑓𝑜𝑟 𝑡 < 0 ℎ(𝑡 − 𝜏) = 0 𝑓𝑜𝑟 𝑡 − 𝜏 < 0 ℎ(𝑡 − 𝜏) = 0 𝑓𝑜𝑟 − 𝜏 < −𝑡 ℎ 𝑡 − 𝜏 = 0 𝑓𝑜𝑟 𝜏 > 𝑡 y t x h t d y t t x ht d Function Approximation A series of basis signals to approximate a complex signal over an approximation interval N xˆ t X nn t n 1 A DC value (constant) A constant slope (ramp) Output for each basis signal is computed separately Sum of individual Outputs estimates the output corresponding to the complex input This is called superposition System characteristics Approximation Criteria Minimising the: maximum error area under the error Energy of the error signal over the approximation interval minmax xˆ t xt t2 min xˆ t xt dt t1 t2 2 min xˆ t xt dt t1 Example The approximation interval is from 0 to 2 5 x(t) 4 t2+1 3 2 1 0 -1 -0.5 0 0.5 1 1.5 time (seconds) 2 2.5 3 x(t) 5 phi1(t) 0 -1 -0.5 0 0.5 1 1.5 2 2.5 3 -0.5 0 0.5 1 1.5 2 2.5 3 -0.5 0 0.5 1 1.5 2 2.5 3 1 phi2(t) 0.5 0 -1 2 1 0 -1 time (seconds) N xˆ t X nn t For N=1 n 1 xˆt X 11 t 1 X 11 t t 1 dt t2 2 2 t1 2 1 X 1 t 1 dt 2 2 0 28 206 1 2 X X 1 3 15 2 1 d1 28 4 X1 dX1 3 d 1 0 dX1 28 4 X1 0 3 28 4 X1 3 28 7 X1 12 3 128 1 45 Finding X1 that gives the least error e1 15 10 5 0 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 3 3.5 4 4.5 -3 de1/dX1 x 10 X=2.333 Y=0.00 5 0 -5 0 0.5 1 1.5 2 2.5 X1 For N=2 N xˆ t X nn t n 1 xˆt X11 t X 22 t 2 X 11 t X 22 t t 1 dt t2 2 2 t1 2 X 1 X 2t t 1 dt 2 2 2 0 8 2 28 2 2 X X 2 4 X 1 X 2 X 1 12 X 2 12 3 3 2 1 d 2 16 4 X 1 X 2 12 dX 2 3 d 2 28 4 X1 4 X 2 dX1 3 1 X1 3 X2 2 8 2 45 Finality of coefficients The coefficient X1 also changes 7 X1 3 1 X1 3 This doesn’t demonstrate finality of coefficients Need to recompute the already computed coefs Orthogonal basis signals can assure finality of coefficients Mutually Orthogonal basis signals phi1(t) 1 0.5 0 -1 -0.5 0 0.5 -0.5 0 0.5 1 1.5 2 2.5 3 1 1.5 time (seconds) 2 2.5 3 phi2(t) 1 0 -1 -1 2 X 11 t X 22 t t 1 dt t2 2 2 t1 2 X 1 X 2 t 1 t 1 dt t2 2 2 t1 d 2 28 4 X1 0 dX1 3 d 2 4 8 X2 0 dX 2 3 3 7 X1 3 X2 2 Orthogonality Signals Ø1(t) and Ø2 (t) are said to be orthogonal to each other if: n t n t m t dt 0 1 t2 n 0 nm nm Generalised Fourier Series is a weighted sum of orthogonal basis signals that approximates a signal over the time interval t1< t < t2 by minimising the integral square error εN over the interval t2 N xt xˆ t 2 dt t1 N x 2 t 2 xt xˆ t xˆ 2 t dt t2 t1 N 2 N N 2 x t 2 xt X nn t X nn t dt n 1 n 1 t1 N 2 N N N x t 2 xt X nn t X nn t X mm t dt n 1 n 1 m1 t1 t2 t2 t2 N t2 t1 n 1 t1 N M t2 N x 2 t dt 2 X n xt n t dt X n X m n t m t dt n 1 m 1 t1 t2 N t2 t1 n 1 t1 N M t2 N x 2 t dt 2 X n xt n t dt X n X m n t m t dt n 1 m 1 t2 2 2 N x t dt 2 X n xt n t dt X n n n 1 t1 t1 t2 N 1 N x t dt n n 1 n t1 t2 N 2 1 n n 1 n N t xt n t dt 1 t2 t xt n t dt X n 1 t2 2 2 t1 t2 xt t dt 1 Xn n n t1 1 N x t dt n n 1 n t1 t2 N 2 t2 N N xt dt n X n 2 2 2 n 1 t1 X1 t xt n t dt 1 t2 1 t2 xt t dt 1 t 1 1 X2 1 2 t2 xt t dt 2 t1 t2 N N xt dt n X n 2 n 1 t1 N 0 as N t2 xt t1 2 dt n X n n 1 2 2 Parseval’s theorem The total energy contained in 𝑁 basis signals approach the total energy in the signal 𝑥(𝑡) when 𝑁 → ∞ The Test Question For the system equations shown below, describe the characteristics of the corresponding systems. Are they causal, linear, and/or time-invariant? Give sound reasons. 1 y n 2 x n x n 1 xn 2 1. 2 1 2. yn 2 xn nxn 1 xn 3 2 1 2 y n 2 x n x n 2 xn 3 3. 2 1 4. yn 2 xn xn 1 2n xn 1 n 2 5. yn 2 xn xn 1 xn 1 2 1. System 1 Causal, b/c the output doesn’t depend on the future inputs Time invariant, b/c the input or output coefficients aren’t function of the time index n Linear, b/c all the input and output coefficients are linear