Before being fed to EWMA, raw rho_raw first passes through a moving average filter of width 5 frames (mean5) for preprocessing:¶
rho_mean = (rho_raw_n + ...) / 5¶
Physical basis for window length selection. Calculated with the chassis domain Ring period T_round = 200 ms, a 5-frame sliding window covers 5 x 200 ms = 1 s of time span. One second is precisely the maximum common transmission period for automotive network periodic messages — message periods are distributed as 10/20/50/100/500/1000 ms, and a 1 s window ensures that at least one complete transmission cycle of all periodic messages is covered. Within this window:¶
-
Single-frame glitch rejection: Event-type burst traffic (diagnostic flashing, service discovery, etc.) appears at most once within 1 s, and after 5-frame averaging is diluted to 1/5 of the original amplitude, preventing single-frame Tq spikes from directly impacting EWMA;¶
-
Steady-state baseline convergence: Short-period messages at 10/20/40/50 ms appear multiple times within the window, and their contribution to queuing delay converges to a steady-state baseline value after averaging;¶
-
Sustained trend tracking: When network load undergoes a genuine sustained migration (e.g., switching from 50 ms injection to 20 ms injection), the samples in the window refresh frame by frame, and rho_mean completes the transition within 3 frames (600 ms) — cutting glitches without cutting trends.¶
After moving average, rho_mean is further smoothed by exponentially weighted moving average:¶
rho_hat_n = alpha * rho_mean[n] + (1 - alpha) * rho_hat_{n-1}¶
To determine the optimal smoothing coefficient alpha, 1000 candidate parameters were selected within the theoretical range (0, 1) with a step size of 0.001, and comparative analysis was performed under four typical load periods (50 ms, 40 ms, 20 ms, 10 ms) at TC1 (VLAN200) forwarding node 1, truncating the first 100 frames. The experimental pipeline is:¶
TqUs -> rho_raw = 2T_q/(2T_q + T_s,calib) -> mean(5) -> EWMA(alpha)¶
where T_s,calib = 28000 microseconds (Section 5.2 fair-share calibration value).¶
Comparison of final rho values for each alpha under four load groups (based on fair-share calibration Ts=28ms, median5 pre-filtering):¶
Table 3
| alpha |
50ms (final rho%) |
40ms (final rho%) |
20ms (final rho%) |
10ms (final rho%) |
Behavioral Characteristics |
| 0.05 |
0.3 |
6.2 |
9.1 |
58.7 |
Over-smoothed; 10ms saturation region response lagged |
|
0.10
|
0.3
|
6.0
|
9.0
|
67.6
|
Recommended value — optimal across all three regions
|
| 0.20 |
0.3 |
6.0 |
8.9 |
72.1 |
50ms noise suppression degraded; 10ms high-alpha introduces extra jitter |
Key observation: Under fair-share calibration, alpha=0.10 produces the optimal four-level load gradient — the three safe-region scenarios (50/40/20ms at 0.3~9.0%) and the 10ms danger-region scenario (67.6%) have a 7.5x discrimination gap, and the three low-load levels themselves maintain a 30x gradient (0.3->9.0%), ensuring stable level determination.¶
Per-level recommendations (based on four-group load data):¶
Table 4
| VLAN/Domain |
Recommended alpha |
Rationale |
| TC0 (VLAN100) |
0.20 |
Under 40ms condition, alpha=0.20 descent speed is 1.5x that of alpha=0.10, suited for highest-criticality domain's fast sensing needs |
|
V200 (TC1)
|
0.10
|
Document baseline — optimal across all four conditions |
| V250 (TC2) |
0.05 |
Under 10ms saturation, alpha=0.05 is smoothest, avoiding frequent gate jitter in the lowest-criticality domain |
| Document general value |
0.10 |
Neutral baseline, suitable for direct hard-coding in compute-constrained domains |
Cold-start handling bypasses EWMA for the first valid sample to avoid initialization bias.¶
mean(5) Preprocessing Effectiveness Verification
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^¶
To quantify the impact of mean(5) moving average on EWMA output, two pipelines — with and without mean(5) — were run under four load conditions, using the same 7 focus alpha values (0.01, 0.05, 0.10, 0.20, 0.30, 0.50, 1.00):¶
Table 5
| Comparison Dimension |
With mean(5) |
Without mean(5) |
| 40ms panel alpha=0.10 |
Smooth descent, no glitches |
4~5 false slope peaks/valleys (single-frame Tq jitter contaminates EWMA) |
| 10ms panel alpha=0.10 |
Stable at ~68% |
50%~80% violent oscillation (single-frame Tq=50000 microseconds shocks EWMA) |
| 10ms panel alpha=0.01 |
Peacefully stable at ~59% |
Drifts 20 percentage points between 55%~75% |
| Additional latency |
+2 frames (negligible) |
0 |
| Verdict |
Recommended to retain
|
No |
The cost is merely 2 frames of latency (approximately 400 ms at a 200ms period), in exchange for significant suppression of single-frame glitches (e.g., Tq jumping from 2000 microseconds to 50000 microseconds). mean(5) serves as a pre-filter, diluting single-frame spike energy to 1/5 before EWMA smoothing, so that EWMA's exponential decay weights are not severely biased by single-frame outliers.¶
Experimental results indicate that in discrete-event simulation environments such as CANoe, occasional Tq jitter is an inherent noise source; in real automotive ECU environments, such jitter is significantly reduced but does not disappear entirely. Therefore, mean(5) preprocessing has cross-platform universality and is recommended as a standard pre-stage retained before EWMA.¶
Adaptive Sliding Window Experiment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^¶
An intuitive improvement approach is to dynamically select the sliding window size based on the current load level — using a narrower window under low load to ensure response speed, and a wider window under high load to enhance smoothing. The experiment compared two approaches:¶
EWMA (alpha=0.10) was run on the outputs of both approaches, with comparison under three load groups (40ms, 20ms, 10ms) based on Ts=28ms calibration:¶
Table 6
| Load Period |
Fixed mean(5) EWMA Final |
Adaptive mean(5/10) EWMA Final |
Difference |
Assessment |
| 40ms |
6.0% |
6.0% |
0.0pp |
Consistent — 40ms stays entirely in Level 0~1; no switch triggered |
| 20ms |
9.0% |
9.0% |
0.0pp |
Consistent — 20ms stays entirely in Level 0~1; no switch triggered |
| 10ms |
67.6% |
66.0% |
-1.6pp |
Minor difference — 10ms stays entirely in Level 2+; wider window only slightly depresses final value |
Conclusion: Under Ts=28ms calibration with alpha=0.10 configuration, neither the 40ms nor the 20ms scenario triggers the Level 2 threshold (25%), so adaptive and fixed approaches show no difference. The 10ms scenario remains entirely in Level 2+, but the adaptive wider window produces only a 1.6pp final value difference, far from sufficient to improve level determination. Considering that adaptive window switching introduces additional state-dependent logic, and provides no substantive improvement for any load scenario, maintaining fixed mean(5) is the preferred approach. If enhanced high-load smoothing is desired, a more efficient design is to apply the adaptive logic to EWMA's alpha coefficient (rather than the sliding window size).¶