Convert model from discrete to continuous time
sysc = d2c(sysd)
sysc = d2c(sysd,method)
sysc = d2c(sysd,opts)
[sysc,G]
= d2c(sysd,method,opts)
produces
a continuoustime model sysc
= d2c(sysd
)sysc
that is equivalent
to the discretetime dynamic
system model sysd
using zeroorder
hold on the inputs.
uses
the specified conversion method sysc
= d2c(sysd
,method
)method
.
converts sysc
= d2c(sysd
,opts
)sysd
using
the option set opts
, specified using the d2cOptions
command.
[
returns
a matrix sysc
,G
]
= d2c(sysd
,method
,opts
)G
that maps the states xd[k]
of
the statespace model sysd
to the states xc(t)
of sysc
.

Discretetime dynamic system model You cannot directly use an 

Discretetocontinuous time conversion method, specified as one of the following values:
For information about the algorithms for each Default: 

Discretetocontinuous time conversion options, created using 

Continuoustime model of the same type as the input system When


Matrix mapping the states $${x}_{c}\left(k{T}_{s}\right)=G\left[\begin{array}{c}{x}_{d}\left[k\right]\\ u\left[k\right]\end{array}\right].$$ Given an initial condition $${x}_{c}\left(0\right)=G\left[\begin{array}{c}{x}_{0}\\ {u}_{0}\end{array}\right].$$ 
The Tustin approximation is not defined for systems with poles at z = –1 and is illconditioned for systems with poles near z = –1.
The zeroorder hold method cannot handle systems with poles at z = 0. In
addition, the 'zoh'
conversion increases the model order for systems with negative real poles, [2]. The model order increases because the matrix logarithm
maps real negative poles to complex poles. Single complex poles are not physically meaningful
because of their complex time response.
Instead, to ensure that all complex poles of the continuous model come in conjugate pairs,
d2c
replaces negative real poles z =
–α with a pair of complex conjugate poles near –α. The
conversion then yields a continuous model with higher order. For example, to convert the
discretetime transfer function
$$H\left(z\right)=\frac{z+0.2}{\left(z+0.5\right)\left({z}^{2}+z+0.4\right)}$$
type:
Ts = 0.1 % sample time 0.1 s H = zpk(0.2,0.5,1,Ts) * tf(1,[1 1 0.4],Ts) Hc = d2c(H)
These commands produce the following result.
Warning: System order was increased to handle real negative poles. Zero/pole/gain: 33.6556 (s6.273) (s^2 + 28.29s + 1041)  (s^2 + 9.163s + 637.3) (s^2 + 13.86s + 1035)
To convert Hc
back to discrete time, type:
c2d(Hc,Ts)
yielding
Zero/pole/gain: (z+0.5) (z+0.2)  (z+0.5)^2 (z^2 + z + 0.4) Sample time: 0.1
This discrete model coincides with H(z) after canceling the pole/zero pair at z = –0.5.
Use the syntax sysc = d2c(sysd,'method')
to
convert sysd
using the default options for'method'
.
To specify tustin
conversion with a frequency prewarp
(formerly the 'prewarp'
method), use the syntax sysc
= d2c(sysd,opts)
. See the d2cOptions
reference page for more
information.
d2c
performs the 'zoh'
conversion
in state space, and relies on the matrix logarithm (see logm
in
the MATLAB^{®} documentation).
See ContinuousDiscrete Conversion Methods for more details on the conversion methods.
[1] Franklin, G.F., Powell,D.J., and Workman, M.L., Digital Control of Dynamic Systems (3rd Edition), Prentice Hall, 1997.
[2] Kollár, I., G.F. Franklin, and R. Pintelon, "On the Equivalence of zdomain and sdomain Models in System Identification," Proceedings of the IEEE^{®} Instrumentation and Measurement Technology Conference, Brussels, Belgium, June, 1996, Vol. 1, pp. 1419.
c2d
 d2cOptions
 d2d
 logm
 translatecov