National Instruments 370760B-01 Calculator User Manual


 
sdtrsp 341
triangle hold equivalent is used. This is the same a linearly connecting the samples at
the input to the hold.
Some care is needed in the choice of cdelay and intstep. The default for intstep is based
on the continuous system eigenvalues and the minimum time spacing in the input vector,
w. It will be forced to be an integer divisor of the digital sample time. Intstep must also
be a divisor of cdelay. The user can inadvertently force a very small integration period
by selecting cdelay without regard to the sample period. Warnings are printed if this is
suspected to be the case.
The upper LTF block (continuous sytem) can be a constant matrix. The lower block
(digital system) must be a discrete dynamic system in order to specify the sampling
time. If a constant gain digital system is required specify it with,
dSys = system([], [], [],Dd, T).
Example:
# Consider a continuous time plant,
P = 1/makepoly([1,0,-0.05],"s")
[a,b,c,d] = abcd(P)
P = system(a,b,c,d)
T = 1/20 # sample period
# The following digital controller is used.
# The first input is the reference and the # second is the
measurement.
digC = system([-1.5,T/4; -2/T,-.5],[.5,2;1/T,1/T],...
[-1/T^2,-1.5/T], [1/T^2,0],T)
# Now consider a sample & hold version of P and
# check that the closed loop digital system is stable
# and has a reasonable step response.
digP = discretize(P,T,exponential)
snm = ["digP"; "digC"]