How to generate the frequency response of the whole system using LTspice?  - Page 1
Forum section: electronics / projects

author: Patrick66
author_rank: Regular Contributor
timestamp: April 06, 2024, 07:57:11 am
content: Hello everyone, does anyone know how to plot the frequency response for the whole system including the feedback circuit using LTspice to verify the stability of the system? The figure is shown below. If possible can you share some videos or website. Thank you in advance.

author: MarkT
author_rank: Frequent Contributor
timestamp: April 06, 2024, 10:16:14 am
content: The .ac spice directive is what you need - it requires the input sinusoidal voltage source to have its AC amplitude set to a non zero value (1 is a good choice). Then you can plot the response at any point in the circuit.

author: Someone
author_rank: Super Contributor
timestamp: April 06, 2024, 11:19:41 am
content: Quote from: MarkT on April 06, 2024, 10:16:14 amThat only works for an AC circuit, not a sampled system like the OP posted.Quote from: Patrick66 on April 06, 2024, 07:57:11 amIt is not something automated by LTspice, you need to do the engineering.

author: Patrick66
author_rank: Regular Contributor
timestamp: April 06, 2024, 11:28:33 am
content: Hello Sir, Is it just by changing my input voltage sources to AC sweep 1V?

author: Patrick66
author_rank: Regular Contributor
timestamp: April 06, 2024, 11:50:17 am
content: Hello Sir, can you recommend any software that is capable of analysing the frequency response of the output current to the duty cycle of the flyback configuration with a feedback loop?

author: mag_therm
author_rank: Frequent Contributor
timestamp: April 06, 2024, 12:37:03 pm
content: First, convert your circuit so that it can be solved completely by the ac simulator.In my qucs example here, all I had to do was convert the sawtooth pwm generator and power electronic converter into single equivalent operational amplifier with a gain deltaV_out/delta_errorV_in.Lags in that op amp are neglected, in my case, because the frequency response of the whole system << less than pwm frequency.Error amplifier in the left has type 2 compensation.https://app.box.com/s/k4yddmriam1mgtoj4c7iee2i3kcnimxeThen open the loop at the output of the error amp, as shown, and insert a sweep generator to generate a test error voltage sweep.Then run the ac simulator, and plot the overall open loop transfer function,(OLTF) and any other transfer functions needed inside the loop.https://app.box.com/s/w62i35o5pq1vwjr13knqud09jl8w5jpgI have 3 of 300 Watt dc converters designed like this in my solar battery powered ham radio station. I set the error amps a little bit droopy using the above model. I did not make an overall qucs model of all 3, just 3 separate models as shown.The overall trim is by a slow acting python function in the home brew dc datalogger.It does fine adjustments to battery float voltage winter/summer, and has a current limit for the morning ~ C/10 battery recharge.

author: iMo
author_rank: Super Contributor
timestamp: April 06, 2024, 02:18:23 pm
content: There is a ".FRA" analysis in LTspice which will do the job.It is a different type of analysis than the .ac one, it does analysis for your type of system.Look at the "FRA" examples in the LTspice.