From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-02-2019 02:13 PM
12-02-2019 02:21 PM
"C"
There is a "C" in both of those integrals.
Ben
12-02-2019 02:37 PM
Another way to look at it, is that the velocity is always positive, so the distance / position is always increasing.
12-02-2019 02:46 PM - edited 12-02-2019 02:56 PM
As Sir Ben said, small offsets in data will lead to wild swings when you do the integral. A few solutions:
mcduff
EDIT: (2 pi f)^2 for d
12-02-2019 02:50 PM
Hello,
Yes I have looked up the calculus and saw the C. Its been a while...
A little more background my customer has an accelerometer that we are acquiring data from. They want to know the displacement. Performing a double integral on the accelerometer data should give me the displacement. I am expecting a sinusoidal displacement signal. That is how the UUT is actually moving. The accelerometer data is sinusoidal. I made this quick VI to test my math. I am confused at the results I am getting and what math I need to calculate displacement.
Thanks
12-02-2019 02:52 PM
12-02-2019 02:54 PM
@ASTDan wrote:
Hello mcduff,
What does remove mean refer to? DC? Shouldn't the High Pass filter get that too?
Yes and Yes, I like to do both even though it may not be necessary. Doing the calculation in frequency space is much easier, no filters or DC removal.
mcduff
12-02-2019 02:55 PM
It sounds like you are expecting a harmonic solution, but you are not providing the proper boundary condition. Using the default initial condition for the velocity (1st integral), implies v(0) = 0. For the harmonic solution, v = 0 at the extrema of the acceleration, so if you set the phase of your acceleration waveform to 90 (or 270) degrees you should see what you are expecting.
12-02-2019 03:01 PM
Also keep in mind there is no such thing as a "zero" in real world measurements.
And even if you found the offset, real-word values drift ever so slightly and they will pile up and you are right back where you started, trying to figure what the correct "C" should be.
Ben
12-02-2019 03:10 PM