Art of Electronics figure 5.87 (revised)
On first sight, the instrumentation amplifier is wrong actually, not the input opamp.

But when looking closer into it, we have to make a change to all three active components!

A. Why change the instrumentation amplifier?

As drawn, when the output is +50mA, the instrumentation amplifier should output -5V which is lower than ground.  If it is positively powered as in circuit A, it can not reach that level.

Exchanging the +/- pins of the instrumentation opamp would make it present 5V on the '-' input of the input opamp.  In that case with an input at 5V, the circuit would be stable.

B. Why not change the input opamp?

Exchanging the inputs of the input opamp would make the feedback negative, but the input would have to be -5V to have 50mA at the output.  That does also require that both opamps are powered from something lower than -5V and positive power (VCC).

C. The "disturbing" 100pF

Let's not forget the 100pF.

If we change the +/- positions of the input opamp, the feedback through this 100pF is correct.  A sudden increase in output current, would lower the output of the instrumentation amplifier which would lower the voltage on Q1's base and decrease the current by lowering the voltage presented to the load.

Correcting the +/- inputs of the instrumentation amplifier (which is the good solution up to now), the 100pF works counterproductive.  An increase in current will increase the Q1's base and hence increase the output current (as the output voltage increases).

So well, do we have to drop this 100pF?  There is a good reason to have it!

D. Change "everything"

Therefore I would make another change: exhange Q1 for a PNP.  The current is determined by the voltage drop from VCC to Q1's base, and hence (mostly) independent of the load.

Now wait a minute!  That changes the feedback loop!!!!

With the PNP, I need the opamp's output to decrease for increasing current.  So I have to change the +/- inputs of the input opamp.  With the input connected to '-' the opamp output will drop with increasing input voltage.  I need to change the +/- inputs of the instrumentation amplifier as well (the + needs to be at the top, - at the bottom), to make sure that its output increases with increasing current to decrease the gap with the '-' input of the first opamp.

Is the 100pF capacitor ok?  Yes!  With a sudden current increase, the output of the instrumentation amplifier increases, so Q1's base voltage will increase, which will lower the output current.  Instant negative feedback for fast changes.

E. Conclusion:


Change +/- locations of both opamps, and,
Change Q1 into a PNP.


And that's the ART of Electronics!

F. Addendum (additions after the comment(s))

Does the 100pF value need to change?  I can not tell from the schematic because an important element is missing: the load's value.

With the NPN, the 100pF actually depends on the load.  The load changed the open loop amplification and phase.  Why?  Because an increase in voltage on the base of Q1 as an NPN resulted in the same voltage increase on Q1's emitter and hence a direct increase in the voltage of the load.  That meant that the open loop current amplification by Q1 was \$1V/R_{load}\$ .

With Q1 being a PNP, it's current amplification is known.  It is about \$1V/22 \Omega\$ .  The voltage on the collector will "adapt" to the load.

So if the 100pF was correctly designed, it can be kept as-is for a \$22\Omega\$ load.  If the load is different, then either the 100pF must be adjusted by the same factor, and/or the \$22\Omega\$ can change too.  If we want a less power loss in the \$22\Omega\$ and divide its value by 10, then we must increase the 100pF by 10.

The exact value chosen for the 100pF depends on : the phase margin required for the closed loop, and the frequency range for which we want the regulation to work.

Ignoring all else, the 3k3 resistor and the 100pF seem to set a 3dB point at about 3kHz.  3kHz is fairly low and likely far from any phase margin requirement.  If we consider the load resistor which was in series with the 3k3 resistor, I expect little change.   To get 50mA at 8V, the load should not be higher than 160 Ohm, so that changes not much to 3k3.

With the NPN, we add the \$22\Omega\$ resistor, which is a known, so the 3dB frequency from this filter will not change much.

So, my best guess is to keep 100pF, to stay at a 3dB frequency of 3kHz, and I think that phase margin will be ok.