I'm currently working on a Power Electronics project which I will convert 10-28V input DC voltage to 12V DC output voltage. I've deciced to use LM3481/3488 configured as SEPIC in my project. I've found which values to use such as Sense resistor, Feedback resistors, Frequency selecting resistor, Inductors and Capacitors etc.
What purpose do Compensation Capacitor and Resistor have and How should I choose values to them?
Inside those chips (and many others of this type) is an error amplifier and that amplifier will have some degree of "phase margin". Having some phase margin means that by the time the gain has dropped to 0 dB (at high frequencies of course), the phase has not reversed. This means it cannot become an oscillator.
However, between the switching drive output and the error amplifier feedback point is an LC circuit and this will, progressively, add a phase error that becomes -90 degrees at LC resonance. Above resonance, the output amplitude falls rapidly but the phase can also change rapidly to -180 degrees. Well above resonance, the output amplitude is too small to meet the criteria for oscillation.
So, the problem usually lies at a range of frequencies around the LC filter resonance point. This is where instability is most likely to occur if measures are not taken.
What the error amp does is use components that prevent the combined phase shift of the error amp AND LC filter creating a situation where the loop gain is greater than unity at a phase shift of exactly 180 degrees. If it didn't do that, the circuit would oscillate at or around the LC frequency.
These components stop the error amplifier's phase shift lowering too much around the LC resonant frequency i.e. they keep the margin reasonably high: -
Hopefully you should be able to see that the added peak in the phase margin prevents a phase margin of zero occuring when the loop gain is still greater than unity.
The picture above is taken from document AN1286 and this is for the LM3481 so it might also prove to be useful to read.