Vehicle Control Unit

Architecture

The Vehicle Control Unit (VCU) is architected in a layered manner to ensure modularity and maintainability. Most of the drivers and the middlewares are provided by Zephyr, with only parts in blue being implemented by us.

../_images/architecture.svg

The architecture of the VCU.

Data Flow

The system’s data mainly comes from the sensors and CAN Open, which is aggregated first into appropriate messages types using Data Aggregation and then published to Zephyr Zbus. CAN Open may also send commands to change the state of the system, the parameters of the control algorithms, etc., which is handled by Command System and then dispatched to appropriate modules via function calls. Finally, in order to transmit telemetry data, Telemetry System is used as the broker to receive messages from Zbus for various backend protocols, including data logginger, to publish.

../_images/data_flow_diagram.svg

The data flow diagram of the VCU.

State Transition Diagram

State Machine uses Zephyr state machine framework, which is based on Hierarchical state machine, to manage the complex state transitions of VCU’s control system. Here the black filled circles represent the initial state and the initial state transition of the state machine, meaning which substate to enter when transitioning to the parent state. So the initial state of the VCU is RTD_BLINK.

../_images/state_transition_diagram.svg

UML state diagram of the VCU.