Vous êtes sur la page 1sur 119

COURSE:

DIGITAL SIGNAL TRANSFORMS &


APPLICATIONS

Instructor: Hoang Le Uyen Thuc


Electronic and Telecommunication Engineering Department
Danang University of Technology
hoangleut@yahoo.com
Where are you now?
Where will you go to?

Digital Signal
Transforms & DSP FINAL PROJECT
Applications
CT Signals
& Systems
You are here
Goals

1. To provide students the basic digital signal


transforms such as Z-transform, Discrete-Time
Fourier Transform and Discrete Fourier Transform
and their applications in analysis and synthesis of
DSP systems
2. To equip students the basic 2D transforms using in
image processing
Grading

1. Homework: 30%
 Submit right before the examination
2. Exam: 70%
 Things can be brought into the exam. room: pen/pencils,
ruler, eraser, clock, calculator, white drafts, two A4
papers
 Each paper is two-side personal writing
 Exam. duration: 60 minutes
Textbooks and References
Textbook: John G.Proakis & Dimitris G. Manolakis - Digital signal
processing - Prentice Hall, New Jersey 2006
References:
[1] Nguyễn Quốc Trung - Xử lý tín hiệu & lọc số Tập 1- NXB Khoa
học & kỹ thuật, Hà Nội 2001
[2] Joyce Van de Vegte - Fundamentals of Digital Signal
Processing - Prentice Hall 2002
[3] Vinay K.Ingle & John G.Proakis - Digital Signal Processing
using Matlab - Book Ware Companion Series 2007
Schedule:

 Chapter 1: Digital Signals and Systems (5 hrs)


 Chapter 2: Z-transforms and applications (5 hrs)
 Chapter 3: Discrete-time Fourier Transform and applications (5
hrs)
 Chapter 4: Discrete Fourier Transform and applications (5 hrs)
 Chapter 5: 2D Transforms and application in image processing (5
hrs)
 Review and class discussion (5 hrs)
CHAPTER 1:
DIGITAL SIGNALS & SYSTEMS

Lesson #1: A big picture about Digital Signal Processing


Lesson #2: Digital signals
Lesson #3: Digital systems
Duration: 5 hrs
Lecture #1: A big picture about
Digital Signal Processing

 Duration: 1 hr
 Outline:
1. Signals
2. Digital Signal Processing (DSP)
3. Why DSP?
4. DSP applications
Signals

 Function of independent variables such as time, distance,


position, temperature
 Convey information
 Examples:
1D signal: speech, music, biosensor…
2D signal: image
2.5D signal: video (2D image + time)
3D signal: animated
1-D signals
EEG

ECG

Speech signal
Color image
2-D image signals

Binary image Grey image Color image


