How to create an ISO 8606 disturbance profile?

조회 수: 9 (최근 30일)
Nathan Batta
Nathan Batta 2021년 2월 23일
Hello!
I am trying to create an ISO 8606 class D disturbance profile. I tried to follow the code described here but I am getting a disturbance with a magnitude of 0.2 meters. Many of the papers I have seen that utilize this standard have magnitudes around 0.02 meters so I wasn't sure if I was doing something wrong. I have dropped my code below. Does anyone have any experience with creating this profile? Thank you!
function [dist, ref, hx] = ISO8606TypeD(t)
delay=.4; %there is a .4s gap between when the front wheel hits the bump and the second wheel hits it
deltaIndex = t(2)-t(1);
iP = 100;
hx = generateProfile(t, iP);
hx = hx - hx(1);
dist(1,:) = [hx zeros(1,iP)];
dist(2,:) = [zeros(1,delay/deltaIndex) hx zeros(1,iP-delay/deltaIndex)];
ref = zeros(12, length(t));
figure(2)
hold on
plot(t,dist(1,:))
plot(t,dist(2,:))
title('ISO8606 Disturbance Profile');
xlabel('Time [s]');
ylabel('Disturbance [m]')
end
function hx = generateProfile(t, iP)
vel=10; % car velocity [m/s]
N = length(t) - iP; % Number of data points
L = t(end)*vel; % Length Of Road Profile (m)
k = 6; % A = 3, B = 4, C = 5, D = 6, E = 7, F = 8, G = 9
B = L/N; % Sampling Interval (m)
dn = 1/L; % Frequency Band
n0 = 0.1; % Spatial Frequency (cycles/m)
n = dn : dn : N*dn; % Spatial Frequency Band
phi = 2*pi*rand(size(n)); % Random Phase Angle
Amp1 = sqrt(dn)*(2^k)*(1e-3)*(n0./n); % Amplitude for Road Class A-B
x = 0:B:L-B; % Abscissa Variable from 0 to L
hx = zeros(size(x));
for i=1:length(x)
hx(i) = sum(Amp1.*cos(2*pi*n*x(i)+ phi));
end
[q , C] = psd_1D(hx, B, 'x');
f = q / (2*pi); % spatial frequency
PSD = 2 * pi * C; % power spectrum
figure(1)
loglog(f,PSD)
title('Power Spectral Density');
xlabel('Frequency (Hz)');
ylabel('PSD (m^3)');
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Parametric Spectral Estimation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by