Specifications

Table Of Contents
c2d
16-28
Example Consider the system
with input delay second. To discretize this system using the
triangle approximation with sample time second, type
H = tf([1 -1],[1 4 5],'inputdelay',0.35)
Transfer function:
s - 1
exp(-0.35*s) * -------------
s^2 + 4 s + 5
Hd = c2d(H,0.1,'foh')
Transfer function:
0.0115 z^3 + 0.0456 z^2 - 0.0562 z - 0.009104
---------------------------------------------
z^6 - 1.629 z^5 + 0.6703 z^4
Sampling time: 0.1
The next command compares the continuous and discretized step responses.
Hs
()
s 1
s
2
4s 5++
----------------------------
=
T
d
0.35=
T
s
0.1=