System Object Definition - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

Description of the Model of a Linear System Object

Description

 • A System object provides a unified representation of a linear system model. The following model types are supported: transfer function (TF), zero-pole-gain (ZPK), coefficients (Coeff), state-space (SS), diff-equation (DE). and ae-equation (AE).
 • The object is represented as a module. The exports of the module depend on the model type. The following sections describe each type.

System Types

Frequency-Based Models

The model types TF, Coeff, and ZPK are frequency-based and use transfer functions to express the relationships between inputs and outputs.

 • The transfer functions must correspond to rational polynomials of the frequency variable.
 • The rational polynomials must have real coefficients; symbolic values are considered real.
 • The rational polynomials need not be proper, the degree of the numerator may be greater than that of the denominator; however, improper transfer functions cannot be converted to the time-based models (SS and DE).

Transfer-Function Model (TF)

 • The TF model expresses the transfer function between a given input and output as an explicit rational polynomial of the frequency variable.
 • For a continuous-time model, the frequency variable is the name assigned to the complexfreqvar variable of the DynamicSystems[SystemOptions] command; its default value is s. The rational polynomial $\frac{3s}{bs+{s}^{2}+a}$ is a typical example.
 • For a discrete-time model, the frequency variable is the name assigned to the discretefreqvar variable of the DynamicSystems[SystemOptions] command; its default value is z. The rational polynomial $\frac{1}{\mathrm{\pi }{z}^{2}+4}$ is a typical example.

Zero-Pole-Gain Model (ZPK)

 • The ZPK model expresses the transfer function between a given input and output as a list of zeros (roots of the numerator), a list of poles (roots of the denominator), and a scaling factor. An empty list corresponds to the unit polynomial, $1$.
 • As an example, the transfer function corresponding to the rational polynomial $\frac{3\left(s-1\right)}{\left(s-2\right)\left(s+3\right)}$ is represented in the ZPK model as the lists $\left[1\right]$, $\left[2,-3\right]$ and the scaling factor $3$. The same lists and scaling factor correspond to a discrete model with rational polynomial $\frac{3\left(z-1\right)}{\left(z-2\right)\left(z+3\right)}$.

Coefficient Model (Coeff)

 • The Coeff model expresses the transfer function between a given input and output as a list of the coefficients of the numerator and a list of the coefficients of the denominator of the rational polynomial. The first element in a list is the coefficient of the highest-order term of the corresponding polynomial. Element i in a list of n elements is the coefficient of the n-i order term. An empty list corresponds to the zero polynomial, $0$.
 • As an example, the transfer function corresponding to the rational polynomial  $\frac{{z}^{2}+2z-1}{{z}^{3}+z}$ can be represented as the lists $\left[1,2,-1\right]$ and $\left[1,0,1,0\right]$.

Time-Based Models

The model types SS and DE are time-based and use diff-equations to express the relationships between inputs and outputs.

State-Space Model (SS)

 • The SS model uses four Matrices, $A$, $B$, $C$, and $\mathrm{D}$, to represent the diff-equations.
 • For a continuous-time model, the corresponding differential equations are x'(t) = A . x(t) + B . u(t) and y(t) = C . x(t) + D . u(t), where u(t), y(t), and x(t) are the input, output, and state vectors, respectively, and t is the independent time variable.
 • For a discrete-time model, the corresponding difference equations are x(q+1) = A . x(q) + B . u(q) and y(q) = C . x(q) + D . u(q), where u(q), y(q), and x(q) are the input, output, and state vectors, respectively, and q is the independent discrete time variable.
 • The Matrices must be independent of the time variable.

Diff-Equation Model (DE)

 • The DE model uses equations to explicitly represent the differential/difference equations.
 • For a continuous-time model, the equations are differential equations in terms of the continuous time variable, which is the name assigned to the continuoustimevar variable of the DynamicSystems[SystemOptions] command; its default is t.
 • For a discrete-time model, the equations are difference equations in terms of the discrete time variable, which is the name assigned to the discretetimevar variable of the DynamicSystems[SystemOptions] command; its default is q.

Alg-Equation Model (AE)

 • The AE model creates an algebraic model from a system of algebraic equations.
 • For a continuous-time model, the equations are algebraic equations in terms of the continuous time variable, which is the name assigned to the continuoustimevar variable of the DynamicSystems[SystemOptions] command; its default is t.
 • For a discrete-time model, the equations are algebraic equations in terms of the discrete time variable, which is the name assigned to the discretetimevar variable of the DynamicSystems[SystemOptions] command; its default is q.

Module Exports

Exports Common to All System Types

 • systemname = string

Specifies the name of the system. This is used to identify the system. It has no effect on any of the operations.

 • inputcount = integer

Specifies the number of inputs of the system.

 • outputcount = integer

Specifies the number of outputs of the system.

 • statecount = integer

Specifies the number of states of the system. In representations that do not define states, such as transfer functions, this property is ignored.

 • discrete = truefalse

