Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

12-02-2019 02:13 PM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hello,

Hopefully this is an easy answer. I have a sinusoidal waveform and I want to take the double integral of it. i.e. I have acceleration and I want position. When I do it in LabVIEW I get weird results. Why isn't my position sinusoidal? What am I doing wrong?

Thanks

12-02-2019 02:21 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

"C"

There is a "C" in both of those integrals.

Ben

Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel .............. Great paleotechnics YouTubeChannel... talk about stone knives and bears skins! Check it out!

12-02-2019 02:37 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Highlighted
Options

12-02-2019 02:46 PM - edited 12-02-2019 02:56 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

As Sir Ben said, small offsets in data will lead to wild swings when you do the integral. A few solutions:

- Remove mean from data, then high pass filter with a cutoff of 1 Hz, then integrate.
- Take the frequency spectrum, excluding 0 frequency divide each frequency by (2 pi f) for v or (2 pi f) for d. Measure displacements in frequency space.

mcduff

EDIT: **(2 pi f)^2** for d

12-02-2019 02:50 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hello mcduff,

What does remove mean refer to? DC? Shouldn't the High Pass filter get that too?

12-02-2019 02:54 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

@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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

12-02-2019 03:01 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel .............. Great paleotechnics YouTubeChannel... talk about stone knives and bears skins! Check it out!

12-02-2019 03:10 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator