Demonstrate model matching control using a single integrator plant.
------------------------------------------------------------------------
See also FResp, Plot2D
------------------------------------------------------------------------
Contents
Desired model time constant
tau = .1;
Matching gains
gain = [0.1 1 10];
Generate Bode plots
w = logspace(-2,2);
m = zeros(length(gain),length(w));
p = m;
lg = cell(1,length(gain)+1);
for j = 1:length(gain)
k = gain(j);
num = [tau 1+k];
den = [tau k*tau + 1 k];
[m(j,:), p(j,:)] = FResp(num,den,w);
lg{j} = sprintf('K = %4.1f',k);
end
Add the model
j = 4;
num = 1;
den = [tau 1];
[m(j,:), p(j,:)] = FResp(num,den,w);
lg{end} = 'model';
Plot
yL = ['Mag (db)'; 'Phase (rad)'];
Plot2D(w,[20*log10(m);p],'Frequency (rad/s)',yL,'Bode Plot','xlog',['1:4';'5:8'])
legend(lg)