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

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

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? 2. ## Re: Bode plot for opamp circuit different depending whether in LTspice or Excel..why?

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.

1 members found this post helpful. •

3. ## Re: Bode plot for opamp circuit different depending whether in LTspice or Excel..why?

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   4. ## Re: Bode plot for opamp circuit different depending whether in LTspice or Excel..why?

Hint: check the DC operating points of the circuit.

1 members found this post helpful. 5. ## Re: Bode plot for opamp circuit different depending whether in LTspice or Excel..why?

I did an .op analysis and they all came out very low numbers....like 3e-9 etc •

6. ## Re: Bode plot for opamp circuit different depending whether in LTspice or Excel..why?

Okay, I see the plots. (Working on simulation)...

1 members found this post helpful. 7. ## Re: Bode plot for opamp circuit different depending whether in LTspice or Excel..why? Originally Posted by mtwieg 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.

1 members found this post helpful. 8. ## Re: Bode plot for opamp circuit different depending whether in LTspice or Excel..why?

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.

1 members found this post helpful. 9. ## Re: Bode plot for opamp circuit different depending whether in LTspice or Excel..why?

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.  10. ## Re: Bode plot for opamp circuit different depending whether in LTspice or Excel..why?

Guys, you are genius's, and thanks Crutschow for your two resistors and cap! 11. ## Re: Bode plot for opamp circuit different depending whether in LTspice or Excel..why? Originally Posted by treez 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. •

12. ## Re: Bode plot for opamp circuit different depending whether in LTspice or Excel..why?

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) --[[ ]]--