2
$\begingroup$

I am starting with an audio signal picked up from the microphone jack of my iPhone, generated by running a standard magnetic strip ATM card through a sensor.

On an old card, there will be a few degenerate bits:

enter image description here

Now filtering out this damage is one issue, which I have asked here: Removing noise from F2F signal

But how to determine the integrity of a particular section of track? How could I mark a particular area as being damaged?

I basically need some measure of smoothness for any given sample. My gut feeling is to work with derivatives. Taking the derivative amplifies noise.

But I can't see it clearly. Can anyone?

$\endgroup$
  • $\begingroup$ Can you mark on your plots the areas you would like flagged as damaged? $\endgroup$ – Martin Thompson Dec 2 '11 at 12:59
3
$\begingroup$

Typically you wouldn't directly use time-domain samples of a signal to declare its integrity (or lack thereof). I'm not familiar with the magnetic-stripe specification, but in most systems, any encoded data is protected by some form of checksum. This checksum is usually located in the same stream of symbols as the data of interest. Many systems also include error-correction coding, to provide tolerance to some number of symbol errors while still being able to recover the encoded information successfully.

Once the signal has been demodulated and you have recovered the symbol stream, you would calculate the checksum of the recovered data and compare it to the checksum that you read from the medium itself. If they match, then you can assume that the data is correct. If they do not, then you can try re-reading the medium again, or after some number of tries, you might declare it as a bad or damaged region.

This all begs the question, though: what is your goal of marking these regions as damaged? What will you subsequently do with the damaged areas?

$\endgroup$
  • $\begingroup$ I was looking at various ways of handling corrupted cards. One way would be to mark out all corrupted zones, and process each 'clean' chunk individually, then use checksums to attempt to deduce duff data. now it is looking like I don't need to go to this length; simply by improving my filtering I am correctly reading each bit irrespective of the amount of noise on that bit. $\endgroup$ – P i Dec 2 '11 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.