how to compute differential algebraic equations on RL circuit?

2 views (last 30 days)
  2 Comments
David Goodmanson
David Goodmanson on 8 May 2020
Hi Lahari,
It appears that the current source here is arbitrary and is an input to the problem. So you need to specify the current and find its derivative either algebraically or numericallly. This is done independently of what the circuit itself happens to be.
LAHARI NAGELLA
LAHARI NAGELLA on 9 May 2020
I need matlab code for that problem and also how to plot a graph.

Sign in to comment.

Answers (1)

Ameer Hamza
Ameer Hamza on 9 May 2020
Try this
syms G e1 e2 I(t) iL L
DI = diff(I, t);
eq1 = G*(e1-e2) == I;
eq2 = -G*(e1-e2)+iL == 0;
eq3 = L*DI-e2 == 0;
sol = solve([eq1, eq2, eq3], [iL e1 e2]);
Result:
>> sol.iL
ans =
I(t)
>> sol.e1
ans =
(G*L*diff(I(t), t) + I(t))/G
>> sol.e2
ans =
L*diff(I(t), t)

Categories

Find more on Mathematics in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!