Codigo RLC ingenieria control
Enviado por Cristhian Medina • 12 de Mayo de 2021 • Apuntes • 253 Palabras (2 Páginas) • 77 Visitas
%Determine la matriz de ganancia k, para el sistema RLC, considerando que
%se desea controlar el sistema con un ts=3s y un Mp=0.1
clear all;
clc;
format short g
% MODELO DEL SISTMA
R1=1E3;
R2=10E3;
L=10E-3;
C=10E-6;
a=(R1+R2)*L*C;
b=(R1*R2*C+L);
c=R1;
d=L;
num=[d/a 0];
den=[a/a b/a c/a];
Gt=tf(num,den)
A=[-b/a -c/a;1 0];
B=[1;0];
C=[d*a 0];
D=[0];
Sistema=ss(A,B,C,D)
step(Sistema)
%# POLOS DESEADOS
Mp=0.1;
ts=3;
E=sqrt(((log(Mp))^2)/((pi^2)+(log(Mp))^2))
wn=4/(ts*E)
Gd=tf(wn^2,[1,2*E*wn,wn^2])
hold on
step(Gd)
%# Ackerman(K)
I=eye(size(A));
Co=[B A*B];
Coi=inv(Co);
Pd=[A^2+(2*E*wn)*A+(wn^2)*I]
K=[0 1]*Coi*Pd
Gt =
9.091 s
---------------------------
s^2 + 9.092e04 s + 9.091e05
Continuous-time transfer function.
Sistema =
A =
x1 x2
x1 -9.092e+04 -9.091e+05
x2 1 0
B =
u1
x1 1
x2 0
C =
x1 x2
y1 1.1e-05 0
D =
u1
y1 0
Continuous-time state-space model.
E =
0.59116
wn =
2.2555
Gd =
5.087
---------------------
s^2 + 2.667 s + 5.087
Continuous-time transfer function.
Pd =
8.265e+09 8.265e+10
-90916 -9.0909e+05
K =
-90916 -9.0909e+05
[pic 1]
Published with MATLAB® R2020b
...