Compare the linear model obtained using exact linearization techniques with the estimated frequency response:
mdl = 'scdplane'; open_system(mdl) io(1) = linio('scdplane/Sum1',1) io(2) = linio('scdplane/Gain5',1,'output') sys = linearize(mdl,io); in = frest.Sinestream(sys); [sysest,simout] = frestimate(mdl,io,in); frest.simView(simout,in,sysest,sys)
The resulting frequency response does not match the linearization results due to the effects of the Pilot and Wind Gust Disturbance blocks. To view the effects of the noise on the time response of the first frequency, right-click the time response plot and make sure Show filtered steady state output only is selected.
Locate the source blocks:
srcblks = frest.findSources(mdl,io);
Repeat the frequency response estimation with the source blocks disabled:
opts = frestimateOptions('BlocksToHoldConstant',srcblks); [sysest,simout] = frestimate(mdl,io,in,opts); frest.simView(simout,in,sysest,sys)
The resulting frequency response matches the exact linearization results.