Lecturer: Dr. Peter Tsang Room: G6505 Phone: 27887763 E-mail: eewmtsan@cityu.edu.hk Website: www.ee.cityu.edu.hk/~csl/sigana/ Files: SIG01.ppt, SIG02.ppt, SIG03.ppt, SIG04.ppt Restrict access to students taking this course. Suggested reference books 1. M.L. Meade and C.R. Dillon, “Signals and Systems”, Van Nostrand Reinhold (UK). 2. N.Levan, “Systems and Signals”, Optimization Software, Inc. 3. F.R. Connor, “Signals”, Edward Arnold. 4*. A. Oppenheim, “Digital Signal Processing”, Prentice Hall. Note: Students are encouraged to select reference books in the library. * Supporting reference Course outline Week 2-4 Week 6 Week 7-10 Week 11 : : : : Lecture Test Lecture Test Scores Tests : 30% (15% for each test) Exam : 70% Tutorials Group 01 Weeks Group 02 Weeks Group 03 Weeks : Friday : 2,3,4,7,8,9 : Monday : 3,4,5,7,8,9 : Thursday : 2,3,4,7,8,9 Course outline 1. Time Signal Representation. 2. Continuous signals. 3. Fourier, Laplace and z Transform. 4. Interaction of signals and systems. 5. Sampling Theorem. 6. Digital Signals. 7. Fundamentals of Digital System. 8. Interaction of digital signals and systems. Coursework Tests on week 6 and 11: 30% of total score. Notes in Powerpoint Presented during lectures and very useful for studying the course. Study Guide A set of questions to build up concepts. Discussions Strengthen concepts in tutorial sessions. Reference books Supplementary materials to aid study. Expectation from students Attend all lectures and tutorials. Study all the notes. Participate in discussions during tutorials. Work out all the questions in the study guide at least once. Attend the test and take it seriously. Work out the questions in the test for at least one more time afterwards. SIGNALS Information expressed in different forms Stock Price Data File Transmit Waveform $1.00, $1.20, $1.30, $1.30, … 00001010 00001100 00001101 x(t) Primary interest of Electronic Engineers SIGNALS PROCESSING AND ANALYSIS Processing: Methods and system that modify signals x(t) Input/Stimulus System y(t) Output/Response Analysis: • What information is contained in the input signal x(t)? • What changes do the System imposed on the input? • What is the output signal y(t)? SIGNALS DESCRIPTION To analyze signals, we must know how to describe or represent them in the first place. A time signal t x(t) 0 0 5 1 5 0 2 8 3 10 4 8 5 5 15 x(t) 10 -5 0 5 10 -10 -15 t Detail but not informative 15 20 TIME SIGNALS DESCRIPTION x(t)=Asin(wt+f) 1. Mathematical expression: 15 10 5 2. Continuous (Analogue) 0 0 5 10 15 20 -5 -10 -15 x[n] n 3. Discrete (Digital) TIME SIGNALS DESCRIPTION 15 4. Periodic 10 5 x(t)= x(t+To) Period = To 0 0 10 20 30 40 20 30 40 -5 -10 -15 To 12 5. Aperiodic 10 8 6 4 2 0 -2 0 10 TIME SIGNALS DESCRIPTION 6. Even signal xt ) x t ) 15 10 5 0 -10 -5 0 5 10 0 5 10 -5 -10 -15 7. Odd signal 15 xt ) x t ) 10 5 0 -10 -5 -5 -10 -15 T Exercise: Calculate the integral v cos wt sin wtdt T TIME SIGNALS DESCRIPTION 8. Causality Analogue signals: x(t) = 0 for t < 0 Digital signals: x[n] = 0 for n < 0 TIME SIGNALS DESCRIPTION 15 9. Average/Mean/DC value 10 5 xDC 1 TM t1 +TM xt )dt t1 0 0 10 20 30 40 -5 -10 -15 10. AC value x AC t ) xt ) xDC TM DC: Direct Component AC: Alternating Component Exercise: 2 Calculate the AC & DC values of x(t)=Asin(wt) with TM w TIME SIGNALS DESCRIPTION 11. Energy E xt ) dt 2 12. Instantaneous Power Pt ) 13. Average Power 1 Pav TM xt ) 2 R watts t1 +TM Pt )dt t1 Note: For periodic signal, TM is generally taken as To Exercise: Calculate the average power of x(t)=Acos(wt) TIME SIGNALS DESCRIPTION 14. Power Ratio P1 PR 10 log10 P2 The unit is decibel (db) In Electronic Engineering and Telecommunication power is usually resulted from applying voltage V to a resistive load R, as V2 P R Alternative expression for power ratio (same resistive load): P1 V12 / R PR 10 log10 10 log10 2 P2 V2 / R V1 20 log10 V2 TIME SIGNALS DESCRIPTION 15. Orthogonality Two signals are orthogonal over the interval if r t1, t1 + TM t1 +TM x t )x t )dt 0 1 2 t1 Exercise: Prove that sin(wt) and cos(wt) are orthogonal for TM 2 w TIME SIGNALS DESCRIPTION 15. Orthogonality: Graphical illustration x2(t) x2(t) x1(t) x1(t) x1(t) and x2(t) are correlated. When one is large, so is the other and vice versa x1(t) and x2(t) are orthogonal. Their values are totally unrelated TIME SIGNALS DESCRIPTION 16. Convolution between two signals y t ) x1 t ) x2 t ) x )x t )d x )x t )d 1 2 2 1 Convolution is the resultant corresponding to the interaction between two signals. SOME INTERESTING SIGNALS 1. Dirac delta function (Impulse or Unit Response) d(t) 0 d t ) A 0 for t 0 otherwise t where A Definition: A function that is zero in width and infinite in amplitude with an overall area of unity. SOME INTERESTING SIGNALS 2. Step function u(t) 1 0 u t ) 1 0 for t t0 otherwise A more vigorous mathematical treatment on signals Deterministic Signals A continuous time signal x(t) with finite energy N xt ) dt 2 Can be represented in the frequency domain X w ) jwt ) x t e dt w 2f Satisfied Parseval’s theorem N xt ) dt 2 X f ) df 2 Deterministic Signals A discrete time signal x(n) with finite energy N xn ) 2 n Can be represented in the frequency domain Note: X w ) is periodic with period = 2rad / sec X w ) xn)e xn ) jwn n Satisfied Parseval’s theorem N 2 2 ) x n 1 X f ) df n 2 1 2 1 2 jwn ) X w e dw Deterministic Signals Energy Density Spectrum (EDS) S xx f ) X f ) 2 Equivalent expression for the (EDS) S xx f ) jwm ) r m e xx m where rxx m ) * x n)xn + m) n * Denotes complex conjugate Two Elementary Deterministic Signals Impulse function: zero width and infinite amplitude d t )dt 1 d t )g t )dt g 0) Discrete Impulse function n0 1 d n ) 0 otherwise Given x(t) and x(n), we have xt ) x )d t )d and xn ) xk )d n k ) k Two Elementary Deterministic Signals Step function: A step response t0 1 u t ) 0 otherwise Discrete Step function n0 1 u n ) 0 otherwise Random Signals Infinite duration and infinite energy signals e.g. temperature variations in different places, each have its own waveforms. Ensemble of time functions (random process): The set of all possible waveforms Ensemble of all possible sample waveforms of a random process: X(t,S), or simply X(t). t denotes time index and S denotes the set of all possible sample functions A single waveform in the ensemble: x(t,s), or simply x(t). Random Signals x(t,s0) x(t,s1) x(t,s2) Deterministic Signals Energy Density Spectrum (EDS) S xx f ) X f ) 2 Equivalent expression for the (EDS) S xx f ) rxx )e jw d where rxx ) * x t )xt + )dt * Denotes complex conjugate Random Signals Each ensemble sample may be different from other. Not possible to describe properties (e.g. amplitude) at a given time instance. Only joint probability density function (pdf) can be defined. Given a sequence of time instants t1 , t2 ,....., t N the samples X t X ti ) Is represented by: i p xt1 , xt2 ,....., xt N ) A random process is known as stationary in the strict sense if ) p xt1 , xt2 ,....., xt N p xt1 + , xt2 + ,....., xt N + ) Properties of Random Signals X ti ) is a sample at t=ti The lth moment of X(ti) is given by the expected value ) E X xtli p xti dxti l ti The lth moment is independent of time for a stationary process. Measures the statistical properties (e.g. mean) of a single sample. In signal processing, often need to measure relation between two or more samples. Properties of Random Signals X t1 ) and X t2 ) are samples at t=t1 and t=t2 The statistical correlation between the two samples are given by the joint moment E X t1 X t2 ) xt1 xt2 p xt1 , xt2 dxt1 dxt2 This is known as autocorrelation function of the random process, usually denoted by the symbol xx t1 , t2 ) EX t X t 1 2 For stationary process, the sampling instance t1 does not affect the correlation, hence xx ) EX t X t xx ) 1 2 where t1 t2 Properties of Random Signals Average power of a random process xx 0) EX t2 1 Wide-sense stationary: mean value m(t1) of the process is constant Autocovariance function: cxx t1 , t2 ) E X t1 mt1 ) X t2 mt2 ) xx t1 , t2 ) mt1 )mt2 ) For a wide-sense stationary process, we have cxx t1 , t2 ) cxx ) xx ) mx2 Properties of Random Signals 2 cxx 0) xx 0) mx2 Variance of a random process Cross correlation between two random processes: xy t1 , t2 ) EX t Yt 1 2 ) xt1 yt2 p xt1 , yt2 dxt1 dyt2 When the processes are jointly and individually stationary, xy ) yx ) EX t Yt + EX t Yt 1 1 1 1 Properties of Random Signals Cross covariance between two random processes: cxy t1 , t2 ) xy t1 , t2 ) mx t1 )my t2 ) When the processes are jointly and individually stationary, xy ) yx ) EX t Yt + EX t Yt 1 1 1 1 Two processes are uncorrelated if cxy t1 , t2 ) or xy t1 , t2 ) E X t1 E Yt2 Properties of Random Signals Power Spectral Density: Wiener-Khinchin theorem xx f ) xx )e j 2f d An inverse relation is also available, xx ) xx f )e j 2f df Average power of a random process xx 0) xx f )df EX t2 0 Properties of Random Signals Average power of a random process xx 0) xx f )df EX t2 0 xx ) xx* ) For complex random process, xx f ) xx )e * * j 2f d xx )e j 2f d xx f ) Cross Power Spectral Density: xy f ) xy )e j 2f d For complex random process, xy* f ) xy f ) Properties of Discrete Random Signals X n , or X n ) is a sample at instance n. The lth moment of X(n) is given by the expected value E X xnl pxn )dxn l n Autocorrelation Autocovariance xx m) EX n EX k cxx n, k ) xx n, k ) EX n EX k For stationary process, let m nk cxx m) xx m) EX n EX k xx m) x2 x is the mean Properties of Discrete Random Signals The variance of X(n) is given by 2 cxx 0) xx 0) x2 Power Density Spectrum of a discrete random process xx f ) j 2fm ) m e xx m xx m) 12 xx f )e j 2fmdf 1 Inverse relation: Average power: EX 2 n 2 2 ) 0 xx 1 xx f )df 1 2 Signal Modelling Mathematical description of signal M xn ) ak nk cosw k n + f k ) k 1 or 0 k 1 k 1 ak , k ,w k ,fk 1k M are the model parameters. M Harmonic Process model xn ) ak cosw k n + f k ) k 1 Linear Random signal model xn ) hk )wn k ) k Signal Modelling Rational or Pole-Zero model xn) axn 1) + wn) Autoregressive (AR) model p xn ) + ak xn k ) wn ) k 1 Moving Average (MA) model q xn ) bk wn k ) k 0 SYSTEM DESCRIPTION 1. Linearity x1(t) System y1(t) x2(t) System y2(t) x2(t) + x2(t) System y1(t) + y2(t) IF THEN SYSTEM DESCRIPTION 2. Homogeneity IF x1(t) System y1(t) THEN ax1(t) System ay1(t) Where a is a constant SYSTEM DESCRIPTION 3. Time-invariance: System does not change with time IF x1(t) System y1(t) THEN x1(t) System y1(t) x1(t) y1(t) t x1(t) t y1(t) t t SYSTEM DESCRIPTION 3. Time-invariance: Discrete signals IF x1[n] System y1 [n] THEN x1[n - m System y1[n - m x1[n] y1 [n] t t y1[n - m x1[n - m m t m t SYSTEM DESCRIPTION 4. Stability The output of a stable system settles back to the quiescent state (e.g., zero) when the input is removed The output of an unstable system continues, often with exponential growth, for an indefinite period when the input is removed 5. Causality Response (output) cannot occur before input is applied, ie., y(t) = 0 for t <0 THREE MAJOR PARTS Signal Representation and Analysis System Representation and Implementation Output Response Signal Representation and Analysis An analogy: How to describe people? (A) Cell by cell description – Detail but not useful and impossible to make comparison (B) Identify common features of different people and compare them. For example shape and dimension of eyes, nose, ears, face, etc.. Signals can be described by similar concepts: “Decompose into common set of components” Periodic Signal Representation – Fourier Series Ground Rule: All periodic signals are formed by sum of sinusoidal waveforms xt ) ao + an cos nwt + bn sin nwt 1 (1) 1 T/2 2 an xt ) cos nwtdt T T / 2 T/2 1 ao xt )dt T T / 2 (2) T/2 2 bn xt ) sin nwtdt T T / 2 (3) Fourier Series – Parseval’s Identity Energy is preserved after Fourier Transform 1 T/2 1 2 2 2 2 ) x t dt a + a + b o n T T / 2 2 1 n 1 1 ) (4) xt ) ao + an cos nwt + bn sin nwt xt ) dt T/2 2 T / 2 T/2 ao T / 2 xt )dt + an 1 T/2 T / 2 xt ) cos nwtdt + bn 1 T/2 T / 2 xt ) sin nwtdt Fourier Series – Parseval’s Identity 2 ) x t dt T / 2 T/2 T/2 ao T / 2 xt )dt + an 1 T/2 T / 2 xt ) cos nwtdt + bn 1 T T ao T + an + bn 2 1 2 1 2 T T ao T + an + bn 2 1 2 1 2 1 T/2 1 2 2 2 2 xt ) dt ao + a n + bn T T / 2 2 1 ) T/2 T / 2 xt ) sin nwtdt Periodic Signal Representation – Fourier Series -T/2 1 x(t) T/2 -t t -T/4 T/2 T/4 2 an xt ) cos nwtdt T T / 2 -1 t x(t) -T/2 to –T/4 -1 -T/4 to +T/4 +1 +T/4 to +T/2 -1 2 w T T /4 T /4 T /2 2 cos nwtdt + cos nwtdt cos nwtdt T T / 2 T / 4 T /4 T / 4 T /4 T /2 2 sin nwt sin nwt sin nwt + T nw T / 2 nw T / 4 nw T / 4 Periodic Signal Representation – Fourier Series x(t) 1 -t t -T/4 T/2 T/4 2 an xt ) cos nwtdt T T / 2 -1 t x(t) -T/2 to –T/4 -1 -T/4 to +T/4 +1 +T/4 to +T/2 -1 2 w T T / 4 T /4 T /2 2 sin nwt sin nwt sin nwt + T nw T / 2 nw T / 4 nw T / 4 4 nwT nwT sin sin nwT 4 nwT 2 8 Periodic Signal Representation – Fourier Series -t 2 w T x(t) 1 t -T/4 -1 T/4 4 nwT nwT an sin sin nwT 4 nwT 2 t x(t) -T/2 to –T/4 -1 -T/4 to +T/4 +1 +T/4 to +T/2 -1 8 zero for all n 4 n 2 sin sin n ) n 2 n 4 We have, ao 0, a1 , a2 0, a3 ,....... 3 4 Periodic Signal Representation – Fourier Series -t 2 w T x(t) 1 t -T/4 T/4 -1 t x(t) -T/2 to –T/4 -1 -T/4 to +T/4 +1 +T/4 to +T/2 -1 It can be easily shown that bn = 0 for all values of n. Hence, 4 1 1 1 xt ) coswt cos3wt + cos5wt cos7wt + .... 3 5 7 Only odd harmonics are present and the DC value is zero The transformed space (domain) is discrete, i.e., frequency components are present only at regular spaced slots. Periodic Signal Representation – Fourier Series -T/2 A x(t) T/2 -t t -/2 /2 t x(t) -/2 to –/2 A -T/2 to - /2 0 + /2 to +T/2 0 /2 1 1 A ao xt )dt Adt T T / 2 T / 2 T T/2 2 T2 2 2 an T xt )cosnwtdt TAcosnwtdt T 2 T 2 2 A sin nw 2 4A nw sin T nw nwT 2 2 2 w T Periodic Signal Representation – Fourier Series -T/2 A x(t) T/2 -t t -/2 /2 2 A sin nw 2 4A nw an sin T nw nwT 2 t x(t) -/2 to –/2 A -T/2 to - /2 0 + /2 to +T/2 0 2 w T 2 It can be easily shown that bn = 0 for all values of n. Hence, we have A 2 A xt ) + T T sin nw / 2) 1 nw / 2) cosnw Periodic Signal Representation – Fourier Series A 2 A xt ) + T T Note: sin y ) y 0 Hence: an 0 A for sin nw / 2) 1 nw / 2) cosnw y nw 2 k for nw 2k k nw 2 k 1,2 ,3 ,... T w 0 2 4