a method to correct data corrupted by overflow

19
A Method to Correct Data Corrupted by Overflow Ben Christensen Jay Brady Dec. 5, 2013

Upload: skule

Post on 24-Feb-2016

46 views

Category:

Documents


0 download

DESCRIPTION

A Method to Correct Data Corrupted by Overflow. Ben Christensen Jay Brady Dec. 5, 2013. Topics. A brief introduction to overflow. How do we identify a signal which has been corrupted by overflow? How can we correct a corrupted signal? What kind of signals can be corrected? - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: A Method to Correct Data Corrupted by Overflow

A Method to Correct Data Corrupted by Overflow

Ben ChristensenJay Brady

Dec. 5, 2013

Page 2: A Method to Correct Data Corrupted by Overflow

TopicsA brief introduction to overflow.How do we identify a signal which has

been corrupted by overflow?How can we correct a corrupted signal?What kind of signals can be corrected?New moving average based unwrap

method.Conclusion.

Page 3: A Method to Correct Data Corrupted by Overflow

Overflow

Overflow is a problem that can occur in Digital Signal Processing (DSP).

Overflow occurs when a value is represented in binary using an insufficient number of bits.

Systems are usually designed to avoid overflow, but this is not always possible.

Page 4: A Method to Correct Data Corrupted by Overflow

OverflowThe value of ‘5’ using two’s compliment is 0101this requires 4 bits -- 1 ‘sign’ bit plus 3

‘value’ bits

If you try to represent a number using fewer bits, you may lose information and possibly change the sign bit.

0101 has a decimal value of 5

101 has a decimal value of -3!

Page 5: A Method to Correct Data Corrupted by Overflow

OverflowExample:

9-bit Sine wave represented with 8 bits

Page 6: A Method to Correct Data Corrupted by Overflow

Overflow Identification

For continuous signals, look for sharp jumps or discontinuities.

If the signal is noisy, you need to look at the distribution.◦The distribution will be limited to

values within the representable range

Page 7: A Method to Correct Data Corrupted by Overflow

Overflow IdentificationExample:

Page 8: A Method to Correct Data Corrupted by Overflow

Correcting Signals with Overflow

If continuous and noise-free, a simple ‘unwrap’ function can be used.

But how can we correct the signal if noise is present?◦A more sophisticated ‘unwrap’

function can be used.

Page 9: A Method to Correct Data Corrupted by Overflow

AssumptionsThe signal must be slowly-

varying.The signal must be finely

sampled. The noise cannot exceed the

total bit-range.

◦Our simulations were done using fairly low-frequency sinusoids.

Page 10: A Method to Correct Data Corrupted by Overflow

Signal Model

Signals are sinusoidal with added Gaussian noise.

Page 11: A Method to Correct Data Corrupted by Overflow

Signal ModelIf the signal overflows, it has an

added ‘overflow factor.’

m – number of times the signal has overflown (positive or negative).

b – number of bits.

Page 12: A Method to Correct Data Corrupted by Overflow

Moving Average Unwrap

If can be subtracted from the original signal can be restored.

The trick is finding m and n (i.e. how much correction and where?)

Page 13: A Method to Correct Data Corrupted by Overflow

Correcting the signalRegions of overflow are identified using a

moving average estimator◦The difference between the moving average

and signal must be under the overflow detection threshold for some number of samples “c”

The value of the function before and after these regions are used to determine the correction factor needed ( -2b, 0, or 2b)

The areas of overflow are removed, and the correction terms added

Page 14: A Method to Correct Data Corrupted by Overflow

Using moving averages to locate overflow regions

Page 15: A Method to Correct Data Corrupted by Overflow

0-bit noise (no noise)

Page 16: A Method to Correct Data Corrupted by Overflow

7-bit noise

Page 17: A Method to Correct Data Corrupted by Overflow

8-bit noise

Page 18: A Method to Correct Data Corrupted by Overflow

ConclusionsContinuous signals with added noise that suffer from overflow can be corrected for given:The sampling frequency is much

greater than frequencies that make up the signal

The noise is limited below the bin limits

Page 19: A Method to Correct Data Corrupted by Overflow

Questions?