RLC Circuits
Circuits that involve resistors R, capacitors C, and inductances L can be thought of a network made up of elementary building blocks. We investigate the basic building blocks from first principles, namely the RL, RC, and RLC circuits. Often an idealization is made in that a pure inductance L is introduced, while in practice a solenoid always has some internal resistance associated with it. Thus, there is no need to discuss the pure LC circuit, since it emerges as the R=0 limit of the RLC circuit. The RLC circuit is of great interest due to its oscillatory solutions that can be resonantly excited - a principle that any radio set relies on.
These circuits contain very interesting physics. Before going into the details, i.e., before setting up the equations we discuss first the physical principles. In the RC circuit one studies how electricity is stored in a capacitor when a battery voltage is applied. If the circuit is then disconnected from the battery and the open terminals are shorted out, the capacitor discharges by sending a current through R that is in the opposite direction of the charging current.
The RL circuit is also an energy storing device: Faraday's law of induction as applied to the self-induction of a coil shows that the coil is opposing the free flow of current as the magnetic field is being built. Similarly, according to Lenz' rule the coil opposes the turning off of voltage, i.e., the energy stored in the magnetic field is released by sending a current in the same direction as the original battery current after the battery is disconnected and the open terminals are shorted out.
Once these different energy storage mechanisms are understood, it is not difficult to comprehend the oscillatory properties of an LC circuit. Suppose the capacitor has some initial charge: it then discharges while building up a magnetic ( B ) field in L; as the capacitor has lost its charge, i.e., transferred its electrical energy to the magnetic field in the coil, the magnetic field opposes the drop in voltage, i.e., sends a current to charge the capacitor in a sense that is opposite to its previous charge state, and then the cycle repeats. An oscillator emerges that is described by the same differential equation as a harmonic oscillator. The addition of R in series to L and C results in a damped harmonic motion. The differential equations provide the mathematical detail for this physical reasoning and determine how the physical characteristics of the components (R, C, and L respectively) determine the time constants.
Our circuits are very simple: we consider the two (or three) elements simply connected in series to each other with a fixed DC voltage U applied at the free terminals. When writing down the equations that govern the electric current in these circuits we can make use of Ohm's law to relate the current in the circuit to the voltage across the resistor R. Note that all three building blocks are passive, i.e., they simply respond to a current i ( t ) induced by the voltage U applied at time t =0.
We begin with the definition of the voltages across the three building blocks as a function of current.
For R we have Ohm's law:
> V_R:=R*i(t);
For the capacitor C we have the physical statement that it builds up its voltage as the plates are becoming charged due to the current:
> V_C:=(1/C)*Int(i(s),s=0..t);
For the inductance we take into consideration the fact that as the current begins to flow it is building up a time-varying magnetic field (flux ). This time-varying flux according to Faraday's law induces a time-varying voltage proprtional to (the negative sign is important, since a positive proportionality would lead to runaway solutions). The magnetic flux is proportional to the current i ( t ). For two coils the relationship between the voltage induced in coil 2 due to a current in coil 1 is given as , where M is the mutual inductance. For a single coil the same phenomenon occurs, since neighbouring turns of the coil experience their mutual magnetic fluxes. The self-inductance L - a property of the coil - serves as the proportionality constant between current and self-induced magnetic flux. An inductor serves as an energy-storing device, as it passing a current through the coil requires to overcome a back-electromotoric force voltage given by . To overcome this back EMF voltage we have to drive the solenoid with a forward voltage
> V_L:=L*diff(i(t),t);
RL circuit
The differential equation for the current follows from Kirchhoff's law for putting the two elements in series and applying a voltage U across the external terminals:
> KL_RL:=V_R+V_L=U;
The initial condition is that no current flows at t =0:
> IC:=i(0)=0;
> sol_RL:=dsolve({KL_RL,IC},i(t));
> i_RL:=factor(rhs(sol_RL));
Across the resistor we have according to Ohm's law:
> U_R:=simplify(subs(i(t)=i_RL,V_R));
We can introduce the characteristic time constant for this circuit as to simplify the expression to
> U_R:=simplify(subs(L=R*tau,U_R));
For graphing we now need to substitute only the scales for the axes, i.e., the time constant and the applied voltage:
> P_RL1:=plot(subs(tau=1,U=1,U_R),t=0..5,color=red):
> with(plots):
> display(P_RL1);
The voltage across the resistor is a measure of the current in the circuit i ( t ). It shows that work is being done by the current in building up a magnetic field over a time scale (chosen to be 1 on the graph), and that the current reaches only asymptotically its maximum possible value of U / R (assuming that the inductance L is ideal, i.e., contributes no ohmic resistance, otherwise one replaces R by R + R _ L , where R _ L is the ohmic resistance of the solenoid).
Note that the voltage across the solenoid is given as the complement between U _ R and the external battery voltage U . It is falling as a function of time allowing the interpretation that the solenoid acts as a big resistor as the magnetic field is building, but that its resistance goes to zero ideally (to R _ L realistically) for large times. Provide a simutaneous graph of the voltages across R and L as a function of time.
To determine the time constant from an experiment it is often advantageous to define the time at which one-half of the asymptotic current (or voltage across R ) is reached:
> t_half:=solve(U_R=U/2,t);
Now we look at the solution as the voltage is suddenly disconnected and the circuit is shorted out at the terminals. We assume that the steady-state current flows at
t =5, where we terminated our previous graph.
> KL_RL0:=subs(U=0,KL_RL);
> IC0:=i(5)=U/R;
> sol_RL0:=dsolve({KL_RL0,IC0},i(t));
We simplify the solution by combining the exponentials:
> i_RL0:=combine(rhs(sol_RL0),exp);
The voltage drop across the resistor follows from Ohm's law:
> U_R0:=simplify(subs(i(t)=i_RL0,V_R));
We express the latter using the time constant tau:
> U_R0:=simplify(subs(L=R*tau,U_R0));
> P_RL2:=plot(subs(tau=1,U=1,U_R0),t=5..10,color=blue):
> display(P_RL1,P_RL2);
This graph shows the voltage across the resistor R (or the current i ( t )) that would appear in the RL circuit as the terminals are connected to a single cycle of a square-wave pulse with turn-on at t =0, and turn-off at t =5 (we assumed that at t =5 the asymptotic current value was reached). Note that for cases where the driving square-wave pulse has a shorter time constant than the RL circuit, one has to use the final current from the turn-on phase as a start value in the initial condition for the turn-off phase.
It is important to realize that this is the result of the current continuing to flow in the same direction as the external voltage is turned off (down-time of the square-wave pulse). The voltage across the inductance L is the complement to the external voltage: for the turn-on part (red curve) it is the complement to U , for the turn-off part (blue curve) it is the complement to a zero voltage at the external terminals! We remember that we used U =1, and graph:
> P_RL3:=plot(1-subs(tau=1,U=1,U_R),t=0..5,color=red):
> P_RL4:=plot(0-subs(tau=1,U=1,U_R0),t=5..10,color=blue):
> display(P_RL3,P_RL4,title="voltage across L");
For the current to continue to flow in the same direction as the down-time of the square-wave signal begins, the voltage across the coil has to jump to the opposite sign, i.e., to - U .
RC circuit
We apply Kirchhoff's law as before:
> KL_RC:=V_R+V_C=U;
This is an integral equation. We are better off turning it into a differential equation by taking the derivative with respect to time:
> KL_RC:=diff(KL_RC,t);
In this form we have to supply an initial condition for the current, and we have to consider different possibilities. When the capacitor is uncharged and a voltage U is applied at t =0, one can see from the integral form of Kirchhoff's law that no voltage across the capacitor is generated (the integral vanishes), and the current is given by i (0)= U / R .
> IC1:=i(0)=U/R;
The solution to the equation for the current shows that it decreases exponentially:
> sol_RC:=dsolve({KL_RC,IC1},i(t));
> i_RC:=rhs(sol_RC);
The voltage across the resistor is found from Ohm's law as before:
> U_R:=simplify(subs(i(t)=i_RC,V_R));
This time tau= RC acts as a time constant and we have
> U_R:=simplify(subs(R=tau/C,U_R));
We graph the result after introducing scales for voltage and time:
> P_RC1:=plot(subs(U=1,tau=1,U_R),t=0..5,color=red):
> display(P_RC1);
We can interpret this result as follows: initially the uncharged capacitor poses no effective resistance to the current; as the capacitor plates are charged up the effective resistance goes to infinity causing the voltage drop across R (which is in series with C) to go to zero. For alternating currents (AC) capacitors therefore act as frequency-dependent resistors (impedance).
The voltage across the charging capacitor is given by the complement between U _R and U , i.e., it is a growing function of time. we leave ot to the reader to graph it together with U _R shown above.
Again, the time at which the voltage has fallen to half its value can be used to determine the time constant from a single reading.
> t_half:=solve(U_R=U/2,t);
Note that if we are interested in an accurate determination of the time constant for either the RL or the RC circuit, we should record a time sequence of voltages across R, and perform a fit to the data. An exponential fit is performed most conveniently by taking the logarithm of the data and carrying out a linear least squares fit.
This is carried out in the worksheet ExpFit.mws .
We can now disconnect the battery and short-circuit the open ends of the RC circuit, or alternatively consider a square-wave pulse connected at the free terminals of the circuit for the moment where it switches from high to low. We expect the stored energy in C to be released and dissipated in the resistance in analogy to the RL circuit case. There is, however, a difference: the capacitor discharges by sending a current in the direction opposite to the charging current through the circuit.
To find the corresponding solutions we need to modify the equations as well as the boundary conditions to reflect the new situation.
> KL_RC0:=lhs(KL_RC)=0;
Assuming that the capacitor was fully charged at t =5 we can set the initial current to - U / R , which corresponds to the full capacitor voltage discharging through the resistance R.
> IC0:=i(5)=-U/R;
> sol_RC0:=dsolve({KL_RC0,IC0},i(t));
We see that the current dies out exponentially with the characteristic time constant RC.
We combine the exponentials:
> i_RC0:=combine(rhs(sol_RC0),exp);
Ohm's law gives us the voltage drop across the resistor:
> U_R0:=simplify(subs(i(t)=i_RC0,V_R));
and we substitute the time constant tau = RC :
> U_R0:=simplify(subs(R=tau/C,U_R0));
> P_RC2:=plot(subs(U=1,tau=1,U_R0),t=5..10,color=blue):
> display(P_RC1,P_RC2);
The graph shows that the current (and the voltage across the resistor) change directions at the switching times.
As with the RL circuit, we can find the voltage across the interesting device, i.e., the capacitor from Kirchhoff's law, using the fact that the terminal voltage is U for the first 5 time units and 0 for the second 5 time units, and that we set U =1.
> P_RC3:=plot(1-subs(U=1,tau=1,U_R),t=0..5,color=red):
> P_RC4:=plot(0-subs(U=1,tau=1,U_R0),t=5..10,color=blue):
> display(P_RC3,P_RC4);
Note that we find the expected behaviour for the voltage at the capacitor: in the turn-on phase (red) it acquires charge on its plates, while during the turn-off phase it releases this charge. The sign of the voltage across the capacitor stays the same, but the current changes sign as one goes from one phase to the other.
For the inductance L we had the opposite behaviour: the current kept its sign (the graph is identical to the voltage across the capacitor if the same time constant is chosen), but the voltage across the inductance changed sign during the turn-off of the external voltage.
This perfect symmetry between the two devices makes the LC circuit a very interesting object: the two distinct storage mechanisms for electromagnetic energy (the capacitor builds up an electric field between its plates, while the solenoid builds up a magnetic field) allow for a perfect oscillating device. In an ideal setting (no resistance in the solenoid) an initial charge in the capacitor sets off a current through L, thus building a magnetic field as it discharges. Once it discharged, the inductance continues a current in the same direction, thus charging the capacitor in the opposite sense. The analogy to a mechanical harmonic oscillator where a constant total energy oscillates in form between kinetic and potential energy is perfect. In a non-ideal world one cannot avoid dissipation, and thus we consider an RLC circuit, which we show is governed by the differential equation for the damped harmonic oscillator.
RLC circuit
We begin again by stating Kirchhoff's law:
> KL_RLC:=V_R+V_L+V_C=U;
> KL_RLC:=diff(KL_RLC,t);
The analogy of the damped harmonic oscillator goes as follows:
- the position x ( t ) becomes current i ( t );
- the mass m becomes inductance L , i.e., the inductance acts as inertia;
- the friction constant b becomes resistance R , i.e. the resistance acts as a friction term;
- the spring constant k becomes inverse capacitance 1/ C .
We have three elements in series: the capacitor poses no resistance at t =0, since it is uncharged. The solenoid, however, opposes the current, as the magnetic field has to be built up. Thus, the right initial condition for the current is i (0)=0. However, we have a second-order differential equation to solve, and thus we need a second condition. We can use the known solution to the RL circuit, since the capacitance does not impede the current at t =0.
> i0prime:=simplify(subs(t=0,diff(i_RL,t)));
> IC:=i(0)=0,D(i)(0)=i0prime;
> sol_RLC:=dsolve({KL_RLC,IC},i(t));
We recognize in the solution that the constant R / L is responsible for damping, and that ( RC )^2-4 LC acts as a discriminant that determines whether the circuit is in the subcritical, critical, or overcritical damping regimes. Note that for small values of R the discriminant is negative, i.e., the solution involves exponentials with complex arguments, which signals oscillatory behaviour. If we ignore the friction (damping), i.e., go to the limit of R going to zero we recognize that the natural circular frequency of oscillation is given as the inverse of sqrt( LC ) .
We graph one case of a solution, and refer the reader also to the oscillator solutions shown in HOmovie.mws .
The parameters chosen are: U=1Volt, C=1 nanoFarad, R=10 Ohms, L=1 microHenry:
> i_1:=simplify(subs(U=1,C=10^(-9),R=10,L=10^(-6),rhs(sol_RLC)));
At t=0.5 microseconds we have te voltage (just to check that the current is real-valued):
> evalf(subs(t=0.5*10^(-6),i_1));
An during the first microsecond the current looks as follows:
> plot(100*i_1,t=0..10^(-6));
We multiplied the solution by 100 so that point-and-click interface can give us good read-outs from the graph. This is needed below to simulate what one does on an oscilloscope, i.e., to read off the attenuation of the signal from peak to peak.
The reader should check the time constant against the parameter values:
According to the analogy we should have (in the case of small damping):
harmonic oscillator: omega=sqrt( k / m )
electronic oscillator: omega=sqrt(1/ LC )
We calculate for the undamped expected natural frequency:
> omega:=evalf(1/sqrt(10^(-6)*10^(-9)));
The period of oscillation is given as:
> T:=evalf((2*Pi/omega));
This agrees with the result found from the graph.
For the attenuation constant we observe that the solution sol_RLC given above has an exponential damping with a time constant of 2 L / R , and not L / R as observed for the RL circuit.
> tau:=evalf(subs(R=10,L=10^(-6),2*L/R));
Therefore the amplitude drops to half of the original value in the time:
> evalf(ln(2)*tau);
It is, however easier in this case to check whether within a period of oscillation (which happens to agree with the attenuation time constant) the signal drops by a factor of e (Euler's constant). Indeed it does, as the read-out lists:
> 2.56/0.93=evalf(exp(1));
To the accuracy of the readout from the graph the two sides are equal.
The RLC circuit (idealized as the undamped oscillatory LC circuit) has many applications in analogue electronics (radio, TV, etc.). Depending on the value of LC (i.e., the natural frequency 1/sqrt( LC )) one can resonantly excite the circuit with a weak external signal. This is used for signal discrimination: an RLC oscillator picks out of the mixture of radiosignals (received on the antenna) the one that comes in with the frequency that agrees with its natural frequency. This signal can then be amplified without interference from the other radiosignals.
For the resonance oscillator to work one has to ensure that one is in the undercritical damping regime.
>