Numerical Data Analysis and Noise Control

When we do numerical analysis on computer, the data we work on are bound to suffer from errors due to internal truncations. The amount of significant digits that a machine can carry while its carrying out arithmetic operations is called floating points and the bad things usually happen when the data being analyzed are so small that the magnitude of them hover around this threshold.

Numerical Fluctuations with High Signal-to-noise Ratio
The figure above shows some numerical singularity behavior observed from my FEM Displacement Integration Module. The several pronounced surges in the graph are due to the specific nature of operation being used. The magnitude of the displacement field I was integrating is usually around 1e-6. When I do a line integration of the fields especially at around the 90 and 270 degrees angle, I have to use a line equation that has a very high value of slope, usually around 10^6. Now, I need at last 12 significant digits to express a correct order of magnitude of the result and probably several tens more to insure correct arithmetic operations. Unless the machine size double working precision is specified, such a stiff requirement is usually not satisfied that the error gets accumulated and the end result is some noise on a clean nice looking data.

In case this singular behavior is only around a certain point of region and its deviation is significant from its expected value, correcting the problem is easy. There are several ways, but the most straightforward technique I use is,

1. linear interpolation, i.e., averaging scheme (best for isolated singularities with high deviation)
2. polynomial interpolation (best for intermittent singularities with lower magnitude of deviation)

The method 1 is the most straight forward. Set up an error detecting loop within a code based on how far a value deviates from an expected trend and once it detects one, average up several points around it and simply substitute the averaged result in. For a better protection, inserting a short conditional loop where it checks a sanity of the new averaged value. You know, if the new value to be substituted is too far away from the expected trend, do more elaborate things then simply averaging to get a value, stuff like that.

The polynomial interpolation requires a little bit of tweaking, especially when it comes to deciding a proper order of polynomial magnitude. You can do it manually, but it works best if you set up an automated loop in which it tries different orders of magnitude and compare the results with the original data pattern before it nails the new value in.

These methods are preferred especially when the speed of simulation is at its greatest priority as they do not require much demanding calculation power. In addition to this, you can sort of "tweak" the performance of correction by adding coefficient or implicating of a slightly more sophisticated correction formula to work along with it. However, the problem with these methods is that, first of all, they will not "perfectly" correct the errors and they simply fail to work when signal to noise ratio is very low.

No comments: