Skip to main content
. 2020 Jan 13;20(2):451. doi: 10.3390/s20020451
Algorithm 1: Abnormal road surface recognition method
Input: z, the Z-axis acceleration; v, the vehicle speed; KS, the spring stiffness; CS, the damping coefficient.
Output: event_z, Acceleration due to abnormal road surface.
  1. Algorithm begin:
2. μ = 0   % μ is a mathematical expectation
  3. σ = 0   % σ is a standard deviation
  4. TG = 2  % TG is the Gaussian matching threshold
  5. TV = 20  % TV is the speed threshold
  6. if (v > TV)
  7.  z_match ←abs(zμ)/σ
  8. % calculating thresholds TZ using fuzzy logic inference machines
  9.  TZ← fuzzy_control (KS, CS)
  10.  if (z_match > TG*v/TV) && (abs(z) > (TZ* v/TV))
  11.   event_z ← z
  12.  else    % update μ and σ, as described in Equation (5)
  13.   μ ← (1 − α) * μ + α*z
  14.   σ ← SQRT ((1 − α) * σ^2 + α * (zμ)^2)  % SQRT means calculate square root
  15.  end if
  16. end if
  17. return event_z
  18. Algorithm end