njit-etd2003-081 - New Jersey Institute of Technology

njit-etd2003-081 - New Jersey Institute of Technology njit-etd2003-081 - New Jersey Institute of Technology

archives.njit.edu
from archives.njit.edu More from this publisher
20.01.2015 Views

285 ysim = idsim( rp , th ); plot([ hr (40000:50000) ysim(40000:50000)]) Note that the function compare does this sequence of commands more efficiently. One can see that the model is quite capable of describing the system, even for data that were not used in calculating the fit. 9. To compute and graph the poles and zeros of the ARX model, use zpth = th2zp(th); zpplot(zp th); 10. If one wants to know the frequency response, one can compute the frequency function of the model and present it as a Bode plot by entering gth = th2ff(th); bodeplot(gth); 11. Compare this transfer function with a transfer function obtained from a nonparametric, spectral analysis method. Such an estimate is obtained directly from the data gs = spa(z2); gs = sett(gs,0.005); The sampling interval, 0.005, is set by the second command in order to obtain correct frequency scales. The function spa also allows you to select window sizes, frequency ranges, etc. All these values have been given as default values. 12. One can then compare the estimate of the transfer function obtained by spectral analysis versus the one obtained from the model (B.1) with bodeplot([gs gth]);

286 Make sure the agreement is quite good. Else rerun the 13. Finally, plot the step response of the model. The model comes with an estimate of its own uncertainty. Ten different step responses are computed and graphed. They correspond to "possible" models, drawn from the distribution of the true system (according to our model): step=ones(30,1); idsimsd(step,th); Spectral Analysis 14. The function spa performs spectral analysis according to the procedure in (3.35)- (3.37) of [42]. [G,PHIV] = spa(z); 15. Here z contains the output-input data as above. G and PHIV are matrices that contain the estimated frequency function GN and the estimated disturbance spectrum Фv in (3.37). They are coded into a special format, the freqfunc format, which allows you to plot them using the function bodeplot or ffplot: [G,PHIV] = spa(z); bodeplot(G); bodeplot(PHIV); bodeplot gives logarithmic amplitude and frequency scales (in rad/sec) and linear phase scale, while ffplot gives linear frequency scales (in Hz). The details of the freqfunc format are given in [42] and by typing: help freqfunc;

285<br />

ysim = idsim( rp , th );<br />

plot([ hr (40000:50000) ysim(40000:50000)])<br />

Note that the function compare does this sequence <strong>of</strong> commands more efficiently.<br />

One can see that the model is quite capable <strong>of</strong> describing the system, even for data that<br />

were not used in calculating the fit.<br />

9. To compute and graph the poles and zeros <strong>of</strong> the ARX model, use<br />

zpth = th2zp(th);<br />

zpplot(zp th);<br />

10. If one wants to know the frequency response, one can compute the frequency<br />

function <strong>of</strong> the model and present it as a Bode plot by entering<br />

gth = th2ff(th);<br />

bodeplot(gth);<br />

11. Compare this transfer function with a transfer function obtained from a<br />

nonparametric, spectral analysis method. Such an estimate is obtained directly from the<br />

data<br />

gs = spa(z2);<br />

gs = sett(gs,0.005);<br />

The sampling interval, 0.005, is set by the second command in order to obtain<br />

correct frequency scales. The function spa also allows you to select window sizes,<br />

frequency ranges, etc. All these values have been given as default values.<br />

12. One can then compare the estimate <strong>of</strong> the transfer function obtained by spectral<br />

analysis versus the one obtained from the model (B.1) with<br />

bodeplot([gs gth]);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!