Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

c2dOptions

Create option set for continuous- to discrete-time conversions

Syntax

opts = c2dOptions
opts = c2dOptions('OptionName', OptionValue)

Description

opts = c2dOptions returns the default options for c2d.

opts = c2dOptions('OptionName', OptionValue) accepts one or more comma-separated name/value pairs that specify options for the c2d command. Specify OptionName inside single quotes.

Input Arguments

Name-Value Pair Arguments

'Method'

Discretization method, specified as one of the following values:

'zoh'Zero-order hold, where c2d assumes the control inputs are piecewise constant over the sample time Ts.
'foh'Triangle approximation (modified first-order hold), where c2d assumes the control inputs are piecewise linear over the sample time Ts. (See [1], p. 228.)
'impulse'Impulse-invariant discretization.
'tustin'Bilinear (Tustin) approximation. By default, c2d discretizes with no prewarp and rounds any fractional time delays to the nearest multiple of the sample time. To include prewarp, use the PrewarpFrequency option. To approximate fractional time delays, use theFractDelayApproxOrder option.
'matched'Zero-pole matching method. (See [1], p. 224.) By default, c2d rounds any fractional time delays to the nearest multiple of the sample time. To approximate fractional time delays, use the FractDelayApproxOrder option.

Default: 'zoh'

'PrewarpFrequency'

Prewarp frequency for 'tustin' method, specified in rad/TimeUnit, where TimeUnit is the time units, specified in the TimeUnit property, of the discretized system. Takes positive scalar values. A value of 0 corresponds to the standard 'tustin' method without prewarp.

Default: 0

'FractDelayApproxOrder'

Maximum order of the Thiran filter used to approximate fractional delays in the 'tustin' and 'matched' methods. Takes integer values. A value of 0 means that c2d rounds fractional delays to the nearest integer multiple of the sample time.

Default: 0

Examples

collapse all

Generate two random continuous-time state-space models.

sys1 = rss(3,2,2);
sys2 = rss(4,4,1);

Create an option set for c2d to use the Tustin discretization method and 3.4 rad/s prewarp frequency.

opt = c2dOptions('Method','tustin','PrewarpFrequency',3.4);

Discretize the models, sys1 and sys2, using the same option set, but different sample times.

dsys1 = c2d(sys1,0.1,opt);
dsys2 = c2d(sys2,0.2,opt);

References

[1] Franklin, G.F., Powell, D.J., and Workman, M.L., Digital Control of Dynamic Systems (3rd Edition), Prentice Hall, 1997.

See Also

Introduced in R2010a

Was this topic helpful?