OK you seem to have all the bits there, but
I intend to make this supply 0-20v,0-2A so a value of 2v should always be available at the op-amp but this will make it not accurate when applying 20v... so, the Vref I am gonna use is 2.048v and then I will feed the voltage op-amp with 0-2v only, not full 2.048v so that current op-amp set voltage is always higher... this is to ensure CC is always off unless you want it to.
this makes no sense? Each of these references will have a pot across it, and most of the time the CC pot will be set quite low. CC or CV operation is determined by what is on the negative inputs of U3 and U1 compared to the references, the actual numerical voltage on the positive imputs doesn't matter. (The LT1678 is happy working at the negative rail?). And in reality you would just use the same reference, being able to get to 20.48v is not a drawback.
I choose that mosfet (BSC010NE2LS) because of low Ron and low price. I need a similar one for the SEPIC pre-regulator which must be a fast mosfet. this one happens to suite both! The IRFP250N is more expensive but it offers 200v Vds which is not needed here as drop voltage will always be 1v or a little more. what do you think about that?
when running in linear mode, the Rds is generally not important, but MOSFETs with higher Rds are preferred as this means the capacitance will be lower, higher voltage MOSFETS generally have higher RDS and lower capacitance, and so are generally a good choice, higher voltage devices generally have a higher threshold voltage (unhelpful) and a higher gate withstand voltage (helpful) , in your circuit you could potentially put 30v to the gate which would kill most mosfets, you should put a 10-15v zener somewhere, eg from G-S on M1. Ideally there should be ~ 20ohm in series with the zener to prevent VHF oscillation of MI, or maybe just put a ferrite bead directly at the gate.
[/quote]
I made the R5=1ohm rather than 0... I wonder why it was 0? also changed the diff-amp resistor to 1k,10k because I intend to use these values a lot.
R5=1ohm is functionally the same as zero, people just put these in simulators to remind themselves where they might want to fiddle with compensation.
Note also that under an output short circuit your CC loop gain will be quite high (about a 100x the CV loop) try setting R18 to zero and check for stability, you might need to pad across R14 with a series R and C to stabilise the loop, it will also make the circuit less responsive to brief load transients. RC maybe around 1mS.
what do you think about the circuit so far? is it complete or need something else like output caps?
Bulk capacitors will probably be needed, look at where your closed loop response rolls off, if (for example) it rolls off at 1kHz, then the capacitors need to be able to supply full load current for a bit less than a ms, figure out an acceptable droop , say 100mV, then use I=C.dV/Dt to work out C. for 2A , 100mV and 1mS this is 10,000uF. That's a bit big as it will blow stuff up before CC takes over!, If possible you should aim for ~ 10uF to 470uF as output caps, so will need to get closed loop gain to 10kHz or better. If you can't get the roll-off you will just have to tolerate a worse transient response.
Note that the ESR of your bulk capacitor affects loop stability (more is better). Also test your design in the case where a user jams a huge capacitor across the terminals ( I use 100,000uF for "bulletproof" testing)