Author Topic: Arbitrary (saturable) coupled inductors in LTSpice  (Read 10606 times)

0 Members and 1 Guest are viewing this topic.

Offline uer166Topic starter

  • Frequent Contributor
  • **
  • Posts: 888
  • Country: us
Arbitrary (saturable) coupled inductors in LTSpice
« on: June 21, 2019, 11:32:20 pm »
Trying to simulate saturable coupled inductors/transformers in LTspice for some current sensing project, but seems like I can't couple arbitrary inductors.

I would like to simulate a transformer with a defined saturation level, slope, and hysterisis, but seems like I'm going about it the wrong way?

I tried reading http://ltwiki.org/?title=Transformers, but seems incomplete regarding this topic.. Anyone know what to do?
 

Offline cur8xgo

  • Regular Contributor
  • *
  • Posts: 148
  • Country: us
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #1 on: June 22, 2019, 12:12:35 am »
I dont know how to do this I just googled it..this looks interesting

https://electronics.stackexchange.com/questions/243927/transformer-with-hysteresis-in-ltspice

 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #2 on: June 23, 2019, 02:07:51 am »
Trying to simulate saturable coupled inductors/transformers in LTspice for some current sensing project, but seems like I can't couple arbitrary inductors.

I would like to simulate a transformer with a defined saturation level, slope, and hysterisis, but seems like I'm going about it the wrong way?

I tried reading http://ltwiki.org/?title=Transformers, but seems incomplete regarding this topic.. Anyone know what to do?

Can you provide details of the core that you are looking to model?

I will also need the winding information.


This can be done in LTspice, I will try and do it for you.

Regards,
Jay_Diddy_B
 
The following users thanked this post: uer166

Offline uer166Topic starter

  • Frequent Contributor
  • **
  • Posts: 888
  • Country: us
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #3 on: June 23, 2019, 09:46:45 pm »
The core itself is inconsequential, just trying to figure out a general way to do it. As example, and should be pretty close to something realistic I would use:

Core material is Square Orthonol: https://www.mag-inc.com/Products/Tape-Wound-Cores/Square-Orthonol/Square-Orthonol-Material-Property-Curves

Some arbitrary core size: 0.5cm^2 cross section area, 10cm magnetic path length.
Turns: 20 turns per winding, 1:1 ratio.

Use case would be: apply a known DC voltage to one winding, wait for current to ramp and saturate, look at the EMF output of secondary winding.
 

Offline ahbushnell

  • Frequent Contributor
  • **
  • Posts: 738
  • Country: us
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #4 on: June 24, 2019, 12:49:58 am »
Trying to simulate saturable coupled inductors/transformers in LTspice for some current sensing project, but seems like I can't couple arbitrary inductors.

Here is a paper on the topic from TI. 

http://www.ti.com/lit/ml/slup109/slup109.pdf


Nonlinear simulation can be complicated.  Depends on what you are trying to do. 

TI as other sources of information.  And your local library.

Good luck

Andy
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #5 on: June 24, 2019, 02:04:47 am »
uer166 and the group,

I am going to repeat the experiment that is shown in this MIT video:

Link:

Using the Magnetics Inc Square Orthonal Material with a core that has a 10cm path length and a 0.5cm2 cross section.

The Magnetic Inc datasheet shows the BH loop as:



The H units are Oested. The conversion from Oested to A/m is multiply by 79.58

I will use the Chan model that is described in the LTspice help file.

The following material properties are needed:




Hc from the material datasheet is 0.16 Oested = 12.7 A/m

Bs = 1.4T
Br= 1.38T

The core dimensions are also needed:



BH loop model



The core model is put in a test circuit, similar to the one shown in the MIT video.

The following BH loop can be plotted. This matches the datasheet.




Bias Current Model


The model can be modified to measure inductance versus bias current. The bias current is stepped and a small ac current is used to measure the inductance..



The result is:




I have attached the LTspice models for those playing along at home.

