GLOBAL KNOWLEDGE ARK

Electronics · Energy storage and changing circuits

Derive and check a time-dependent circuit model

A response curve becomes more useful when you can explain the balance that produces its slope. This lesson builds one RC equation from current and voltage, tests a proposed solution, and shows how a large numerical step can imitate oscillation even when the exact circuit model is monotonic.

Lesson preparation and course links

Use the stored-energy and first-order transient introductions. You need Ohm’s law, capacitor current, unit conversion and graph reading. Instantaneous slope, the local exponential derivative and forward Euler are explained here. Hardware, programming and a whole prior calculus course are not required.

Back to the Electronics chapter

After reading, you can

Derive a first-order initial-value model from circuit balance, check its solution and dimensions, and compare forward-Euler calculations at the same physical time. Distinguish an equation, its initial state and a numerical approximation.

01

Turn the circuit balance into a slope

Use an ideal 5.00 V source, a 2.00 kΩ resistor from the source to node N, and a 5.00 µF ideal capacitor from N to reference N0. There is no additional load branch in this declared model. Let v(t) be N relative to N0 and let positive current enter the capacitor’s positive terminal. At the connection time t=0, the capacitor is already at 1.00 V.

The resistor current is i=(5−v)/R. The ideal capacitor relation is i=C dv/dt. The symbol dv/dt means the instantaneous voltage slope, measured in volts per second; it is the limit of voltage change divided by elapsed time. Equal currents give (5−v)/R=C dv/dt, or RC dv/dt+v=5.

Solve for the slope: dv/dt=(5−v)/(RC). With R=2000 Ω and C=5×10⁻⁶ F, the product RC is 0.0100 s, or 10.0 ms. Call this timescale τ. The equation is dv/dt=(5−v)/τ. A state far below 5 V has a larger positive slope; as it approaches 5 V, that slope decreases.

One stored state and a circuit balanceA 5 V ideal source feeds a 2 kΩ resistor to N. A 5 microfarad capacitor connects N to N0. Capacitor voltage starts at 1 V; current enters its positive plate.RC initial-value modelR = 2.00 kΩi →N: v(t)+−Vs = 5 VC = 5.00 µF+−N0: reference; v(0) = 1.00 V
An ideal 5 V source feeds a 2 kΩ resistor and a 5 µF capacitor in one series path. Output v is across the capacitor relative to N0, with current entering its positive plate. At the declared connection, v(0)=1 V. The resulting source/resistor current is 2 mA, not an independently chosen zero.
02

Supply the initial state and check the units

An equation describing a slope needs an initial value to choose one trajectory. Here the initial-value problem is dv/dt=(5−v)/0.0100 with v(0)=1.00 V and time in seconds. The previous charging history is outside the model; its relevant stored state at this connection is declared explicitly.

The initial resistor drop is 5.00−1.00=4.00 V, so i(0+)=4/2000=2.00 mA. Initial slope is i/C=0.002/(5×10⁻⁶)=400 V/s. The current is fixed by the source, resistor and capacitor state; it is not another independent initial condition that can also be set arbitrarily to zero.

Check dimensions before calculating a curve. Ω×F=(V/A)×(A·s/V)=s, so RC has units of time. Then RC(dv/dt) has units V, matching v and the source voltage. The exponential argument t/τ used below is a ratio of times and is dimensionless.

With a finite resistor and finite source voltage, current remains finite at connection, so this ideal capacitor’s voltage stays continuous. Its slope can change when the source changes. A voltage jump would require a different idealization, such as an impulse current, rather than the model stated here.

03

Check a candidate solution by substitution

A candidate solution is v(t)=5+(v0−5)e^(−t/τ). For v0=1 V this becomes v(t)=5−4e^(−t/τ). The local derivative rule is d[e^(−t/τ)]/dt=−e^(−t/τ)/τ, so dv/dt=(4/τ)e^(−t/τ). Substituting into τ dv/dt+v gives 4e^(−t/τ)+5−4e^(−t/τ)=5, as required.

