1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

How to model the inductor saturation in LT SPICE

Discussion in 'General Electronics Chat' started by gyshen, Jan 14, 2013.

  1. gyshen

    gyshen New Member

    Joined:
    Jan 14, 2013
    Messages:
    5
    Likes:
    0
    The model is attached, I tried to use the spice dierective to model the inductor, But a error called "multiple instances of L5" was observed, I do not know why, Could anyone see the attachment and give me some advice? Thanks!
     

    Attached Files:

  2. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,125
    Likes:
    564
    Location:
    AZ 86334
    This text "L5 0 N005 flux=93u*2*tanh(V(IND_I)/2)" creates a second instance of an inductor L5. The first is the graphical L5. Was all of the stuff on the right meant to be a comment. If so, it will appear in blue text, not black.
     
  3. gyshen

    gyshen New Member

    Joined:
    Jan 14, 2013
    Messages:
    5
    Likes:
    0
    the right is the spice directive, I want to use it to define the inductor saturation, But I do not think how to define it correctly, Could you tell me how to define a nonlinear inductor in LT spice?
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,233
    Likes:
    645
    Location:
    Ex Yorks' Hants UK

    hi,
    Check thru these two links.

    http://www.beigebag.com/case_nonlinear_ind.htm

    http://www.electronics-related.com/usenet/design/show/23920-1.php

    E.
     
  6. gyshen

    gyshen New Member

    Joined:
    Jan 14, 2013
    Messages:
    5
    Likes:
    0
    Thank you! I have seen those websites, and I tried the many ways to figure out the inductor model, however, error was observed when the simulation was running, I think my problem is how to define the nonlinear inductor in LT SPICE, I can not find any example from the website, some are just part of the model, so I do not know how to put them in my model, sorry for not understanding LT spice well, I am a new guy for LT spice, Could anyone who know this nonlinear inductor in LT spice tell me how to make a correct model in LT spice?
     
  7. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,049
    Likes:
    961
    Location:
    NJ
    Hi,

    The way they show in the Help is to specify the inductor like you did, but remove the actual inductor you drew in there (as the coil looking thing). Leave the text, remove the coil itself, so that there is only one "L5" to be found on your schematic and that is solely in the text itself.

    One slight catch however is that it may not accept the inductors and voltage sources the way you have them directly connected, so you may have to add a small value resistor in series with that voltage source first. This probably will lead to another node, so you have to change your L5 text definition to use that new node instead. So if you have say (partly) "L5 n005 0 ..." and the new node turns out to be n006, then you have to change that to "L5 n006 0...".
    That's after you add say a 1 ohm resistor in series with the voltage supply (the one you have seemingly set to 0v). So then you have a 'text' inductor in series with a real schematic resistor.

    To summarize, the resistor will be drawn as a regular resistor but the inductor will be text only (the text you already have but with a different node). The resistor will then appear to have nothing connected to it on the schematic but the text inductor will take over for the previously drawn inductor. The old 'drawn' inductor has to be removed.

    There may be other ways to do this too.
     
  8. gyshen

    gyshen New Member

    Joined:
    Jan 14, 2013
    Messages:
    5
    Likes:
    0
    Yes, I removed the drawn inductor and add a directive to define the inductor, The model is attached, Can you check whether this define is right? In the model, I add some voltage sources at 0V, just want to see the current flow through them. Thanks!

    Guangyao
     

    Attached Files:

  9. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,049
    Likes:
    961
    Location:
    NJ
    Hi,

    That looks better now. Try running it now.
     
  10. smethbet

    smethbet New Member

    Joined:
    Jan 20, 2013
    Messages:
    4
    Likes:
    0
    I want to use it to define the inductor saturation[​IMG]
     
  11. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,049
    Likes:
    961
    Location:
    NJ
    Hello again,

    I just have a question about how you came up with the flux multiplier. It sounds kind of low so i was wondering where you got that from.

    Also, if you are to use arctan instead of the tanh function for the flux you may want to also multiply by 2/pi. That's because the limits as x goes to infinity are different for the two functions. By using that multiplier, arctan then has the same limit which is probably a good idea because that allows you to set the max with the other multiplier (the very small number).

    For example, when you use:
    96u*tanh(x)

    the max is 96u, but when you use:
    96u*arctan(x)

    the max is not 96u, it is 96u*pi/2, so if we instead use:
    96u*arctan(x)*2/pi

    then we have a max of 96u again because we effectively canceled that pi/2 inherent in arctan(x).

    arctan(x) is a much slower function so that would be good for an inductor that enters saturation more slowly than tanh(x).

    I am assuming that LTSpice accepts "arctan(x)" rather than say "atan(x)". Check the actual syntax to make sure it works.
     
    Last edited: Jan 21, 2013
  12. gyshen

    gyshen New Member

    Joined:
    Jan 14, 2013
    Messages:
    5
    Likes:
    0
    Hi, MrAl,

    Thank you for your kind help, The model can work well for inductor saturation modeling, you are right that the tanh and arctan have some differences, and I tuned the parameters to make the simulated results match the measurement results because I use the arctan function.

    I tried both atan and arctan in LT Spice, I think they are identical in LT Spice.

    Thanks!

    Guangyao
     

Share This Page