How to incorporate voltage controlled current limitation
What I have seen used in lab supplies use is a voltage regulator circuit where the current limiting is done by "pulling down" the Vref when too much current is flowing. Similar to your 2nd schematic but the current limiting circuit needs to pull on the Vref, not the feedback, I have drawn a quick schematic of what I mean:







simulate this circuit &ndash; Schematic created using CircuitLab

OA1, Q1, R1 and R2 are a basic voltage regulator, multiplying Vref with a factor 10 at the output. So 0 - 3 V gives 0 - 30 V.

When the current exceeds the value set at V_Iref, the output of OA2 will go low and via D1 the input voltage of the voltage regulator is decreased. That should limit the current to the point where OA2 "flips back" and V(Rshunt) = V_Iref.

The diode is crucial. Suppose the current through the load is lower than the value set by V_Iref. Then the output of OA2 is high. That would pull up the reference voltage and make the output increase the output voltage until the set current is reached. You don't want that, you want the voltage to be maximized by the voltage regulation loop, not the current regulation loop. The diode makes sure the current regulation loop can only regulate down and not up.

This circuit still needs some feedback resistors around OA2 so that it will behave like an amplifier and not like a comparator like it does now.