Regards,
Jay_Diddy_B





« Last Edit: June 24, 2019, 02:13:51 am by Jay_Diddy_B »
 
The following users thanked this post: BravoV, JJalling, MagicSmoker, mark03, doktor pyta, uer166

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #6 on: June 24, 2019, 02:25:28 am »
Hi,

Now that we know that the model is working we can strip off the 'instrumentation' used to measure B and H.

We are left with:



This gives the expected result:




I have attached the LTspice model.


Regards,

Jay_Diddy_B
 
The following users thanked this post: BravoV, JJalling, uer166

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #7 on: June 24, 2019, 03:28:43 am »
Jay_Diddy_B, always admire your ltspice kungfu kicks, thanks.  :-+

Offline uer166Topic starter

  • Frequent Contributor
  • **
  • Posts: 888
  • Country: us
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #8 on: June 24, 2019, 05:58:31 pm »
All I can say is: holy crap :o

This might take some time to wrap my head around it, but thank you for amazing work!
 

Offline ahbushnell

  • Frequent Contributor
  • **
  • Posts: 738
  • Country: us
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #9 on: June 26, 2019, 12:03:40 am »
Hi,

Now that we know that the model is working we can strip off the 'instrumentation' used to measure B and H.

We are left with:



This gives the expected result:




I have attached the LTspice model.


Regards,

Jay_Diddy_B
Looks linear.  Have you tested in the nonlinear region?  Validated with real parts? 

Looks good.

 

Offline uer166Topic starter

  • Frequent Contributor
  • **
  • Posts: 888
  • Country: us
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #10 on: June 26, 2019, 12:37:08 am »
"Have you tested in the nonlinear region?"

Oh yes, in simulation the saturation looks great, very similar to real-world trace (albeit of another core).

I don't have these specific cores yet but the non-linear region seems to be accurately simulated, which is what I care about most in this application.
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #11 on: June 26, 2019, 02:28:42 am »
Looks linear.  Have you tested in the nonlinear region?  Validated with real parts? 

Looks good.




The Square Orthonal  material is normally used in special applications. The Magnetics Inc website says:

[b]Square Orthonol

[/b]Square Orthonol, a grain-oriented 50% nickel-iron alloy, is manufactured to meet exacting circuit requirements for very high squareness and high core gain, and is usually used in saturable reactors, high gain magnetic amplifiers, bistable switching devices, and power inverter-converter applications. Other applications such as time delays, flux counters and transductors demanding extremely square hysteresis loops require selection of Square Orthonol.



I am not convinced that this is good material for current transformers. A small amount of dc current will cause the core to saturate.

The model matches the Magnetics Inc datasheet for the material.

I have used the Chan model for ferrite material and found it to be reliable.

Regards,
Jay_Diddy_B
 

Offline uer166Topic starter

  • Frequent Contributor
  • **
  • Posts: 888
  • Country: us
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #12 on: June 26, 2019, 04:40:33 am »

I am not convinced that this is good material for current transformers. A small amount of dc current will cause the core to saturate.

It is not a current transformer, rather a DC current sensor based on a different effect. The mechanism relies on the core to be easily saturated, and it does so at some frequency in the "bistable switching devices" use case as postulated by manufacturer of the core.
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #13 on: June 26, 2019, 12:20:21 pm »

I am not convinced that this is good material for current transformers. A small amount of dc current will cause the core to saturate.

It is not a current transformer, rather a DC current sensor based on a different effect. The mechanism relies on the core to be easily saturated, and it does so at some frequency in the "bistable switching devices" use case as postulated by manufacturer of the core.

Hi,

So you want to model a dc current sensor, similar to the one described here:

Link: https://www.nutsvolts.com/magazine/article/magnetic-saturation-and-the-100-amp-dc-current-transformer



I can modify the model, using the same core described in my earlier post, to include the DCCT functionality:



I am stepping the input current from -100A to 100A. The circuit works as described in the Nuts and Volts article.

The core is an oscillator, a low pass filter is needed to extract the average value.



I have attached the LTspice models.

Regards,

Jay_Diddy_B


« Last Edit: June 26, 2019, 12:22:22 pm by Jay_Diddy_B »
 
The following users thanked this post: BravoV, uer166

Offline uer166Topic starter

  • Frequent Contributor
  • **
  • Posts: 888
  • Country: us
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #14 on: July 02, 2019, 10:55:07 pm »
I think fundamentally the operation of that 100A coil is the same as in what I have in mind, except I'm trying to make use of the coercive magnetization to make a sort of "pseudo"-differential measurement of low current values (in order of a couple mA DC).

Basically go one way into saturation, then the other way, and see where the current hits the "wall" that coincides with the Hc point. This wall will move in opposite directions when there's another source of DC flux in the core, making measurement possible.

While simulation works great, while waiting for hardware, I'm trying to see all potential real world issues.

One thing I'm having a hard time reconciling is the ridiculous change of Hc (Coercive force) with frequency. (Example attached). This means that the location of the "HC wall" shifts with frequency, but I can't visualize how that looks like when one applies some field to the core.

What does this really mean? To me, the coercive force is just how much field you need to create in opposite direction to reset the magnetization of material once it hit saturation one way. Why would frequency affect that? Are they talking about a simple sinusoidal field? What happens if the field is close to a square wave? Does that mean the simulation is woefully incorrect since it implies a constant Hc, which is actually 10s or 100s of times higher at high frequency (e.g. at the square wave edges)?

This doesn't seem trivial, but I wonder if it's possible to simulate even more arbitrary cores where the BH curve itself shifts with frequency (becomes much wider at higher frequencies), as it does in real life.
 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #15 on: July 03, 2019, 11:57:46 am »
.
« Last Edit: August 19, 2022, 02:25:56 pm by emece67 »
 

Offline uer166Topic starter

  • Frequent Contributor
  • **
  • Posts: 888
  • Country: us
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #16 on: July 03, 2019, 06:26:38 pm »
May I ask about the geometry of the core you are modelling?

It's a simple ungapped toroid. I just use the cross section area and magnetic path length in my simulation. The cores I'm looking at are made by winding a very thin strip of Nickel-Iron or Cobalt-Iron alloy onto a bobbin, I'm assuming to decrease eddy currents, although I presume there is still current flowing in loops in sort of a planar fashion in the metal..
 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #17 on: July 05, 2019, 08:04:55 am »
.
« Last Edit: August 19, 2022, 02:26:02 pm by emece67 »
 

Offline uer166Topic starter

  • Frequent Contributor
  • **
  • Posts: 888
  • Country: us
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #18 on: July 24, 2019, 01:35:15 am »
Sort of, I'm trying to select appropriate cores and basically specify the "ideal" values. I need as high permeability as possible in the Hc regions to make the measurements easier. What's core conductivity? you mean electrical conductivity to calculate eddy current losses? Unfortunately no idea on this one.. Maybe I can take it apart and see, but I know these are very thin (double digit microns?) Nickel or Cobalt-iron tape wound cores.

As an update: so far so good! First prototype current meter with a Toshiba core has a DC offset of about 200uA, can measure +-150mA with 2KHz bandwidth, or 20KHz bandwidth if I do less filtering in DSP, at the expense of some noise which would still be less than 1mA RMS. Attached is me manually putting some DC current through core using a power supply with approx. values. and seeing the output. Error is around 0.1% at 20mA which is wayyy better than expected.

Also the scope trace are the 2 coil currents of the self-oscillating core, and the ADC sampling ISR in yellow.
 

Offline uer166Topic starter

  • Frequent Contributor
  • **
  • Posts: 888
  • Country: us
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #19 on: July 24, 2019, 01:41:23 am »
Looks linear.  Have you tested in the nonlinear region?  Validated with real parts? 

