Method of mss.
Convert a continuous-time MTI system to a discrete-time MTI system.
Source: src/model/@mss/c2d.m
sysd = c2d(sysc, Ts)
sysd = c2d(sysc, Ts, method)c2d discretizes the continuous-time explicit model
with sample time Ts > 0. The model must be continuous
(timeStepSize == 0), otherwise the call errors with
“The mss model is already discrete.”
The method decides both the approximation and
the class of the result:
method |
Rule | Result |
|---|---|---|
"forward" (default) |
Forward Euler, | mss — stays
explicit |
"backward" |
Backward Euler | mdss — implicit,
warns |
"tustin" |
Trapezoidal | mdss — implicit,
warns |
Only forward Euler preserves the explicit multilinear structure: the
successor state is still an explicit multilinear function of
.
Backward Euler and Tustin make
appear on both sides, so the model is converted with mss2mdss and handed
to c2d of the
mdss class, after issuing a warning that the return type
changed. In this case, if the mtiBase of sysc
was the literal base, the model base is not preserved because the
mdss class does not yet support literal base models.
The discretization is applied directly to the CPN matrices rather than symbolically. With the structure matrix and the state and output parameter blocks, one monomial column per state is appended — each selecting a single state — and the parameter matrix is extended so that the state block reads and the output block :
which is exactly
,
.
Signal names are carried over and the result is cleaned up with trivialReduction.
On the TTTensor
path the same forward-Euler step is performed by scaling the
state-equation rows of the first core by Ts and adding an
identity tensor train. That path always applies forward Euler —
method is not consulted — and it neither copies signal
names nor runs trivialReduction.
| Argument | Description |
|---|---|
sysc |
Continuous-time mss model
(timeStepSize == 0). |
Ts |
Sample time, Ts > 0. |
method |
(optional) "forward" (default),
"backward" or "tustin". |
| Output | Description |
|---|---|
msys |
Discrete-time model: an mss for "forward",
an mdss for "backward" /
"tustin". |
sysc = rmss(3,1,1,4); % random continuous-time model
sysd = c2d(sysc, 0.01); % forward Euler, still an mss
sysi = c2d(sysc, 0.01, "backward"); % warns; returns an mdssd2c · mss · msim · trivialReduction
· mss2mdss · c2d
MyToolbox Documentation | Generated automatically by CI/CD pipeline