Problem with discrete state space equation
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Trio Pamungkas
el 14 de Mayo de 2019
Comentada: Trio Pamungkas
el 14 de Mayo de 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];
0 comentarios
Respuesta aceptada
darova
el 14 de Mayo de 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;
Más respuestas (0)
Ver también
Categorías
Más información sobre Gamma Functions en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!