I did now!
 

Offline ahbushnell

  • Frequent Contributor
  • **
  • Posts: 738
  • Country: us
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #20 on: July 24, 2019, 02:17:03 am »
Cool,

Very good.
 

Offline uer166Topic starter

  • Frequent Contributor
  • **
  • Posts: 888
  • Country: us
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #21 on: October 02, 2019, 01:47:20 am »
So I'm a bit stuck now, just as I thought everything was figured out. In general the sensor that was implemented is able to measure down to 0.2mA resolution of DC current with various cores.

What the issue is: some cores seem to exhibit highly asymmetric magnetic properties when saturated clockwise vs. counter-clockwise. I'm relying on the symmetry for the sensing, so it blows it all out of the water. I've seen resultant DC offsets of anywhere from 1mA to 20mA caused by this effect.

Some observations:
  • It's a consistent core-to-core variation. Cores that are symmetric are always symmetric, ones that aren't, never are
  • In some cores there's a huge dependence on mechanical stress. If I squeeze a core it can change the level of asymmetry dramatically
  • I tried various materials, including Metglas 2714A and some Chinese suppliers. I thought it was a quality issue at first, but even expensive Metglas fails?
  • The asymmetry is somewhere between highly temperature dependent and temperature dependent, so can't simply calibrate it out
  • The integral of the current going through core seems to still be same one way vs. the other, only shape is different with an inflection point

I've read about https://en.wikipedia.org/wiki/Exchange_bias and similar things, but found no practical info as to how to combat it, or how to specify a core that is fully symmetric..  |O |O |O

It's possible that I'm going about it the wrong way and the usual peak detection circuit usually used for fluxgate sensors is more appropriate. Right now I'm sampling the current approximately in the coercive force regions to detect asymmetry caused by another current source.
 

Offline uer166Topic starter

  • Frequent Contributor
  • **
  • Posts: 888
  • Country: us
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #22 on: November 29, 2019, 03:20:29 am »
I know it's been a while, thanks for helping out with this thing, the simulation was key to make the sensor work! Also a variation of this made a nice fluxgate magnetometer that picks up earth's field pretty well, useful in a compass application. Would you be able to explain how you coupled the inductors via the .subckt statement? I've tried to draw the V1, E1, F1 sources with their connections as per the statement but still really confused by it..
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: Arbitrary (saturable) coupled inductors in LTSpice
« Reply #23 on: November 30, 2019, 03:03:02 am »
I know it's been a while, thanks for helping out with this thing, the simulation was key to make the sensor work! Also a variation of this made a nice fluxgate magnetometer that picks up earth's field pretty well, useful in a compass application. Would you be able to explain how you coupled the inductors via the .subckt statement? I've tried to draw the V1, E1, F1 sources with their connections as per the statement but still really confused by it..

Let me try and build it up.

The coreBwinding Model



This is what the circuit looks like described by these directives:



params: n=1 is the default number of turns. The default is one turn.

n is the number of turns on that winding.

.global coreB

This is essentially a global variable that is shared between all the sub-circuits. This how the windings are coupled together.

This circuit is an ideal transformer winding. The left side is a single turn winding. The right side is n times bigger in amplitude. F1 draws n times the current from the single turn side.

WBx


This is used to define a winding using the coreBwinding subckt.



The parameters include setting n, the number of turns and series and parallel resistors.

Winding model




The model includes the parallel and series resistors as shown above.

Two winding transformer

You can build a two winding transformer like this:



This transformer is 1:1 and is placed in a test circuit. The symmetry is obvious. The model will work equally well if the primary and secondary are swapped.

Non-Linearity

As shown so far the model does not include any non-linearity and has no core saturation.

The core can be added by connecting the non-linear inductor between coreB and ground.

Regards,
Jay_Diddy_B



« Last Edit: November 30, 2019, 03:04:38 am by Jay_Diddy_B »
 
The following users thanked this post: uer166


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf