Approximation of Continuous Time Systems With Discrete Time Systems
Approximation of Continuous Time Systems With Discrete Time Systems
2 k
H d ( z ) z =esT = H a s j
k =
The frequency response of the digital system is the same with the frequency response of
the analog system of limited band for frequency less than half of sampling frequency
H a ( ) = H d ( )
=T
and M
T
k
k
k
dt k
dt k
k =0
k =0
Use approximation:
dya ( t )
dt
t = nT
ya ( nT ) ya ( nT T ) yd [ n ] yd [ n 1]
=
T
T
ak
k =0
1
Tk
( 1)
p =0
Ckp y [ n p ] = bk
k =0
1
Tk
( 1)
p =0
Ckp x [ n p ]
1 z 1
T
s=
1 z 1
T
Hd ( z ) =
T 1 + z 1
= Ha ( s)
2 1 z 1
s = 2 1 z 1
T 1+ z
B. Problems
Problem 1. We have a linear time-invariant system with the transfer function:
s+2
.
Ha ( s) =
2
( s + 1) ( s + 3)
Solution.
a) To determine the impulse response from the transfer function, we decompose it into
simple fractions:
Ha (s) =
A
B
C
+
+
2
s + 1 ( s + 1) s + 3
s+2
1
1
= B=
s
=
1
s+3
2
2
s+2
1
C = ( s + 3) H a ( s )
=
=
2 s =3
s =3
4
( s + 1)
B = ( s + 1) H a ( s )
2
A=
s =1
d
2
( s + 1) H a ( s )
ds
s =1
d s + 2
ds s + 3
s =1
s +3 s 2
( s + 3)
s =1
1
4
( s + 1)
1 1
1
1
1 1
+
2
s
+
1 2 ( s + 1)
s +
3
4
4
7
1 e t t
()
4
1 e3t ( t )
4
d 1
ds s + 1
x (t ) X ( s )
( s + 1)
dX ( s )
ds
= x ( t )( t ) e st dt = tx ( t ) e st = L {tx ( t )} ( s )
= L te t ( t ) ( s )
ha ( t ) =
( s + 1)
te t ( t )
1 t
1
1
e ( t ) + te t ( t ) e 3t ( t )
4
2
4
T nT
T 2 nT
T
b) hd [ n ] = T ha ( nT ) = e [ n ] +
ne [ n ] e 3nT [ n ]
4
2
4
c) We identify each term using the tables of Z transforms:
T nT
T T n
T /4
e [ n] =
e
[ n]
4
4
1 e T z 1
n
T
T
T /4
e 3nT [ n ] = e 3T [ n ]
4
4
1 e 3T z 1
n
T 2 nT
T2
T2
e T z 1
ne [ n ] =
n ( e T ) [ n ]
2
2
2 (1 e T z 1 ) 2
( )
(
Hd ( z) =
T /4
T 2 e T
z 1
T /4
+
T 1
T 1 2
1 e z
2
(1 e z ) 1 e 3T z 1
Problem 2. We have H a ( s ) the transfer function of an analog system, linear and timeinvariant,
1
.
Ha ( s) =
2
s
+
s
+
1
2
( )(
)
k =
ha ( kT )
is true.
d) Compute the step response of the digital system, using the step response
invariance method:
sd [ n ] = sa ( nT ) .
Solution.
a) To determine the impulse response from the transfer function, we decompose it into
simple fractions and we identify each term using the tables of Laplace transforms:
Ha (s) =
( s + 1)( s + 2 )
A = ( s + 1) H a ( s )
s =1
A
B
C
+
+
2
s + 1 ( s + 2)
s+2
( s + 2)
=
1
s +1
d
2
( s + 2 ) H a ( s )
ds
B = ( s + 2) H a ( s )
2
C=
s =2
=>
2 s =1
s =2
=1
= 1
d 1
ds s + 1
= 1
( s + 1) s =2
ha ( t ) = e t ( t ) te 2t ( t ) e 2t ( t )
s =2
s =2
hd [ n ] = T ha ( nt ) = Te nT [ n ] nT 2 e 2 nT [ n ] Te 2 nT [ n ]
sd [ n ] = [ n ] hd [ n ] =
k =
hd [ k ] [ n k ] =
k =
k =
hd [ k ] = T
k =
ha ( kT )
Sa ( s ) =
Ha (s)
s
A
B
C
D
1
= +
+
+
2
s ( s + 1)( s + 2 ) s s + 1 ( s + 2 ) s + 2
We compute the step response of the analog system using the decomposition in simple
fractions and tables of Laplace transforms:
A = sS a ( s )
s =0
B = ( s + 1) Sa ( s )
( s + 1)( s + 2 )
s =1
C = ( s + 2 ) Sa ( s )
D=
s =2
s =0
1
4
1
s ( s + 2)
=
d
2
( s + 2 ) Sa ( s )
ds
2 s =1
1
s ( s + 1)
s =2
s =2
= 1
=
1
2
d 1
ds s 2 + s
s =2
2s + 1
( s2 + s )
s =2
3
= 3/ 4
4
1
1
3
=> sa ( t ) = ( t ) e t ( t ) + e2t ( t ) + e 2t ( t )
4
2
4
1
1
3
sd [ n ] = sa ( nT ) = [ n ] e nT [ n ] + e 2 nT [ n ] + e 2 nT [ n ]
4
2
4
Problem 3. We have an analog, linear time-invariant system with the impulse response
ha ( t ) and a digital linear time-invariant system hd [ n ] equivalent to the analog system
a) H a ( s ) = L et ( t ) =
1
s +1
T
b) hd [ n ] = T ha ( nT ) = Te nT [ n ] H d ( z ) =
T 1
1 e z
c) H d ( ) =
T
1 e
e j
1
1
H a ( ) =
1 + j
1+ 2
T
Hd () =
=
T
1 e cos + jeT sin
d) H a ( ) =
(1 eT cos )
+ e2T sin 2
For T=0.1 the amplitude-characteristic are almost the same for frequency less than half of
sampling frequency 2/T=10=31.14.
Ha()
Hd( )| = T
0.8
T=0.1s
0.6
0.4
0.2
-30
-20
-10
10
20
30
Plot it using Matlab. What do you notice when the frequency is higher than half of the
sampling frequency?
>>
>>
>>
>>
w=-200*pi:0.01*pi:200*pi;
Ha=1./sqrt(1+w.^2);
Hd=0.1./sqrt(1+exp(-0.2)-2*exp(-0.1).*cos(0.1*w));
plot(w,Ha,w,Hd); grid on
Problem 4 Consider the analog, linear time-invariant system with the differential
equation:
dy
+ 2 y (t ) = x (t )
dt
a) Find the impulse response and the transfer function of a discrete-time system that
approximates the analog system using the impulse invariance method;
b) Find again the impulse response and the transfer function if we use the differential
equation approximation;
c) The same for the bilinear transformation method.
d) Give implementation forms for the systems from a), b) and c) ;
e) For x ( t ) = sin t and a sampling period of T = 0,1 find the amplitude of the output
signal for the analog system and for the digital system, for the three cases,
respectively.
Solution.
a) impulse invariance method
Y (s)
dy
1
+ 2 y ( t ) = x ( t ) sY ( s ) + 2Y ( s ) = X ( s ) H a ( s ) =
=
dt
X (s) s + 2
T
ha ( t ) = e2t ( t ) hd [ n ] = Te 2nT [ n ] H d ( z ) =
2 nT 1
z
1 e
b) differential equation approximation
T
1
1
1 + 2T
H d ( z ) = H a ( s ) s =1 z 1 =
=
=
1
1
1
z
1
T
z
+
1
2
T
z 1
1
2+
1 + 2T
T
T 1
The impulse response of the digital system is: hd [ n ] =
1 + 2T 1 + 2T
[ n]
T 1+ z 1
Hd ( z ) =
1
1
1 + z 1
=
=
s + 2 s = 21 z 1 2 1 z 1
2 1 z 1 + T (1 + z 1 )
2
+
T 1+ z 1
T 1 + z 1
1 + z 1
1
1 + z 1
Hd ( z) =
=
2 (1 + T ) 2 (1 T ) z 1 2 1 + T (1 T ) z 1
=
1
1
1
+
2 (1 T ) 1 T 1 + T (1 T ) z 1
1
1
1
+
2 (1 T ) (1 T )(1 + T ) 1 1 T z 1
1+ T
The impulse response of the digital system using the bilinear transformation:
n
1
1
1 T
[ n] +
hd [ n ] =
[n]
2 (1 T )
1 T 2 1+ T
d)
-2
y[n]
e-2T
(1+2T)-1
x[n]
x[n]
y[n]
(1 + 2T ) y [ n] y [ n 1] = Tx [ n ]
D
y[n-1]
1
2 (1 + T )
x[n]
2 (1 + T ) y [ n ] + 2 (1 T ) y [ n 1] =
= x [ n ] + x [ n 1]
-2(1-T)
e)
For x ( t ) = sin t and a sampling period of T = 0,1 we have to find the amplitude of the
1
1
H (1) =
2 + j
2+ j
1
1
; arg { H (1)} = arg {2 + j} = arctg
2
5
1
1
1
H (1) =
n
1
1
x [ n ] = sin ( 0,1n ) = sin y [ n ] = H d sin + arg H d
10
10
10
10
For the digital system from a)
1
1
1
Hd ( z ) =
Hd () =
=
2T
2T 1
2T j
1 e
1 e
cos + j e 2T sin
z
1 e
z
1
1
Hd () =
=
2
1 + e4T 2e 2T cos
1 e 2T cos + e 4T sin 2
1
Hd =
10
1
1 + e0,4 2e0,2 cos
1
10
1 e 0,2
10
d( ) 2
2 1 + T (1 T ) z 1
1,1 0,9e j
1
Hd () =
2
(1 + cos ) + sin 2
2
2
(1,1 0,9 cos ) + ( 0,9sin )
2
1
2 + 2 cos
=
2 1, 21 + 0,81 1,98cos
N
dkx
=
b
k
dt k k =0 dt k
k =0
We approximate this system using a discrete-time system using a method similar to the
method of the differential equation approximation:
x [ n + 1] x [ n ]
dx
dt t =nT
T
N
ak
dk y
( 0) x [ n ] = x [ n ]
{ }
x [ n + 1] x [ n ]
(1)
order 1: { x [ n ]} =
order 0:
order k:
( ) x [ n] = ( ) 1 x [ n]
{ }
{ { }}
k 1
a) Let H a ( s ) =
( s + 1)
Hd ( z ) ;
11
Solution
(1) x [ n] = x [ n + 1] x [ n]
{ }
T
(1) x [ n + 1] x [ n]
2 { x [ n ]} =
1 (1)
(1)
{ x [ n + 1]} { x [ n ]}
1 x [ n + 2] x [ n + 1] x [ n + 1] x [ n ]
T
T
T
1
= 2 x [ n + 2] 2 x [ n + 1] + x [ n ]
T
We notice that:
1 k
l
k { x [ n ]} = k Ckl x [ n + l ] ( 1)
T l =0
a) We have to find the transfer function of the digital equivalent system H d ( z ) using a
method similar to the differential equation approximation.
b1s
s
Ha ( s) = 2
=
s + 2s + 1 a0 + a1s + a2 s 2
b0 = 0; b1 = 1; a0 = 1; a1 = 2; a2 = 1
The linear differential equation is:
dy ( t ) d 2 y ( t ) dx ( t )
y (t ) + 2
+
=
dt
dt
dt 2
(1)
2
1
{ y [ n]} + ( ) { y [ n]} = ( ) { x [ n]}
meaning that:
y [ n] + 2
y [ n + 1] y [ n ]
T
x [ n + 1] x [ n ]
1
+ 2 y [ n + 2] 2 y [ n + 1] + y [ n ] =
T
T
or:
T 2 y [ n ] + 2T ( y [ n + 1] y [ n ]) +
y [ n + 2] 2 y [ n + 1] + y [ n] = Tx [ n + 1] Tx [ n ]
12
Tz T
Hd ( z ) = 2
z + 2 (T 1) z + T 2 2T + 1
Hd ( z ) =
Tz T
( z + T 1)
=
2
T ( z 1)
z 1
T2
+ 1
T
z 1
T
meaning that: H d ( z ) =
2
z 1
+ 1
13
T ( z 1)
( z + T 1)
z 1
1
T
= T
T z 1 2
+ 1