2.5-D video signals
3-D animated signals
What is Digital Signal Processing?

 Represent a signal by a sequence of numbers (called a


"discrete-time signal” or "digital signal").
 Modify this sequence of numbers by a computing process
to change or extract information from the original signal
 The "computing process" is a system that converts one
digital signal into another— it is a "discrete-time system” or
"digital system“.
 Transforms are tools using in computing process
Discrete-time signal vs.
continuous-time signal

 Continuous-time signal:
- define for a continuous duration of time
- sound, voice…
 Discrete-time signal:
- define only for discrete points in time (hourly, every
second, …)
- an image in computer, a MP3 music file
- amplitude could be discrete or continuous
- if the amplitude is also discrete, the signal is digital.
Analog signal vs. digital signal

00 10 00 10 11

Analog signal Digital signal


Scheme for the Digital Signal Processing
of an analog signal
Digital Signal Processing
Implementation

Performed by:
 Special-purpose (custom) chips: application-specific integrated
circuits (ASIC)
 Field-programmable gate arrays (FPGA)
 General-purpose microprocessors or microcontrollers (µP/µC)
 General-purpose digital signal processors (DSP processors)
 DSP processors with application-specific hardware (HW)
accelerators
Digital Signal Processing
implementation
Digital Signal Processing
Implementation

 Use basic operations of addition,


multiplication and delay
 Combine these operations to accomplish
processing: a discrete-time input signal 
another discrete-time output signal
Two main categories of DSP

Digital Signals

- feature extraction - noise removal


- signal recognition - interference
- signal modeling removal
........ ……
Analysis Filtering

Measurement Digital Signals


Signal Analysis and Filtering

Digital Signals

Transforms:
 FIR
 ZT
Analysis Filtering  IIR
 DTFT
 Adaptive filters
 DFT/FFT

Measurement Digital Signals


Advantages of Digital
Signal Processing

 Flexible: re-programming ability


 More reliable
 Smaller, lighter  less power
 Easy to use, to develop and test (by using the
assistant tools)
 Suitable to sophisticated applications
 Suitable to remote-control applications
Limitations of Digital Signal
Processing

 Aliasing in sampling: taking samples at intervals and don’t


know what happens in between  can’t distinguish higher
and lower frequencies  avoid: sampling theory
Limitations of Digital Signal
Processing
 Quantization error: due to the limited number of bit
available  smoothly varying signal represented by stepped
waveform  limited precision in data storage and arithmetic
DSP applications - radar
DSP applications - biomedical

 Analysis of biomedical signals, diagnosis, patient


monitoring, preventive health care
DSP applications – speech compression
DSP applications

 Speech recognition:
DSP applications - communication

Digital telephony: transmission of information in


digital form via telephone lines, modern technology,
mobile phone
DSP applications – image processing

Image enhancement: processing an image to be more


suitable than the original image for a specific application

It makes all the difference whether one sees darkness through


the light or brightness through the shadows
David Lindsay
DSP applications – image processing

Image compression: reducing the redundancy in the


image data
DSP applications – image processing

Image restoration: reconstruct a degraded image using a


priori knowledge of the degradation phenomenon
DSP applications- music

Recording, encoding, storing

Playback
Manipulation/mixing
DSP applications- finger print recognition
Lecture #2
Digital (DT) Signals

 Duration: 2 hrs
 Outline:
1. Representations of DT signals
2. Some elementary DT signals
3. Classification of DT signals
4. Simple manipulations of DT signals
Sampled signals

Converting a CT signal into a DT signal by sampling: given xa(t) to


be a CT signal, xa(nT) is the value of xa(t) at t = nT  DT signal is
defined only for n an integer

-2T -T 0 T 2T 3T 4T 5T 6T 7T . . . nT

x a (t ) = x a (nT) ≡ x (n ), − ∞ < n < ∞


t = nT
Representations of DT signals

1. Functional representation
1, n = 1,3

x[n ] = 4, n = 2
0, n ≠

2. Tabular representation

n 9 -1 0 1 2 3 49
x[n] 9 0 0 1 4 1 09
Representations of DT signals

3. Sequence representation

{ }
x[n] = 0 , 1 , 4 , 1

4. Graphical representation 4

1 1

-1 0 1 2 3 4 5 n
Some elementary DT signals

1. Unit step sequence


2. Unit impulse signal
3. Sinusoidal signal
4. Exponential signal
Unit step

1, n ≥ 0
u[n] = 
0, n < 0

1 1 1

-1 0 1 2 3 4 5 6 n
Time-shifted unit step

1, n ≥ n 0
u[n − n 0 ] = 
0, n < n 0

1 1 1

-n0-1 n0 n0+1 n
Unit impulse

1, n = 0
δ [ n] = 
0, n ≠ 0

-2 -1 0 1 2 3 n
Time-shifted unit impulse

1, n = n 0
δ[n − n 0 ] = 
0, n ≠ n 0
1

n0-1 n0 n0+1 n
Relation between unit step and
unit impulse

n
u[n ] = ∑ δ[k ]
k = −∞

δ[n ] = u[ n ] − u[n − 1]
x[n ]δ[n − n 0 ] = x[ n 0 ]δ[ n − n 0 ]

∑ x[n ]δ[n − n
n = −∞
0 ] = x[n 0 ]
Sinusoidal signal
x (n ) = A cos(Ω n + θ), − ∞ < n < +∞
= A cos(2πFn + θ), − ∞ < n < +∞

1.5

0.5

-0 . 5

-1

-1 . 5
-2 0 -1 5 -1 0 -5 0 5 10 15 20
Exponential signal

x[n ] = Ca n
1. If C and a are real, then x[n] is a real exponential
a > 1  growing exponential
0 < a < 1  shrinking exponential
-1 < a < 0  alternate and decay
a < -1  alternate and grows
2. If C or a is complex, then x[n] is a complex exponential
Exponential signal - Example
 1 π
 − + j n
x[n] = 2e  12 6 

Real part
2

-1

-2
0 5 10 15 20 25 30 35 40

Imaginary part
2

-1
0 5 10 15 20 25 30 35 40
Exponential signal - Example

x[n] = (0.2)(1.2) n

120

100

80
Amplitude

60

40

20

0
0 5 10 15 20 25 30 35
Tim e index n
Classification of DT signals

 Periodic and aperiodic signals


 Symmetric (even) and antisymmetric (odd) signals
 Energy and power signals
Periodic and Aperiodic signals

 Periodic signals: important, both for practical


reasons and for mathematical analysis
 DT sinusoidal signal is periodic only if its frequency f
is rational number
Examples

Determine which of the signals below are periodic. For the ones that
are, find the fundamental period and fundamental frequency
j π6 n
x1[n] = e

x2 [n] = sin( 35π n + 1)

x3 [n] = cos(2n − π )
Even and Odd signals

 Any DT signal can be expressed as the sum of an even signal and


an odd signal

Even : xe [n] = xe [−n]


Odd : xo [n] = − xo [−n] xe [n] = 12 ( x[n] + x[−n])

xo [n] = 12 ( x[n] − x[−n])

x[n] = xe [n] + xo [n]


Examples
 Given x[n] = [ 1 1 2 2 0 1 2 2 ]
 Find xe[n] and xo[n]
Energy and Power signals

∑ x[n ]
2
 Define the signal energy: E=
n = −∞

N
1
Define the signal power:

2

P = lim x[ n ]
N →∞ 2 N + 1
n =− N

 E is finite  x[n] is called an energy signal


 E is finite  P = 0
 E is infinite  P maybe finite or infinite. If P is finite and
nonzero  x[n] is called power signal
Examples

 Determine which of the signals below are energy signals?


Which are power signals?
(a) Unit step

(1 / 2) n , n ≥ 0
(b) x[n ] =  n
(2) , n < 0

π 
(c) x[ n ] = cos n (u[ n ] − u[ n − 4])
4 
Simple manipulations of DT
signals

 Transformation of time:
- Time shifting
- Time scaling
- Time reversal
 Adding and subtracting signals
Time shifting a DT signal

x[n]  x[n - k]; k is an integer

 k > 0: right-shift x[n] by |k| samples


(delay of signal)
 k < 0: left-shift x[n] by |k| samples
(advance of signal)
Examples of time shifting

4
x[n]
1 1

-1 0 1 2 3 4 5 n

x[n+2] x[n-2]
4 4

1 1 1 1

-2 -1 0 1 2 n 0 1 2 3 4 5 n
Time scaling a DT signal

x[n]  x[an]

 |a| > 1: speed up by a factor of a


a must be an integer
 |a| < 1: slow down by a factor of a
a = 1/K; K must be an integer
Examples of time scaling

4
x[n]
1 1

-1 0 1 2 3 4 5 n

x[2n] x[2n+1]
4

-1 0 1 2 n -1 0 1 2 n
Examples of time scaling

4 n x[n] y[n]=x[n/2]
x[n]
1 1 0 0 0
1 1 ??
1/2
-1 0 1 2 3 4 5 n
2 4 1
3 1 ??
1/2

How do we find y[1] and y[3]??

One solution is linear interpolation used in a simple


compression scheme
Time reversal a DT signal

x[n]  x[-n]

Flip a signal about the vertical axis


Examples of time reversal

4
x[n]
1 1

-1 0 1 2 3 4 5 n

4 x[-n]

1 1

-5 -4 -3 -2 -1 0 1 n
Combining time reversal and
time shifting

x[n]  x[-n-k]

Method 1: Flip first, then shift


Method 2: Shift first, then flip
Examples of combining time
reversal and time shifting

4
x[n]
x[-n+1]??
1 1

-1 0 1 2 3 4 5 n
Examples of combining time
reversal and time shifting

4
x[n]
x[-n-1]??
1 1

-1 0 1 2 3 4 5 n
Combining time shifting and
time scaling

x[n]  x[an-b]

Be careful!!!
To make sure, plug values into the table to check
Examples of combining time
scaling and time shifting

4 y[n] = x[2n-3]??
x[n]
1 1 n x[n] y[n]
-1 0 1 2 3 4 5 n -1 0 0
0 0 0
y[n] 1 1 0
1 1 2 4 1
3 1 1
-1 0 1 2 3 4 5 n
4 0 0
Adding and Subtracting signals

 Do it “point by point”
 Can do using a table, or graphically, or by
computer program
 Example: x[n] = u[n] – u[n-4]

n <=-1 0 1 2 3 >=4
x[n] 0 1 1 1 1 0
Exercise

 Find x[ n] = (u[ n + 1] − u[ n − 5])( nu[2 − n])

x[n]
2
1

-1
-1 0 1 2 3 4 5 n
HW

Prob.1 The following graph is of signal x[n].


Plot the following:
a) 3x[-n+1]
b) x[2n] - 1
c) –x[n] + 2
d) x[2n+1]
HW

