Chapter 2 Linear System Representation
© National Instruments Corporation 2-13 Xmath Control Design Module
check(sys, {stable})
ans (a scalar) = 0
check(sys, {discrete, ss})
ans (a scalar) = 1
[, tfsys] = check(sys, {tf, convert})
tfsys (a transfer function) =
(z + 0.26)
---------------------
(z + 0.26)(z - 1.875)
initial delay outputs
0
0
System is discrete, sampling at 0.001 seconds.
Discretizing a System
Many systems where behavior derives from physical equations of motion
can be modeled most naturally as continuous processes, using differential
equations. Therefore, you often choose to discretize these models for use
with a digital controller. A number of mathematical methods have been
developed to approximate the behavior of a continuous system in a
discrete-time representation with an appropriately fast sampling rate.
Xmath provides two functions, discretize( ) and
makecontinuous( ), which encompass a range of these techniques.
discretize( ) converts a system from its representation as a continuous
function in the s-domain to a discrete-time z-domain function.
makecontinuous( ) does the reverse, transforming a discrete system to
its continuous form.

discretize( )

SysD = discretize(Sys,{dt,exponential,forward,backward,
tustins,ztransform,polezero,firstorder})
The discretize( ) function has a number of keywords that correspond
to the different methods of continuous-to-discrete conversion that are
implemented within Xmath. The sampling interval (in seconds) for the
discrete system should be set equal to the keyword dt. If no value for dt
is specified, a default of 0.5 seconds is used. The default discretization
method used is the exponential (step-invariant) transform. The different