RLC Circuit Driven by Periodic Signal and White Noise
RLC Circuit Driven by Periodic Signal and White Noise
Consider an electrical circuit consisting of a resistor, inductor, and capacitor connected in series. The circuit is under external voltage, which is a superposition of a periodic signal and a white noise.
CapacitorChargeModel = ItoProcess[{
ⅆ𝒬[t] == ℐ[t]ⅆt,
ℒ ⅆℐ[t] + ℛ ℐ[t]ⅆt + (1/𝒞)𝒬[t]ⅆt == Sin[ω t]ⅆt + σ ⅆw[t]}, 𝒬[t], {{ℐ, 𝒬}, {0, 0}}, t, wWienerProcess[]]params = {ℒ -> 2, 𝒞 -> 2, ℛ -> 1 / 2, ω -> 3 / 2, σ -> 1 / 4};Compute the mean function, i.e. the mean value of the charge of the capacitor as a function of time:
mqf = Simplify[Mean[CapacitorChargeModel[t] /. params]]detq = (Q[t] /. First[DSolve[ℒ Q''[t] + ℛ Q'[t] + Q[t] / 𝒞 == Sin[ω t]∧Q[0] == 0 && Q'[0] == 0 /. params, Q[t], t]]);Simplify[detq == mqf]vf = Simplify[Variance[CapacitorChargeModel[t] /. params]]path = RandomFunction[CapacitorChargeModel /. params, {0., 22., 0.002}, 12, Method -> "KloedenPlatenSchurz"]pls = ListLinePlot[path, PlotRange -> All, ImageSize -> 400]epl = With[{q = Quantile[NormalDistribution[], ((1 + .95)/2)]}, Plot[{mqf - qSqrt[vf], mqf, mqf + qSqrt[vf]} /. params//Evaluate, {t, 0, 22}, PlotRange -> All, PlotStyle -> Directive[Thick, Cyan], FillingStyle -> Directive[Lighter[Blue, .6], Opacity[.15]], Filling -> {1 -> {3}}, ImageSize -> 400]]Show[{epl, pls}, PlotRange -> All]