Prob.2 Sometimes signals can be decomposed into combinations of


simple unit sequences such as this one:

Sketch y[n] and the following signals:


a) 2-3y[n]
b) 3y[n-2]
c) 2-2y[-2+n]
HW

Prob.3
Decompose y[n] from Prob. 2 into its even and odd parts. Plot
these signals and show the symmetries of the plots that can be
used to visually verify their parity
Lecture #3
DT systems

 Duration: 2 hrs
 Outline:
1. Input-output description of systems
2. DT system properties
3. LTI systems
Input-output description of DT systems

Think of a DT system as an operator on DT signals:

• It processes DT input signals, to produce DT output signals

• Notation: y[n] = T{x[n]}  y[n] is the response of the


system T to the excitation x[n]

• Systems are assumed to be a “black box” to the user


Example
Determine the response of the following system to the unit
impulse signal 1 1 1
y[n ] = y[n − 1] + x[n ] + x[n − 1]
4 2 2
1 1 1
y[0] = y[ −1] + δ [0] + δ [ −1] = 1 / 2
4 2 2
1 1 1
y[1] = y[0] + δ [1] + δ [0] = 1 / 4 + 1 / 2 = 5 / 8
4 2 2
1 1 1
y[2] = y[1] + δ [2] + δ [1] = (1 / 4)(5 / 8)
4 2 2
............................
n −1
y[n] = (1 / 2)δ [n] + (1 / 4) (5 / 8)u[n − 1]
DT system properties

