What's New in the MapleSim Control Design Toolbox

The MapleSim Control Design Toolbox now offers a more complete set of algorithms for PID control, new commands for computing closed-loop transfer functions, and numerous improvements to existing commands. These enhancements allow engineers to design a greater variety of controllers and controller-observer systems while taking advantage of the greater flexibility and analysis options available through the use of symbolic parameters.

Improvements include:

- New command for PID controller automatic tuning
- Updates to existing PID tuning commands to choose the format of the returned controller parameters
- Updates to existing control design commands to support the DynamicSystems parameters option, which is new in Maple 18
- New commands for the automatic computation of design parameters, such as poles and weighting matrices, for state feedback control design
- New commands for system manipulation (for example, determining the closed-loop equations of common feedback system configurations) and simplification (for example, eliminating the structurally non-minimal states of a system)

**PID automatic tuning**

The PIDAutoommand performs automatic tuning of a PID controller based on a single tuning parameter, Tc, which has the same order of magnitude as the desired time constant of the closed-loop. The time constant is proportional to the settling time of the system (first order approximation) and, therefore, provides a simple way to specify the desired closed-loop system response. This command can obtain the PID controller parameters for a wide range of plants, including unstable systems. The best-suited tuning method is automatically selected according to both the order and stability of the input system. For instance, for stable higher order systems (order greater than 2), Skogestad internal model control (SIMC) tuning rules are applied.

Design a PID controller for a system of order 7 with desired time constant Tc = 0.77.

**PIDAuto: Using Skogestad IMC tuning rules**

Return a DynamicSystems system object directly.

**PIDAuto: Using Skogestad IMC tuning rules**

Design a PID controller for an integrating process with desired time constant Tc = 1.0.

**PIDAuto: Using PIDUnstable**

Return a DynamicSystems system object directly.

**PIDAuto: Using PIDUnstable**

**PID tuning commands returned format**

Existing PID tuning commands accept new options such as factored and returntypewhich are useful for specifying the way in which the controller parameters are returned. Use the option factored to return either the controller gains (proportional, integral, and derivative gain *Kp*, *Ki*, and *Kd*) or their factored version (proportional gain, integral time, and derivative time *K*, *Ti*, *Td*). Use the option returntype to return a *record,* a *list* or a* system *containing the controller parameters in either form or a DynamicSystems system object. The updated commands are CohenCoon, DominantPole, GainPhaseMargin, ZNFreq, and ZNTimeModified.

By default, the CohenCoon command returns a *list* containing the PID controller gains *Kp*, *Ki*, and *Kd*.

Using the new options factored and returntype, the CohenCoon command can return a *record* containing the factored version of the PID controller gains.

By default, the DominantPole command returns a sequence of *lists* containing the controller gains (*Kp *and *Ki *in this case) and the closed-loop poles.

Using the option returntype, the DominantPole command can return a DynamicSystems system object directly.

**Support of parameters option**

Existing ControlDesign< commands that accept DynamicSystems system objects as input now accept the parameters< option. You can use this option to define numeric values for symbolic parameters existing in the system object. This option is the same as the DynamicSystems parameters option. For examples of its use see the sections below.

**State Feedback design parameters**

Two new commands ComputePoles and ComputeQR help with the calculation of the pole locations for Ackermann's formula and the Q and R weighting matrices for LQR design.

**ComputePoles**

The Ackermann command calculates the state feedback gain required in order to place the closed-loop poles in the desired locations. The ComputePoles automatically computes these pole locations such that the closed-loop system response has a desired time constant, Tc.

**ComputeQR**

The LQR command calculates the linear quadratic state feedback regulator (LQR) gain given the weighting matrices Q and R. The ComputeQR command automatically computes these weighting matrices Q and R to obtain a closed-loop system with desired time constant, Tc.

**System manipulation and simplification**

The new commands for system manipulation and simplification are ControllerObserver, PIDClosedLoop, StateFeedbackClosedLoop, and ReduceSystem.

**ControllerObserver**

The ControllerObserver command calculates the equations of the subsystem comprised of a state feedback controller and an observer. This command is useful, for example, to construct an LQG controller comprised of an LQR state feedback controller and a Kalman observer. Use the closedloop option to obtain the closed-loop equations of the system with state feedback and observer.

Define the numeric value for parameter

Design the LQR controller

Design the Kalman observer

Obtain the LQG controller.

Obtain the LQG control system closed-loop equations.

**PIDClosedLoop**

The PIDClosedLoop command calculates the closed-loop system equations of a feedback system with the controller Gc located in the forward path before the plant Gp and inside the feedback loop. The feedback system has unity negative feedback. This is a basic feedback structure commonly used for P/PI/PID control, hence the name of the command.

Use the PIDClosedLoop command to access the controller output node through the augment_output option.

**StateFeedbackClosedLoop**

The StateFeedbackClosedLoop command calculates the closed-loop system equations of a plant with state feedback. This command requires the state feedback gain matrix Kc, but can also accept the feed-forward matrix Kr to support a state feedback structure with control law

**ReduceSystem**

The ReduceSystem command simplifies a state-space system by detecting and removing its structural unobservable and uncontrollable states. These struturally non-minimal states may occur, for example, as a result of extracting a subsystem from a subset of its inputs and/or outputs. The reduced state-space system is structurally minimal, that is, contains a subset of the original system states but preserves its state structure and variable names. The input/output response of the reduced system is equivalent to the transfer function of the original system.

Get a subsystem with inputs *u1(t)* and *u2(t). *This subsystem is uncontrollable and unobservable.

Get a structurally minimal system removing the non-minimal (structural uncontrollable and unobservable) states.

Verify the input/output response is not affected by the removed states.