# Control System Toolbox Release Notes

## R2015b

New Features, Bug Fixes

#### `pid2` and `pidstd2` Model Objects: Represent, analyze, and use 2-DOF PID controllers for control design

The new numeric LTI models `pid2` and `pidstd2` are specialized for modeling two-degree-of-freedom (2-DOF) PID controllers. These are analogous to the 1-DOF PID models `pid` and `pidstd`.

Use `pid2` and `pidstd2` to represent a 2-DOF PID controller directly with the PID parameters, expressed in parallel (`pid2`) or standard (`pidstd2`) form. For example, `C2 = pid2(Kp,Ki,Kd,Tf,b,c)` creates a 2-DOF PID controller in parallel form with proportional, integral, and derivative gains `Kp`, `Ki`, and `Kd`, derivative filter time constant `Tf`, and setpoint weights `b` and `c`. In previous releases, to model a 2-DOF PID controller, you had to derive the controller's equivalent transfer function (or other model), and could not directly store the 2-DOF PID parameters.

The `pid2` and `pidstd2` commands can also convert to PID form any type of LTI object that represents a 2-DOF PID controller.

This release also includes new functions to help you work with 2-DOF PID controllers. These functions include:

#### 2-DOF PID Controller Tuning: Automatically tune the gains of 2-DOF PID controllers with PID Tuner app and `pidtune` command

You can now use `pidtune` and PID Tuner to tune all parameters of a two-degree-of-freedom (2–DOF) PID controller, including the setpoint weights b and c. When you call `pidtune` or open the PID Tuner app with a plant, the software automatically tunes all parameters of the block to achieve a balance between performance and robustness. When you use the Response Time and Transient Behavior sliders to adjust that balance, PID Tuner adjusts all parameters, including b and c if necessary.

PID Tuner and `pidtune` also include options for tuning 2-DOF PID controllers with fixed setpoint weights, such as I-PD (b = 0, c = 0) and P-ID (b = 1, c = 0).

#### Save Current Controller Design as Baseline in PID Tuner

In PID Tuner, you can now make the current controller design the baseline controller at any time. This feature allows to you compare the performance of a PID Tuner controller design to the performance of controllers obtained by further adjustment of the design.

To make the current PID Tuner design the baseline controller, by click the Export arrow and select ```Save as Baseline```.

When you do so, the current Tuned response becomes the Baseline response. Further adjustment of the current design creates a new Tuned response line.

Previously, you could only designate a baseline controller when you opened the PID Tuner using the syntax `pidTuner(sys,C0)`.

#### Change in LPV System block default values for model delays

The default value is now `false` for Input delay, Output delay, and Internal delay, in the Fixed Entries tab of LPV System Block Parameters dialog box. A `false` value means that model delays are treated as free during simulation.

For information about changing the default values, see the LPV System block reference page.

#### Analysis Plots Wrap Phase in Interval [0º,360º)

By default, response plots that show phase response, such as Bode and Nichols plots, display the exact phase. You can make these plots wrap the phase into the interval [0º,360º) by unchecking Unwrap Phase in the plot Property Editor. Previously, unchecking this option caused the plots to wrap the phase into [–180º,180º). The change makes it easier to visualize 180º phase crossings on analysis plots.

The default plot behavior (exact or unwrapped phase) is unchanged. The behavior of commands that return numerical phase response data, such as `bode`, is also unchanged. These commands always return the unwrapped phase.

## R2015a

New Features, Bug Fixes, Compatibility Considerations

#### Improved input disturbance rejection with the PID tuning algorithm​

Controller tuning with the PID Tuner app or the `pidtune` command now yields better disturbance rejection by default. For a given target phase margin, the tuning algorithm selects PID coefficients that achieve a balance between reference tracking and input disturbance rejection. If you require more disturbance rejection or better reference tracking than the default algorithm provides, PID Tuner and `pidtune` have a new Design Focus option. Use this option to alter the balance that the tuning algorithm sets between reference tracking and input disturbance rejection. For instance, setting the design focus to reference tracking improves the reference tracking performance of the tuned controller, with some cost to disturbance rejection. Similarly, setting the design focus to input disturbance rejection improves rejection with some cost to reference tracking. Changing design focus is most effective when tuning PID and PIDF controllers, rather than controllers with fewer free parameters, such as PI.

To use the Design Focus option in PID Tuner, click Options and select a design focus from the Focus menu.

You can still use the Response Time and Transient Behavior sliders to further adjust the balance between reference tracking and input disturbance rejection.

To specify a design focus for command-line tuning with `pidtune`, use `pidtuneOptions` to set the `DesignFocus` option. For example, the following commands design a PIDF controller for the plant `G` with a crossover frequency of 10 rad/s, specifying reference tracking as the design focus.

```opt = pidtuneOptions('DesignFocus','reference-tracking'); C = pidtune(G,'pidf',10,opt);```

#### Option to specify code generation settings in LPV System block

You can now specify code generation settings in the LPV System block. You specify these settings in the Code Generation tab of the block parameters dialog box.

#### `connect` command syntax for specifying analysis point locations

When you interconnect dynamic system models using the `connect` command, you can now specify analysis point locations as an input argument to the command. The following syntax creates a dynamic system model with analysis points by interconnecting multiple models `sys1,sys2,...,sysN`:

`sys = connect(sys1,sys2,...,sysN,inputs,outputs,APs);`

`inputs` and `outputs` are string vectors that specify the names of the inputs and outputs of the interconnected model. `APs` is a string vector that lists the signal locations at which to insert analysis points. The software automatically inserts an `AnalysisPoint` block with channels corresponding to these locations. Previously, you had to create `AnalysisPoint` blocks separately and include them in the list of models to connect.

For example, consider the following control system.

Use `connect` to build this system with an analysis point at the plant input, u.

```C.InputName = 'e'; C.OutputName = 'u'; G.InputName = 'u'; G.OutputName = 'y'; Sum = sumblk('e = r-y'); T = connect(G,C,Sum,'r','y','u');```

These commands return a generalized state-space (`genss`) model with one `AnalysisPoint` block. You can use the analysis point, for example, to extract the open-loop response of the system at u:

`L = getLoopTransfer(T,'u',-1);`

For a more detailed example, see Mark Analysis Points in Closed-Loop Models. For more information about using analysis points in dynamic system models, see the `AnalysisPoint` reference page.

