VehicleSpeedFusion Multi-Rate Example#
This example shows a VehicleSpeedFusion.Step runnable that depends on a separately modeled preprocessing function, VehicleSpeedPreProcessor.Step. The runnables are introduced following the standard naming convention which defines Init, Step and Terminate entry points per function.
The Data interfaces reuse standard wheel-speed VSS paths and Vehicle.Speed. Runtime quality is explicitly indicated through runtimeCompanion.qualityCode as an enum-based qualifier interface, without duplicating the normal Data metadata.
1# *******************************************************************************
2# Copyright (c) 2026 ZF Friedrichshafen AG
3#
4# See the NOTICE file(s) distributed with this work for additional
5# information regarding copyright ownership.
6#
7# This program and the accompanying materials are made available under the
8# terms of the Apache License Version 2.0 which is available at
9# https://www.apache.org/licenses/LICENSE-2.0
10#
11# SPDX-License-Identifier: Apache-2.0
12#
13# Contributors:
14# Thomas Pfleiderer - Function specification added
15# Saran Gundlapalli - vehicle_speed_fusion_multirate.afs.yaml updated according to metamodel v0.4.0
16# *******************************************************************************
17
18functionSpecification:
19 name: VehicleSpeedFusion
20 version: 1.0.0
21 metaModelRef:
22 name: Eclipse-autoapiframework-Metamodel
23 version: 0.4.0
24
25 description: Fuses standard VSS wheel-speed inputs into Vehicle.Speed. Input preprocessing is modeled as a separate function/runnable and referenced through the predecessor relationship.
26
27 dataInterfaces:
28 - name: Vehicle.Chassis.Axle.Row1.Wheel.Left.Speed
29 direction: input
30 dataType: float
31 description: Linear speed of the left wheel on axle row 1.
32 unit: km/h
33 min: null
34 max: null
35 defaultValue: null
36 resolution: null
37 precision: null
38 FuSa: true
39 ASIL: B
40 minUpdatePeriodMs: 10
41 accuracy: null
42 protection: complement
43 runtimeCompanion:
44 qualityCode:
45 name: Vehicle.Chassis.Axle.Row1.Wheel.Left.Speed.Qualifier
46 datatype: enum
47 enumRef: DataQuality
48
49 - name: Vehicle.Chassis.Axle.Row1.Wheel.Right.Speed
50 direction: input
51 dataType: float
52 description: Linear speed of the right wheel on axle row 1.
53 unit: km/h
54 min: null
55 max: null
56 defaultValue: null
57 resolution: null
58 precision: null
59 FuSa: true
60 ASIL: B
61 minUpdatePeriodMs: 10
62 accuracy: null
63 protection: complement
64 runtimeCompanion:
65 qualityCode:
66 name: Vehicle.Chassis.Axle.Row1.Wheel.Right.Speed.Qualifier
67 datatype: enum
68 enumRef: DataQuality
69
70 - name: Vehicle.Chassis.Axle.Row2.Wheel.Left.Speed
71 direction: input
72 dataType: float
73 description: Linear speed of the left wheel on axle row 2.
74 unit: km/h
75 min: null
76 max: null
77 defaultValue: null
78 resolution: null
79 precision: null
80 FuSa: true
81 ASIL: B
82 minUpdatePeriodMs: 10
83 accuracy: null
84 protection: complement
85 runtimeCompanion:
86 qualityCode:
87 name: Vehicle.Chassis.Axle.Row2.Wheel.Left.Speed.Qualifier
88 datatype: enum
89 enumRef: DataQuality
90
91 - name: Vehicle.Chassis.Axle.Row2.Wheel.Right.Speed
92 direction: input
93 dataType: float
94 description: Linear speed of the right wheel on axle row 2.
95 unit: km/h
96 min: null
97 max: null
98 defaultValue: null
99 resolution: null
100 precision: null
101 FuSa: true
102 ASIL: B
103 minUpdatePeriodMs: 10
104 accuracy: null
105 protection: complement
106 runtimeCompanion:
107 qualityCode:
108 name: Vehicle.Chassis.Axle.Row2.Wheel.Right.Speed.Qualifier
109 datatype: enum
110 enumRef: DataQuality
111
112 - name: Vehicle.Speed
113 direction: output
114 dataType: float
115 description: Fused vehicle speed output for downstream consumers.
116 unit: km/h
117 min: null
118 max: null
119 defaultValue: null
120 resolution: null
121 precision: null
122 FuSa: true
123 ASIL: B
124 minUpdatePeriodMs: 20
125 accuracy: null
126 protection: complement
127 runtimeCompanion:
128 qualityCode:
129 name: Vehicle.Speed.Qualifier
130 datatype: enum
131 enumRef: DataQuality
132
133 # Runtime quality companions are shown explicitly for the Data interfaces.
134 # Each qualifier is an enum-based runtime interface with DataQuality semantics.
135
136 parameters:
137 - name: Vehicle.Chassis.SpeedFusion.Alpha
138 dataType: float
139 defaultValue: 0.7
140 description: Weight applied by the fusion algorithm.
141 unit: ratio
142 tunable: false
143 min: 0.0
144 max: 1.0
145
146 - name: Vehicle.Chassis.SpeedFusion.MaxDeltaPerStep
147 dataType: float
148 defaultValue: 5.0
149 description: Maximum allowed output change per 20 ms cycle.
150 unit: km/h
151 tunable: false
152 min: 0.0
153 max: 100.0
154
155 scheduling:
156 - functionName: VehicleSpeedFusion.Init
157 runType: init
158 description: Initialize filter states and fallback defaults.
159 implementedASIL: B
160 executionResult:
161 type: FunctionResult
162 supervision:
163 required: false
164
165 - functionName: VehicleSpeedFusion.Step
166 runType: cyclic
167 description: >-
168 20 ms cyclic runnable that performs source fusion and publishes Vehicle.Speed.
169 cycleTimeMs: 20
170 implementedASIL: B
171 previousRunnableRef: VehicleSpeedPreProcessor.Step
172 executionResult:
173 type: FunctionResult
174 supervision:
175 required: false
176
177 - functionName: VehicleSpeedFusion.Terminate
178 runType: terminate
179 description: Release resources and set deterministic safe defaults.
180 implementedASIL: QM
181 previousRunnableRef: VehicleSpeedFusion.Step
182 executionResult:
183 type: FunctionResult
184 supervision:
185 required: false