Check the state and the long-time limit too. At t=0, e⁰=1 and v=1 V. At one time constant, t=10.0 ms, v=5−4/e≈3.528482 V. As t grows, the exponential tends to zero and v tends to 5 V, while resistor current tends to zero.

For this initial value, the derivative is positive for every finite t≥0. The exact ideal RC response therefore rises monotonically from 1 V toward 5 V and does not overshoot. This conclusion follows from the declared one-state equation and initial value. It is not a rule for every physical circuit that happens to contain a resistor and capacitor.

04

Use one tangent step before repeating it

Forward Euler estimates the next voltage using the slope at the start of a time interval: v[n+1]=v[n]+h(5−v[n])/τ. Here h is the step duration in seconds. Multiplying a V/s slope by seconds gives the predicted voltage change. The calculation is a numerical approximation to the equation, not a new component law.

For a first step h=2.00 ms, the initial slope is 400 V/s. The estimate is v[1]=1.00+(0.00200)(400)=1.80 V at 2.00 ms. The exact value is 5−4e^(−0.2)≈1.725077 V. Euler is high because it keeps the initial larger positive slope for the whole interval while the exact slope is already decreasing.

Repeat the same update using each newly calculated voltage. With h=2.00 ms, the next values at 4, 6, 8 and 10 ms are 2.44, 2.952, 3.3616 and 3.68928 V. Each step uses a recalculated slope. Simply adding the first 0.80 V increment repeatedly would use the wrong slope rule.

05

Compare refinements at the same elapsed time

To check numerical convergence, hold source, R, C and the initial state fixed. Compare smaller steps at the same physical time, here 10.0 ms. Five 2 ms steps and ten 1 ms steps reach the same time. Comparing their fifth steps would instead compare 10 ms with 5 ms and mix the time question with the accuracy question.

The exact value at 10 ms is approximately 3.528482235 V. The supplied table is a directly calculated Euler refinement sequence. Its absolute error decreases as h is halved. The first two error ratios are approximately 2.094 and 2.044, approaching the factor of two expected for this first-order method as h becomes small for the smooth scalar problem.

For example, choose an educational target of absolute error below 10 mV at 10 ms. The 0.125 ms calculation has approximately 9.245 mV error there and meets that single-point target. This is a qualification of the stated arithmetic at that time, not a complete trajectory-error bound, a SPICE result or a physical measurement-accuracy claim.

Original Euler calculations at the same 10.0 ms time; exact model value≈3.528482235 V
Step hStepsCalculated voltageAbsolute error
2.00 ms53.689280 V≈0.160798 V
1.00 ms10≈3.605286 V≈0.076804 V
0.500 ms20≈3.566056 V≈0.037574 V
0.250 ms40≈3.547070 V≈0.018588 V
0.125 ms80≈3.537727 V≈0.009245 V
06

Separate numerical stability from physical ringing

Subtract the equilibrium value 5 V from the Euler update: v[n+1]−5=(1−h/τ)(v[n]−5). The multiplier q=1−h/τ acts on the computed deviation from equilibrium. When 0<h<2τ, its magnitude is less than one, so that discrete deviation decays. For 0<h≤τ, the approach from this initial value is non-oscillatory; for τ<h<2τ, the sign alternates while its magnitude shrinks.

With h=15 ms and τ=10 ms, q=−0.5. The computed voltages are 1, 7, 4, 5.5 and 4.75 V at 0, 15, 30, 45 and 60 ms. The calculation alternates around 5 V even though the exact declared RC solution is monotonic. Do not infer an inductor or actual ringing from that numerical pattern.

At h=20 ms, q=−1 and the values alternate 1, 9, 1, 9 V without decay. At h=25 ms, q=−1.5 and the deviations grow. The strict 0<h<20 ms decay condition is specific to forward Euler on this equation. It is not a universal timestep limit for adaptive SPICE methods or other systems.

