Here I publish the diagram of my circuit. One must emphasize that this is not the final circuit yet. Components values are being changed and are not the final values. The diagram presents mainly an idea of dc power supply 0..40V 0..5A. However, some parameters were estabilished. Voltage and load regulation are excellent. There is concern about step response (applying a load to the output) which must be improved. Does someone have an idea how to do it ?
Components C1, C2, C4, R6 ensure stability. Calculating their values is not easy and some experiments were carried out to choose proper values. R20 resistor was introduced to measure output current and to create current limiting unit (it is not introduced to the circuit yet). Unfortunately I'm unable to show screen shots at the moment from my oscilloscope as it doesn't have the possibility to send them to PC. I understand that one can use special high voltage operational amlifier instead of U2 amplifier and additional componets (T1..T4 etc.) but I don't have one at the moment. VREG voltage controls the 0..40V output voltage. It must be negative in reference to AGND ground. Please note: there are two different grounds AGND and PGND. Don't confuse them !