Announcement

Collapse
No announcement yet.

DSP in commercial prospecting and treasure hunting metal detectors ... and GPZ 7000 speculation

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

  • #61
    Originally posted by scrungy_doolittle View Post
    I thought that ground balance was simply shifting the sample point one the received curve relative to the transmitted curve. In which case you would need a good deal more than 8 values. I would think you would need at least 360 samples, so you could adjust the ground balance to a precise degree, or am I just smoking something
    To include ground balance, you would need to take a sample at (or near) the zero-crossing point(s) As far as I can see, Mr. Crocker is taking the first sample at a later time. As you are familiar with the Arduino code, maybe you can determine at what time (relative to the TX signal) that the first sample occurs. There does not appear to be a mechanism whereby the detector user can adjust this sample delay, so it's pretty evident that this functionality has not been included, or that he's even aware of the requirement for GB on a VLF.

    In an analog detector (and also in many digital detectors, which do not have direct sampling) the synchronous demodulation is done in hardware. In this case you have a defined sample pulse-width, and the value is stored in a capacitor. With direct sampling, you may be able to get away with a single sample, but subsequent samples would need to be accumulated and integrated over time to remove unwanted noise, as you would normally do in hardware. Probably the best way would be to simply try it. At least, with software, it's relatively simple to test various ideas without having to resort to the soldering iron.

    Comment


    • #62
      Mr Crocker deserves a bit more praise. I like the 3rd (and 5th) removal mechanism. It supports square wave Tx, which means you may design an incredibly simple and effective energy saving Tx that operates at just about any frequency you throw at it, without tuning anywhere. It may enable a completely brain-free and frequency independent implementation of dual frequency method, AND keep the energy saving goodies too.

      Now GB.

      Ground signal is impractical to extract from the received signal using sumation methods simply because the amplitude of GB is changing with differences in ground proximity while waving around. Therefore in VLF we extract it by means of a GB channel that is orthogonal against the ground response vector. Such a channel that does not contain ground response is used to generate audio. There is not much to it, you simply apply some muffling mechanism to avoid chatters, and do some tone generation, either proportional audio or VCO.
      If you only use a GB channel, you get a TR detector that detects all metals, and no ground. Such configuration is the most sensitive VLF scheme.
      Tuning GB to properly reject ground is done by bobbing the coil, and thus maximising the amplitude variation of ground response. When GB is correct, there is no response while bobbing.
      By applying discrimination you lose a bit of sensitivity.

      Practical implementation...
      A GB channel in a classic VLF is done by sampling demodulation of input signal at 90° from ground response. You tune it to precisely 90° by adjusting phase of a clock supplied to a sampling demodulator. Resulting voltage has 0V response for any amplitude of ground.
      In micros you operate on vector components I and Q, and these are demodulated baseband signals. Each of the components has its own amplitude, and a vector they represent is seen in a Cartesian diagram. Obtaining any phase in between is performed by simple addition/subtraction of the I and Q components.

      It goes like this...

      Say you have a vector V with amplitude r and angle α
      - in Cartesian coordinates it would stand as x= r cos(α), and y= r sin(α)

      Say we want to rotate a whole vector by angle β
      - we obtain x' and y' as follows: x'= x cos(β) -y sin(β) and y'= x sin(β) + y cos(β)

      To obtain ground balance in such constellation we'll use either x' or y' (not both) that has minimum value (preferably 0) while bobbing a coil. To reach at that angle we may either establish the angle β directly using atan2 method as Mr Crocker, or more precisely by successive approximation (PLL/Costas loop style) where noise is less of a factor, and you may substitute sines and cosines with observing zero crossings. The best way of doing this is in a semi-automatic fashion: press button and bob -> find solution -> release button. You may try automating this as well in case you have lots of memory at disposal. It should work reasonably well on most terrains.

      There is also a completely different approach using multiple frequencies, and so far amateurs did not tread in that direction. GB is achieved by subtracting (scaled) responses at two (or more) frequencies, and the catch is that practically all ground effects respond equally at different frequencies, while targets respond differently. After subtraction you get only a difference of target responses in a GB channel.

      Comment


      • #63
        How *does* it remove the 3rd harmonic?

        I have a number of other comments to make on this, BUT the forum times out to quickly. By the time I have composed a reply, it requires me to log in again, and I lose them all.
        I wish carl would set the timeout for 10 mins rather than 1 min. The short "kill the user" time is really really irritating. Having to relog in every time you are idle for more than a minute really sucks.

        Essentially, the sampling portions of detectors in the analog VLF types, can be reduced to accessing a range of data items in a buffer if you have a fully digitized signal for both the transmit and recieve.
        If you are generating a sine wave via table lookup and feeding a DAC, it is a trivial matter to save the data you send to the DAC into a buffer. Each time you output a value, you also sample the receive signal and
        buffer it, you will have two digital data streams that can be in synch. Say you want to sample the wave form at 75 degrees through 114 degrees, and since C is 0 based, you actually would index
        the signal relative to 0, so for (i=75; i<74+40;i++) { value=buffer[i]+value;}
        Would add up all the values from 75 degrees through 114 degrees. This is one sampling window.
        Whites generates another channel relative to the RECIEVED signal called rectangular_drive. That is used to auto ground balance. So if you have the reference transmit signal (square or sine) you can apply a
        user selected setting to define the sample window across the received signals. Typically whites does that with a couple of comparators running off the transmit signal. One typically has a GEB control the other a
        DISC control, and basically they are just setting the sample delay.

        The one derived from the RECEIVED signal (i.e. centered on the recieved signal at the 90 degree angle) is done by scanning for the 90 degree angle, from the start of a cycle in the received buffer.

        Comment


        • #64
          Originally posted by scrungy_doolittle View Post
          BUT the forum times out to quickly. By the time I have composed a reply, it requires me to log in again, and I lose them all.
          I wish carl would set the timeout for 10 mins rather than 1 min. The short "kill the user" time is really really irritating. Having to relog in every time you are idle for more than a minute really sucks.
          A few people have asked this question before, but there is no time-out set by the forum. The problem of "timing-out" is a feature of your browser. If you select the "Remember Me?" checkbox, this issue will go away.

          Comment


          • #65
            Most of us adopted that "remember me" option, and logout at exit. It works OK.

            Regarding the 3rd and 5th removal, see the attached picture. As digital filtering is basically a convolution, you may treat each filter's mask as a signal source and see how it performs in frequency domain by observing FFT. If you have any problems following the previous sentence, simply observe the picture.

            As you may see, the 3rd is suppressed by almost 60dB, and 5th even a bit more. Not bad for a simple scheme.
            Attached Files

            Comment


            • #66
              Originally posted by Davor View Post
              Most of us adopted that "remember me" option, and logout at exit. It works OK.

              Regarding the 3rd and 5th removal, see the attached picture. As digital filtering is basically a convolution, you may treat each filter's mask as a signal source and see how it performs in frequency domain by observing FFT. If you have any problems following the previous sentence, simply observe the picture.

              As you may see, the 3rd is suppressed by almost 60dB, and 5th even a bit more. Not bad for a simple scheme.
              So what program did you use to model this? The first picture is obviously a model of the sampling applied to a wave form. The second is an fft of that sampling, correct? I presume the 125 is an artifact of something in the model, since this code actually runs around 7.1K.
              So what about the algorithm supresses the 3rd and 5th harmonics. And how does this compare to a band pass filter?

              Comment


              • #67
                Originally posted by Qiaozhi View Post
                A few people have asked this question before, but there is no time-out set by the forum. The problem of "timing-out" is a feature of your browser. If you select the "Remember Me?" checkbox, this issue will go away.
                hmm. I'm use firefox 27.0.1 but this time out in explorere, Chrome or firefox. not sure where the "remember me" button is.

                All of this discussion by the way, is very helpful.
                I hope it leads to a simple, open source code base for a fully computerized IB detector.

                Comment


                • #68
                  Scrungy, log out, at top right hand side of screen where it says login tick the remember me box when you login .

                  Comment


                  • #69
                    Originally posted by 6666 View Post
                    Scrungy, log out, at top right hand side of screen where it says login tick the remember me box when you login .
                    Thanks. got it. What a relief.

                    Comment


                    • #70
                      I think the sim is Pspice

                      it is free on Linear Technology site

                      Comment


                      • #71
                        Originally posted by scrungy_doolittle View Post
                        So what program did you use to model this?
                        I'm sure Davor will confirm that it's LTSpice.

                        Comment


                        • #72
                          Originally posted by Davor View Post
                          Mr Crocker deserves a bit more praise. I like the 3rd (and 5th) removal mechanism. It supports square wave Tx, which means you may design an incredibly simple and effective energy saving Tx that operates at just about any frequency you throw at it, without tuning anywhere. It may enable a completely brain-free and frequency independent implementation of dual frequency method, AND keep the energy saving goodies too.

                          Now GB.

                          Ground signal is impractical to extract from the received signal using sumation methods simply because the amplitude of GB is changing with differences in ground proximity while waving around. Therefore in VLF we extract it by means of a GB channel that is orthogonal against the ground response vector. Such a channel that does not contain ground response is used to generate audio. There is not much to it, you simply apply some muffling mechanism to avoid chatters, and do some tone generation, either proportional audio or VCO.
                          If you only use a GB channel, you get a TR detector that detects all metals, and no ground. Such configuration is the most sensitive VLF scheme.
                          Tuning GB to properly reject ground is done by bobbing the coil, and thus maximising the amplitude variation of ground response. When GB is correct, there is no response while bobbing.
                          By applying discrimination you lose a bit of sensitivity.

                          Practical implementation...
                          A GB channel in a classic VLF is done by sampling demodulation of input signal at 90° from ground response. You tune it to precisely 90° by adjusting phase of a clock supplied to a sampling demodulator. Resulting voltage has 0V response for any amplitude of ground.
                          In micros you operate on vector components I and Q, and these are demodulated baseband signals. Each of the components has its own amplitude, and a vector they represent is seen in a Cartesian diagram. Obtaining any phase in between is performed by simple addition/subtraction of the I and Q components.

                          It goes like this...

                          Say you have a vector V with amplitude r and angle α
                          - in Cartesian coordinates it would stand as x= r cos(α), and y= r sin(α)

                          Say we want to rotate a whole vector by angle β
                          - we obtain x' and y' as follows: x'= x cos(β) -y sin(β) and y'= x sin(β) + y cos(β)

                          To obtain ground balance in such constellation we'll use either x' or y' (not both) that has minimum value (preferably 0) while bobbing a coil. To reach at that angle we may either establish the angle β directly using atan2 method as Mr Crocker, or more precisely by successive approximation (PLL/Costas loop style) where noise is less of a factor, and you may substitute sines and cosines with observing zero crossings. The best way of doing this is in a semi-automatic fashion: press button and bob -> find solution -> release button. You may try automating this as well in case you have lots of memory at disposal. It should work reasonably well on most terrains.

                          There is also a completely different approach using multiple frequencies, and so far amateurs did not tread in that direction. GB is achieved by subtracting (scaled) responses at two (or more) frequencies, and the catch is that practically all ground effects respond equally at different frequencies, while targets respond differently. After subtraction you get only a difference of target responses in a GB channel.
                          I come from old school analog detector usage i.e 5900di pro 6000/di series 3. Where you don't do any bobbing. Raise loop, press button, lower loop listen to tone, adjust balance, raise and repeat until there is no variation in tone. This is technically bobbing the coil, as you have to adjust and press the switch.
                          so if I understand right, standing at one spot and "bobbling" the coil up an down, and digitizing the signal looking for amplitude changes to be minimal is the same thing, then I'm good with that.
                          Your discussion of I Q and baseband lost me. how do I and Q relate to the whites X and Y channels? I know they generate a G channel based off one of these channels in their 4 filter machines.

                          I'll get this, and I am not as stupid as I sound, but it's going to take a bit to really understand this... On the other hand, my philosophy when teaching is "there are no stupid questions."

                          Comment


                          • #73
                            Originally posted by Daren View Post
                            STM32 the is the way to go. STM32F3 or F4 can sample 12 bits at 20nS
                            You can setup a nice ADC/DMA stright to your buffer then process it. It is absolutely amazing what that chip can do. Plenty of memory, 72MHz, DAC for sound or to drive coil, etc....
                            Here is a sample plot from the simple PI detector. Signal sampled after the first and only opamp (used to shift and expand signal to the ACD range)
                            plots of "base line - no target", "steel" and "gold".
                            [ATTACH]32399[/ATTACH]
                            After you have the profile then slow/fast integrators are done in software to detect target.
                            I fried my STM32F3 (12V charged cap plugged into 3.3V ooops); Just got STM32F4 nucleo but did not have time to play yet, the spec are spectacular .
                            Interesting.
                            You publish one of the best kept secrets in your pi.jpg picture and nobody notices it. Or does nobody understand the significance of the pivot?

                            Comment


                            • #74
                              The I and Q are at perfect quadrature, but X and Y channels in metal detectors may be at slightly different angle. Very similar thing.
                              You may understand role of I and Q by observing the Weaver method of obtaining SSB, only without the second mixers. These are called baseband because their frequency response mirrors against DC, and is always bandwidth limited by some sort of LPF. All software defined radios use this approach because it is handy for digital implementation.
                              Originally posted by scrungy_doolittle View Post
                              So what program did you use to model this? The first picture is obviously a model of the sampling applied to a wave form. The second is an fft of that sampling, correct? I presume the 125 is an artifact of something in the model, since this code actually runs around 7.1K.
                              So what about the algorithm supresses the 3rd and 5th harmonics. And how does this compare to a band pass filter?
                              It was LTspice, a free spice program that is used a lot among amateurs and beyond.

                              I used 1ms per sample for simplicity, so 8 samples in a period gets you to 125Hz.

                              The peak sample has amplitude 1, the smaller ones have 0.71, and there is a zero. These resemble the 3rd removal additions. The negative side is for negative samples, and why I did it this way should require a semester in signal processing, so just take it as is.

                              The point is that if you shove a square signal in, after this crude digital filter it will lose the most of the 3rd and 5th, which makes a square Tx a lot more appealing. You may imagine the square signal as simple as the polarity of samples.

                              Comment


                              • #75
                                Originally posted by Tinkerer View Post
                                Interesting.
                                You publish one of the best kept secrets in your pi.jpg picture and nobody notices it. Or does nobody understand the significance of the pivot?
                                I don't know if that is a secret or not, I did see it described in multiple places. I'm trying to fully understand magnitude of the phenomenon and find a "metric", "signal signature" or "signal space" where the differences between metals are most pronounced. If such signature can be found then build discriminating PI with just mosfet, mosfet driver, opamp and uC seems trivial.
                                The new STM32 nucleo F334R8 has software environment significantly different... it will take a while to rebuild enough system to continue collecting data...

                                Comment

                                Working...
                                X