Digital Signal Processing Topic 2: Time domain

Slides:



Advertisements
Similar presentations
Lecture 3: Signals & Systems Concepts
Advertisements

Discrete-Time Linear Time-Invariant Systems Sections
AMI 4622 Digital Signal Processing
MM3FC Mathematical Modeling 3 LECTURE 3
Lecture 4: Linear Systems and Convolution
DT systems and Difference Equations Monday March 22, 2010
Lecture 6: Linear Systems and Convolution
About this Course Subject: Textbook Reference book Course website
Signals and Systems Lecture #5
Finite Impuse Response Filters. Filters A filter is a system that processes a signal in some desired fashion. –A continuous-time signal or continuous.
Discrete-time Systems Prof. Siripong Potisuk. Input-output Description A DT system transforms DT inputs into DT outputs.
Analysis of Discrete Linear Time Invariant Systems
Lecture 9 FIR and IIR Filter design using Matlab
Digital Signals and Systems
Discrete-Time and System (A Review)
Chapter 2 Discrete-Time Signals and Systems
1 Signals & Systems Spring 2009 Week 3 Instructor: Mariam Shafqat UET Taxila.
Chapter 2: Discrete time signals and systems
EE3010 SaS, L7 1/19 Lecture 7: Linear Systems and Convolution Specific objectives for today: We’re looking at continuous time signals and systems Understand.
Time Domain Representation of Linear Time Invariant (LTI).
DISCRETE-TIME SIGNALS and SYSTEMS
Time-Domain Representations of LTI Systems
Discrete-time Systems Prof. Siripong Potisuk. Input-output Description A DT system transforms DT inputs into DT outputs.
G Practical MRI 1 – 29 th January 2015 G Practical MRI 1 Introduction to the course Mathematical fundamentals.
Fourier Analysis of Discrete-Time Systems
BYST CPE200 - W2003: LTI System 79 CPE200 Signals and Systems Chapter 2: Linear Time-Invariant Systems.
Linear Time-Invariant Systems
COSC 3451: Signals and Systems Instructor: Dr. Amir Asif
1 Lecture 1: February 20, 2007 Topic: 1. Discrete-Time Signals and Systems.
Hossein Sameti Department of Computer Engineering Sharif University of Technology.
Department of Electrical and Computer Engineering Brian M. McCarthy Department of Electrical & Computer Engineering Villanova University ECE8231 Digital.
Dan Ellis 1 ELEN E4810: Digital Signal Processing Topic 3: Fourier domain 1.The Fourier domain 2.Discrete-Time Fourier Transform (DTFT) 3.Discrete.
EEE 503 Digital Signal Processing Lecture #2 : EEE 503 Digital Signal Processing Lecture #2 : Discrete-Time Signals & Systems Dr. Panuthat Boonpramuk Department.
CHAPTER 2 Discrete-Time Signals and Systems in the Time-Domain
1 Digital Signal Processing Lecture 3 – 4 By Dileep kumar
Discrete-Time Signals and Systems
Signal & Linear system Chapter 3 Time Domain Analysis of DT System Basil Hamed.
Course Outline (Tentative) Fundamental Concepts of Signals and Systems Signals Systems Linear Time-Invariant (LTI) Systems Convolution integral and sum.
4. Introduction to Signal and Systems
Time Domain Representation of Linear Time Invariant (LTI).
Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Neural Networks Laboratory Slide 1 DISCRETE SIGNALS AND SYSTEMS.
2/17/2007DSP Course-IUST-Spring Semester 1 Digital Signal Processing Electrical Engineering Department Iran University of Science & Tech.
DTFT continue (c.f. Shenoi, 2006)  We have introduced DTFT and showed some of its properties. We will investigate them in more detail by showing the associated.
Signals and Systems Analysis NET 351 Instructor: Dr. Amer El-Khairy د. عامر الخيري.
Signals and Systems Lecture #6 EE3010_Lecture6Al-Dhaifallah_Term3321.
3/18/20161 Linear Time Invariant Systems Definitions A linear system may be defined as one which obeys the Principle of Superposition, which may be stated.
What is filter ? A filter is a circuit that passes certain frequencies and rejects all others. The passband is the range of frequencies allowed through.
Description and Analysis of Systems Chapter 3. 03/06/06M. J. Roberts - All Rights Reserved2 Systems Systems have inputs and outputs Systems accept excitation.
Analysis of Linear Time Invariant (LTI) Systems
1 Computing the output response of LTI Systems. By breaking or decomposing and representing the input signal to the LTI system into terms of a linear combination.
Finite Impuse Response Filters. Filters A filter is a system that processes a signal in some desired fashion. –A continuous-time signal or continuous.
Prepared by:D K Rout DSP-Chapter 2 Prepared by  Deepak Kumar Rout.
In summary If x[n] is a finite-length sequence (n  0 only when |n|
Time Domain Representations of Linear Time-Invariant Systems
EENG 420 Digital Signal Processing Lecture 2.
Discrete Time Signal Processing Chu-Song Chen (陳祝嵩) Institute of Information Science Academia Sinica 中央研究院 資訊科學研究所.
Chapter 3 Time Domain Analysis of DT System Basil Hamed
Review of DSP.
In summary If x[n] is a finite-length sequence (n0 only when |n|
CEN352 Dr. Nassim Ammour King Saud University
Discrete-time Systems
Description and Analysis of Systems
UNIT V Linear Time Invariant Discrete-Time Systems
Signal and Systems Chapter 2: LTI Systems
Digital Signal Processing
Concept of frequency in Discrete Signals & Introduction to LTI Systems
Lecture 4: Linear Systems and Convolution
Lecture 3: Signals & Systems Concepts
Review of DSP.
Lecture 3 Discrete time systems
Presentation transcript:

Digital Signal Processing Topic 2: Time domain Discrete-time systems Convolution Linear Constant-Coefficient Difference Equations (LCCDEs) Correlation Based on: http://www.ee.columbia.edu/~dpwe/e4810/ By: Dan Ellis Saeid Rahati

1. Discrete-time systems A system converts input to output: E.g. Moving Average (MA): x[n] DT System y[n] y[n] = f (x[n]) x[n] y[n] + z-1 1/M x[n-1] x[n-2] (M = 3) Saeid Rahati

Moving Average (MA) n x[n] A x[n] y[n] + z-1 1/M x[n-1] x[n-2] n 3 4 5 6 7 8 9 A x[n] y[n] + z-1 1/M x[n-1] x[n-2] n x[n-1] -1 1 2 3 4 5 6 7 8 9 n x[n-2] -1 1 2 3 4 5 6 7 8 9 n y[n] -1 1 2 3 4 5 6 7 8 9 Saeid Rahati

MA Smoother MA smooths out rapid variations (e.g. “12 month moving average”) e.g. x[n] = s[n] + d[n] signal noise 5-pt moving average Saeid Rahati

Accumulator Output accumulates all past inputs: x[n] y[n] + z-1 y[n-1] Saeid Rahati

Accumulator n x[n] A n y[n-1] x[n] y[n] + z-1 y[n-1] n y[n] -1 1 2 3 4 5 6 7 8 9 A n y[n-1] -1 1 2 3 4 5 6 7 8 9 x[n] y[n] + z-1 y[n-1] n y[n] -1 1 2 3 4 5 6 7 8 9 Saeid Rahati

Classes of DT systems Linear systems obey superposition: if input x1[n]  output y1[n], x2  y2 ... given a linear combination of inputs: then output for all a, b, x1, x2 i.e. same linear combination of outputs x[n] DT system y[n] Saeid Rahati

Linearity: Example 1 Accumulator: Linear Saeid Rahati

Linearity Example 2: “Energy operator”: Nonlinear Saeid Rahati

Linearity Example 3: ‘Offset’ accumulator: but Nonlinear .. unless C = 0 Saeid Rahati

Property: Shift (time) invariance Time-shift of input causes same shift in output i.e. if x1[n]  y1[n] then i.e. process doesn’t depend on absolute value of n Saeid Rahati

Shift-invariance counterexample Upsampler: L Not shift invariant Saeid Rahati

Another counterexample scaling by time index Hence If then Not shift invariant - parameters depend on n ≠ Saeid Rahati

Linear Shift Invariant (LSI) Systems which are both linear and shift invariant are easily manipulated mathematically This is still a wide and useful class of systems If discrete index corresponds to time, called Linear Time Invariant (LTI) Saeid Rahati

Causality If output depends only on past and current inputs (not future), system is called causal Formally, if x1[n]  y1[n] & x2[n]  y2[n] Causal Saeid Rahati

Causality example Moving average: y[n] depends on x[n-k], k ≥ 0  causal ‘Centered’ moving average .. looks forward in time  noncausal Can sometimes make a non-causal system causal by delaying its output Saeid Rahati

Impulse response (IR) Impulse (unit sample sequence) d[n] -1 1 2 3 4 5 6 7 -2 -3 Impulse (unit sample sequence) Given a system: if x[n] = d[n] then y[n] = h[n] LSI system completely specified by h[n] x[n] DT system y[n] ∆ “impulse response” Saeid Rahati

Impulse response example x[n] y[n] + z-1 a2 a3 Simple system: n x[n] -1 1 2 3 4 5 6 7 -2 -3 x[n] = d[n] impulse n y[n] -1 1 2 3 4 5 6 7 a1 -2 -3 a2 a3 y[n] = h[n] impulse response Saeid Rahati

2. Convolution Impulse response: Shift invariance: + Linearity: Can express any sequence with ds: x[n] = x[0]d[n] + x[1]d[n-1] + x[2]d[n-2].. d[n] LSI h[n] d[n-n0] LSI h[n-n0] a·d[n-k] + b·d[n-l] a·h[n-k] + b·h[n-l] LSI Saeid Rahati

Convolution sum Hence, since For LSI, written as Summation is symmetric in x and h i.e. l = n – k  Convolution sum * * * Saeid Rahati

Convolution properties LSI System output y[n] = input x[n] convolved with impulse response h[n]  h[n] completely describes system Commutative: Associative: Distributive: x[n] h[n] = h[n] x[n] * (x[n] * h[n]) * y[n] = x[n] * (h[n] * y[n]) h[n] (x[n] + y[n]) = h[n] x[n] + h[n] y[n] * Saeid Rahati

Interpreting convolution Passing a signal through a (LSI) system is equivalent to convolving it with the system’s impulse response x[n] h[n] y[n] = x[n] h[n] * n -1 1 2 3 4 5 6 7 -2 -3 h[n] = {3 2 1} n -1 1 2 3 5 6 7 -2 -3 x[n]={0 3 1 2 -1} Saeid Rahati

Convolution interpretation 1 k -1 1 2 3 5 6 7 -2 -3 x[k] Time-reverse h, shift by n, take inner product against fixed x k -1 1 2 3 4 5 6 7 -2 -3 h[0-k] k -1 1 2 3 4 5 6 7 -2 -3 h[1-k] n -1 1 2 3 5 7 -2 -3 y[n] 9 11 -1 1 2 3 4 5 6 7 -2 -3 h[2-k] k Saeid Rahati

Convolution interpretation 2 -1 1 2 3 5 6 7 -2 -3 x[n] h[k] n -1 1 2 3 4 6 7 -2 -3 x[n-1] Shifted x’s weighted by points in h Conversely, weighted, delayed versions of h ... k -1 1 2 3 4 5 6 7 -2 -3 x[n-2] n -3 -2 -1 1 2 3 4 5 7 n -1 1 2 3 5 7 -2 -3 y[n] 9 11 Saeid Rahati

Matrix interpretation Diagonals in X matrix are equal Saeid Rahati

Convolution notes Total nonzero length of convolving N and M point sequences is N+M-1 Adding the indices of the terms within the summation gives n : i.e. summation indices move in opposite senses Saeid Rahati

Convolution in MATLAB The M-file conv implements the convolution sum of two finite-length sequences If then conv(a,b) yields M Saeid Rahati

Connected systems Cascade connection: Impulse response h[n] of the cascade of two systems with impulse responses h1[n] and h2[n] is By commutativity, * * Saeid Rahati

Inverse systems d[n] is identity for convolution i.e. Consider h2[n] is the inverse system of h1[n] x [ n ] d = * x[n] y[n] z[n] z [ n ] = h 2 y 1 x * = x [ n ] if * Saeid Rahati

Inverse systems Use inverse system to recover input x[n] from output y[n] (e.g. to undo effects of transmission channel) Only sometimes possible - e.g. cannot ‘invert’ h1[n] = 0 In general, attempt to solve * Saeid Rahati

Inverse system example Accumulator: Impulse response h1[n] = m[n] ‘Backwards difference’ .. has desired property: Thus, ‘backwards difference’ is inverse system of accumulator. Saeid Rahati

Parallel connection Impulse response of two parallel systems added together is: Saeid Rahati

3. Linear Constant-Coefficient Difference Equation (LCCDE) General spec. of DT, LSI, finite-dim sys: Rearrange for y[n] in causal form: WLOG, always have d0 = 1 defined by {dk}, {pk} order = max(N,M) Saeid Rahati

Solving LCCDEs “Total solution” Complementary Solution satisfies Particular Solution for given forcing function x[n] Saeid Rahati

Complementary Solution General form of unforced oscillation i.e. system’s ‘natural modes’ Assume yc has form Characteristic polynomial of system - depends only on {dk} Saeid Rahati

Complementary Solution factors into roots li , i.e. Each/any li satisfies eqn. Thus, complementary solution: Any linear combination will work  ais are free to match initial conditions Saeid Rahati

Complementary Solution Repeated roots in chr. poly: Complex lis  sinusoidal Saeid Rahati

Particular Solution Recall: Total solution Particular solution reflects input ‘Modes’ usually decay away for large n leaving just yp[n] Assume ‘form’ of x[n], scaled by b: e.g. x[n] constant  yp[n] = b x[n] = l0n  yp[n] = b · l0n (l0  li) or = b nL+1 l0n (l0  li) Saeid Rahati

LCCDE example Need input: x[n] = 8m[n] y[n] + z-1 -1 + z-1 6 Need input: x[n] = 8m[n] Need initial conditions: y[-1] = 1, y[-2] = -1 Saeid Rahati

LCCDE example Complementary solution: a1, a2 are unknown at this point roots l1 = -3, l2 = 2 Saeid Rahati

LCCDE example Particular solution: Input x[n] is constant = 8m[n] assume yp[n] = b, substitute in: (‘large’ n) Saeid Rahati

LCCDE example Total solution Solve for unknown ais by substituting initial conditions into DE at n = 0, 1, ... n = 0 from ICs Saeid Rahati

LCCDE example n = 1 solve: a1 = -1.8, a2 = 4.8 Hence, system output: Don’t find ais by solving with ICs at n = -1,-2 (ICs may not reflect natural modes) Saeid Rahati

LCCDE solving summary Difference Equation (DE): Ay[n] + By[n-1] + ... = Cx[n] + Dx[n-1] + ... Initial Conditions (ICs): y[-1] = ... DE RHS = 0 with y[n]=ln  roots {li} gives complementary soln Particular soln: yp[n] ~ x[n] solve for bl0n “at large n” ais by substituting DE at n = 0, 1, ... ICs for y[-1], y[-2]; yt=yc+yp for y[0], y[1] Saeid Rahati

LCCDEs: zero input/zero state Alternative approach to solving LCCDEs is to solve two subproblems: yzi[n], response with zero input (just ICs) yzs[n], response with zero state (just x[n]) Because of linearity, y[n] = yzi[n]+yzs[n] Both subproblems are ‘real’ But, have to solve for ais twice (then sum them) Saeid Rahati

Impulse response of LCCDEs i.e. solve with x[n] = d[n]  y[n] = h[n] (zero ICs) With x[n] = d[n], ‘form’ of yp[n] = 0  just solve yc[n] for n = 0,1... to find ais d[n] LCCDE h[n] Saeid Rahati

LCCDE IR example e.g. (from before); x[n] = d[n]; y[n] = 0 for n<0 thus 1 n ≥ 0 Infinite length Saeid Rahati

System property: Stability Certain systems can be unstable e.g. Output grows without limit in some conditions x[n] y[n] + z-1 2 n y[n] -1 1 2 3 4 ... Saeid Rahati

Stability Several definitions for stability; we use Bounded-input, bounded-output (BIBO) stable For every bounded input output is also subject to a finite bound, Saeid Rahati

Stability example MA filter:  BIBO Stable Saeid Rahati

Stability & LCCDEs LCCDE output is of form: as and bs depend on input & ICs, but to be bounded for any input we need |l| < 1 Saeid Rahati

Cross correlation of x against y Correlation ~ identifies similarity between sequences: Note: Cross correlation of x against y “lag” call m = n - l Saeid Rahati

Correlation and convolution Hence: Correlation may be calculated by convolving with time-reversed sequence * * Saeid Rahati

Autocorrelation Autocorrelation (AC) is correlation of signal with itself: Note: Energy of sequence x[n] Saeid Rahati

Correlation maxima Note: Similarly: From geometry, when x//y, cosq = 1, else cosq < 1 angle between x and y Saeid Rahati

AC of a periodic sequence Sequence of period N: Calculate AC over a finite window: if M >> N Saeid Rahati

AC of a periodic sequence i.e AC of periodic sequence is periodic Average energy per sample or Power of x Saeid Rahati

What correlations look like [ ] l xx AC of any x[n] AC of periodic Cross correlation l r [ ] l x ˜ x ˜ l r [ l ] xy l Saeid Rahati

What correlation looks like Saeid Rahati