Professional Documents
Culture Documents
December 1, 2022
Equations
System Equations
ẋ = Ax + Ψ(y, u) + Φ(x, θ, u)
y = Cx
(1)
Φ(x, θ, u) = Φ1 (x, u) + BΦ2 (x, u)θ
Φ1 = 0, Φ2 = −15.86 sin x3
Excitation Input
u = sin 2πt; (4)
Simulation
The aforementioned equations were simulated using MATLAB. These equations are given by Ekramian et al. (2013).
In this simulation we have tried to reproduce the results that they have achieved.
The true value of the parameter ’m’ witches between a few constant value in order to observe how quickly the
adaptation law adapts the value of the estimated parameter to converge to the value of ’m’. This is implemented
in the function ’theta’ given below:
end
1
All of the equations were written inside of a function ’model’. The contents of this function are given below:
function dx = model (t , X )
x = X (1:4) ;
x_hat = X (5:8) ;
theta_hat = X (9) ;
u = sin (2* pi * t ) ;
phi_1 = 0;
phi_2 = -15.86 * sin ( x (3) ) ;
phi = phi_1 + B * phi_2 * theta ( t ) ;
end
2
Finally the main simulation file is given below, which solves the differential equations using ode45 function of
MATLAB. The main code also has the plots that are given in the next section.
% % Initial conditions
x_0 = [1 -1 1 5] ’;
x_0_hat = [1 -1 0 0 ] ’;
m_0 = 0.5;
% % Plots
figure (1)
subplot (3 ,1 ,1)
hold on
plot (T , dx (: ,3) )
plot (T , dx (: ,7) , ’r -. ’)
legend ( ’ Actual State ’ , ’ Adapive State ’)
ylabel ( ’ State x_3 ’)
hold off
subplot (3 ,1 ,2)
hold on
plot (T , dx (: ,4) )
plot (T , dx (: ,8) , ’r -. ’)
ylabel ( ’ State x_4 ’)
legend ( ’ Actual State ’ , ’ Adapive State ’)
hold off
subplot (3 ,1 ,3)
hold on
plot (T , m )
plot (T , dx (: ,9) , ’r -. ’)
ylabel ( ’ Parameter m ’)
xlabel ( ’ Time ’)
legend ( ’ Actual Value ’ , ’ Adapive Value ’)
hold off
3
Plots
Figure 1: Plot of states x3 and x4 of the system given in equation 1 with the control law of equation
4 applied. The estimation of the states x3 and x4 made using the adaptive state observer given in
equation 2 is also superimposed on the true values of the states. In the last plot, the estimated
and the actual value of the parameter ’m’ is compared where the actual value of the parameter is
constant but changes twice to see the effect on the estimated value.
References
Ekramian, M., Sheikholeslam, F., Hosseinnia, S., and Yazdanpanah, M. (2013). Adaptive state observer for lipschitz
nonlinear systems. Systems & Control Letters, 62(4):319–323.