Signals and Systems [Ch – 01] Introduction to Signals and Systems Instructor: Engr. Furqan Haider DEE, NUST College of E & ME Signals and Systems About myself !! Where you can find me: 1st floor, DEE E-mail: furqan_haider31@yahoo.com Mobile Contact: CR can ask after the class. Best way to contact me: Come and talk to me during discussion hours. Research Interests: Wireless Communication, Fiber Optics Communication and Acoustic Systems. DEE, NUST College of E & ME Signals and Systems Course Organization Course Folder link: https://www.dropbox.com/sh/rek9gj0e313dzb6/AACDg2WZ5cEQRT3jv3dcRiWa?dl=0 Visit the folder frequently For further details please see the course outline DEE, NUST College of E & ME Signals and Systems Grading Policy Grading Policy Quizzes (4 ~ 6) Assignments (4 ~ 6) Lab+Project Midterm Final DEE, NUST College of E & ME 7.5% 7.5% 25% 22.5% 37.5% 100 % Signals and Systems Text & Reference Books Text book: Signals and Systems, 2nd edition by Alan V. Oppenheim, Alan S. Willsky with S. Hamid Nawab. Reference Book(s): Signal Processing First by James H. McClellan, Mark A. Yoder, and Ronald W. Schafer. DEE, NUST College of E & ME Signals and Systems Pre-Requisite EE-211 Electrical Network Analysis MATH-121 Linear Algebra and ODEs DEE, NUST College of E & ME Signals and Systems Helpful Hints!! Read each and every word of the text book--Very Important Participate actively in the class Do not miss any lecture Do not be late in the class Try to apply the theory in the lab Do not get behind. You are encouraged to work with other students but avoid plagiarism. Work in groups, whenever appropriate. However, Assignments and Quizzes must be attempted alone. No plagiarism will be tolerated. Do the end problems of each chapter by yourself. We will not proceed until everybody says “YES”. Interrupt me during the lecture if I forget to deal with these 2 questions: Why? and How? DEE, NUST College of E & ME Signals and Systems A big WHY? Why studying this course ? DEE, NUST College of E & ME Signals and Systems A big HOW? TOOLS required to perform analysis of Signals & Systems? DEE, NUST College of E & ME Signals and Systems Grading Rules Assignment Submission on time: graded out of 100% Assignment Submission (1 day late): graded out of 70% Assignment Submission (2 days late): graded out of 50% No Assignment / Project will be accepted after 2 days. Only ONE make-up QUIZ in last week of the semester. (whether you have missed one or more quizzes throughout the semester). DEE, NUST College of E & ME Signals and Systems What is expected from you? Prepare the agendas of Monday & Wednesday class on weekly basis (You will do relevant End Problems by yourself – seek my help if necessary). Expect a quiz on each Wednesday. DEE, NUST College of E & ME Signals and Systems 1. COURSE OUTLINE Introduction, Types of Signals Motivation, Applications, Signal Classification CT, DT, Analog, Digital, Deterministic, Random, Periodic, aperiodic; Even & Odd signal decomposition Signal Transformations/Signal Fundamentals Signal Transformations Fundamental signals : Complex Exponentials; Decaying exponentials; sinusoids; Unit Impulse; Unit Step Signal representation using fundamental signals System Classification Continuous/Discrete ; Analog/Digital Linear/Nonlinear ; Time-invariant/Time varying; Causal/Anti-causal; Stable/Unstable CH-01 CH-01 CH-01 LTI Systems Theory Intro to LTI Systems, Impulse response as system characterization LTI System Properties, Linearity, Convolution (CT and DT) Difference equations for LTI system CH-02 Fourier Series Frequency domain view of LTI systems, Concept of complex frequency Fourier series representation of CT periodic signals (CTFS), Properties of CTFS Fourier series representation of DT periodic signals (DTFS), Properties of DTFS CH-03 Continuous Time Fourier Transform (CTFT) FT of continuous time aperiodic signals, Properties of CTFT Fourier Transform of periodic signals CH-04 Discrete Time Fourier Transform (DTFT) FT of discrete time aperiodic signals, Properties of DTFT CH-05 CH-07 Introduction to Sampling Time Domain and frequency domain description; Nyquist criterion Aliasing; Under/Over sampling Laplace transform (LT) Convergence of CTFT and motivation of Laplace transform, Properties of LT Pole-zero plots; Filter design by pole zero placement (time permitting) DEE, NUST College of E & ME CH-09 Signals and Systems CHAPTER – 1 INTRODUCTION TO SIGNALS AND SYSTEMS DEE, NUST College of E & ME Signals and Systems What is a Signal? A description of how one parameter is related to another parameter Examples of signal include: Electrical signals : Voltages and currents in a circuit Acoustic signals: Acoustic pressure (sound) over time Mechanical signals: Velocity of a car over time Video signals: Intensity level of a pixel (camera, video) over time DEE, NUST College of E & ME Signals and Systems How is a Signal Represented? Mathematically, signals are represented as a function of one or more independent variables. For instance a black & white video signal intensity is dependent on x, y coordinates and time t f(x,y,t) On this course, we shall be exclusively concerned with signals that are a function of a single variable: time f(t) t Signal The Speech Signal The ECG Signal DEE, NUST College of E & ME Signals and Systems Signal The image DEE, NUST College of E & ME Signals and Systems Signal The image DEE, NUST College of E & ME Signals and Systems Signal It is the variation pattern that conveys the information, in a signal Signal may exist in many forms like acoustic, image, video, electrical, heat & light signal DEE, NUST College of E & ME Signals and Systems Example: Signals in an Electrical Circuit R v (t ) v (t ) i (t ) vs i C vc c R dv (t ) i (t ) C c dt dvc (t ) 1 1 vc (t ) vs (t ) dt RC RC The signals vc and vs are patterns of variation over time Step (signal) vs at t=1 RC = 1 First order (exponential) response for vc vs, vc + - s t Note, we could also have considered the voltage across the resistor or the current as signals Continuous-time signals A value of signal exists at every instant of time Independent variable t Independent variable Discrete-time signals The value of signal exists only at equally spaced discrete points in time t Independent variable t Independent variable DEE, NUST College of E & ME Signals and Systems Discrete-time signals Why to discretize ? How to discretize ? How closely spaced are the samples Distinction between discrete & digital signals How to denote discrete signals Is image a discrete or continuous signal The image is generally considered to be a continuous variable Sampling can however be used to obtain a discrete, two dimensional signal (sampled image) DEE, NUST College of E & ME Signals and Systems Notation A continuous-time signal has independent variable xt (time) in parentheses () t A discrete-time signal is represented by enclosing the independent variable in square brackets [] xn n DEE, NUST College of E & ME Signals and Systems Continuous & Discrete-Time Signals Continuous-Time Signals Most signals in the real world are continuous time, as the scale is infinitesimally fine e.g x(t) voltage, velocity, Denote by x(t), where the time interval may be bounded (finite) or infinite Discrete-Time Signals t Some real world and many digital signals are discrete time, as they are sampled e.g. pixels, daily stock price (anything that a digital computer processes) Denote by x[n], where n is an integer value that x[n] varies discretely Sampled continuous signal x[n] =x(nk) , where k is sample time DEE, NUST College of E & ME n Signals and Systems Types of Signals Particular interest in signals with certain properties: Periodic signals: a signal that repeats itself after a fixed period T, i.e. x(t) = x(t+T) for all t. e.g. A sin(t). Even and odd signals: even if x(-t) = x(t), and odd if x(-t) = -x(t). Examples are cos(t) and sin(t) signals. Exponential and sinusoidal signals: a signal is (real) exponential if it can be represented as x(t) = Ceat. The same example is (complex) exponential C and a are complex. Step and Impulse signals: A pulse signal is one which is nearly completely zero, apart from a short spike, δ(t). A step signal is zero up to a certain time, and then a constant value after that time, u(t). DEE, NUST College of E & ME Signals and Systems Odd and Even Signals An even signal is identical to its time reversed signal, i.e. it can be reflected in the origin and is equal to the original: x( t ) x(t ) Examples: x(t) = cos(t) An odd signal is identical to its negated, time reversed signal, i.e. it is equal to the negative reflected signal x( t ) x (t ) Examples: x(t) = sin(t) This is important because any signal can be expressed as the sum of an odd signal and an even signal. DEE, NUST College of E & ME Signals and Systems Exponential and Sinusoidal Signals Exponential and sinusoidal signals are characteristic of realworld signals and also from a basis (a building block) for other signals. A generic complex exponential signal is of the form: x(t ) Ce at where C and a are, in general, complex numbers. Lets investigate some special cases of this signal Real exponential signals Exponential growth Exponential decay a0 a0 C 0 C 0 DEE, NUST College of E & ME Signals and Systems Periodic Complex Exponential & Sinusoidal Signals Consider when a is purely imaginary: x(t ) Ce jw0t By Euler’s relationship, this can be expressed as: cos(1) e jw0t cosw0t j sin w0t This is a periodic signals because: e jw0 (t T ) cosw0 (t T ) j sin w0 (t T ) cosw0t j sin w0t e jw0t when T=2p/w0 A closely related signal is the sinusoidal signal: x(t ) cosw0t w0 2pf 0 We can always use: A cosw0t A e j (w0t ) A sinw t Ae 0 DEE, NUST College of E & ME j (w0t ) T0 = 2p/w0 T0 is the fundamental time period w0 is the fundamental frequency Signals and Systems General Complex Exponential Signals So far, considered the real and periodic complex exponential Now consider when C can be complex. Let us express C is polar form and a in rectangular form: C C e j a r jw0 So Using Euler’s relation These are damped sinusoids Ce at C e j e( r jw0 )t C e rt e j (w0 )t Ce at C e j e( r jw0 )t C e rt cos((w0 )t ) j C e rt sin((w0 )t ) DEE, NUST College of E & ME 30/25 Signals and Systems Discrete Unit Impulse and Step Signals The discrete unit impulse signal is defined: 0 n 0 x[n] [n] 1 n 0 Useful as a basis for analyzing other signals The discrete unit step signal is defined: 0 n 0 x[n] u[n] 1 n 0 Note that the unit impulse is the first difference (derivative) of the step signal [n] u[n] u[n 1] Similarly, the unit step is the running sum (integral) of the unit impulse. DEE, NUST College of E & ME Signals and Systems Continuous Unit Impulse and Step Signals The continuous unit impulse signal is defined: 0 t 0 x(t ) (t ) t 0 Note that it is discontinuous at t=0 The arrow is used to denote area, rather than actual value Again, useful for an infinite basis The continuous unit step signal is defined: t x(t ) u (t ) ( )d 0 t 0 x(t ) u (t ) 1 t 0 DEE, NUST College of E & ME Signals and Systems Sinusoidal signal : x(t) = 10cos(2π(440)t - 0.4π) DEE, NUST College of E & ME Signals and Systems Recording of a Tuning fork signal: Fig 2-3 DEE, NUST College of E & ME Signals and Systems MATLAB Demo of Tuning Fork % TuningFork t = 0:.0001:.01; y = 10*cos(2*pi*1000*t-0.4*pi); plot(t,y) grid pause; t = 0:.0001:1; y = 10*cos(2*pi*1000*t-0.4*pi); sound (y) DEE, NUST College of E & ME Signals and Systems x(t) = 20cos(2π(40)t - 0.4π) DEE, NUST College of E & ME 36 Signals and Systems x(t) = 5cos(2πfot) for different values of fo DEE, NUST College of E & ME Signals and Systems What is a System? Systems process input signals to produce output signals Examples: A circuit involving a capacitor can be viewed as a system that transforms the source voltage (signal) to the voltage (signal) across the capacitor A CD player takes the signal on the CD and transforms it into a signal sent to the loud speaker A communication system is generally composed of three sub-systems, the transmitter, the channel and the receiver. The channel typically attenuates and adds noise to the transmitted signal which must be processed by the receiver DEE, NUST College of E & ME Signals and Systems System An entity that responds to a signal input system output Examples Circuit DEE, NUST College of E & ME Signals and Systems System The camera Image The Speech Recognition System Identified DEE, NUST College of E & ME Signals and Systems System The audio CD-player Block Diagram representation of a system Visual representation of a system Input Signal system Output Signal Shows inter-relations of many signals involved in the implementation of a complex system Look at everything around and try to identify the signals and systems !! DEE, NUST College of E & ME Signals and Systems How is a System Represented? A system takes a signal as an input and transforms it into another signal Input signal x(t) System Output signal y(t) In a very broad sense, a system can be represented as the ratio of the output signal over the input signal That way, when we “multiply” the system by the input signal, we get the output signal This concept will be firmed up in the coming weeks DEE, NUST College of E & ME Signals and Systems Example: An Electrical Circuit System R vs i vc C Simulink representation of the electrical circuit vs(t) vc(t) first order system DEE, NUST College of E & ME vs, vc + - vs (t ) vc (t ) R dv (t ) i (t ) C c dt dvc (t ) 1 1 vc (t ) vs (t ) dt RC RC i (t ) t Signals and Systems Continuous & Discrete-Time Models Continuous-Time Systems Most continuous time systems represent how continuous signals are transformed via differential equations. e.g. circuit, car velocity Discrete-Time Systems Most discrete time systems represent how discrete signals are transformed via difference equations e.g. bank account, discrete car velocity system DEE, NUST College of E & ME dvc (t ) 1 1 vc (t ) vs (t ) dt RC RC m dv(t ) v(t ) f (t ) dt First order differential equations y[n] 1.01y[n 1] x[n] First order difference equations Signals and Systems Continuous and discrete time system Like signals we have continuous and discrete-time systems as well xt system y t xt yt xn system yn xn yn DEE, NUST College of E & ME Signals and Systems Continuous and discrete time system Examples of continuous and discrete-time systems Squaring System xt xt 2 2 y t x t Differentiator System y t d xt dt Accumulator System yn n xk k DEE, NUST College of E & ME Signals and Systems Transformations Transformations of the independent variable Time Shift xn 3 xn n xt xt 4 4 DEE, NUST College of E & ME n t 8 Signals and Systems t Transformations Time reversal x n xn n n xt x t t DEE, NUST College of E & ME t Signals and Systems Transformations xt Time scaling 2 2 t x2t 1 1 t xt / 2 4 DEE, NUST College of E & ME 4 t Signals and Systems Transformations 1 Example 3 2 1 1 3 2 1 xt 0 1 2 3 4 1 2 3 4 2 3 4 t x t 0 t x2 t / 2 3 2 DEE, NUST College of E & ME 1 0 1 t Signals and Systems Properties of a System Memory: Memoryless (Resistor in V-I relationship, identity system), Memory(V-I relation of a Capacitor, Accumulator) Invertible: output = input (e.g 2x(t) and 1/2x(t)) (y(t)= x2(t) is not invertible) Causal: a system is causal if the output at a time, only depends on input values up to that time. Stability: small inputs lead to responses that do not diverge Linear: a system is linear if the output of the scaled sum of two input signals is the equivalent scaled sum of outputs Time-invariance: a system is time invariant if the system’s output is the same, given the same input signal, regardless of time. DEE, NUST College of E & ME Signals and Systems LINEARITY Check • Interchanging the operations result in same output, so, SYSTEM is LINEAR DEE, NUST College of E & ME Signals and Systems Time-Invariance Check • Interchanging the operations does not result in same output, so, SYSTEM IS NOT TIME-INVARIANT. DEE, NUST College of E & ME Signals and Systems How Are Signal & Systems Related? How to design a system to process a signal in particular ways? Design a system to restore or enhance a particular signal Remove high frequency background communication noise Enhance noisy images from spacecraft Assume a signal is represented as x(t) = d(t) + n(t) Design a system to remove the unknown “noise” component n(t), so that y(t) d(t) x(t) = d(t) + n(t) DEE, NUST College of E & ME System ? y(t) d(t) Signals and Systems How Are Signal & Systems Related? How to design a system to extract specific pieces of information from signals Estimate the heart rate from an electrocardiogram Estimate economic indicators (bear, bull) from stock market values Assume a signal is represented as: x(t) = g(d(t)) Design a system to “invert” the transformation g(), so that y(t) = d(t) x(t) = g(d(t)) DEE, NUST College of E & ME System ? y(t) = d(t) = g-1(x(t)) Signals and Systems How Are Signal & Systems Related? How to design a (dynamic) system to modify or control the output of another (dynamic) system Control an aircraft’s altitude, velocity, heading by adjusting throttle, rudder, ailerons Control the temperature of a building by adjusting the heating/cooling energy flow. Assume a signal is represented as: x(t) = g(d(t)) Design a system to “invert” the transformation g(), so that y(t) = d(t) x(t) DEE, NUST College of E & ME dynamic system ? y(t) = d(t) Signals and Systems Phase Shift and Time Shift DEE, NUST College of E & ME Signals and Systems Phase Shift is Ambiguous DEE, NUST College of E & ME Signals and Systems Practice with sinusoid DEE, NUST College of E & ME Signals and Systems Solution DEE, NUST College of E & ME Signals and Systems Sinusoid from a Plot DEE, NUST College of E & ME Signals and Systems DEE, NUST College of E & ME Signals and Systems Lecture 1: Summary Signals and systems are important for: Electrical circuits Physical models and control systems Digital media (music, voice, photos, video) Study of signals and systems helps in: Design systems to remove noise/enhance measurement from audio and picture/video data Investigate stability of physical structures Control the performance of mechanical and electrical devices This will be the foundation for studying systems and signals as a generic subject in this course. DEE, NUST College of E & ME Signals and Systems