• Memory

• Invertibility

• Causality

• Stability

• Linearity

• Time-invariance
Memory

 y[n0] = f(x[n0])  system is memoryless


 Otherwise, system has memory, meaning that its output
depends on inputs rather than just at the time of the output

 Ex:
a) y[n] = x[n] + 5
b) y[n]=(n+5)x[n]
c) y[n]=x[n+5]
Invertibility

Ti[T(x[n])] = x[n]

x[n] x[n]
T() Ti()

System Inverse system


Examples for invertibility

Determine which of the systems below are invertible

a) Unit advance y[n] = x[n+1]

n
b) Accumulator y[n] = ∑ x[k ]
k = −∞

c) Rectifier y[n] = |x[n]|


Causality

 The output of a causal system (at each time) does not


depend on future inputs
 All memoryless systems are causal
 All causal systems can have memory or not
Examples for causality

Determine which of the systems below are causal:

a) y[n] = x[-n]

b) y[n] = (n+1)x[n-1]

c) y[n] = x[(n-1)2]

d) y[n] = cos(w0n+x[n])

e) y[n] = 0.5y[n-1] + x[n-1]


Stability

 If a system “blow up” it is not stable


In particular, if a “well-behavior” signal (all values have
finite amplitude) results in infinite magnitude outputs,
the system is unstable
 BIBO stability: “bounded input – bounded output” –
