Spline smoothing algorithm in C

I work in Engineering at an industrial plant, for some of our online simulations we consider high-frequency output from thermocouples, sensors, etc. by its nature, this data is subject to a "noise" effect, which makes live analysis of such a time the data in the series are complex.

We use the SAS statistical package for stand-alone analysis, which includes its own smoothing procedures. SAS smoothing procedures are based on Christian Reinsch 1967, available here: http://www.cise.ufl.edu/class/cap5416fa10/resources/Reinsch_1967.pdf

As a proof of concept, I managed to rewrite the Reinsch Algol 60 code in C (C is the programming language that I am most familiar with, as well as langauge), and I'm pleased with the output I'm getting testing my code with samples of datasets.

I would like this functionality to be added to our control room, we have custom trending packages, etc., where this functionality is very desirable. I am concerned about the performance of the algorithm, especially on large datasets, I was looking for previously developed C spline smoothing algorithms, but there seems to be little choice.

I own a fairly popular textbook, “Numerical Recipes in C,” which has its own implementation of cubic spline interpolation, but found that this is unacceptable due to the use of custom headers and reassignment of array attributes, the use of custom “vectors”, etc., The GNU Science Library (GSL) also works similarly.

Ideally, I would like to rely on external libraries as little as possible, as people become uncomfortable with additional dependencies in our production environment. Are there existing algorithms in plain C? I must add that my experience is in engineering and not in computer science, so any code that I write myself is more likely to be less effective than existing implementations.

+3
1

, , C, Algol, . , .

http://www.pcs.cnu.edu/~bbradie/cinterpolation.html

(: archive.org)

-1

Source: https://habr.com/ru/post/1793738/


All Articles