Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Bode plot for opamp circuit different depending whether in LTspice or Excel..why?

Status
Not open for further replies.
T

treez

Guest
Newbie level 1
Hello,

Please can you advise on why the Bode plot for an opamp circuit is different depending on whether I use LTspice to get it , or when I calculate it in Excel?

(If I do the Bode plots for a simple, passive RC circuit, then they are the same whether I use Excel or LTspice)

The below shows the opamp schematic in question, and the bode plots, plus LTspice simulation.

For example, at 50.31KHz…
Excel gives a gain of -6.74dB & phase of 163 degrees
LTspice gives a gain of –9.202dB & phase of 155 degrees

Also, as you can see, at low frequencies of around 1Hz, the gain and phase are massively different between Excel and LTspice.

The LTspice bode plot is the red one and the phase is a broken line.

Do you know the reason for the differences?
 

Attachments

  • Schematic _Type 2_FREQ DOMAIN.pdf
    7 KB · Views: 188
  • Type 2_bode.txt
    1.9 KB · Views: 101
  • LTspice_Bode plot.pdf
    34.9 KB · Views: 148
  • EXCEL _GAIN VS FREQ.jpg
    EXCEL _GAIN VS FREQ.jpg
    43.5 KB · Views: 193
  • EXCEL _PHASE VS FREQ.jpg
    EXCEL _PHASE VS FREQ.jpg
    42.4 KB · Views: 200

I don't see the Excel plot. How are you doing this in Excel? The Excel calculation likely is a more crude approximation as compared to the LTspice calculation.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
are you sure you cant see the excel plots, I can see them in the top post.
The excel sheet is attached...I used the complex number function
maybe not..it wont let me upload excel spreadsheets...anyway, here are excel plots again, as jpg's, as before

EXCEL _GAIN VS FREQ.jpg
EXCEL _PHASE VS FREQ.jpg
 

Hint: check the DC operating points of the circuit.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
I did an .op analysis and they all came out very low numbers....like 3e-9 etc
 

Hint: check the DC operating points of the circuit.

Yes - it is agood and necessaryx hint because the opamp has no dc feedback to fix and stabilize the operating point.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Excel is correct, LTspice is wrong.
The opamp has no negative feedback so its gain is millions at DC and low frequencies but LTspice says its DC and low frequency gain is only about 5.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Yes, the problem is the circuit is an integrator and has no DC feedback so the DC operating point is not correct in LTspice (as it would be in the real world). Below is the simulation with two added resistors for feedback to give the proper operating point. I also added a large capacitor to ground at the junction of the two resistors so the AC response is not significantly affected. The LTspice plot now looks quite close to your Excel plot I believe.

Type 2 bode-mod.gif
 
Last edited:

Guys, you are genius's, and thanks Crutschow for your two resistors and cap!
 

Guys, you are genius's, and thanks Crutschow for your two resistors and cap!

treez, I hope you are aware that such a dc stabilization is necessary not only for simulation purposes but, of course, also for hardware realization - unless the circuit is part of another (larger) feedback loop which is active down to dc.
 

Thanks LvW, the error amplifier is seen here in the flyback....(LTspice simulation and schematic attached)
(although this is the opto isolated version of that type 2 error amplifer being used here)
 

Attachments

  • Flyback _TL431_FLSL_type2.txt
    8.3 KB · Views: 101
  • Flyback _TL431_FLSL_type2.pdf
    18.2 KB · Views: 118

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top