Model Predictive Control Toolbox    
poly2tfd, poly format

poly2tfd converts a transfer function (continuous or discrete) from the standard MATLAB poly format into the MPC tf format.

Syntax

Description
Consider a continuous-time (Laplace domain) transfer function such as


or a discrete-time transfer function such as


where z is the forward-shift operator. Using the MATLAB poly format, you would represent either of these as a numerator polynomial and a denominator polynomial, giving the coefficients of the highest-order terms first:

If the numerator contains leading zeros, they may be omitted, i.e., the number of elements in num can be the number of elements in den.

poly2tfd uses num and den as input to build a transfer function, g, in the MPC tf format (see tf section for details). Optional variables you can include are:

delt
The sampling period. If this is zero or you omit it, poly2tfd assumes that you are supplying a continuous-time transfer function. If you are supplying a discrete-time transfer function you must specify delt. Otherwise g will be misinterpreted when you use it later in the MPC Toolbox functions.

delay
The time delay. For a continuous-time transfer function, delay should be in time units. For a discrete-time transfer function, delay should be specified as the integer number of sampling periods of time delay. If you omit it, poly2tfd assumes a delay of zero.

Examples
Consider the continuous-time transfer function:
G(s) = 0.5.

It has no delay. The following command creates the MPC tf format:

Now suppose there were a delay of 2.5 time units:

G(s) = 0.5. You could use:

Next let's get the equivalent transfer function in discrete form. An easy way is to get the correct poly form using cp2dp, then use poly2tfd to get it in the tf form. Here are the commands to do it using a sampling period of 0.75 time units:

Note that cp2dp is used to handle the fractional time delay and the integer number of sampling periods of time delay is an input to poly2tfd. The results are:

See Also
cp2dp, tf, th2mod, tfd2step



plsr scmpc