Build mathematical modelsLesson 40 of 48 · 9 min

Derive a charging response

Solve a forced linear ODE and interpret its time constant and limiting value.

Maths refresher: Approaching an equilibrium

A stable first-order response can approach a target exponentially. A time constant is the time scale in the exponential’s denominator.

RC v′(t)+v(t)=V,v(t)=V(1−e−t/(RC))RC\,v\prime(t)+v(t)=V,\qquad v(t)=V\left(1-e^{-t/(RC)}\right)
Worked example

At t=0t=0 the voltage is 0. At t=RCt=RC it reaches V(1−e−1)V(1-e^{-1}), about 63.2% of the final value.

Maths prerequisite map ↗

An RC charging model balances the input voltage with the capacitor voltage and a derivative term. Under an ideal constant-voltage input, RCRC sets the characteristic time scale. The zero initial voltage supplies the starting condition.

See the mathematics
01.252.53.755-0.050.250.550.851.15u = t / RCv / V
01.252.53.755-0.050.250.550.851.15u = t / RCv / V
v(t)V=1−e−u,u=tRC\frac{v(t)}V=1-e^{-u},\quad u=\frac{t}{RC}
Starter reference. A normalised ideal charging curve. At one time constant, it reaches about 63% of the final voltage.

Represent the unknown voltage as a function of time and solve the first-order ODE. Positive resistance and capacitance support the expected stable response. Check the solution against the equation, its initial value and its long-time limit.

This is an idealised model with authored symbolic parameters, not an electrical measurement. Real components have tolerances, nonideal behaviour and operating limits. A symbolic solution is useful because it exposes which parameter combinations govern the response, while leaving validation of the circuit model as a separate task.

Will the ideal long-time capacitor voltage depend on R if V is held fixed?

Write a prediction (optional)

Exact solution of an idealised circuit model

Select Run Python with the code unchanged.

Tools
About Python

Python and the course packages can load while you read. Each run starts with fresh user variables; imported modules stay loaded. Stop replaces the worker. Runtime details ↗

Ctrl+Enter or ⌘+Enter runs Python.

Compare with the worked example

Executed from the published Python during the site build. Your own run appears above. Build environment ↗

Charging response
v(t)=V−Ve−tCRv{\left(t \right)} = V - V e^{- \frac{t}{C R}}
Time constant
CRC R
Initial voltage
00
ODE check
(True, 0)\left( \text{True}, \ 0\right)
Long-time voltage
VV
Fraction at one time constant
1−e−11 - e^{-1}
Worked text output
Charging response: Eq(v(t), V - V*exp(-t/(C*R)))
Time constant: C*R
Initial voltage: 0
ODE check: (True, 0)
Long-time voltage: V
Fraction at one time constant: 1 - exp(-1)

Read the starter result

Read Time constant and Long-time voltage separately. RCRC sets the time scale. V is the ideal long-time voltage. Initial voltage verifies the condition at time zero.

Edit and compare

Replace initial = 0 with initial = V/4. Select Run Python. Read Initial voltage and compare Charging response and Long-time voltage with the first run. Which part of the solution changed?

Return to the editor

Scope. This ideal lumped circuit excludes tolerances, parasitics, nonlinear components and any safety or hardware design assessment.

Try a fresh case

What does increasing R with C fixed change in the ideal model?

Choose an answer
Need a hint?
Hint 1

Inspect the exponential denominator.

Hint 2

Keep the input definition separate from the system parameters.

Your notesNotes save in this browser when storage is available.