if you put finite signals in, you will get finite signals out
Examples for stability

Determine which of the systems below are BIBO stable:

a) A unit delay system

b) An accumulator

c) y[n] = cos(x[n])

d) y[n] = ln(x[n])

e) y[n] =exp(x[n])
Linearity

Scaling signals and adding them, then processing through the system
same as
Processing signals through system, then scaling and adding them

If T(x1[n]) = y1[n] and T(x2[n]) = y2[n]


 T(ax1[n] + bx2[n]) = ay1[n] + by2[n]
Time-invariance

 If you time shift the input, get the same output, but with the
same time shift
 The behavior of the system doesn’t change with time

If T(x[n]) = y[n]
then T(x[n-n0]) = y[n-n0]
Examples for linearity and
time-invariance

Determine which of the systems below are linear, wich


ones are time-invariant
a) y[ n] = nx[ n]
Examples for linearity and
time-invariance

Determine which of the systems below are linear, wich


ones are time-invariant
b) y[n ] = x [n ]
2
Examples for linearity and
time-invariance

Determine which of the systems below are linear, wich


ones are time-invariant
M
c) y[n] = ∑ br x[n − r ]
r =0
HW
Prob.4 Which systems are linear? Which ones are time-invariant?
a ) y[n] = sin( x[n])
b) y[n] = cos(Ω 0 n + x[n])
c) y[n] = x[2n]
d ) y[n] = x[n]u[n]
n
e) y[n] = ∑ x[k ]
k = −∞
n
f) y[n] = ∑ x[k ]
k =0
HW
Prob.5 For the following systems:
Prove or disprove that they are: n

 Memoryless a) y[n] = ∑ x[a + k ], a ∈ Ζ


k =− n
Invertible
y[n] = x(e|n| )

b)
Causal
y[n] = 0.5 x[n] + 0.5 x[n − 1]

c)
 Stable M −1

 Time-invariant d) y[n] = ∑ x[n − k ], M ∈ Ζ


k = −0
 Linear
Computing the response of DT LTI
systems to arbitrary inputs

Method 1: based on the direct solution of the input-output equation


for the system

Method 2:

• Decompose the input signal into a sum of elementary signals


• Find the response of system x[n] = ∑ ck xk [n]
to each elementary signal k

• Add those responses to obtain xk [ n ] → yk [ n]


the total response of the system x[n] → y[n] = ∑ ck yk [n]
to the given input signal k
DT convolution formula

Convolution: an operation between the input signal to a


system and its impulse response, resulting in the output signal

In CT systems: convolution of 2 signals involves integrating


the product of the 2 signals – where one of signals is flipped
and shifted

In DT systems: convolution of 2 signals involves summing


the product of the 2 signals – where one of signals is flipped
and shifted
Impulse representation of DT
signals

We can describe any DT signal x[n] as: x[n] = ∑ x[k ]δ [n − k ]
k =−∞
Example: x[n]

-1 0 1 2 3 n

x[0]δ[n-0] + x[1]δ[n-1] + x[2]δ[n-2]

