PROGRAMMING ASSIGNMENT 11
Need help with this assignment?Get an original answer from a qualified tutor — from $10/page.
Get it written →PROGRAMMING ASSIGNMENT 11
SOLVING ORDINARY DIFFERENTIAL EQUATION (ODE) INITIAL VALUE PROBLEMS (IVPS) WITH PYTHON
Consider the RLC circuit shown below that features a resistor R, an inductor L, and a capacitor C. Such a circuit is called a second-order circuit because it contains two independent energy storage elements and can be modeled by a second-order differential equation or two coupled first order differential equations.
RLC_9_9_1.drawio.png
For this assignment, compute and plot i(t) and v(t) over the time interval
0
≤
�
≤
10
seconds using SciPy’s
solve_ivp() Runge-Kutta function. For this circuit,
�
=
3
𝛺
�
=
1
�
�
=
1
2
�
�
�
=
2
�
−
3
�
�
Prior to time
�
=
0
, the right switch is closed and the left switch is down and thus the circuit is connected to the 10V source for a long time. Then, at time
�
=
0
, the right switch opens to disconnect the 10V source and the left switch toggles up to connect the current source
�
�
. The initial conditions at time
�
=
0
are thus
�
(
�
)
=
10
�
and
�
(
0
)
=
0
�
.
Applying KVL around the RLC mesh, we have
�
�
�
�
�
(
�
)
+
�
�
(
�
)
=
�
(
�
)
Applying KCL at the node labeled i, we have
�
�
�
�
�
(
�
)
+
�
(
�
)
=
�
�
Solve this system using a Runge-Kutta method with the solve_ivp function in the SciPy Python package, as demonstrated in class. plot i(t) and v(t) over the time interval
0
≤
�
≤
10
seconds. Use a double y-axis plot with current in red on the left, and voltage in blue on the right.
1 attachments
Get a plagiarism-free answer to this question
Send us your instructions and we’ll match you with the best writer in your subject.
- 100% human-written, zero AI
- Turnitin report included
- Confidential — we never share your data
- Free revisions & refunds