National Instruments 370760B-01 Calculator User Manual


 
3.4. SYSTEM RESPONSE FUNCTIONS 87
[a,b,c,d] = abcd(sys)
sys = system(a,b,c,d)
y1 = system(sys,{X0=[-1;0]})*u
# Now plot the result
g1 = ctrlplot(u,{line
style=2});
g1 = ctrlplot(y0,g1,{line
style=1});
g1 = ctrlplot(y1,g1,{line
style=4});
g1 = plot(g1,{!grid})?
24680 10
-2
-1
0
1
-3
2
The native Xmath time domain simulation, using the * operation, has been
supplemented with an Xµ function: trsp. This provides automatic selection of the
integration time and, if necessary, interpolates the input signal appropriately. trsp also
gives the option of linear interpolation of the input vector and a triangle hold equivalent
discretization of the integration. This simulates the response of the system to signals
which are linearly interpolated between samples. The syntax of the function is
illustrated below.
y = trsp(sys,u,tfinal,{ord,intstep})
sys, u,andtfinal are the dynamic system, input signal and final time respectively. ord