-1 0 1 2 n -1 0 1 2 n -1 0 1 2 n
Impulse response of DT systems

Impulse response: the output results, in response to a unit


impulse

Denotation: hk[n]: impulse response of a system, to an impulse


at time k

δ[n] Time-invariant h[n]


DT system

δ[n-k] Time-invariant h[n-k]


DT system
Response of LTI DT systems to
arbitrary inputs

δ[n-k] LTI DT system h[n-k]

∞ ∞

x[n] = ∑ x[k ]δ [n − k ] y[n] = ∑ x[k ]h[n − k ]


k = −∞
k =−∞
LTI DT system
Convolution sum

Notation: y[n] = x[n] * h[n]


Convolution sum properties

 Commutative law
 Associative law
 Distributive law
Commutative law

x[n] * h[n] = h[n] * x[n]

h[n]
x[n] y[n]

x[n]
h[n] y[n]
Associative law

( x[n] * h1[n]) * h2 [n] = x[n] * (h1[n] * h2 [n])

h1[n] h2[n]
x[n] y[n]

h1[n]*h2[n]
x[n] y[n]

h2[n] h1[n]
x[n] y[n]
Distributive law

x[n] * (h1[n] + h2 [n]) = ( x[n] * h1[n]) + ( x[n] * h2 [n])

h1[n] + h2[n]
x[n] y[n]

h1[n]

x[n] y[n]

h2[n]
Computing the convolution sum

y[n] = ∑ x[k ]h[n − k ]
k = −∞

Suppose to compute the output y[n] at time n = n0.

1. Fold h[k] about k = 0, to obtain h[-k]

2. Shift h[-k] by n0 to the right (left) if n0 is positive (negative),


to obtain h[n0-k]

3. Multiply x[k] and h[n0-k] for all k, to obtain the product


x[k].h[n0-k]

4. Sum up the product for all k, to obtain y[n0]

Repeat from 2-4 fof all of n


The length of the convolution
sum result

y [ n ] = x[ n ] ∗ h[ n ] = ∑
k = −∞
x [ k ] h[ n − k ]

Suppose:
Length of x[k] is Nx  N1 ≤ k ≤ N1 + Nx – 1
Length of h[n-k] is Nh  N2 ≤ n-k ≤ N2 + Nh – 1
 N1 + N2 ≤ n ≤ N1 + N2 + Nx + Nh – 2

Length of y[n]:

Ny = Nx + Nh – 1
Examples for computing the
convolution sum
Ex1. Find y[n] = x[n]*h[n] where

x[ n] = u[n + 1] − u[ n − 3] + δ [ n] h[n] = 2 ( u[n] − u[n − 3])

x[n]

-1 0 1 2 3
h[n]
n
-1 0 1 2 3
Ex1 (cont.)

x[k] h[k] h[-k]

-1 0 1 2 3 k -1 0 1 2 3 k -2 -1 0 1 k

h[-1-k] h[1-k] h[2-k]

-4 -3 -2 -1 0 k -2 -1 0 1 2 k -1 0 1 2 k

y[n<-1] = 0; y[-1] = 2; y[0] = 6; y[1] = 8;


y[2] = 8; y[3] = 4; y[4] = 2; y[n>4] = 0
Examples for computing the
convolution sum
Ex2. Find y[n] = x[n]*h[n] where x[ n] = a u[ n] h[ n] = u[ n]
n

1. Do it graphically
2. Use convolution formula
Examples for computing the
convolution sum
Ex3. Find y[n] = x[n]*h[n] where x[n] = bnu[n] and h[n] = anu[n+2]
|a| < 1, |b| < 1, a ≠ b
DT LTI properties based on
impulse response

1. Memoryless system: h[n] = Kδ[n]

2. Invertible system: h[n]*hi[n] = δ[n]

3. Causal system: h[n] is zero for all time n<0

4. BIBO stable system:


+∞

