Announcement

Collapse
No announcement yet.

SPICE Simulation Challenge

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

  • #16
    Big problem ...
    "Mutual inductance statements aren't supported between non-linear inductors."

    Comment


    • #17
      There may be a way to "impress" the non-linear Chan core model onto a linear core inductance with multiple windings, and get around this limitation.
      But I need to think it about it somewhat first.

      However, in the meantime, I've modified the original simulation slightly. Apparently, when you define a mutual inductance that is less than unity, LTspice splits this into two separate parts:
      1) A completely non-coupled "leakage" inductance equal to (1-K)*Lx.
      2) A completely coupled "mutual" inductance equal to K*L.

      Hence, in this particular simulation, with K1 set to 0.29 we should set Knull to 0.71 (as LTspice seems to be considering Knull as a leakage inductance). In which case Lnull should be set to 996uH to achieve the correct balance. In fact, the result is even closer to reality. Also, Rx need to be rotated by 180 degrees.
      Attached Files

      Comment


      • #18
        In Ltspice it is possible to simulate a simple balanced coil using two inductors with a coupling coefficient (K). A metal target can then be created using a paralleled inductor and resistor, so that the time constant () of the target is defined by L/R. By adding suitable coupling coefficients between the TX inductor and the target, and likewise for the target and the RX inductor, it's effect on the RX signal can be determined.

        However, there are a couple of problems here. Firstly, this approach does not provide any distinction between ferrous and non-ferrous targets. Secondly, the manner in which the RX signal is phase-shifted for various targets, and the changes in amplitude, means that this method is only appropriate for DD coils.

        In order to simulate a concentric coil, you can add a third (nulling) loop that is electrically connected to the TX loop, and inductively connected to the RX loop with a suitable coupling coefficient. In this case you must be careful how you define the coupling coefficients, otherwise Ltspice simulation will fail with the "non-physical winding possibility" error message. With this topology, all targets give a phase-shift left and an increase in amplitude, but still no distinction between ferrous and non-ferrous.

        Carl suggested the use of a core model, if that was available in Ltspice. In fact, Ltspice does have a hysteretic core model based on a model first proposed by John Chan et al, but extended with the methods in US Patent 7502723. But ... sadly ... the Chan model, as implemented in Ltspice, does not support mutual inductance. In other words, you can only use the Chan model if you have a single-winding inductor, which is not at all useful in this case.

        To cut a long story short, the only available approach seems to be finding a method of providing mutual coupling of the various inductors without using the built-in coupling coefficient (K). Then it might be possible to attach the core model to the target inductance. To test this theory I placed a zero-volt voltage source (i.e. a short-circuit) in series with the TX loop, and linked this to a CCCS to inject the TX current into an inductor that represents the mutual inductance between the TX and RX loops. The value of the mutual inductance is calculated as:



        The voltage generated across the mutual inductance is then transferred to the RX loop using a VCVS with a gain of Km (where Km represents the coupling coefficient between the TX and RX loops). The result is a balanced coil arrangement that does not use the built-in coupling coefficient (K). Simulating this setup provides the same result as the original configuration.

        A nulling coil was then added to the mix, using the same method, but with the TX current injected into the mutual inductance associated with the nulling coil in anti-phase. Initially Knull was set to unity, and Lnull was swept around a range of values to find a suitable balance point. Once a suitable point was established to within 1uH, the balance was fine tuned by adjusting Knull. The final value of Knull was found to be 0.9, which seems a reasonable value for a nulling coil wound on top of the RX loop. The nulling coil inductance was found to be 581uH.

        In the case of the TX and RX loops, these are magnetically coupled. In the case of the nulling loop, this is electrically connected to the TX loop and magnetically connected to the RX loop. However, for the metal target, this is magnetically connected to both the TX and RX loops, so the model is somewhat more complicated, requiring the use of two mutual inductances. The TX current is injected into Lmt1 (the mutual inductance between the TX loop and the metal target) and the voltage generated across Lmt1 is transferred to the target inductance / resistance combination. Next, the current flowing in the target is transferred to Lmt2 (the mutual inductance between the metal target and the RX loop) and the voltage generated across Lmt2 is transferred to the RX coil. This setup gives similar results to the original setup, but still without any discrimination between ferrous and non-ferrous targets.

        At this point I added a core model to the target by replacing the inductance value with the details of the hysteresis loop and the core geometry. Having estimated (guessed) the values associated with the target, I tested the simulation. Unfortunately the results were less than perfect, and failed to produce any difference between ferrous and non-ferrous targets. This seems to be because the inductance value of the target is derived from the core parameters, and there is still a requirement to know the actual value of the inductance in order to calculate the two mutual inductance values. Thinking this may be the root of the problem, I then inserted the core parameters for a ferrite bead model that I found here → http://ltwiki.org/index.php?title=The_Chan_model

        The parameters are:
        Ferrite bead inductance (Lt) = 1.5uH
        Hc (coercive force) = 19.1 A/m
        Bs (saturation flux density) = 0.39 T
        Br (remnant flux density) = 0.15 T
        A (bead magnetic cross-section) = 3.575u m^2
        Lm (length of magnetic flux lines) = 6.9 m
        N (number of turns) = 1
        Lg (gap) = 0

        Although we have all the information required, the simulation results still did not match reality..

        Eventually I had to abandon the use of the core model, and created a simple ferrous target with the addition of a series capacitor. The complete simulation is attached.

        This is a stepped simulation with 9 separate targets, as follows:

        1. No target
        2. Aluminium foil
        3. Bronze
        4. Nickel, brass
        5. Aluminium
        6. Gold (bulk)
        7. Copper
        8. Silver
        9. Iron

        The simulation makes extensive use of the table function to connect the different models. Note that the last target (iron) phase-shifts left (like all other targets) but decreases in amplitude when compared to the residual RX voltage when no target is present. Also, if you sufficiently increase the coupling coefficient (Kmt) for iron, the RX signal will flip over and start to increase in amplitude. This is the same as happens in reality when a large chunk of iron gets close to the coil.

        In conclusion, this methodology allows both ferrous and non-ferrous targets to be simulated with a balanced coil arrangement, with the ability to demonstrate ferrous / non-ferrous discrimination. The model may not be perfect, but at least it provides a basis for further development if necessary. It may also be possible to simply revert back to the original coupled inductor version, but using the new ferrous model. At the moment I don't know the answer as I haven't tried it yet. I just wanted to present this here for your delectation, and give others to chance to play around with the Chan core model.

        For my next trick ... I need to get this working for a mono coil.
        Attached Files
        Last edited by Qiaozhi; 04-11-2019, 03:37 PM.

        Comment


        • #19
          Hi, long time...

          I can't test your solution properly, as I don't have much time. But I believe you are on the right track. I think Tec once mentioned ferrous targets increase coils' inductances, and that makes sense. Permeability is not an electric-modelable phenomenon, so it should be modeled behaviourally. However, just by increasing the coil's inductances It is unlikely to observe ferrous behaviour.
          I made a model of a ferrous target, and it is in a topic Target models for simulation. It is beautiful, and it produces a proper impedance plane response, and it is wrong
          However the impedance plane LOOKS fine, its frequency response in impedance plane is opposite from what it should. So for a single frequency it could be used, but beyond that the model is useless.

          A few hints... Spice won't allow coupling to add up beyond 1. So when you couple a lot of things with different coupling coefficients, it will usually work fine if each of them is under 0.5.
          With that in mind, there is no problem "splitting" a coil into a few pieces connected in series, and having separate phenomena coupled to different pieces. Say, you may have a vari-L model of a varying inductance in series with an actual coil that can be coupled magnetically via K statement. I was about to try that approach. I have no idea what the layout should be though.

          A good reason for separating permeability influence is the observed influence of geometry with ferrous vs. non-ferrous targets. While former works best when perpendicular to the coil plane, non-ferrous work best when laying flat.

          tl;dr - Id'd do it already if I had idea.

          Comment


          • #20
            Noticed spice has a ferrite bead. Tried it in my PI simulation. Rx signal didn't change phase during Tx on with the simulation like a bead does with my tester. Acts the same as an inductor. Anyone know if it should act different than an inductor in spice, maybe I'm using it wrong?

            Comment


            • #21
              Originally posted by Davor View Post
              I can't test your solution properly, as I don't have much time. But I believe you are on the right track. I think Tec once mentioned ferrous targets increase coils' inductances, and that makes sense. Permeability is not an electric-modelable phenomenon, so it should be modeled behaviourally. However, just by increasing the coil's inductances It is unlikely to observe ferrous behaviour.
              I agree. Non-ferrous targets exhibit redistribution, and ferrous targets exhibit absorption, which accounts for the difference. This is going to be very difficult to model correctly. Attempting to account for the differences by tweaking the coil inductance will not give the same result, as this is not what happens in reality. If that was the case, then VLF detectors would be not any more sensitive than a BFO.

              I'm experiencing trouble getting this method of target modelling to work with a mono coil on a PI.
              Any suggestions welcome.

              Comment


              • #22
                Whether redistribution or absorption, the Rx coil is falling off it's null perch either to the left or to the right. The cancelling field is either insufficient or too much, depending on kind of target presented within the tx field.
                This is tantamount to the resonance of the Rx coil shifting ever so slightly(actually shifting the resonance of Rx coil takes it away from balance even though no target is presented in the tx field.) This might provide some clue as a possible road to explore.
                There you have it, my two cents worth of idea. Incrementally vary the resonance to simulate different targets, not it's inductance. Maybe something like a series capacitance.

                Comment


                • #23
                  Alternatively, shifting the tx frequency ever so slightly up or down will carry the Rx coil out of balance as well. This might also be tantamount to a target in the tx field. Perhaps some mathematical relationship can be figured out between target conductivity and amount of shifting of tx frequency(theoretically, since the tx frequency doesn't shift or does it, hmmmm). The polarity would be simply choosing between left or right( increase or decrease in freq.) For ferrous/non ferrous. Maybe from this a model can be developed which more closely behaves like a true coil.
                  There, that's two more cents worth.

                  Comment


                  • #24
                    Can someone please put a 6.5 decimal frequency meter on a tx coil and see what change if any happens when a target is placed in its field?
                    I don't have such test gear. Various targets can be plotted, then presented as a model to mimic a target. Ferrous/ non Ferrous should present up or down shift.

                    Comment


                    • #25
                      As mentioned above, shifting frequency is there, but it nearly equally affects both Rx and Tx coils, so the effect largely cancels out.

                      I have a glimpse of an idea that involves a negative capacitance. There are various odd effects related with stray field of a transformer, including negative reactances, so why not. Negative inductance shifts response to a ferrous 2nd quadrant, so it is worth a try.

                      Comment


                      • #26
                        If you say they cancel out then I believe you. I was thinking they move in opposite directions, tx frequency go up, Rx resonance frequency go down and vice versa. Or they shift, but at different magnitudes. The relative difference causes the coils to become unbalanced. I suppose there's many ways to make sense of it but only one way it actually works in reality.
                        I go out for few days.
                        Nice you dropped by, Davor.

                        Comment


                        • #27
                          Don't get used to seeing me around
                          BTW, balance is not that narrowband phenomenon. You may expect 1:2 frequency range with decent balance... provided you are not a perfectionist.

                          @Qiaozhi, you may want to prune the LTspice files prior to zipping. Raw and FFT files are most certainly not needed. There is a setting that will help you maintain your disk less cluttered:
                          Attached Files

                          Comment


                          • #28
                            Theoretically it should be possible to simulate both ferrous and non-ferrous targets correctly by adding a core model. However, the core model in LTspice uses Hc, Bs, Br, A, Lm, N and Lg to replace the inductance value. So you still end up with a calculated value of inductance, but with some hysteresis. Unfortunately the addition of hysteresis does not appear to provide the expected target response seen by the detector within the simulation, and consequently no discrimination between ferrous and non-ferrous.

                            My latest attempt ( in post #18 ) "apparently" works for a VLF detector, but the results are not correct when simulated for a PI.

                            Personally I do not think the difference between ferrous and non-ferrous targets can be attributed to an inductance change, nor to a shift in resonance. It's the way the magnetic field is distorted by these different targets that is the root cause. This field distortion causes an imbalance in the coil coupling.

                            If you go to the Coilcraft site, there are some instructions on how to create models in LTspice for their power inductors. This involves the use of parameterized GLaplace components. and an example is given for a Coilcraft LPS4018-332 inductor. Interesting ... but maybe not an approach that would be useful in this instance.

                            Another possible approach could be using B elements with an arithmetic function to emulate either redistribution or absorption.

                            Comment


                            • #29
                              Originally posted by Davor View Post
                              @Qiaozhi, you may want to prune the LTspice files prior to zipping. Raw and FFT files are most certainly not needed. There is a setting that will help you maintain your disk less cluttered:
                              Useful information.

                              Comment


                              • #30
                                OK - here's my latest thoughts on this subject:

                                If you have a VLF detector with a balanced coil system, the RX loop has a residual signal when no target is present. If a non-ferrous target gets near the coil, there is a redistribution of the magnetic field that causes an imbalance. For a concentric coil, this results in an increase in the amplitude of the RX signal, and all target types cause a left shift in the phase. If a ferrous target gets near the coil, there is some absorption of the magnetic field that also causes an imbalance, but in this case the RX signal experiences a decrease in amplitude. The phase shift is used by the GEB channel to detect the presence of a metal target, whereas the amplitude changes are used by the DISC channel to indicate ferrous or non-ferrous.

                                However, if you take a PI with a mono coil, the same increase / decrease in amplitude is not detectable. The reason is (of course) because we no longer have a balanced coil system. What we are looking at is the latter part of the eddy current decay curve once the huge flyback signal has decayed away. Redistribution and absorption are still taking place, but there is no balanced coil system there to experience an imbalance. Essentially it's not possible to have true ferrous / non-ferrous discrimination with a PI and a mono coil. It is only possible to have discrimination based on conductivity, which is not the same thing. This is why you see demonstrations of PI detectors on youtube rejecting iron nails, but never rejecting a range of ferrous targets of different sizes and shapes. White's TDI is a good example of this process, where the ground balance feature is highjacked to eliminate small iron nails, and provide 2 different tones for high and low conductivity items.

                                Others have suggested that it may be possible to provide discrimination with a mono coil by measuring the change in inductance of the loop when a target is present. However, based on a BFO's sensitivity and ability to discriminate, I doubt very much this method would be very effective.

                                Although this is not strictly speaking a "mono" coil, Deemon presented a very interesting balanced mono arrangement. I tested this arrangement in LTspice and discovered that if you place all four loops within the coil shell, and wind them to have the same inductance, it still works as a balanced system. This removes the need to use external coils which would make it difficult to swap coils. I also built this arrangement and found it surprisingly easy to balance. At the end of day, however, this is still a balanced coil system masquerading as a mono.

                                So my conclusion (at the moment) is that real effective ferrous / non-ferrous discrimination cannot be achieved with a mono coil.
                                Now, go and prove me wrong ... not with an LTspice simulation, but with some real hardware.

                                P.S. I'm talking about a standard PI setup here, and not other variations that use truncated sine or triangular waves, etc.

                                Comment

                                Working...