Here is an exercise from my Textbook in which one is asked to find the mesh currents:
The first thing I did was find the s-Domain equivalent of the circuit:
Now, I can write the mesh equations from it:
From Mesh 1:
$$
\frac{6s\cos{13}+12\sin{13}}{s^2+4}= \frac{4000}{3s}\left(I_1-I_2\right)+2\left(I_1-I_3\right)$$
From Mesh 2:
$$
\frac{4000}{3s}\left(I_2-I_1\right)-10^{-3} +10^{-3}s\left(I_2-I_4\right)=-0.005\,I_1
$$
From Mesh 3:
$$
\frac{6s}{s^2+4}=2\left(I_1-I_3\right)+\frac{1000}{s}\left(I_4-I_3\right)
$$
From Mesh 4:
$$
\frac{1000}{s}\left(I_3-I_4\right)-10^{-3}+10^{-3}\left(I_2-I_4\right)=0
$$
Upon simplification, the linear system to be solved is the following:
$$
\begin{cases}
\frac{6s\cos{13}+12\sin{13}}{s^2+4} & = \left(\frac{4000}{3s} + 2\right)\,I_1 – \frac{4000}{3s}\,I_2 -2\,I_3\\
10^{-3} &= \left(\frac{-4000}{3s} + 0.005\right)\,I_1 +\left(\frac{4000}{3s} + 10^{-3}s\right)\,I_2 -10^{-3}s\,I_4\\
\frac{6s}{s^2 + 4} &= 2\,I_1 – \left(2+\frac{1000}{s}\right)\,I_3 + \frac{10^3}{s}\,I_4\\
10^{-3} &= 10^{-3}s\,I2 + \frac{1000}{s}\,I_3 -\left(\frac{10^3}{s}+10^{-3}s\right)\,I_4
\end{cases}
$$
Now, I would like to ask if there is a method to solve the above system with MATLAB or a calculator because it seems pretty daunting to be done by hand.
Best Answer
There is, you can solve it with the
symbolic
package. In Gnu Octave, I did as follows:After that, you can calculate the inverse Laplace Transform of \$I_1(s)\$ as well as \$I_2(s)\$:
The expression of \$i_1(t)\$ is: $$ i_1(t) = \frac{18995427834743075\sin\left(2t\right)}{70368744177664}-\frac{17314045002411675\cos\left(2t\right)}{562949953421312} $$
Likewise, that of \$i_2(t)\$ is: $$ i_2(t) = \frac{296812200041343\, \delta(t)}{4503599627370496000}+\frac{607845269247680625947479059060193\, \sin(2t)}{2251770540398008282646577152000}-\frac{34629909136866774277122155673357\, \cos(2t)}{1125885270199004141323288576000}-\left(\frac{829655138918152783365787659}{985149611424128623657877504}\,e^{-1000t/7}\left(\cos\left(\frac{3000\sqrt{3}t}{7}\right)-\frac{341473085180277742962620803\,\sqrt{3}}{2488965416754458350097362977}\sin\left(\frac{3000\sqrt{3}t}{7}\right)\right)\right) $$