ToContinuous - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


DynamicSystems

  

ToContinuous

  

convert a discrete-time system to continuous-time system

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

ToContinuous(sys, opts)

Parameters

sys

-

System; system object

opts

-

(optional) equation(s) of the form option = value; specify options for the ToContinuous command

Options

• 

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.

Description

• 

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

   x

   D

 

 

 x

 x

Transfer-Function

   x

   x

   D

   x

 

 x

 x

Coefficients

   x

   x

   D

   x

 

 x

 x

Zero-Pole-Gain

 

 

 

 

   D

 

 

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.

• 

forward

Ac = (Ad - I)/T

Bc = Bd/T

Cc = Cd

Dc = Dd

• 

backward

Ac = (I - Ad^(-1))/T

Bc = Ad(-1).Bd/T

Cc = Cd.Ad(-1)

Dc = Dd - Cd.Bc*T

• 

bilinear

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

• 

zoh

Ac = ln(Ad)/T

Bc = (exp(Ac*T) - I)^(-1).Ac.Bd

Cc = Cd

Dc = Dd

• 

foh

Ac = ln(Ad)/T

Bc = (exp(Ac*T) - I)^(-2).Ac^2.Bd*T

Cc = Cd

Dc = Dd - Cc.(Ac^(-1).(exp(Ac*T)/T - I) - I)Ac^(-1).Bc

Examples

withDynamicSystems:

Convert discrete-time transfer function to continuous-time using different conversion methods.

sysTransferFunction10,5,1,0.8,discrete,sampletime=0.5:PrintSystemsys

Transfer Functiondiscrete; sampletime = .51 output(s); 1 input(s)inputvariable=u1zoutputvariable=y1ztf1,1=10.z5.z0.8000000000

(1)

sys_s1ToContinuoussys,method=forward:PrintSystemsys_s1

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1soutputvariable=y1stf1,1=10.s+1.s+0.4000000000

(2)

sys_s2ToContinuoussys,method=backward:PrintSystemsys_s2

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1soutputvariable=y1stf1,1=6.250000000s+2.s+0.5000000000

(3)

sys_s3ToContinuoussys,method=bilinear:PrintSystemsys_s3

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1soutputvariable=y1stf1,1=8.333333333s+1.333333333s+0.4444444444

(4)

sys_s4ToContinuoussys,method=prewarp,frequency=0.3:PrintSystemsys_s4

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1soutputvariable=y1stf1,1=8.333333333s+1.330832395s+0.4436107985

(5)

sys_s5ToContinuoussys,method=zoh:PrintSystemsys_s5

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1soutputvariable=y1stf1,1=10.s+1.115717756s+0.4462871026

(6)

sys_s6ToContinuoussys,method=foh:PrintSystemsys_s6

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1soutputvariable=y1stf1,1=8.264233654s+1.350055919s+0.4462871026

(7)

Compare the frequency responses of all systems.

p0MagnitudePlotsys,range=0.1..10,color=red,thickness=2,legend=discrete:

p1MagnitudePlotsys_s1,range=0.1..10,color=blue,legend=forward:

p2MagnitudePlotsys_s2,range=0.1..10,color=green,legend=backward:

p3MagnitudePlotsys_s3,range=0.1..10,color=black,legend=bilinear:

p4MagnitudePlotsys_s4,range=0.1..10,color=grey,legend=prewarp:

p5MagnitudePlotsys_s5,range=0.1..10,color=cyan,legend=zoh:

p6MagnitudePlotsys_s6,range=0.1..10,color=magenta,legend=foh:

plotsdisplayp0,p1,p2,p3,p4,p5,p6

Compatibility

• 

The DynamicSystems[ToContinuous] command was introduced in Maple 18.

• 

For more information on Maple 18 changes, see Updates in Maple 18.

See Also

DynamicSystems

DynamicSystems[Resample]

DynamicSystems[SystemOptions]

DynamicSystems[ToDiscrete]

invztrans

laplace