National Instruments 370753C-01 Manual De Usuario
Chapter 2
Linear System Representation
2-10
ni.com
numden( )
[num,den] = numden(Sys)
The
numden( )
function returns the numerator and denominator
polynomials comprising a single-input, single-output system in transfer
function form. If the system is in state-space form, an internal conversion
is performed to find the transfer function equivalent, but the format of the
system variable itself remains unchanged. State-space systems used in
conjunction with
function form. If the system is in state-space form, an internal conversion
is performed to find the transfer function equivalent, but the format of the
system variable itself remains unchanged. State-space systems used in
conjunction with
numden( )
must be single-input, single-output.
As noted in the
section, common roots in
the numerator and denominator polynomials are not canceled.
numden( )
.
Example 2-5
Using numden( ) to Extract the Transfer Function Polynomials
sys4=system([0,1;-0.75,0],[1,0]',[0,1],0,
{dt=0.5});
[num,den] = numden(sys4)?
num (a polynomial) =
-0.75
den (a polynomial) =
(z
2
+ 0.75)
Because
num
and
den
are polynomial objects and not a complete system,
the discrete sampling time is not explicitly saved. You can use
check( )
with the
convert
keyword to map the two internal representations to each
other, as described in the
section.
However, notice that z was used as the polynomial variable, indicating that
these numerator and denominator polynomials were obtained from a
discrete-time system. Had the system been continuous, s would have been
used instead of z.
these numerator and denominator polynomials were obtained from a
discrete-time system. Had the system been continuous, s would have been
used instead of z.
period( )
dt = period(Sys)
The
period( )
function extracts the sample period (in seconds) of a
system. If the system is continuous,
period( )
will return zero.
In Example 2-5, you found the numerator and denominator polynomials
corresponding to the discrete state-space system. Example 2-6 combines
corresponding to the discrete state-space system. Example 2-6 combines