Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:51 04 Oct 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Electronics : Transformer core flux offset problem - continued.

Author Message
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3398
Posted: 11:47pm 02 Oct 2026
Copy link to clipboard 
Print this post

Discussion moved from
this thread as suggested by others.

  InPhase said  
  phil99 said  
  Quote  The voltage on the winding is proportional to the flux in the core.
It isn't that simple.
1) The voltage on the winding is proportional to the rate of change of the flux in the core.
2) The full-cycle average voltage on any secondary winding is always 0V, no matter how  asymmetric the the core flux may be.
There can never be a DC offset to measure.


The flux average isn't ALWAYS zero. When the flux is walking towards saturation, the is a cycle to cycle imbalance that can be detected and corrected by an integrating circuit telling the control loop to back off one way or the other.


  Quote   The flux average isn't ALWAYS zero.

That is my point, no matter how big the flux imbalance between half cycles gets the full-cycle average voltage on any secondary winding is always 0V.
It is the rate of change of flux that generates the voltage, not the amount of flux. For a sinewave maximum voltage is generated as the flux passes through zero, and the voltage is zero when the flux is at its peak. At the peak, for a brief moment, the flux is constant (0 rate of change) so no voltage.
This is why transformers don't work on DC.

The best you can hope for is the wave shape of the sensing secondary is sufficiently different when there is a flux imbalance between the two half cycles to be detected reliably. Core B-H nonlinearity might produce enough distortion but have not tested.

If there is a difference, something more complicated than an integrator will be needed to detect it.
Perhaps comparing the peak voltage of the half cycles may work. Scope images should show if this is practical.

For testing create a predictable flux imbalance by adding another thin winding to the transformer and passing a DC current through it, from a regulated current source. The current needs to be fairly constant despite the AC voltage generated in this winding.
A power supply with an adjustable current limit may be ok if the voltage limit is set higher than the p-p winding voltage.
.
Edited 2026-10-03 10:15 by phil99
 
wiseguy

Guru

Joined: 21/06/2018
Location: Australia
Posts: 1318
Posted: 01:06am 03 Oct 2026
Copy link to clipboard 
Print this post

Essentially I agree with your analysis and reasoning. When I have mentioned the use of an integrator to check for balance between the first and second 180° cycles, it was always to use the primary side excitation as the feed to the integrator as the output winding can only report what it can see - and it sees very poorly what is actually going on during saturation.

For clarification too, to take the output voltage sense from the mains output winding especially for unbalanced loads such as heat gun half cycle loading - if we ignore any resulting saturation effects, there would be a reduction of the peak voltage for the loaded 180° half, due to ohms law. Using a sense winding should reduce the error caused by the inherent secondary impedance.

When I first started playing with DC-AC conversion ~ 25 years ago I reasoned that using a DSP to look at the resulting output side response for each and every spwm cycle and modify the following duty cycle on the fly to correct for any deviation away from the expected result should work best, but to date it is just an untested theory.
If at first you dont succeed, I suggest you avoid sky diving....
Cheers Mike
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3398
Posted: 02:21am 03 Oct 2026
Copy link to clipboard 
Print this post

Modifying the following duty cycle on the fly in response to the primary current DC component should work well for a purely AC load current, as any DC component is then an error and needs to be corrected.

For a half-wave load it is more complicated.
The primary current has two components, the magnetizing current and the reflected secondary current.

Flux imbalance due to DC in the secondary current is almost exactly cancelled by an equal and opposite flux imbalance produced by the reflected component of the primary current. You don't want to "correct" this.
The magnetizing component of the primary current is where the problem arises. Any DC offset there can push the core toward saturation.
This is what needs correcting but how do you separate the two DC components?

Fortunately as KeepIS and others have shown as long as the halfwave current isn't too big it doesn't matter.
 
InPhase

Senior Member

Joined: 15/12/2020
Location: United States
Posts: 186
Posted: 02:26am 03 Oct 2026
Copy link to clipboard 
Print this post

Yes, I see the flaw in my logic. That winding can see a change in flux but it doesn't know what the baseline is supposed to be. Industrial inverters use an aux winding and an integrator, but that isn't the full picture and they are a little secretive about how they do the whole trick.

What about monitoring the primary current, and since the Arduino knows what half-cycle it is in, if it sees a large current on only one polarity, it will know that the flux is walking toward saturation? Some kind of differentiation monitors the slope, di/dt, and the greater the slope, the harder the control loop pulls back?
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3398
Posted: 03:02am 03 Oct 2026
Copy link to clipboard 
Print this post

  Quote  What about monitoring the primary current, and since the Arduino knows what half-cycle it is in, if it sees a large current on only one polarity, it will know that the flux is walking toward saturation?
