Вы находитесь на странице: 1из 10

Your Best 6 Options for Vibration Analysis

Programming
Posted by Steve Hanly on January 27, 2017

There are a lot of different ways to analyze shock and vibration data. You can use
standalone software packages or, my preference, you can develop your own
analysis program or algorithm that does exactly what you need. After all, in the
world of shock and vibration testing, each application is a little different.

Even within the world of computational programs there are many different
options, each with their own benefits and drawbacks. So in this post we'll discuss
6 well known computing platforms that work great for analyzing shock and
vibration data.

1) LabVIEW
Most engineering companies will likely have a couple LabVIEW licenses to
interface with their National Instruments data acquisition hardware and analyze
data in real time. LabVIEW is a development environment specifically designed
for engineers and scientists analyzing data. As such, it’s a popular tool for
vibration testing! National Instruments is the world leader in hardware for data
acquisition; so it makes sense that their software is also very popular and pairs
well with their hardware. Designing analysis programs with LabVIEW may be
easier to those with less programming knowledge because of the graphical
programming language they use, shown in Figure 1.

Figure 1: LabVIEW’s block diagram design environment is shown next to a representative analysis
window.

A full LabVIEW license costs $2,999 and vibration customers may be interested
in their Sound and Vibration Toolkit for another $1,999. It can definitely get
expensive quickly but is a great solution for data analysis, especially in real-time
controls applications.

2) MATLAB
MATLAB is a programming language specifically developed for linear algebraic
operations. Because of this initial core design and focus, it is a hugely popular
tool for data analysis. Most engineers would have used MATLAB is college and
entered the workforce already with a knowledge and preference for this
(MathWorks is smart with their pricing to offer significant discounts to
universities and students).
The big disadvantage of MATLAB is that it's not free; a commercial license will
cost $2,150. They also charge more, typically $1,000, for additional toolboxes
(here's a full price list of the MATLAB products); and I'd recommend the signal
processing toolbox for vibration analysis. Don't worry though, I didn't use any
functions in that toolbox for the examples covered in my vibration analysis
basics blog; some screen shots of those analysis scripts are provided in Figure 2.

Figure 2: MATLAB is the most common programming tool used by vibration analysts.

If code base programming seems daunting, MATLAB does have their Simulink
block diagram environment. This is a compelling product that can help reduce
human programming induced errors and allow teams of analysts to integrate
their algorithms a little easier. A single commercial license is $3,350 (in addition
to a MATLAB license). Simulink also lets engineers interface with hardware such
as National Instruments, Raspberry Pi and Arduino; but these hardware supports
will cost you. Simulink is great for analyzing data in real time (another couple
thousand dollars) and offers incredible customization in addition to built-in
analysis capabilities.

For more information on MATLAB and some of its benefits, this blog
entitled What is Matlab – Where and Why to Use It is a good read.

3) Python
Python is a free, open source, and very versatile programming language (for
these reasons we use it to develop our Slam Stick Lab vibration analysis
software). Their NumPy and SciPy packages have similar functions to MATLAB.
Python is a pretty elegant and intuitive programming language compared to
MATLAB. It was created to be a generic language that is easy to read; and they
definitely succeeded with that! Python is universally accepted as the better
alternative to MATLAB for other programming needs besides data analysis.

But if you ask what’s better, MATLAB or Python for vibration analysis, you may
start a heated debate because they both have benefits and disadvantages. We
recently did some testing to compare MATLAB and Python for vibration
analysis and came to the conclusion that for basic analysis (including FFTs)
Python can match and even beat MATLAB computation times; but the
programmer may need to do a bit of digging to find and download all the
necessary libraries. But these libraries will be free!

As a MATLAB user I found the Anaconda distribution of Python and its most
popular libraries very helpful. The Spyder development environment, shown
in Figure 3, has a similar interface and feel to MATLAB for those with MATLAB
experience.
Figure 3: The Spyder Python development environment is shown; it has a similar interface to MATLAB.

Python is gaining popularity because it’s free and the community is generating a
wide variety of versatile libraries that are publicly available through GitHub. A
quick search finds the PyDAQmx library that interfaces with National
Instrument’s drivers. Again Python is free so it’s becoming a compelling
alternative, especially as the offerings and capabilities continue to grow and
improve.

4) GNU Octave
GNU Octave is a scientific programming language that is largely considered a
direct free replacement to MATLAB. Many users find it very similar to MATLAB;
it's so similar that it can even offer exact compatibility with some simpler
MATLAB code!

Figure 4: The GNU Octave environment offers another similar feel to MATLAB and can even have exact
compatibility with MATLAB.

Although it's free, it isn't new; GNU Octave has been around since 1988. I
personally have never used it (I'm a MATLAB guy, and now becoming a bit of a
Python user as Mide continues to develop its Slam Stick Lab vibration analysis
software); but I can say that I've heard from a lot of our customers how effective
this software can be for analyzing vibration data, or any numerical analysis
needs. Its plotting capabilities are especially impressive.

5) Scilabs
Scilabs is another open source and free option for numerical computing. I don't
have any experience with Scilabs but it seems that their ability to interconnect
with third party applications, including LabVIEW is its most attractive feature.
Figure 5: Scilabs is another free open source option and it can connect with LabVIEW.

6) FreeMat
FreeMat was specifically developed to be as the name implies... a free version of
MATLAB. Although it can offer the same interface, language, and basic
capabilities, in my experience I found it to pale in comparison to MATLAB for
large data sets. And vibration analysis typically deals with millions of samples so
I wouldn't recommend FreeMat. The other free open source options, especially
Python or GNU Octave, are better free alternatives.
Figure 6: FreeMat intends to be a free version of
MATLAB although it has difficulty with very large datasets compared to MATLAB.

What's Right for Me?


There are three main considerations before you can decide which option is best
for you.

Cost
If you work at a larger company, the cost of MATLAB or LabVIEW is probably an
insignificant expense; and its even very likely that your company already has
licenses to use these programming platforms. But for smaller companies and
consultants, cost may be a major concern; in which case, you should strongly
consider the open source options. I've had good luck with Python and I've heard
a lot of great things about GNU Octave.

Post Processing or Real Time Analysis


If the products you will be using acquire the data and export it then the software
will “only” need to do the post-processing. This would be the case for a vibration
data logger. All the options I've laid out in this blog will work for post processing
vibration data; but my favorite is MATLAB.
But for applications that require real-time (or near real-time with a buffer) data
streaming and analysis will limit the options available. Real-time data streaming
and processing is needed for typical modal analysis, and for controls applications
(where an action is taken based upon recorded data). In these
applications Simulink or LabVIEW are the best options.

Programming Experience and Analysis Complexity


Writing custom analysis and simulation programs will require some advanced
knowledge of the computing language and analysis fundamentals; but it is the
preferred path for most post-processing analysis applications. In many
applications though there will be a need for doing analysis based upon certain
conditions specific to your test. For example, if I performed a two hour long test
on an aircraft component, I may want to develop a script that looks through the
data and runs FFTs if/when certain conditions are met. Doing this fairly simple
analysis that has a couple if-statements may be more difficult in a standalone
GUI.

That being said, not everyone feels comfortable with writing code and
developing algorithms. These folks could consider the graphical programming
languages/environments or may prefer standalone GUI packages. If you'd prefer
a standalone software, check out our list of 8 different vibration analysis
software packages; these include both free and paid options. Standalone
graphical user interfaces (GUIs) are most useful for providing that initial
overview of your data and performing some preliminary analysis.

More Resources
If you'd like to learn a little more about various aspects in shock and vibration
testing and analysis, download our free Shock & Vibration Testing Overview
eBook. In there are some examples, background, and a ton of links to where you
can learn more. And as always, don't hesitate to reach out to us if you have any
questions!

Вам также может понравиться