Control Systems Design Tools:
Creating and Working with System Objects
? Maplesoft, a division of Waterloo Maple Inc., 2008
Introduction
Maple provides a series of controls 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. In this Tips and Techniques, you will learn how linear systems are modeled using the DynamicSystems package, how to create System Objects, and how to transform your models between a variety of different representations.
You can get detailed information on this package by entering
.
Creating System Objects
The DynamicSystems package allows you to work with both continuous and discrete system objects representations. All analysis in the DynamicSystems package is done on a System Object, which is a data structure providing a unified representation of a linear system model. These may be created and defined in several ways, including differential equations, transfer functions, state space matrices, and zero-pole-gain representations, and may be transformed from one form to another.
The following model types are supported:
Frequency-Based Models
(use transfer functions to express the relationships between inputs and outputs)
|
Time-Based Models
(use diff-equations to express the relationships between inputs and outputs)
|
- Coefficients (of the numerators and denominators of transfer functions)
|
- Diff-Equation (differential or difference equations)
- AE-Equation (algebraic equations)
|
Example: Creating a System Object from Differential Equations
This example deals with a system representing an electric motor, defined by two differential equations.
Before creating a system object, you need to load the DynamicSystems package. You can do this using the
command:
First, define the two differential equations that govern the behavior:
![[`+`(`*`(L, `*`(diff(i(t), t))), `*`(R, `*`(i(t)))) = `+`(v(t), `-`(`*`(K, `*`(diff(theta(t), t))))), `+`(`*`(J, `*`(diff(diff(theta(t), t), t))), `*`(b, `*`(diff(theta(t), t)))) = `*`(K, `*`(i(t)))]](/view.aspx?SI=6587/ControlSystemsDesignTools_13.gif) |
(2.1.2) |
...and the corresponding parameters:
![[J = 0.1e-1, K = 0.1e-1, L = .5, R = 1, b = .1]](/view.aspx?SI=6587/ControlSystemsDesignTools_15.gif) |
(2.1.3) |
You can now create a system object based on these differential equations:
 |
(2.1.4) |
The first argument is the list of differential equations, which is followed by a list of the input and output variables. In this case the input is the voltage applied, and the two outputs are the angular position of the shaft and the current drawn.You can review the system object properties with the PrintSystem command:
 |
(2.1.5) |
Creating Different System Object Representations
The following table lists commands you can use to create different types of system objects:
Command
|
What it does
|
Example
|
|
Creates a diff-equation system object.
The time-domain behavior of the object is modeled by differential or difference equations, depending whether the system is continuous or discrete, respectively.
|

 |
(2.2.1) |
|

|
Creates a transfer function system object.
Expresses the transfer function between a given input and output as an explicit rational polynomial of the frequency variable.
|
 |
(2.2.2) |
|
|
Creates a state-space 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.
|
 |
(2.2.3) |
|
|
Creates a zero-pole-gain system object.
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.
|
 |
(2.2.4) |
|
|
Creates a coefficients transfer system object.
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.
|
 |
(2.2.5) |
|
|
Creates an algebraic-equation system object (i.e. a system whose input/output equations are given by non-differential algebraic equations).
It is provided to permit code generation of algebraic-equation blocks.
Note: This object cannot be used by many of the commands in the DynamicSystems package.
|
Warning, making the following substitutions: x = x(t), y = y(t). |
|
 |
(2.2.6) |
|
Tip: A variety of styles of arguments may be used in the above commands. You may, for example, create a TransferFunction system object using a transfer function as the argument:
 |
(2.2.7) |
... but this is not necessary. You may use transfer functions, differential equations, lists of coefficients, and so on as arguments for any of the above commands (except AlgEquation which will only accept algebraic equations).
For example, you can use a transfer function as an argument when creating a DiffEquation system object:
 |
(2.2.8) |
... or coefficients as the argument when creating a StateSpace system object:
 |
(2.2.9) |
Incidentally, notice that the system objects above, sys7 and sys8, are essentially transformations of each other, as the same transformation was used as an argument for each. The next section will explain further how to directly convert between different system object representations.
See the Help pages for more details on using each specific command.
Converting between System Object Representations
You can also easily convert system objects to different representations. For example, you can convert from the DiffEquation system object in the example:
 |
(3.1) |
...to a State Space system object:
 |
(3.2) |
Again, use the PrintSystem command to view the detailed representation:
 |
(3.3) |
Similarly, you can convert to a Transfer Function representation:
 |
(3.4) |
... and print the details:
 |
(3.5) |
Tip: You can do the conversions whether the system is symbolic or fully parametrized.
Additional Tools
The DynamicSystems package also contains a number of plotting, analysis, and simulation tools. Standard plotting tools, such as Bode and Root-Locus plots, are available and can be used to plot both continuous and discrete system objects. The DynamicSystem System Manipulation Tools provide a mechanism for the advanced analysis of systems, including stability, observability, controllability, and sensitivity. System objects may be simulated using the DynamicSystem Simulation Tools to obtain frequency, impulse and transient response.
For more information, please see
.
Legal Notice: The copyright for this application is owned by Maplesoft. The application is intended to demonstrate the use of Maple to solve a particular problem. It has been made available for product evaluation purposes only and may not be used in any other context without the express permission of Maplesoft.