Frequency Dependance in AC and TRAN Analysis

Guest
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=[<< Table of F v L >>] 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.
 
What Spice variant is this? I don't recognize the syntax.

On Tue, 17 Jul 2007 04:31:08 -0700, adrian_sawyer@postmaster.co.uk
wrote:

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=[<< Table of F v L >>] 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.
...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

America: Land of the Free, Because of the Brave
 
adrian_sawyer@postmaster.co.uk wrote:
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=[<< Table of F v L >>] 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.
The general technique to make a controllable/variable impedance is to use a
VCCS connected to itself. So, try a VCCS fed from the laplace transfer
function output with the laplace input connected to the VCCS output.

--
Kevin Aylward
ka@kevinaylward.co.uk
 
Jim Thompson wrote:

On Tue, 17 Jul 2007 04:31:08 -0700, adrian_sawyer@postmaster.co.uk
wrote:

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=[<< Table of F v L >>] 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.

What Spice variant is this? I don't recognize the syntax.
Shame on you Jim. Its xspice, well maybe a bit modified, the inductor line
don't make sense in xspice, but the other stuff looks basically ok.

Kevin Aylward
ka@kevinaylward.co.uk
 

Welcome to EDABoard.com

Sponsor

Back
Top