www.gusucode.com > signal 案例源码程序 matlab代码 > signal/AverageOrderSpectrumOfHelicopterVibrationDataExample.m

    %% Average Order Spectrum of Helicopter Vibration Data
% Analyze simulated data from an accelerometer placed in the cockpit of a
% helicopter.

%%
% Load the helicopter data. The vibrational measurements, |vib|, are
% sampled at a rate of 500 Hz for 10 seconds. The data has a linear trend.
% Remove the trend to prevent it from degrading the quality of the order
% estimation.

load('helidata.mat')

vib = detrend(vib);

%%
% Plot the nonlinear RPM profile. The rotor runs up until it reaches a
% maximum rotational speed of about 27,600 revolutions per minute and then
% coasts down.

plot(t,rpm)
xlabel('Time (s)')
ylabel('RPM')

%%
% Compute the average order spectrum of the signal. Use the default order
% resolution.

orderspectrum(vib,fs,rpm)

%%
% Use |rpmordermap| to repeat the computation with a finer order
% resolution. The lower orders are resolved more clearly.

[map,order] = rpmordermap(vib,fs,rpm,0.005);

orderspectrum(map,order)

%%
% Compute the power level for each estimated order. Display the result in
% decibels.

[map,order] = rpmordermap(vib,fs,rpm,0.005,'Amplitude','power');

spec = orderspectrum(map,order);

plot(order,pow2db(spec))
xlabel('Order Number')
ylabel('Order Power Amplitude (dB)')
grid on