RCLAB MA226B

MA226B / ODE EXHIBITION

The RC Lab.

Connect a 5 V source to an empty capacitor. One time constant later it reads 3.16 V. What sets that time?

Capacitor voltage slope equals input voltage minus capacitor voltage, divided by resistance times capacitance.

Illustration of a cylindrical capacitor mounted on a circuit board
ENERGY SYSTEMS & BATTERIES5–10 MIN LAB

Introduction

How fast does voltage settle?

A switch can change the input voltage immediately. The capacitor needs time to catch up. How much time, and what happens if you double the resistance?

Flip the switch

Connect a source above the capacitor’s voltage to charge it through the resistor. Remove the source and close the loop through the same resistor, and charge flows off the capacitor. Both runs obey the same equation.

Why battery engineers use RC circuits

After a change in load, a cell’s terminal voltage can keep drifting for a while. An RC branch gives engineers a simple way to model that slow part of the response.

EXPERIMENT

Charge and discharge

Move the time cursor or press Play. Change R or C and watch how the curve shifts.

VOLTAGE RESPONSE

Capacitor voltage VC(t)

Charging Active equilibrium τ

Charging from 0 V toward 5 V. Time constant 2 seconds. Use the time cursor or voltage samples to inspect the graph.

2.00 s
VC at cursor
3.16 V
Equilibrium
5.00 V
VC at τ
3.16 V

After one time constant

At τ = 2.00 s, the capacitor closes 63.2% of its original gap to 5 V.

Capacitor voltage equals 5 volts minus 5 volts times e raised to the negative of time divided by 2 seconds.

Double the resistance

Reset, then change R from 4 to 8 kΩ. The 63.2% point moves from 2 s to 4 s. The final voltage is still 5 V. Turn on Compare modes to see the same rule apply to a falling curve. Each mode keeps its own initial voltage.

View voltage samples
Analytic voltage by time
Time (s)Charging (V)

Mathematical model

From a circuit to an ODE

Take current I to be positive into the capacitor’s positive terminal. In this series circuit, the same signed current passes through the resistor and capacitor.

Apply the circuit laws

Series RC circuit A voltage source at left, a resistor along the top, and a capacitor at right form a closed loop. The reference direction for current is clockwise. The top capacitor terminal is positive. Vin RI C +−
Positive current is defined clockwise, into the upper plate.
  1. Trace the voltage around the loop. By Kirchhoff’s voltage law, the source voltage equals the two voltage drops. Ohm’s law gives the resistor drop RI.

    Input voltage equals resistor voltage drop plus capacitor voltage.

  2. Write current in terms of capacitor voltage. Current is the rate at which charge moves. Use q = CVC with constant C.

    Current equals the rate of change of charge, which equals capacitance times the rate of change of capacitor voltage.

  3. Substitute the current into the loop equation.

    Resistance times capacitance times the rate of change of capacitor voltage, plus capacitor voltage, equals input voltage.

In standard first-order form, y is the capacitor voltage, x is the applied voltage, and τ = RC is the time constant in seconds.

Tau times the rate of change of y, plus y, equals x of t.

Variables and assumptions

t, VC(t), I(t)
Time (s), capacitor voltage (V), and signed current (A).
R > 0, C > 0
Constant resistance (Ω) and capacitance (F). A kilohm times a microfarad is one millisecond.
Vin(t), V0
Applied voltage and initial capacitor voltage, with VC(0) = V0.

The resistor, capacitor, source, and switch are ideal. Wires add no resistance, the capacitor has no leakage, and each run uses one constant input. The discharging switch removes the source and closes the resistor path, which sets the loop input to 0 V.

Analysis

The gap shrinks exponentially

Hold the input at a constant V*. At VC = V*, the slope is zero. This is the equilibrium.

Solve for the voltage

Let u = VC − V* be the voltage gap. The circuit equation gives

The rate of change of the voltage gap is minus the gap divided by tau.

Multiply by the integrating factor e raised to t divided by tau. The product rule gives

The derivative of the integrating factor e to the power of t over tau times u is zero.

The product stays equal to its starting value, V0 − V*. Solve for VC.

Capacitor voltage at time t equals the equilibrium voltage plus the initial gap times e raised to minus t divided by tau.

For every initial voltage the gap shrinks to zero because τ is positive. The equilibrium is globally exponentially stable.

From 0 V to 5 V

With a 4 kΩ resistor and a 500 µF capacitor, τ = 2 s. The capacitor starts 5 V below the source, so its initial slope is 2.5 volts per second.

The starting slope is 5 volts minus 0 volts, divided by 2 seconds, or 2.5 volts per second.

The slope gets smaller as the gap closes. After 2 s the capacitor has covered 63.2% of the rise.

The capacitor voltage at 2 seconds is 5 volts times one minus e to the minus one, or about 3.16 volts.

Discharge from 5 V with the same parts and the voltage falls to 1.84 V after 2 s. Both runs have 36.8% of their initial gap left.

Separate speed from current

Try 4 kΩ with 500 µF, then 2 kΩ with 1,000 µF. Both circuits have τ = 2 s, so the voltage curves overlap if the source and starting voltage are the same.

Initial current equals 5 volts minus initial voltage, divided by resistance.

For a 5 V step from 0 V, the two initial currents are 1.25 mA and 2.50 mA. A changing voltage trace gives you the product RC. The initial current lets you find R separately.

DESIGN CHALLENGE

Hit the 4.60 s mark.

Design a circuit that reaches 4.50 V after 4.60 seconds from an initial 0 V and a 5 V source. Choose a resistor and capacitor, then check your prediction.

Show a mathematical hint

When the capacitor reaches 4.50 V, 10% of the original 5 V gap remains.

E raised to the power of minus time over tau equals zero point one. Therefore, the time to reach 90 percent equals tau times the natural log of 10.

Look for two component pairs with the same RC.

Choose your components

Match 4.60 s within ±0.10 s. Then try a second design.

Conclusion

What the model can predict

The constant input sets the endpoint, the initial voltage sets the starting gap, and RC sets how quickly that gap closes. That makes the equation a way to choose components for a desired settling time.

Voltage, stored energy, and SOC

In the circuit, energy depends on the square of the capacitor voltage.

Capacitor energy equals one half times capacitance times capacitor voltage squared.

During discharge through the resistor, voltage falls as e raised to minus t over tau. Stored energy falls as e raised to minus two t over tau.

For a lithium-ion cell, state of charge z is the fraction of the charge capacity Q that remains. Under ideal coulomb counting, with Iout positive during discharge,

The change in state of charge per second equals negative discharge current divided by the total charge capacity.

A battery equivalent circuit can use an RC branch to describe transient voltage while tracking state of charge separately.

What the load and charger control

A 10 W load takes 60 J in 6 s. In an ideal lossless battery, the stored energy falls at a constant rate while the load runs.

At fixed power P, the battery current is power divided by terminal voltage. As terminal voltage falls, current must rise to maintain the same power. That current and the battery’s charge capacity determine the SOC.

A typical lithium-ion charge starts with constant current. Once the terminal voltage reaches its set limit, the charger holds the voltage steady and the current tapers.

Test with cell data

After a measured current pulse, fit one exponential to a cell’s rest-voltage trace. Compare the residuals against a fit with two time constants. Repeat at different SOC and temperatures to test when a single RC branch gives a useful approximation.

OpenStax on RC circuits · Experimental study of lithium-ion equivalent circuits · NASA on lithium-ion charging

MA226B · ODE EXHIBITION

Project team

  • Charles
  • Qixuan
  • Harlan
  • Ismail