The performance of my first motion filter was not very good, so I spent some time looking at it. I set up my windmill like device that has a penny on the end of one of the arms, It can spin at a constant speed and swing the penny past the coil at the same distance every time. This gives a source of consistent signals to test with.
I actually have one more stage in my delay line than I showed in the drawing last time. I was just running out of room on the drawing. So I can have 8 coefficients in the filter. I changed to -1, -1, +1, +1, +1, +1, -1, -1. This represents a bandpass filter with a center frequency of 7.5 Hz. This worked a little better.
I found that my low pass filter was causing a problem. After accumulating A/D samples to produce 60 Hz samples I had added a low pass filter with a time constant of 4/60. This worked fine in the no motion case, but when I turned off the low pass filter I found that the optimum speed for this filter was quite fast, around 60" per sec. At that speed the signal from the coin was quite brief, around .07 sec and the low pass filter would take most of it out.
So without the LP filter, and with a sweep speed of 5 feet per second it was working well at 4" with the ID's spread over about 10°. It would even work marginally at 5" but the ID's were spread over 20° or more. Now the problem was how to slow it down. To slow down that FIR filter I would have to increase the length of the delay line which would use up more memory or I would have to slow down the sample rate. Or I could go to an infinite impulse response filter which would use less memory.
For now I decided to drop the sample rate to 30 Hz. I was not sure this was a good idea because it does not seem to be very many samples on the target. This dropped the sweep speed to 30 inches per second, which is fast but not an impossible sweep speed. Since I could not use the LP filter I replaced it with a median filter which I thought would not cause the same problem ( I will still use the LP filter in pinpoint mode). But the median filter also cut into the signal. The peak of the target signal is only about two samples wide and the median filter would lop off the tallest of the two.
So one conclusion I have reached is that the FIR delay line would have to be at least 12 samples long, and longer would be better. But each position in the delay line is two channels of 24 bit data. That is 6 bytes per delay stage. Sixteen stages would eat up almost 20% of my RAM.
Another conclusion is that I should provide a way to switch sample rates between 60, 30, and 15 Hz. I had planned to provide variable filter speeds by changing filter coefficients, but it suddenly seems like a good idea to switch clock rates. The 15 Hz would be for slow sweeps. At slower clock speeds I would be accumulating more A/D samples and getting a better signal to noise ratio.
Robert Hoolko
I actually have one more stage in my delay line than I showed in the drawing last time. I was just running out of room on the drawing. So I can have 8 coefficients in the filter. I changed to -1, -1, +1, +1, +1, +1, -1, -1. This represents a bandpass filter with a center frequency of 7.5 Hz. This worked a little better.
I found that my low pass filter was causing a problem. After accumulating A/D samples to produce 60 Hz samples I had added a low pass filter with a time constant of 4/60. This worked fine in the no motion case, but when I turned off the low pass filter I found that the optimum speed for this filter was quite fast, around 60" per sec. At that speed the signal from the coin was quite brief, around .07 sec and the low pass filter would take most of it out.
So without the LP filter, and with a sweep speed of 5 feet per second it was working well at 4" with the ID's spread over about 10°. It would even work marginally at 5" but the ID's were spread over 20° or more. Now the problem was how to slow it down. To slow down that FIR filter I would have to increase the length of the delay line which would use up more memory or I would have to slow down the sample rate. Or I could go to an infinite impulse response filter which would use less memory.
For now I decided to drop the sample rate to 30 Hz. I was not sure this was a good idea because it does not seem to be very many samples on the target. This dropped the sweep speed to 30 inches per second, which is fast but not an impossible sweep speed. Since I could not use the LP filter I replaced it with a median filter which I thought would not cause the same problem ( I will still use the LP filter in pinpoint mode). But the median filter also cut into the signal. The peak of the target signal is only about two samples wide and the median filter would lop off the tallest of the two.
So one conclusion I have reached is that the FIR delay line would have to be at least 12 samples long, and longer would be better. But each position in the delay line is two channels of 24 bit data. That is 6 bytes per delay stage. Sixteen stages would eat up almost 20% of my RAM.
Another conclusion is that I should provide a way to switch sample rates between 60, 30, and 15 Hz. I had planned to provide variable filter speeds by changing filter coefficients, but it suddenly seems like a good idea to switch clock rates. The 15 Hz would be for slow sweeps. At slower clock speeds I would be accumulating more A/D samples and getting a better signal to noise ratio.
Robert Hoolko