Announcement

Collapse
No announcement yet.

Algorithm Challenge

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

  • #61
    The resulting new approximation has an error of only +/-0.35 degrees over the full 90 degree range.​ = and and metal detector VDI error + /- 10 deg. at 30 cm distance from target, VDI is more or less ok for short distances, so there is need in metal detector VDI improvement, algorithm can wait.

    Comment


    • #62
      Originally posted by Carl-NC View Post

      What we want is a simple way to come up with some kind of phase representation of the target response. Whether it's for displaying a VDI or doing discrimination or ground tracking. In all cases, having extreme precision is not really necessary, but consistency is. If you are writing a ground tracking algorithm, you can write it whether the phase calculation is perfect, or is off by a few percent, as long as a particular phase is always off by the same amount. Same with Disc, same with VDI. Obviously a phase calculation that is closer is better than one that is not, as you will not need to make as many fudges to various end-use algorithms. Detectors using crappy micros fake this stuff all the time, and it's good enough that no one seems to notice. One of the best ground tracking designs is in the MXT, which uses a lowly PIC16C76 clocked at 8MHz. That what this thread is about, getting good-enough results on a crappy micro.
      well the human eye has the most powerful "DSP" in the brain behind it. What is needed is a signature analyser where the signals are represented as a shape / color maybe that changes with the target VDI / amplitude etc.

      eg the area and tilt of the circle changes with phase. Area changes with amplitude.

      Click image for larger version  Name:	image.png Views:	0 Size:	94.9 KB ID:	418644

      also check this link ..."https://complex-analysis.com/content/domain_coloring.html"

      Comment


      • #63
        Lissajous patterns, I remember those. The White's V3 had a color 3-frequency hodograph that was quite useful, especially for id'ing bottlecaps and other flat steel.

        Comment


        • #64
          At Deus 1, V5.21 it works quite accurate.
          I always switch on it when suspect bottle caps.

          Comment


          • #65
            Quote:" .. and metal detector VDI error +/- 10 degrees at 30 cm distance from target, VDI is more or less OK for short distances, so there is need in metal detector VDI improvement"
            I sort of agree, but you have missed the details : Carl asked for an arctan approximation ( see the first post ) NOT a VDI generator. Maybe he wanted it for some further maths, like a fancy 3D multi-freq polar plot to out-do the Manticore? Or as his reply stated, auto-ground tracking algorithms. There are other uses for target/ground angle apart from simply creating a VDI readout.
            My first reply, detailing the logarithm scale approach to generating a VDI , catered for the VDI aspect neatly. My second reply addressed his request for an arctan calculator.

            Comment


            • #66
              As I was unable to attach an Excel spreadsheet document to my earlier post, I've wrapped it in a zip file.
              In this zip file is a single .xlsx Excel file. arctancubic2.zip

              Comment


              • #67
                Quote myself: "If 'simple + dirty'​ is needed, (X + 0.41 * R) is better. Use it for 0 to 45 degrees. If R >X , then swap them over and apply the formula to 90 to 45 degrees.​"
                I should've added more details.
                The intention is to make the approximation correct ( ish ) at 45 degrees, as well as 0 degrees. So magnitude = ( X + 0.414 * R ) is the intended calculation. However, for simpler maths , you can use: ( X + 3/8 *R ), or better still: ( X + 13/32 *R ), which obviously are achievable with simple adding / shifting.
                However DSP experts often do this calculation, and a look in some books on the subject show some other variants.
                If you DON'T want accuracy at 0 and 45, but want the average to be better ( over the 45 degree range ), you can reduce the X scaling to approx 0.95. Then approximations like (15/16 * X + 15/32 * R ) and ( 31/32 * X + 13/32 * R ) can be useful.
                I've attached some pages from 'Understanding DSP' by Lyons, that show these approaches.

                vector01_20240105_0001.pdf
                Attached Files

                Comment


                • #68
                  Excellent paper, thanks! Exactly the kind of stuff I was looking for. For simplicity, I would use Max + Min/2 as it requires no multiplication, just a bit shift. The error is only 12% max.

                  While phase is used to determine VDI, discrimination, and ground tracking magnitude is mostly used to determine audio loudness and depth estimation. Even a 40% error in magnitude (as with |X|+|R|) is not too big a deal. The audio will be louder for some targets and the depth reading will be a little deeper. "A little" is not the full 40% because signal strength is a 6th power function. Therefore, a 40% error in calculating the magnitude results in a 6% error in actual depth calculation. Using Max + Min/2 produces on a 2% depth error. I could live with either one.

                  Comment


                  • #69
                    Glad you found it useful. ( Max + 3/8 * Min ) is not too tough to calculate, ( 3 * Min ) is ( Min + 2 * Min ) or ( Min + Min + Min ) , basic adding and shifting operations.

                    Comment


                    • #70
                      Some more related linear approximations I found online:
                      DSP Trick: Magnitude Estimator - dspGuru

                      Comment


                      • #71
                        How about THIS for an idea,

                        A full colour "hodograph" in which (like the Whites "Signagraph") multiple samples are taken and multiple loops drawn. Where samples coincide in each "sweep" the "temperature" of tht point increases, so it initially draws the loop in say blue, then any points which are "hit" again in the subsequent passes, cause that point to go through a "temperature" range, ending in red. This would show the number of times a signal passed through that X-Y phase angle and would ceate a visual "fingerprint" of the target.

                        Comment

                        Working...
                        X