c2dOptions
Specify discretization method for continuous-time to discrete-time conversions
Description
Use c2dOptions
to specify the discretization method and
associated quantities for discretizing models with c2d
.
Creation
Description
returns the default options for opts
= c2dOptions
c2d
. Customize options by using dot
notation to change the properties of opts
.
sets properties using one or more name-value arguments. For example, to use the bilinear
(Tustin) approximation method, set opts
= c2dOptions
(Name,Value
)'Method'
to
'tustin'
.
Properties
Method
— Discretization method
'zoh'
(default) | 'foh'
| 'impulse'
| 'tustin'
| 'matched'
| 'least-squares'
Discretization method, specified as one of the following values:
'zoh' | Zero-order hold, where |
'foh' | Triangle approximation (modified first-order hold), where
|
'impulse' | Impulse-invariant discretization. |
'tustin' | Bilinear (Tustin) approximation. By default, |
'matched' | Zero-pole matching method. (See [1], p. 224.) By
default, |
'least-squares' | Least-squares method. Minimize the error between the frequency responses of
the continuous-time and discrete-time systems up to the Nyquist frequency. Use
the FitOrder option to specify the order of the
discrete-time system. |
'damped' | Damped Tustin approximation based on the TRBDF2 formula
for sparss models only. |
For information about the algorithms for each conversion method, see Continuous-Discrete Conversion Methods.
PrewarpFrequency
— Prewarp frequency for 'tustin'
method
0 (default) | positive scalar
Prewarp frequency for 'tustin'
method, specified as 0 or a
positive scalar value. Specify the frequency in rad/TimeUnit
, where
TimeUnit
is the time units, specified in the
TimeUnit
property, of the discretized system. A value of 0
corresponds to the standard 'tustin'
method without prewarp.
FitOrder
— Fit order for 'least-squares'
method
'auto'
(default) | positive integer
Since R2021a
Fit order for 'least-squares'
method, specified as
'auto'
or an integer. This option specifies the order of the
discrete-time model to be fitted to the continuous-time frequency response with the
'least-squares'
method. The default value 'auto'
to uses the order of the continuous-time model. Specify a model order by changing
FitOrder
to a positive integer. Reducing the order can help with
unstable poles or pole/zero cancellations at z = -1
.
ThiranOrder
— Maximum order of Thiran filter for 'tustin'
and 'matched'
methods
0 (default) | positive integer
Maximum order of the Thiran filter used to approximate fractional delays in the
'tustin'
and 'matched'
methods. A value of 0
means that c2d
rounds fractional delays to the nearest integer
multiple of the sample time. If you set this property to a positive integer,
c2d
uses thiran
(Control System Toolbox) to approximate fractional delays before discretizing.
For state-space models with fractional delays,
the Thiran filters contribute additional internal delays when
DelayModeling
is set to 'delay'
and additional
states when DelayModeling
is set to
'state'
. (since R2024a)
DelayModeling
— Format of modeling extra delays
'delay'
(default) | 'state'
Since R2024a
Format of modeling extra delays arising from discretization, specified as
'delay'
or 'state'
. Discretizing models with
input or output delays that are fractional multiples of Ts
can give
rise to additional delays besides the discrete input and output delays. Use this option
to specify whether to model these extra delays as internal delays
(''delay'
) or additional states
('state'
).
Consistency
— State and delay consistency in state-space arrays
'off'
(default) | 'on'
Since R2024a
Option to specify state and delay consistency in state-space arrays, specified as
'off'
or 'on'
.
'on'
— Provide state and delay consistency across the resulting array of discretized state-space models.'off'
— Minimize the number of delays in each model.
Examples
Discretize Two Models Using Tustin Discretization Method
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.
Version History
Introduced in R2012aR2024a: New options
c2dOptions
provides two new options:
DelayModeling
— Specify whether to model extra delays as internal delays (default) or additional states.Consistency
— Enforce state and delay consistency in state-space arrays. This option is helpful when discretizing gridded LPV or LTV models.
R2024a: FractDelayApproxOrder
renamed to ThiranOrder
The FractDelayApproxOrder
property of c2dOptions
is
renamed to ThiranOrder
.
R2021a: Option to specify fit order
The new FitOrder
option specifies the fit order when using the
least-squares
method for continuous-discrete conversion.
FitOrder
specifies the order of the discrete-time model to be fitted to
the continuous-time frequency response. Reducing the order can help with unstable poles or
pole/zero cancellations at z = -1
.
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)