∑ h[n]
n = −∞
< ∞
Examples of DT LTI properties

1. What is the inverse of h[n] = 3δ[n+5]?

2. Is h[n] = 0.5nu[n] BIBO stable? Causal?

3. Is h[n] = 3nu[n] BIBO stable? Causal?

4. Is h[n] = 3nu[-n] BIBO stable? Causal?


HW

Prob.6 Find y[n] = x[n]*h[n] where:


a) x[n] = anu[n] and h[n] = u[n] – u[n-10]
b) x[n] = u[-n] and h[n] = anu[n-2], |a|<1
c) x[n] = 2δ[n+2] + 2δ[n+1] + 2δ[n-1] + 2δ[n-2] + 2δ[n-3] + 2δ[n-4]
and h[n] = δ[n] – δ[n-1] + δ[n-2]
d) x[n] = u[-n+2] and h[n] = anu[-n]
e) x[n] = 0.2nu[n] and h[n] = δ[n] – 0.2δ[n-1]
HW
Prob.7 Consider the LTI system with the input and output related by: y[n] = 0.5x[n-1] + 0.7x[n]
a) Find the impulse response h[n]
b) Is this system causal? Stable? Why?
c) Determine the system response y[n] for the input shown in Fig. (a)
d) Consider the interconnections of the LTI systems given in Fig. (b). Find the impulse
response of the total system
e) Solve for the response of the system of part (d) for the input of part (c)
HW

Prob.8 Determine the causality and the BIBO stability for the
systems with the following impulse responses:
a) h[n] = sin(-n)u[n]
b) h[n] = e-nu[-n]
c) h[n] = enu[n]
d) h[n] = sin(n)u[-n]
e) h[n] = ne-nu[n]
f) h[n] = e-nsin(n)u[n]
LTI systems characterized by linear
constant coefficient difference
equations
General form:

y[n] + a1 y[n − 1] + ... + a  y[n −  ] = b0 x[n] + b1 x[n − 1] + ... + bM x[n − M ]

N M
⇔ ∑ a k y[n − k ] = ∑ b r x[n − r ], a 0 = 1
k =0 r =0

N, M: non-negative integers
N: order of equation
ak, br: constant real coefficients
Recursive solution of
difference equations

1) Put y[n] on the left hand side by itself

y[n] = -a1y[n-1] - … - aNy[n-N] + b0x[n] + … + bMx[n-M]

2) To calculate a given output at time n = n0, that is y[n0], we add


the weighted M+1 inputs b0x[n0] + … + bMx[n0-M] to the
weighted N past outputs –a1y[n0-1] - … - aNy[n0-N]

3) Increase the time index to n = n0+1 and recursively calculate the


next output. This can continue forever.

To start this recursion somewhere, for example at n0 = 0, we need to


know the N initial conditions y[n0-1], y[n0-2], …, y[n0-N]
Example of recursive solution
the difference equation

Solve iteratively to find the 1st 3 terms of y[n] – 2y[n-1] = x[n-1]


with initial condition y[-1] = 10 and with the input x[n] = 2u[n]
Closed form solutions of
difference equations

Total response = zero-input component + zero-state component


= natural response + forced response
= complementary response + particular response

1. Find the complementary response, assume input = 0.


2. Find the particular response, assume all initial conditions = 0. Choose
the form of the particular response same as the form of input
3. Total response = complementary + particular. Use initial conditions
to find N constants from the complementary response
Example for closed form
solutions

Given y[n] – 0.3y[n-1] = x[n] with y[-1] = 0 and x[n] = (0.6)n


Example (cont)

Combining particular and complementary solutions:


HW

Prob.9 Determine the response y[n] for n≥0 of the system


described by the following equation:
y[n] -0.7y[n-1] + 0.1y[n-2] = x[n] – 3x[n-1]
The input is x[n] = (-1)n and y[-2] = 29/9, y[-1] = 7/9

Vous aimerez peut-être aussi