Vous êtes sur la page 1sur 7

Lesson 12: LRC Circuit, Tuning and ode45

12.1 Applied Problem.


A series LRC circuit can be viewed as a primitive tuning circuit in a simple radio.
The objective is to adjust L or C so that the current in the circuit will be a maximum for a
given radio frequency. The imposed voltage comes from a radio signal, and it has the
form for an amplitude modulation signal of
V(t) = V0(t) cos(t) where = 2F and F = radio frequency.
V0(t) is the amplitude modulation, and it carries the audio frequency = f which is much
smaller than the radio frequency = F >> f . For a simple audio tone we have V0(t) = E
cos(2f t). This imposed voltage will induce a current into the series LRC circuit, and its
amplitude will depend on all the parameters in the circuit and the imposed voltage.

12.2 Differential Equation Model.


A series LRC circuit with imposed voltage is modeled by a single second order
differential equation for the charge, Q(t),
L Q'' + R Q' + 1/C Q = V(t) and Q(0) and Q'(0) are given.
The current is defined to be I = Q'.

This equation is derived from Kirichhoff's law,

which requires the sum of the voltage drops to be equal to the imposed voltage, V(t). The
voltage drops are L Q'' for self inductance, R Q' for resistance and 1/C Q for capacitance.
In our problem V(t) is a complicated expression of trig functions, and the exact solution
will be difficult to find. Therefore, we will use a higher order numerical method with
variable step sizes.

The above second order differential equation can be equivalently written as a


coupled system of two differential equations for y1(t) = Q(t) and y2(t) = Q'(t) = I(t). By
definition the derivative of y1 must be y2. The derivative of y2 is Q'', which we can solve
for via the second order differential equation. Thus, the equivalent coupled system is
y1' = y2 with y1(0) = Q(0) and
y2' = (V(t) - R y2 - (1/C) y1)/L with y2(0) = I(0).
Matlab's ode45 can be used to solve such systems.

12.3 Method of Solution.


If the imposed voltage has no modulation, then V(t) = E cos(t) and we can solve
exactly the second order differential equation. In this case, the solution has the form
I(t) = C1 r1exp(r1t) + C2 r2 exp(r2t) + E (R2 + (1/(C) - (L))2)-1/2 cos(t + ).
Since r1 and r2 have negative real parts, the first two terms must decay to zero; this is
called the homogeneous or transient solution. The long run or particular solution is the
third term, and here is called the phase angle and is a function of L, R and C. If the
second term in the square root is zero, then the amplitude will be a maximum. This
happens when = (LC)-1/2. In the figure below we have graphed the amplitude versus
= x with E = 100, R = 400, L = 2 and C = 10-6. When is about 710, the amplitude will
be about a maximum equal to .25.
milliseconds.

Here we have scaled the unit of time to be

100/(400^2 + (2*x - 10^6/x )^2)^.5


0.26
0.24
0.22
0.2
0.18
0.16
0.14
0.12
0.1
0.08
500

550

600

650

700

750
x

800

850

900

950

1000

Figure: Current Amplitude versus Frequency

Since the imposed voltage will be more complicated, it is not always possible to
derive explicit formulas for the solution of the LRC circuit differential equation. We will
use Matlab's ode45 to generate numerical solution to the more complicated cases.

12.4 Matlab Implementation.


The single second order differential equation must be converted, as above, to a
system of differential equations for the charge, denoted by the symbol y(1), and for the
current, denoted by the symbol y(2). The m-files for this system are called yptune.m and

tune.m. In the first calculation we used L = 2, R = 400, C = 10^-6, V(t) = 100 cos(710t)
with initial charge and current set equal to 0.

function yptune = yptune(t,y)


yptune(1) = y(2);
yptune(2) = (100*cos(710.*t)-400*y(2)-(10^6)*y(1))/2.0;
yptune = [yptune(1) yptune(2)]';

%your name, your student number, lesson number


clear;
t0 = 0;
tf = .3;
y0 = [0 0];
[t y] = ode45('yptune', [t0 tf],y0);
plot(t,y(:,2))
title( 'your name, your student number, lesson number')
xlabel('time')
ylabel('current')
%plot(y(:,1),y(;,2));

y our nam e, your s tudent num ber, les son num ber
0.25
0.2
0.15
0.1

current

0.05
0
-0.05
-0.1
-0.15
-0.2
-0.25
0

0.05

0.1

0.15

0.2
tim e

0.25

0.3

0.35

12.5 Numerical Experiments.


Now consider the more complicated imposed voltage
V(t) = 100 sin(63t) sin(710t).
This first graph uses the same L, R and C, which are the near optimal choices so that the
current will have a maximum amplitude. Subsequent calculations vary the L and confirm
that L = 2 is near optimal. The time has been scaled to milliseconds so that 63 represents
audio frequency and 710 represents the frequency of the AM (amplitude modulation)
radio station. The imposed voltage would be from the radio's antenna. The resistance in
the circuit would include some headphones, which would generate a single tone.
y our nam e, y our s tudent num ber, les s on num ber
0.25
0.2
0.15
0.1

c urrent

0.05
0
-0.05
-0.1
-0.15
-0.2
-0.25
0

0.05

0.1

0.15

0.2

0.25

0.3

tim e

Figure: Current from AM Signal with L = 2

0.35

your nam e, y our s tudent num ber, less on num ber


0.08

0.06

0.04

c urrent

0.02

-0.02

-0.04

-0.06

-0.08
0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

tim e

Figure: Current from AM Signal for L = 4


y our nam e, y our s tudent num ber, les s on num ber
0.1
0.08
0.06
0.04

c urrent

0.02
0
-0.02
-0.04
-0.06
-0.08
-0.1
0

0.05

0.1

0.15

0.2

0.25

tim e

Figure: Current from AM Signal for L = .5

0.3

0.35

12.6 Additional Calculations.


Consider the above series LRC circuit with L = 2, R = 400,
V(t) = 200sin(63t)sin(710t) and variable C.
(a).

State the second order differential equation and the equivalent system of
differential equations.

(b).

Modify the yptune.m file using C = 10^-6.

(c).

Execute the tune.m file.

(d).

Repeat (c) using C = (1-.S)*10^-6 and (1+.S)*10^-6.

(e).

Compare the three graphs for the currents.


What happens to the current when C varies from C = 10^-6?

Vous aimerez peut-être aussi