# 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

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!