Professional Documents
Culture Documents
Signals_Systems-04 Discrete Time Signals and Systems
Signals_Systems-04 Discrete Time Signals and Systems
• DICRETE TIME
TRANSFORMATIONS
• STABILITY OF SYSTEMS
DICRETE TIME SIGNALS
x(t ) x(nT ) x[n]
s (t )
Train of impulses
Mosfet transistors
(electronic switches)
Sampling is a process in
which an analog signal x(t)
is converted into discrete
capacitor form. It may be an
electronic switch as shown.
OPAMP
OPAMP
x[1]
x[0] These samples cant be used
x[2] to restore the original signal
x[1]
The sampled signal x[n] in
case Fs=1000Hz (Ts=1msec) x[3]
is used n
x[0] x[2]
NYQUIST’S CRITERION
• For audio signals, which we can hear, Fs=44100Hz is a standard. This number was
chosen since 44100 is equal to the product of the squares of the first four prime
numbers, that is 44100=22 *32 *52 *72. Therefore it is divisible by many integer
numbers.
• Various fractions of 44.1kHz are used in practice. For example 11.025kHz and
22.05kHz are used in WAV files. Also 88.2kHz and 176.4kHz are used in DVD-
Audio.
Summary
The noise
Noise is an undesired random disturbance that exists in
a signal
The frequency spectrum of thermal noise involves all frequencies from zero
to infinity. It was discovered by John B. Johnson and Harry Nyquist in 1926. Example:
Let R=1000Ω ;
In electronic circuits, this noise can be modelled as a voltage source in series T= 27°C+273=300 ;
with the resistor as indicated in the figure. f 104 Hz
Calculation:
The strength of noise can be calculated by using a formula
Vrms 4*1.38*1023 *300 *1000*104
0.407 *106 V 0.407 μV
Vrms 4k BTRf : The rms value of the thermal noise
k B 1.38*1023 : Boltzmann constant
T Celsius+273 : Kelvin Scale temperature
R : The resistance
f : Frequency interval (band)
Colors of noise
White noise
Pink noise
A noise whose frequency spectrum has higher
energies at low frequencies is called ‘pink
noise’.
Blue noise
fmax=440;
Fs=20*fmax;Ts=1/Fs;
n=[0:Fs/fmax*3];
x=3*sin(2*pi*fmax*n*Ts);
r=rand(1,numel(x))-0.5;
The noise signal r[n]
subplot(3,1,1);
bar(n,x,'r','barwidth',0.1);
xlim([-1 n(end)]);ylim([-4 4]);
subplot(3,1,2);
bar(n,r,'r','barwidth',0.1);
xlim([-1 n(end)]);ylim([-4 4]);
x[n]+r[n]
subplot(3,1,3);
bar(n,x+r,'r','barwidth',0.1);
xlim([-1 n(end)]);ylim([-4 4]);
TRANSFORMATIONS OF
DISCRETE TIME SIGNALS
The z-transform
DTFT : Discrete-Time Fourier Transform
Useful identities
1
1 r r 2 ... ; ( r <1)
1 r
1 r N 1
1 r r ... r
2 N
1 r
1
1 2r 3r 2 4r 3 ... ; ( r <1)
(1 r ) 2
r2 r3 r4
r ... ln(1 r ) ; ( r <1)
2 3 4
Special functions
• Impulse function: It is denoted by δ[n]
-2 -1 0 1 2 3 4 5 6 n
1 1 1 1 1 1 1
-2 -1 0 1 2 3 4 5 6 n
Question: Prove that [n] 1
Answer:
[n]e
n
j n
... 0 0 1 0 0 0 ... 1
1
Question: Prove that [n]
1 e j
Answer:
1
[n]e
n
j n
= ... 0 0 1 e j +e j 2 +e j 3 +...=
1 e j
cos( n)[n]e
n
j n
1
2 e
n
i n
[n]e j n
1
2 e
n
i n
[n]e j n
1 1
1
12
2
1 e j ( ) 1 e j ( )
1 1
Question: Prove that sin( n) [ n] 1
21j
2j
1 e j ( ) 1 e j ( )
Answer:
sin( n)[n]e
n
j n
1
2j e
n
i n
[n]e j n
1
2j e
n
i n
[n]e j n
1 1
1
21j
2j
1 e j ( ) 1 e j ( )
Table of DTFT transformations
x[n] X (e j )
[n k ] e ik
1
[ n]
1 e j
1
n [ n]
1 e j
1
(n 1) n [n]
(1 e j ) 2
1 1
cos(an) [n] 1
1
2
1 e j ( a ) 2 1 e j ( a )
1 1
sin(an) [n] 1
21j
2j
1 e j ( a ) 1 e j ( a )
DTFT Table of Properties
x[n] X (e j )
x[n k ] e jk X (e j )
e j n x[n] X (e j ( ) )
k
x[k ]h[n k ] X (e j ) H (e j )
x[n]
h[n]
y[n] x[n] h[n] x[k ]h[n k ]
k
Proofs of properties
x[n ] e j j
X (e ) Proof:
n
x[n ]e j n
m
x[m]e j ( m ) e j
m k
x[m]e j m e j X (e j )
e j n x[n] X (e j ( ) ) Proof:
n
e j n x[n]e j n x[n]e
n
j ( ) n
X (e j ( ) )
j n
x[k ]h[n k ] X (e j
) H (e )j
Proof: x[k ]h[n k ] e x[k ] h[n k ]e j n
k n k k n
x[k ]e
k
j k
H (e j
) x[k ]e
k
j k
H (e j ) X (e j ) H (e j )
Question: Find X(ejω) if x[n]=2δ[n]+3δ[n-1]
Answer: X (e j ) 2 3e j
Answer: X (e j ) e j 2 e j 2 2 cos
Answer: Y (e j ) X (e j ) H (e j ) 4 1 e j
1
j
4
1 e
y[n] 4 [n]
Question: Find Y(ejω)=X(ejω)H(ejω) and y[n] if X(ejω)=3+4e-jω and H(ejω)=1/(1-e-jω)
j j 3 4e j
j 3 4e j
Answer: Y (e ) X (e ) H (e ) j
j
1 e 1 e 1 e j
y[n] 3[n] 4 [ n 1]
Answer:
X (e j ) . . . x[2]e 2 j x[1]e j x[0]e0 x[1]e j x[2]e 2 j x[3]e 3 j x[4]e 4 j + . . .
. . . 0 0 0 5e j +4e j 2 +7e j 3 +0 +0 +...
=5e j +4e j 2 +7e j 3
N point discrete Fourier transform (DFT)
391.995 Hz
The sound of the A4 note of a violin
440 Hz
DISCRETE-TIME SYSTEMS
x[n] h[n] y[n]
X (ei ) H (ei ) Y (ei )
System
• A system makes processing on the input x[n] and generates the output y[n]
• A system may be linear or nonlinear. For instance the output of an audio amplifier is
proportional to the input signals, like y[n]=Ax[n], and so it is a linear system.
• A system may be time invariant. For instance an electric motor displays the same
performance at all times then it is called a time invariant system.
LTI SYSTEMS
Linear discrete-time system For all αx1[n] + β x2[n] , the output has to be αy1[n] + β y2[n]
x [n-α] y [n- α]
System
Many of systems are LTI. We will consider LTI systems from now on.
DISCRETE TIME TRANSFER FUNCTIONS
System
Y(ejω)=X(ejω)H(ejω)
• X(ejω) is the DTFT of the input
System
• The output of a system to an impulse function δ[n] is called impulse response and
denoted as h[n]. It is also equal to the inverse DTFT of H(ejω)
II.way :
1 3e i 1 e i 4e i
i i 1
H (e ) i
i
1 4e i
h[n] [n] 4*(1) n 1 [ n 1]
1 e 1 e 1 e
3
Example : H(eiω )= h[n] ?
cosω
Answer : n h[n]
6e i
6e i 1 e 2i e 4i e 6i e 8i ...
i 3 0 0
H (e )
cos 1 e -2 i
1 6
6e i 6e 3i 6e 5i 6e 7 i 6e 9i ... 2 0
3 6
h[n] 6 [n -1] 6 [ n - 3] 6 [ n - 5] 6 [ n - 7] ... 4 0
5 6
Cascade connection of two systems
x[n] y[n]
h1[n] h2[n]
Useful identities
1 r N 1
1 r r r r ... r
2 3 4 N
for |r| 1
1 r
1
1 r r 2 r 3 r 4 ... for |r|<1
1 r
1
1 2r 3r 2 4r 3 ... for |r|<1
(1 r ) 2
r2 r3 r4
r ... ln(1 r ) for |r|<1
2 3 4
Example: Find z transform of the signal shown in the figure
14 n x[n]
7 7 0 7
1 14
-2 -1 0 1 2 3 4 5 6 n 2 7
3 0
14 7 4 0
Answer: X ( z ) 7 * z 0 14* z 1 7 * z 2 7 2
z z
1
Answer: X ( z ) 1* z 0 0.5* z 1 0.25* z 2 0.125* z 3 0.0625* z 4 ...
1 21 z 1
1 1 1 1 1
Answer: X ( z ) 1* z 0 13 z 1 19 z 2 271 z 3 811 z 4 ... 1 2 2 3 3 4 4 ...
3z 3 z 3 z 3 z 1 31 z 1
TABLE OF Z TRANSFORM PAIRS PROPERTIES
[ n] 1
1 z
[ n] f [n] g[n] F ( z ) G ( z ) : Linearity
1 z 1 z 1
z
n [ n]
( z 1) 2 f [n k ] z k F ( z ) : Time shifting
z ( z 1)
n 2 [ n]
( z 1)3 f [n] F ( z 1 ) : Time reversal
1
n [ n]
1 z 1 n f [ n] F ( z / ) : z scaling
z 1 z
n [n]
n
1 z 1 z
2 2
nf [n] zF ( z ) : z differentiation
2
1 z
(n 1) n [n]
1 z
1 2
z
2
x[n] h[n] X ( z ) H ( z ) : Convolution
1 1
cos(an) [n] 1
ia 1
12
1 e z
2
1 e ia z 1
1 1
sin(an) [n] 21i 1
1 eia z 1 2i 1 e ia z 1
Inverse z transformation
Given an F(z), one can do the followings to find its inverse z transform.
1) First, a change of variable z=w-1 is made and F(z=w-1) is obtained.
3) The coefficients a0, a1, a2, a3, . . . in this expansion correspond to the time
values of the function f[0], f[1], f2], f[3], . . . respectively. Thus, f[n] is
determined.
f [0] a0
f [1] a1
f [2] a2
f [3] a3
Example: Find x[n] if X(z)=1/(1-3z-1) Answer: 3 x[n] 3n [n]
-2 -1 0 1 2 3 4 5 6 n
27
Example: X ( z ) x[4] ?
1 31 z 1
27 1 2 3 1 4 1
Answer: X ( z ) =27z 0
9 z 3 z 1z z ... x[4]
1 31 z 1 3 3
4(7 9 z )
Example : X ( z ) x[5] ?
z3
4(7 9 z )
Answer: X ( z ) 3
=36 z 2 28 z 3 x[5] 0
z
Example: F ( z ) 8 z 2 (1 z ) 2 f [0] ?
2 (1 2 z z 2 )
Answer: F ( z ) 8 z (1 z ) 8 2
2
=8z 0 16 z 1 8 z 2 f [0] 8
z
n f [ n]
16
0 8 f [ n]
1 16 8 8
2 8
3 0
4 0 -2 -1 0 1 2 3 4 5 6 n
Example : X ( z ) 10 1 x[n] ?
1 z
1
=10 1 z 1 z 2 z 3 ... x[n] 10(1) n [ n]
10
Answer: X ( z ) 1
10 1
1 z 1 z
n x[n]
0 10 10 10 10 10
1 10
2 10
-2 -1 0 1 2 3 4 5 6 n
3 10
-10 -10 -10
4 10
3 4 z 1 34 z 1 4
20 z 8 5 2 z 1
Answer: F ( z ) 3 1
3 1
f [n] 5( 34 ) n [n] 2( 34 ) n 1 [ n 1]
3 4z 3 4z 1 4 z 1 4 z
UNITS OF BLOCK DIAGRAMS
x[n] Kx[n]
K
x[n] x[n 1]
D
x1[n]
x1[n] x2 [n]
x2 [n]
BLOCK DIAGRAM REPRESENTATION OF SYSTEMS
y[n]
x[n]
p0
D D
p1 d1
Feedback path
d1
p1
Feedback path #1
D
D
p2 d2
Feedback path #2
p1 d1
D
D
p2 d2
x[n] x[n 1]
D
X ( z) 1 z 1 X ( z )
z
Z Transform
representations the time
delay unit
p0 X ( z ) p1 z 1 X ( z ) p2 z 2 X ( z ) d1 z 1Y ( z ) d 2 z 2Y ( z ) Y ( z )
Determination of the transfer function H(z)
Y ( z ) p0 X ( z ) p1 z 1 X ( z ) p2 z 2 X ( z ) d1 z 1Y ( z ) d 2 z 2Y ( z )
Y ( z ) p0 p1 z 1 p2 z 2 X ( z ) d1 z 1 d 2 z 2 Y ( z )
1 d z
1
1
d 2 z 2 Y ( z ) p0 p1 z 1 p2 z 2 X ( z )
Y ( z ) p0 p1 z 1 p2 z 2
H ( z)
X ( z) 1 d1 z 1 d 2 z 2
p0 p1 z 1 p2 z 2 z 2 p0 z 2 p1 z p2
H ( z) 2
1 d1 z 1 d 2 z 2 z 2 z d1 z d 2
X ( z) p0 z 2 p1 z p2 Y ( z)
H ( z) 2
z d1 z d 2
Example: h[n]=?
x[n] y[n]
D
Answer:
3 x[n] 3 x[n 1] y[n]
X ( z ) 3z 1 X ( z ) Y ( z ) 1 3 z 1 X ( z ) Y ( z )
Y ( z ) 1 3 z X ( z )
1
H ( z) 1 3 z 1
X ( z) X ( z)
h[n] [n] 3 [n 1]
n h[n]
0 1 3 x[n]
1 3
2 0 1
3 0
-2 -1 0 1 2 3 4 5 6 n
4 0
Example: h[n]=?
x[n] y[n]
1
D Answer:
x[n] x[n 1] y[n]
X ( z ) z 1 X ( z ) Y ( z )
Y ( z ) 1 z X ( z )
1
H ( z) 1 z 1
X ( z) X ( z)
h[n] [n] [n 1]
n h[n]
0 1 h[n] [n] [n 1]
1 1 1
2 0
3 0 0 1 2 3 4 5 6 n
-2 -1
4 0
1
Example: h[n]=?
x[n] y[n]
D
4
Answer:
x[n] 4 y[n 1] y[n]
X ( z ) 4 z 1Y ( z ) Y ( z ) X ( z ) 1 4 z 1 Y ( z )
Y ( z) 1
H ( z)
X ( z ) 1 4 z 1
h[n] 4n [n]
Question: H(z)=?
a) H(z)=(z+6)/(z-3) x[n] y[n]
b) H(z)=3z-1/(z-6z-1)
c) H(z)=(z-6)/(1-3z-1)
d) H(z)=(z-3)/(6-z-1)
e) H(z)=3z-1/(z-6-1) D D
6 3
z6
Question: Given H ( z ) . Then h[1] ?
a) h[1] =-3 z 3
b) h[1] =9
c) h[1] =3
Answer:
d) h[1] =4
e) h[1] =1 z 6 1 6 z 1 1 6 z 1
H ( z)
z 3 1 3 z 1 1 3 z 1 1 3 z 1
h[n] 3n [n] 6*3n 1 [ n 1]
h[1] 31 *1 6*30 *1 3 6 9
Question:
(a) Find H(z) X ( z) Y ( z)
(b) Find Y(z) if X(z)=3-18z-1 4
3z 1 6z 1
Answer:
(a)
4 X ( z ) 3 z 1 X ( z ) 6 z 1Y ( z ) Y ( z ) Y ( z ) 4 3 z 1 4 3 z 1
H ( z)
4 3z X ( z ) 1 6 z Y ( z)
1 1
X ( z) 1 6 z 1
1 6 z 1
(b) X ( z ) H ( z ) Y ( z )
4 3 z 1
Y ( z ) 3 18 z
1
1
12 9 z 1
1 6z
y[n] 12 [n] 9 [n 1]
Block diagram simplifications
A( z )
X ( z) Y ( z)
B( z )
X ( z) Y ( z)
A( z ) B( z )
Simplification for a feedback (type 1)
X ( z) Y ( z)
G( z)
X ( z) 1 Y ( z)
1 G( z)
Simplification for a feedback (type 2)
X ( z) Y ( z)
A( z )
G( z)
X ( z) A( z ) Y ( z)
1 A( z )G ( z )
Example: Simplify the given block diagram and find H(z)
X ( z) Y ( z)
3 6
6z 1 4z 1
1 6 18 18 z 2
Answer : H ( z ) 1
3 1
1 1
1 6 z 1 6* 4 z (1 6 z )(1 24 z ) ( z 6)( z 24)
X ( z) 18 z 2 Y ( z)
( z 6)( z 24)
Example: Simplify the given block diagram and find H(z)
X ( z) Y ( z)
8
3 z 1 4 z 1
1 1 8 8z 2
Answer : H ( z ) 8 1 1
1 1
1 (3 z 4) 1 ( z ) (5 3 z )(1 z ) (5 z 3)( z 1)
X ( z) 8z 2 Y ( z)
(5 z 3)( z 1)
Usage of signal flow graphs
3z 1
1
X ( z) 1 Y ( z)
z 1
4z
z 1
H total ( z )
1 4 z 3 z 2
Question: Given x[ n] 4 n [ n] ; y[n] 3 n [ n] h[1] ?
Answer:
1 41 z 1 1 1 1 1
H ( z) 4 z
1 31 z 1 1 31 z 1 1 31 z 1
h[n] 3 n [n] 41 *3 ( n 1) [n 1]
1
h[1]
12
Determining a difference equation from a given H(z)
X ( z) a0 a1 z 1 a2 z 2 Y ( z)
H ( z)
b0 b1 z 1 b2 z 2
a0 a1 z 1 a2 z 2 Y ( z )
H ( z) 1 2
b0 b1 z b2 z X ( z)
a0 X ( z ) a1 z 1 X ( z ) a2 z 2 X ( z ) b0Y ( z ) b1 z 1Y ( z ) b2 z 2Y ( z )
a0 x[n] a1 x[n 1] a2 x[n 2] b0 y[n] b1 y[n 1] b2 y[n 2]
Drawing a block diagram from a given difference equation
y[n] ?
x[n]
a0 1/b0
D
D
a1 -b1
a0 x[n] a1 x[n 1] a2 x[n 2] b0 y[n] b1 y[n 1] b2 y[n 2]
y[n] ?
x[n]
a0 1/b0
D
D
a1 -b1
D D
a2 -b2
Reduction of the number of time delay units
The are 4 time delay units. It is possible to reduce the number of time
delay units by rearranging the elements shown below.
y[n]
x[n]
a0 1/b0
D
D
a1 -b1
D D
a2 -b2
y[n]
x[n]
1/b0
a0
D D
-b1 a1
D D
-b2 a2
1/b0
a0
D
-b1 a1
-b2 a2
Simulation (time domain solution) of difference equations
Answer:
1
y[n] 6 x[n] 4 x[n 1] 3 y[n 1] 3x[n] 2 x[n 1] 1.5 y[n 1]
2
n x[n] y[n]
-1 0 0
0 7 3*7 2*0 1.5*0 21
1 0 3*0 2*7 1.5* 21 45.5
2 -4 3*(-4) 2*0 1.5* 45.5 56.25
STABILITY OF SYSTEMS
A discrete-time system is BIBO stable if, for any bounded
x[n] y[n] input, the output remains bounded. There are two techniques
System to check the stability:
• BIBO stability criteria
n
h[n] • Jury’s stability criteria
n
h[n] (BIBO stable test)
n
(1) 3 [n] (1) 3 3n 1 3 9 27 ...
n n
n0
n n
n0
Hence the given
system is not stable
Question : Is it stable or not if the system’s mathemetical model is given by
3x[n] 4 x[n 1] y[n] with an intial condition y[ 1] 0
Answer:
3 4 z 1
3 4 z X ( z ) 7Y ( z) H(z)= 7 h[n] 73 [n] 74 [n]
1
3 4 3 4
n 7
[ n ]
7
[ n ]
7
1 Hence the given system is stable
7
b0 b1 z 1 b2 z 2 ... bM z M
H ( z)
a0 a1 z 1 a2 z 2 ... aN z N
1 2 N
(characteristic equation) a0 a1 z a2 z ... aN z 0
Answer:
z 2 3 z 10 0
3 i 31 3 i 31
It has roots at z1 and z2
2 2
3 i 31 32 ( 31) 2 40
z1 1
2 2 2
3 i 31 32 ( 31) 2 40
z2 1
2 2 2
Hence the given
system is not stable
Question : Transfer functions of systems are as given below. Which
one of these systems is stable?
a) H(z)=1/(z2+2z+10)
b) H(z)=(z+4)/(z+3)
c) H(z)=z/(3z+1)
d) H(z)=z/(z+3)
e) H(z)=z/(z2+3)
Answer:
a) z 2 2 z 10 0 It has roots at z1 -1 3i and z2 -1- 3i. They don't satisfy zn <1 , hence it is not a stable system
b) z 3 0 It has a root at z1 -3. It does not satisfy z1 <1 , hence it is not a stable system
c) 3 z 1 0 It has a root at z1 -1/ 3 -0.3333. It satisfies z1 <1 , hence it is a stable system
d) z 3 0 It has a root at z1 -3. It does not satisfy z1 <1 , hence it is not a stable system
e) z 2 3 0 It has roots at z1 i 3 and z2 -i 3. They don't satisfy zn <1 , hence it is not a stable system
Question : Assume A(z)=3z-1 in the given block diagram. For which values of K the
system becomes unstable?
x[n]
K
y[n]
A(z)
Answer:
K zK
H(z)= =
1 K 3 z 1 z 3K
z 3K 0 It has a root at z1 3K .
For stability 3K <1 K <0.3333
For non-stability K 0.3333
A computational algorithm for determining the stability of complex systems
The characteristic equation: a0 a1 w a2 w ... a N w 0
2 N
1 2 M
b0 b1 z b2 z ... bM z
H ( z)
a0 a1 z 1 a2 z 2 ... aN z N The following algorithm is useful in case the degree of the characteristic
b0 b1 w b2 w2 ... bM wM equation is too large.
a0 a1 w a2 w2 ... aN w N
Step3: Multiply array2 with α and then subtract a0 - aN a1 - aN -1 aN -1 - a1 aN - a0 array3
from array1
b0 b1 bN 1 0
array4
Step4: Form another array of reverse ordered bn’s bN 1 bN -2 b0
Answer:
3 2 1
1 2 3
This is
positive
__________________________________
8/3 4/3 0
4/3 8/3 0
This is
positive
__________________________________
2 0 0
an=sym2poly(den)
areverse = 1 2 3
areverse=an(end:-1:1)
%%%%%%%%%%%%%%%%%%%%%%%%%%
an = 2.6667 1.3333
an=an-areverse*an(end)/areverse(end);
an=an(1:end-1)
areverse=an(end:-1:1)
areverse = 1.3333 2.6667
%%%%%%%%%%%%%%%%%%%%%%%%%%
an=an-areverse*an(end)/areverse(end);
an = 2.0000
an=an(1:end-1)
areverse=an(end:-1:1)
areverse = 2.0000
%%%%%%%%%%%%%%%%%%%%%%%%%%
an=an-areverse*an(end)/areverse(end);
an=an(1:end-1)
an = Empty matrix: 1-by-0
areverse=an(end:-1:1)
Answer:
KA( z ) Kz 1
H ( z)
1 ( KA( z )) 1 ( K - 2) z 1
Characteristic equation: 1 ( K - 2) z 1 0
1 K 2
K 2 1
__________________
1 ( K 1) 2 0
1 ( K 1) 2 0 1 K 3
Therefore, it is stable when 1<K<3
Example: Assume A(z)=1/z/(z-2) in the x[n] y[n]
K A(z)
given system. Determine a condition for the
stability of this systems.
Answer: KA( z ) Kz 2 -1
H ( z)
1 KA( z )) 1 2 z 1 Kz 1
Characteristic equation: 1 2 z 1 Kz 1 0
z1 1 1 K
1 2 K
K 2 1
________________________
1 K 2 2K 2 0
2K 2 1 K 2 0
1 K 2 0 1 K 1 ________________________ z2 1 1 K
-( K -1) 2 ( K 3)
0
K 1
-( K -1) 2 ( K 3)
0 3 K 1
K 1