DynamicSystems
ToContinuous
convert a discrete-time system to continuous-time system
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
ToContinuous(sys, opts)
sys
-
System; system object
opts
(optional) equation(s) of the form option = value; specify options for the ToContinuous command
method = forward, backward, bilinear, prewarp, matched, zoh, or foh
Specifies the conversion method.
frequency = realcons
Specifies the warping or critical frequency in rad/s. This is used only if method = prewarp, otherwise it is ignored.
The ToContinuous command converts a discrete-time system, sys, to a continuous-time system.
The method option specifies the discrete-time to continuous-time conversion method. The following methods are supported: forward rectangle rule (forward), backward rectangle rule (backward), bilinear rule (bilinear), bilinear with prewarping (prewarp), matched poles and zeros (matched), zero-order hold (zoh), and first-order hold or non-causal triangle-hold (foh).
The bilinear rule is also known as the Tustin or Trapezoid rule.
Not all inverse-discretization methods can be applied to all system types. The following table describes the usage. An x indicates that the method can be used by the system type. A D indicates that the method is the default for the system type.
System Type
forward
backward
bilinear
prewarp
matched
zoh
foh
State-Space
x
D
Transfer-Function
Coefficients
Zero-Pole-Gain
Transformations
Frequency Domain Transformations
The frequency-domain transformations convert rational functions in z to rational functions in s, where z and s are the discrete and continuous complex frequency variables, respectively. The following functions describe the mappings from the z plane to the s plane for each of the defined transformations where T is the sampling period of the discrete-time system.
forward : z -> 1 + s*T
backward : z -> 1/(1-s*T)
bilinear : z -> (2+s*T)/(2-s*T)
prewarp : z -> (|ω| + s*tan(|ω|*T/2))/(|ω| - s*tan(|ω|*T/2)) where ω is the critical frequency in rad/s.
matched : poles and zeros in the z-plane map to the s-plane as z = exp(s*T).
The Laplace transform is used in the following hold equivalents:
zoh : H(s) = s*laplace(invztrans(H(z)/(1-1/z)))
foh : H(s) = s^2*laplace(invztrans(T*z*H(z)/(z-1)^2))
Time Domain Transformations
The time-domain transformations are done on the discrete-time state-space matrices Ad, Bd, Cd, Dd, and T is the sampling period of the discrete-time system. The matrices Ac, Bc, Cc, Dc represent the continuous-time matrices. I is the identity matrix.
Ac = (Ad - I)/T
Bc = Bd/T
Cc = Cd
Dc = Dd
Ac = (I - Ad^(-1))/T
Bc = Ad(-1).Bd/T
Cc = Cd.Ad(-1)
Dc = Dd - Cd.Bc*T
M = (Ad + I)*T/2
Ac = M^(-1).(Ad - I)
Bc = Bd/sqrt(T) - sqrt(T)/2*Ac.Bd
Cc = Cd/sqrt(T) + sqrt(T)/2*Cd.Ac
Dc = Dd - sqrt(T)/2*Cd.Bc
Ac = ln(Ad)/T
Bc = (exp(Ac*T) - I)^(-1).Ac.Bd
Bc = (exp(Ac*T) - I)^(-2).Ac^2.Bd*T
Dc = Dd - Cc.(Ac^(-1).(exp(Ac*T)/T - I) - I)Ac^(-1).Bc
with⁡DynamicSystems:
Convert discrete-time transfer function to continuous-time using different conversion methods.
sys≔TransferFunction⁡10,−5,1,−0.8,discrete,sampletime=0.5:PrintSystem⁡sys
Transfer Functiondiscrete; sampletime = .51 output(s); 1 input(s)inputvariable=u1⁡zoutputvariable=y1⁡ztf1,1=10.⁢z−5.z−0.8000000000
sys_s1≔ToContinuous⁡sys,method=forward:PrintSystem⁡sys_s1
Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1⁡soutputvariable=y1⁡stf1,1=10.⁢s+1.s+0.4000000000
sys_s2≔ToContinuous⁡sys,method=backward:PrintSystem⁡sys_s2
Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1⁡soutputvariable=y1⁡stf1,1=6.250000000⁢s+2.s+0.5000000000
sys_s3≔ToContinuous⁡sys,method=bilinear:PrintSystem⁡sys_s3
Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1⁡soutputvariable=y1⁡stf1,1=8.333333333⁢s+1.333333333s+0.4444444444
sys_s4≔ToContinuous⁡sys,method=prewarp,frequency=0.3:PrintSystem⁡sys_s4
Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1⁡soutputvariable=y1⁡stf1,1=8.333333333⁢s+1.330832395s+0.4436107985
sys_s5≔ToContinuous⁡sys,method=zoh:PrintSystem⁡sys_s5
Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1⁡soutputvariable=y1⁡stf1,1=10.⁢s+1.115717756s+0.4462871026
sys_s6≔ToContinuous⁡sys,method=foh:PrintSystem⁡sys_s6
Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1⁡soutputvariable=y1⁡stf1,1=8.264233654⁢s+1.350055919s+0.4462871026
Compare the frequency responses of all systems.
p0≔MagnitudePlot⁡sys,range=0.1..10,color=red,thickness=2,legend=discrete:
p1≔MagnitudePlot⁡sys_s1,range=0.1..10,color=blue,legend=forward:
p2≔MagnitudePlot⁡sys_s2,range=0.1..10,color=green,legend=backward:
p3≔MagnitudePlot⁡sys_s3,range=0.1..10,color=black,legend=bilinear:
p4≔MagnitudePlot⁡sys_s4,range=0.1..10,color=grey,legend=prewarp:
p5≔MagnitudePlot⁡sys_s5,range=0.1..10,color=cyan,legend=zoh:
p6≔MagnitudePlot⁡sys_s6,range=0.1..10,color=magenta,legend=foh:
plotsdisplay⁡p0,p1,p2,p3,p4,p5,p6
The DynamicSystems[ToContinuous] command was introduced in Maple 18.
For more information on Maple 18 changes, see Updates in Maple 18.
See Also
DynamicSystems[Resample]
DynamicSystems[SystemOptions]
DynamicSystems[ToDiscrete]
invztrans
laplace
Download Help Document