# tunablePID

Tunable PID controller

## Description

Model object for creating tunable one-degree-of-freedom PID controllers.

`tunablePID`

lets you parametrize a tunable SISO PID controller for
parameter studies or for automatic tuning with tuning commands such as `systune`

, `looptune`

, or the Robust Control Toolbox™ command, `hinfstruct`

(Robust Control Toolbox).

`tunablePID`

is part of the family of parametric Control Design Blocks. Other parametric Control Design
Blocks include `tunableGain`

, `tunableSS`

, and `tunableTF`

.

## Creation

### Description

creates a discrete-time PID controller with sample time `blk`

= tunablePID(`name`

,`type`

,`Ts`

)`Ts`

:

$$blk={K}_{p}+{K}_{i}IF\left(z\right)+\frac{{K}_{d}}{{T}_{f}+DF\left(z\right)},$$

where *IF*(*z*) and
*DF*(*z*) are the discrete integrator formulas for the
integral and derivative terms, respectively. The values of the `IFormula`

and `DFormula`

properties set the discrete integrator formulas (see Properties).

### Input Arguments

## Properties

## Object Functions

`systune` | Tune fixed-structure control systems modeled in MATLAB |

`looptune` | Tune fixed-structure feedback loops |

`genss` | Generalized state-space model |

`hinfstruct` (Robust Control Toolbox) | H_{∞} tuning of fixed-structure
controllers |

## Examples

## Tips

You can modify the PID structure by fixing or freeing any of the parameters

`Kp`

,`Ki`

,`Kd`

, and`Tf`

. For example,`blk.Tf.Free = false`

fixes`Tf`

to its current value.To convert a

`tunablePID`

parametric model to a numeric (nontunable) model object, use model commands such as`pid`

,`pidstd`

,`tf`

, or`ss`

. You can also use`getValue`

to obtain the current value of a tunable model.

## Version History

**Introduced in R2016a**

## See Also

### Objects

`tunableSS`

|`tunableTF`

|`tunablePID2`

|`tunableGain`

|`genss`

### Functions

`systune`

|`looptune`

|`hinfstruct`

(Robust Control Toolbox)