1 Digital Signal Processing DiscreteTime Systems Dr. Dung Trung Vo Telecommunication Divisions Department of Electrical and Electronics September, 2013 InputOutput Rules Discretetime system: is a processor that transforms an input sequence of discretetime samples x(n) into an output sequence of samples y(n): Samplebysample processing: Block processing methods: Functional mapping: Linear systems: this mapping becomes a linear transformation x0, x1, x2, x3,..., xn,...Hy0, y1, y2, y3,..., yn,... y Hx y Hx CuuDuongThanCong.com https:fb.comtailieudientucntt2 Example 1: y(n)= 2x(n), samplebysample processing Example 2: y(n)= 2x(n)+3x(n − 1)+4x(n − 2), block processing Example 3: y(n)= x(2n) InputOutput Rules x0, x1, x2, x3,...,H2x0,2x1,2x2,2x3,..., x0, x1, x2, x3, x4, x5, x6,...Hx0, x2, x4, x6,... Linear system: has the property that the output signal due to a linear combination of two or more input signals can be obtained by forming the same linear combination of the individual outputs. if y1(n) and y2(n) are the outputs due to the inputs x1(n) and x2(n), then the output due to the linear combination of inputs is given by the linear combination of outputs Testing linearity: Linearity and Time Invariance x(n) a1x1(n) a2x2(n) y(n) a1y1(n) a2 y2(n) CuuDuongThanCong.com https:fb.comtailieudientucntt3 Example 4: Test the linearity of the discretetime systems defined by and Linearity and Time Invariance y(n) 2x(n)3 y(n) x2(n) Time Invariance system: is a system that remains unchanged over time. This implies that if an input is applied to the system today causing a certain output to be produced, then the same output will also be produced tomorrow if the same input is applied Right translation: Testing time invariance: delaying the input causes the output to be delayed by the same amount: Linearity and Time Invariance CuuDuongThanCong.com https:fb.comtailieudientucntt4 Example 5: Test the time invariance of the discretetime systems defined by and Linearity and Time Invariance y(n) nx(n) y(n) x(2n) Impulse response of an LTI system: Linear timeinvariant systems are characterized uniquely by their impulse response sequence h(n), which is defined as the response of the system to a unit impulse δ(n). Transform function: Samplebysample processing: Impulse Response (n) Hh(n) 0, 0 1, 0 ( ) if n if n n 1,0,0,0,...Hh0,h1,h2,h3,... CuuDuongThanCong.com https:fb.comtailieudientucntt5 Delayed impulse responses: time invariance implies Impulse Response (n D) Hh(n D) Impulse response of an LTI system: linearity implies Arbitrary input: {x(0), x(1), x(2), . . . } can be thought of as the linear combination of shifted and weighted unit impulses: Its output: Impulse Response (n)(n 1)(n 2) Hh(n) h(n 1) h(n 2) y(n) x(0)h(n) x(1)h(n 1) x(2)h(n 2)... x(n) x(0)(n) x(1)(n 1) x(2)(n 2)... CuuDuongThanCong.com https:fb.comtailieudientucntt6 LTI form of convolution: Summation could extend over negative values of m, depending on the input signal. Direct form of convolution: Impulse Response m y(n) x(m)h(n m) m y(n) h(m)x(n m) FIR: has impulse response h(n) that extends only over a finite time interval, say 0 ≤ n ≤ M, and is identically zero beyond that Filter order: M Filter length: length of the impulse response vector h = h0 , h1, . . . , hM Impulse response coefficients: h = h0 , h1, . . . , hM are referred to by various names, such as filter coefficients, filter weights, or filter taps FIR filtering equation: FIR and IIR Filters M m y n h m x n m 0 ( ) ( ) ( ) L M 1 h h0,h1,h2,h3,...,hM ,0,0,0,... CuuDuongThanCong.com https:fb.comtailieudientucntt7 IIR: has an impulse response h(n) of infinite duration, defined over the infinite interval 0 ≤ n < ∞ IIR filtering equation: Constant coefficient linear difference equations: This IO equation is not computationally feasible. Therefore, we must restrict our attention to a subclass of IIR filters, namely, those filter coefficients are coupled to each other through constant coefficient linear difference equations: Difference equation for y(n): FIR and IIR Filters 0 ( ) ( ) ( ) m y n h m x n m L i i M i h n aih n i b n i 1 1 ( ) ( ) ( ) L i i M i y n ai y n i b x n i 1 1 ( ) ( ) ( ) Example 6: Determine the impulse response h of the following FIR filters FIR and IIR Filters ) ( ) ( ) ( 4) ) ( ) 2 ( ) 3 ( 1) 5 ( 2) 2 ( 3) b y n x n x n a y n x n x n x n x n CuuDuongThanCong.com https:fb.comtailieudientucntt8 Example 7: Determine the IO difference equation of an IIR filter whose impulse response coefficients h(n) are coupled to each other by the difference equation FIR and IIR Filters h(n) h(n 1)(n) Example 8: Suppose the filter coefficients h(n) satisfy the difference equation where a is a constant. Determine the IO difference equation relating a general input signal x(n) to the corresponding output y(n). FIR and IIR Filters h(n) ah(n 1)(n) CuuDuongThanCong.com https:fb.comtailieudientucntt9 Causal signal: A causal or rightsided signal x(n) exists only for n ≥ 0 and vanishes for all negative times n ≤ −1 Anticausal signal: An anticausal or leftsided signal exists only for n ≤ −1 and vanishes for all n ≥ 0. Mixed signal: A mixed or doublesided signal has both a leftsided and a rightsided part LTI systems can also be classified in terms of their causality properties depending on whether their impulse response h(n) is causal, anticausal, or mixed Causality Description: a system is stable if the output remains bounded by some bound |y(n)| ≤ B if its input is bounded, say |x(n)| ≤ A. Necessary and sufficient condition: Stability is absolutely essential in hardware or software implementations of LTI systems because it guarantees that the numerical operations required for computing the IO convolution sums or the equivalent difference equations remain well behaved and never grow beyond bounds. The concepts of stability and causality are logically independent, but are not always compatible with each other Stability n h(n) CuuDuongThanCong.com https:fb.comtailieudientucntt10 Example 9: Consider the following four examples of h(n): Stability Homework: provided in class Stability CuuDuongThanCong.com https:fb.comtailieudientucntt
Trang 1Digital Signal Processing Discrete-Time Systems
Dr Dung Trung Vo Telecommunication Divisions Department of Electrical and Electronics
September, 2013
Input/Output Rules
Discrete-time system:is a processor that transforms an input sequence of discrete-time samples x(n) into an output sequence of samples y(n):
Sample-by-sample processing:
Block processing methods:
Functional mapping:
Linear systems: this mapping becomes a linear transformation
0, 1, 2, 3, , , H 0, 1, 2, 3, , n,
x x x x
x H
y
Hx
y
Example 1: y(n)= 2x(n), sample-by-sample processing
Example 2:y(n)= 2x(n)+3x(n − 1)+4x(n − 2), block processing
Example 3:y(n)= x(2n)
Input/Output Rules
x0, x1, x2, x3, , H 2 x0, 2 x1, 2 x2, 2 x3, ,
x0, x1, x2, x3, x4, x5, x6, H x0, x2, x4, x6,
Linear system: has the property that the output signal due to a linear combination of two or more input signals can be obtained by forming the same linear combination of the individual outputs if y1(n) and y2(n) are the outputs due
to the inputs x1(n) and x2(n), then the output due to the linear combination of inputs
is given by the linear combination of outputs
Testing linearity:
Linearity and Time Invariance
) ) ) a x1n a x2n n
) ) ) a y1n a y2n n
Trang 2Example 3.2.1:Test the linearity of the discrete-time systems defined by
and
Solution: the output due to the linear combination will be
is not equal to the linear combination of each input
So it is not a linear system
Similarly, for the quadratic system
Linearity and Time Invariance
2 3 ) 2
) x n a x1n a x2n
n
y
) 3 ) 2 ( ) 3 ) 2 ( )
y
a
3
)
2
) x n
n
n x n
) ) x2n n
2 1 2
2n ) a x n ) a x n ) a x n )
x
Time Invariance system: is a system that remains unchanged over time This implies that if an input is applied to the system today causing a certain output to be produced, then the same output will also be produced tomorrow if the same input is applied
Right translation:
Testing time invariance: delaying the input causes the output to be delayed by the same amount:
Linearity and Time Invariance
Example 3.2.2:Test the time invariance of the discrete-time systems defined by
and
Solution:
Delaying the input signal
Delaying the output signal
Thus, the system is not time-invariant
Similarly, for system y(n)= x(2n)
Thus, the downsampler is not time-invariant
Linearity and Time Invariance
) ( ) ) nx n nx n D n
) ) ( ) ( ( )
) 2 ( ) 2 (
n
) ) 2 ( )) ( 2 ( )
)
) nx n
n
y y n ) x ( 2 n ) Impulse response of an LTI system:characterized uniquely by their impulse response sequence h(n), which is defined as Linear time-invariant systems are
the response of the system to a unit impulse δ(n)
Transform function:
Sample-by-sample processing:
Impulse Response
)
n H
0 , 0 0 , 1 )
n if n if n
1 , 0 , 0 , 0 , H h0, h1, h2, h3,
Trang 3 Delayed impulse responses:time invariance implies
Impulse Response
) ( ) ( n D H n D
Impulse response of an LTI system:linearity implies
Arbitrary input: {x(0), x(1), x(2), } can be thought of as the linear combination of shifted and weighted unit impulses:
Its output:
Impulse Response
) 2 ( ) 1 ( ) ) 2 ( ) 1 ( ) n n n n n
) 2 ( 2 ( ) 1 ( 1 ( ) ) 0 ( ) x n x n x n
n y
) 2 ( 2 ( ) 1 ( 1 ( ) ) 0 (
n
LTI form of convolution:
Summation could extend over negative values of m, depending on the input signal
Direct form of convolution:
Impulse Response
m
m n m x
n
m
m n x m h
n
FIR:has impulse response h(n) that extends only over a finite time interval, say 0
≤ n ≤ M, and is identically zero beyond that
Filter order: M
Filter length: length of the impulse response vector h = [h0, h1, , hM]
Impulse response coefficients: h = [h0, h1, , hM] are referred to by various names, such as filter coefficients, filter weights, or filter taps
FIR filtering equation:
FIR and IIR Filters
M
m
m n x m h n y
0
) ( ( )
1
M
Lh
h0, h1, h2, h3, , hM, 0 , 0 , 0 ,
Trang 4 IIR:has an impulse response h(n) of infinite duration, defined over the infinite
interval 0 ≤ n < ∞
IIR filtering equation:
Constant coefficient linear difference equations: This I/O equation is not
computationally feasible Therefore, we must restrict our attention to a subclass of
IIR filters, namely, those filter coefficients are coupled to each other through
constant coefficient linear difference equations:
Difference equation for y(n):
FIR and IIR Filters
0
) ( ( )
m
m n x m h n
y
i i M
i
i n i b n i a
n
1 1
) ( ) (
i i M
i
iy n i b x n i a
n
y
1 1
) ( ) ( )
Example 1: Determine the impulse response h of the following FIR filters
Solution: impulse response coefficients
Unit impulse as input, x(n)= δ(n):
FIR and IIR Filters
) 4 ( ) ) )
) 3 ( 2 ) 2 ( 5 ) 1 ( 3 ) 2 ) )
n x n x n y b
n x n x n x n x n y a
, , , , 1 , 0 , 0 , 0 , 1
)
2 , 5 , 3 , 2 , , , )
4 3 2 1 0 3 2 1 0
h h h h h h b
h h h h h a
) 4 ( ) ) )
) 3 ( 2 ) 2 ( 5 ) 1 ( 3 ) 2 ) )
n n n b
n n n n n a
Example 2: Determine the I/O difference equation of an IIR filter whose impulse
response coefficients h(n) are coupled to each other by the difference equation
Solution: Setting n = 0, we have h(0)= h(−1)+δ(0)= h(−1)+1 Assuming causal
initial conditions, h(−1)= 0, we find h(0)= 1 For n > 0, the delta function vanishes,
δ(n)= 0, and therefore, the difference equation reads h(n)= h(n−1)
Convolutional I/O equation:
Recursive difference equation
FIR and IIR Filters
0 0
) ( ) ( ( )
m m
m n x m n x m h n
y
) ) 1 ( )
) 3 ( ) 2 ( ) 1 ( ) )
n x n y n
y
n x n x n x n x n
y
) ) 1 (
n
0 , 0 0 , 1 ) )
n if n if n n
Example 3: Suppose the filter coefficients h(n) satisfy the difference equation
where a is a constant Determine the I/O difference equation relating a general input signal x(n) to the corresponding output y(n)
Solution: filter coefficients
I/O difference equation
FIR and IIR Filters
) ) 1 (
) ) 1 ( )
) 3 ( ) 2 ( ) 1 ( ) )
) 3 ( ) 2 ( ) 1 ( ) )
2 3 2
n x n ay n y
n x a n ax n x a n x n y
n x a n x a n ax n x n y
0 , 0 0 , ) )
n if n if a n a n
n n
Trang 5 Causal signal: A causal or right-sided signal x(n) exists only for n ≥ 0 and
vanishes for all negative times n ≤ −1
Anti-c ausal signal : An anticausal or left-sided signal exists only for n ≤ −1 and
vanishes for all n ≥ 0
Mixed signal:A mixed or double-sided signal has both a left-sided and a
right-sided part
LTI systems can also be classified in terms of their causality properties depending
on whether their impulse response h(n) is causal, anticausal, or mixed
Causality
Description: a system is stable if the output remains bounded by some bound
|y(n)| ≤ B if its input is bounded, say |x(n)| ≤ A
Necessary and sufficient condition:
Stability is absolutely essential in hardware or software implementations of LTI systems because it guarantees that the numerical operations required for computing the I/O convolution sums or the equivalent difference equations remain well behaved and never grow beyond bounds
The concepts of stability and causality are logically independent, but are not always compatible with each other
Stability
n
n
h ) (
Example 4: Consider the following four examples of h(n):
Solution:
Stability
5 0 1 5 0 5 0 2 )
2 )
2 5 0 )
5 0 1 1 5 0 )
1 1 0
1 1
m n n
n n
n
n n
m m n
n n
n
n n
n
n
n
n
Homework: 3.1, 3.2, 3.3, 3.4, 3.6
Stability