Frequency Response Analysis (.bode) Study Guide

I saw questions about how to use frequency response analysis (.bode). Actually, the help in Qspice is quite clear, but people may still find challenge as commands to control .bode behavior are separated in .bode and .option

Therefore, I prepared a guide for .bode for those who interested in .bode but have difficulty in setting up a simulation or getting a frequency response curve as you expect. But .bode is not an easy topic to explain, this is so far the best present I can come up with.

I am a user same as you, therefore, I cannot guarantee all information in my work is correct.

You can find the .bode guide in this Github link. In addition, it also include an Entry guide, Device guide and a Reference guide. I still work on updating all these guidelines. Feel free to let me know if typo or mistake in them.

Qspice/Guideline at main · KSKelvin-Github/Qspice


I look forward to reading this. Thanks Kelvin!

1 Like

Hi Kelvin,

I have a suspicion that the .bode does not actually run the transient analysis and apply the perturbation one frequency at a time. I guess some fancy algorithm like multitone is used instead Multi-Tone AC Analysis Theory

I noticed some weird result and clear cut differences between using .bode and .meas fra + .step.
perhaps you can find my mistake for how I implement .bode in this file. (2.5 KB)


I can guarantee .bode run a .tran to collect time domain data for frequency response analysis.

For Qspice demo circuit FRA_SMPS, I setup a .step for frequency from 1KHz to 80kHz, this allow to plot the .meas, to generate a bode plot.

Next step I change simulation directive to .bode, and results between FRA and .bode compared in below.

I start simulation from 1kHz instead of 100Hz, as 1kHz already with 40dB gain. To start with lower frequency down to 100Hz, higher gain is expected and may easily saturate the controller. For this circuit, bode between 1kHz to 80kHz should be good enough to cover enough design information.

This is simulation files for reference
Qspice/Forum/15954 at main · KSKelvin-Github/Qspice

Hi KSKelvin,

I am not doubting if real .tran is used for .bode, however, I am thinking if the analysis is performed using multi-tone or not.

To my knowledge a sweep of the single frequency perturbation should be the more accurate approach, though a lot slower.

Please refer to this article
Frequency Response of Switching DC_DC Converters from a Single Simulation in the Time Domain.pdf (1.5 MB)


oh, sorry that I misunderstood your first message. I didn’t investigate the maths behind .bode.

My major focus is just to document my study and share with community. The simulation time for a time domain bode offers by .bode is amazing. That why I think it worth the effort to learn and to use it.

I am also interest to the math behind. But as Qspice help doesn’t explain that, and if Mike not further explain that, I just leave it aside at the moment. How to use it to achieve my goal is my major focus in using Qspice. Thanks for sharing the article, will look into that.
On the other hand, I also see you are working on a project to develop an approach for frequency response analysis in Qspice. :+1:

1 Like

Kelvin, this is what I been looking for. Thank you for posting this. Robert