Author Topic: My circuit oscillates, where from do I learn to avoid that?  (Read 1387 times)

0 Members and 1 Guest are viewing this topic.

Offline RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 7012
  • Country: ro
My circuit oscillates, where from do I learn to avoid that?
« on: October 04, 2022, 10:46:06 am »
Been playing with LTspice recently trying to design a CC/CV power stage for a signal generator, and been testing all kind of ideas and schematics.

Many of them were oscillating from the very start ;D, others were giving good hopes then they were starting to oscillate under different loading conditions.  :horse:

My problem is that there is too much info about the subject, from the most abstract control theory dealing with math only, to the generic advise like "always add decoupling capacitors".  I'm somewhere in the middle and without having a good understanding of how to deal with the stability of control loops.  For example, I've read about opening the feedback loop and injecting signals, but in practice I don't even know for sure in what point to break the loop.  Things like that.

Usually I end up adding random capacitors to the loop, or poking different values for the existing ones then hit Run in LTspice over and over, which is no fun and almost never succeed.  :-\

Any good textbooks (or other type of material) to learn about feedback loops design and stability, please?

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21226
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: My circuit oscillates, where from do I learn to avoid that?
« Reply #1 on: October 04, 2022, 11:23:04 am »
Been playing with LTspice recently trying to design a CC/CV power stage for a signal generator, and been testing all kind of ideas and schematics.

Many of them were oscillating from the very start ;D, others were giving good hopes then they were starting to oscillate under different loading conditions.  :horse:

My problem is that there is too much info about the subject, from the most abstract control theory dealing with math only, to the generic advise like "always add decoupling capacitors".  I'm somewhere in the middle and without having a good understanding of how to deal with the stability of control loops.  For example, I've read about opening the feedback loop and injecting signals, but in practice I don't even know for sure in what point to break the loop.  Things like that.

Usually I end up adding random capacitors to the loop, or poking different values for the existing ones then hit Run in LTspice over and over, which is no fun and almost never succeed.  :-\

Any good textbooks (or other type of material) to learn about feedback loops design and stability, please?

In spice simulations you don't need decoupling capacitors, unless you have explicitly included parasitic inductance in the model you are simulating. You do require a good understanding of control theory and stability.

First you model your abstract topology in the s-domain (or z-domain if using sampling control systems). After you have understood the conditions under which those models are/aren't stable, you can create a schematic with devices and model how closely it approximates your abstract topology. Finally you add decoupling caps etc to make your circuit board a better approximation to your schematic.

It is difficult to recommend a specific text book, since few will cover the entire field from theoretical control theory through to practical topologies and specific devices. In addition different people find different styles more/less approachable.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: RoGeorge

Offline snarkysparky

  • Frequent Contributor
  • **
  • Posts: 419
  • Country: us
Re: My circuit oscillates, where from do I learn to avoid that?
« Reply #2 on: October 04, 2022, 05:38:14 pm »
Generally you have to add the parasitic components to ideal models.

put a small resistor in series with capacitors and inductors.

The spice circuit is composed of ideal components.   This will cause unrealistic oscillations.

 

Online David Hess

  • Super Contributor
  • ***
  • Posts: 17428
  • Country: us
  • DavidH
Re: My circuit oscillates, where from do I learn to avoid that?
« Reply #3 on: October 04, 2022, 06:33:51 pm »
Check out Linear Technology application notes 18 and 47.  Both discuss the various causes and types of oscillation.
 

Offline Neper

  • Frequent Contributor
  • **
  • Posts: 543
  • Country: de
Re: My circuit oscillates, where from do I learn to avoid that?
« Reply #4 on: October 04, 2022, 07:07:47 pm »
It's a law of nature that, on first switch-on, homebrew amplifiers will always oscillate while homebrew oscillators never will.
If I knew everything I'd be starving because no-one could afford me.
 
The following users thanked this post: Fgrir, MegaVolt, jasonRF

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21226
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: My circuit oscillates, where from do I learn to avoid that?
« Reply #5 on: October 04, 2022, 07:23:33 pm »
The spice circuit is composed of ideal components.   This will cause unrealistic oscillations.

... as will the non-ideal components and parasitics on circuit boards.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline mag_therm

  • Frequent Contributor
  • **
  • Posts: 783
  • Country: us
Re: My circuit oscillates, where from do I learn to avoid that?
« Reply #6 on: October 21, 2022, 03:07:59 pm »
Sometimes a type 3 compensator of the error will be needed for a phase margin on the loop gain at high frequency.

The attached images are of a qucs model I made for a 300 watt DC converter with a type 3, showing how the loop was cut to add the sweep generator to produce the bode plots.
The breadboard prototype approximately followed this model and I am building the final version now.
The images are for the voltage control loop with type 3. I used a type 2 for the current limit loop as the plant has lower gain with high load.
https://app.box.com/s/k4yddmriam1mgtoj4c7iee2i3kcnimxe
https://app.box.com/s/w62i35o5pq1vwjr13knqud09jl8w5jpg


A reference for the type 3 compensator was Renesas TB417
https://www.renesas.com/us/en/document/oth/tb417-designing-stable-compensation-networks-single-phase-voltage-mode-buck-regulators
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: My circuit oscillates, where from do I learn to avoid that?
« Reply #7 on: October 21, 2022, 05:46:16 pm »
You could try building an oscillator, then it won't. At least that's my experience.
 
The following users thanked this post: SiliconWizard, jasonRF


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf