Modal Analysis Part1. Time Domain and Frequency Domain

 Today, I'd like to delve into the identification of modes within mechanical systems through vibration testing. This discussion will unfold across approximately 10 posts, meticulously clarifying crucial aspects. The aim is to assist aspiring mechanical, electrical, and civil engineering students navigating the realm of signal processing. Furthermore, it aims to bolster the mechanical foundation of test engineers.

My dataset stems from a turning test, yet the principles remain consistent across various domains—be it machining, robotics, vehicular dynamics, wind turbines, or structural elements like buildings or bridges. While the fundamentals of signal processing persist, nuances emerge in the frequency domain's mode localization and the presence of external forces.

Most modal analysis software simplifies mode identification with a few clicks. However, I'll illuminate how to pinpoint modes using Python. Admittedly, the free software I've utilized might not match the precision of pricier alternatives like Matlab. Nevertheless, by developing Python code, we can achieve commendable performance without hefty computational expenses.

This blog series won't involve intricate, high-cost computational coding. Instead, its objective is to share insights into modal analysis, catering specifically to beginners. Are you prepared to embark on this enlightening journey with me?

Figure 1. Vibration in Time Domain

In Figure 1, you'll find a time-velocity graph showcasing seconds on the x-axis and velocity in meters per second (m/s) on the y-axis. This data stems from an accelerometer utilized during a turning test conducted on a CNC machine. I've stumbled upon an intriguing aspect that I'd like to discuss with you.

Here's the curiosity: typically, an accelerometer captures acceleration data, not velocity or displacement. However, the data I've obtained directly presents velocity. It's a bit unexpected, isn't it?

Indeed, in conducting modal analysis, we have the flexibility to utilize acceleration, velocity, and displacement data. The selection isn't about a binary choice of right or wrong but rather about identifying the most efficient approach to achieve the most precise solution.

Each of these data types offers unique insights into the behavior of the system and can be employed in diverse ways:

  • Acceleration data: This primary data source, often acquired from accelerometers, signifies the rate of change of velocity over time. Widely used in modal analysis algorithms, acceleration data reveals details about the dynamic forces influencing the structure or machine. It excels in pinpointing higher frequency modes.

  • Velocity data: Derived from integrating acceleration data, velocity measurements display the speed of the structure or machinery at any given moment. While less frequently utilized directly in modal analysis, velocity data provides valuable insights into dynamic behavior. It can serve as a cross-validation tool or complement acceleration-based modal analysis outcomes.

  • Displacement data: Acquired through integrating velocity data or doubly integrating acceleration data, displacement illustrates the movement or deformation of the structure. Offering information on absolute position changes, it proves beneficial in comprehending low-frequency modes or responses with substantial amplitudes.

The choice of which data to use in modal analysis depends on several factors, including the characteristics of the structure or machinery under study, the desired frequency range, sensor availability, and specific analysis objectives. Generally, acceleration data takes precedence due to its direct correlation with the forces instigating structural vibrations. However, velocity and displacement data can also play pivotal roles, particularly in specific frequency ranges or tailored analyses.

Figure 1 displays a velocity graph in the time domain, representing vibrations over time. To further analyze this signal and explore its frequency components, I applied the Fast Fourier Transform (FFT), a technique that decomposes signals into their frequency components. As explained earlier, the Fourier Transform allows us to express a vibration signal as a combination of various vibrations at specific frequencies. In the frequency domain obtained through FFT, we can observe the amplitudes of vibrations at different frequencies. Identifying the frequencies with significant amplitudes leads us to pinpoint the dominant mode in the system. This process of detecting and characterizing the dominant modes within a structure or machinery is the essence of modal analysis. By determining these dominant frequencies or modes, engineers gain crucial insights into the behavior and dynamics of the system under investigation.


Figure 2. A cut-off velocity signal (top) and its corresponding FFT signal (bottom)

Observing Figure 2, the upper graph illustrates a cut-off velocity profile in the time domain, specifically within the timeframe of 1 to 3 seconds. This profile depicts the variation in velocity over this duration. The lower graph represents the corresponding Fast Fourier Transform (FFT) of this velocity signal within the same time domain with a 51,200 sampling rate.

Examining the FFT graph, one can notice significant amplitudes at certain frequencies. These notable amplitudes might correspond to specific vibration frequencies present within the system. Notably, the vertical red lines highlighted in the graph indicate the spindle speed, which is noted to be at 10,000 revolutions per minute (rpm).

The identification of these large amplitudes at specific frequencies is indicative of pronounced vibrations occurring at those particular frequencies within the system. This kind of observation is crucial in modal analysis, as it aids in identifying and characterizing dominant modes or frequencies present in the machinery or structure being analyzed.

I'm sharing a straightforward Python code using only the NumPy library. This code simplifies signal processing by employing the Fast Fourier Transform (FFT) to analyze the frequency domain of the signal. In the subsequent post, we'll delve deeper into the processing techniques used in the frequency domain to identify specific modes.


import numpy as np
import matplotlib.pyplot as plt

# Sample velocity signal (replace this with your actual velocity signal)
# For demonstration purposes, let's generate a synthetic signal
t = corrected_time  # Time array
velocity_signal = corrected_velocity

# Perform FFT
#sampling_rate = 1 / (t[1] - t[0])  # Mathmatical Sampling rate
sampling_rate = 51200 # Sampling_rate from the experiment set-up
n = len(velocity_signal)  # Length of the signal
total_data_points = n

# Calculate the number of data points to select (70% of the total)
percentage_to_select = 0.7
num_to_select = int(percentage_to_select * total_data_points)

# Calculate the starting and ending indices for the middle 70%
start_index = int((total_data_points - num_to_select) / 2)
end_index = start_index + num_to_select

# Generate example data (replace this with your actual data)
data = np.random.rand(total_data_points)  # Generating random data for demonstration

# Select the middle 70% of the data
selected_velocity = data[start_index:end_index]


frequencies = np.fft.fftfreq(total_data_points, d=1 / sampling_rate)  # Frequency components
fft_result = np.fft.fft(selected_velocity)  # FFT of the signal

# Define the frequency range of interest
freq_range_start = 1500
freq_range_end = 3000

# Find the indices corresponding to the desired frequency range
indices = np.where((frequencies >= freq_range_start) & (frequencies <= freq_range_end))[0]

# Extract the frequencies and FFT results within the specified range
freq_range = frequencies[indices]
fft_range = fft_result[indices]

# Plotting
plt.figure(figsize=(10, 6))

# Plot the original signal
plt.subplot(2, 1, 1)
plt.plot(t, velocity_signal)
plt.title('Original Velocity Signal')
plt.xlabel('Time')
plt.ylabel('Velocity')

# Plot the frequency spectrum within the specified range
plt.subplot(2, 1, 2)
plt.plot(freq_range, np.abs(fft_range))
plt.title('Frequency Spectrum ({} Hz to {} Hz)'.format(freq_range_start, freq_range_end))
plt.xlabel('Frequency (Hz)')
plt.ylabel('Amplitude')

# Calculate harmonics of spindle speed (10000 RPM)
spindle_speed_hz = 10000 / 60  # Convert RPM to Hz
harmonics = np.arange(9, 19) * spindle_speed_hz  # Consider harmonics 9 to 19th

# Plot vertical lines for harmonics on the frequency spectrum
for harmonic in harmonics:
    plt.axvline(x=harmonic, color='r', linestyle='--', linewidth=1)

plt.tight_layout()
plt.show()


Comments

Popular posts from this blog

Modal Analysis Part2. Windows

Why Do We Divide by n-1 for Sample Variance? (The Intuitive & Mathematical Guide)

Averaging and Moving Average Filters