Numerical stability is also weaker than numerical accuracy. At h=τ=10 ms, q=0 and Euler jumps to exactly 5 V in one step, yet the correct voltage at that time is only approximately 3.528482 V. A decaying or monotonic numerical sequence can still badly approximate the intended transient.

A coarse numerical step can imitate ringingThe exact 5 V RC model rises monotonically from 1 V with a 10 ms time constant. Forward Euler with 15 ms steps gives 1, 7, 4, 5.5, 4.75 V at 0, 15, 30, 45, 60 ms. The 2 ms Euler calculation is closer. These are mathematical calculations, not measured or SPICE traces. image/svg+xml Ark analytical plotting with Matplotlib 0 10 20 30 40 50 60 Elapsed time (ms) 0 1 2 3 4 5 6 7 8 Capacitor voltage (V) Large Euler steps alternate; the exact model stays monotonic. One RC equation, two forward-Euler step sizes Vs = 5 V; R = 2 kΩ; C = 5 µF; v(0) = 1 V Exact continuous RC model Forward Euler: 2 ms steps Forward Euler: 15 ms steps Original mathematical calculations • not SPICE output or hardware measurements
The exact response of the declared RC model rises monotonically from 1 V toward 5 V with 10 ms time constant. Forward Euler with 15 ms steps gives 1, 7, 4, 5.5, 4.75 V at 0, 15, 30, 45, 60 ms and alternates around 5 V. A 2 ms calculation is closer. These are original mathematical calculations, not captured or SPICE traces.
07

Carry the state across a later switching instant

As a separate mathematical extension, keep R and C but change the ideal source from 5 V to 2 V at T=10 ms. Just before the change, the exact capacitor voltage is approximately 3.528482 V. Finite current preserves that same voltage immediately after the change; it does not reset to the new source voltage or to the original 1 V.

For t≥T, use local elapsed time t−T and the inherited state: v(t)=2+[v(T)−2]e^(−(t−T)/τ). The voltage now approaches 2 V from above. Immediately before the source change, current is approximately +0.735759 mA; immediately after, it is approximately −0.764241 mA. A finite current jump and slope change are compatible with a continuous capacitor voltage in this resistive-feed model.

The ideal source in that extension may absorb current. A physical source that cannot sink current, or a source with a clamp, would require a different model before the mathematical record could be used as a hardware prediction. No switching or precharging procedure is required to complete the activity.

08

Use independent checks to decide what a result means

A useful model check combines dimensions, the initial value, the governing balance, initial slope, long-time behaviour and numerical refinement at fixed times. A curve that looks smooth is only one piece of evidence. A refined numerical result can still solve the wrong equation if a load, leakage path or source behaviour was omitted.

The schematic, exact formula, Euler table and chart here describe one declared ideal model. The numerical values were calculated; they are not circuit-simulator output or measured traces. Real capacitor leakage, ESR, voltage-dependent capacitance, instrument inputs and additional state variables may change the equation. Identify those changes rather than using a numerical step adjustment to hide a model discrepancy.

Reject a false ringing diagnosis using the equation and a refinement

A supplied calculation begins at 1 V and gives 7 V after a 15 ms Euler step, then 4 V after the next. Someone calls the changing sign of its deviation “RC ringing.” Check the model first: dv/dt=(5−v)/0.0100 has the exact monotonic solution 5−4e^(−t/0.0100) for the stated initial condition.

The numerical update has q=1−15/10=−0.5, explaining the alternating deviation directly. At 15 ms the exact voltage is 5−4e^(−1.5)≈4.107479 V, not 7 V. The large step has created a numerical artifact, not evidence of an observed physical oscillation.

Refine h with all model conditions fixed, then compare at common elapsed times. The separate 10 ms table shows the error falling from approximately 160.798 mV at h=2 ms to 9.245 mV at h=0.125 ms. This supports the numerical-convergence explanation for the declared calculation.

