Dynamic Systems

Maple provides a series of control systems design tools that give you the ability to work analytically with linear time-invariant dynamic systems. The DynamicSystems package is a collection of procedures for creating, manipulating, simulating, and plotting linear time-invariant systems models. Maple 18 includes several updates to existing commands as well as new commands:

The new release of the MapleSim Control Design Toolbox also takes advantage of these improvements to the DynamicSystems package in Maple, as well as offering a more complete set of algorithms for PID control and new commands for computing closed-loop transfer functions.

> with(DynamicSystems); -1

Parameters Option

All system constructors, such as TransferFunction and DiffEquation, now accept a parameters option that consists of a list of equations specifying the parameter names and corresponding values. These parameters are used by procedures that require numeric values, for example, the plot routines. Most procedures that require numeric systems also provide a parameters option that can override the parameters assigned to the system.

> sys := TransferFunction(`/`(`*`(A), `*`(`+`(s, omega))), parameters = [A = 1, omega = 2]); -1
> MagnitudePlot(sys)

Here, the parameters option of the plot procedure overrides the parameter A in the object:

> MagnitudePlot(sys, parameters = [A = 100])

StateSpace Options

Random Systems

The StateSpace constructor accepts new options such as randomtest and genbound which are useful for generating random stable state-space systems.

> ss1 := StateSpace('randomtest', 'numstates' = 3, 'numinputs' = 2, 'numoutputs' = 1, 'genbound' = 5.); -1
> PrintSystem(ss1)

Symbolic Systems

The StateSpace constructor also accepts the usesymbols keyword option, which can be used to construct state matrices with symbolic elements.

> ss2 := StateSpace('numstates' = 3, 'numinputs' = 2, 'numoutputs' = 1, 'usesymbols'); -1
> PrintSystem(ss2)

ToDiscrete Methods

A new method for discretization, first-order hold (foh), has been added to the ToDiscrete command. Like the zero-order hold method, this method can be applied to state-space, transfer-function, and coefficient system types.

Connection Commands

A number of new commands for interconnecting systems have been added:

  • AppendConnect: Create the equivalent system representation of two or more system objects combined by appending their inputs and output
  • FeedbackConnect: Create the equivalent system representation of one or two system objects with positive or negative feedback connection.
  • ParallelConnect: Create the equivalent system representation of two or more system objects connected in parallel.
  • SeriesConnect: Create the equivalent system representation of two or more system objects connected in series.

> sys1 := StateSpace(usesymbols, numstates = 2, numinputs = 1, numoutputs = 1, symbols = [A1, B1, C1, D1]); -1
> PrintSystem(sys1)
> sys2 := StateSpace(usesymbols, numstates = 2, numinputs = 1, numoutputs = 1, symbols = [A2, B2, C2, D2]); -1
> PrintSystem(sys2)
> sys_series := SeriesConnect([sys1, sys2]); -1
> PrintSystem(sys_series)
> sys_parallel := ParallelConnect([sys1, sys2]); -1
> PrintSystem(sys_parallel)

ToContinuous and Resample Commands

The ToContinuous command converts discrete systems to continuous systems using a specified conversion method.

> sysd := TransferFunction(`/`(1, `*`(`+`(z, a))), discrete, parameters = [a = 3]); -1
> sysc1 := ToContinuous(sysd, method = forward); -1
> PrintSystem(sysc1)
> sysc2 := ToContinuous(sysd, method = prewarp); -1

> PrintSystem(sysc2)

The Resample command resamples a discrete system with a new sampling time.

> sysd2 := Resample(sysd, 2, method = prewarp); -1
> PrintSystem(sysd2)

Norms and Noise Analysis

TheNormH2 and NormHinf commands compute the H__2 and `H__∞` norms, respectively, of a system. 

> sys := TransferFunction(`/`(1, `*`(`^`(`+`(s, 1), 2)))); -1
> NormH2(sys)
> NormHinf(sys)

The Covariance command computes the output covariance Matrix with the inputs driven by white Gaussian noise.

> Covariance(sys, `<|>`(`<,>`(1)))
Matrix(%id = 18446744078088537142)