type 3 compensated error amplifier LTSpice

Thread Starter

crystar57

Joined May 10, 2021
7
I am new to LTSpice and trying to simulate this circuitEkran görüntüsü 2024-05-28 153315.png
I am expecting a 24 V output voltage but the result is as following:
Ekran görüntüsü 2024-05-28 153338.png
Can anyone tell me what am I missing ?
 

ericgibbs

Joined Jan 29, 2010
19,177
Hi c57.
Check the Voltages on Vb and Vc

Vb=24Vdc and its on the Non Inverting input! of U1

So how can V4, a 3V sqr wave switch U2 ?

E
EG57_ 1780.png
 
Last edited:

ericgibbs

Joined Jan 29, 2010
19,177
Hi c57,
Is this project a Homework or College assignment?
E

Note: Hint, How can the PWM signal start up the feedback loop with +24V on U2
 
Last edited:

Thread Starter

crystar57

Joined May 10, 2021
7
Hi c57,
Is this project a Homework or College assignment?
E

Note: Hint, How can the PWM signal start up the feedback loop with +24V on U2
Hi, this is homework. My compensation must be poorly designed then. Because Vp=3Volts for PWM signal is given at the question. In the AC sweep the converter gain was 5.64 dB, phase angle was -203 degrees and I designed the compensation circuit with K factor method and I don't think I made any miscalculations. How can i fix this problem? Thanks
 

ronsimpson

Joined Oct 7, 2019
3,258
At startup the error amplifier causes the PWM to be 100% on.
The flyback transformer cannot do 100%.
Please change your circuit so the duty cycle is limited to 50% or some reasonable number.
 

Thread Starter

crystar57

Joined May 10, 2021
7
Thanks everyone for your help so far. I used an external model for opAmp and set the voltage gain value to 1. I am getting better simulation results (not sure can get worse results than yesterdays simulation) and my circuit looks like this:
Ekran görüntüsü 2024-05-29 143259.png

However, my output voltage is still not 24 Volts and I do not know how to get rid of the transient part of the signal. Can anyone detect what is the problem in the circuit now? Thanks again for your help so far.
Ekran görüntüsü 2024-05-29 143337.png
 

emrylz

Joined May 29, 2024
1
How did you use external model for opAmp
Thanks everyone for your help so far. I used an external model for opAmp and set the voltage gain value to 1. I am getting better simulation results (not sure can get worse results than yesterdays simulation) and my circuit looks like this:
View attachment 323383

However, my output voltage is still not 24 Volts and I do not know how to get rid of the transient part of the signal. Can anyone detect what is the problem in the circuit now? Thanks again for your help so far.
View attachment 323384
How did you use external model for opAmp i have same homework can you share the simulation file.
 

crutschow

Joined Mar 14, 2008
34,912
A op amp gain of 1 is not realistic, so your simulation will not reflect the operation with a real op amp.
Real op amps generally have a gain of a least 100,000.
 
Last edited:

MrAl

Joined Jun 17, 2014
11,765
Thanks everyone for your help so far. I used an external model for opAmp and set the voltage gain value to 1. I am getting better simulation results (not sure can get worse results than yesterdays simulation) and my circuit looks like this:
View attachment 323383

However, my output voltage is still not 24 Volts and I do not know how to get rid of the transient part of the signal. Can anyone detect what is the problem in the circuit now? Thanks again for your help so far.
View attachment 323384
A question for you comes up: What technique did you use to design this 'compensator' ?
Knowing that I may be able to guide you a little better.

If you mean that sharp rise, that is caused by the forward section of the 'compensator'.
Since R3 and C2 are in parallel with R2 and R3 is so much smaller than R2, the capacitor C2 acts as a very powerful differentiator, which would cause a significant high pass response. Any step signal on the input would give rise to a huge spike as you are seeing. Think of it as R2 not being there at all.
To get a better response, you would have to either:
1. Increase the value of R3.
2. Decrease the value of C2.
3. Both of the above.
4. Decrease the value of R2.
5. All of the above.
(6. You may be able to add more low pass functionality in the feedback of that section too, but this hardly seems to be a good solution unless it becomes absolutely necessary).

The most reasonable would be #1 above, but you'd still have to make sure it works as you wanted it to work.
You should try to calculate the right values though, then simulate after that. The math is not too difficult if you have ever done one of these before.

This assumes that U2 has the proper internal gain, the schematic seems to indicate it is far too low as crutschow mentioned previously.
 
Last edited:

Thread Starter

crystar57

Joined May 10, 2021
7
If you mean that sharp rise, that is caused by the forward section of the 'compensator'.
Since R3 and C2 are in parallel with R2 and R3 is so much smaller than R2, the capacitor C2 acts as a differentiator, which would cause a significant high pass response. Think of it as R2 not being there at all.
To get a better response, you would have to either:
1. Increase the value of R3.
2. Decrease the value of C2.
3. Both of the above.
4. Decrease the value of R2.
5. All of the above.

The most reasonable would be #1 above, but you'd still have to make sure it works as you wanted it to work.

This assumes that U2 has the proper internal gain, the schematic seems to indicate it is far too low.
Hi, thanks for your advice. I determined those values according to K factor method. Should I understand from your comment that my bode plot was wrong and I must analyze the circuit again and re-calculate values?
 

MrAl

Joined Jun 17, 2014
11,765
Hi, thanks for your advice. I determined those values according to K factor method. Should I understand from your comment that my bode plot was wrong and I must analyze the circuit again and re-calculate values?
Do you have a link to the "K factor method" or can show it here? I want to be sure of what you did.

What bode plot? I did not see any bode plot just a time domain plot.
But yes, if you want to get rid of that spike then you have to figure out what has to be changed.
There is the possibility that it has to be there, but I doubt that. Also, the op amp probably cannot produce that anyway so in a real circuit it would just saturate the op amp, and that could lead to a much slower response due to the recovery characteristics of op amps. Note the max output of the op amp is probably around 30v tops, and the plot shows the spike up to 100 volts :)
 

Thread Starter

crystar57

Joined May 10, 2021
7
Do you have a link to the "K factor method" or can show it here? I want to be sure of what you did.

What bode plot? I did not see any bode plot just a time domain plot.
But yes, if you want to get rid of that spike then you have to figure out what has to be changed.
There is the possibility that it has to be there, but I doubt that. Also, the op amp probably cannot produce that anyway so in a real circuit it would just saturate the op amp, and that could lead to a much slower response due to the recovery characteristics of op amps. Note the max output of the op amp is probably around 30v tops, and the plot shows the spike up to 100 volts :)
There should be a transient response but not spike shape and definitely not reaching to 100 volts as you mentioned. I will share AC analysis results and my source for the method as soon as I can
 

MrAl

Joined Jun 17, 2014
11,765
There should be a transient response but not spike shape and definitely not reaching to 100 volts as you mentioned. I will share AC analysis results and my source for the method as soon as I can
Ok good.

I forgot to ask, does this happen during startup of the circuit or is this normal behavior even after running for some seconds or a minute?
 
Top