Problem Description DC voltage Souroe Resistor Capaotor Find the mesh currents i
ID: 2082136 • Letter: P
Question
Problem Description DC voltage Souroe Resistor Capaotor Find the mesh currents in the two loops present in the circuit shown. Use an ODE approach to solve this problem. Please remember to specify the initial conditions correctly. Plot how the two currents change with time and return the instant of time at which both the mesh currents have the same value. Hint: Think about how you can use Kirchoff's Circuit Laws to represent the value of current in terms of passive circuit elements. Use these equations you get here to model the currents and then use the rode45" solver with these equations. Refer to the following documentation page for more info on how you can solve ODEs in MATLAB. http://www.mathworks.com/help/releases/R2014a/matlab/math/ordinary-differential-equations.htmlafl 753255 Solution MATLAB Documentation 1 unction time your fon name 3 R 4; 4 C 0.001 5 L 0.1 6 V 10Explanation / Answer
%rajiexample.m (CALLING FUNCTION)
function time = rajiexample
R = 4;
C = 0.001;
L = 0.1;
V = 10;
tSpan = [0 1];
x0 = [0.1 0.1];
[t,x] = ode45(@meshEq,tSpan,x0);
plot(t,x);
end
%meshEq.m
function dx = meshEq( t,x )
R = 4;
C = 0.001;
L = 0.1;
V = 10;
%lOOP 1
%Applying KVL, V = L*di1/dt + R*(i1-i2) => di1/dt = (V - R*(i1-i2))/L
%lOOP 2
%Applying KVL, (i2-i1)*R = (1/C) int(i2dt)
%Differentiating throughout,
%(di2/dt - di1/dt)*R = (1/C)*i2 => di2/dt = (di1/dt)*R + (1/C)*i2
dx(1) = (V - R*(x(1)-x(2)))/L;
dx(2) = (dx(1)*R + x(2)*(1/C));
dx = dx';
end
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.