d2c

Method of mdss.

Convert a discrete-time mdss model to continuous time.

Source: src/model/@mdss/d2c.m

Syntax

sysc = d2c(sysd)

Description

d2c continualizes the discrete-time model sysd (which must have timeStepSize > 0). The sample time is taken from the model itself, so no Ts argument is passed. The state prediction xk+1x_{k+1} is replaced by a finite-difference expression in the state derivative, realised by adding an auxiliary variable and equation per state and eliminating what can be removed via algebraicElimination. The result carries timeStepSize = 0.

d2c uses the one-step forward-Euler relation, so it inverts a matching c2d discretization.

Input arguments

Argument Description
sysd Discrete-time mdss model (timeStepSize > 0).

Output arguments

Output Description
sysc Continuous-time mdss model (timeStepSize = 0), with the one-step Euler prediction replaced by the state derivative and eliminable auxiliary equations removed.

Example

sysc = stringParser.symbolicToMdss(["xp1 = x2"; ...
                                    "xp2 = -x1 - 0.5*x2"], 0);

sysd  = c2d(sysc, 0.1);   % discretize
sysc2 = d2c(sysd);        % back to continuous time (sample time from the model)

See also

c2d · d2d · mdss · msim


MyToolbox Documentation | Generated automatically by CI/CD pipeline