create a state-space system object - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Science and Engineering : Dynamic Systems : System Object : DynamicSystems/StateSpace

DynamicSystems[StateSpace] - create a state-space system object

Calling Sequence

StateSpace(opts)

StateSpace(sys, opts)

StateSpace(tf, opts)

StateSpace(z, p, k, opts)

StateSpace(num, den, opts)

StateSpace(a, b, c, d, opts)

StateSpace(de, invars, outvars, opts)

Parameters

sys

-

System; system object

tf

-

algebraic or Matrix(algebraic); transfer function

z

-

list(algebraic) or Matrix(list(algebraic)); zeros

p

-

list(algebraic) or Matrix(list(algebraic)); poles

k

-

algebraic or Matrix(algebraic); gain(s)

num

-

list(algebraic) or Matrix (list(algebraic)); numerator coefficients

den

-

list(algebraic) or Matrix (list(algebraic)); denominator coefficients

a

-

Matrix; state-space matrix A

b

-

Matrix; state-space matrix B

c

-

Matrix; state-space matrix C

d

-

Matrix; state-space matrix D

de

-

equation or list(equation); diff-equations

invars

-

name, anyfunc(name) or list of same; input variables

outvars

-

name, anyfunc(name) or list of same; output variables

opts

-

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

Description

• 

The StateSpace command creates a state-space (SS) system object. The time-domain behavior of the object is modeled by four state-space Matrices, A, B, C, and D, that describe the input, output, and state equations.

• 

The input can be specified as one of several representations: transfer function (TF), zero-pole-gain (ZPK), coefficients (Coeff), state-space (SS), or diff-equations (DE).

• 

If no input is provided, a unity-gain SS system is created.

• 

The optional parameter sys is a system object; it is converted to the SS representation. All options are ignored.

• 

The optional parameter tf is the transfer function of a TF system. For a single-input/single-output system, tf is a rational function (ratpoly). For a multi-input/multi-output system, tf is a Matrix of rational functions. The indeterminate of the polynomials depends on whether the system is continuous or discrete; a continuous system typically uses s while a discrete system typically uses z as the indeterminate. The actual names are assigned by DynamicSystems[SystemOptions].

• 

The optional parameters z, p, and k are the zeros, poles, and gain, respectively, of a ZPK system. For a single-input/single-output system, z and p are lists and k is an algebraic expression. For a multi-input/multi-output system, z and p are Matrices of lists and k is a Matrix of algebraic expressions.

• 

The optional parameters num and den are the coefficients of the numerator and denominator, respectively, of a Coeff system. For a single-input/single-output system, num and den are lists, the first element being the coefficient of the highest order term. For a multi-input/multi-output system, num and den are Matrices of lists.

• 

The optional parameters a, b, c, and d are the four state-space matrices, A, B, C, and D, respectively, of an SS system.

• 

The optional parameter de is the difference/differential equation(s) of a DE system. A list is used to specify more than one equation.

• 

The parameters invars and outvars specify the input and output variables of difference/differential equations. They are not required, but if either is not specified then the corresponding keyword parameter inputvariable or outputvariable must be assigned. If both positional and keyword parameters are specified, the keyword parameter take precedence.

Examples

withDynamicSystems:

sys1:=StateSpace

sys1:=State Spacecontinuous1 output(s); 1 input(s); 1 state(s)inputvariable=u1toutputvariable=y1tstatevariable=x1t

(1)

PrintSystemsys1

State Spacecontinuous1 output(s); 1 input(s); 1 state(s)inputvariable=u1toutputvariable=y1tstatevariable=x1ta=0b=1c=0d=1

(2)

sys2:=StateSpacess3+5s2+7s+6:

PrintSystemsys2

State Spacecontinuous1 output(s); 1 input(s); 3 state(s)inputvariable=u1toutputvariable=y1tstatevariable=x1t,x2t,x3ta=010001−6−7−5b=001c=010d=0

(3)

sys3:=StateSpace1,2,1,2,3:

PrintSystemsys3

