Main Content

# zpk

Convert unconstrained MPC controller to zero/pole/gain form

## Syntax

``kzpk = zpk(MPCobj)``

## Description

Use the Model Predictive Control Toolbox™ `zpk` function to convert an unconstrained MPC controller to zero/pole/gain form (see `mpc` for background). The returned controller is equivalent to the original MPC controller `MPCobj` when no constraints are active. You can then use Control System Toolbox™ software for sensitivity analysis and other diagnostic calculations.

To create or convert a generic LTI dynamical system to zero/pole/gain form instead, see `zpk` and Dynamic System Models.

example

````kzpk = zpk(MPCobj)` returns the linear discrete-time dynamic controller `kzpk`, in zero/pole/gain form. `kzpk` is equivalent to the MPC controller `MPCobj` when no constraint is active.```

## Examples

collapse all

Create a plant, a corresponding MPC object, and convert it to zero/pole/gain form.

```mpcverbosity off; % turn off mpc messaging plant=tf(1,[1 1],0.2); % create plant (0.2 seconds sampling time) mpcobj=mpc(plant,0.2); % create mpc object (0.2 second sampling time) kzpk=zpk(mpcobj) % convert to zpk form show the controller's poles and zeroes kzpk = From input "MO1" to output "MV1": 0.45205 z^2 (z-1.5) ----------------------------- (z-1) (z-0.02575) (z+0.02485) Sample time: 0.2 seconds Discrete-time zero/pole/gain model. ```

The poles are all inside the unit circle, except the one in `z=1`. The position of this pole , which is due to the fact that the default noise model is an integrator, causes the controller static gain to approach infinity, in turn allowing near perfect tracking of the output reference signal.

## Input Arguments

collapse all

Model predictive controller, specified as an MPC controller object. To create an MPC controller, use `mpc`.

## Output Arguments

collapse all

Zero/pole/gain form of the MPC controller `MPCobj` when no constraint is active. This is also equivalent to `zpk(ss(MPCobj))`

## See Also

Introduced before R2006a

## Support

#### Implementing an Adaptive Cruise Controller with Simulink

Download technical paper