Wolfram Language

Symbolic & Numeric Calculus

Find the Impulse Response of a Circuit

Find the impulse response for a circuit that is composed of a resistor and an inductor , and is driven by a time-dependent voltage .

The current can be computed by solving a linear first-order differential equation .

Set up the differential operator corresponding to the left-hand side of the ODE.

In[1]:=
Click for copyable input
voltage = L i'[t] + R i[t];

Assume that the switch is initially open.

In[2]:=
Click for copyable input
init = i[0] == 0;

Compute the impulse response for the circuit using GreenFunction.

In[3]:=
Click for copyable input
gf[s_, t_] = GreenFunction[{voltage, init}, i[t], {t, 0, \[Infinity]}, s]
Out[3]=

Plot the impulse response at .

In[4]:=
Click for copyable input
Plot[gf[s, t] /. {s -> 1, R -> 2, L -> 4}, {t, 0, 7}, PlotTheme -> "Scientific", AxesLabel -> {"t", "i[t]"}]
Out[4]=

Compute the response of the circuit to a step voltage.

In[5]:=
Click for copyable input
v[t_] := HeavisideTheta[t];
In[6]:=
Click for copyable input
current = Integrate[gf[s, t] v[s], {s, 0, t}, Assumptions -> t > 0]
Out[6]=

Visualize the step response.

In[7]:=
Click for copyable input
Plot[{current /. {R -> 2, L -> 4}, 0.5} // Evaluate, {t, 0, 6}, PlotTheme -> "Scientific"]
Out[7]=

Related Examples

de es fr ja ko pt-br ru zh