300kHz voltage-current phase shift measurement - Page 1
Forum section: electronics / projects

author: murgui
author_rank: Newbie
timestamp: August 28, 2024, 01:10:51 pm
content: Hi,For a resonant converter I need to find the phase shift between voltage and current. The topology is a full bridge LLC.The current is measured through shunt resistors, one per half bridge and the shunt position is in the low side mosfet source, so it is a low side measurement.The voltage waveform is 0-48V squarewave, the current waveform is -30A to 42A periodic wave (depending on the conditions can be traingular wave, sinewave, some uglier things,...), the frequency of both is known and changing between 80kHz and 300kHz. So by knowing the time shift between both the phase shift can be calculated. The time shift is 300ns-1.5us.I was considering using the ZCD + XOR to compute the time shift between both. The output of the XOR can be easily measured by a MCU.The problem is that the current ZCD is not very simple given that the shunt I'm using is just 1mOhm for reducing the power dissipation. I have considered using an amplifier before the ZCD, to convert the shunt voltage in the mV range to something more usable but that will add a delay to the whole process as indicated in reference 1. I also considered using a comparator fed with the shunt voltage and compared to GND (carefully layout so the GND is not significantly contaminated) but even using an ideal OPAMP that would be problematic due to the noise in the signal, but comparators have the input offset voltage, which is a couple of mV thus causing a significant delay, specially for low currents.Thus I'm now considering the amplification stage both in voltage and current expecting to have a similar delay in both cases and thus resulting in an accurate shift measurement, but I'm not sure whether there's a simpler or better way of solving this issue.Please let me know if you have any suggestion to perform this measurement.RegardsReferences:1.https://e2e.ti.com/support/amplifiers-group/amplifiers/f/amplifiers-forum/1048966/ina293-q1-current-sense-amplifier-rise-time-prop-delay-and-response-time-data

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 28, 2024, 03:03:54 pm
content: What MCU clock frequency? Counting the phase directly may be feasible to applicable accuracy; 8 bits should be plenty for a general purpose controller. That's what I did in my last (series resonant) control.Beware that XOR is only effective for 0-180° or 180-360°; this is good for a phase-shift (transfer) network, such as measuring V(C) in the LLC (but that's complicated in H-bridge), but not for inverter output current where -90...90° is needed -- you instead need a type 2 for 90-270° (take e.g. rising edge voltage to falling edge current).Tim

author: moffy
author_rank: Super Contributor
timestamp: August 28, 2024, 09:41:34 pm
content: The AD8129 is a true differential amp with 200MHz BW @ gain of +10, might be suitable for amplifying the current shunt signal without significant delay. If the delay is constant over the range of interest it can be compensated for.https://www.analog.com/en/products/ad8130.html

author: murgui
author_rank: Newbie
timestamp: August 29, 2024, 08:49:44 am
content: @T3sl4co1lThe MCU has a frequency of 120MHz, Could you please explain what do you mean by counting phase? Is that a different approach to the problem?I had not thought about the limitations of XOR. Thanks for pointing these out. Whenever I find a feasible approach I will create a simulation and hopefully I'll be able to validate the chosen approach.@moffyThanks for the IC tip, it is a bit expensive but I'll keep it as a silver bullet.Regards

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 29, 2024, 02:16:48 pm
content: Counting, as in run a comparator on the voltage/current/whatever and use a timer input capture to count it relative to the reference. Most any MCU these days should easily be able to do this. Clocked at 120MHz, 300kHz gives 400 counts, or say 100 to 300 out of 400 total for the worst case phase range -- about 8 bits as said.Tim

author: murgui
author_rank: Newbie
timestamp: August 29, 2024, 02:59:44 pm
content: Ah I get it know, just skip the XOR and use the counter peripherals in the MCU to count the time. That's a very good idea to save a part and not having the limitations of the XOR, given that you can configure the system on rising or falling edge as desired.One problem still remains, regarding the extremely delicate shunt voltage. How did you do that part in your resonant converter? Maybe your shunt had a higher voltage and thus was not that concerning?Regards

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 29, 2024, 04:28:36 pm
content: Completely obviated: used current transformer.Did use DC link current to sense output power (times supply voltage, simply ignoring inverter losses), with a OPA2325 handling it (handling everything actually, offset is low enough for DC sense while bandwidth adequate for the resonant sense stuff -- this was operating at ~30kHz).Just using a fairly fast, low offset amp will suffice at reconstructing the current transformer equivalent signal using both shunts in the H bridge. Pay attention to the negative current flow, don't let it clip due to that.Tim

author: murgui
author_rank: Newbie
timestamp: August 29, 2024, 08:48:09 pm
content: I see, thanks for the valuable information.

author: murgui
author_rank: Newbie
timestamp: September 03, 2024, 10:10:56 am
content: I have followed your advice and implemented the amplifier through 2 LMP773X and then I'm using a comparator to trigger the ZCD.See circuit and simulation results attachment.I have added a BAT54W diode in order to avoid the negative voltage becoming excessive, but as seen in the simulation, the output of the comparator gets to VCC/2. I'm not sure this is what will actually happen or just a simulation artifact. I have seen some ZCD circuits and this is the method used for avoiding the negative voltage having any significant impact.Is there something I'm forgetting?Thanks and regards

author: moffy
author_rank: Super Contributor
timestamp: September 03, 2024, 11:58:56 am
content: If you can afford to AC couple the amplified current signal to the TLV3501, set the input bias point at half the TLV3501 supply, you will then get a cleaner output waveform and stay away from (V-)-0.3V.

author: Wolfram
author_rank: Frequent Contributor
timestamp: September 03, 2024, 01:30:26 pm
content: What's the ESL of your current sense resistor? I would be worried about how that affects the phase of your sensed current vs the real current. Also your op-amps will each provide some 8 degrees of phase shift each at 300 kHz when configured for G = 10 non-inverting, from the dominant pole compensation given GBW = 22 MHz. All of these could potentially be compensated, but the worry with large phase shifts is that they might also depend a lot on factors like frequency, temperature, parts and assembly tolerances.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 03, 2024, 02:35:53 pm
content: Once you start getting a significant phase shift in your amplifiers, you also get gain instabilities. The amplifier just does not work very good anymore. As bandwith is (largely) inversely proportional to gain, using multiple gain stages with a lower gain each improves the bandwidth.A higher value shunt resistor also helps to get more signal, and thus less amplification needed, but it is a tradeoff with power dissipation as you already mentioned. Still, tests with a higher value shunt may be useful for testing and verifying during the prototyping stage.