#### LTI Viewer renamed to Linear System Analyzer

The LTI Viewer app is now called Linear System Analyzer. The functionality of the app is unchanged.

You can access Linear System Analyzer in two ways:

• From the MATLAB® desktop, in the Apps tab, in the Control System Design and Analysis section, click Linear System Analyzer.

• From the MATLAB command line, use the `linearSystemAnalyzer` function. Previously, this function was called `ltiview`. Using `ltiview` to open Linear System Analyzer does not generate an error in this release, but the function might be removed in a future release.

#### Compatibility Considerations

If you have scripts or functions that use `ltiview`, consider replacing those calls with `linearSystemAnalyzer`.

#### `sisotool` function renamed to `controlSystemDesigner`

The `sisotool` function is now called `controlSystemDesigner`. The `controlSystemDesigner` opens the SISO Design Tool. You can also access SISO Design Tool from MATLAB desktop. In the Apps tab, in the Control System Design and Analysis section, click Control System Designer.

Using `sisotool` to open SISO Design Tool does not generate an error in this release, but the function might be removed in a future release.

#### Compatibility Considerations

If you have scripts or functions that use `sisotool`, consider replacing those calls with `controlSystemDesigner`.

#### `getBlockValue` returns all block values in structure

A new syntax of the `getBlockValue` command now returns the current values of all Control Design Blocks of a generalized model (`genss`) in a structure. The following syntax returns a structure, `S`, whose field names are the names of the blocks in the `genss` model `M`. The values of the fields are numerical LTI models or numerical values equal to the current values of the corresponding Control Design Blocks.

`S = getBlockValue(M)`

This syntax lets you transfer the block values from one generalized model to another model that uses the same Control Design Blocks, as follows:

```S = getBlockValue(M1); setBlockValue(M2,S);```

For more information, see the `getBlockValue` reference page.

#### Compatibility Considerations

Previously, the syntax `getBlockValue(M)` returned the current values of the blocks of `M` as a vector list:

`[Val1,Val2,...,ValN] = getBlockValue(M)`

Now, using this syntax causes an error. You can still obtain block values in a list by specifying the block names as input arguments, as follows.

`[Val1,Val2,...,ValN] = getBlockValue(M,Blkname1,Blkname2,...,BlknameN)`

#### Functionality being removed or changed

FunctionalityWhat Happens When You Use This Functionality?Use This InsteadCompatibility Considerations
`[Val1,Val2,...] = getBlockValue(M)`Error`S = getBlockValue(M)``getBlockValue(M)` now returns a structure containing current values of all blocks. Update scripts and functions that use `getBlockValue(M)` to use output structure.
`ltiview` functionStill works`linearSystemAnalyzer`Consider replacing `ltiview` with `linearSystemAnalyzer` in scripts and functions.
`sisotool` functionStill works`controlSystemDesigner`Consider replacing `sisotool` with `controlSystemDesigner`

## R2014b

New Features, Bug Fixes, Compatibility Considerations

#### LPV System block for modeling and simulating linear parameter-varying systems

This release introduces the LPV System block. You use this block to represent Linear Parameter Varying (LPV) systems in Simulink®.

An LPV system is a linear state-space system whose dynamics vary as a function of certain time-varying parameters called the scheduling parameters. Mathematically, an LPV system is represented as:

$\begin{array}{l}dx\left(t\right)=A\left(p\right)x\left(t\right)+B\left(p\right)u\left(t\right)\\ y\left(t\right)=C\left(p\right)x\left(t\right)+D\left(p\right)u\left(t\right)\\ x\left(0\right)={x}_{0}\end{array}$

where

• `u(t)` are the inputs

• `y(t)` the outputs

• `x(t)` are the model states with initial value `x0`

• $dx\left(t\right)$ is the state derivative vector $\stackrel{˙}{x}$ for continuous-time systems and the state update vector $x\left(t+\Delta T\right)$ for discrete-time systems. ΔT is the sample time.

• `A(p)`, `B(p)`, `C(p)` and `D(p)` are the state-space matrices parameterized by the scheduling parameter vector `p`.

• The parameters `p = p(t)` are measurable functions of the inputs and the states of the model. They can be a scalar quantity or a vector of several parameters. The set of scheduling parameters define the scheduling space over which the LPV model is defined.

The linear system can be extended to contain offsets in the system's states, input, and output signals. Mathematically, the LPV system is represented by the following equations:

$\begin{array}{l}dx\left(t\right)=A\left(p\right)x\left(t\right)+B\left(p\right)u\left(t\right)+\left(\overline{dx}\left(p\right)-A\left(p\right)\overline{x}\left(p\right)-B\left(p\right)\overline{u}\left(p\right)\right)\\ y\left(t\right)=C\left(p\right)x\left(t\right)+D\left(p\right)u\left(t\right)+\left(\overline{y}\left(p\right)-C\left(p\right)\overline{x}\left(p\right)-D\left(p\right)\overline{u}\left(p\right)\right)\\ x\left(0\right)={x}_{0}\end{array}$

are the offsets in the values of `dx(t)`, `x(t)`, `u(t)` and `y(t)` at a given parameter value `p = p(t)`.

LPV system can be thought of as a first-order approximation of a nonlinear system over a grid of scheduling parameter values. For example, you can linearize a Simulink model between a given input and output ports over a grid of equilibrium operating conditions. The values of the model inputs, outputs and state values at each operating point define the offsets, while the linear state-space models obtained by linearization define the state-space data. The LPV system thus generated can work as a proxy for the original model for facilitating faster simulations and control system design. For more information, see Linear Parameter-Varying Models.

The LPV System block accepts the state-space matrices and offsets over a grid of scheduling parameter values. The state-space matrices must be specified as an array of model objects. The `SamplingGrid` property of the array defines the scheduling parameters for the LPV system. For examples of using this block, see:

#### Kalman Filter block for estimating states of linear time-invariant and linear time-varying systems

Use the Kalman Filter block to estimate the states of linear time-invariant and linear time-varying systems online. The states are estimated as new data becomes available during the operation of the system. The system can be continuous-time or discrete-time. You can generate code for this block using code generation products such as Simulink Coder™.

You can access this block from the Control System Toolbox library. For an example of using this block, see State Estimation Using Time-Varying Kalman Filter.

