Sunteți pe pagina 1din 5

PROGRMA NO.

EM OSCILLATION IN LCR CIRCUIT


USING

RANGA KUTTA METHOD

Theory
We will study a kind of circuit where the current oscillates: it increases to a positive value then decreases
to a negative value and so on, back and forth in time. These oscillators are the basis of many devices that
we use every day. The tuner in your TV or radio is an example, as are electronic watches. In most
modern devices, the oscillations are regulated using additional components like transistors or crystals.
We will study only the most basic example with inductance, capacitance and a resistance known as lcr
circuit. It is basically the electrical analogue of the damped mass-spring oscillator. The inductance ? acts
as the inertia of the system, while the reciprocal of capacitance ? = ?/? acts as the force constant,
in this case voltage per unit charge, which is a kind of electrical pressure. Not surprisingly, the
resistance ? serves as the source of damping.

Inductor
An inductor is usually a coil or toroid of wire that can store energy in the form of magnetic field. The
behaviour of an inductor in a circuit is governed by Faradays Law of Induction, which can be used to
demonstrate that EMF across an inductor is associated with changes in the current passing through it.
Inductance represents the inertia of an electric current. The more the inductance, the more it will oppose
changes in the current. An inductor is happiest (has no induced e.m.f.) when it has a constant current
flowing through it. A coil carrying an current can induce an electromotive force on a nearby coil: it can
drive a current on it. Any time that magnetic flux across the area enclosed by a wire changes, there will
be an induced e.m.f. on it. Thus a varying current can induce an
E.m.f. even on the wire carrying it: this is called self-inductance. By Lenz law, the sign of this e.m.f. will
be such that it opposes the change of the current. So Thus
= L

dI
dt

The constant L is called the self-inductance or simply inductance having HENRY (volts.sec) as S.I.
units.

Capacitor
Capacitor, a system of two conductors separated by an insulating medium, on the other hand, is in a
hurry to get rid of the electric charge stored in it: it is happiest (has zero e.m.f.) when it carries no charge.
It stores electrical energy. Potential is proportional to charge on the conductor plates which means
Q = CV
Where Q is charge, V is potential and C is capacitance having FARAD as S.I. units.
By putting an INDUCTOR and a CAPACITOR together we can trick them into oscillating back and
forth between their states of maximum and minimum e.m.f. The energy in a capacitor is Q 2/2C in the
form of potential energy. The energy in an inductor is due to the current flowing through it. Thus it is a
form of kinetic energy, due to the motion of electrons. It can also be thought of as the energy of the
magnetic field inside the coils. This energy is
(LI2). The sum of these two is conserved in an ideal LC oscillator (with no resistance).
(LI2) + Q2/2C= constant
But in the real world we are always losing energy to heat: the wires that carry the current will have
resistance. The oscillations will die out eventually unless this energy is replenished from external
sources.

Figure 1: LCR (damped oscillator) circuit diagram.

Damped Oscillator
Fig. 1 show a schematic diagram of a circuit with a resistor, capacitor, and inductor which is connected
in series to form a damped LC oscillator. The capacitor is connected to the voltage source, V, and
charges through resistor R to this voltage. After certain time the voltage across the capacitor decays
back to zero but may oscillate while doing so, depending on the values of the components. The
behaviour of the voltage as a function of time is illustrated in Figure 2

A damped LC oscillator is equivalent to a damped mechanical oscillator formed from a mass spring.

Using Kirchhoffs Law-

Q/C+RI+ L

( dQdt )

=0

(if not connected with external

voltage)
Where I is current, Q is charge, C is capacitor
NOW,
I=

So

( dQdt )

Q/C +R

( dQdt )

+L

( dIdt )

=0

This equation can be solved by many methods. One of this is RUNGE KUTTA method. To solve this
with RUNGE KUTTA method we convert this equation to the 1st order coupled differential equation.
-1/L (Q/C + RI) =

( dIdt )

By defining 8 slopes 4 for each differential equation because these equation is in the form.

( dQdt )

= f1(Q,I,t)

( dIdt )

-----------------------------

=f2(Q,I,t)

Runge- kutta method


The RungeKutta method of integrating

dy
=f ( x , y )
dx
is a step-by-step process of obtaining an approximation for yi+1 by starting from the value of yi. Among
its advantages are that no functions other than f are used, no subsidiary differentiation is needed and no
additional starting values need be calculated.
To be set against these advantages is the fact that f is evaluated using somewhat Complicated
arguments and that this has to be done several times for each increase in the value of i. However, once a
procedure has been established, for example on a computer, the method usually gives good results.
The basis of the method is to simulate the (accurate) Taylor series for y(x i+h),not by calculating
all the higher derivatives of y at the point x i but by taking a particular combination of the values of the
first derivative of y evaluated at a number of carefully chosen points.
The Runge-Kutta 4th order method is based on the following
where knowing the value of

at

, we can find the value of

at

, and

Equation (1) is equated to the first five terms of Taylor series


(2)
Knowing that

and
(3)

Based on equating Equation (2) and Equation (3), one of the popular solutions used is
(4)

ALGORITHM1. Declare appropriate header files and define a class.


2. Declare appropriate no. of variables with their resp. Data type.
3. Define a function as p=-(Q/C+RI)/L with proper initial values of charge (Q), current (I),
resistance (R), capacitance (C), inductance (L).

4. Enter the values of initial time, final time and n such that value of step function h has a proper
value.
5. Calculate Q1, Q2, Q3, Q4 and I1, I2, I3,I4 using for loop to show variation in charge and current
with time.
6. Using ranga kutta method for fourth order, solve the differential equation for current and time.
7. Store the output values of I,Q,t in output file and plot the graph between
Charge and time, current and time.
8. Start the main function and declare an object of class to access the member function of class. And
terminate the program with return zero.

S-ar putea să vă placă și