# Simple current regulator transfer function

I did simple op amp MOSFET current source. It was not working correctly, it had oscillations as per picture, so RC circuit was was added and problem was resolved. What I am wondering is transfer function of it and how to treat it. Conroller works as an error amplifier, but is this the simplest form of proportional controller. And after addidtion of the capacitor, does it make this circuit simple PI controller? And if we can treat it as PI controller how to check KP. Do we treat it as unity gain or open loop gain.

Could someone please give me some clues for this?

• First, treat as open loop. You'll find zeroes/poles. Then you'll close the loop with compensation network (e.g. 1n that you added). – Rohat Kılıç Jun 7 '17 at 6:45
• Ok and when we treat this simple system where G(s) is a controller and P(s) is plant what will be P(s) as it is single transistor, or with R3. G(s)------->P(s) – Piotrek Lech Jun 7 '17 at 9:04

To study this type of system, you need to build an equivalent small-signal (linear) version of it. The simplest one you can think of is below:

The operating point looks good but I used a perfect op amp to drive a largely-capacitive load such as a big MOSFET as you selected. Also, I used a simplified hybrid model for the MOSFET as you can see. So this sketch is mainly for illustration purposes. You can improve the analysis and use a more realistic model for the op amp and the MOSFET. As I type, I did not have the exact model your circuit uses but you see the spirit in the below picture:

The loop is physically open via the LoL/CoL elements inserted in series with the sense resistance. When SPICE computes its dc operating point, LoL is shorted and it can determine the bias point. Then, as the ac analysis starts, CoL allows the ac to pass while LoL blocks the return: the loop is closed in dc but open in ac. If you plot $V_{out}$ over $V_{in}$, you will have $T(s)$ the open-loop gain and see what compensation is needed on the op amp to stabilize the whole thing. If you want to run a symbolic analysis, replace the op amp by its macro model and the MOSFET by a more realistic small-signal model. I believe however that a SPICE analysis should already provide good insight. Good luck!