io(1) = linio('scdsaturationDFcl/r',1,'input');
io(2) = linio('scdsaturationDFcl/Linear',1,'output');
for ct = 1:numel(A)
in = frest.Sinestream('Frequency',w,'Amplitude',A(ct),...
'NumPeriods',10,'SettlingPeriods',7);
cl_withfrest(1,1,ct) = frestimate(mdl,in,io);
end
You can plot analytically calculated closed-loop magnitude along with the one from
FRESTIMATE.
h = figure;bodemag(cl,'b',cl_withfrest,'r');
annotation(h,'textarrow',[0.64 0.58],[0.64 0.58],'String','Increasing A');
5 Frequency Response Estimation