MapleSim Control Design Getting Started Guide PDF
MapleSim Control Design Getting Started Guide PDF
iii
Introduction
The MapleSim™ Control Design Toolbox provides the necessary control design tools to extend the plant modeling
capabilities of MapleSim. Using a symbolic approach, you can design, analyze, and test control systems.
You can also use the technical documentation tools available with MapleSim to document your design decisions.
Systems that contain any type of discontinuity, including discrete transforms, switches, logic gates, relational and
Boolean operations are not supported by the current release of this product.
iv
1 Getting Started
1.1 Getting Help
In Maple, enter ?ControlDesign at a prompt in a worksheet.
Each example includes a linearization or PID tuning template in its Attachments palette.
To view an example:
1. In the Control Design Examples palette at the left side of the MapleSim window, click the entry for the model that
you want to view.
2. Under the Project tab, expand the Attachments palette and then expand Documents.
3. Right-click (Control-click for Macintosh®) PIDTuning and select View. The template opens in Maple.
Some models include additional documents, such as templates that show model equations or define custom components.
You can open any of these documents by right- or Control-clicking its entry and selecting View.
2. Click Templates ( ) in the Main Toolbar and from the list, select Linearization.
3. In the Attachment field, enter Linearized Motor as the worksheet name and click Create Attachment. Your
MapleSim model opens in the MapleSim Linearization Template in Maple.
4. Using the navigation controls above the model, browse to the DC Motor subsystem.
1
2 • Getting Started
5. Click Load Selected Subsystem. The Variable and Parameter Management fields are populated with information
specific to the subsystem. You can now specify the linearization point manually or have Maple automatically calculate
them for you as an equilibrium point.
6. To manually specify the values of the DAE, Input and Output variables, and Parameters, enter the values into appro-
priate value columns. Alternatively, to calculate the equilibrium point automatically, click Compute Equilibrium
Point.
7. Click Linearize to generate the linearized model. The Linearized Model and Variable Map fields are automatically
updated. In the Linearized Model display area, you can select and view the matrices of your linearized model. In
the Variable Mapping fields you can now select and view the state, input, and output mappings.
8. Scroll to the bottom of the template and under Create Component in the Model Name field, enter MyMotor. In
the description field you can add more information about your model.
9. Click Create to create the linearized state-space model. The MyMotor custom component now appears in the
Project → Definitions → Component palette in MapleSim.
10. Close the Linearization Template and return to the DC Motor model in MapleSim.
2. Click Templates ( ) in the Main Toolbar and from the list, select PID Tuning.
3. In the Attachments field, enter Motor PID as the worksheet name and click Create Attachment. Your MapleSim
model opens in the PID Tuning Template in Maple.
4. Using the navigation controls select the MyMotor subsystem from the drop-down list and click Load Selected
Subsystem. The Output Variables and Parameters and State-Space matrix fields are automatically populated.
3 • Getting Started
5. In the Output and Parameter Manipulation section click Reassign State-Space System to apply any changes
that are made the output variables or parameters.
6. In the Controller Design section of the template, you can select the method and controller type you wish to create.
For this example, create a Ziegler-Nichols Time Domain PID controller.
7. From the Method drop-down menu, select Ziegler-Nichols Time Domain (MZN). From the Controller drop-
down menu, select PID. If additional information is required for your control design method, the fields below these
menus will be populated and you can enter the required information.
8. In the field below the table with controller parameters, enter MyPID, click Design Controller and then click Export
to MapleSim. A custom component generates and exports to MapleSim.
9. Optionally, you can view the Modelica® code generated for the custom component by expanding the Modelica
text area. To analyze properties, you can use the plotting tools, such as Zero pole, Bode, Step Response, and Nyquist
in the Analysis section of the template.
6. Select Probe ( ) from the Model Workspace Toolbar and then click the connection line between the DC Motor
and Feedback component.
7. Click the probe once to position it.
9. Click Run Simulation ( ) in the Main Toolbar to simulate your model. When the simulation is complete, the
following graph appears.
4 • Getting Started
You can change the parameters of your controller directly in your model in MapleSim by selecting the PID controller
component and editing the parameters in the Inspector tab.
Index
C
Control Design Examples Palette, 1
Control Design help, 1
Control Design package, iv
creating a custom controller, 2
custom controller
creating, 2
G
generating a linearized model, 1
L
Linearization template, 1
linearized model
generating, 1
P
PID Tuning template, 2
T
templates
Control Design, 1
Linearization, 1
PID Tuning, 2