enDAQ Blog for Data Sensing and Analyzing

Calculating Velocity and Displacement from Vibration Data

Written by Hamed Dabiri | Nov 23, 2026, 8:13:17 PM

Calculating Velocity and Displacement from Vibration Data

 

You can convert acceleration data into velocity and displacement by integrating it once for velocity and twice for displacement. Direct integration usually fails because sensor bias and low-frequency noise cause integration drift. Applying a high-pass filter and a Tukey window before integrating removes most of that drift, and the enDAQ Python library automates these steps. This guide walks through the method, a full Python example, and a validation against a laser displacement sensor. 

Content

  1. Introduction

  2. The Relationship Between Acceleration, Velocity, and Displacement

  3. Numerical Integration of Measured Data

  4. Why Direct Integration Often Fails

  5. Reducing Integration Drift

    5.1. High-Pass Filtering

    5.2. Windowing and Tapering

     

  6. Using the enDAQ Library for Motion Analysis

  7. Example: Converting Acceleration to Velocity and Displacement Using Python

  8. Comparing measured displacement with converted displacement

  9. Web-based app

    9.1. Web Application Link:

    9.2. Step 1: Upload an IDE File.

    9.3. Step 2: Select the Measurement Axis

    9.4. Step 3: Select the Time Interval

    9.5. Step 4: Adjust Advanced Parameters (Optional)

    9.6. Step 5: Process the Signal

    9.7. Step 6: Download the Results

  10. Light offline app
  11. Conclusions

Introduction

Accelerometers are among the most widely used sensors in engineering applications, including structural health monitoring, machinery diagnostics, predictive maintenance, automotive testing, and aerospace systems. These sensors directly measure acceleration, which is the rate of change of velocity with respect to time. However, engineers are often interested in other quantities such as velocity and displacement, since they can provide more intuitive information about motion and vibration behavior.

Fortunately, velocity and displacement can be obtained from acceleration measurements through a mathematical process known as integration. While the concept is straightforward, practical implementation requires careful signal processing to avoid errors caused by sensor noise and bias.

This article explains how acceleration is converted into velocity and displacement and discusses the challenges associated with the process.

The Relationship Between Acceleration, Velocity, and Displacement

The three motion quantities are mathematically related through differentiation and integration.

Acceleration is defined as the rate of change of velocity:

Similarly, velocity is the rate of change of displacement:

By reversing these relationships, velocity can be obtained by integrating acceleration:

Displacement is then obtained by integrating velocity:

Combining both steps results in:

In other words:

    1. One integration converts acceleration to velocity.
    2. Two integrations convert acceleration to displacement.

Numerical Integration of Measured Data

Real-world acceleration data are collected at discrete time intervals rather than as continuous functions. Therefore, numerical methods must be used to perform integration.

One of the most common approaches is the trapezoidal integration method. For a signal sampled at a constant time interval Δt, velocity can be approximated as:

Similarly, displacement can be calculated from the velocity signal:

These calculations are repeated for every sample in the dataset.

Why Direct Integration Often Fails

Although the mathematics is simple, direct integration of measured acceleration data often produces unrealistic results.

The reason is that accelerometers are not perfect. Measurements typically contain:

    1. Sensor bias
    2. Electronic noise
    3. Temperature drift
    4. Quantization errors
    5. Low-frequency disturbances

Consider an accelerometer with a small offset of only 0.01 m/s². Integrating this constant error produces a velocity that grows linearly with time:

A second integration produces displacement that grows quadratically:

Even a tiny measurement bias can therefore generate enormous displacement errors after a few minutes of data collection.

This phenomenon is known as integration drift.

Reducing Integration Drift

To obtain meaningful velocity and displacement measurements, signal conditioning is typically applied before integration.

High-Pass Filtering

A high-pass filter removes very low-frequency content, including DC offsets and sensor bias.

For example, a cutoff frequency of 1 Hz removes signal components below 1 Hz while preserving higher-frequency vibration content.

This significantly reduces drift during integration.

However, there is a tradeoff. If the system actually contains meaningful motion below the cutoff frequency, that information will also be removed.

Windowing and Tapering

Another common technique is applying a window function before integration.

A popular choice is the Tukey window, which gradually reduces the signal amplitude near the beginning and end of the record.

Benefits include:

  1. Reduced edge effects
  2. Smoother signal transitions
  3. Improved integration stability
  4. Lower spectral leakage during frequency-domain processing

A Tukey window is particularly useful when analyzing finite-duration vibration events.

Using the enDAQ Library for Motion Analysis

While the mathematical concepts behind acceleration, velocity, and displacement are straightforward, implementing them correctly requires careful signal processing to minimize integration drift and noise. The Python enDAQ library provides built-in tools that automate many of these processing steps, making it easier to obtain reliable velocity and displacement measurements from acceleration data.

In addition to numerical integration, the enDAQ library offers a wide range of capabilities for vibration and shock analysis, including time-domain visualization, frequency analysis, filtering, power spectral density (PSD) calculations, shock response spectrum (SRS) analysis, data extraction from IDE files, and interactive plotting. These tools allow engineers and researchers to process, analyze, and visualize sensor data using a consistent workflow.

The example presented in this article uses the enDAQ library to convert acceleration measurements into velocity and displacement while applying signal conditioning techniques such as high-pass filtering and Tukey windowing to reduce integration drift.

The enDAQ Python library can be installed directly from PyPI using:

pip install endaq

or, within a Jupyter Notebook:

!pip install endaq

Note: Plotly libraries is also used, which may need to be installed (if they are not already available in your Python environment.) using

!pip install plotly

Example: Converting Acceleration to Velocity and Displacement Using Python

The following example demonstrates a complete workflow for converting acceleration data stored in an IDE file into velocity and displacement.

To this end, an enDAQ accelerometer was mounted on the top surface of a shaker, as shown in Figure 1. To validate the measurements, the shaker displacement was simultaneously measured using a laser displacement sensor mounted above the enDAQ and directed toward its top surface. The shaker acceleration was recorded for approximately 100 seconds.

Figure 1: Experimental setup for measuring shaker acceleration using an enDAQ accelerometer. A laser displacement sensor is mounted above the enDAQ to simultaneously measure the shaker displacement.

 

The process consists of:

  1. Plotting the raw acceleration signal.
  2. Selecting the time range of interest.
  3. Extracting the desired portion of the recording.
  4. Computing velocity and displacement through numerical integration.
  5. Visualizing the results.
  6. Exporting the processed data to a CSV file.

Step 1 – Plot the Raw Acceleration Signal

Before processing, it is often helpful to visualize the entire acceleration record and identify the time interval of interest.