LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Curve fitting measured damped oscillations

Solved!
Go to solution

I'm building a thrust stand and I would like to automate the calibration process. This requires that I apply a force to the thrust stand arm, measure the displacement and get the bolded components of the equation x(t) = A*exp(-gamma*t)*sin(omega*t) + C

"x(t)" is raw data from a displacement sensor. I have written a python script that, if necessary, can be called to read the data and find those components but I was wondering if labview had a similar functionality. Thanks. 

0 Kudos
Message 1 of 6
(4,810 Views)
Solution
Accepted by topic author PFour
0 Kudos
Message 2 of 6
(4,805 Views)

Thank you. I'm going to read through this, but may have more questions. I'll accept as a solution otherwise.

0 Kudos
Message 3 of 6
(4,787 Views)

@PFour wrote:

I'm building a thrust stand and I would like to automate the calibration process. This requires that I apply a force to the thrust stand arm, measure the displacement and get the bolded components of the equation x(t) = A*exp(-gamma*t)*sin(omega*t) + C

"x(t)" is raw data from a displacement sensor. I have written a python script that, if necessary, can be called to read the data and find those components but I was wondering if labview had a similar functionality. Thanks. 


It seems you need to find the constants to your equation for x(t): A, gamma, and omega. I'm not sure if the other curve fit algorithms will give you those values. I used this code from some time ago using the Hilbert Transform to calculate the Q of a damped sinusoid waveform. I modified it slightly to generate your constants. Try it and see if it works for you.

 

I didn't calculate "C". By definition of equation, C = x(t) at t=0. That's your initial condition. I also added a phase shift "phi". I needed it to analyze my data. You may or may not need it for your data.

 

Damped Sinusoid.png

 

Damped sin.JPG

Message 4 of 6
(4,732 Views)

FYI: Here is another article you can read to calculate damping parameters

 

http://www.imeko.org/publications/wc-2015/IMEKO-WC-2015-TC15-323.pdf

0 Kudos
Message 5 of 6
(4,720 Views)

The non-linear fit VI that I'm using seems as if it could pretty easily fit a damped oscillation. I have been able to fit to mock data. However, it's not converging on a solution for some of my data at the moment so I used your Hilbert Transform VI. This seems to work alright, except it will need an offset term to be added. I'm facing the problem of getting damped components that are nearly 0. There is clearly a damped component to the data but the VI isn't picking up on it. I can attache the data if you'd like to take a look?

0 Kudos
Message 6 of 6
(4,656 Views)