Author Topic: Seeking help with SMPS inner loop instability (LTspice sim looks fine though)  (Read 819 times)

0 Members and 1 Guest are viewing this topic.

Offline iWeiTopic starter

  • Contributor
  • Posts: 11
  • Country: sg
Hello, Im building a supercapacitor power buffer for a robotics competition which has rules restricting power consumption. The circuit is meant to prevent power drawn from the battery from exceeding set limits by supplying power when load spikes and charging up when power consumption is low. Apologies for the lack of proper/hitech measurements as Im stuck without access to the real power electronics lab in college due to bureaucracy issues so i made do.

The circuit is realized with LT8708 as the core controller, and current sensing with LT1999. Although load regulation (outer voltage/current loops) looks ok (as measured by arduino current shunt), I can hear high pitched whining sounds coming from the inductor at high loads, although the pulse width instability occurs at lower current levels as well.

I have previously made a fixed CV/CC bidirectional converter with just the LT8708 alone and also experienced the same instability issues(does that mean the additional LT1999's are not the cause of the instability?)

I have simulated the circuit in LTSpice (using alternate solver else it gets stuck) and it looks fine, but when I prototyped it the unstable pulse width issues and inductor whining showed up. Hence Im wondering if this issue is likely due to layout/noise issues rather than wrong component values in the feedback loop? I pretty much shot myself in the foot for missing out test points because im now unable to properly probe for noise, the original demo board uses a 6 layer construction but i have used a 4 layer PCB design to cut costs but now I am wondering if that is coming back to bite me in the ass in terms of noise/coupling issues.

https://youtube.com/shorts/kUn1OALRgBE?feature=share

In the video shown, the SMPS is set to regulate current drawn at around 10A, the supercapacitors start fully charged and discharges 5A into the load when the 15A load is turned on. When the load is turned off, it pulls the full 10A from the bus and tapers off until the supercapacitor is full.
The multimeter is showing capacitor bank voltage, and for the oscilloscope im probing both ends of the power inductor.

I have attached all design files and LTSpice simulations below as well as a video of it in operation and would really appreciate any advice on how I can start to tackle this issue. The board is somewhat functional (power is kept within the limit as seen by the onboard judge system) but I would like to get rid of this inner loop instability which is hurting efficiency and reliability. Frankly im surprised at how far i got by bodging together circuits from various app notes/datasheets with no formal power electronics experience (or maybe it just goes to show how LT parts "just work") :palm:
« Last Edit: January 21, 2025, 07:01:27 pm by iWei »
 

Offline Geoff-AU

  • Frequent Contributor
  • **
  • Posts: 254
  • Country: au
Coincidence, I just stumbled onto this chip when looking for a bidirectional battery charger/discharger.  I've only just started playing with it in LTSpice and reading the datasheet so I can't help much yet.

Why are you using LT1999 as a current sense amplifier?  I thought LT8708 already had current limiting?
« Last Edit: January 22, 2025, 04:02:15 am by Geoff-AU »
 

Offline iWeiTopic starter

  • Contributor
  • Posts: 11
  • Country: sg
Essentially I needed a way to “digitally” set a arbitrary CC limit on the input (both positive and negative) calculated based on current flowing through the input shunt resistor

Initially I opted for injecting current using a DAC but since i needed fast response time (and the ADC to DAC conversion would introduce significant delays on the order of milliseconds), I figured I might as well keep it fully analog and went with the circuit i appropriated from the LT8714 datasheet application circuit (cc source set by voltage)
« Last Edit: January 22, 2025, 06:09:32 am by iWei »
 

Offline mtwieg

  • Frequent Contributor
  • **
  • Posts: 409
  • Country: us
Looking at your sim it's very difficult to tell what you're trying to achieve, or if the sim is even functioning as intended... and in your video I'm not even sure I can make out the whining over the background noise.

A few years ago I evaluated the LT8708 for a similar load leveling application, but opted for the LT8228 instead as it seemed to suit my needs better. I also had a requirement to be able to dynamically change the current limit (basically slaving the PWM controller to an MCU). I recall also coming to the conclusion that with the LT8708, this would require injecting offset voltages on all the IMON pins. With the LT8228 I could do this simply by overriding the SS pin voltage. On the other hand, the LT8228 only operates with a half bridge power circuit, so if you to operate with both V1<V2 and V2>V1, it's not an option.

That said, the LT8228 is still a beast and required direct support from LT/ADI to figure some things out (their LTspice model had a lot of issues). The thought of trying to debug such a circuit without a proper digital scope is also pretty scary.
 
The following users thanked this post: Geoff-AU, iWei

Offline iWeiTopic starter

  • Contributor
  • Posts: 11
  • Country: sg
Looking at your sim it's very difficult to tell what you're trying to achieve, or if the sim is even functioning as intended... and in your video I'm not even sure I can make out the whining over the background noise.

Apologies for the unclear documentation in the sim!

V1 represents the battery from which im trying to keep at a certain current (set to 10A in the sim)
V2 represents the supercapacitor (at a fixed voltage) that the LT8708 either charges or feeds into the bus
S3 represents the varying load (drawing 1A before 3ms, drawing 18A after 3ms
hence, before 3ms, the LT8708 pulls 9A from the battery to charge the "supercapacitor" (V2), after the "switch load" turns on, the LT8708 dumps 8A into the V1/load bus, keeping current drawn from the battery (V1) at 10A.

There is a current spike lasting around 1ms when the switch turns on, but it is more than fast enough for the onboard judge system that polls battery current at a measely 10hz (but im minimizing response time just to reduce the chances of it polling coincidently at the spike.)

and in your video I'm not even sure I can make out the whining over the background noise.
In the video, the whining sound is most obvious nearing the end after the load is turned off and the lt8708 is pulling 10A to charge the supercapacitor (after the last beep around 18 second mark). You are right I cant hear any whining sound initially at low currents but the waveforms still look horrible.



That said, the LT8228 is still a beast and required direct support from LT/ADI to figure some things out (their LTspice model had a lot of issues). The thought of trying to debug such a circuit without a proper digital scope is also pretty scary.

Do you have any way for me to get technical support from ADI as a small fry college student? not sure if anyone would entertain such a small player (the free ADI technical support has yet to get back to me...)

I have another last ditch effort in mind, that is to replicate the DC2596A layout exactly as much as possible with plenty of test points to rule out any issues caused by poor layout. If that too fails, then Ill just call it a day, do some stress tests to prove reliability and hope it survives the competition without blowing up :-+

(because it kinda works (i guess...) as seen in the last picture where i measured apparent power in yellow) Load is stepped from 2A at 25V to various currents ranging from 5A-15A, and the module has managed to keep apparent power drawn at no more than 100W (which i set via applying a voltage V3. V3 expects voltage input ranging from 2.5v to 1v representing battery current limit of 0A to 10A [linear relationship])


A few years ago I evaluated the LT8708 for a similar load leveling application, but opted for the LT8228 instead as it seemed to suit my needs better. I also had a requirement to be able to dynamically change the current limit (basically slaving the PWM controller to an MCU). I recall also coming to the conclusion that with the LT8708, this would require injecting offset voltages on all the IMON pins. With the LT8228 I could do this simply by overriding the SS pin voltage. On the other hand, the LT8228 only operates with a half bridge power circuit, so if you to operate with both V1<V2 and V2>V1, it's not an option.

That being said, would you mind sharing what issues you encountered? given that they are all from the same family of LT8xxx bidirectional DCDC chips, perhaps some gotchas would apply to my case as well

Yep I remember looking at LT8228 chip as well, but the restriction of having one side strictly higher than the other meant my energy storage capacity is gimped either ways so I went with LT8708 with a comparator to decide which way current flows by the DIR pin

But using the soft start pin as an adjustable current limit sounds like a ingenious hack, I would like to see how that worked (I definitely do not remember the datasheet specifying that as a way to implement dynamic current limiting, only the ISETxx pins)
« Last Edit: January 22, 2025, 04:18:07 pm by iWei »
 

Offline iWeiTopic starter

  • Contributor
  • Posts: 11
  • Country: sg
As for whatever real world usage this power buffer (or should I call it "DC Power buffering UPS" to fancify it?) would have outside of the robotics competition, I frankly have no idea, its a solution in search of a problem :-DD

perhaps I could hook this up to a 500w car subwoofer and crank it all the way up with no DC rail sag even though its powered with a 50w brick, as long as the kicks dont come too often I suppose(so that RMS power averaged over minutes does not exceed 50W...) >:D
 

Offline mtwieg

  • Frequent Contributor
  • **
  • Posts: 409
  • Country: us
Apologies for the unclear documentation in the sim!

V1 represents the battery from which im trying to keep at a certain current (set to 10A in the sim)
V2 represents the supercapacitor (at a fixed voltage) that the LT8708 either charges or feeds into the bus
S3 represents the varying load (drawing 1A before 3ms, drawing 18A after 3ms
hence, before 3ms, the LT8708 pulls 9A from the battery to charge the "supercapacitor" (V2), after the "switch load" turns on, the LT8708 dumps 8A into the V1/load bus, keeping current drawn from the battery (V1) at 10A.

There is a current spike lasting around 1ms when the switch turns on, but it is more than fast enough for the onboard judge system that polls battery current at a measely 10hz (but im minimizing response time just to reduce the chances of it polling coincidently at the spike.)
When I run the simulation I don't see this behavior. I see that current starts building up from V2 to V1, but then at 3ms when S3 turns on that current drops to zero and the LT8708 stops switching entirely. Also the simulation isn't able to solve its initial operating point properly (also using alternate solver, modified gear integration, other settings are default). I'm using version 24.0.12, what version do you use?

Quote
Do you have any way for me to get technical support from ADI as a small fry college student? not sure if anyone would entertain such a small player (the free ADI technical support has yet to get back to me...)
You could try your luck asking on ADI's EngineerZone forums. If you go that route, I recommend having a clear and functioning LTspice model. If the issue is only present in real hardware, it's unlikely they'll help you unless you're working with their own dev board (with your own modifications). Did you first try and develop this using the dev board before starting your own layout?

That being said, would you mind sharing what issues you encountered? given that they are all from the same family of LT8xxx bidirectional DCDC chips, perhaps some gotchas would apply to my case as well
I'm not sure how similar the LT8708 and LT8228 are to each other, to be honest. I'll just make some observations:

The LT8228 uses a strange combination of both peak and average current mode control. Even I haven't gotten any info on how the peak CMC actually works (they never want to explain their PWM modulation with any of their chips). The current controllers are not nested inside a voltage control loop, but rather the voltage feedback and current feedback error amplifiers are in parallel, feeding a common Vc node which is then fed to the magic PWM modulator block. There are separate error amplifiers for current in each direction. I believe this is the same with the LT8708.

One difference is that for the LT8228, there are two Vc nodes, one for buck and one for boost. It's unclear why this is the case. But for the LT8228 I found it convenient for them to be separated as it allows more flexibility in stabilizing things. But one issue I encountered is that while operating in one mode (for example buck mode), the error amplifier for the boost mode (Vc1) would wind up to a very low or high voltage. Often when the controller did change modes, this would result in either a very slow response, or way too much current initially. I solved this issue by making it so when operating in one mode, the Vc voltage for the other mode is held at some reasonable voltage (using an analog switch).

As for using the SS pin to adjust current limits, I don't think the LT8228 datasheet mentions this anywhere. It's just a result of how the SS functions. In the LT8228, the SS voltage clamps the reference voltage (normally 1.21V) to the average current loop error amplifiers. So setting SS to 0.6V means your average current limit will be half of normal. In the LT8708, it seems (not shown clearly on the block diagram for some reason) the SS voltage clamps the output of the error amplifiers (Vc). The relationship between Vc and actual current is basically unknown though (it's that secret sauce they will never explain), and probably very nonlinear, so this same trick can't work for the LT8708.

Another thing I had to watch out for early on was filtering the current sense signals. The ESL in the sense resistors will severely distort the waveforms, especially when the current is discontinuous. Basically you want your lowpass filter to have a corner frequency equal to the corner frequency of the highpass filter formed by the current sense resistance and inductance. If your lowpass filter is too slow, it may cause your peak current mode controller to not work properly. The LT8228 datasheet actually makes no mention of these issues for some reason. But be careful to observe whatever advice the datasheet does give on current sense circuitry. LT/ADI uses different types of error amplifiers in their chips, and they have different caveats. For example in the LT8228 the CSAs need series resistance on their inputs to define their gain, and any capacitance put on their inputs degrades stability (so to filter the signals you need to have a RC filter followed by series resistors). For the LT8708, the sense amplifier inputs are high impedance and don't require those series resistors, so you can put capacitance directly across its inputs. But the datasheet recommends against putting any resistance on the CSNIN or CSNOUT pins. Just make sure to read and follow these odd guidelines.'

Your simulation has current sense filters, but it's unclear if that's a good idea, as the sense resistors don't have any ESL to counter. In my LT8228 simulations, I typically don't model ESL in the sense resistors, and also omit the lowpass filters.
 
The following users thanked this post: iWei

Offline iWeiTopic starter

  • Contributor
  • Posts: 11
  • Country: sg
When I run the simulation I don't see this behavior. I see that current starts building up from V2 to V1, but then at 3ms when S3 turns on that current drops to zero and the LT8708 stops switching entirely. Also the simulation isn't able to solve its initial operating point properly (also using alternate solver, modified gear integration, other settings are default). I'm using version 24.0.12, what version do you use?

Im using LTSpice XVII (version 17.1.10),
Indeed when I updated it to 24.1(latest and only version i could find on ADI website) the simulated waveforms of my schematic looks really off, so i tried to do a quick sanity check with the default/official lt8708 example, turns out it (LT8708.asc) too also runs fine on 17.1.10 but looks really off on 24.1 as seen in the photos attached.

I have attached the v17 installer that im using in case anyone wants to try running it but cant find it on the official website(or perhaps im blind).
https://drive.google.com/file/d/11m1KZhRxMusOxBrKa48k30BX5rWN67Ge/view?usp=drive_link
There is a need to run the field update utility (tools->Update Components) and wait a long long time for it to update everything (~20mins ish) if not the sim will behave weirdly as well, perhaps due to some components used not being present in the original installation (they really mean it when LTSpice XVII is too permissive to syntax errors, it will straight up lie to you without saying anything even if the component values are completely missing... :-//)
(would updating 24.0.12 fix the issue? im not too sure regarding that)

Hol up a sec, I just realized the unused CSPIN/CSPIN was wrongly connected to LDO33 rather than the drain of M/Q1 as suggested by datasheet in both sim and physical board, but somehow it still simulates pretty similarly/"works" , attached is the corrected asc schematic |O Ill go and perform surgery on the board later and get back if it made any physical real world difference.
« Last Edit: January 23, 2025, 06:04:13 pm by iWei »
 

Offline mtwieg

  • Frequent Contributor
  • **
  • Posts: 409
  • Country: us
I have 17.0.35.0 on my laptop and when trying that it doesn't find symbols for the AD8651 and MAX9095, so apparently too old. Can't change that version on this machine at the moment.

I'd recommend using the newest LTspice version, there are definitely some quality of life improvements, and AFAIK it's no worse at the fundamental SPICE stuff. Also if you want to get support from ADI, your chances are much better if you're using the latest LTspice (they officially don't support earlier versions at all)
 

Offline mtwieg

  • Frequent Contributor
  • **
  • Posts: 409
  • Country: us
Ok I looked at it a bit more and it seems the model for the LT1999 is completely broken, even in their own test jig. In 24.0.12, at least. I actually tried to reinstall version 17.x on my home machine and apparently the installer won't work if you already have a newer version installed on the same machine. Going to have to berate them for that.

Anyways, a few other tips:
1. Use behavioral sources instead of complicated macromodels when possible. Simple amplifiers, comparators, logic functions, etc. For example I replaced all the LT1999 instances with behavioral voltage sources. This avoids issues with model changes, and often makes the simulation run much smoother.
2. Make use of net labels. Every net of interest should be given a name. Overall makes the schematic and waveforms far clearer. Nobody wants to bother remembering which net n039 is.
3. Make use of initial conditions (the .ic directive). I'm forcing VIN and VOUT to start at their nominal levels, which avoids the huge inrush currents which were happening previously.

I've attached my changes to the sim. Overall it seems to act like you describe (hopefully in your LTspice version as well). The issues with solving the initial operating conditions are gone too.
 
The following users thanked this post: iWei


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf