Page
Page
Page
Comparision Study
Nonlinear 𝑦
scope
system
+ 𝛿𝑢 Linearized 𝛿𝑦
𝑢 system + mux
− +
𝑢𝑛 𝑦𝑛
From storage From storage
Let we design a state feedback controller 𝛿𝑢 = −𝐾. 𝛿𝑦 and we try to do a comparision
study with the nonlinear results
for k=1:length(t)-1
un(k)=2+sin(1-exp(-t(k)))-3*exp(-t(k)); % The nominal control
xn(:,k)=[1-exp(-t(k));exp(-t(k))]; % Nominal state trajectory
[A,B]=linearizedesys(f,xn(:,k),un(k)); % Numerical linearization
du(k)=control(A,B,xd(:,k)); % State Feedback Control
u(k)=un(k)+du(k); x(:,k+1)=x(:,k)+dt*f(x(:,k),u(k));
xd(:,k+1)=xd(:,k)+dt*Linear(A,B,xd(:,k),du(k),t(k));
xl(:,k)=xn(:,k)+xd(:,k);
end
figure, subplot(2,1,1), plot(t, x(1,:),'-r','linewidth',1.5),
grid on, hold on, plot(t(1:end-1),xl(1,:),'--b','linewidth',1.5),
subplot(2,1,2), plot(t(1:end-1),u,'-b','linewidth',1.5)
figure, plot(t, xd(1,:),'-r','linewidth',1.5), grid on
From storage
𝑢𝑛
+ 𝑢 Nonlinear 𝑦
scope
system
+
𝛿𝑢
Linearized 𝛿𝑦
system + mux
+
𝛿𝑢
−K 𝑦𝑛
From storage