MATLAB amplifier in detail

The model of the SiPM amplifier is a system of 24 equations in 24 variables that has been linearized so that it can be solved by MATLAB.

Circuit diagram


The schematic for the amplifier circuit is shown to the right. Click the thumbnail for a larger image. Node voltages and branch currents are marked on the diagram.

Parameters and variables
The MATLAB model has a number of parameters and variables to describe the amplifier circuit, including the 24 unknowns, 4 inputs, and numerous constants.

Input parameters
There are four input parameters:
 * Input current: $$I_{in}$$ (A)
 * Bias voltage: $$V_b$$ (V)
 * Power voltage: $$V_c$$ (V)
 * Frequency: $$f$$ (Hz)

Unknown variables
There are twenty-four unknown variables. The locations (and directions in the case of currents) are labeled on the circuit diagram. All unknowns are assumed to be of the form
 * $$X(t) = X_0 e^{i \omega t} + X_1$$,

where $$X_0$$ gives the amplitude of oscillation, or the AC component, and $$X_1$$ gives the DC offset.
 * Node voltages: $$V_1$$, $$V_2$$, $$V_3$$, $$V_4$$, $$V_5$$, $$V_7$$, $$V_{out}$$
 * Note: there is no $$V_6$$ on this circuit; it was a redundant variable with $$V_c$$.
 * Resistor currents: $$I_1$$, $$I_2$$, $$I_3$$, $$I_4$$, $$I_5$$, $$I_6$$, $$I_7$$, $$I_t$$
 * Transistor currents: $$j_b$$, $$j_c$$, $$j_e$$, $$k_b$$, $$k_c$$, $$k_e$$
 * Capacitor currents: $$h_1$$, $$h_2$$, $$h_3$$

Resistors
The resistance values are mostly the same as those marked on the actual amplifier itself, however $$R_4$$ and $$R_6$$ were changed for better agreement of the model with the desired responses. See the article on the actual SiPM Amplifier for details on that circuit.

Capacitors
The capacitors are not labeled on the amplifier itself or in the documentation supplied with the amplifier, so the following values are guesses as to the capacitances. Note that $$C_4$$ does not exist.

Transistors
The transistor parameters used are selections from the Gummel-Poon SPICE model parameters for these two parts.

Transistor operating point
Each transistor has an operating point, $$U_1$$ and $$U_2$$. Both are initially assumed to be 0.7V. Under DC conditions ($$I_{in} = 0$$A, $$f = 0$$Hz) we iterate on U to refine these two parameters. Each iteration refines the operating point by averaging the current operating point with the associated $$V_{be}$$. $$V_{be}$$ is the base-to-emitter voltage of the transistor and is given by
 * $$V_{be1} = V_3$$
 * $$V_{be2} = V_7 - V_4$$.

Derived parameters
The following parameters relate to the transistor constants. They are also constants, but are derived from the more fundamental constants given above. As the fundamental parameters are different for each transistor, there is a different set of derived parameters for each transistor.


 * $$V_0 = NF \!\cdot\! Vt$$
 * $$IBF = IS \!\cdot\! \exp \left( \frac{U}{V_0} \right)$$
 * $$IBL = ISE \!\cdot\! \exp \left( \frac{U}{NE\!\cdot\! VT} \right)$$
 * $$IB = IBF + IBL$$
 * $$IC = BF \!\cdot\! IBF$$
 * $$\beta = \frac{IC}{IB}$$
 * $$Q = \frac{IBF}{V_0}$$
 * $$Z = 1 + Q \!\cdot\! \left( RB + RE \!\cdot\! BF \right)$$

Equations
There are five categories of equations, which give a set of twenty-four equations in total. Two categories of equations are non-linear and need to be linearized to solve this system as a linear model using matrices.

Resistor voltage drop
The resistor voltage drop equations all take the form
 * $$\Delta V = IR$$

or alternately
 * $$V_\alpha - IR = V_\beta$$.

