# Acceleration spectrum of Gifu bus vibration measured with phyphox

I measured the acceleration spectrum of Gifu bus vibration with phyphox (Physical Phone Experiments).

The measurement method is the same as this blog which measured the acceleration spectrum of the vibration of a washing machine.

Sitting in the right-most seat at the very back of the Gifu bus, I placed my smartphone in the space just inside the window to measure the bus’s vibration. I measured the vibration when the bus was stopped with the engine running and when it was stopped and running.

1. Vibration when the bus is stopped with the engine running

The following graph plots the spectrum of acceleration magnitude. There is a sharp peak at a frequency of about 27.45 Hz.

The following graph plots the time variation of peak frequency. Accelerometer data is measured at time intervals of a little over 0.01 seconds. Using 256 samples of data from the past approximately 2.56 seconds as input, the magnitude of each frequency component at each time is calculated using FFT (Fast Fourier Transform). Therefore, the peak frequency during the period of just over 2.56 seconds from the start of the measurement is not stable even if the vibration spectrum is constant. It converges to a constant value, approximately 27.45 Hz, after 2.56 seconds.

2. Vibration when the bus is stopped or running with the engine running

The following graph is an example of the acceleration spectrum when the bus is running. The various frequency components are taking large values and the lower frequency components are larger than when the engine is stopped with the engine running.

The following graph plots the peak frequency over time as the bus stops and runs with the engine running. The peak frequency when the bus is stopped with the engine running is approximately 27.5 Hz, while the peak frequency when running varies with time and takes various values.

3. The following JavaScript was used to plot the four graphs on this page.

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">

drawFFTSpectrumWithSpecifiedId(QueryStopFFT, 'GifuBusStopFFT');

const QueryStopPeakHistory = new google.visualization.Query(GifuBusStopSheetData + '&gid=1061560665');
drawChartPeakHistoryWithSpecifiedId(QueryStopPeakHistory, 'GifuBusStopPeakHistory');

drawFFTSpectrumWithSpecifiedId(QueryRunStopFFT, 'GifuBusRunStopFFT');

const QueryRunStopPeakHistory = new google.visualization.Query(GifuBusRunStopSheetData + '&gid=833447991&range=A1:B800');
drawChartPeakHistoryWithSpecifiedId(QueryRunStopPeakHistory, 'GifuBusRunStopPeakHistory');
}

function drawFFTSpectrumWithSpecifiedId(query, graph_id) {

query.send( function(response) {
const data = response.getDataTable();

// acceleration spectrum
const options_logx = {title: 'phyphox acceleration spectrum',
hAxis: {title: 'Frequency [Hz]'},
vAxis: {title: 'FFT Magnitude'}};
chart_logx.draw(data, options_logx);
});
}

function drawChartPeakHistoryWithSpecifiedId(query, graph_id) {

query.send( function(response) {
const data = response.getDataTable();

// Peak History
const options = {title: 'phyphox peak history',
hAxis: {title: 'Time [s]'},
vAxis: {title: 'Peak Frequency [Hz]'}};