How to generate random broadband vibration signal for certain frequency range ?
Show older comments
Hi,
How to generate random vibration signal for frequency range 0.5hz to 100Hz at 0.4 rms magnitude?
Thanks
Accepted Answer
More Answers (1)
Mathieu NOE
on 12 Apr 2022
hello
here you are my friend !
Fs = 500; % sampling rate
duration = 10; % seconds
rms_amplitude = 0.4;
samples = Fs*duration;
% time vector
dt = 1/Fs;
time = (0:samples-1)'*dt;
signal = randn(samples,1);
%% band pass filter section %%%%%%
f_low = 0.5; % Hz
f_high = 100; % Hz
N_bpf = 4; % order
[b,a] = butter(N_bpf,2/Fs*[f_low f_high]);
signal = filter(b,a,signal);
% check rms value and correct it if needed
signal_rms = sqrt(mean(signal.^2)) % NOK
cor_factor = rms_amplitude/signal_rms;
signal = signal.*cor_factor;
signal_rms = sqrt(mean(signal.^2)) % OK
plot(time,signal,'b');
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
