M4.3 Converting Continuous Models to Discrete
The Control Toolbox can also easily convert continuous models to discrete, using the c2d command.
sysd = c2d(sysc,Ts,method) % continuous to discrete
where sysc is the LTI object for a continuous model, sysd is the discrete object to be created, Ts is the sample time, and method is the type of hold placed on the input variable. We always assume a zero-order hold ('zoh'); this is also the default if no entry is made for method.
Consider the continuous state space model for the van de Vusse reactor, vdv_ss. It can be converted to the discrete-time model using the following MATLAB commands:
» vdv_ssd = c2d(vdv_ss,0.1,'zoh')
a =
x1 x2
x1 0.78625 0
x2 0.066067 0.79947
b =
u1
x1 0.62219
x2 -0.075061
c =
x1 x2
y1 0 1
d =
u1
y1 0
Sampling time: 0.1
Discrete-time system.
|