Effacer les filtres
Effacer les filtres

Problem with discrete state space equation

7 vues (au cours des 30 derniers jours)
Trio Pamungkas
Trio Pamungkas le 14 Mai 2019
Commenté : Trio Pamungkas le 14 Mai 2019
hello guys, so i have problem with state space model where the value of element matrix phi and gamma between blue circle and red circle are different.
this is my code
Cf = 20e-6;
Rf = 0.022;
Lf = 4e-3;
Ts = 10e-6;
Ai = [0 1/Cf; -1/Lf -Rf/Lf];
Bi = [0 1/Cf; 1/Lf 0];
Ii = [1 0;0 1];
phi = exp(Ts*Ai);
gamma = inv(Ai)*(J - Ii)*Bi;
p = sqrt(Lf/Cf);
q = Ts/(sqrt(Lf*Cf));
p11 = cos(q);
p12 = p*sin(q);
p21 = (1/p)*sin(q);
p22 = cos(q);
g11 = 1-cos(q);
g12 = p*sin(q);
g21 = (1/p)*sin(q);
g22 = 1-cos(q);
phi1 = [p11 p12; p21 p22];
gamma1 = [g11 g12; g21 g22];
1.PNG
2.PNG

Réponse acceptée

darova
darova le 14 Mai 2019
Use expm() for matrix exponent (exp() ony returns exponent of each element in matrix):
phi = expm(Ts*Ai);
gamma = inv(Ai)*(phi - Ii)*Bi;
  1 commentaire
Trio Pamungkas
Trio Pamungkas le 14 Mai 2019
wow thanks sir, its working now

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Gamma Functions dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by