Engee documentation

c2d

Page in progress.

Transformation of a continuous model into a discrete one.

Library

EngeeControlSystems

Syntax

Function call

  • sysd = c2d(sysc, ts) transforms a continuous model sysc into a discrete one with a sampling period ts using a zero-order extrapolator as a discretization method.

  • sysd = c2d(sysc, ts, method) transforms a continuous model sysc into a discrete one with a sampling period ts by the discretization method method.

  • sysd = c2d(sysc, ts, method; w_prewarp=0) transforms a continuous model sysc into a discrete one with a sampling period ts by the discretization method method. When using a bilinear transformation, the frequency of pre-images is additionally indicated w_prewarp by default equal to zero.

Arguments

Input arguments

# sysc — continuous dynamic system model

+ dynamic system model

Details

The initial continuous model of a dynamic system.

Data types

Pid, PidStd

# ts — sampling step

+ scalar

Details

The discretization step of the resulting discrete system.

Data types

Float64

# method — sampling method

+ :zoh (by default) | :foh | :tustin

Details

The discretization method. You can choose one of the following values:

  • :zoh — Zero-order extrapolator (selected by default). Within the sampling interval, the signals are approximated by a constant value equal to the value of the signal at the beginning of the sampling interval.

  • :foh — a zero-order extrapolator. Within the sampling interval, the signals are approximated by straight segments passing through the ends of the signal curve in the sampling interval.

  • :tustin — bilinear transformation within the sampling interval.

Data types

Symbol

# w_prewarp — frequency of pre-distortion

+ 0 (by default) | scalar

Details

The pre-distortion frequency in rad/s used in bilinear conversion. The value must be a positive number.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64

Output arguments

# sysd is a discrete model of a dynamic system

+ dynamic system model

Details

The resulting discrete model of a dynamical system.

Data types

Pid, PidStd