Diferencia entre revisiones de «Circuitos RL (Grupo 2)»
| (No se muestran 15 ediciones intermedias de otro usuario) | |||
| Línea 1: | Línea 1: | ||
| + | {{Trabajo|Circuitos eléctricos RL|[[:Categoría:Ecuaciones Diferenciales|Ecuaciones Diferenciales]]|[[:Categoría:Trabajos 2012-13|2012-13]]}} | ||
| + | |||
== CIRCUITOS ELÉCTRICOS == | == CIRCUITOS ELÉCTRICOS == | ||
El circuito eléctrico RL más simple tiene un inductor o bobina, una resistencia y una fuente de alimentación. | El circuito eléctrico RL más simple tiene un inductor o bobina, una resistencia y una fuente de alimentación. | ||
| − | * En una resistencia R la ley de Ohm establece: <math>i(t) = \frac{v(t)}{R}</math> | + | * En una resistencia R la ley de Ohm establece:: <math>i(t) = \frac{v(t)}{R}</math> |
| − | donde i(t)=intesidad de corriente (A), v(t)=voltaje (V), R=coeficiente de resistencia (Ω). | + | donde i(t) = intesidad de corriente (A), v(t) = voltaje (V), R = coeficiente de resistencia (Ω). |
| − | * En un inductor L, la ley de Faraday establece: <math>v(t) = L\frac{d}{d_t}i(t)</math> | + | * En un inductor L, la ley de Faraday establece:: <math>v(t) = L\frac{d}{d_t}i(t)</math> |
| − | donde L=coeficiente de autoinducción (H). | + | donde L = coeficiente de autoinducción (H). |
<br /><br /> | <br /><br /> | ||
Las leyes de Kirchoff establecen el comportamiento de los circuitos: | Las leyes de Kirchoff establecen el comportamiento de los circuitos: | ||
# '''Ley de corriente:''' en cada nodo la suma de corrientes que entra coincide con la suma de corrientes que sale. | # '''Ley de corriente:''' en cada nodo la suma de corrientes que entra coincide con la suma de corrientes que sale. | ||
| − | # '''Ley de tensiones:''' en cada ciclo cerrado, la suma de | + | # '''Ley de tensiones:''' en cada ciclo cerrado, la suma de las diferencias de potencial eléctrico es nula. |
<br /> | <br /> | ||
_____________________________________________________________________________________________________________________ | _____________________________________________________________________________________________________________________ | ||
<br /> | <br /> | ||
| − | + | ''' <big><big>Circuito 1: Circuito más simple</big></big> ''' [[Archivo:cicuito1.jpg|200px|thumb|right|Circuito simple (malla 1)]] | |
<br /> | <br /> | ||
| − | ==== 1. Ecuación diferencial | + | ==== 1. Ecuación diferencial ==== |
<br />A partir de las leyes anteriores, se puede afirmar que en el circuito más simple RL, la intensidad que pasa tanto por la resistencia como por la bobina es la misma. Por este motivo, el voltaje de las resistencias varía, pues éstas tienen valores distintos. | <br />A partir de las leyes anteriores, se puede afirmar que en el circuito más simple RL, la intensidad que pasa tanto por la resistencia como por la bobina es la misma. Por este motivo, el voltaje de las resistencias varía, pues éstas tienen valores distintos. | ||
<br /><br />Partiendo de la afirmación anterior, se confirma que: | <br /><br />Partiendo de la afirmación anterior, se confirma que: | ||
| − | + | :<br /><math>i(t)=i_L=i_R</math> | |
| − | + | :<br /><math>E(t)=E_L+E_R</math> | |
| − | + | <br />y teniendo en cuenta que la inductancia L se rige por la ley de Faraday | |
y que la resistencia R se rige por la de Ohm, se obtiene la siguiente ecuacióndiferencial:<br /><br /> | y que la resistencia R se rige por la de Ohm, se obtiene la siguiente ecuacióndiferencial:<br /><br /> | ||
| − | <math>E(t)=L\frac{d}{dt}i(t)+R\cdot i(t)</math><br /> | + | :<math>E(t)=L\frac{d}{dt}i(t)+R\cdot i(t)</math><br /> |
| − | + | <br /> | |
==== 2 y 3. Método de Euler / Trapecio ==== | ==== 2 y 3. Método de Euler / Trapecio ==== | ||
<br />Suponiendo que en el instante t = 0 el circuito pasa de estar abierto a | <br />Suponiendo que en el instante t = 0 el circuito pasa de estar abierto a | ||
| − | cerrado, que el voltaje E(t)=Eo la intensidad se calcula integrando la | + | cerrado, es decir, que el voltaje E(t) = Eo, la intensidad se calcula integrando la ecuación diferencial lineal: |
<br /><br /> | <br /><br /> | ||
<math>L\frac{d}{dt}i(t)+R\cdot i=E_0 \hspace{0.5cm} \rightarrow \hspace{0.5cm} </math> | <math>L\frac{d}{dt}i(t)+R\cdot i=E_0 \hspace{0.5cm} \rightarrow \hspace{0.5cm} </math> | ||
| Línea 33: | Línea 35: | ||
<math>i \cdot e^{\int{\frac{R}{L}dt}} = \int{e^{\frac{R \cdot t}{L}}dt} \hspace{0.5cm} \rightarrow \hspace{0.5cm} </math> | <math>i \cdot e^{\int{\frac{R}{L}dt}} = \int{e^{\frac{R \cdot t}{L}}dt} \hspace{0.5cm} \rightarrow \hspace{0.5cm} </math> | ||
<math>i \cdot e^{\frac{R \cdot t}{L}} = \frac{E}{R}e^{\frac{R \cdot t}{L}}+C</math><br /> | <math>i \cdot e^{\frac{R \cdot t}{L}} = \frac{E}{R}e^{\frac{R \cdot t}{L}}+C</math><br /> | ||
| − | <br />Obteniendo finalmente: | + | <br />Obteniendo finalmente:: |
<math>i(t) = \frac{E}{R} + C \cdot e^{\frac{-R \cdot t}{L}}</math> | <math>i(t) = \frac{E}{R} + C \cdot e^{\frac{-R \cdot t}{L}}</math> | ||
<br /> | <br /> | ||
| − | En t=0, el circuito está cerrado: <math>i(0)=0 \Rightarrow C= - \frac{E}{R}</math> | + | En t=0, el circuito está cerrado:: <math>i(0)=0 \Rightarrow C= - \frac{E}{R}</math> |
| − | Como condiciones iniciales, se tiene que | + | Como condiciones iniciales, se tiene que E(t) = 10V, L = 0.2 y R = 5, y por tanto la intensidad sería::<math>i(t)=\frac{E}{R}(1-e^{-\frac{R \cdot t}{L}}) = 2 \cdot (1-e^{-25t})</math> |
| − | <br />Para aplicar los métodos numéricos, despejamos la intensidad de la ecuación diferencial fundamental:<math>f(i) = - \frac{R}{L}i+ \frac{E}{L} = -25i+50</math> | + | <br />Para aplicar los métodos numéricos, despejamos la intensidad de la ecuación diferencial fundamental::<math>f(i) = - \frac{R}{L}i+ \frac{E}{L} = -25i+50</math><br /> |
| + | * '''Método de Euler:'''<br /><br /><math>i_{n+1} = i_n + h \cdot f(i_n) = i_n+h(\frac{-R}{L}\cdot i_n + \frac{E}{L}) = (1-h \cdot \frac{R}{L}) \cdot i_n + h\frac{E}{L} = (1-25h)\cdot i_n + 50h</math><br /><math>i_0=0</math> | ||
| + | <br /><br /> | ||
| + | * '''Método del Trapecio:''' <br /><br /><math>i_{n+1}=i_n + \frac{h}{2}\cdot (f(i_n)+f(i_{n+1})) = i_n + \frac{h}{2}\cdot (-25i_n+50-25i_{n+1}+50)</math><br /><br /><math>i_{n+1}\cdot (1+\frac{25h}{2}) = (1-\frac{25h}{2})\cdot i_n+50h</math><br /><br /><math>i_{n+1} = \frac{2-25h}{2+25h} \cdot i_n + \frac{100h}{2+25h}</math><br /><br /><math>Trap.=\begin{cases} i_{n+1} = \frac{2-25h}{2+25h} \cdot i_n + \frac{100h}{2+25h} \\ i_0=0 \end{cases}</math> | ||
| + | <br /><br /> | ||
| + | * '''Otras condiciones iniciales:''' <br /><br />En este apartado, resolviendo la ecuación diferencial homogénea asociada a la obtenida en el apartado 1, y con la condición inicial i(0) = 2A, obtenemos:: | ||
| + | <math>i(t) = 2\cdot (1-e^{-25t})</math>Interpretación: observamos al ser la función exponencial que la intensidad decrece rápidamente al abrir el circuito hasta prácticamente 0 en un intervalo de tiempo ínfimo. | ||
| + | <br /><br /> | ||
| + | '''MATLAB'''<br /><br /> | ||
| + | |||
| + | {{matlab|codigo=% Exacta y aproximaciónEuler y trapecio | ||
| + | % Ecuación (1) : SE ABRE:i’=-(R/L)i+(E/L) // i(0)=0 | ||
| + | % R=5 ohm, L=0.2H, E=10V; tau=L/R (=0.04s); | ||
| + | % Sol. Exacta:i(t)=i0+(E/R)*(1-exp(t/tau)); Se cierra | ||
| + | % Ecuación (2): SE CIERRA: i’=-(R/L)i// i(0)=i0 | ||
| + | % Exacta: i(t)=i0*exp(-t/tau) | ||
| + | |||
| + | clear all | ||
| + | close all | ||
| + | format long | ||
| + | |||
| + | R=5; L=0.2; E=10; tau=L/R; | ||
| + | % EXACTA | ||
| + | t0=0; tN=10*tau; | ||
| + | % N=20; | ||
| + | % h=(tN-t0)/N; | ||
| + | % Para que Euler seaestable, cogemos una h muy pequeña: h=1e-2; | ||
| + | h=1e-2; | ||
| + | N=(tN-t0)/h; | ||
| + | t=t0:h:tN; | ||
| + | I_on=2*(1-exp(-t/tau)); | ||
| + | I_off=2*exp(-t/tau); | ||
| + | |||
| + | i0=0; | ||
| + | i_eul(1)=i0; | ||
| + | i_trap(1)=i0; | ||
| + | for n=1:N | ||
| + | i_eul(n+1)=(1-25*h)*i_eul(n)+50*h; | ||
| + | i_trap(n+1)=(1/(1+(25/2)*h))*(((1-(25/2)*h))*i_trap(n)+50*h); | ||
| + | end | ||
| + | |||
| + | % Dibujamos | ||
| + | figure(1) %apartado_2 | ||
| + | hold on | ||
| + | plot (t, I_on, 'b') | ||
| + | plot (t, i_eul, 'xm') | ||
| + | plot (t, i_trap, 'og') | ||
| + | hold off | ||
| + | figure(2) % apartado_3 | ||
| + | plot (t, I_off, 'b') | ||
| + | }} | ||
| + | <br /><br /> | ||
| + | [[Archivo:graficasbien.jpg|500px|thumb|center| ]] | ||
| + | <br />Para que el método de Euler sea estable, la h (paso) elegida debe ser muy pequeña, del orden de 10<sup>-2</sup>. Como observamos en la siguiente figura, si tomamos un paso del orden de 0.1 el método de Euler deja de funcionar.<br /> | ||
| + | [[Archivo:graficasmal.jpg|500px|thumb|center| ]] | ||
| + | <br /><br /><br /> | ||
| + | <br />''' <big><big>Circuito 2.</big></big> ''' [[Archivo:cicuito2.jpg|200px|thumb|right|Circuito completo]] | ||
| + | <br /><br /> | ||
| + | ==== 4. Circuito 2. ==== | ||
| + | <br /> | ||
| + | Según las leyes de Kirchoff, el sistema de ecuaciones diferenciales correspondiente al circuito 2 es el siguiente: | ||
| + | <br /> | ||
| + | * <math>E(t) = R_1\cdot i_1(t) + L_2\cdot \frac{d}{dt}\cdot i_2(t) + R_2\cdot i_2(t)</math>: corresponde al recorrido exterior del circuito. | ||
| + | * <math>E(t) = R_1\cdot i_1(t) + L_1\cdot \frac{d}{dt}\cdot i_3(t)</math>: corresponde a la malla 1. | ||
| + | * <math>i_1(t) = i_2(t) + i_3(t)</math>: es la correspondiente a la Ley de corriente de Kirchoff. | ||
| + | <br /> | ||
| + | |||
| + | Sustituyendo la tercera ecuación enlas otras dos se obtiene el sistema en términos de i2(t) e i3(t)matricialmente::<math>\frac{d}{dt}\cdot \begin{pmatrix} i_2\\i_3 \end{pmatrix} = - \begin{pmatrix} \frac{R_1+R_2}{L_2}&\frac{R_1}{L_2} \\ \frac{R_1}{L_1}&\frac{R_1}{L_1} \end{pmatrix} \cdot \begin{pmatrix} i_2\\i_3 \end{pmatrix} + \begin{pmatrix} \frac{E}{L_2} \\ \frac{E}{L_1} \end{pmatrix}</math><br /> | ||
| + | |||
| + | A partir de las condiciones iniciales i2(0)=i3(0)=0 se puedeinterpretar que la corriente en el circuito es nula en el momento inicial en elque se conecta el generador.<br /> | ||
| + | Al añadir una tercera malla, con resitencia R3 e inductor L3, se crea elsiguiete sistema: | ||
| + | :<br /><math>i_1(t) = i_2(t) + i_3(t)</math><br /><math>i_2(t) = i_4(t) + i_5(t)</math><br /><math>E(t) = R_1\cdot i_1(t) + R_2\cdot i_2(t) + R_3\cdot i_5(t) + L_3\cdot \frac{d}{dt}\cdot i_5(t)</math><br /><math>E(t) = R_1\cdot i_1(t) + R_2\cdot i_2(t) + L_2\cdot \frac{d}{dt}\cdot i_4(t)</math><br /><math>E(t) = R_1\cdot i_1(t) + L_1\cdot \frac{d}{dt}\cdot i_3(t)</math><br /> | ||
| + | <br /> | ||
| + | ==== 5. Circuito. ==== | ||
| + | <br />Se tienen como condiciones iniciales: R1 = R2 = 6 Ω, L1 = 0.02H, L2 = 0.0025H , E(t) = 10V.<br /> | ||
| + | <br /> | ||
| + | |||
| + | :<math>\frac{d}{dt}\cdot \begin{pmatrix}i_2\\i_3\end{pmatrix} = -300\cdot \begin{pmatrix}16&8\\1&1 \end{pmatrix} \cdot \begin{pmatrix}i_2\\i_3\end{pmatrix} + \begin{pmatrix}4000\\500\end{pmatrix}</math><br /> | ||
| + | |||
| + | :<math>\vec{i}(t) = e^{-2550t}\cdot \{ c_1 \cdot \begin{pmatrix}19-\sqrt{257}\\-2\end{pmatrix}\cdot e^{150\cdot \sqrt{257}t} + c_2 \cdot \begin{pmatrix}19+\sqrt{257}\\-2\end{pmatrix}\cdot e^{-150\cdot \sqrt{257}t} \} + \hspace{0.1cm}\vec{i}_{part}</math><br /> | ||
| + | |||
| + | :<math>\vec{i}_{part} = \frac{1}{300}\cdot \begin{pmatrix}16&8\\1&1\end{pmatrix}^{-1} \cdot \begin{pmatrix}4000\\500\end{pmatrix} = \frac{1}{3}\cdot \frac{1}{8} \cdot \begin{pmatrix}1&-8\\-1&16\end{pmatrix}\cdot \begin{pmatrix}40\\5\end{pmatrix} = \begin{pmatrix}0\\ \frac{5}{3}\end{pmatrix}</math><br /> | ||
| + | |||
| + | :<math>\vec{i}(t) = \vec{0} \rightarrow c_1\cdot \begin{pmatrix}15-\sqrt{257}\\2\end{pmatrix} + c_2\cdot \begin{pmatrix}15+\sqrt{257}\\2\end{pmatrix} + \begin{pmatrix}0\\ \frac{5}{3}\end{pmatrix} = \begin{pmatrix}0\\0\end{pmatrix}</math><br /> | ||
| + | |||
| + | :<math>c_1 = -\frac{5}{12\cdot \sqrt{257}}\cdot (15+\sqrt{257}),\hspace{0.5cm} c_2 = \frac{5}{12\cdot \sqrt{257}}\cdot (15-\sqrt{257})</math><br /> | ||
| + | |||
| + | :<math>\vec{i}(t) = \frac{5}{12\cdot \sqrt{257}}\cdot e^{-2550t}\cdot \{ -(15+\sqrt{257})\cdot \begin{pmatrix} 15-\sqrt{257}\\2 \end{pmatrix}\cdot e^{150\cdot \sqrt{257}t} + (15-\sqrt{257})\cdot \begin{pmatrix} 15+\sqrt{257}\\2 \end{pmatrix}\cdot e^{-150\cdot \sqrt{257}t}\} + \begin{pmatrix}0\\\frac{5}{3}\end{pmatrix}</math> | ||
| + | <br /> | ||
| + | <big>''' MÉTODOS NUMÉRICOS''' :<math>\vec{f}(\vec{i}) = M\cdot \vec{i} + \vec{b}</math><br /> | ||
| + | |||
| + | * ''' MÉTODO DE EULER: ''' <br /><br /><math>\vec{i}_{n+1} = \vec{i}_n + h\cdot \vec{f}(\vec{i}_n) = \vec{i}_n+h\cdot (M\cdot \vec{i}_n+\vec{b}) = (I + h\cdot M)\cdot \vec{i}_n + h\cdot \vec{b}</math><br /><br /><math>\begin{pmatrix}i_{2,n+1}\\i_{3,n+1} \end{pmatrix} = \{ \begin{pmatrix}1&0\\0&1 \end{pmatrix} -300h\cdot \begin{pmatrix}16&8\\1&1\end{pmatrix}\} \cdot \begin{pmatrix}i_{2,n}\\i_{3,n} \end{pmatrix} + h\cdot \begin{pmatrix}4000\\500\end{pmatrix}</math> | ||
| + | |||
| + | |||
| + | * ''' MÉTODO DEL TRAPECIO: ''' <br /><br /><math>\vec{i}_{n+1} = \vec{i}_n+\frac{h}{2}(\vec{f}(\vec{i}_n)+\vec{f}(\vec{i}_{n+1})) = \vec{i}_n +\frac{h}{2}\cdot (M\cdot \vec{i}_n+\vec{b}+M\cdot \vec{i}_{n+1}+\vec{b}) = (I+\frac{h}{2}\cdot M)\cdot \vec{i}_n + \frac{h}{2}\cdot M\cdot \vec{i}_{n+1}+h\cdot \vec{b}</math><br /><br /><math>(I-\frac{h}{2}\cdot M)\cdot \vec{i}_{n+1} = (I+\frac{h}{2}\cdot M)\cdot \vec{i}_n+h\cdot \vec{b}</math><br /><br /><math>\vec{i}_{n+1} = (I-\frac{h}{2}\cdot M)^{-1}\cdot \{ (I+\frac{h}{2}\cdot M)\cdot \vec{i}_n+h\cdot \vec{b} \}</math> | ||
| + | |||
| + | |||
| + | |||
| + | '''MATLAB''' <br /><br /> | ||
| + | {{matlab|codigo= | ||
| + | clear all | ||
| + | t0=0; tN=0.04; | ||
| + | i0=[0;0]; | ||
| + | N=100; h=(tN-t0)/N; | ||
| + | t=t0:h:tN; | ||
| + | b=[4000;500]; | ||
| + | M=-300*[16,8;1,1]; | ||
| + | i_eu=i0; | ||
| + | i2_eu(1)=i_eu(1); | ||
| + | i3_eu(1)=i_eu(2); | ||
| + | i1_eu(1)=i2_eu(1)+i3_eu(1); | ||
| + | i_tr=i0; | ||
| + | i2_tr(1)=i_tr(1); | ||
| + | i3_tr(1)=i_tr(2); | ||
| + | i1_tr(1)=i2_tr(1)+i3_tr(1); | ||
| + | for n=1:N | ||
| + | i_eu=i_eu+h*(M*i_eu+b); | ||
| + | i2_eu(n+1)=i_eu(1); | ||
| + | i3_eu(n+1)=i_eu(2); | ||
| + | i1_eu(n+1)=i_eu(1)+i_eu(2); | ||
| + | |||
| + | i_tr=inv(eye(2)-(h/2)*M)*((eye(2)+(h/2)*M)*i_tr+h*b); | ||
| + | i2_tr(n+1)=i_tr(1); | ||
| + | i3_tr(n+1)=i_tr(2); | ||
| + | i1_tr(n+1)=i_tr(1)+i_tr(2); | ||
| + | end | ||
| + | r=sqrt(257); | ||
| + | ii2a=(5/12/r)*exp(-2550*t).*(-(15+r)*(15-r).*exp(150*sqrt(257)*t)); | ||
| + | ii2b=(5/12/r)*exp(-2550*t).*((15-r)*(15+r).*exp(-150*sqrt(257)*t)); | ||
| + | ii2=ii2a+ii2b; | ||
| + | ii3a=(5/12/r)*exp(-2550*t).*(-(15+r)*2.*exp(150*sqrt(257)*t)); | ||
| + | ii3b=(5/12/r)*exp(-2550*t).*((15-r)*2.*exp(-150*sqrt(257)*t)); | ||
| + | ii3=ii3a+ii3b+5/3; | ||
| + | ii1=ii2+ii3; | ||
| + | t=t0:h:tN; | ||
| + | figure(1) | ||
| + | subplot(3,1,1) | ||
| + | plot(t,i1_eu,'b',t,i1_tr,'r',t,ii1,'k') | ||
| + | subplot(3,1,2) | ||
| + | plot(t,i2_eu,'b',t,i2_tr,'r',t,ii2,'k') | ||
| + | subplot(3,1,3) | ||
| + | plot(t,i3_eu,'b',t,i3_tr,'r',t,ii3,'k') | ||
| + | }} | ||
| + | <br /><br /> | ||
| + | [[Archivo:graficas5.png|1000px|thumb|center| ]] | ||
| + | <br /><br /> | ||
| + | |||
| + | Como se puede apreciar en la gráfica, el método que más se aproxima a lasolución exacta (linea negra) es el método del Trapecio(linea roja), mientrasque el método de Euler (linea azul) da valores menos aproximados. Las tres gráficascorresponden, respectivamente, a i1(t), i2(t) e i3(t) | ||
| + | <br /><br /><br /><br /> | ||
| + | |||
| + | --[[Usuario:Nerea GR|Nerea GR]] ([[Usuario discusión:Nerea GR|discusión]]) 05:40 5 mar 2013 (CET)<br /> ''' Grupo 2: ''' <br /> | ||
| + | * Margarita Santiago Ruiz nº 700 | ||
| + | * Nerea González Rivas nº 200 | ||
| + | * Fernando Cedena de Pedraza nº 525 | ||
| + | * Mª Carmen Lacasa Santos nº 229 | ||
| + | * Rocío Santos Rodrigo nº 405 | ||
| + | * Sara Larre Ara nº 761 | ||
| + | |||
| + | [[Categoría:Grado en Ingeniería Civil y Territorial]] | ||
| + | [[Categoría:Ecuaciones Diferenciales]] | ||
| + | [[Categoría:Trabajos 2012-13]] | ||
Revisión actual del 14:00 16 jul 2013
Contenido
1 CIRCUITOS ELÉCTRICOS
El circuito eléctrico RL más simple tiene un inductor o bobina, una resistencia y una fuente de alimentación.
- En una resistencia R la ley de Ohm establece:: [math]i(t) = \frac{v(t)}{R}[/math]
donde i(t) = intesidad de corriente (A), v(t) = voltaje (V), R = coeficiente de resistencia (Ω).
- En un inductor L, la ley de Faraday establece:: [math]v(t) = L\frac{d}{d_t}i(t)[/math]
donde L = coeficiente de autoinducción (H).
Las leyes de Kirchoff establecen el comportamiento de los circuitos:
- Ley de corriente: en cada nodo la suma de corrientes que entra coincide con la suma de corrientes que sale.
- Ley de tensiones: en cada ciclo cerrado, la suma de las diferencias de potencial eléctrico es nula.
_____________________________________________________________________________________________________________________
1.1 1. Ecuación diferencial
A partir de las leyes anteriores, se puede afirmar que en el circuito más simple RL, la intensidad que pasa tanto por la resistencia como por la bobina es la misma. Por este motivo, el voltaje de las resistencias varía, pues éstas tienen valores distintos.
Partiendo de la afirmación anterior, se confirma que:
[math]i(t)=i_L=i_R[/math]
[math]E(t)=E_L+E_R[/math]
y teniendo en cuenta que la inductancia L se rige por la ley de Faraday
y que la resistencia R se rige por la de Ohm, se obtiene la siguiente ecuacióndiferencial:
- [math]E(t)=L\frac{d}{dt}i(t)+R\cdot i(t)[/math]
1.2 2 y 3. Método de Euler / Trapecio
Suponiendo que en el instante t = 0 el circuito pasa de estar abierto a
cerrado, es decir, que el voltaje E(t) = Eo, la intensidad se calcula integrando la ecuación diferencial lineal:
[math]L\frac{d}{dt}i(t)+R\cdot i=E_0 \hspace{0.5cm} \rightarrow \hspace{0.5cm} [/math]
[math]i'(t)+\frac{R}{L}i(t)=\frac{E}{L} \hspace{0.5cm} \rightarrow \hspace{0.5cm} [/math]
[math]i \cdot e^{\int{\frac{R}{L}dt}} = \int{e^{\frac{R \cdot t}{L}}dt} \hspace{0.5cm} \rightarrow \hspace{0.5cm} [/math]
[math]i \cdot e^{\frac{R \cdot t}{L}} = \frac{E}{R}e^{\frac{R \cdot t}{L}}+C[/math]
Obteniendo finalmente::
[math]i(t) = \frac{E}{R} + C \cdot e^{\frac{-R \cdot t}{L}}[/math]
En t=0, el circuito está cerrado:: [math]i(0)=0 \Rightarrow C= - \frac{E}{R}[/math]
Como condiciones iniciales, se tiene que E(t) = 10V, L = 0.2 y R = 5, y por tanto la intensidad sería::[math]i(t)=\frac{E}{R}(1-e^{-\frac{R \cdot t}{L}}) = 2 \cdot (1-e^{-25t})[/math]
Para aplicar los métodos numéricos, despejamos la intensidad de la ecuación diferencial fundamental::[math]f(i) = - \frac{R}{L}i+ \frac{E}{L} = -25i+50[/math]
- Método de Euler:
[math]i_{n+1} = i_n + h \cdot f(i_n) = i_n+h(\frac{-R}{L}\cdot i_n + \frac{E}{L}) = (1-h \cdot \frac{R}{L}) \cdot i_n + h\frac{E}{L} = (1-25h)\cdot i_n + 50h[/math]
[math]i_0=0[/math]
- Método del Trapecio:
[math]i_{n+1}=i_n + \frac{h}{2}\cdot (f(i_n)+f(i_{n+1})) = i_n + \frac{h}{2}\cdot (-25i_n+50-25i_{n+1}+50)[/math]
[math]i_{n+1}\cdot (1+\frac{25h}{2}) = (1-\frac{25h}{2})\cdot i_n+50h[/math]
[math]i_{n+1} = \frac{2-25h}{2+25h} \cdot i_n + \frac{100h}{2+25h}[/math]
[math]Trap.=\begin{cases} i_{n+1} = \frac{2-25h}{2+25h} \cdot i_n + \frac{100h}{2+25h} \\ i_0=0 \end{cases}[/math]
- Otras condiciones iniciales:
En este apartado, resolviendo la ecuación diferencial homogénea asociada a la obtenida en el apartado 1, y con la condición inicial i(0) = 2A, obtenemos::
[math]i(t) = 2\cdot (1-e^{-25t})[/math]Interpretación: observamos al ser la función exponencial que la intensidad decrece rápidamente al abrir el circuito hasta prácticamente 0 en un intervalo de tiempo ínfimo.
MATLAB
% Exacta y aproximaciónEuler y trapecio
% Ecuación (1) : SE ABRE:i’=-(R/L)i+(E/L) // i(0)=0
% R=5 ohm, L=0.2H, E=10V; tau=L/R (=0.04s);
% Sol. Exacta:i(t)=i0+(E/R)*(1-exp(t/tau)); Se cierra
% Ecuación (2): SE CIERRA: i’=-(R/L)i// i(0)=i0
% Exacta: i(t)=i0*exp(-t/tau)
clear all
close all
format long
R=5; L=0.2; E=10; tau=L/R;
% EXACTA
t0=0; tN=10*tau;
% N=20;
% h=(tN-t0)/N;
% Para que Euler seaestable, cogemos una h muy pequeña: h=1e-2;
h=1e-2;
N=(tN-t0)/h;
t=t0:h:tN;
I_on=2*(1-exp(-t/tau));
I_off=2*exp(-t/tau);
i0=0;
i_eul(1)=i0;
i_trap(1)=i0;
for n=1:N
i_eul(n+1)=(1-25*h)*i_eul(n)+50*h;
i_trap(n+1)=(1/(1+(25/2)*h))*(((1-(25/2)*h))*i_trap(n)+50*h);
end
% Dibujamos
figure(1) %apartado_2
hold on
plot (t, I_on, 'b')
plot (t, i_eul, 'xm')
plot (t, i_trap, 'og')
hold off
figure(2) % apartado_3
plot (t, I_off, 'b')
Para que el método de Euler sea estable, la h (paso) elegida debe ser muy pequeña, del orden de 10-2. Como observamos en la siguiente figura, si tomamos un paso del orden de 0.1 el método de Euler deja de funcionar.
Circuito 2.
1.3 4. Circuito 2.
Según las leyes de Kirchoff, el sistema de ecuaciones diferenciales correspondiente al circuito 2 es el siguiente:
- [math]E(t) = R_1\cdot i_1(t) + L_2\cdot \frac{d}{dt}\cdot i_2(t) + R_2\cdot i_2(t)[/math]: corresponde al recorrido exterior del circuito.
- [math]E(t) = R_1\cdot i_1(t) + L_1\cdot \frac{d}{dt}\cdot i_3(t)[/math]: corresponde a la malla 1.
- [math]i_1(t) = i_2(t) + i_3(t)[/math]: es la correspondiente a la Ley de corriente de Kirchoff.
Sustituyendo la tercera ecuación enlas otras dos se obtiene el sistema en términos de i2(t) e i3(t)matricialmente::[math]\frac{d}{dt}\cdot \begin{pmatrix} i_2\\i_3 \end{pmatrix} = - \begin{pmatrix} \frac{R_1+R_2}{L_2}&\frac{R_1}{L_2} \\ \frac{R_1}{L_1}&\frac{R_1}{L_1} \end{pmatrix} \cdot \begin{pmatrix} i_2\\i_3 \end{pmatrix} + \begin{pmatrix} \frac{E}{L_2} \\ \frac{E}{L_1} \end{pmatrix}[/math]
A partir de las condiciones iniciales i2(0)=i3(0)=0 se puedeinterpretar que la corriente en el circuito es nula en el momento inicial en elque se conecta el generador.
Al añadir una tercera malla, con resitencia R3 e inductor L3, se crea elsiguiete sistema:
[math]i_1(t) = i_2(t) + i_3(t)[/math]
[math]i_2(t) = i_4(t) + i_5(t)[/math]
[math]E(t) = R_1\cdot i_1(t) + R_2\cdot i_2(t) + R_3\cdot i_5(t) + L_3\cdot \frac{d}{dt}\cdot i_5(t)[/math]
[math]E(t) = R_1\cdot i_1(t) + R_2\cdot i_2(t) + L_2\cdot \frac{d}{dt}\cdot i_4(t)[/math]
[math]E(t) = R_1\cdot i_1(t) + L_1\cdot \frac{d}{dt}\cdot i_3(t)[/math]
1.4 5. Circuito.
Se tienen como condiciones iniciales: R1 = R2 = 6 Ω, L1 = 0.02H, L2 = 0.0025H , E(t) = 10V.
- [math]\frac{d}{dt}\cdot \begin{pmatrix}i_2\\i_3\end{pmatrix} = -300\cdot \begin{pmatrix}16&8\\1&1 \end{pmatrix} \cdot \begin{pmatrix}i_2\\i_3\end{pmatrix} + \begin{pmatrix}4000\\500\end{pmatrix}[/math]
- [math]\vec{i}(t) = e^{-2550t}\cdot \{ c_1 \cdot \begin{pmatrix}19-\sqrt{257}\\-2\end{pmatrix}\cdot e^{150\cdot \sqrt{257}t} + c_2 \cdot \begin{pmatrix}19+\sqrt{257}\\-2\end{pmatrix}\cdot e^{-150\cdot \sqrt{257}t} \} + \hspace{0.1cm}\vec{i}_{part}[/math]
- [math]\vec{i}_{part} = \frac{1}{300}\cdot \begin{pmatrix}16&8\\1&1\end{pmatrix}^{-1} \cdot \begin{pmatrix}4000\\500\end{pmatrix} = \frac{1}{3}\cdot \frac{1}{8} \cdot \begin{pmatrix}1&-8\\-1&16\end{pmatrix}\cdot \begin{pmatrix}40\\5\end{pmatrix} = \begin{pmatrix}0\\ \frac{5}{3}\end{pmatrix}[/math]
- [math]\vec{i}(t) = \vec{0} \rightarrow c_1\cdot \begin{pmatrix}15-\sqrt{257}\\2\end{pmatrix} + c_2\cdot \begin{pmatrix}15+\sqrt{257}\\2\end{pmatrix} + \begin{pmatrix}0\\ \frac{5}{3}\end{pmatrix} = \begin{pmatrix}0\\0\end{pmatrix}[/math]
- [math]c_1 = -\frac{5}{12\cdot \sqrt{257}}\cdot (15+\sqrt{257}),\hspace{0.5cm} c_2 = \frac{5}{12\cdot \sqrt{257}}\cdot (15-\sqrt{257})[/math]
- [math]\vec{i}(t) = \frac{5}{12\cdot \sqrt{257}}\cdot e^{-2550t}\cdot \{ -(15+\sqrt{257})\cdot \begin{pmatrix} 15-\sqrt{257}\\2 \end{pmatrix}\cdot e^{150\cdot \sqrt{257}t} + (15-\sqrt{257})\cdot \begin{pmatrix} 15+\sqrt{257}\\2 \end{pmatrix}\cdot e^{-150\cdot \sqrt{257}t}\} + \begin{pmatrix}0\\\frac{5}{3}\end{pmatrix}[/math]
MÉTODOS NUMÉRICOS :[math]\vec{f}(\vec{i}) = M\cdot \vec{i} + \vec{b}[/math]
- MÉTODO DE EULER:
[math]\vec{i}_{n+1} = \vec{i}_n + h\cdot \vec{f}(\vec{i}_n) = \vec{i}_n+h\cdot (M\cdot \vec{i}_n+\vec{b}) = (I + h\cdot M)\cdot \vec{i}_n + h\cdot \vec{b}[/math]
[math]\begin{pmatrix}i_{2,n+1}\\i_{3,n+1} \end{pmatrix} = \{ \begin{pmatrix}1&0\\0&1 \end{pmatrix} -300h\cdot \begin{pmatrix}16&8\\1&1\end{pmatrix}\} \cdot \begin{pmatrix}i_{2,n}\\i_{3,n} \end{pmatrix} + h\cdot \begin{pmatrix}4000\\500\end{pmatrix}[/math]
- MÉTODO DEL TRAPECIO:
[math]\vec{i}_{n+1} = \vec{i}_n+\frac{h}{2}(\vec{f}(\vec{i}_n)+\vec{f}(\vec{i}_{n+1})) = \vec{i}_n +\frac{h}{2}\cdot (M\cdot \vec{i}_n+\vec{b}+M\cdot \vec{i}_{n+1}+\vec{b}) = (I+\frac{h}{2}\cdot M)\cdot \vec{i}_n + \frac{h}{2}\cdot M\cdot \vec{i}_{n+1}+h\cdot \vec{b}[/math]
[math](I-\frac{h}{2}\cdot M)\cdot \vec{i}_{n+1} = (I+\frac{h}{2}\cdot M)\cdot \vec{i}_n+h\cdot \vec{b}[/math]
[math]\vec{i}_{n+1} = (I-\frac{h}{2}\cdot M)^{-1}\cdot \{ (I+\frac{h}{2}\cdot M)\cdot \vec{i}_n+h\cdot \vec{b} \}[/math]
MATLAB
clear all
t0=0; tN=0.04;
i0=[0;0];
N=100; h=(tN-t0)/N;
t=t0:h:tN;
b=[4000;500];
M=-300*[16,8;1,1];
i_eu=i0;
i2_eu(1)=i_eu(1);
i3_eu(1)=i_eu(2);
i1_eu(1)=i2_eu(1)+i3_eu(1);
i_tr=i0;
i2_tr(1)=i_tr(1);
i3_tr(1)=i_tr(2);
i1_tr(1)=i2_tr(1)+i3_tr(1);
for n=1:N
i_eu=i_eu+h*(M*i_eu+b);
i2_eu(n+1)=i_eu(1);
i3_eu(n+1)=i_eu(2);
i1_eu(n+1)=i_eu(1)+i_eu(2);
i_tr=inv(eye(2)-(h/2)*M)*((eye(2)+(h/2)*M)*i_tr+h*b);
i2_tr(n+1)=i_tr(1);
i3_tr(n+1)=i_tr(2);
i1_tr(n+1)=i_tr(1)+i_tr(2);
end
r=sqrt(257);
ii2a=(5/12/r)*exp(-2550*t).*(-(15+r)*(15-r).*exp(150*sqrt(257)*t));
ii2b=(5/12/r)*exp(-2550*t).*((15-r)*(15+r).*exp(-150*sqrt(257)*t));
ii2=ii2a+ii2b;
ii3a=(5/12/r)*exp(-2550*t).*(-(15+r)*2.*exp(150*sqrt(257)*t));
ii3b=(5/12/r)*exp(-2550*t).*((15-r)*2.*exp(-150*sqrt(257)*t));
ii3=ii3a+ii3b+5/3;
ii1=ii2+ii3;
t=t0:h:tN;
figure(1)
subplot(3,1,1)
plot(t,i1_eu,'b',t,i1_tr,'r',t,ii1,'k')
subplot(3,1,2)
plot(t,i2_eu,'b',t,i2_tr,'r',t,ii2,'k')
subplot(3,1,3)
plot(t,i3_eu,'b',t,i3_tr,'r',t,ii3,'k')
Como se puede apreciar en la gráfica, el método que más se aproxima a lasolución exacta (linea negra) es el método del Trapecio(linea roja), mientrasque el método de Euler (linea azul) da valores menos aproximados. Las tres gráficascorresponden, respectivamente, a i1(t), i2(t) e i3(t)
--Nerea GR (discusión) 05:40 5 mar 2013 (CET)
Grupo 2:
- Margarita Santiago Ruiz nº 700
- Nerea González Rivas nº 200
- Fernando Cedena de Pedraza nº 525
- Mª Carmen Lacasa Santos nº 229
- Rocío Santos Rodrigo nº 405
- Sara Larre Ara nº 761