#### AnalysisPoint Control Design Block for Marking Points of Interest for Linear Analysis

The new `AnalysisPoint` block is a unit-gain Control Design Block that you can insert anywhere in a control system model to mark points of interest for linear analysis and tuning. Incorporate `AnalysisPoint` blocks into generalized state-space (`genss`) control system models by interconnecting them with numeric LTI models and other Control Design Blocks. When you mark a location in a control system model with an `AnalysisPoint` block, you can use that location for linear analysis tasks, such as extracting responses using `getIOTransfer` or `getLoopTransfer`. You can also use such locations to specify design requirements for control system tuning using `systune` or Control System Tuner (requires Robust Control Toolbox™ software).

For more information about using `AnalysisPoint` blocks, see:

#### Compatibility Considerations

`AnalysisPoint` replaces the `loopswitch` Control Design Block.

Models that contain `loopswitch` blocks continue to work, for backward compatibility. However, it is recommended that you use `AnalysisPoint` blocks in new models. If you have scripts or functions that use `loopswitch` blocks, consider updating them to use `AnalysisPoint` instead.

For documentation of `loopswitch`, see `loopswitch` in the R2014a documentation.

#### pidtool function renamed to pidTuner

The `pidtool` function is now called `pidTuner`. To open PID Tuner, use the `pidTuner` command or, in the MATLAB desktop Apps tab, click PID Tuner.

Using `pidtool` does not generate an error in this release, but the function may be removed in a future release.

#### Compatibility Considerations

If you have scripts that use `pidtool`, consider replacing those calls with `pidTuner`.

#### getSwitches function renamed to getPoints

The `getSwitches` function is now called `getPoints` to match the renaming of `loopswitch` to `AnalysisPoint`. Using `getSwitches` does not generate an error in this release, but the function may be removed in a future release.

#### Compatibility Considerations

If you have scripts or functions that use `getSwitches`, consider replacing those calls with `getPoints`.

#### Functionality being removed or changed

FunctionalityWhat Happens When You Use This Functionality?Use This InsteadCompatibility Considerations
`loopswitch` Control Design BlockStill works`AnalysisPoint`Consider replacing `loopswitch` with `AnalysisPoint` in scripts and functions.
`getSwitches` functionReturns `loopswitch` and `AnalysisPoint` blocks in model`getPoints`Consider replacing `getSwitches` with `getPoints` in scripts and functions.
`pidtool` functionStill works`pidTuner`Consider replacing `pidtool` with `pidTuner` in scripts.

## R2014a

New Features, Bug Fixes, Compatibility Considerations

#### Redesigned PID Tuner app for improved PID tuning workflow

The redesigned PID Tuner streamlines workflows for interactively tuning PID controllers for reference tracking and disturbance rejection.

To access the PID Tuner, use the `pidtool` command. For example, to tune a PI controller for an LTI model, `G`:

`pidtool(G,'PI')`

#### PID controller tuning using system identification to model the plant from measured input-output data in the PID Tuner app (with System Identification Toolbox)

If you have System Identification Toolbox™ software, you can use PID Tuner to fit a linear model to the measured SISO response data from your system and tune a PID controller for the resulting model. For example, if you want to design a PID controller for a manufacturing process, you can start with response data from a bump test on your system.

PID Tuner uses system identification to estimate an LTI model from the response data. You can interactively adjust the identified parameters to obtain an LTI model with a response that fits your response data. PID Tuner automatically tunes a PID controller for the estimated model. You can then interactively adjust the performance of the tuned control system, and save the estimated plant and tuned controller.

#### `freqsep` function for decomposing a linear system into fast dynamics and slow dynamics

Use the new `freqsep` command for separating numeric LTI models into fast and slow components. `freqsep` allows you to specify the cutoff frequency about which the model is decomposed. The slow component contains poles with natural frequency below the cutoff frequency. The fast component contains poles at or above the cutoff.

For more information, see the `freqsep` reference page.

#### `damp` command display includes time constant information

When you call the `damp` command with no output arguments, the display now includes the time constant for each pole. The time constant is calculated as follows:

$\tau =\frac{1}{{\omega }_{n}\zeta }.$

ωn is the natural frequency of the pole, and ζ is its damping ratio.

#### Compatibility Considerations

For a discrete-time system with unspecified sample time (```Ts = -1```), `damp` now calculates the natural frequency and damping ratio by assuming `Ts = 1`. Previously, the software returned `[]` for the natural frequency and damping ratio of such systems.

`damp` returns outputs in order of increasing natural frequency. Therefore, this change can result in reordered poles for systems with unspecified sample times.

For more information on the outputs, see the `damp` reference page.

## R2013b

New Features, Bug Fixes, Compatibility Considerations

#### `SamplingGrid` property for tracking dependence of array of sampled models on variable values

In Control System Toolbox™, you can derive arrays of numeric or generalized LTI models by sampling one or more independent variables. The new `SamplingGrid` property of LTI models tracks the variable values associated with each model in such an array.

Set this property to a structure whose fields are the names of the sampling variables and contain the sampled variable values associated with each model. All sampling variables should be numeric and scalar valued, and all arrays of sampled values should match the dimensions of the model array.

For example, suppose you create a 11-by-1 array of linear models, `sysarr`, by taking snapshots of a linear time-varying system at times ```t = 0:10```. The following code stores the time samples with the linear models.

` sys.SamplingGrid = struct('time',0:10)`

#### Option to retain unconnected states when interconnecting models using `connect` command

By default, the `connect` command discards states that do not contribute to the dynamics in the path between the inputs and outputs of the interconnected system. You can now optionally retain such unconnected states. This option can be useful, for example, when you want to compute the interconnected system response from known initial state values of the components.

To instruct `connect` to retain unconnected states, use the new `connectOptions` command with the existing `connect` command.

For more information, see the `connectOptions` reference page.

#### `connect` command always returns state-space or frequency response data model

The `connect` command now always returns a state-space model, such as an `ss`, `genss`, or `uss` model, unless one or more of the input models is a frequency response data model. In that case, `connect` returns a frequency response data model, such as an `frd` or `genfrd` model.

For more information, see the `connect` reference page.

#### Compatibility Considerations

In previous releases, `connect` returned a `tf` or `zpk` model when all input models were `tf` or `zpk` models. Therefore, `connect` might now return state-space models in cases where it previously returned `tf` or `zpk` models.

