MATH201/content/Systems of linear equations...

110 lines
4.4 KiB
Markdown
Raw Normal View History

#ex #SoLE
Lets start modelling some electric circuits again:
2023-12-03 02:24:14 -07:00
![draw](drawings/Drawing-2023-10-25-13.43.26.excalidraw)
The circuit is switched on (battery in series) at $t=0$ and is then switched off (battery is bypassed) at $t=1$
Applying KVL:
$0.2I_{1}'+0.1I_{3}'+2I_{1}=g(t) \qquad \text{where } g(t)=\begin{cases}6, & 0\leq t\leq 1 \\0, & 1<t\end{cases}$
$-I_{2}+0.1I_{3}'=0$
$I_{1}=I_{2}+I_{3}$
Voila, a system of three linear equations.
#end of lec 21
#start of lec 22
eq 1) $0.2I_{1}'+0.1I_{3}'+2I_{1}=g(t) \qquad \text{where } g(t)=\begin{cases}6, & 0\leq t\leq 1 \\0, & 1<t\end{cases}$
eq 2) $-I_{2}+0.1I_{3}'=0$
eq 3) $I_{1}=I_{2}+I_{3}$
Two differential equations, one algebraic equation. Our goal is to solve for $I_{1}\ I_{2}$ and $I_{3}$
express g in terms of unit step function:
$g(t)=6-6u(t-1)$
combine equations 2 and 3:
$-I_{1}+I_{3}+0.1I_{3}'=0$
now we have just two equations:
eq 1) $0.2I_{1}'+0.1I_{3}'+2I_{1}=6-6u(t-1)$
eq 2) $-I_{1}+I_{3}+0.1I_{3}'=0$
where $I_1(0)=I_{2}(0)=I_{3}(0)=0$ (the battery is just connected at $t=0$)
multiply both equations by 10:
$2I_{1}'+1I_{3}'+20I_{1}=60(1-u(t-1))$
$-10I_{1}+10I_{3}+I_{3}'=0$
hit it with the LT!
let:
$J_{1}=\mathcal{L}\{I_{1}(t)\}(s)$
$J_3=\mathcal{L}\{I_{3}\}$
then:
$2sJ_{1}-\cancel{ 2I_{1}(0) }+sJ_{3}-\cancel{ I_{3}(0) }+20J_{1}=\mathcal{L}\{60(1-u(t-1))\}$
$2(s+10)J_{1}+sJ_{3}=60\left( \frac{1}{s}-\frac{e^{-s}}{s} \right)$
$=2(s+10)J_{1}+sJ_{3}=60 \frac{1-e^{-s}}{s}$
Now for the second eq, hitting it with the LT yields:
$-10J_{1}+(s+10)J_{3}=0$
Let's isolate $J_{1}$:
$\begin{matrix} 2(s+10)J_{1}+sJ_{3}=60 \frac{1-e^{-s}}{s}&\qquad\quad\times(s+10) \\ -\quad-10J_{1}+(s+10)J_{3}=0&\times s \\ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄\end{matrix}$
$=\quad2(s+10)(s+10)J_{1}+\cancel{ sJ_{3}(s+10) }+10sJ_{1}-\cancel{ s(s+10)J_{3} }=(s+10)60 \frac{1-e^{-s}}{s}$
$=2(s^2+20s+100+5s)J_{1}=(s+10)60 \frac{1-e^{-s}}{s}$
$(s+5)(s+20)J_{1}=(s+10)30 \frac{1-e^{-s}}{s}$
$J_{1}(s)=30 \frac{s+10}{s(s+5)(s+20)}(1-e^{-s})$
use partial fractions:
$30 \frac{s+10}{s(s+5)(s+20)}=\frac{A}{s}+\frac{B}{s+5}+\frac{C}{s+20}$
$=\frac{{A(s+5)(s+20)+B(s^2+20s)+C(s^2+5s)}}{s(s+5)(s+20)}$
Solve the system of equations:
$A+B+C=0$
$25A+20B+5C=30$
$100A=300 \implies A=3$
$\implies B=-2 \qquad C=-1$
$J_{1}(s)=\left( \frac{3}{s}-\frac{2}{s+5}- \frac{1}{s+20} \right)(1-e^{-s})$
invert the LT: (use $\mathcal{L}^{-1}\{e^{-as}F(s)\}=f(t-a)u(t-a)$)
$I_{1}=3-2e^{-5t}-e^{-20t}-u(t-1)(3-2e^{-5(t-1)}-e^{-20(t-1)})$
Nice! Now we solve for $I_{3}$. Let's use: $-10J_{1}+(s+10)J_{3}=0$
$J_{3}=\frac{10}{s+10}J_{1}$
$J_{3}=300 \frac{1}{s(s+5)(s+20)}(1-e^{ -s })$
partial fraction it so we can eventually take the inverse LT:
skip some steps:
$J_{3}=\left( \frac{3}{s}-\frac{4}{s+5}+\frac{1}{s+20} \right)(1-e^{ -s })$
$I_{3}=3-4e^{ -5t }+e^{ -20t }-(3-4e^{ -5(t-1) }+e^{ -20(t-1) })u(t-1)$
Finally, $I_{2}$ is simply:
$I_{2}=I_{1}-I_{3}$
Our final answer is:
$$\begin{matrix}I_{1}=3-2e^{-5t}-e^{-20t}-u(t-1)(3-2e^{-5(t-1)}-e^{-20(t-1)}) \\I_{3}=3-4e^{ -5t }+e^{ -20t }-(3-4e^{ -5(t-1) }+e^{ -20(t-1) })u(t-1) \\I_{2}=I_{1}-I_{3}\end{matrix}$$
Every 2nd order linear equation can be written as a system of 2 1st order linear equations:
$ay''+by'+cy=f$
$y'=z$
$\begin{cases}y'-z=0 \\az'+bz+cy=f\end{cases}$
last example of the chapter:
#ex #SoLE #IVP
$x'+y=0, \qquad x(0)=0$
$x+y'=1-u(t-2) \qquad y(0)=0$
This is a review problem in chapter 7 of the textbook.
Hit equation 1 and 2 with the LT:
$sX+Y=0$
$X+sY=\frac{{1-e^{ -2s }}}{s}$
Let's isolate $X$
multiply equation 1 by $s$
and subtract eq 1 from eq 2:
$-(s^2-1)X=\frac{{1-e^{ -2s }}}{2}$
$X(s)=e^{-2s} \frac{1}{s(s-1)(s+1)}-\frac{1}{s(s-1)(s+1)}$
use partial fractions:
$\frac{A}{s}+\frac{B}{s-1}+\frac{C}{s+1}=\frac{1}{s(s-1)(s+1)}$
$A(s^2-1)+B(s^2+s)+C(s^2-s)=1$
$A+B+C=0$
$B-C=0$
$-A=1\implies A=-1$
$\implies B=\frac{1}{2} \qquad C=\frac{1}{2}$
$X(s)=\left( -\frac{1}{s}+\frac{1}{2} \frac{1}{s-1}+\frac{1}{2} \frac{1}{s+1} \right)(e^{ -2s }-1)$
inverse laplace:
$$x(t)=1-\frac{1}{2}e^t-\frac{1}{2}e^{-t}-u(t-2)\left( 1-\frac{1}{2}e^{t-2} -\frac{1}{2}e^{-(t-2)}\right)$$
Now solve for $y(t)$ too:
$Y=-sX=-s (\frac{-1}{s(s-1)(s+1)}+ \frac{e^{ -2s }}{s(s-1)(s+1)})$
$=\frac{1}{(s-1)(s+1)}- \frac{e^{-2s}}{(s-1)(s+1)}$
partial 'frac it:
$\frac{1}{(s-1)(s+1)}=\frac{A}{s-1}+\frac{B}{s+1}$
$A(s+1)+B(s-1)=1$
$A+B=0$
$A-B=1$
$\implies A=\frac{1}{2} \quad B=-\frac{1}{2}$
$=\frac{1}{2}(1-e^{-2s})\left( \frac{1}{s-1}-\frac{1}{s+1} \right)$
$$\implies y(t)=\frac{1}{2}(e^t-e^{-t})-\frac{1}{2}u(t-2)(e^{t-2}-e^{-(t-2)})$$
we are done
#end of lec 22