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: Iin (A)
 * Bias voltage: Vb (V)
 * Power voltage: Vc (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 X0 gives the amplitude of oscillation, or the AC component, and X1 gives the DC offset.
 * Node voltages: V1, V2, V3, V4, V5, V7, Vout
 * Note: there is no V6 on this circuit; it was a redundant variable with Vc.
 * Resistor currents: I1, I2, I3, I4, I5, I6, I7, It
 * Transistor currents: jb, jc, je, kb, kc, ke
 * Capacitor currents: h1, h2, h3

Resistors
The resistance values are mostly the same as those marked on the actual amplifier itself, however several were changed for better agreement of the model with data. 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 C4 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, U1 and U2. Both are initially assumed to be 0.7V. Under DC conditions (Iin = 0A, f = 0Hz) we iterate on U to refine these two parameters. Each iteration refines the operating point by averaging the current operating point with the associated Vbe. Vbe is the base-to-emitter voltage of the transistor and is given by
 * Vbe1 = V3
 * Vbe2 = V7 - V4.

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.


 * R1: Vb - I1R1 = V1
 * R2: V2 - I2R2 = 0
 * R3: V4 - I3R3 = V3
 * R4: V3 - I4R4 = 0
 * R5: V5 - I5R5 = V4
 * R6: Vc - I6R6 = V5
 * R7: Vc - I7R7 = V7
 * Rt: Vout - ItRt = 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.


 * V1: I1 = Iin + h1
 * V2: Iin = I2 + h2
 * V3: I3 + h2 = I4 + jb
 * V4: I5 + kb = I3 + jc
 * V5: I6 = I5 + h3
 * V7: I7 = It + ke
 * T1: jb + jc = je
 * T2: ke = kb + kc

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 &#969; = 2&#960;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 &#969; = 0 so the equation still holds. There is one such equation for each capacitor.


 * C1 : h1 = i&#969;C1V1
 * C2 : h2 = i&#969;C2(V2 - V3)
 * C3 : h3 = i&#969;C3V5
 * C5 : It = i&#969;C5(V7 - Vout)

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.


 * T1: jc = &#946;1jb
 * T2: kc = &#946;2kb

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 V0 = U. There is one such equation for each transistor


 * T1: Z1jb = Q1(V01 + V3 - U1)
 * T2: Z2kb = Q2(V02 + V7 - V4 - U2)

Solution
The solution (that is, Vout) 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 Vout. "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 Vout variable. For responses, see the article on the SiPM Amplifier.