State Spacecontinuous1 output(s); 1 input(s); 2 state(s)inputvariable=u1toutputvariable=y1tstatevariable=x1t,x2ta=01−3−2b=01c=21d=0

(4)

sys4:=StateSpace,5+1I,51I,1:

PrintSystemsys4

State Spacecontinuous1 output(s); 1 input(s); 2 state(s)inputvariable=u1toutputvariable=y1tstatevariable=x1t,x2ta=01−26−10b=01c=10d=0

(5)

ss_a:=Matrix1,2,0,4

ss_a:=1204

(6)

ss_b:=Matrix3,7,9,6

ss_b:=3796

(7)

ss_c:=Matrix5,6,5,2

ss_c:=5652

(8)

ss_d:=Matrix0,0,0,0

ss_d:=0000

(9)

sys5:=StateSpacess_a,ss_b,ss_c,ss_d,discrete,sampletime=0.001,systemname=Example discrete MIMO system:

PrintSystemsys5

State Spacediscrete; sampletime = .1e-2systemname=Example discrete MIMO system2 output(s); 2 input(s); 2 state(s)inputvariable=u1q,u2qoutputvariable=y1q,y2qstatevariable=x1q,x2qa=1204b=3796c=5652d=0000

(10)

Create a system with symbolic matrices.

sys6:=StateSpace'usesymbols','numinputs'=2,'numoutputs'=3,'numstates'=4

sys6:=State Spacecontinuous3 output(s); 2 input(s); 4 state(s)inputvariable=u1t,u2toutputvariable=y1t,y2t,y3tstatevariable=x1t,x2t,x3t,x4t

(11)

PrintSystemsys6

State Spacecontinuous3 output(s); 2 input(s); 4 state(s)inputvariable=u1t,u2toutputvariable=y1t,y2t,y3tstatevariable=x1t,x2t,x3t,x4ta=a1,1a1,2a1,3a1,4a2,1a2,2a2,3a2,4a3,1a3,2a3,3a3,4a4,1a4,2a4,3a4,4b=b1,1b1,2b2,1b2,2b3,1b3,2b4,1b4,2c=c1,1c1,2c1,3c1,4c2,1c2,2c2,3c2,4c3,1c3,2c3,3c3,4d=d1,1d1,2d2,1d2,2d3,1d3,2

(12)

Create a random test state-space system

sys7:=StateSpace'randomtest','numstates'=6,'numinputs'=3,'numoutputs'=2,'genbound'=5:

PrintSystemsys7

State Spacecontinuous2 output(s); 3 input(s); 6 state(s)inputvariable=u1t,u2t,u3toutputvariable=y1t,y2tstatevariable=x1t,x2t,x3t,x4t,x5t,x6ta=−1211−4−405−70−5−3−1−40−14−2−12−3−41−8−23−5−203−11−21−1−5−24−13b=3−5511−1−25−32−32−53−3−2−25c=1−15−2−43−54−3−1−3−5d=−3405−42

(13)

eigs:=evalfLinearAlgebra:-Eigenvaluessys7:-a

eigs:=13.16245939+5.027249293I11.28053239+2.099451111I0.0717217004716.0422947311.280532392.099451111I13.162459395.027249293I

(14)

sys8:=StateSpace'randomtest','numstates'=2,'numinputs'=1,'numoutputs'=1,'genbound'=5.0:

PrintSystemsys8

State Spacecontinuous1 output(s); 1 input(s); 2 state(s)inputvariable=u1toutputvariable=y1tstatevariable=x1t,x2ta=6.1844154290699164.6555391949709120.61255640343601760.49777951161645007b=2.951999011370631372.65516788149002370c=−0.102356042117689228−3.13127395445621381d=−0.544137992891005062

(15)

eigs:=LinearAlgebra:-Eigenvaluessys8:-a

eigs:=6.64809571040089+0.I0.0340992302854792+0.I

(16)

See Also

DynamicSystems, DynamicSystems[Coefficients], DynamicSystems[DiffEquation], DynamicSystems[SystemObject], DynamicSystems[SystemOptions], DynamicSystems[TransferFunction], DynamicSystems[ZeroPoleGain]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam