Engineering Math - Differential Equation

 

 

 

Electric Circuit

 

This pages will give you some examples modeling the most fundamental electrical component and a few very basic circuits made of those component. The component and circuit itself is what you are already familiar with from the physics class in high school. So I don't explain much about the theory for the circuits in this page and I don't think you need much additional information about the differential equation either. I am just gathering all of these examples in this single page just for a kind of cheatsheet for you and for myself.

Followings are the components and circuits that will be modeled in this page.

Example : C

The voltage across a capacitor is described as shown below. Since most of the governing equation for electrical component is described in terms of Voltage, I would describe the circuit so as to calculate the voltage across the component. But in some cases you would need to describe the circuit so as to calculate the current or charges. In that case you would need to modify the equation to give you the right form of equation.

 

Capacitor voltage, charge and current relations

 

Now let's assume that we have a very simple circuit with a Voltage source and a capacitor. It can be described as below.

 

Kirchhoff voltage law statement

 

Voltage source connected to a capacitor

 

Kirchhoff voltage law applied to the capacitor circuit

One detail in the capacitor diagram above needs a correction. The last line writes Q = ∫i dt + Vc(0), which adds a voltage to a charge. The initial term must be a charge too, Q(0) = C Vc(0). In voltage form, Vc = (1/C)∫i dt + Vc(0), which is the form the R,C series example below uses.

This first circuit gives an algebraic result, V = Vc, rather than a differential equation for the voltage. An ideal voltage source forces the capacitor voltage directly. The differential equation shows up in the current instead, i = C dV/dt, so the source must deliver a current spike whenever V jumps. Real circuits always have some resistance, and the R,C series example adds it.

  • A capacitor integrates current : Vc = (1/C)∫i dt + Vc(0). Equivalently, i = C dVc/dt.
  • The capacitor voltage cannot jump : A jump in Vc would need an infinite current, so Vc is continuous in any circuit with finite current.
  • A capacitor stores energy in its electric field : The stored energy is (1/2)CVc2.

Example : L

The voltage across an inductor is described as shown below. Since most of the governing equation for electrical component is described in terms of Voltage, I would describe the circuit so as to calculate the voltage across the component. But in some cases you would need to describe the circuit so as to calculate the current or charges. In that case you would need to modify the equation to give you the right form of equation.

 

Inductor voltage V = L di/dt

 

Now let's assume that we have a very simple circuit with a Voltage source and an inductor. It can be described as below.

 

Kirchhoff voltage law statement

 

Voltage source connected to an inductor

 

 

Kirchhoff voltage law applied to the inductor circuit

This circuit does give a differential equation, L di/dt = V. Integrating it gives i(t) = i(0) + (1/L)∫V dt. With a constant source voltage V, the current ramps up linearly, i(t) = i(0) + Vt/L, and never settles. An ideal inductor has no resistance to limit the current, which is why the R,L series example below adds a resistor.

  • An inductor differentiates current : VL = L di/dt, so the voltage appears only while the current changes.
  • The inductor current cannot jump : A jump in i would need an infinite voltage, so i is continuous in any circuit with finite voltage.
  • An inductor stores energy in its magnetic field : The stored energy is (1/2)Li2.

Example : R,C - Series

Now let's expand the circuit a little bit further. In this example, We have two components R and C connected in Series and a voltage source to those components as shown below.

The governing equation is also based on Kirchhoff's law as described below.

 

Kirchhoff voltage law statement

 

The voltage across the resistor and capacitor can be described as shown below. Since most of the governing equation for electrical component is described in terms of Voltage, I would describe the circuit so as to calculate the voltage across the component. But in some cases you would need to describe the circuit so as to calculate the current or charges. In that case you would need to modify the equation to give you the right form of equation.

 

Series R,C circuit with its component voltages

 

Applying the Kirchhoff's voltage rule, you can combine all the terms shown above into a single equation as shown below. All of these equations mean same thing. In terms of differential equation, the last one is most common form but depending on situation you may use other forms.

 

Differential equation of the series R,C circuit

Let's solve the most common case. A constant voltage V is switched onto an uncharged capacitor at t = 0. With q as the unknown, the equation R dq/dt + q/C = V has the solution q(t) = CV(1 - e-t/RC). So the capacitor voltage is Vc = V(1 - e-t/RC), and the current is i = (V/R)e-t/RC. The product RC is the time constant. After one RC the capacitor reaches about 63 percent of V, and after five RC it reaches about 99.3 percent. In the last form of the diagram, a constant V makes dV/dt = 0, so the current decays with the same time constant.

  • The R,C series circuit is first order : It has one energy storage element, so one initial value, Vc(0), fixes the solution.
  • RC sets the speed of charging : A larger resistor or a larger capacitor makes the circuit slower.
  • The current is largest at the start : At t = 0 the capacitor voltage is 0, so the whole source voltage drops across R and the current is V/R.

Example : R,L - Series

Now We have two components R and L connected in Series and a voltage source to those components as shown below. This circuit is the magnetic counterpart of the R,C series circuit. It also has one energy storage element, so it also leads to a first-order equation.

The governing equation is also based on Kirchhoff's law as described below.

 

Kirchhoff voltage law statement

 

The voltage across the resistor and inductor can be described as shown below. Since most of the governing equation for electrical component is described in terms of Voltage, I would describe the circuit so as to calculate the voltage across the component. But in some cases you would need to describe the circuit so as to calculate the current or charges. In that case you would need to modify the equation to give you the right form of equation.

 

Series R,L circuit with its component voltages

 

Applying the Kirchhoff's voltage rule, you can combine all the terms shown above into a single equation as shown below. All of these equations mean same thing. In terms of differential equation, the last one is most common form but depending on situation you may use other forms.

 

Differential equation of the series R,L circuit

Note that the third line, L di/dt + Ri = V, is already a first-order differential equation in i. The differentiated last line is second order and needs one more initial value, so it is useful mainly when V changes with time. For a constant V switched on at t = 0 with no initial current, the solution is i(t) = (V/R)(1 - e-Rt/L). The current rises toward V/R with the time constant L/R, and the inductor voltage VL = Ve-Rt/L decays to zero.

  • L/R is the time constant of the R,L circuit : A larger inductance or a smaller resistance makes the current rise more slowly.
  • The final current is set by R alone : In the steady state di/dt = 0, the inductor acts as a short circuit and i = V/R.
  • R,C and R,L behave in mirror image : In the R,C circuit the voltage builds up and the current decays. In the R,L circuit the current builds up and the inductor voltage decays.

Example : R,C - Parallel

This example is also a circuit made up of R and C, but they are connected in parallel in this example. The governing law of this circuit can be described as shown below.

 

Kirchhoff current law applied to a parallel R,C circuit

 

The current through the resistor and capacitor can be described as shown below. Unlike other examples, the governing equation in this example is described in terms of current. The current flowing through each components in the circuit are as shown below.

 

Parallel R,C circuit driven by a current source

 

Applying the governing law for this circuit and with a little bit of rearrangement a differential equation is obtained as follows.

 

Differential equation of the parallel R,C circuit

The last line is a first-order equation for the node voltage, dVs/dt + Vs/(RC) = is/C. Because R and C sit in parallel, they share the same voltage, VR = VC = Vs, which is the step from the third line to the fourth. For a constant source current switched on at t = 0 with an uncharged capacitor, the solution is Vs(t) = Ris(1 - e-t/RC). The time constant is RC again, the same as in the R,C series circuit.

  • Parallel circuits use the current law : Kirchhoff's current law at a node plays the role that the voltage law plays in a series loop.
  • A current source drives the parallel R,C circuit : The capacitor first takes all of is. In the steady state it takes none, and the voltage settles at Ris.
  • Series R,C with a voltage source and parallel R,C with a current source are duals : Both give a first-order equation with the time constant RC.

Example : R,L,C Series

This example shows a circuit that combines R, L, C in series and the governing equation is based on Kirchhoff's voltage law. With two energy storage elements, L and C, this circuit leads to a second-order equation, and it can oscillate.

 

Series R,L,C circuit with its voltage drops

 

Apllying the governing equation and by some rearrangement, you can derive the differential equation for this system as follows. Depending on which parameter you set it to be the state variable (the paramter to be measured as the output of the system), you can have two different form of the differential equation as shown below. Even though both forms of equation is used in various system modeling, I think the form on the left side would be more frequently used since the variable i (current) can be more easily measured than the variable q (amount of charges).

In many cases, the term V is used in stead of E. So replacing E with V may give you the form which you are more familiar with.

 

Two forms of the series R,L,C differential equation, in current and in charge

Compare the right-hand form with the damped, forced spring mass model, m d2x/dt2 + c dx/dt + kx = F. The two equations have the same shape. The inductance L plays the role of the mass, and the resistance R plays the role of the damper. The term 1/C plays the role of the spring constant, and the source voltage E plays the role of the external force. So everything known about the spring mass model carries over. The natural angular frequency is ω0 = 1/sqrt(LC), and the damping ratio is ζ = (R/2) sqrt(C/L). The circuit oscillates when R < 2 sqrt(L/C), and it is critically damped when R = 2 sqrt(L/C).

  • The R,L,C series circuit is second order : Two energy storage elements need two initial values, for example q(0) and i(0).
  • The circuit is the electrical twin of the spring mass model : L corresponds to m, R to c, 1/C to k, q to x and E to F.
  • Resonance happens near 1/sqrt(LC) : With a sinusoidal source, the current amplitude is largest at ω = 1/sqrt(LC), where the inductor and capacitor reactances cancel.