#### `updateSystem` command for updating dynamic system data in a response plot

The new `updateSystem` command replaces the system data used to compute a response plot with data derived from a different dynamic system, and updates the plot. `updateSystem` is useful, for example, to cause a plot in a GUI to update in response to interactive input.

#### `getLoopID` renamed to `getSwitches`

The `getLoopID` function is now called `getSwitches` to more clearly reflect the purpose of the function. Using `getLoopID` does not generate an error in this release, but the function may be removed in a future release.

#### Compatibility Considerations

If you have scripts or functions that use `getLoopID`, consider replacing those calls with `getSwitches`.

#### `LoopID` property of `loopswitch` renamed to `Location`

The `LoopID` property of the `loopswitch` model component is now called `Location` to more clearly reflect the purpose of the property. Using `LoopID` does not generate an error in this release, but the name may be removed in a future release.

#### Compatibility Considerations

If you have scripts or functions that use the `LoopID` property, consider updating your code to use `Location` instead.

## R2013a

New Features, Bug Fixes

#### Transient behavior slider for PID Tuner, increasing control over reference tracking and disturbance rejection performance

The PID Tuner now has a Transient behavior slider for emphasizing either reference tracking or disturbance rejection. When you open the PID Tuner, the tool starts in the ```Time domain``` design mode, displaying a step plot of the reference tracking response. The new Transient behavior slider is beneath the Response time slider.

You can use the Transient behavior slider when:

• The tuned system's disturbance rejection response is too sluggish for your requirements. In this case, try moving the Transient behavior slider to the left to make the controller more aggressive at disturbance rejection.

• The tuned system's reference tracking response has too much overshoot for your requirements. In this case, try moving the Transient behavior slider to the right to increase controller robustness and reduce overshoot.

In `Frequency domain` design mode, the PID Tuner has Bandwidth and Phase margin sliders. These sliders are the frequency-domain equivalents of the Response time and Transient behavior sliders, respectively.

## R2012b

New Features, Bug Fixes, Compatibility Considerations

#### ltiblock.pid2 and loopswitch objects for tuning two-degree-of-freedom PID controllers and marking loop opening sites for open-loop requirements

New Control Design Blocks allow you to specify more control structures and more types of constraints for fixed-structure control system tuning in MATLAB:

• `ltiblock.pid2` — Tunable two-degree-of-freedom PID controller

• `loopswitch` — Control Design Block for specifying feedback loop opening locations in a tunable `genss` model of a control system

You can use these Control Design Blocks to build control systems for tuning with Robust Control Toolbox tuning commands such as `systune` and `looptune`. For more information, see the `ltiblock.pid2` and `loopswitch` reference pages.

#### Commands for obtaining open-loop responses, closed-loop responses, and current values of tunable components from control system models

New commands allow you to compute open-loop and closed-loop responses from a Generalized LTI model representing a control system.

• `getLoopTransfer` — Compute point-to-point open-loop response of a Generalized LTI model of a control system, at a loop-opening site defined by a `loopswitch` block. The new command `getLoopID` returns a list of such loop-opening sites.

• `getIOTransfer` — Extract the closed-loop response from a specified input to a specified output of a control system.

These commands are particularly useful for validating the response functions of control systems tuned using Robust Control Toolbox tuning commands such as `systune`.

Additionally, the new `showTunable` command displays the current value of tunable components in a generalized LTI model of a control system. This command is useful for querying tuned parameter values of control systems tuned using Robust Control Toolbox tuning commands such as `systune`.

For more information, see the reference pages for these new commands and the following topics:

#### Option for elementwise operation of model query commands on model arrays

The new `'elem'` flag causes elementwise operation on model arrays of the model query commands:

For example, for an array, `sysarray`, of dynamic system models,

`B = hasdelay(sysarray,'elem');`

returns a logical array. `B` of the same size as `sysarray` indicating whether the corresponding model in `sysarray` contains a time delay. Without the `'elem'` flag,

`B = hasdelay(sysarray);`

returns a scalar logical value that is equal to `1` if any entry in `sysarray` contains a time delay.

#### Compatibility Considerations

`isfinite` and `isstable` now return a scalar logical value when invoked without the `'elem'` flag. Previously, `isfinite` and `isstable` returned a logical array by default.

If you have scripts or functions that use `isfinite(sysarray)` or `isstable(sysarray)`, replace those calls with `isfinite(sysarray,'elem')` or `isstable(sysarray,'elem')` to perform an elementwise query and obtain a logical array.

## R2012a

New Features, Compatibility Considerations

#### Frequency Analysis Commands for Calculating Peak Gain and Finding Gain-Crossover Frequencies

Control System Toolbox software includes two new frequency analysis commands:

• `getPeakGain` — Peak gain of frequency response of a dynamic system model

• `getGainCrossover` — Frequencies at which system gain crosses a specified gain level

For more information, see the `getPeakGain` and `getGainCrossover` reference pages.

These functions use the SLICOT library of numerical algorithms. For more information about the SLICOT library, see http://slicot.org.

#### Specify Target Crossover Frequency as Input to pidtune

A new syntax for `pidtune` lets you specify a target crossover frequency directly as an input argument. For example, the following command designs a PI controller, `C`, for a plant model `sys`. The command also specifies a target value `wc` for the 0 dB gain crossover frequency of the open-loop response `L = sys*C`.

`C = pidtune(sys,'pi',wc);`

Previously, you had to use `pidtuneOptions` to specify a target crossover frequency.

For more information, see the `pidtune` reference page.

#### Rescaled Impulse Response and Impulse-Invariant Time Domain Conversion

For discrete-time dynamic system models, the input signal applied by `impulse` is now a unit area pulse of length `Ts` and height `1/Ts`. `Ts` is the sampling time of the discrete-time system. Previously, `impulse` applied a pulse of length `Ts` and unit height.

#### Compatibility Considerations

Results of this change include:

• The amplitude of the impulse response calculated by `impulse` and `impulseplot` is scaled by `1/Ts` relative to previous versions.

• Discretization using the impulse-invariant (`'impulse'`) method of `c2d` returns a model that is scaled by `Ts` compared to previous releases. This scaling ensures a close match between the frequency responses of the continuous-time model and the impulse-invariant discretization as `Ts` approaches zero (for strictly proper models). In previous releases, the frequency responses differed by a factor of `Ts`.