Yes, as noted above that will work if there is no DC component in the secondary current.

With a half wave secondary load the net primary current can have two DC components. You need to correct one but not the other. How do you separate the two DC components?

Perhaps also measure the instantaneous secondary current, multiply by the turns ratio, subtract that from the instantaneous primary current and what is left should be the magnetizing current. Integrate that to find the DC offset that needs correcting.

Sounds like hard work.
 
nickskethisniks
Guru

Joined: 17/10/2017
Location: Belgium
Posts: 494
Posted: 06:41am 03 Oct 2026
Copy link to clipboard 
Print this post

Yesterday, I made a bit of hardware/software that allowes me to drive a powerstage, but with the intend to introduce some drive assymetry. There is no ac feedback yet, just a fixed modulation index. But I could modify the amplitude, positive cycle amplitude, negative cycle amplitude, deadtime and frequency with a rotary encoder during operation.
It looks interesting to add a setting wich makes it possible to adjust the deadtime in the pos and neg cycle apart from eachother.
I use a psoc5 development board wich is easy at the moment for timerbased creation of adjustable deadtime.

So I made a baseline by driving the powerboard with symetric drive. My transformer hums in that situation, wich is interesting because I assume firmware creates symetric pulses and the assymetry is created in the hardware, but it does not matter now because in the end the balancing system removes both.


But actually it was a nice situation to investigate, so by setting modulation index to 0.95 on one half of the period the hum dissapeared. (Doing this on the wrong half period made it worse)

So by making a 0.5% difference removed the hum but it came back so I needed to increase to 1% but this in time was a bit much, back to 0.5% and back ok, but after a few seconds not enough, so back to 1% and so on...

My resolution is only per 0.5% steps, so steps of 0.1% would be more interesting, the flux offset was only in one direction.

So now I could think about a measuring method to detect the offset and control it. It needs to be accurate because I can't really notice a lot imbalance on scoop images. I have allready winded some extra turns on the transformer to experiment with, the waveform does not look so pretty so a bit of light filtering will be needed.
With the setup I could deliberate introduce assymetry and let it auto correct, that will be the goal.
Edited 2026-10-03 16:47 by nickskethisniks
 
analog8484
Senior Member

Joined: 11/11/2021
Location: United States
Posts: 234
Posted: 04:44pm 03 Oct 2026
Copy link to clipboard 
Print this post

  InPhase said  
The best you can hope for is the wave shape of the sensing secondary is sufficiently different when there is a flux imbalance between the two half cycles to be detected reliably. Core B-H nonlinearity might produce enough distortion but have not tested.

If there is a difference, something more complicated than an integrator will be needed to detect it.



From a paper I read a while back, I remember the wave shape asymmetry is a key indicator of flux imbalance.  An integrator is unlikely to be adequate by itself.  I think a filter was used in the paper to pull out mainly the second (and maybe the fifth IIRC) order harmonics before the integrator.  The lab test results looked impressive but I doubted its robustness in real world systems without lots of calibration.  I don't like things that rely on precision analog filters as their performance is likely to change based on component variability, aging and temperature.
Edited 2026-10-04 02:57 by analog8484
 
analog8484
Senior Member

Joined: 11/11/2021
Location: United States
Posts: 234
Posted: 05:14pm 03 Oct 2026
Copy link to clipboard 
Print this post

  phil99 said  

Flux imbalance due to DC in the secondary current is almost exactly cancelled by an equal and opposite flux imbalance produced by the reflected component of the primary current. You don't want to "correct" this.


Can you explain more why no correction should be made?

For the half wave load, it seems the inverter should not drive the PWM for the unloaded half cycle nearly as much as for the loaded half cycle.  I imagine this would reduce the peak flux imbalance.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3398
Posted: 09:31pm 03 Oct 2026
Copy link to clipboard 
Print this post

The two components of the transformer primary current can be seen better if you view a real transformer as an ideal lossless transformer with an inductor across the primary (assuming its series resistance and inductance are small).

Then the inductor current is the transformer magnetizing current and the primary current is simply the load current multiplied by the turns ratio.

The load determines what that current is, you can't change it without changing the output voltage. If you reduce the drive to one half cycle you will get a distorted voltage waveform.

Easier to see if the ideal transformer is 1:1. Vs = Vp and Ip = Is, You could replace it with a pair of wires. The only thing left is the parallel inductor.
All you need to do is ensure there is no DC through the inductor by adjusting the PWM a small amount.
The low impedance of the H-bridge will give the load whatever current it demands. The PWM adjustments above mean a non-linear load will produce a little voltage distortion but you just have to put up with that.

The only catch is in the real transformer you can't directly measure the inductor (magnetizing) current, making correcting it tricky.
Edited 2026-10-04 07:32 by phil99
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026