Main Content


Specify discretization method for continuous-time to discrete-time conversions


Use c2dOptions to specify the discretization method and associated quantities for discretizing models with c2d.



opts = c2dOptions returns the default options for c2d. Customize options by using dot notation to change the properties of opts.


opts = c2dOptions(Name,Value) sets properties using one or more name-value arguments. For example, to use the bilinear (Tustin) approximation method, set 'Method' to 'tustin'.


expand all

Discretization method, specified as one of the following values:


Zero-order hold, where c2d assumes the control inputs are piecewise constant over the sample time Ts.


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.

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 the ThiranOrder option.


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 ThiranOrder option.

'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.

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.

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.

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)

Since R2024a

Format of modeling extra delays arising from discretization, specified as 'delay' or 'state'. Use this option to specify whether to model extra delays from discretization as internal delays or additional states.

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.


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);


[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 R2012a

expand all

See Also