SAE J211/1 revision MAR95 compliant filter.


saefilt95(vector1, vector2, scalar1, scalar2, scalar3, scalar4)


The time vector (seconds).
Response vector to filter (any units).
Filter Frequency (Hz).
Padding type flag:
  • = 0, No Padding
  • = N, Mirror Padding with N samples on each end
  • = -N, Zero Padding with N samples on each end
Note: Padded samples are discarded before returning results. N cannot exceed the length of vector2. SAE J211/1 recommends a minimum value of N corresponding to 10ms of samples.
  • = 1, Forward
  • = 2, Backward
  • = 3, Forward then Backward
  • = 4, Backward then Forward
Flag to turn on the debug mode (prints to the Message Log); optional (default = off).


Define the following curve:

Figure 1.
Filter it forward, and then backward with no padding.

Figure 2.

The signal is the blue curve, and the filtered output is the dotted red line.

Now, filter the signal with 100 pads using the mirror method.

Figure 3.


The filtered data has reduced amplitude because of the filter attenuation. Without padding, the filtered data does not track the signal at the beginning of the curve well. This is the result of the filter lag. There is also lag at the end of the curve if filtering in both directions. The purpose of padding is to attempt to minimize the lag by creating an assumed signal history and future beyond the data collection window. This can often allow the filter to acquire a more meaningful initial state than the default when the collected data enters the filter.