LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Array interpolant forced to pass by some point

Hi all,

I am filtering out some noise from my signals using PolyFit interpolation which normally works well. However, in some case the calculated interpolant must pass on a stated point: how can I force the interpolation process to pass by it?

Example: when determining the characteristics of a motor you must progressively brake it until it stops while you are acquiring, among other measures, the speed. In some case, it may happen that the obtained interpolant goes below zero, which is obviously not coherent with the phenomenon. So my problem is: how to obtain a clean interpolant which never goes below zero speed? Breaking down the curve by clipping it in the range 5000 ÷ 0 is not a good method since the result is a strange curve which again does not respects the actual phenomenon.

Thank you in advance for the suggestions.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 1 of 3
(2,715 Views)
Hi, take a look at this article http://www.korf.co.uk/spline.pdf.
They describe a similar problem, I gave a try to the implementation found at http://www.korf.co.uk/util_2.html and it seams to work well for undershoot too.

You could try to port it to CVI, if you succeed, post it here!! 😉

Ciao.

NicolaC
National Instruments
0 Kudos
Message 2 of 3
(2,700 Views)
Having studied the documentation you linked, Nicola, I came to the conclusion that this is not my actual problem. In the case you mention, the main goal is to obtain a smooth curve passing by some stated (few) points. My case is instead to determine a smooth curve inside a wide array of data (250 sample/sec) forcing it to pass near some point.

I found an alternative way by digitally filtering the signal before determining the interpolant.

Anyway, tank you for the documentation on this subject which was new for me.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 3 of 3
(2,677 Views)