How to find the derivative of this Lyapunov function?

5 views (last 30 days)
Hello!
I want to find the derivative of this Lyapunov function with respect to the differentiation parameters e, ΔKx, ΔKr.
where ΔKx = Kx_hat - Kx and ΔKr = Kr_hat - Kr , that is
Thanks in advance!
  1 Comment
RoBoTBoY
RoBoTBoY on 20 May 2021
I tried that, but without results.
Kx = sym('Kx');
Kr = sym('Kr');
Kx_hat = sym('Kx_hat');
Kr_hat = sym('Kr_hat');
gamma_x = sym('gamma_x');
gamma_r = sym('gamma_r');
Lambda = sym('Lambda');
e = sym('e');
P = sym('P');
DKx = Kx_hat - Kx;
DKr = Kr_hat - Kr;
V = e'*P*e + trace(DKx'*(gamma_x^-1)*DKx*abs(Lambda)) + trace(DKr'*(gamma_r^-1)*DKr*abs(Lambda));
diff_V = diff(V,e,DKx,DKr)

Sign in to comment.

Accepted Answer

Sulaymon Eshkabilov
Sulaymon Eshkabilov on 20 May 2021
You have overlooked a couple of points
V does not contain Kx_hat,Kx, Kr_hat, Kr variables and thus, no need to introduce:
DKx = Kx_hat - Kx;
DKr = Kr_hat - Kr;
syms gamma_x gamma_r Lambda E P
syms DKx DKr
syms V(E, DKx, Dkr)
V = E'*P*E + trace(DKx'*(gamma_x^-1)*DKx*abs(Lambda)) + trace(DKr'*(gamma_r^-1)*DKr*abs(Lambda));
diff_V_e = diff(V, E)
diff_V_DKx = diff(V,DKx)
diff_V_DKr = diff(V,DKr)
Good luck

More Answers (0)

Categories

Find more on Matrix Computations in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!