Finish with a bounded conclusion: this coarse forward-Euler sequence is not a faithful transient for the stated RC initial-value problem. A real trace with oscillation would call for checking both the actual circuit/measurement arrangement and the model, rather than assuming the same numerical explanation.

Try the reasoning

  1. Derive the first-order equation from resistor current and capacitor current, and state its initial value.

    Show the answer and reasoning

    (5−v)/R=C dv/dt gives RC dv/dt+v=5 or dv/dt=(5−v)/τ, with τ=RC=10.0 ms and v(0)=1.00 V. The source, resistor, capacitance, reference and initial state belong to the problem statement.

  2. Find the initial current and slope. Can this same model independently require i(0+)=0?

    Show the answer and reasoning

    Current is (5−1)/2000=2.00 mA and slope is i/C=400 V/s. Setting current to zero while retaining those source/resistor/state values would contradict the balance. Capacitor voltage is the independent stored state here.

  3. How does v(t)=5−4e^(−t/τ) pass the equation, initial-value and long-time checks?

    Show the answer and reasoning

    Its derivative is (4/τ)e^(−t/τ), so τ dv/dt+v=5. At t=0 it is 1 V; at long times it approaches 5 V. Its positive derivative also establishes monotonic rise for this declared case.

  4. Calculate one 2 ms Euler step and explain its difference from the exact 2 ms result.

    Show the answer and reasoning

    Euler gives 1+(0.002)(400)=1.80 V. Exact voltage is approximately 1.725077 V. The starting slope is positive and decreases through the interval, so holding its initial value over the whole step overestimates the rise.

  5. Why compare five 2 ms steps with ten 1 ms steps rather than the fifth step of each calculation?

    Show the answer and reasoning

    Both chosen endpoints are at 10 ms. Comparing fifth steps would compare 10 ms with 5 ms, changing the elapsed time as well as the numerical step. A convergence check must hold the intended physical time and model fixed.

  6. The 15 ms calculation alternates around 5 V with shrinking excursions. Does numerical decay prove an accurate physical response?

    Show the answer and reasoning

    No. q=−0.5 makes this Euler sequence alternate and decay, while the exact model is monotonic. Stability of the discrete deviation does not establish transient accuracy or actual circuit ringing.

  7. State the decay bound for this forward-Euler recurrence and explain why h=10 ms can still be inaccurate.

    Show the answer and reasoning

    The computed deviation decays for 0<h<2τ=20 ms. At h=10 ms, q=0 and the first computed value is 5 V, whereas the exact value at 10 ms is approximately 3.528482 V. A stable step can have a large transient error.

  8. After the source changes to 2 V at 10 ms, what initial state belongs to the new interval?

    Show the answer and reasoning

    Inherit the continuous v(T)≈3.528482 V and use v(t)=2+[v(T)−2]e^(−(t−T)/τ). Do not reset capacitor voltage. Current changes from approximately +0.735759 mA to −0.764241 mA because the finite resistor drop changes.

  9. What does meeting the 10 mV error target with a 0.125 ms step establish?

    Show the answer and reasoning

    It establishes the stated Euler calculation’s accuracy at the selected 10 ms point for this exact ideal model. It is not a bound for every time, a different solver or physical hardware, and it is not a measured result.

What to carry forward

Build the equation from a balance, state the stored initial value and check units before drawing a curve. Test the solution at the start and at long times, refine numerics at common times, and distinguish a stable numerical sequence from an accurate model of physical behaviour.

References

Sources supporting this lesson’s explanations and examples.

  1. University Physics Volume 2, 10.5: RC CircuitsSamuel J. Ling, Jeff Sanny and William Moebs; OpenStax/Rice UniversityTextbook chapteropenstax.orgRead source
  2. Forward and Backward Euler MethodsMassachusetts Institute of Technology, 10.001 course notesCourse notesweb.mit.eduRead source