Commit 935f3d30 authored by Kristian Soltesz's avatar Kristian Soltesz
Browse files

Added controller bode plos to example

parent 0fad7f11
......@@ -42,13 +42,20 @@ T = @(K)feedback(L(K),1);
KS = @(K)feedback(K,P);
PS = @(K)feedback(P,K)
% Bode magnitudes (to verify robustness constraints)
wMin = w(1);
wMax = w(end);
close all
% Controller dynamics
figure(1)
bode(K1,{wMin,wMax},'b',K2,'r',K3,'g')
hold on
title('Controller')
legend('IE-optimal','IAE-optimal','IAE-optimal w. filter','Location',...
'NorthWest')
% Bode magnitudes (to verify robustness constraints)
figure(3)
subplot(311)
bodemag(S(K1),{wMin,wMax},'b',S(K2),'r',S(K3),'g')
hold on
......@@ -76,7 +83,7 @@ plot([wMin wMax],Mks*[1 1],'k')
title('Noise sensitivity')
% Load disturbance response (to compute IE and IAE)
figure(2)
figure(4)
step(PS(K1),'b',PS(K2),'r',PS(K3),'g',P,'k')
hold on
title('Load step response')
......@@ -86,3 +93,5 @@ legend('IE-optimal','IAE-optimal','IAE-optimal w. filter','Open-loop',...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment