Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

AC analysis of Error amplifier (opto isolated) won't work in LTspice...why?

Status
Not open for further replies.

Flyback

Well-Known Member
Hello,
I am trying to do an AC Analysis on the Error amplifier of an opto isolated Flyback SMPS (Vout=30V).
However, the gain and phase plots are garbage, do you know what I am doing wrong?
Please find attached the Error amplifier AC analysis schematic, the flyback schematic, and the AC Analysis simulation in LTspice.
(also the TL431 .sub file and .asy file also attached)
 

Attachments

  • Flyback _TL431_FLSL_type2.pdf
    18.2 KB · Views: 460
  • tl431a.sub
    1.2 KB · Views: 331
  • tl431.asy
    558 bytes · Views: 322
  • Error amp_TL431_FLSL_type2.pdf
    13.5 KB · Views: 429
  • Error amp_TL431_FLSL_type2.asc
    5.4 KB · Views: 380
I noticed two problems:

1. V2 needs a capacitor is series to avoid shunting away the voltage from V3

2. The opto isolator output appears to be DC saturated. Increase V1 to about 50V since the DC bias current is near 10mA.

Remember that for the AC analysis to work properly, the DC bias conditions must be correct. These can be checked in the Transient or DC op pnt modes.
 
Crutschow thanks, I implemented your suggestions and its looking a whole lot better, in fact its looking darn near the excel plot that I calculated for it...the thing is, because of the 1e6 inductor, I can't simulate the thing in a valid way in the time domain ( ie transient analysis)
Also, I feel a bit aggrieved putting in 50v......I don't know why, its just that in the LT1243 controller, the maximum current that can flow out of the error amplifier output is 1mA.
https://www.linear.com/product/LT1243

-it is a bit offputting when you cant simulate something in the time domain due to components you have to put in to allow simulation in the frequency domain...I mean, I like to do the AC analysis, and that go to the time domain and do it at a spot frequency, and check it corresponds.
 
Isn't an inductor value of 1e6 somewhat excessive?:D. Perhaps 1e-6 would work better.
 
thanks, but no, the 1e-6 wouldn't stop the signal getting quenched by the 30v source.
Basso pages explain...

edit
oh sorry, are you referring to time domain operation?...if so i see your point
 

Attachments

  • Basso 286.pdf
    786.9 KB · Views: 496
  • Basso 287.pdf
    606 KB · Views: 416
  • Basso 288.pdf
    831 KB · Views: 361
  • Basso 289.pdf
    619.3 KB · Views: 430
  • Basso 290.pdf
    647.7 KB · Views: 441
thanks, but no
I haven't waded through all that Basso stuff but are you sure? 1e6 is 1 million Henries!!! Are you simulating the Large-Hadron-Collider or a bank of power stations?
 
Crutschow thanks, I implemented your suggestions and its looking a whole lot better, in fact its looking darn near the excel plot that I calculated for it...the thing is, because of the 1e6 inductor, I can't simulate the thing in a valid way in the time domain ( ie transient analysis)
Also, I feel a bit aggrieved putting in 50v......I don't know why, its just that in the LT1243 controller, the maximum current that can flow out of the error amplifier output is 1mA.

-it is a bit offputting when you cant simulate something in the time domain due to components you have to put in to allow simulation in the frequency domain...I mean, I like to do the AC analysis, and that go to the time domain and do it at a spot frequency, and check it corresponds.
You need 50V because of your particular choice of voltages and components driving the opto. I don't see how you can get only 1mA through the opto input with the component values you have shown. What current through R2 do you measure in your simulation? Note that you will get nearly that same current through the opto output.

You can reduce the opto input current to less then 1mA, to not exceed the error amp max current, by increasing R2 or setting the control voltage for U2 to a higher voltage (increase the value of R16 for example).

You can eliminate L1, the V2 capacitor I added, and V3, by setting V2 to have a 30V DC offset voltage as well as the AC voltage. You should then be able to do either an AC analysis or a Transient analysis without any circuit change.

Note: I noticed you add some series resistance to your sources (I assume to more closely simulate real sources) but that's not necessary for sources that you add for simulation purposes only (and in fact may add unwanted small errors).
 
Thanks, these are good points.......yes I see what you mean about the current in R3.....as you say, theres no choice but to increase V1.

ill get rid of the 1e6 inductor and take your "30v offset" advice.

In the LT1243 set up as in the top post flyback schematic, 1mA is that current that if drawn out of the LT1243 COMP pin, then the SMPS is totally "braked"...ie not switching...no power being passed to the output.

incidentally the flyback simulation in LTspice is attached, should you wish to see it (TL431 model (.sub and .asy) is in the top post)
 

Attachments

  • Flyback _TL431_FLSL_type2.asc
    8 KB · Views: 368
You circuit seems to simulate but after waiting several minutes it was still was running with no end in sight. How long does the simulation take for you?

Edit: Okay, I got the simulation to run normally by selecting the "Skip initial operating point solution" (UIC) in the Simulation Command Window.

I did notice that the ripple from the output of the bridge rectifier is quite large (159Vpp) with the simulation load you have. You should increase the value of C15 to reduce the ripple to a smaller value.
 
Last edited:
yes, thanks, I could, though of course that reduces power factor, and makes it more expensive when the bus cap is a film one......also, I wanted to get a feedback loop that could handle that big change in vin.

That flyback simulation has started up and got into regulation after about several minutes....about 10 mins.
It then just goes along at 30V so can be stopped then.
It takes some 70ms of "simulator time" to get up into regulation.
-yes, it is a bit of a crawler isn't it, I see what you mean.

The R12_C1 zero makes it take ages to get up into regulation...because that RC time constant is long...on the other hand, it means it doesn't overshoot by even a millivolt on start-up.

Yes I suppose its not that quick...if you change vin to a straight 250Vdc source say, then it runs quicker.

Of course, please delete the waveform file after simulating as itll be very big
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top