c2d (Control Design and Simulation Module, MathScript Function)

LabView Control Design MathScript Functions

c2d (Control Design and Simulation Module, MathScript Function)

Member of the convert class.

Syntax

SysDis = c2d(SysCon, Ts)

SysDis = c2d(SysCon, Ts, method)

SysDis = c2d(SysCon, Ts, 'prewarp', w)

[SysDis, Ic] = c2d(SysCon, Ts)

[SysDis, Ic] = c2d(SysCon, Ts, method)

[SysDis, Ic] = c2d(SysCon, Ts, 'prewarp', w)

Description

Converts a continuous system model to a discrete model using the method you specify. This function also returns the initial condition conversion matrix. Refer to the LabVIEW Control Design User Manual for information about these conversion methods.

Examples

Inputs

Name Description
SysCon Specifies a continuous linear time-invariant (LTI) model in transfer function, zero-pole-gain, or state-space form.
Ts Specifies the sampling time of the discrete model SysDis. Ts is a real scalar.
method Specifies the method this function uses to convert the SysCon model to the SysDis model. method is a string that can take the following values:

'zoh' (Default) Converts the model using the Zero-Order-Hold method.
'tustin' Converts the model using Tustin's method.
'forward' Converts the model using the Forward Rectangular method.
'backward' Converts the model using the Backward Rectangular method.
'foh' Converts the model using the First-Order-Hold method.
'matched' Converts the model using the Matched Pole-Zero method.
'prewarp' Converts the model using the Prewarp method. If you enter this option, you also must specify the prewarp frequency w as an input to this function.
'z transform' Converts the model using the Z-Transform method.
w Specifies the prewarp frequency, in radians/second. The default value is 4. w is a real scalar.

Outputs

Name Description
SysDis Returns a discrete system with sampling time Ts in transfer function, zero-pole-gain, or state-space form.
Ic Returns the initial condition conversion matrix, which this function uses to discretize the continuous initial conditions vector. Ic is a real matrix.

Examples

SysCon = ss(-1, 1, 2, 0)
[SysDis, Ic] = c2d(SysCon, 0.1, 'foh')

Related Topics

d2c
d2d