#### First-Order Hold Method for d2c

The `d2c` command now supports the first-order hold (FOH) method for converting a discrete-time dynamic system model to continuous time. The FOH method converts by performing linear interpolation of the inputs, assuming the control inputs are piecewise linear over the sampling period. For more information about using this method, see the `d2c` reference page and Continuous-Discrete Conversion Methods.

#### tzero Computes Invariant Zeros and Transmission Zeros

The `tzero` command computes the invariant zeros of SISO and MIMO dynamic system models. For minimal realizations, `tzero` computes transmission zeros. `tzero` also returns the normal rank of the transfer function of the system. For more information, see the `tzero` reference page.

#### Models Created With System Identification Toolbox Can Be Used Directly With Control System Toolbox Functions

Identified linear models that you create using System Identification Toolbox software can now be used directly with Control System Toolbox analysis and compensator design commands. In prior releases, doing so required conversion to Control System Toolbox LTI model types.

Identified linear models can be used directly with:

#### Functionality Being Removed or Changed

FunctionalityWhat Happens When You Use This Functionality?Use This InsteadCompatibility Considerations
`impulse(sys)` and `impulseplot(sys)`, for discrete-time `sys`Still works.N/AAmplitude of response is scaled by `1/Ts` compared to previous versions. `Ts` is sampling time of `sys`.
`c2d(sys,Ts,'impulse')`Still works.N/AResulting discretized model is scaled by `Ts` compared to previous releases.
`[y,t] = impulse(sys,Tfinal)`
```[y,t] = step(sys,Tfinal)```
`[y,t,x] = initial(sys,Tfinal)`
For discrete-time `sys` with undefined sample time (`Ts=-1`), `Tfinal` is interpreted as the number of sampling periods to simulate. N/AExpect the number of simulation data points to be ```Tfinal + 1``` instead of `Tfinal`.

## R2011b

New Features, Compatibility Considerations

#### Formula-Based Specification of Summing Junctions and Vector Signal Naming for sumblk and connect

You can now use formula strings to specify the behavior of summing junctions with `sumblk`. For example, to create a summing junction, `S`, that takes the difference between signals `r` and `y` to produce signal `e`, enter the following command:

`S = sumblk('e = r-y');`

Additionally, both `sumblk` and `connect` now support vector-based signal naming for interconnecting multi-input, multi-output (MIMO) models. For more information, see the `sumblk` and `connect` reference pages.

#### Commands for Interacting with Control Design Blocks in Generalized LTI Models

The following new commands allow you to examine and set the values of Control Design Blocks in Generalized LTI Models:

#### Functionality Being Removed or Changed

FunctionalityWhat Happens When You Use This Functionality?Use This InsteadCompatibility Considerations
`delay2z`Errors`absorbDelay`Replace `delay2z` with `absorbDelay`.
`getNominal`Errors`getValue`Replace `getNominal` with `getValue`.
`Scale` and `Info` properties of `realp` parameterErrorsNoneNone
`sumblk('a','b','c','+-')`Still works`sumblk('a=b-c')`Use new formula-based syntax for `sumblk`.

## R2011a

New Features, Compatibility Considerations

#### New Model Objects for Representing Tunable Parameters and Systems with Tunable Components

Control System Toolbox includes new model objects that you can use to represent systems with tunable components. You can use these models for parameter studies or controller synthesis using `hinfstruct` (requires Robust Control Toolbox). The new model types include:

This release also adds new functions for working with generalized models:

For more information about the new model types and about modeling systems that contain tunable coefficients, see the following in the Control System Toolbox User's Guide:

#### New Time and Frequency Units for Models and Response Plots

All linear model objects now have a `TimeUnit` property for specifying unit of the time variable, time delays in continuous-time models, and sampling time in discrete-time models. The default time units is seconds. You can specify the time units, for example, as hours. See Specify Model Time Units for examples.

Frequency-response data ( `frd` and `genfrd`) models also have a new `FrequencyUnit` property for specifying units of the frequency vector. The default frequency units is `rad/TimeUnit`, where `TimeUnit` is the system time units. You can specify the units, for example as KHz, independently of the system time units. See Specify Frequency Units of Frequency-Response Data Model for examples. If your code uses the `Units` property of frequency-response data models, it continues to work as before.

See the model reference pages for available time and frequency units options.

Changing the `TimeUnit` and `FrequencyUnit` properties changes the overall system behavior. If you want to simply change the time and frequency units without modifying system behavior, use `chgTimeUnit` and `chgFreqUnit`, respectively.

The time and frequency units of the model appear on the response plots by default. For multiple systems, the units of the first system are used. You can change the units of the time and frequency axes:

• Graphically, using the following editors:

• Programmatically, by setting the following properties of plots:

#### Discrete-Time PID Controller Objects Have Stable Derivative Filter Pole

New requirements for creating `pid` and `pidstd` controller objects ensure that the derivative filter pole is always stable.

• For a discrete-time `pid` controller with a derivative filter (`Tf`≠ 0) and `Dformula` set to `'ForwardEuler'`, the sampling time `Ts` must be less than `2*Tf`.

• For a discrete-time `pidstd` controller with a derivative filter (`N``Inf`) and `Dformula` set to `'ForwardEuler'`, the sampling time `Ts` must be less than `2*Td/N`.

• The `Trapezoidal` value for `DFormula` is not available for a discrete-time `pid` or `pidstd` controller with no derivative filter (`Tf = 0` or ```N = Inf```).

#### Compatibility Considerations

On loading `pid` or `pidstd` controllers saved under previous versions, the software changes certain properties of controllers that do not have stable derivative filter poles.

• For a discrete-time `pid` controller with a derivative filter (`Tf`≠ 0), `Dformula` set to `'ForwardEuler'`, and sampling time `Ts``2*Tf`, the derivative filter time is reset to `Tf = Ts`.

• For a discrete-time `pidstd` controller with a derivative filter (`N``Inf`), `Dformula` set to `'ForwardEuler'`, the sampling time `Ts``2*Td/N`, the derivative filter constant is reset to `N = Td/Ts`.

• For a discrete-time `pid` or `pidstd` controller with no derivative filter and `DFormula = 'Trapezoidal'`, the derivative filter integrator formula is reset to ```DFormula = 'ForwardEuler'```.

The software issues a warning when it changes any of these values. If you receive such a warning, validate your controller to ensure that the new values achieve the desired performance.

#### New Variable q^–1 for Expressing Discrete-Time Transfer Functions

You can now express discrete-time `tf` and `zpk` models in terms of the inverse shift operator `q^-1`. The variable `q^-1` is equivalent to `z^-1`.

 Note:   This new definition is consistent with the System Identification Toolbox definition of `q^-1`.

Use the new variable by setting the `Variable` property of a `tf` or `zpk` model to `q^-1`. For example, entering:

` H = tf([1 2 3],[5 6 7],0.1,'Variable','q^-1')`

creates the following discrete-time transfer function:

```Transfer function: 1 + 2 q^-1 + 3 q^-2 ------------------- 5 + 6 q^-1 + 7 q^-2 Sampling time (seconds): 0.1```

When you set `Variable` to `q^-1`, `tf` interprets the numerator and denominator vectors as ascending powers of `q^-1`.

For more information, see the `tf` and `zpk` reference pages.

## R2010b

New Features, Compatibility Considerations

#### New Commands and GUI for Modeling and Tuning PID Controllers

This release introduces specialized tools for modeling and designing PID controllers.

### PID Controller Design with the New PID Tuner GUI

The new PID Tuner GUI lets you interactively tune a PID controller for your required response characteristics. Using the GUI, you can adjust and analyze your controller's performance with response plots, such as reference tracking, load disturbance rejection, and controller effort, in both time and frequency domains.

The PID Tuner supports all types of SISO plant models, including:

• Continuous- or discrete-time plant models

• Stable, unstable, or integrating plant models

• Plant models that include I/O time delays or internal time delay

### PID Controller Design with the New pidtune Command

The new `pidtune` command lets you tune PID controller gains at the command line.

`pidtune` automatically tunes the PID gains to balance performance (response time) and robustness (stability margins). You can specify your own response time and phase margin targets using the new `pidtuneOptions` command.

`pidtune` supports all types of SISO plant models, including:

• Continuous- or discrete-time plant models.

• Stable, unstable, or integrating plant models.

• Plant models that include I/O time delays or internal time delays.

• Arrays of plant models. If `sys` is an array, `pidtune` designs a separate controller for each plant in the array.

### Modeling PID Controllers in Parallel Form or Standard Form

The new LTI model objects `pid` and `pidstd` are specialized for modeling PID controllers.

With `pid` and `pidstd` you can model a PID controller directly with the PID parameters, expressed in parallel (`pid`) or standard (`pidstd`) form. The `pid` and `pidstd` commands can also convert to PID form any type of LTI object that represents a PID controller.

Previously, to model a PID controller, you had to derive the controller's equivalent transfer function (or other model), and could not directly store the PID parameters.

For additional information, see the `pid` and `pidstd` reference pages

#### Improved PID Tuning Options in SISO Design Tool

This release includes improvements to the PID Tuning options in the Automated Tuning pane of SISO Design Tool.

In addition to the Robust Response Time tuning algorithm, SISO Design Tool offers a collection of classical design formulas, including the following:

• Approximate M-Constrained Integral Gain Optimization (MIGO) Frequency Response

• Approximate MIGO Step Response

• Chien-Hrones-Reswick

• Skogestad Internal Model Control (IMC)

• Ziegler-Nichols Frequency Response

• Ziegler-Nichols Step Response

For information about using SISO Design Tool, see SISO Design Tool in the Control System Toolbox User's Guide. For specific information about the automatic PID Tuning options in SISO Design Tool, see PID Tuning in the Control System Toolbox User's Guide.

#### Ability to Analyze a Controller Design for Multiple Models Simultaneously in SISO Design Tool

You can now analyze a controller design for multiple models simultaneously using the SISO Design Tool. This feature helps you analyze whether the controller satisfies design requirements on a system whose exact dynamics are not known and may vary.

System dynamics can vary because of parameter variations or different operating conditions. You represent variations in system dynamics of the plant (`G`), sensor (`H`), or both in a feedback structure using arrays of LTI models. Then, design a controller for a nominal model in the array and analyze that the controller satisfies the design requirements on the remaining models using the design and analysis plots. For more information, see:

#### Change in Output of repsys Command

The output of the `repsys` command when called with a single dimension argument has changed.

In prior versions, the output of `repsys(sys,N)` was the same as that of `append(sys,...,sys)`.

Now, `repsys(sys,N)` returns the same result as `repsys(sys,[N N])`.

The results of other syntaxes for `repsys` have not changed.

See the `repsys` and `append` reference pages for more information.

#### Compatibility Considerations

Code that depends upon the previous result of `repsys(sys,N)` no longer returns that result. To obtain the previous result, replace `repsys(sys,N)` with `sys*eye(N)`.

## R2010a

New Features, Compatibility Considerations

#### Enhanced c2d Command to Approximate Fractional Time Delays in Tustin and Matched Discretization Methods

The `c2d` command can now approximate fractional time delays when discretizing linear models with the `tustin` or `matched` methods. The new `c2dOptions` command lets you specify an optional Thiran all-pass filter. The Thiran filter approximates fractional delays for improved phase matching between continuous and discretized models. Previously, `c2d` rounded fractional time delays to the nearest multiple of the sampling time when using the `tustin` or `matched` methods. For more information, see the `c2d` and `c2dOptions` reference pages and Continuous-Discrete Conversion Methods in the Control System Toolbox User Guide.

#### New Commands for Specifying Options for Continuous-Discrete Conversions

New commands `c2dOptions`, `d2dOptions`, and `d2cOptions` make it easier to specify options for

• Discretization using `c2d`

• Resampling using `d2d`.

• Conversion from discrete to continuous time using `d2c`.

#### Compatibility Considerations

This release deprecates the `prewarp` method for `c2d`, `d2d`, and `d2c`. Instead, use `c2dOptions`, `d2dOptions`, or `d2cOptions` to specify the `tustin` method and a prewarp frequency. For more information, see Continuous-Discrete Conversion Methods and the `c2d`, `d2d`, and `d2c` reference pages.

#### New FDEL Command to Remove Specified Data from Frequency Response Data (FRD) Models

You can now remove selected data from `frd` models using the new `fdel` command. For example, use `fdel` to:

