DynamicSystems[Simulate]  simulate a system

Calling Sequence


Simulate( sys, input, opts )


Parameters


sys



System; system object

input



algebraic, list(algebraic), Vector(realcons), list(Vector(realcons)), or Matrix(realcons); input signal

opts



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





Options


•

initialconditions = Vector( realcons ) or list( equation ):

Specifies the initial conditions of the system. For a statespace system the initial condition is specified as a Vector, while for the differential equation system, the initial conditions is a list of equations. The discrete difference equation is first converted to a transfer function representation and then to statespace representation, and as a result any initial conditions specified are ignored. The transfer function, coefficients, and zeropolegain systems ignore the initial conditions. If omitted, the zero initial conditions are used.
•

parameters = set(name = complexcons) or list(name = complexcons)

Specifies numeric values for parameters in sys. These values override those specified by the parameters field of the system object, which in turn override the settings in in . The numeric value on the righthand side of each equation is substituted for the name on the lefthand side in the expressions that define the model. No checking is done during the substitution to determine whether the substituted value is valid. For example, a complex value can be substituted for the coefficient of a polynomial. If the complex value had been originally assigned to the model at creation, a warning would be generated.

Continuous System Options


The following options apply to continuous systems.
•

output = solution, de, statevariable, outputvariable or a list of same

Specifies the content of the output. The following describes the output for each of the possible values. Multiple values can be selected by enclosing them in a list. Each element in the returned list/sequence (see returnlist, below) corresponds to the selected value.
–

solution: dsolve solution procedure; the default

–

de: system of diffequations

–

outputvariable: list of the outputvariables

–

statevariable: list of the statevariables

–

dsolveargs: additional arguments passed to dsolve; includes the value of the option dsolveargs (see below).

•

dsolveargs = list( equation )

Specifies additional parameters to be passed to dsolve. For typical values, see dsolve,numeric.

True means return a list; false means return an expression sequence. The default is false.




Description


•

The Simulate command computes the transient response of sys, a linear system object, to input, a given input waveform. Both continuous and discrete systems can be simulated.


Continuous Systems


•

Continuous systems are simulated using dsolve[numeric]. The system is converted to a set of differential equations and initial conditions that are passed to dsolve.

•

Systems of type transfer function, coefficient, or zeropolegain are converted to a statespace representation that is then converted to a set of differentialequations.

•

If the variable names for the states are not given (transfer function, coefficient, and zeropolegain) then the value of statevariable from DynamicSystems[SystemOptions] is used with a numerical index appended.

•

A statespace system is converted to a set of differential equations.

•

A diffequation system is used as is.

•

The input waveform, input, is given in terms of t, the time variable. For a single input system input is an algebraic expression, for a multipleinput system input is a list of algebraic expressions. Heaviside functions in the input are converted to equivalent eventbased steps.

•

By default the output is a dsolve procedure that takes the value of t as the input parameter.



Discrete Systems


•

A discrete system is simulated by converting it to a statespace representation and then iterating through the statespace equations.

•

If the variable names for the states are not given (transfer function, coefficient, and zeropolegain) then the value of statevariable from DynamicSystems[SystemOptions] is used with a numerical index appended.

•

The input waveform, input, consists of discrete values. For a single input system it is a Vector or a onecolumn Matrix. For a multiple input system it is a list of Vectors or a Matrix; the number of Vectors (columns of the Matrix) corresponds to the number of inputs of sys.

•

The output is a list of Vectors. Each Vector corresponds to an output of the system. The dimension of the Vectors match the dimension of the input Vector.

•

The calculation can be performed either as a hardware floatingpoint or software floatingpoint. The environment variable UseHardwareFloats determines which floatingpoint representation is used.




Examples


>


>


 (1) 
>


 (2) 
>


 (3) 
>


 (4) 
>


 (5) 
>


 (6) 
>


 (7) 
>


>


 (8) 
>


 (9) 
>


>


>


 (10) 
>


>


>


>


>


>


 (11) 
>


 (12) 
>


 (13) 
>


 (14) 
>


>



