How to variably scale the amplitude of a sawtooth

Thread Starter

Bserar79

Joined Oct 24, 2018
22
Hello guys!

So, I am building a Buck converter from separate blocks, and i need to feed the comparator after the error amplifier with a sawtooth signal. Here is for reference a schematic for the Buck.

43236_2020_114_Fig1_HTML.png

Now, when computing loop stability, you can make the transfer function of the comparator a constant 1, if the sawtooth maximum amplitude is scaled to 0.1*Vin. I am planning on using a 555 timer to generate the sawtooth (150KHz), but i have no idea how to make this variable amplitude.

1667674637900.png

So, for example, if the input voltage is 10V, I would like the sawtooth to go from 0.18V to 1V. If input voltage is 20V, from 0.36V to 2V, and so on, I think you get the idea. I was thinking of keeping the timer as it is in the simulation and just do the scaling outside. I'd rather not use an opamp, as i would need a very fast (expensive) one. I feel like there is a simple way of doing it that I am missing but I've been searching for three days on the internet and found nothing.

Any ideas? Thank you very much :)
 

Thread Starter

Bserar79

Joined Oct 24, 2018
22
Why do you need to change the ramp when the input voltage changes?
Hi. As I said, the transfer function of that comparator (which is basicaly a PWM modulator) is Vin/Vramp. In I make Vramp = 0.1*Vin, than the transfer function gain of the comparator equals 10dB for any input voltage, which is useful in compensating the converter.
 

Thread Starter

Bserar79

Joined Oct 24, 2018
22
Just adjust the "Ref" Voltage.
.
.
.
I think that adjusting Vref will throw off compensation for the error amplifier. Changing the ramp amplitude is an actual technique i've seen implemented in market converters, so I would like to stick to the tried and tested.
 

Papabravo

Joined Feb 24, 2006
21,159
Hello guys!

So, I am building a Buck converter from separate blocks, and i need to feed the comparator after the error amplifier with a sawtooth signal. Here is for reference a schematic for the Buck.

View attachment 279996

Now, when computing loop stability, you can make the transfer function of the comparator a constant 1, if the sawtooth maximum amplitude is scaled to 0.1*Vin. I am planning on using a 555 timer to generate the sawtooth (150KHz), but i have no idea how to make this variable amplitude.

View attachment 279997

So, for example, if the input voltage is 10V, I would like the sawtooth to go from 0.18V to 1V. If input voltage is 20V, from 0.36V to 2V, and so on, I think you get the idea. I was thinking of keeping the timer as it is in the simulation and just do the scaling outside. I'd rather not use an opamp, as i would need a very fast (expensive) one. I feel like there is a simple way of doing it that I am missing but I've been searching for three days on the internet and found nothing.

Any ideas? Thank you very much :)
Isn't the transfer function of the sawtooth generator equal to 1/Vpp, where Vpp is the peak-to-peak voltage of the sawtooth. So, when the input changes the output voltage, the ramp generator will reduce the duty cycle to reduce the output voltage and vice versa. If you scale the P-P voltage of the ramp generator it seems like you will be defeating the purpose of using the reference voltage with respect to the ramp to generate you error signal.
 

Thread Starter

Bserar79

Joined Oct 24, 2018
22
Isn't the transfer function of the sawtooth generator equal to 1/Vpp, where Vpp is the peak-to-peak voltage of the sawtooth. So, when the input changes the output voltage, the ramp generator will reduce the duty cycle to reduce the output voltage and vice versa. If you scale the P-P voltage of the ramp generator it seems like you will be defeating the purpose of using the reference voltage with respect to the ramp to generate you error signal.
Well, I am talking here about the transfer fuction of the comparator (modulator) not the one of the sawtooth generator. Here is the formula for the comparator, where Vbat is Vin. As we can see, if I make Vramp = 0.1Vbat I get a constant gain of 10 iresspective of Vbat, so the converter will be compensated for any input voltage.

1667724612364.png
 

ronsimpson

Joined Oct 7, 2019
2,989
Vin/Vramp.
The 555 switches at 1/3 and 2/3 supply. Make the 555 live off of Vin. As Vin changes the P-P ramp will track and the frequency will stay the same. (Assuming you use the 555 as it was intended, with resistors not a current source)

I often use the current ramp in the inductor as the ramp. (current mode PWM) In that case the current ramps up with Vin like you want)
 

Thread Starter

Bserar79

Joined Oct 24, 2018
22
I'll try that :). Yeah, current mode solves this problem, but that needs slope compensation and there is also the problem of reading the current, which seems to me more difficult to solve than this. I'll try the classic topology with the 555, but that would produce an RC waveform, not a real sawtooth. Do you think that impacts the functioning of the PWM a lot?
 

ronsimpson

Joined Oct 7, 2019
2,989
In a flyback PWM the MOSFET has a Source resistor which is perfect.
but that needs slope compensation
I only use slope compensation when the duty cycle is greater than 50%.

Back to the 555. You made a voltage to current to slope circuit. (two transistors) That works well. Now move the circuit to Vin and the 1/3 and 2/3 points will also track Vin.
 
Top