Resolucion de un circuito rlc en matlab

5,817 views

Published on

Resolucion de una EDO de segundo grado aplicado a un circuito RLC

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
5,817
On SlideShare
0
From Embeds
0
Number of Embeds
15
Actions
Shares
0
Downloads
65
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Resolucion de un circuito rlc en matlab

  1. 1. UNIVERSIDA PÓLITECNICA SALESIANA<br />Ingeniería Electrónica<br />Ecuaciones Diferenciales<br />Resolución de un circuito RLC <br />David Basantes<br />Israel Campaña<br />Vinicio Masabanda<br />Juan Ordoñez<br />
  2. 2. PROBLEMA<br /> Encuentre la carga al tiempo t=0.92s en el circuito LCR donde L=1.52H, R=3Ὠ, C=0.20f y E(t)=15sen (t) + 5eᶺ(t) V<br /> La carga y la corriente son nulas.<br />
  3. 3. Procedimiento<br /><ul><li>1.-Buscamos la fórmula para resolver el circuito RCL.</li></ul> *L(d²q/dt²) + R(dq/dt) + 1/C(q)= E(t)<br /><ul><li>2.-Reemplazamos los datos.</li></ul> 1.51(d²q/dt²) + 3(dq/dt) + 1/0.20(q)= 15sen (t) + 5eᶺ(t) <br /><ul><li>3.-Igualamos a cero la parte homogénea</li></ul> 1.51(d²q/dt²) + 3(dq/dt) + 1/0.20(q)= 0<br />
  4. 4. <ul><li>4.-Reconocer el grado de la EDO y remplazar en la fórmula general.</li></ul> 1.51m² + 3m + 5 = 0<br /> Dónde: a=1.51 ; b=3; c=5<br /><ul><li>5.- Reconocemos α y β y lo aplicamos a la fórmula y reemplazamos</li></ul> α= -0.99 y β=1.52<br /> Y= eᶺ(αt) [A cos(βt) + B sen(βt)]<br />qh= eᶺ(-0.99t) [A cos(1.52t) + B sen(1.52t)]<br /><ul><li>6.- Separamos qh en q1 y q2 </li></ul> q1= eᶺ (-0.99t) cos(1.52t)<br /> q2= eᶺ (-0.99t) sen(1.52t)<br />
  5. 5. <ul><li>7.- Escribimos el Wronskiano y calculamos W1 Y W2.</li></ul> q1= eᶺ (-0.99t) cos(1.52t)<br /> q´1= -0.99eᶺ (-0.99t)*cos(1,52) – 1.52 eᶺ (-0.99t)* sen(1.52t)<br /> q2= eᶺ (-0.99t)* sen(1.52t)<br /> q´2= -0.99eᶺ (-0.99t) *sen(1.52t) + 1.52 eᶺ (-0.99t) *cos(1.52t)<br />
  6. 6. <ul><li>W= [ eᶺ (-0.99t) cos(1.52t)][ -0.99eᶺ (-0.99t) sen(1.52t) + 1.52 eᶺ (-0.99t) cos(1.52t)]</li></ul> –[ eᶺ (-0.99t) sen(1.52t)][ -0.99eᶺ (-0.99t)cos(1,52) – 1.52 eᶺ (-0.99t) sen(1.52t)]<br /> W= eᶺ (-1.98t)[-0.99 cos(1.52t)* sen(1.52t) + 1.52cos²(1.52t)] - eᶺ (-1.98t) [-0.99 sen(1.52t)* cos(1.52t) - 1.52sen²(1.52t)]<br /> W= eᶺ (-1.98t){-0.99 cos(1.52t)* sen(1.52t) + 1.52cos²(1.52t) – {-0.99 sen(1.52t)* cos(1.52t)- 1.52sen²(1.52t)}<br /> W= eᶺ (-1.98t)(-0.99 cos(1.52t)* sen(1.52t) + 1.52cos²(1.52t) + 0.99 sen(1.52t)* cos(1.52t) + 1.52sen²(1.52t)}<br /> W= eᶺ (-1.98t)(1.52cos²(1.52t) + 1.52sen²(1.52t))<br /> W= eᶺ (-1.98t)[ 1.52(cos²(1.52t) + sen²(1.52t)]<br /> W= eᶺ (-1.98t)*(1.52)<br />
  7. 7. <ul><li>Donde: f(t)= 15sen (t) + 5eᶺ(t)</li></ul> W1= 0 - [15sen (t) + 5eᶺ(t)][ eᶺ (-0.99t) sen(1.52t)]<br /> W1= -[ 15sen (t). eᶺ (-0.99t) sen(1.52t)) + (5eᶺ(t). eᶺ (-0.99t) sen(1.52t)]<br /> W1= -15 eᶺ (-0.99t).sen (t). sen(1.52t) - 5 eᶺ (0.01t) sen(1.52t)<br /> W1= - sen(1.52t) [15 eᶺ (-0.99t) sen (t) + 5 eᶺ (0.01t)]<br />
  8. 8. W2= [ eᶺ (-0.99t) cos(1.52t)][ 15sen (t) + 5eᶺ(t)] – 0<br />W2= [(eᶺ (-0.99t) cos(1.52t)( 15sen (t)) + (eᶺ (-0.99t) cos(1.52t). 5eᶺ(t)]<br />W2= [15 eᶺ (-0.99t) cos(1.52t). sen (t) + 5eᶺ(0.01t) cos(1.52t)<br />W2= cos(1.52t).[ 15 eᶺ (-0.99t) sen (t) + 5eᶺ(0.01t)]<br />
  9. 9. <ul><li>8.- Calculamos U1 Y U2</li></ul> U´1= W1/W= (- sen(1.52t) [15 eᶺ (-0.99t) sen (t) + 5 eᶺ (0.01t)])/( eᶺ (-1.98t)*(1.52)<br /> U´1= - sen(1.52t)[9.87 eᶺ (0.99t) + 3.29 eᶺ (1.99t)]<br /> U´1= - sen(1.52t). 9.87 eᶺ (0.99t) - 3.29 eᶺ (1.99t). sen(1.52t)<br /> U1=ʃ -9.87 eᶺ (0.99t) sen(1.52t) - 3.29 eᶺ (1.99t). sen(1.52t)<br /> U1= -9.87ʃ eᶺ (0.99t). sen(1.52t) - 3.29ʃ eᶺ (1.99t). sen(1.52t)<br />ʃ eᶺ(a)(u) senbu.du= eᶺ(a)(u)/(a²+b²).(a senbu – b cosbu) + C<br /> U1= -9.87[(eᶺ (0.99t)/(0.99)²+(1.52)²)* (0.99 sen(1.52t) – 1.52 cos(1.52t))]<br /> -3.29 [eᶺ (1.99t)/(1.99)²+(1.52)² (1.99 sen(1.52t) – 1.52 cos(1.52t))]<br /> U´2= W2/W = cos(1.52t).[ 15 eᶺ (-0.99t) sen (t) + 5eᶺ(0.01t)]/ ( eᶺ (-1.98t)*(1.52)<br /> U´2= cos(1.52t).[9.87 eᶺ (0.99t ) + 3.29 eᶺ (1.99t)]<br /> U´2= 9.87 eᶺ (0.99t ) cos(1.52t) + 3.29 eᶺ (1.99t) cos(1.52t)<br /> U2= ʃ 9.87 eᶺ (0.99t ) cos(1.52t) + 3.29 eᶺ (1.99t) cos(1.52t)<br /> U2= 9.87 ʃ eᶺ (0.99t ) cos(1.52t) + 3.29 ʃ eᶺ (1.99t) cos(1.52t)<br /> ʃ eᶺ(a)(u) cosbu.du= eᶺ(a)(u)/(a²+b²).(b senbu + b cosbu) + C<br /> U2= 9.87 [(eᶺ (0.99t)/(0.99)²+(1.52)²)* (1.52 sen(1.52t) + 0.99 cos(1.52t))]<br /> + 3.29 [eᶺ (1.99t)/(1.99)²+(1.52)² (1.52 sen(1.52t) + 1.99 cos(1.52t))]<br />
  10. 10. <ul><li>9.- La solución general de la EDO es:</li></ul> Y= Yh + Yp<br />Yp= U1Y1 + U2Y2<br />Yh= eᶺ(-0.99t) [A cos(1.52t) + B sen(1.52t)] <br /> <br />Yp=-9.87[(eᶺ (0.99t)/(0.99)²+(1.52)²)* (0.99 sen(1.52t) – 1.52 cos(1.52t))]<br /> -3.29 [eᶺ (1.99t)/(1.99)²+(1.52)² (1.99 sen(1.52t) – 1.52 cos(1.52t))] * eᶺ (-0.99t) cos(1.52t)<br /> + 9.87 [(eᶺ (0.99t)/(0.99)²+(1.52)²)* (1.52 sen(1.52t) + 0.99 cos(1.52t))]<br /> + 3.29 [eᶺ (1.99t)/(1.99)²+(1.52)² (1.52 sen(1.52t) + 1.99 cos(1.52t))] * eᶺ (-0.99t) sen(1.52t)<br />  <br /> Y= eᶺ(-0.99t) [A cos(1.52t) + B sen(1.52t)]+ =-9.87[(eᶺ (0.99t)/(0.99)²+(1.52)²)* (0.99 sen(1.52t) – 1.52 cos(1.52t))]<br /> -3.29 [eᶺ (1.99t)/(1.99)²+(1.52)² (1.99 sen(1.52t) – 1.52 cos(1.52t))] * eᶺ (-0.99t) cos(1.52t)<br /> + 9.87 [(eᶺ (0.99t)/(0.99)²+(1.52)²)* (1.52 sen(1.52t) + 0.99 cos(1.52t))]<br /> + 3.29 [eᶺ (1.99t)/(1.99)²+(1.52)² (1.52 sen(1.52t) + 1.99 cos(1.52t))] * eᶺ (-0.99t) sen(1.52t)<br />
  11. 11. Solucion del ejerecicio por medio de MATLAB<br /><ul><li>L a ecuacion que vamos a ingresar en Matlab es la siguiente:</li></ul>((15*sin(t))+(5*(e^(t)))-(A(1)/0.20)-(3*B(1)))/1.51<br />
  12. 12. 1. En matlab creamos un nuevo documento M-file en donde ingresamos lo siguiente:<br />function B=rlc(t,A)<br />B=zeros(2,1);<br />B(1)=A(2);<br />B(2)= ((15*sin(t))+(5*(exp(t)))-(A(1)/0.20)-(3*B(1)))/1.51;<br />
  13. 13. 2. Ahora vamos a realizar las ordenes que necesitamos para obtener el dibujo del problema<br />[t,A]=ode45('rlc', [-4 10], [-3 15]);<br /> q=A(:,1);<br /> i=A(:,2);<br /> plot(t,q);<br />Title(‘q vs t')<br />xlabel(‘t(s)')<br />ylabel(‘q(c)')<br />
  14. 14. <ul><li>[x,y] = ode45('función',a,b,inicial) Esta instrucción regresa un conjunto de coordenadas "x" y "y" que representan a la función y=f(x), los valores se calculan a través de métodos Runge-Kuta de cuarto y quinto orden.</li></ul> El nombre "función", define una función que representa a una ecuación diferencial ordinaria, ODE45 proporciona los valores de la ecuación diferencial y'=g(x,y).<br /> Los valores "a" y "b" especifican los extremos del intervalo en el cual se desea evaluar a la función y=f(x).<br /> El valor inicial y = f(a) especifica el valor de la función en el extremo izquierdo del intervalo [a,b].<br />
  15. 15. Grafico resultante<br />

×