• Remove spurious or unneeded data from `frd` models you create from measured frequency response data.

• Remove data at intersecting frequencies from `frd` models before merging them into a single `frd` model with `fcat`, which can only merge `frd` models containing no common frequencies.

For more information, see `fdel` reference page.

## R2009b

New Features

#### Ability to Design Compensators for New Types of Plants

In the SISO Design Tool, you can now design compensators for plants models that:

• Contain time delays

Previously, you had to approximate delays before designing compensators.

• You specify as frequency-response data (FRD)

For more information on designing compensators using the SISO Design Tool, see SISO Design Tool.

#### New Automated PID Tuning Method

You can now tune compensators using a new automated PID tuning algorithm called Robust Response Time, which is available in the SISO Design Tool. You specify the open-loop bandwidth and phase margin, and the software computes PID parameters to robustly stabilize your system.

For information on tuning compensators using automated tuning methods, see Automated Tuning.

## R2009a

New Features, Compatibility Considerations

#### Variable q Now Defined as the Forward Shift Operator z

The variable q is now defined in the standard way as the forward shift operator z. Previously, q was defined as z-1.

 Note:   This new definition is consistent with the System Identification Toolbox definition of q.

#### Compatibility Considerations

If you use the q variable, you may receive different results than in previous releases when you:

• Create a transfer function

• Modify the `num` or `den` properties of an existing transfer function

The resulting transfer function differs from previous releases when both the

• `Variable` property is set to q

• `num` and `den` properties have different lengths

For example, the following code:

`H = tf([1,2],[1 3 8],0.1,'Variable','q')`
now returns the transfer function

$\frac{q+2}{{q}^{2}+3q+8}\equiv \frac{z+2}{{z}^{2}+3z+8}$

Previously, the code returned the transfer function

$\frac{1+2q}{1+3q+8{q}^{2}}\equiv \frac{1+2{z}^{-1}}{1+3{z}^{-1}+8{z}^{-2}}\equiv \frac{{z}^{2}+2z}{{z}^{2}+3z+8}$

The two transfer functions have different numerators.

## R2008b

New Features, Compatibility Considerations

#### New Design Tools for Linear-Quadratic-Gaussian (LQG) Servo Controllers with Integral Action

You can now design a Linear-Quadratic-Gaussian (LQG) servo controller for set-point tracking using the new `lqi` and `lqgtrack` commands. This compensator ensures that the system output tracks the reference command and rejects process disturbances and measurement noise.

For more information on forming LQG servo controllers, see Linear-Quadratic-Gaussian (LQG) Design, the `lqi` reference page, and the `lqgtrack` reference page.

### Current Flag Moved from lqgreg to kalman

The `'current'` flag was moved from the `lqgreg` function to the `kalman` function.

#### Compatibility Considerations

The following code:

```kest = kalman(sys,Qn,Rn) c = lqgreg(kest,k) ```
now returns the current regulator $u\left[n\right]=-K\stackrel{^}{x}\left[n|n\right]$ instead of the delayed regulator $u\left[n\right]=-K\stackrel{^}{x}\left[n|n-1\right]$.

To update your code to return the same results as in previous releases, use the following code with the added string `'delayed'` in the `kalman` command:

```kest = kalman(sys,Qn,Rn,'delayed') c = lqgreg(kest,k) ```

For information on using these functions with the current flag in the `kalman` function, see the `kalman` and `lqgreg` reference pages.

#### New Upsampling Method for Rate Conversion in Discrete-Time Models

You can now upsample a discrete-time system to an integer multiple of the original sampling rate without any distortion in the time or frequency domain using the `upsample` command.

For more information on upsampling, see the `upsample` reference page and Upsample a Discrete-Time System in the Control System Toolbox User's Guide.

#### New Scaling Tools to Enhance the Accuracy of Computations with State-Space Models

You can now scale state-space models to maximize accuracy over the frequency band of interest using the `prescale` command and associated GUI. Use this functionality when you cannot achieve good accuracy at all frequencies and some tradeoff is necessary. A warning alerts you when accuracy may be poor and using prescaling is recommended.

For more information on setting the frequency band for scaling state-space realizations, see Scaling State-Space Models and the `prescale` reference page.

#### New Command to Reorder the States of State-Space Models

You can now reorder the states of state-space models according to a specified permutation using the `xperm` command.

For more information on reordering states, see the `xperm` reference page.

#### Enhanced Support for Customizing Response Plots

You can now make the following changes to your Control System Toolbox response plots using the figure plotting tools:

• System name

• Line color

• Line style

• Line width

• Marker type

For more information on customizing the appearance of response plots using plot tools, see Customizing Response Plots Using Plot Tools in the Control System Toolbox User's Guide.

## R2008a

New Features

#### Updated Error and Warning Message System

The Control System Toolbox error and warning IDs and messages have been updated. If you use error and warning IDs in your code, you must update your code to reflect the new IDs.

## R2007b

New Features

#### Updated and Expanded Demos

The Control System Toolbox demos have been reformatted and expanded to include more examples and content. Demos in the following categories now have new and improved content:

• Getting Started with LTI Models

• Discretization and Sampling Rate Conversions

• How to Get Accurate Results

To open the Control System Toolbox demos, type

`demo toolbox control`
at the MATLAB prompt.

## R2007a

New Features

#### Analysis of Time Delay Systems Now Fully Supported

Control System Toolbox software now lets you:

• Model, simulate, and analyze any interconnection of linear systems with delays, such as systems containing feedback loops with delays.

• Exactly analyze and simulate control systems with long delays. You can evaluate control strategies, such as Smith Predictor and PID control for first-order-plus-dead-time plants.

• Use new commands for modeling state-space models with delays including: `delayss`, `getDelayModel`, and `setDelayModel`.

For more information, see the section on Models with Time Delays in the Control System Toolbox documentation.

#### New and Updated Automated Tuning Methods

Control System Toolbox software now provides the following new and updated automated tuning methods:

• New Singular Frequency Based Tuning lets you design PID compensators for both stable and unstable plants.

• New H-infinity Loop Shaping lets you find compensators based on a desired open-loop bandwidth or loop shape. This feature requires Robust Control Toolbox software.

• Updated Internal Model Control (IMC) Tuning now supports unstable plants.

For more information, see the section on automated tuning in the Control System Toolbox documentation.

