Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Algorithm Challenge

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

  • moodz
    replied
    Originally posted by pito View Post
    I think you are talking about: lock - in amplifier, which is not so good for metal detectors applications.
    Can you explain your reasoning ? ( its not a lockin amplifier though )

    Leave a comment:


  • pito
    replied
    I think you are talking about: lock - in amplifier, which is not so good for metal detectors applications.

    Leave a comment:


  • moodz
    replied
    Originally posted by pito View Post

    In my opinion VDI is about + /-10% accurate
    You are right but I am using a signal recovery technique before I measure the VDI .. in most detectors they just amplify / filter the RX signal then measure the VDI.
    The signal recovery technique allows for phase and amplitude recovery without the distortion ( phase due to filtering and amplitude due to non linearity in amplification ).

    Leave a comment:


  • moodz
    replied
    Originally posted by Carl-NC View Post

    Your attachments didn't come through.
    I only embedded a graphic. Didnt attach anything.

    To get 180 degrees just need the right sort of phase detector ... eg ( dual D Flip flop type or reciprocal counting etc ).

    Leave a comment:


  • pito
    replied
    Originally posted by moodz View Post

    1% of phase and magnitude error
    In my opinion VDI is about + /-10% accurate

    Leave a comment:


  • pito
    replied
    Originally posted by Carl-NC View Post
    1. So, for example, R/X goes to infinity for small foil.
    2. And X+R is negative for ferrous targets
    .
    1. so put limit ( threshold ) if value is higher we know that is a foil.
    2. use abs( X+R )​,
    √(x2 + y2)​ it is some kind of abs

    Leave a comment:


  • Carl-NC
    replied
    Originally posted by moodz View Post
    Thats strange. I was just working on this.
    ...
    Your attachments didn't come through.

    Leave a comment:


  • Carl-NC
    replied
    Originally posted by pito View Post
    Just use X + R and R/X , the numbers remain dependent on the amplitude and phase shift. Instead 10 degrees you have 35 fox ( a new unit with any name )
    I should have pointed out that this needs to work for the entire 180° of target space. I like to draw polar plots with 0° on the left and 180° on the right, opposite from normal trig, because that's how detector meters operate.

    Click image for larger version

Name:	image.png
Views:	473
Size:	15.4 KB
ID:	417455

    So, for example, R/X goes to infinity for small foil. And X+R is negative for ferrous targets.

    Leave a comment:


  • moodz
    replied
    Thats strange. I was just working on this.

    By taking the log of the input signals ( ref and sig ) all the trig math is dispensed with.

    Vmag = K log ( Va / Vb ) + c ..... K and c are trivial constants.
    Vphase = S ( Qa - Qb ) ...... S is the Phase slope ( eg millivolts per degree ) and Qa and Qb are the phases of Va and Vb respectively

    conceptually it looks like this. PD is the phase detector.



    the whole thing can be done in real circuits or partial or fully digital ... same result ( depending on your ADCs etc ).​

    In the real world my workbench circuit is recovering the amplitude and phase of a 50 millivolt signal in 10 volts pp noise with around 1% of phase and magnitude error @ 40 Khz.

    Leave a comment:


  • pito
    replied
    Just use X + R and R/X , the numbers remain dependent on the amplitude and phase shift. Instead 10 degrees you have 35 fox ( a new unit with any name )

    Leave a comment:


  • Carl-NC
    started a topic Algorithm Challenge

    Algorithm Challenge

    OK, here is a mini-challenge. Let's say you design a mixed analog/digital detector. You read in the X & R signals to the micro, and at some point you want to calculate the magnitude and phase. Mathematically, they are:





    However, these can be slow calculations in a micro. The challenge is this: Come up with magnitude and phase calculations which seek to minimize both execution time and memory requirement, and produce acceptably accurate results. "Acceptably accurate" is up to you to define, and to explain and rationalize if necessary.

    I have possible solutions but will wait to see what others come up with.
Working...
X