# Difference between revisions of "The Arbitrary Inductor model"

m |
|||

Line 8: | Line 8: | ||

.end | .end | ||

− | LTspice's behavioral inductor may be parametrized, but the parser requires that all parameters or strictly parametric expressions must be enclosed within | + | LTspice's behavioral inductor may be parametrized, but the parser requires that all parameters or strictly parametric expressions must be enclosed within ''curly braces''. Strictly parametric expressions may not include "x" (inductor current) or other ''dynamic variables''. Below is a flux expression example of this technique. |

flux={L*Is}*tanh(x/{Is}) ; L= inductance and Is= "saturation" current | flux={L*Is}*tanh(x/{Is}) ; L= inductance and Is= "saturation" current | ||

− | Here further extended to add exponential control of saturation "sharpness". | + | Here this is further extended to add exponential control of saturation "sharpness". |

− | flux={L*Is}*tanh((x/{Is})**{a})**{1/a} ; a= saturation "sharpness" | + | flux={L*Is}*tanh((x/{Is})**{a})**{1/a} ; a= saturation "sharpness" (1=normal, >1=sharper) |

Note that the parameters for the above expressions must be defined elsewhere upon the schematic, usually as a parameter statement within a SPICE directive (SPICE text placed anywhere within the schematic). | Note that the parameters for the above expressions must be defined elsewhere upon the schematic, usually as a parameter statement within a SPICE directive (SPICE text placed anywhere within the schematic). | ||

− | .param L=330mH Is=2A a=3 ; fairly sharp saturation at 2A (the "a" | + | .param L=330mH Is=2A a=3 ; fairly sharp saturation at 2A (the "a" factor is exponential) |

Unlike the standard inductor, which defaults to a series resistance of 1mΩ, the arbitrary inductor has no series resistance unless explicitly specified (ctrl-right mouse button click on the inductor). Also note that the numerical dynamic range of the arbitrary inductor seems to be about only 15 decades or so. | Unlike the standard inductor, which defaults to a series resistance of 1mΩ, the arbitrary inductor has no series resistance unless explicitly specified (ctrl-right mouse button click on the inductor). Also note that the numerical dynamic range of the arbitrary inductor seems to be about only 15 decades or so. |

## Revision as of 22:08, 20 September 2009

LTspice allows specifying a behavioral inductance with an expression for the flux. The inductor's current *may* be referred to by the keyword "x" in the expression, but otherwise is completely arbitrary (i.e., may be any valid function of time and/or node voltages and/or branch currents within the simulation).

Below is a netlist example of an inductor with simple saturation.

L1 1 0 flux=0.33*2*tanh(x/2) ; 330mH inductor "saturates" at 2A (0.66 volt-seconds) I1 0 1 PWL(0 0 1 1) ; supplies unity di/dt so inductance corresponds to voltage .tran 0 5 1u 10m ; 5s transient run starting after 1us with 10ms maximum step size .end

LTspice's behavioral inductor may be parametrized, but the parser requires that all parameters or strictly parametric expressions must be enclosed within *curly braces*. Strictly parametric expressions may not include "x" (inductor current) or other *dynamic variables*. Below is a flux expression example of this technique.

flux={L*Is}*tanh(x/{Is}) ; L= inductance and Is= "saturation" current

Here this is further extended to add exponential control of saturation "sharpness".

flux={L*Is}*tanh((x/{Is})**{a})**{1/a} ; a= saturation "sharpness" (1=normal, >1=sharper)

Note that the parameters for the above expressions must be defined elsewhere upon the schematic, usually as a parameter statement within a SPICE directive (SPICE text placed anywhere within the schematic).

.param L=330mH Is=2A a=3 ; fairly sharp saturation at 2A (the "a" factor is exponential)

Unlike the standard inductor, which defaults to a series resistance of 1mΩ, the arbitrary inductor has no series resistance unless explicitly specified (ctrl-right mouse button click on the inductor). Also note that the numerical dynamic range of the arbitrary inductor seems to be about only 15 decades or so.