Differential Equations

General

• Get rate equation and initial condition
• Compare analytic solution to numerical solution given by scipy.integrate.odeint

RLC Analytic Solution

• Kirchoff's current law "KCL"
• current through a capacitor ${\displaystyle i_{C}=C{\frac {dv}{dt}}}$
• current through a inductance ${\displaystyle i_{L}={\frac {1}{L}}\int _{0}^{t}vdt+I_{0}}$
• current through a resistor ${\displaystyle i_{R}={\frac {v}{R}}}$
• Ohm's law for voltage drop across resistor
• Kirchoff's voltage law "KVL" - voltages in the circuit = 0

Natural response

• no voltage, maybe charge on capacitor, will decay to steady state
• KCL current sums to 0
• ${\displaystyle i_{C}+i_{L}+i_{R}=0}$
• Take derivative of everything
• ${\displaystyle C{\frac {d^{2}v}{dt^{2}}}+{\frac {v}{L}}+{\frac {1}{R}}{\frac {dv}{dt}}=0}$
• Get second derivative by itself
• ${\displaystyle {\frac {d^{2}v}{dt^{2}}}+{\frac {1}{RC}}{\frac {dv}{dt}}+{\frac {v}{LC}}=0}$
• Turn differential equation into Characteristic equation - the s equations
• Use quadratic formula to find the roots of s, s1 and s2
• Assume form of the solution is ${\displaystyle v(t)=A_{1}e^{s_{1}t}+A_{2}e^{s_{2}t}}$
• Response can fall into three categories
• Overdamped - roots s1 and s2 are both real numbers and distinct from each other.
• Underdamped - both are complex and distinct (conjugates)
• Critically damped - both are real and equal
• To find out which response we have, compare two frequencies, whether or not one is bigger than the other, or are they equal.
• Resonant radian frequency ${\displaystyle \omega _{0}}$ [radians/s]
• Neper frequency ${\displaystyle \alpha }$ [radians/s]
• ${\displaystyle s_{1,2}=-\alpha \pm {\sqrt {\alpha ^{2}-\omega _{0}^{2}}}}$
• Plug in the values of the coefficients
• Overdamped: ${\displaystyle \omega _{0}^{2}<\alpha ^{2}}$
• ${\displaystyle v(t)=A_{1}e^{s_{1}t}+A_{2}e^{s_{2}t}}$
• Overdamped: ${\displaystyle \omega _{0}^{2}<\alpha ^{2}}$
• ${\displaystyle v(t)=B_{1}e^{-\alpha t}cos(\omega _{d}t)+B_{2}e^{-\alpha t}sin(omega_{d}t)}$
• Damping frequency ${\displaystyle \omega _{d}={\sqrt {\omega _{0}^{2}-\alpha ^{2}}}}$
• Critically damped: ${\displaystyle \omega _{0}^{2}=\alpha ^{2}}$
• ${\displaystyle v(t)=D_{1}e^{-\alpha t}+B_{2}e^{-\alpha t}}$
• Initial conditions, plug in t=0 to find coefficients A12 / B12 / D12, take derivitive, plug in t=0

Step Response

• Same as above, just set equation to constants I0 and V0 respectively