Measuring the control loop of an LED driver with differential current sensing
More than a year ago I wrote in to the Power Supply Design Center forum on LinkedIn, asking for advice on how to use my network analyzer to measure the control loop of a switching converter-based LED driver where the current sense is differential and not referenced to ground. I think it´s fair to say that the majority of switching LED drivers use this method, and in general I like it. But I can´t figure out where to inject and measure to check the gain and phase of the control loop. Constant current sources have some differences when it comes to gain and phase, so I think the time is well invested. Either someone from the forum or perhaps the founder, Dr. Ridley suggested placing 20 to 50 ohms in series with the positive input of the internal diff amp of the LED driver IC and then injecting and measuring there. I couldn’t find any demoboards from, IC manufacturers (at least, IC manufacturers from whom I can get free demoboards…) that had a footprint for a resistor in series with the positive diff amp input, but recently I got ahold of one that does. Previous to this I tried running simulations in LTspice and got results that didn´t make any sense (barely any change in gain or phase), but doing Bode plots in LTspice is tricky and time consuming when it´s just a regular constant voltage switcher, so I wanted to see real life results. Here´s a simplified version of the schematic:
Note: this is a «floating» or «VIN-referenced» buck-boost, current flows back to the input, not to GND.
R10 is the injection resistor, «A» and «B» are where I connected the output of the injection transformer and the probes from the AP300, and if I had gotten meaningful results, I would have used «COMP» to separate the power stage and error amp. I´m sure everyone has their own methods, but when I measure control loops I do two things to make sure I´m not screwing up the operating point of the DUT: I watch the input current and I monitor the switch node on my oscope. From observing the switch node, I knew this circuit was reasonably stable, and the input current didn´t change much, nor did the switching node´s trailing edge move all the way and overtake the next pulse´s leading edge – that´s my method of noting too much signal injection – and as the following image will show, no instabilities appear in the plot.
Unfortunately, this plot means nothing to me – it´s clearly not the true gain-phase response of the control loop. It´s very slightly more interesting than the LTspice results.
So, what went wrong? The injection point seems like a good one: low Z and point B, high Z at point A. Maybe adding a matching 20 ohms in series with the negative input to the diff amp? I also thought about trying to inject a current en parallel with R4, the sense resistor for the LED current. I did try that in LTspice, actually, but got the same, meaningless results for gain and phase. Plus, I expect that the signal to noise ratio in that configuration would be terrible, since there would only be 82 mohms between A and B.