element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Test & Tools
  • Technologies
  • More
Test & Tools
Blog Sound and Vibration Measurement: Instrument Network Service for LabVIEW Pt10: example with FFT
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Test & Tools to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 10 May 2022 10:19 AM Date Created
  • Views 3321 views
  • Likes 5 likes
  • Comments 3 comments
  • RoadTest
  • mcc172
  • accelerator
  • daq
  • fft
  • labview
  • scpi
  • vibration
  • transform
Related
Recommended

Sound and Vibration Measurement: Instrument Network Service for LabVIEW Pt10: example with FFT

Jan Cumps
Jan Cumps
10 May 2022
Sound and Vibration Measurement: Instrument Network Service for LabVIEW Pt10: example with FFT

For the Sound and Vibration Measurement Hat for Raspberry Pi road test, I'm reviewing Measurement Computing's IEPE Measurement DAQ HAT for Raspberry Pi.
The next series of posts are going to be a subplot. I'll make software to remotely control the DAQ, via LabVIEW.
In this post, I make a custom LabVIEW flow that converts the samples to frequency domain: FFT conversion and display.

image

FFT Flow design

The frequency domain (FFT) gives more information related to vibrations, wear and defects than the time domain (waveform). martinvalencia - who's an engineer in Peru's mining industry - helps me to define analytic flows targeted to (preventive) maintenance. This flow shows both waveform and the transform in a single display. I investigated a number of options, mainly from NI white paper Using Fast Fourier Transforms and Power Spectra in LabVIEW, and from video Implementing Fourier transform in LABVIEW. The result is a process that is an extension of the Wave Form Display flow I made before. An example of mixing strategies: a real time waveform that updates at each sample, and the FFT display that updates when a batch of samples is collected. They run together based on the same data stream from the MCC172 DAQ.

I had to add some things to the flow:

  • an array to collect the sample batch that will be used for FFT. I've kept the number of samples to aggregate the same as the "Samples per Channel" setting of the DAQ. If you request 10240 samples from the DAQ, then this flow will collect all of these and perform the FFT on them.
  • a trigger to tell the flow that all samples are collected. I used the comparison between "samples per channel" and the array size. If they match, we have our complete set of data and can do an FFT.
  • a waveform representation of the samples. The array contains single measurements, but an FFT needs time dimension too. I used a "WaveForm Builder" block that takes the array of samples, and the time between the samples, to describe the analogue waveform that was sampled. The time between samples is calculated by inversing the "Sample Rate" set on the DAQ. This rate is the number of samples per second. 1/Sample Rate is the calculation that gives the time between samples, in seconds.
  • a "Spectral Measurements" block does the transform. I used its "Power Spectrum" function to derive the FFT from the analog waveform.
  • a graph to display the FFT result. I set it to logarithmic frequency scale and dB for amplitude.

image

Speed versus Resolution

The waveform display (time domain view) is fast by design. It can update itself at each incoming sample and does a decent job to catch up with real time.
For the FFT, this is different. Its input is a group of samples. So that graph's update speed in my design is always "speed of the waveform view updates" / "Samples per Channel".
The naïve way to make this view fast is by choosing a high "samples per second" rate, and selecting a low "samples per channel" count. This will not give the best view though. I've found that I had the best results by selecting a sample rate that's high enough to capture the frequencies you want to analyse (Nyquist theorem), then play with the samples per channel until you have a display that has a resolution that's good enough for your analysis. If your goal is to view the FFT real time, go for the lower count of samples , with the continuous sampling option on. If you want to get a fine view, select high sample count, and non-continuous mode.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

I use 512 samples/sec, 2048 samples per channel, continuous mode, for a reactive display with good detail. An update every 4 seconds (2048/512)
For a detailed view, I use the same speed, but 10240 samples per channel, single mode. That takes 20 seconds (10240/512) to build up.

Link to all posts.

  • Sign in to reply
  • Jan Cumps
    Jan Cumps over 3 years ago

    The vibration profile of a Rigol DP832A DSU, with the fan on standby speed:

    image

    Setup:

    image

    It's an excuse to try out the magnetic

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 3 years ago

    I've added a visual hint on how individual samples fill the FFT buffer:

    image

    Each sample refreshes the upper graph, and adds an entry to the buffer. When the buffer is full, the FFT is calculated and the lower graph gets updated..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 3 years ago

    Good update Jan.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube