Sweep inductance?


 

I've tried to sweep inductance in my sim. I give value for inductor {Lsweep} and put directive .param Lsweep (1u+(200u-1u)*({time}/1m)) on the schematic, but it don't work?


 

To clarify I use equation L(t) = L_start + (L_end - L_start) * (t / T).

L=inductance
L_start=start inductance
L_end=end inductance
t=sim time
T=sim time length


 

You run into the same issue as time varying capacitance; you cannot just change inductance with time. How to handle it is in Help, though very obscure. I thought that I had seen it in an older version, in LT Spice Simulator > Circuit Elements > Inductor but could not find it there. It is much like a time varying capacitor but with flux as the variable instead of charge.
 
It is far easier to step.
 
Jim Wagner

On 12/17/2024 11:42 PM PST Richard Andrews via groups.io <richardandrews.ma@...> wrote:
 
 
I've tried to sweep inductance in my sim. I give value for inductor {Lsweep} and put directive .param Lsweep (1u+(200u-1u)*({time}/1m)) on the schematic, but it don't work?


 

That DOES NOT work, just like it does not work for caps.
 
Jim Wagner

On 12/18/2024 12:01 AM PST Richard Andrews via groups.io <richardandrews.ma@...> wrote:
 
 
To clarify I use equation L(t) = L_start + (L_end - L_start) * (t / T).

L=inductance
L_start=start inductance
L_end=end inductance
t=sim time
T=sim time length


 

Bah, I settled on a .step function for the inductor. I am used to programming and it would be nice to sweep component values with time. It would be a cleaner screen to view.


 

On 18/12/2024 09:26, Richard Andrews via groups.io wrote:
Bah, I settled on a .step function for the inductor. I am used to programming and it would be nice to sweep component values with time. It would be a cleaner screen to view.
You can't just sweep C or L values with time without considering the rules of conservation of energy/charge.

There are ways of sweeping some component values with time, but they general involve converting to a B-source. As a general rule, component values cannot be changed during an analysis, because they are parameters, which must be evaluated before the analysis starts.

Certain things can be changed during an analysis, along the lines of your L(t) equation, but they would require using a .FUNCtion. You can find more information:

Help > LTspice > LTspice® > Dot Commands > .FUNC -- User Defined Functions

--
Regards,
Tony



 

I really should get a printer and print this help file out along with a cheat sheet.  Thank you Tony.


 

On 18/12/2024 10:04, Richard Andrews via groups.io wrote:
I really should get a printer and print this help file out along with a cheat sheet.  Thank you Tony.
You could always read the Help PDF that you already uploaded to Files. 😉

--
Regards,
Tony