Transistor Amplifier Circuit

The input voltage varies sinusoidally. The circuit contains a transistor that modifies the voltage in a nonlinear way.

 In[1]:= Xve[t_] := (4/10) Sin[200 Pi t]; v23[t_] = \[Beta] (Exp[(v2[t] - v3[t])/.026] - 1);

Use Ohm's law and Kirchoff's current law to determine the governing equations for each node.

 In[2]:= Xnode1 = c1 (v2'[t] - v1'[t]) == v1[t]/r0 - ve[t]/r0; node2 = c1 (v1'[t] - v2'[t]) == (1 - \[Alpha]) v23[t] + v2 [t]/r1 + v2[t]/r2 - vb/r2; node3 = c2 v3'[t] == v23[t] - v3[t]/r3; node4 = c3 (v4'[t] - v5'[t]) == vb/r4 - v4[t]/r4 - \[Alpha] v23[t]; node5 = c3 (v4'[t] - v5'[t]) == v5[t]/r5; ics = {v1[0] == 0, v2[0] == vb/2, v3[0] == vb/2, v4[0] == vb, v5[0] == 0};

Specify the parameters associated with the circuit.

 In[3]:= Xparams = {vb -> 6, r0 -> 1000, r1 -> 9000, r2 -> 9000, r3 -> 9000, r4 -> 9000, r5 -> 9000, \[Alpha] -> 99/100, \[Beta] -> 10^-6, c1 -> 10^-6, c2 -> 2 10^-6, c3 -> 3 10^-6};

Solve and visualize the system.

 In[4]:= XtransistorSol = NDSolve[{node1, node2, node3, node4, node5, ics} /. params, {v1, v2, v3, v4, v5}, {t, 0, 0.2}, Method -> {"EquationSimplification" -> "Residual"}, MaxSteps -> 100000] ;
 In[5]:= XPlot[Evaluate[{v3[t], v4[t]} /. transistorSol], {t, 0, 0.2}, PlotRange -> All, ImageSize -> 400, PlotLegends -> {Style["Node 3", 14], Style["Node 4", 14]}, Frame -> True, FrameLabel -> {Style["Time", 18], Style["Voltage (V)", 18]}]
 Out[5]=