I am trying to model a current clamp in Spice based on a mathematical model which uses frequency dependent inductances.
I have seen various articles on using Laplace code blocks for frequency dependent expressions, but these don't seem to behave properly when in circuit for AC sweeps, and I have tried passing parameters to the inductor value but these only seem to work in AC or Transient not both.
What I am hoping to achieve is an inductor whose inductance is selected from a look up table based on the instantaneous frequency of the stimulating waveform.
I have included an example netlist below to show the solution I am trying to get working. NB I am using ICAP4 which insists on Laplace functions being denominator loaded hence the use of "1/s" rather than just "s" to extract the frequency.
V1 1 0 AC=1 L1 1 2 (v(5)) R1 2 0 1k
B1 103 0 V=v(1) A1 103 104 LAPLACEA1 .MODEL LAPLACEA1 s_xfer( in_offset=0 gain=1 num_coeff=[0 1] den_coeff=[1 0] denorm_freq=1) A2 104 105 TABLEA2 .MODEL TABLEA2 Pwl( xy_array=[>] input_domain=.01 fraction=true) R2 105 0 1 .END
When I run the above sort of circuit in AC mode it seems to calculate L at the start of the run and keep it constant. I need a model that will work in both AC and TRAN as the intention is to replicate results from a network analyser to validate the circuit model against an actual device and then perform TRAN runs to examine the time domain response under varying conditions.