Specifies whether the system is discrete or continuous. If true the system is discrete, if false it is continuous.

 • sampletime = realcons

Specifies the sampling time (in seconds) of a discrete system.  This property is ignored if the system is continuous.

 • inputlist = list(algebraic)

Specifies a list of the input variables. Each variable is specified as a function of t; for example, u(t).

 • outputlist = list(algebraic)

Specifies a list of the output variables. Each variable is specified as a function of t; for example, y(t).

 • statelist = list(algebraic)

Specifies a list of the state variables. Each variable is specified as a function of t; for example, x(t).

Exports for a Transfer-Function System

 • tf = Matrix(algebraic)

Specifies the transfer functions of the system. Cell [i,j] contains the transfer function from input j to output i. The number of rows of the Matrix equals the number of outputs and the number of columns equals the number of inputs.

The transfer functions of a continuous system are rational polynomials in s. The transfer functions of a discrete system are rational polynomials in z. The global variables s and z correspond to the values of complexfreqvar and discretefreqvar in DynamicSystems[SystemOptions].

Exports for a Zero-Pole-Gain System

 • z = Matrix(list(algebraic))

Specifies the zeros of the transfer functions of the system. Cell [i,j] contains the list of zeros of the transfer function from input j to output i. The number of rows of the Matrix equals the number of outputs and the number of columns equals the number of inputs.

 • p = Matrix(list(algebraic))

Specifies the poles of the transfer functions of the system. Cell [i,j] contains the list of poles of the transfer function from input j to output i. The number of rows of the Matrix equals the number of outputs and the number of columns equals the number of inputs.

 • k = Matrix(algebraic)

Specifies the scaling factors of the transfer functions of the system. Cell [i,j] contains the scaling factor of the transfer function from input j to output i. The number of rows of the Matrix equals the number of outputs and the number of columns equals the number of inputs.

Exports for Coefficient System

 • num = Matrix(list(algebraic))

Specifies the coefficients of the numerators of the transfer functions of the system. Cell [i,j] contains the list of coefficients, the highest-order term first, for the transfer function from input j to output i. The number of rows of the Matrix equals the number of outputs and the number of columns equals the number of inputs.

 • den = Matrix(list(algebraic))

Specifies the coefficients of the denominators of the transfer functions of the system. Cell [i,j] contains the list of coefficients, the highest-order term first, for the transfer function from input j to output i. The number of rows of the Matrix equals the number of outputs and the number of columns equals the number of inputs.

Exports for State-Space System

 • a = Matrix(algebraic)

Specifies the A (state) matrix of a state-space representation. The number of rows and columns equals the number of states.

 • b = Matrix(algebraic)

Specifies the B (input) matrix of a state-space representation. The number of rows equals the number of states and the number of columns equals the number of inputs.

 • c = Matrix(algebraic)

Specifies the C (output) matrix of a state-space representation. The number of rows equals the number of outputs and the number of columns equals the number of states.

 • d = Matrix(algebraic)

Specifies the D (direct-through) matrix of a state-space representation. The number of rows equals the number of outputs and the number of columns equals the number of inputs.

Exports for Diff-Equation System

 • de = list(algebraic)

Specifies the differential or difference equations. A continuous system uses differential equations with t as the time variable; for example, diff(y(t), t, t) = diff(y(t), t) + u(t). A discrete system uses difference equations with q as the discrete time variable; for example,  y(q+1) = y(q) - u(q). The global variables t and q correspond, respectively, to the values of continuoustimevar and discretetimevar in DynamicSystems[SystemOptions].

Exports for Algebraic Equation System

 • ae = list(algebraic)

Specifies the algebraic equations. A continuous system uses algebraic equations with t as the time variable; A discrete system uses difference equations with q as the discrete time variable; The global variables t and q correspond, respectively, to the values of continuoustimevar and discretetimevar in DynamicSystems[SystemOptions].

Examples

 > $\mathrm{with}\left(\mathrm{DynamicSystems}\right):$

Create a transfer function system.

 > $\mathrm{sys}≔\mathrm{TransferFunction}\left(\frac{1}{{s}^{2}+3s+5}\right):$
 > $\mathrm{PrintSystem}\left(\mathrm{sys}\right)$
 $\left[\begin{array}{l}{\mathbf{Transfer Function}}\\ {\mathrm{continuous}}\\ {\mathrm{1 output\left(s\right); 1 input\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{\mathrm{u1}}{}\left({s}\right)\right]\\ {\mathrm{outputvariable}}{=}\left[{\mathrm{y1}}{}\left({s}\right)\right]\\ {{\mathrm{tf}}}_{{1}{,}{1}}{=}\frac{{1}}{{{s}}^{{2}}{+}{3}{}{s}{+}{5}}\end{array}\right$ (1)

Access the rational polynomial of the system.

 > ${\mathrm{sys}:-\mathrm{tf}}_{1,1}$
 $\frac{{1}}{{{s}}^{{2}}{+}{3}{}{s}{+}{5}}$ (2)

 See Also