Announcement

Collapse
No announcement yet.

Using FFT and neural network on a PI detector

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

  • Using FFT and neural network on a PI detector

    Wondering if a PI detector of the kind described below is feasible:
    1. A normal PI transmission in the coil. (The transmission pulse may also be shaped)
    2. The response/decay is sampled at 5 micro seconds (or any suitable speed), at least 10 bits (or more), 64 samples (this should be enough).
    3. FFT of the 64 samples into 64 frequency strength+phase bins.
    4. This gives us 64 frequencies of 3125 hz resolution. (Ground response may be removed like its done in vlf).
    5. Run these 64 freq+phase through a neural network for : first learning and then for target characterisation.
    6. The transmit and sampling could be done on microcontrollers/processors like ESP32/STM32 (real low cost) or any processor that has preferably a built in adc that can sample at desired speed.
    7. The neural network could be run on a tablet/mobile phone/RPI or any suitably powerful device.

    Frequency spectrum of an exponentially decaying signal :
    https://pages.jh.edu/signals/spectra/spectra.html

    FFT library for ESP32 :
    https://medium.com/swlh/how-to-perfo...e-45ec5712d7da

    My knowledge of signal processing / controllers and neural network is a little old, may be about 20-30 years, and better techniques may be available.

    Please opine.

  • #2
    Not sure if an FFT gives usable info about the decay curve but it is worth investigating.

    I have played with using a processor to analyze a PI decay curve. I used a PIC32MX250F256B sampling 128 points at 2usec with a 12 bit ADC. for each pulse Then averaged together (really just summed since the process native size is 32 bits) 32 pulse cycles before processing the data. This still produced a result fast enough to feel real time and reduces noise by 5.
    All the pulse and sample timing is done with the PIC's hardware timers and data transfers with DMA leaving lots of CPU for processing data and all the other 'housekeeping' tasks (audio out, Display updates, UART debug in/out, Read adjustment pot adcs). This is a reason I used the PIC32.
    I did an exponential curve fit to produce a decay time. This worked pretty well to determine TC of target. Never got this packaged to try in the field.
    Also did EF and GB in the software post sampling. Another thing is integration of signal (Software version on a PI integration op-amps) that greatly increases the sensitivity.

    The hardware used is the MOSFET coil switch and the Pre-amp I used in my Hammerhead 2 detector. Software replaced the remaining HH circuits.

    There has been a PI detector post on Geotech that uses a Neural network. The guy doing this has a good web site on how he did it. A search of the forum should find it. His web site is in Russian but translates well.

    The biggest software task with Neural networks is the 'training' of the network.

    Good luck, have fun and please post results.

    Comment


    • #3
      One sample is sufficient to determine if there is a target.
      Two samples are sufficient to null a particular slope (ground) but also results in a target hole.
      Three samples is sufficient to distinguish 1/t ground from exponential eddy targets.
      Anything beyond 3 samples is probably a diminishing return-on-investment. It's kinda the same with multifrequency, anything over 3 frequencies doesn't buy you anything. Doing an FFT on the decay slope has been discussed from time-to-time but it probably doesn't provide any more useful information than you can get with fewer samples and simpler processing. But I'm also a big proponent of trying new things just to see what they can do.

      Comment


      • #4
        About 30 years ago, I had read in, an still older edition of POPULAR ELECTRONICS, that some law enforcement agency had actually used chirp (I think it was linear, and broad spectrum) to scan targets, and was able to use the response to match with existing response of tafgets (neural network would learn this) to roughly identify actual weapon type. The contraption was big, probably occupying an almirah.

        I dont know how far that experiment was developed. But, yes, this pi+fft+neural network does exactly that in a hand held, portable device. 40-50 years ago, the techniques and devices werent so advance, so the functionality was limited.

        Generating a chirp is slightly more involved, and requires signal processing techniques, an intermitent pulse train or even a single pulse would both, have large number of harmonics and conserve power.

        If the exciting signal is a pulse, of say 1 KHz, and the pulse shape is sampled, say at 200 Ks/s, and fft'd, it should give great amount of information about the target. Spectrum of a square wave :
        https://911electronic.com/square-wav...-and-spectrum/

        A square pulse/train is easy to generate by simply switching two complimentary transistors and has the advantage that harmonic content is much larger than in an exponentially decaying signal.

        The fft spectrum would show the response of a target over wide frequency range, and may be, humans could use first 4-5 frewuencies to guess the target, size, material and depth. I assume that usual ground response and integration over many pulse will be done in software.

        Processing thru a neural network would be far more useful in target characterisation.

        waltr's description is a great amountbof encouragement.

        Comment


        • #5
          kind of related to your question

          This patent has interested me for along time. It uses a back to back bipolar pulse for Tx. It then takes 1024 samples over a 200ms period. The samples are analysed using a DFT. I wanted make a scaled down version. But not sure what the coil core material is made of? It states in the text "ferrous", which could be iron or ferrite.

          https://patents.google.com/patent/US5525907A/en

          Comment


          • #6
            Altra,
            The patent is about magnetometer, which to my knowledge, nerds a core that can concentrate magnetic field. My feeling is that the system uses a small sized coil wound over, may be, a metglas cure. This exactly suits the design of a magnetometer.

            But for a metal detector, a high permeability core isnt the requirement.

            I have a feeling that an ordinary shielded low capacitance coil should do the trick. You need to actually start sampling with the start of the pulse transmission.

            Since the cost of the processing hardware (and software) isnt much, you should experiment and let all of us know about your successes

            And I'd further suggest that you should try and pulse the coil, may be 500 times, and process the signal for each pulse an decay. Use a pulse of, may be, 100 micro seconds, and sample in transmission and in the signal decay after excitation is shut off.

            Wish you good luck.

            Comment


            • #7
              Carl,

              I feel that FFT will give you a flood of information, that may be very difficult for the normal vlf/pi circuits and softwares to process, and thats why even multi-frequency devices have their limitation in gainfully utilising the data.

              However, with neural networks, I feel, the 'extra' (and mostly extraneous, till now) information can be processed to reveal target characterstics beyond the capabilities of present day detectors. A properly trained neural network, should greatly improve the senstivity and be able to characterise the targets to much finer details.

              I also feel that such a detector should be a boon to detect unexploded mines, in war and in peace (the Navy [and Army training] is still inside me, after so many years !!!!!)

              It should also greatly improve capabilities of devices even for body scanners, food scanners etc.

              Please see the capabilities and results of 2D image processing by ai/neural network and results there of :
              https://youtu.be/QmIM24JDE3A
              In a small microcontroller/processor, we may not be able to achieve such great results, but certainly, the capabilities of the detector can be improved.

              I guess, that as individuals, we may not have sufficient resources/capabilities, but I am sure that established/big metal detector companies can actually do wonders.

              Kindly opine.

              Originally posted by Carl-NC View Post
              One sample is sufficient to determine if there is a target.
              Two samples are sufficient to null a particular slope (ground) but also results in a target hole.
              Three samples is sufficient to distinguish 1/t ground from exponential eddy targets.
              Anything beyond 3 samples is probably a diminishing return-on-investment. It's kinda the same with multifrequency, anything over 3 frequencies doesn't buy you anything. Doing an FFT on the decay slope has been discussed from time-to-time but it probably doesn't provide any more useful information than you can get with fewer samples and simpler processing. But I'm also a big proponent of trying new things just to see what they can do.

              Comment


              • #8
                You may be right but I suspect the software will be quite the challenge. In any case, it's been proposed several times on these forums but no one has ever achieved it. You can be the first!

                Comment


                • #9
                  The most useful information to be extracted would be a spectrum of the time constants. It would allow to id the target based on shape and conductivity.

                  This is done in many fields of science and there's a plethora of algorithms, although no simple ones.

                  For example, this paper discloses a method using a Fourier type of transform and it claims to be unbiased and robust to noise.

                  https://www.sciencedirect.com/scienc...06349576856603

                  Comment


                  • #10
                    This would be almost as stating the obvious, but it is useful to have it on paper anyway. On the other hand, drawing conclusions from a spectrum would require some serious curve fitting. I'm not sure a method like this would do any good in weak signal conditions and a fuzzy curve fitting method. What you need is a binary yes/no result.

                    Comment


                    • #11
                      Yes, curve fitting is the term.
                      However, using summation of different ratios of exponential decays with different time constants, seems to be the real content of the paper.

                      I have no knowledge on this, neither any experience, but polynomial curve fitting could possibly work out, and may be able to give you 4-6 coefficients. However, if not done correctly, the equation can wildly oscillate between the points.

                      My feeling is that some kind of polynomial curve fitting should actually be used.

                      In this case, the curve is continuously decreasing with a calculable slope at every data point. That makes it easier to model and find an equation for.

                      May be a good idea to get hold of a math professor of a college to understand a (or many) possible method to curve fitting. And may be, use some students to actually do it.

                      This will be easier than fft and using nn for target characterisation.

                      Will big metal detector companies be interested in doing further R & D on this? Or has this idea been tried out and failed?

                      Any one from any metal detecting company here?

                      Please opine.

                      Originally posted by Davor View Post
                      This would be almost as stating the obvious, but it is useful to have it on paper anyway. On the other hand, drawing conclusions from a spectrum would require some serious curve fitting. I'm not sure a method like this would do any good in weak signal conditions and a fuzzy curve fitting method. What you need is a binary yes/no result.

                      Comment


                      • #12
                        I'm sort of new here, so here are my two cents.

                        Originally posted by Atul Asthana View Post
                        May be a good idea to get hold of a math professor of a college to understand a (or many) possible method to curve fitting. And may be, use some students to actually do it.
                        No need for a professor with a flock of students. Also, please let's not "use" students!

                        What is being proposed here has most likely been done in terms of signal processing, but probably not applied to MD. In fact, PI curves remind me of voltage decay curves of Time-Domain EM (TDEM) soundings, and those curves are often inverted on the fly by control units to give a general idea of subsurface conductivity and thus better adjust the survey setup.
                        In my opinion - but this has been stated by others over and over - the problem is the complexity of target responses and effects of the surrounding ground mixing up and yielding ambiguous curves. Yes, you can try to fit them in the time or frequency domain, and in principle discriminate between target types, but in practice you may get ambiguous results. I'm going to speculate that many have tried this before and got caught up at this point.
                        This doesn't mean it isn't feasible, just that it may not be worth the investment. You see, if there is a x% possibility that the target is falsely recognized as trash but in reality is gold, most would disregard the reading and dig it up anyway.

                        Comment


                        • #13
                          Two methods for estimating the distribution of time constants for target classification with pulse induction.

                          http://www.geosensors.com/global/Hol...SAGEEP2004.pdf

                          https://zonge.com.au/wp-content/uplo...7/perc2000.pdf

                          Comment


                          • #14
                            I guess, interpretation of 'use' in using the students, is due to the cultural difference.
                            I dont know why its objectionable?

                            Comment


                            • #15
                              Nozimo, thanks

                              From your statements that this technique has probably not been used in mds, I realise, I should have probably filed a patent but I dont know if this is non-obvious and Carl says that this has been discussed ad nauseam and, culturally, I believe in sharing knowledge.

                              Unfortunately, personally, my maths is very old, and a college prof would certainly know far better than me. Thats why a college maths proffessor. But if some one else here knows lots of maths and its implementation, that will be great, and I'd like to learn from him.

                              Students, will be able to take up such projects with great zeal, learning a lot in the process. And many students must already be working on signal processing, neural networks, curve fitting and such maths/technology, and may be able to produce something better/worth while. (Actually, even fpgas could be used, instead of processors or a combination, but may be costly). I recall, NASA 'used' engineering colleges, holding a worldwide college level competition for designing and producing a telemetry glider for Mars, where colleges across the world participated. This is an example in parallel processing and rapid development method in real life, many teams working independently (different approaches) and simultaneously to solve a problem. (https://www.nasa.gov/directorates/sp...enges/mav.html)

                              So, R&D is not limited to being expensive and done by labs of big companies, it can be distributed into many parts in many organisations with little or no cost and much greater societal benefits.

                              The md companies could learn from NASA's approach.

                              Yes, this approach is complex and there could be many false starts or blind allies, like in all R&D, and this requires lots of knowledge about target behaviour, ground conditions, target responses etc. thats why its being discussed on a metal detecting forum and not in a maths class room or in electronics engineering classroom.

                              No device on this earth, atleast with the current state of technology, can characterise/identify a buried target with 100% certainity, if present day simple pi and vlf technologies can give you a probability of 70-80%, fft+nn or curve fitting can improve this further.

                              Lets try and use knowledge from every direction possible: maths, electronics, signal processing, target characterstics, ground conditions and much more.

                              I dont know if there is any one here from any of the md companies, but if thete is some one, it may be a good idea to discuss this methodology of target detection and 'using' engineering students to develop a working model (as their project, may be two or three separate parts : one set of teams doing fft, another set doing nn, a third set doing curve fitting)

                              Originally posted by Nozimo View Post
                              I'm sort of new here, so here are my two cents.

                              No need for a professor with a flock of students. Also, please let's not "use" students!

                              What is being proposed here has most likely been done in terms of signal processing, but probably not applied to MD. In fact, PI curves remind me of voltage decay curves of Time-Domain EM (TDEM) soundings, and those curves are often inverted on the fly by control units to give a general idea of subsurface conductivity and thus better adjust the survey setup.. ...............

                              Comment

                              Working...
                              X