Mathematics 304 – Ordinary Differential Equations Lab/Problem Set 7 – 2nd Order Equations and RLC Circuits October 29, 2004

Background and Goals

Today we will apply our knowledge of 2nd order linear ODE to some questions about electrical circuits. An “RLC circuit” is one that contains a voltage source v_{T} (t) (time dependent), a resistor (i.e. something that dissipates electrical energy) with resistance R, an inductor (a device or component that stores magnetic energy) with inductance L, and a capacitor (a device or component that stores electrical energy) with capacitance C. Many basic electrical circuits have this form.

It can be shown that the voltage change across the capacitor, written v_{C}, satisfies the 2nd order ODE

(1)  LC \frac{d^{2}v_{C}}{dt^{2}} + RC \frac{dv_{C}}{dt} + v_{C} = v_{T} (t)

so that these circuits are also described by the harmonic oscillator equations that we have been studying for the past week. We will always consider a periodic, sinusoidal voltage source (“forcing”) term

v_{T} (t) = a sin(ωt).

Maple Notes

All of the plots necessary for this lab will be generated using the basic Maple plot command. However, if you want to check your results, you can also use the DEplot command from Lab 1 to plot approximate numerical solutions to 2nd order ODE as follows. For example, say we want to see the solution of the initial value problem

\{ \begin{matrix}4\frac{d^{2}y}{dt^{2}} + 3\frac{dy}{dt} + 10y = 3 cos(2t) \\ y(0) = 5 \\ y′(0) = −3 \end{matrix}

Then the following commands could be used. First load the DEtools package with:

                              with(DEtools):

Then define the ODE with:

        eqn:=4*diff(y(t),t$2)+3*diff(y(t),t)+10*y(t) = 3*cos(2*t);

and plot the solution for t ∈ [0, 10] with

              DEplot(eqn,y(t),t=0..10,[[y(0)=5,D(y)(0)=-3]]);

As in Lab 1, adjusting the linecolor and stepsize options, the range of t-values, etc. will often be necessary to get reasonable, printable graphs.

Lab Questions

A) (A worked example) Suppose we want to understand the voltage in an RLC circuit with R = 1000, L = 2, and C = 10^{−6}, and a voltage source v_{T} = 20 sin(500t). We know that the general solution of (1) in this case:

(2)  (2 × 10^{−6})\frac{d^{2}v_{C}}{dt^{2}} + (10^{−3})\frac{dv_{C}}{dt} + v_{C} = 20 sin(50t)

looks like v_{C}(t) = c_{1}v_{1}(t) + c_{2}v_{2}(t) + v_{p}(t), where c_{1}v_{1}(t) + c_{2}v_{2}(t) is the general solution for the homogeneous equation

(2 × 10^{−6})\frac{d^{2}v_{C}}{dt^{2}} + (10^{−3})\frac{dv_{C}}{dt} + v_{C} = 0

and v_{p}(t) is any particular solution.

1) To find v_{1}(t), v_{2}(t), we find the roots of the characteristic polynomial of the corresponding first order system:

(2 × 10^{−6})λ^{2} + (10^{−3})λ + 1 = 0

To find them using Maple, enter:

fsolve(2*10^(-6)*lambda^2+10^(-3)*lambda+1,lambda,complex);

2) Call the roots α±iβ. Then we know that the general solution of the homogeneous equation has the form c_{1}e^{αt} cos(βt) + c_{2}e^{αt} sin(βt). Define the two terms here as functions in Maple using:

             v1:= t->exp(alpha*t)*cos(beta*t);
             v2:= t->exp(alpha*t)*sin(beta*t);

(You will need to assign values to alpha and beta or fill in the correct numerical values.)

3) Now, we need to find a particular solution v_{p}. This is where the method of undetermined coefficients that we discussed in class earlier comes in. The 20 sin(50t) term on the right means that we guess that a particular solution will have the form v_{p}(t) = A cos(50t) + B sin(50t). (Note, no term here is a solution of the homogeneous equation, so we do not need a t^{s} factor, that is, s = 0.) Plug v_{p}(t) into (2) and determine the values of A, B to yield a solution. You should get:

\begin{matrix}.995A + .05B = 0 \\ −.05A + .995B = 20 \end{matrix}

So A ≐ −1.007 and B ≐ 20.05. You can find these equations and the solutions in Maple using

                  vp:=t->A*cos(50*t)+B*sin(50*t);
   2.0*10^(-6)*diff(vp(t),t$2)+1.0*10^(-3)*diff(vp(t),t)+vp(t);
      ABSol := fsolve({.995*A+.05*B,-.05*A+.995*B-20},{A,B});
                  vpp := t -> subs(ABSol,vp(t));

The last line defines the particular solution as a new function, with the values of A, B “plugged in.”

4) Now, we find the values of c_{1}, c_{2} that give a solution of the initial value problem with v(0) = 0, v′(0) = 1. Here are some sample Maple commands to work with:

                 vC:=t->c1*v1(t)+c2*v2(t)+vpp(t);
           initeqs:={vC(0)=0,subs(t=0,diff(vC(t),t))=1};
                  cvals:=fsolve(initeqs,{c1,c2});

5) Finally, plot the solution of (2) with v_{C}(0) = 0, and v′_{C}(0) = 1. (Note: You’ll need to think about an appropriate interval of t values for your plot. A term like cos(661.437t) is oscillating really fast!) Also plot the “transient” part of the solution separately. (This should show you why the solution of (2) looks virtually indistinguishable from a sinusoidal function!)

B) Suppose L, C > 0, but the resistance R = 0. (This is a very, very idealized situation, of course, even better than “superconductivity.”) What do the solutions of (1) look like in this case? Derive analytic formulas by our undetermined coefficients technique for inhomogeneous 2nd order equations. Be sure to distinguish between the two different cases:

1) iω is not a root of the characteristic polynomial, and

2) iω is a root of the characteristic polynomial. How is the analytic form of the solution different in these two cases?

C) Using Maple, plot the analytic solutions of (1) with R = 0, C = 10^{−6}, L = 1, a = 1, v_{C}(0) = 1, v′_{C}(0) = 0, and ω = 900, 950, 1000, 1050, 1100 (five graphs in all). (You’ll need to chose your t interval carefully to get informative graphs!) The name for the ω = 1000 case is resonance. Describe what a resonant solution does as t → ∞. Can you think of a “real world” situation that might correspond to resonance? Is it a “good” or a “bad” thing to have a resonant solution?

D) Next, we will study the more realistic case R > 0. By considering the form of the roots of the characteristic polynomial of the 1st order system, show that if R > 0, then every solution of the corresponding homogeneous equation

LC \frac{d^{2}v_{C}}{dt^{2}} + RC \frac{dv_{C}}{dt} + v_{C} = 0

tends to zero as t → ∞. These terms in the general solution of (1) are called “transients” for this reason.

E) Plot and describe the solutions for fixed a = 10 and ω = 1000, 1200, 1400, 1600, 1800, 2000 with R = 2000, C = 2 × 10^{−7}, and L = 1.5. How does the amplitude of the steady state solution compare with the amplitude of the forcing term (as a function of ω)? Does resonance occur in this situation? Explain.

Assignment

Individual write-ups giving answers to the above questions. Due: In class, Friday, November 5.