Announcement

Collapse
No announcement yet.

Simple example of how to simulate a target response in SPICE

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Simple example of how to simulate a target response in SPICE

    Someone asked this question on one of the forums. Cannot remember where, but here's a simple example that I've put together to demonstrate this capability:

    * Simple example of how to simulate a target response in SPICE
    * Residual RX signal
    V1 residual 0 SIN 0 15m 10K
    R1 residual 0 100MEG
    * Strength of target signal (phase retarded by 60 degrees)
    V2 strength 0 SIN 0 100m 10K 0 0 -60
    R2 strength 0 100MEG
    * Sweep signal
    V3 sweep 0 PWL(0,0 10m,0 20m,1 80m,1 90m,0)
    R4 sweep 0 100MEG
    * Modulate strength signal with sweep signal to produce target response
    E1 target 0 POLY(2) strength 0 sweep 0 0 0 0 0 1
    R3 target 0 100MEG
    * Combine residual and target signals to get RX signal
    E2 rx_signal 0 POLY(2) residual 0 target 0 0 1 1
    R5 rx_signal 0 100MEG
    .tran 100u 100m
    .plot v(residual) v(strength) v(sweep) v(target) v(rx_signal)
    .end

    This should simulate in any 2G6 SPICE simulator or equivalent. I also tested it with LTspice/SwitcherCAD III, as some people here are using this simulator.

    OK - so how does it work?

    V1 generates the residual signal in the RX coil due to any imbalance in the TX/RX coil arrangement. In the example it's set to +/- 15mV. The TX frequency is defined as 10KHz.

    The signal in the RX coil due to a metallic target is defined by V2. This was set to +/- 100mV with a phase shift of 60 degrees.

    The sweep signal simulates the action of sweeping the search head over the target. V3 is defined as a piece-wise linear (PWL) source, so appropriate rise and fall times can be defined. It should also be possible to simulate the condition where two or more targets are close together by changing the PWL values.

    E1 is a voltage controlled voltage source (VCVS) with its transfer function defined by a set of polynomial coefficients. In this case it's acting as a multiplier, with the strength signal being modulated by the sweep signal. What's happening here is that the target signal produced by E1 simulates the signal increase and decrease as the coil passes over the target.

    Lastly, E2 (another VCVS, configured as an adder) combines the residual and target signals to create the expected RX signal, complete with amplitude and phase-shift information.

    This may help those with SPICE knowledge to simulate some of those GEB and DISC problems that have been floating around here recently. Any questions, please do not hesitate to ask.


  • #2
    spice

    where do i get the spice program.

    Comment


    • #3
      Originally posted by Clondike Clad View Post
      where do i get the spice program.
      There are lots of free SPICE simulators available on the internet.
      One that is used by others on this forum is LTspice:
      http://www.linear.com/designtools/software/

      Comment


      • #4
        Can this same thing be done using Protel or DXP simulation, if so, any ideas how??

        Comment


        • #5
          Originally posted by Sean_Goddard View Post
          Can this same thing be done using Protel or DXP simulation, if so, any ideas how??
          On Altium's website they state that the DXP simulator supports SPICE 3F5, so the example should work without any problems.
          Personally I've never used Protel software, but here's a tutorial that may help:
          http://www.altium.com/pcad/resources...onanalyses.pdf
          On page 24 there are some instructions on how to simulate using an externally generated netlist. In this case you can simply cut-and-paste the example into the tool. Looks pretty straightforward.

          Comment

          Working...