They describe the voltage drop associated with current crossing a resistor, according to Ohm's Law. As such, there is one equation per resistor in the circuit.


 * $$R_1$$: $$V_b - I_1 \!\cdot\! R_1 = V_1$$
 * $$R_2$$: $$V_2 - I_2 \!\cdot\! R_2 = 0$$
 * $$R_3$$: $$V_4 - I_3 \!\cdot\! R_3 = V_3$$
 * $$R_4$$: $$V_3 - I_4 \!\cdot\! R_4 = 0$$
 * $$R_5$$: $$V_5 - I_5 \!\cdot\! R_5 = V_4$$
 * $$R_6$$: $$V_c - I_6 \!\cdot\! R_6 = V_5$$
 * $$R_7$$: $$V_c - I_7 \!\cdot\! R_7 = V_7$$
 * $$R_t$$: $$V_{out} - I_t \!\cdot\! R_t = 0$$

Node charge flow
Each node must maintain a dynamic equilibrium of charge during steady-state operation. That means that flow of charge (current) into a given node must equal flow of charge (current) out of that same node. Thus the node charge flow equations take the form of
 * $$\sum I = 0$$

or alternately
 * $$\sum I_{into} = \sum I_{out}$$.

There is one such equation per node, and each node already is labeled on the above diagram by the voltage at that point; thus there is one equation per voltage. Additionally, each transistor acts as a node.


 * $$V_1$$: $$I_1 = I_{in} + h_1$$
 * $$V_2$$: $$I_{in} = I_2 + h_2$$
 * $$V_3$$: $$I_3 + h_2 = I_4 + j_b$$
 * $$V_4$$: $$I_5 + k_b = I_3 + j_c$$
 * $$V_5$$: $$I_6 = I_5 + h_3$$
 * $$V_7$$: $$I_7 = I_t + k_e$$
 * $$T_1$$: $$j_b + j_c = j_e$$
 * $$T_2$$: $$k_e = k_b + k_c$$

Capacitors
Capacitors relate current and voltage according to the equation
 * $$I = C \frac{dV}{dt}$$.

As stated above, the unknown voltages and currents are assumed to be of the form
 * $$X(t) = X_0 e^{i \omega t} + X_1$$

so the capacitor equation can be linearized as
 * $$I = i \omega C V$$

where $$\omega = 2 \pi f$$. This equation works for both AC and DC cases, because in the DC case the derivative on the voltage eliminates any DC bias for the current, but $$\omega = 0$$ so the equation still holds. There is one such equation for each capacitor.


 * $$C_1$$: $$h_1 = i \omega C_1 V_1$$
 * $$C_2$$: $$h_2 = i \omega C_2 (V_2 - V_3)$$
 * $$C_3$$: $$h_3 = i \omega C_3 V_5$$
 * $$C_5$$: $$I_t = i \omega C_5 (V_7 - V_{out})$$

Transistor current gain
One of the characteristic equations of a transistor is
 * $$I_c = \beta I_b$$.

There is one such equation associated with each transistor.


 * $$T_1$$: $$j_c = \beta_1 \!\cdot\! j_b$$
 * $$T_2$$: $$k_c = \beta_2 \!\cdot\! k_b$$

Transistor exponential response
Another characteristic equation of transistors is
 * $$Z \!\cdot\! I_b = IS \!\cdot\! \exp \left( \frac{V_{be}}{V_0} \right)$$.

This equation is linearized by performing a Taylor expansion up to the first degree, which gives
 * $$Z \!\cdot\! I_b = Q \!\cdot\! (V_0 + V_{be} - U)$$.

Under AC conditions this equation is modified by defining $$V_0 = U$$. There is one such equation for each transistor


 * $$T_1$$: $$Z_1 \!\cdot\! j_b = Q_1 \!\cdot\! (V_{01} + V_3 - U_1)$$
 * $$T_2$$: $$Z_2 \!\cdot\! k_b = Q_2 \!\cdot\! (V_{02} + V_7 - V_4 - U_2)$$

Solution
The solution (that is, $$V_{out}$$) is found by first iterating as described above to find the transistor operating points to the desired precision, then solving under AC conditions to find the correct $$V_{out}$$. "Solving" (both during iteration and for the final answer) involves running the 24-equation matrix through MATLAB and selecting out the solution generated for the $$V_{out}$$ variable. For responses, see the article on the SiPM Amplifier.