#### New Tustin and Prewarp Options for d2d Function

The `d2d` function now includes the following new options for the resampling method:

• `'tustin'`—Performs Bilinear (Tustin) approximation

• `'prewarp'`—Performs Tustin approximation with frequency prewarping

For more information, see the `d2d` reference pages.

## R2006b

New Features

#### New Loop Configurations in the SISO Design Tool

Two new loop configurations are available from the SISO Design Tool. See Modifying Block Diagram Structure for more information.

#### New Design Requirements

The LTI Viewer now supports step response and upper/lower time bound design requirements. See Adding Design Requirements to the LTI Viewer for more information.

## R2006a

New Features

#### SISO Design Tool

The SISO Design Tool now provides one-click automated tuning using systematic algorithms such as Ziegler-Nichols PID tuning, IMC design, and LQG design. In addition, you can calculate low-order approximations of the IMC/LQG compensators to keep the control system complexity low.

### Compensator Optimization Is Now Supported

If you have installed Simulink Response Optimization™ software, you can now optimize the compensator parameters inside the SISO Design Tool GUI. You can specify time- and frequency-domain requirements on SISO Design Tool plots such as `bode` and `step`, and use numerical optimization algorithms to automatically tune your compensator to meet your requirements. See the Simulink Response Optimization documentation for more details.

### Improved Compensator Editor

The Compensator Editor used to edit the numerical values of poles and zeros has been upgraded to better handle common control components such as lead/lag and notch filters.

### Multi-Loop Compensator Design Support

Many control systems involve multiple feedback loops, some of which are coupled and need joint tuning. The SISO Design Tool now lets you analyze and tune multi-loop configurations. You can focus on a specific loop by opening signals to remove the effects of other loops, gain insight into loop interactions, and jointly tune several SISO loops.

### SISO Design Tool Fully Integrated with the Controls & Estimation Tools Manager

To improve workflow and better leverage other tools, such as Simulink Control Design software and Simulink Response Optimization software, the SISO Design Tool is now fully integrated with the Controls & Estimation Tools Manager (CETM). This provides a signal environment for the design and tuning of compensators.

When you open the SISO Design Tool, the CETM also opens with a SISO Design Task. Many SISO Design Tool features, such as importing models, changing loop configurations, etc., have been moved to the SISO Design Task in CETM. In addition, related tasks such as Simulink based Tuning and Compensator Optimization are seamlessly integrated with the SISO Design Task. See the Control System Toolbox Getting Started Guide for details on the new work flow.

#### LTI Viewer Enhancements

The LTI Viewer now lets you plot the response of a system to user-defined input signals (`lsim`) and initial conditions (`initial`). A new GUI lets you select input signals from a signal generator library, or import signal data from a variety of file formats.

### Descriptor and Improper State-Space Models Fully Supported

There is now full support for descriptor state-space models with a singular `E` matrix. This now lets you build state-space representations, such as PID, and manipulate improper models with the superior accuracy of state-space computations. In previous versions, only descriptor models with a nonsingular `E` matrix were supported.

### New Commands to Calculate Time Response Metrics

The new `stepinfo` and `lsiminfo` commands compute time-domain performance metrics, such as rise time, settling time, and overshoot. You can use these commands to write scripts that automatically verify or optimize such performance requirements. Previously, these metrics were available only from response plots.

### Simplified System Interconnections Using I/O Channel Names

The commands `connect`, `feedback`, `series`, `parallel`, and `lft` now let you connect systems by matching names of I/O channels. A helper function, `sumblk`, has also been added to simplify the specification of summing junctions. Altogether this considerably simplifies the task of deriving models for complicated block diagrams. In previous releases, only index-based system connection was supported.

### Changes in the Representation of I/O Delays in State-Space Models

The `ioDelay` property is deprecated from state-space models. Instead, these models have a new property called `InternalDelay` for logging all delays that cannot be pushed to the inputs or outputs. Driving this change is the switch to a representation of delays in terms of delayed differential equations rather than frequency response. See Models with Time Delays in the Control System Toolbox documentation for more details on internal delays, and `ss/getdelaymodel` for details on the new internal representation of state-space models with delays.

### New Name Property for LTI Objects

This new property lets you attach a name (string) to a given LTI model. The specified name is reflected in response plots.

### New Commands and Operations for LTI Objects

The new `exp` command simplifies the creations of continuous-time transfer functions with delays. For more information, type help `lti/exp` at the MATLAB prompt.

The `frd` object has the following new methods:

The `.*` operation is supported for transfer functions and zero-pole-gain objects. This allows you to perform element-by-element multiplication of MIMO models.

#### Numerical Algorithms

There have been several major improvements in the Control System Toolbox numerical algorithms, many of which benefit the upgraded SISO Design Tool:

• New scaling algorithm that maximizes accuracy for badly scaled state-space models

• Performance improvement in time and frequency response computations through MEX-files

• More accurate computations of the zero-pole-gain and transfer function representations of a state-space model

• More accurate state-space representations of zero-pole-gain models

• Better handling of nonminimal modes in model reduction commands (`balred`, `balreal`)

• `canon` now computes a block modal form for `A` matrices that are not diagonizable or are nearly defective

• Exact phase computation for zero-pole-gain models in `bode` and `nichols`

• Accurate handling of improper models using the descriptor state-space representation

## R14SP3

No New Features or Changes

## R14SP2

New Features

#### Command-Line API for Customizing Plots

The Control System Toolbox software now provides a command-line API for customizing units, labels, limits, and other plot options. You can now change default plot options before generating a plot, or modify plot properties after creation.

For a detailed description of the commands, see the Control System Toolbox documentation.

#### Constraint Types for SISO Design

You can now create

• Single piecewise linear constraints for root-locus and Bode plots

• Gain/phase exclusion regions for Nichols plots

Design constraints are displayed as shaded regions.

#### Bode and Nichols Plots Have Additional Options

When editing Bode and Nichols plots, you can now

• Set the lower limit of the magnitude manually.

• Adjust the phase offsets by multiples of 360 degrees to facilitate comparing multiple responses.

#### Model-Approximation and Order-Reduction Commands

New commands have been added for model approximation and order reduction:

• `hsvd` computes and plots the Hankel singular values.

• `balred` computes low-order approximations using a numerically stable, balancing-free algorithm. You can perform multiple order reductions with a single command.