Main Content

d2dOptions

Create option set for discrete-time resampling

Description

Use d2dOptions to specify the discretization method and associated quantities for discretizing models with d2d.

Creation

Description

opts = d2dOptions returns the default options for d2d.

opts = d2dOptions(Name=Value) creates an option set with the options specified by one or more name-value arguments.

example

Properties

expand all

Resampling discretization method, specified as one of the following values:

'zoh'

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

'tustin'

Bilinear (Tustin) approximation. By default, d2d resamples with no prewarp. To include prewarp, use the PrewarpFrequency option.

For information about the algorithms for each d2d conversion method, see Continuous-Discrete Conversion Methods.

Prewarp frequency for 'tustin' method, specified in rad/TimeUnit, where TimeUnit is the time units, specified in the TimeUnit property, of the resampled system. Takes positive scalar values. The prewarp frequency must be smaller than the Nyquist frequency before and after resampling. A value of 0 corresponds to the standard 'tustin' method without prewarp.

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 resampled state-space models.

  • 'off' — Minimize the number of delays. This option may increase the number of states in the resulting resampled array of models.

Examples

collapse all

Create the following discrete-time transfer function with sample time 0.1 seconds.

H(z)=z+1z2+z+1

h1 = tf([1 1],[1 1 1],0.1);

Specify the discretization method as bilinear Tustin method with a prewarping frequency of 20 rad/seconds.

opts = d2dOptions('Method','tustin','PrewarpFrequency',20);

Resample the discrete-time model using the specified options.

h2 = d2d(h1,0.05,opts);

You can use the option set opts to resample additional models using the same options.

Version History

Introduced in R2010a

expand all

See Also