Lemonergy Wiki

Sources and references

MathWorks: Solve Differential Equations of RLC Circuit Using Laplace Transform

The retained campaign contract records the circuit inputs and published current/charge expressions. Campaign source notes record a September 30, 2026 check. Lemonergy implements a connected numerical equation graph; it does not invoke a symbolic Laplace solver.

Document created Updated
Bibliographic reference · contents not reviewedSource record reviewed

Read the circuit as a numerical reference

This reference describes a driven circuit with three resistors, an inductor and a capacitor. Its specified component values and initial states determine both the decaying transient and the continuing sinusoidal response. Lemonergy's current and charge example expresses the same differential equations as connected Gain, Sum and Integrator blocks.

The attributed source is MathWorks, Solve Differential Equations of RLC Circuit Using Laplace Transform. The retained contract identifies the “Declare Equations” and “Substitute Values” portions of that workflow. It contains transcribed mathematical parameters and analytical expressions, not a vendor model, measured circuit data or digitized plot.

Retained circuit parameters

In the table, S1 links to the campaign containing the downloadable reference contract. Its rlc.source.parameters and rlc.source.equations fields preserve these values. Component values remain constant, and the current directions follow the retained equations.

QuantitySymbolValueUnitConditions and useBasis
First resistanceR14ΩCurrent damping coefficientRetained input · S1
Second resistanceR22ΩCouples current and charge-rate equationsRetained input · S1
Third resistanceR33ΩCharge-rate denominator with R2Retained input · S1
InductanceL1.6HCurrent-rate coefficientsRetained input · S1
CapacitanceC0.25FCharge-to-voltage relationRetained input · S1
Initial inductor currentI1(0)2AState at t = 0 sRetained initial condition · S1
Initial capacitor chargeQ(0)2CState at t = 0 sRetained initial condition · S1
Voltage amplitudeE01VPrescribed sinusoidal sourceRetained input · S1
Angular frequencyω1rad/sE(t) = E0 sin(ωt); time measured in secondsRetained source equation · S1

The equations are:

dQ/dt = [E − Q/C + R2 I1] / (R2 + R3)
dI1/dt = (R2/L) dQ/dt − [(R1 + R2)/L] I1

Here Q is charge in coulombs, while C is capacitance in farads. Negative values of current or charge can follow from the chosen directions and oscillating source; their sign alone does not indicate a failed calculation.

What the Lemonergy comparison adds

The reference contract retains the published closed-form expressions for current and charge. Lemonergy evaluates those expressions at the native solver's output times and compares the full traces. Two additional integrators generate the sine input numerically, so source-voltage accuracy is checked independently as well.

QuantitySymbolValueUnitConditions and useBasis
Comparison intervalt0–25sUnion of the source's 0–15 s and 2–25 s plot intervalsAuthored comparison window · S1
Current error limitεI0.0000001AMaximum absolute error at all retained native timesInternal numerical gate · S1
Charge error limitεQ0.0000001CMaximum absolute error at all retained native timesInternal numerical gate · S1
Source-voltage error limitεE0.0000001VNumerical oscillator compared with the specified sineInternal numerical gate · S1

These limits test implementation consistency, not component tolerances or measurement uncertainty. There is no parameter fitting or measured holdout. The graph currently uses dimensionless block ports with a documented SI mapping: a current value of 1 means 1 A, charge 1 means 1 C, and voltage 1 means 1 V. The tutorial explains the coefficients and this dimensional limitation.

Lemonergy solves the connected equations numerically; it does not invoke a symbolic Laplace-transform solver. Follow the worked example for the complete model, application pictures, expected checkpoints and instructions for a fresh Rust/WebAssembly run.

Publication date and retained provenance

The publication date is unknown. The frozen contract and campaign notes record retrieval/checking on 30 September 2026. The wiki's record-review date refers to local bibliographic work and does not assert another visit to the live source.

No full source-page copy is retained, and the external application was not executed for this comparison. Documentation URLs can change; use the frozen equations and parameters when reproducing the result. Numerical agreement for this problem does not establish hardware accuracy or general equivalence between software products.

Reference details

Reference type
article
Publisher
MathWorks

Open the original source