({{, (RefLink[ToContinuousTimeModel, paclet:ref/ToContinuousTimeModel])[lsys] 
gives the continuous-time approximation of the discrete-time systems models lsys.}, {, (RefLink[ToContinuousTimeModel, paclet:ref/ToContinuousTimeModel])[tfm,s]
specifies the transform variable s.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[ToContinuousTimeModel, paclet:ref/ToContinuousTimeModel]) is also known as inverse sampling.

The systems model lsys can be a (RefLink[TransferFunctionModel, paclet:ref/TransferFunctionModel]) or (RefLink[StateSpaceModel, paclet:ref/StateSpaceModel]).

(RefLink[ToContinuousTimeModel, paclet:ref/ToContinuousTimeModel]) accepts a (RefLink[Method, paclet:ref/Method]) option that can be used to specify the approximation method.

Possible settings for the (RefLink[Method, paclet:ref/Method]) option include:

The default setting (RefLink[Method, paclet:ref/Method])->(RefLink[Automatic, paclet:ref/Automatic]) implements the bilinear transformation.

The setting (RefLink[Method, paclet:ref/Method])->"ZeroPoleMapping" does not support time delays.

A bilinear transform with critical frequency ω radians per time unit can be specified by setting (RefLink[Method, paclet:ref/Method])->{"BilinearTransform","CriticalFrequency"->ω}.

The "FirstOrderHold" method gives the non-causal first-order hold equivalent.

When approximating (RefLink[TransferFunctionModel, paclet:ref/TransferFunctionModel]) objects, "StateSpaceConversion" can be specified as a suboption.

The setting (RefLink[Method, paclet:ref/Method])->{m,"StateSpaceConversion"->(RefLink[True, paclet:ref/True])} computes the approximation using the state-space representation and converts the result to the transfer-function representation.

The setting "StateSpaceConversion"->(RefLink[False, paclet:ref/False]) computes using the transfer-function object.

The setting "StateSpaceConversion"->(RefLink[Automatic, paclet:ref/Automatic]) computes the approximation using the transfer-function representation, except for the "ZeroOrderHold" method.

OpenersPrimaryExamplesSection(Spacer1)Examples  (16)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

A continuous-time approximation of a discrete-time system:

ToContinuousTimeModel[(TransferFunctionModelFull[((10 (-0.9`+z))/(-0.8`+z)), 0.5`, , ]),s]

OpenersExampleSection1(Spacer1)Scope  (6)

Convert a discrete-time transfer-function model to a continuous-time model:

ToContinuousTimeModel[(TransferFunctionModelFull[((0.01` (0.03` +z) (0.5` +z))/((-0.8`+z) (-0.5`+z) (-0.2`+z))), 0.6`, , ]),s]

Convert a discrete-time state-space model to a continuous-time model:

ToContinuousTimeModel[(StateSpaceModelFull[0.5`, 0.5`, 0.1`, 0, -0.3`, 1, 0.3`, 0, 0, 0, 0.3`, 0.25`, 1, 0, 0, 0, 1, , ]),s]

Convert a multiple-input, multiple-output system to a continuous-time system:

ToContinuousTimeModel[(TransferFunctionModelFull[(z/(-1+z)), ((-0.3`+z)/(0.5` +z)), ((-0.8`+z)/(0.8` +z)), (1/(-0.3`+z)), (z/(-0.5`+z)), 1, 0.5`, , ]),s]

Convert a symbolic system:

ToContinuousTimeModel[(TransferFunctionModelFull[(z/(-a+z)), T, , ]),s]

Convert a time-delay (RefLink[StateSpaceModel, paclet:ref/StateSpaceModel]):

ToContinuousTimeModel[(StateSpaceModelFull[0.5`, -(SystemsModelDelay[3]), 0, 0, 0.25`, 1, 1, (SystemsModelDelay[20]), 0, 1, , ])]

Convert a singular descriptor (RefLink[StateSpaceModel, paclet:ref/StateSpaceModel]):

ToContinuousTimeModel[(StateSpaceModelFull[0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, -(5/6), 1, -1, (19/12), (193/144), 0, 1, , ])]

OpenersExampleSection2(Spacer1)Options  (6)

OpenersExampleSubsection0(Spacer1)Method  (6)

By default, the approximation is based on the bilinear transformation:

ToContinuousTimeModel[(TransferFunctionModelFull[((-(1/2)+z)/(-(3/4)+z)), 1, , ]),s]

Specify the approximation method:

ToContinuousTimeModel[(TransferFunctionModelFull[((0.75` z)/(-0.65` z+(z^2))), 1, , ]),s,Method->"FirstOrderHold"]

Compare various approximation methods:

tfm=(TransferFunctionModelFull[((10 (-0.5`+z))/(-0.8`+z)), 0.5`, , ]);

Grid[tfc=Table[{m,ToContinuousTimeModel[tfm,s,Method->m]},{m,{"ForwardRectangularRule","BackwardRectangularRule","BilinearTransform","ZeroOrderHold","FirstOrderHold"}}],Background-> {None,{{White,LightGray}}},Frame->All]

BodePlot[Join[{Tooltip[tfm]},Apply[Tooltip,Reverse[#]]&/@tfc],{0.05,(π/0.5)}]

An approximation that preserves the transmission at a specified frequency:

tfm=(TransferFunctionModelFull[((0.2066` (1-2 z+(z^2)))/(0.1958` +0.3695` z+(z^2))), 0.75`, , ]);

tfmc=ToContinuousTimeModel[tfm,Method->{"BilinearTransform","CriticalFrequency"->2}]

pts=Point[{#}]& /@Through@{{Log10[2],20 Log10@Abs[#]}&,{Log10[2],((Arg[#])/Degree)}&}@tfm[Exp[I 2 0.75]][[1,1]];

BodePlot[{tfm,tfmc},{0.1,(π/0.5)},Epilog->pts]

The backward Euler method adds states if the state and descriptor matrices are both singular:

ss=(StateSpaceModelFull[1, 2, (1/2), 0, (1/4), 0, 0, (1/4), 0, 1, 1, 4, 0, 1, , ]);
ToContinuousTimeModel[ss,s,Method->"BackwardRectangularRule"]

The bilinear method adds states if the sum of the state and descriptor matrices is singular:

ss=(StateSpaceModelFull[1, 2, (1/2), -2, (1/4), 0, 0, (1/4), 0, 1, 1, 4, 0, 1, , ]);
ToContinuousTimeModel[ss,s,Method->"BilinearTransform"]

OpenersExampleSection3(Spacer1)Applications  (1)

Various continuous-time approximations to a fourth-order Chebyshev II bandstop filter:

tfmch4=(TransferFunctionModelFull[((0.4207` (1+1.7994` (z^2)+(z^4)))/(0.221` +0.37773` (z^2)+(z^4))), 0.01`, , ]);

methods={"ForwardRectangularRule","BackwardRectangularRule","BilinearTransform",{"BilinearTransform","CriticalFrequency"->160},"ZeroOrderHold","FirstOrderHold"};

Grid[tfmch4c=Table[{m,Chop[ToContinuousTimeModel[tfmch4,s,Method->m]//Simplify,(10^(-5))]},{m,methods}],Background-> {None,{{White,LightGray}}},Frame->All]

Bode plots:

BodePlot[Join[{Tooltip[tfmch4]},Apply[Tooltip,Reverse[#]]&/@tfmch4c],{20,π/0.01},PlotRange->All,ImageSize->300]

OpenersExampleSection4(Spacer1)Properties & Relations  (2)

(RefLink[ToDiscreteTimeModel, paclet:ref/ToDiscreteTimeModel]) is essentially the inverse of (RefLink[ToContinuousTimeModel, paclet:ref/ToContinuousTimeModel]):

d2c2d[sys_,method_]:=ToDiscreteTimeModel[ToContinuousTimeModel[sys,Method-> method],1,Method->method]

Table[d2c2d[(TransferFunctionModelFull[((0.5`)/(-0.5`+z)), 1, , ]),method],{method,{"ForwardRectangularRule", "BackwardRectangularRule","BilinearTransform","ZeroOrderHold","FirstOrderHold"}}]

(RefLink[ToContinuousTimeModel, paclet:ref/ToContinuousTimeModel]) may add states to systems with neutral time delays:

ToContinuousTimeModel[(StateSpaceModelFull[1, 0, 0.5`, 0, 0, 0, 1-(SystemsModelDelay[2]), 0, 0.1`, 1, 2, 0, 0, 1, , ])]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ToDiscreteTimeModel, paclet:ref/ToDiscreteTimeModel])  ▪  (RefLink[LaplaceTransform, paclet:ref/LaplaceTransform])  ▪  (RefLink[MatrixLog, paclet:ref/MatrixLog])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Basic Systems Modeling, paclet:guide/Modeling])}, {▪(RefLinkPlain[Control Systems, paclet:guide/ControlSystems])}})}})