PROGRAMMING ASSIGNMENT 11
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
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.