A tricycle distributed control method, architecture, medium and device

By using distributed control methods and redundant communication links, the problems of driving safety and control continuity of tricycles under complex working conditions were solved, and normal driving and stable control were achieved under abnormal conditions.

CN123145273APending Publication Date: 2026-11-20GUANGDONG TELEPOWER TELECOM TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611228616.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

The existing centralized control architecture of tricycles is prone to abnormal driving control under complex working conditions due to main control system failure, communication link interruption or peripheral device failure, which affects driving safety and control continuity.

Method used

A distributed control method is adopted, which uses a primary and backup communication link between the first control node and the second control node to ensure that the transmission of driving control data is switched to the backup link in case of abnormality, and to isolate peripheral device failures to ensure normal vehicle operation.

Benefits of technology

Even when there are abnormal control routes, communication link interruptions, or peripheral device failures, the system can still maintain the driving safety and control continuity of the tricycle, avoid sudden power loss and loss of control, and improve the system's fault tolerance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123145273A_ABST
    Figure CN123145273A_ABST
Patent Text Reader

Abstract

The application discloses a tricycle distributed control method, architecture, medium and equipment, and the method comprises the following steps: establishing a main communication link and a standby communication link between a first control node and a second control node; the first control node acquires running data of the vehicle based on the main communication link, and determines the running state of the vehicle; when the running state is a control routing exception, the second control node generates a first control signal; when the running state is a main communication link exception, the first control node generates a second control signal for switching the link and transmitting only driving control data to the second control node; when the running state is an external device failure, the first control node generates an external device blocking signal; based on at least one of the first control signal, the second control signal and the external device blocking signal, the second control node is controlled to drive the vehicle to normally travel. The application can ensure the driving safety and control continuity of the tricycle under complex working conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed control technology for tricycles, and in particular to a distributed control method, architecture, medium, and device for tricycles. Background Technology

[0002] Currently, most traditional tricycle control systems on the market adopt a centralized architecture. Various functional modules, such as human-machine interaction, network communication, positioning, power control, battery management, and peripheral management, are typically integrated onto a single main control system, which centrally manages all operations. While this approach is easy to integrate in general scenarios, it gradually reveals the following problems when tricycles are used outdoors for extended periods, operate under complex conditions, experience significant vibration, and undergo substantial load variations: (1) Once the main control system fails, crashes, or is occupied by non-core business resources, causing abnormal control routing of the tricycle, it can easily directly affect the vehicle's most core driving control function. (2) When the communication link between the main control system and the tricycle is interfered with, interrupted or packet loss occurs, the vehicle control commands and status feedback cannot be transmitted stably, and the response lag or control discontinuity may occur. (3) When non-critical peripherals such as display, storage, and networking that are independent of the tricycle fail, the failure may also be transmitted to the power layer used to control the vehicle's movement, causing the vehicle to lose control due to peripheral failure and affecting driving safety.

[0003] Therefore, in the existing technology, tricycles are controlled using a centralized architecture. Under conditions such as abnormal control routing, interruption of communication links, or failure of non-critical peripherals, the damage may be transmitted to the power layer through a single master control node, making it difficult for tricycles to ensure driving safety and control continuity under complex conditions. Summary of the Invention

[0004] In order to overcome the shortcomings of the prior art, the purpose of this invention is to provide a distributed control method, architecture, medium and device for tricycles, which can ensure the driving safety and control continuity of tricycles even under complex working conditions such as abnormal control routing, interruption of communication links or failure of non-critical peripherals.

[0005] This invention is implemented according to the following scheme: A distributed control method for a tricycle is provided, including: Establish a primary communication link and a backup communication link between the first control node and the second control node; The first control node acquires the vehicle's operating data based on the main communication link and determines the vehicle's operating status based on the operating data; When the operating state is a control routing abnormality, the second control node generates a first control signal; When the operating state is that the main communication link is abnormal, the first control node generates a second control signal to switch the main communication link to the backup communication link, and the backup communication link only transmits driving control data for controlling the normal driving of the vehicle to the second control node. When the operating state is a peripheral fault, the first control node generates a peripheral blocking signal to block the transmission of the peripheral fault signal to the second control node. Based on at least one of the first control signal, the second control signal, and the peripheral blocking signal, the second control node is controlled to drive the vehicle to drive normally.

[0006] Optionally, the operational data includes heartbeat signals, link parameters, and peripheral status; Determining the operating status of the vehicle based on the operating data includes: When the first control node fails to acquire the heartbeat signal for multiple consecutive heartbeat cycles, and the number of multiple consecutive heartbeat cycles is greater than the preset number of cycles, the operating state is a control routing abnormality. The link parameters are parsed to obtain the number of error frames and the number of consecutive packet losses. When the number of error frames or the number of consecutive packet losses exceeds a preset number within a preset time window, the operating status is that the main communication link is abnormal. When the peripheral device is in an offline or faulty state, the operating state is a peripheral device fault.

[0007] Optionally, the second control node generates a first control signal, including: The second control node generates the first control signal based on the driving control data or preset degradation curve transmitted historically by the first control node.

[0008] Optionally, the first control node generates a peripheral blocking signal to block the transmission of a fault signal from the peripheral device to the second control node, including: The first control node obtains the fault type of the peripheral device; Based on the fault type, determine the blocking action for shutting down or suspending the peripheral data route from the first control node to the second control node to transmit the peripheral data; The peripheral blocking signal is generated based on the blocking action.

[0009] Optionally, based on the first control signal, controlling the second control node to drive the vehicle normally includes: The second control node stops receiving control commands transmitted by the first control node and stops executing control commands already transmitted by the first control node; The second control node drives the vehicle to maintain its current driving state or to decelerate gradually.

[0010] Optionally, based on the second control signal, controlling the second control node to drive the vehicle normally includes: The status of the backup communication link is obtained by performing status detection on the backup communication link. When the backup link status is normal, the second control node drives the vehicle to maintain the current driving state based on the driving control data. When the backup link is in an abnormal state, the second control node drives the vehicle to decelerate step by step based on a preset degradation curve.

[0011] Optional, also includes: When the control route abnormality is eliminated or the main communication link abnormality is eliminated, and the elimination time of the control route abnormality or the main communication link abnormality is greater than a preset time, the first control node generates a recovery control signal. Based on the recovery control signal, the first control node and the second control node return to normal operating status.

[0012] A distributed control architecture for a tricycle is also provided, applied to the aforementioned distributed control method for a tricycle, comprising: a main control module, a power control module, a communication coordination module, and a peripheral management module; the main control module is equipped with a first control node, which is used to acquire the vehicle's operating data, and the power control module is equipped with a second control node, which is used to drive the vehicle. The main control module is connected to the communication coordination module and the peripheral management module through the first control node, and the power control module is connected to the communication coordination module through the second control node.

[0013] A computer-readable storage medium is also provided, which is a computer-readable storage medium storing a computer program thereon, which, when executed, implements the aforementioned distributed control method for a tricycle.

[0014] A computer device is also provided, including a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and the processor loads and executes the at least one instruction, at least one program, code set or instruction set to implement the aforementioned distributed control method for a tricycle.

[0015] Compared with the prior art, the beneficial effects of the tricycle distributed control method of the present invention are as follows: a distributed architecture for controlling the tricycle is formed by a first control node and a second control node; when the control route is abnormal, the first control signal restricts the main communication link to transmit only driving control data to the second control node, so that the second control node can independently drive the vehicle to drive normally; when the main communication link is abnormal, the second control signal seamlessly switches to the backup communication link to continue transmitting driving control data to the second control node, avoiding interruption of control commands; when the peripheral device fails, the peripheral device blocking signal cuts off the connection between the peripheral device and the second control node, isolating non-critical faults outside the power layer used to drive the vehicle; thus, the tricycle can be driven normally under the conditions of abnormal control route, interrupted communication link, or non-critical peripheral device failure, ensuring the driving safety and control continuity of the tricycle under complex conditions. Attached Figure Description

[0016] Figure 1 This is a flowchart of the control method of the present invention; Figure 2 This is a schematic diagram of the control architecture of the present invention; The attached diagram shows the following labels: 1. Main control module; 101. First control node; 2. Power control module; 201. Second control node; 3. Communication coordination module; 4. Peripheral management module. Detailed Implementation

[0017] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0018] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.

[0019] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims. In the description of this application, it should be understood that the terms "first," "second," "third," etc., are used only to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0020] See Figure 1 As shown, a distributed control method for a tricycle according to the present invention includes: S1: Establish a main communication link and a backup communication link between the first control node and the second control node; wherein, the first control node and the second control node are independent of each other, so that if one node fails, the other node can still work normally. The first control node is used to acquire the vehicle's operating status data and generate control commands, and the second control node is used to independently drive the vehicle according to the control commands generated by the first control node. By configuring the control decision function and the driving function on the first control node and the second control node respectively, a distributed architecture for controlling the tricycle is formed. Compared with the traditional centralized architecture, the distributed architecture of the present invention can avoid the failure of the whole vehicle control due to the failure of a single node, and improve the fault tolerance and reliability of the system. In the present invention, the main communication link and the backup communication link are redundant, so that when the main communication link cannot transmit normally, the control commands can continue to be transmitted to the second control node through the backup communication link, avoiding the failure of vehicle control due to the failure of the main communication link.

[0021] S2: The first control node acquires the vehicle's operating data based on the main communication link and determines the vehicle's operating status based on the operating data; wherein, the operating data includes heartbeat signals, link parameters, and peripheral device status; the heartbeat signal is a survival signal sent by the first control node to the second control node at a preset period, used to indicate whether the first control node is in normal operating status; the link parameters are used to indicate the communication quality of the main communication link; the peripheral device status is used to indicate whether external devices connected to the vehicle are online or whether they are faulty when online.

[0022] The vehicle's operating status is determined based on operational data, including: when the first control node fails to acquire a heartbeat signal for multiple consecutive heartbeat cycles, and the number of consecutive heartbeat cycles exceeds a preset number of cycles, the operating status is a control routing anomaly, specifically, the first control node is abnormal; the link parameters are parsed to obtain the number of erroneous frames and the number of consecutive packet losses, and when at least one of the erroneous frames or the number of consecutive packet losses exceeds a preset number within a preset time window, the operating status is a main communication link anomaly; when the peripheral device is offline or faulty, the operating status is a peripheral device fault.

[0023] S3: When the operating status is abnormal control routing, the second control node generates the first control signal, including: the second control node generates the first control signal based on the driving control data transmitted by the first control node in the past or the preset degradation curve.

[0024] In one embodiment of the present invention, the first control signal is generated under abnormal control routing conditions, that is, the first control signal is generated under abnormal control node conditions. At this time, the first control node cannot normally transmit control commands to the second control node to control the second control node to drive the vehicle. Under normal conditions, the first control node not only transmits control commands to the second control node, but also synchronously transmits driving control data for generating control commands for the second control node to store. Therefore, under the condition that the first control node cannot normally generate control commands and transmit them to the second control node, the second control node will generate the first control signal based on the driving control data previously transmitted and stored by the first control node, so that the tricycle can drive normally even under abnormal control routing conditions, or generate the first control signal based on a preset degradation curve. At this time, under the first control signal, the second control node drives the vehicle to gradually limit the upper limit of torque output and reduce the acceleration slope according to the preset degradation curve, and gradually control the vehicle to stop, so that the tricycle can maintain the current driving state and continue to drive under abnormal control routing conditions or gradually stop according to the preset degradation curve.

[0025] This invention achieves independence between control and driving functions by generating a first control signal from a second control node when the first control node is abnormal (control routing abnormality). That is, even when the first control node fails, the second control node can still independently maintain the basic driving control of the vehicle based on locally stored driving control data or a preset degradation curve. Compared with the traditional centralized architecture, this invention can prevent the tricycle from suddenly losing control or experiencing a sudden power interruption due to control routing abnormality, ensuring the driving safety and control continuity of the vehicle.

[0026] S4: When the main communication link is abnormal during operation, the first control node generates a second control signal to switch the main communication link to the backup communication link, and the backup communication link only transmits driving control data for controlling the normal driving of the vehicle to the second control node; wherein, the driving control data includes, but is not limited to, key data for normal driving of the vehicle, such as gear information, speed information, power request, battery protection status and fault code.

[0027] When the primary communication link fails, this invention automatically switches to a backup communication link to route data transmission between the first and second control nodes. After switching to the backup communication link, the first control node only transmits driving control data to the second control node, without transmitting control commands generated by the first control node based on the transmitted driving control data, or log synchronization data, extended positioning synchronization data, and other non-critical peripheral data. This avoids the preemption of driving control data transmission resources by non-critical data occupying the limited bandwidth of the backup communication link when the primary communication link fails, and avoids delays or packet loss in the transmission of critical control data due to the lower data throughput of the backup communication link compared to the primary communication link. It ensures that the backup communication link can transmit the core data necessary for maintaining normal vehicle operation with the highest priority under limited bandwidth, thereby ensuring that the vehicle remains basically controllable when the primary communication link fails.

[0028] S5: When the operating status is a peripheral fault, the first control node generates a peripheral blocking signal to block the transmission of the peripheral fault signal to the second control node, including: the first control node obtaining the peripheral fault type; determining the blocking action for closing or suspending the peripheral data route from the first control node to the second control node based on the fault type; and generating the peripheral blocking signal based on the blocking action.

[0029] In one embodiment of the present invention, the peripheral device is connected to the first control node. Under normal overall control architecture conditions, when the first control node transmits control commands and driving control data to the second control node, it also synchronously transmits peripheral device data connected to it. For example, while the first control node transmits driving-related data such as real-time vehicle speed and gear status to the second control node, it also synchronously transmits display data for instrument display, log data for recording, or positioning data for extension. This peripheral device data is not critical data necessary for the second control node to drive the vehicle normally. When a peripheral device malfunctions, this invention disables or suspends the peripheral data routing from the first control node to the second control node, thereby blocking the data routing and service requests of the malfunctioning peripheral device. Simultaneously, it retains only the peripheral device's fault type, fault level, and online / offline status, allowing the first control node to record the status and provide user prompts. This ensures the second control node remains unaffected by the peripheral device malfunction and continues to drive the vehicle normally. It prevents the malfunctioning peripheral device from transmitting fault signals to the second control node via data routing, which could lead to the second control node misjudging the vehicle's status and triggering unnecessary power interruptions. This effectively limits the impact of the fault to the peripheral management layer.

[0030] S6: Based on at least one of the first control signal, the second control signal, and the peripheral blocking signal, control the second control node to drive the vehicle to drive normally.

[0031] In one embodiment of the present invention, controlling a second control node to drive a vehicle normally based on a first control signal includes: the second control node stopping receiving control commands transmitted by the first control node and stopping executing control commands already transmitted by the first control node; the second control node driving the vehicle to maintain its current driving state or gradually decelerate.

[0032] This invention achieves the second control node's independence from the first control node's real-time control commands by ceasing to receive control commands transmitted by the first control node. The second control node independently takes over vehicle control based on locally stored driving control data or a preset degradation curve. This prevents invalid, erroneous, or delayed control commands caused by the first control node's malfunction from entering the second control node's execution queue, and prevents the malfunctioning first control node from continuously outputting interference signals that consume communication resources or affect the second control node's normal decision-making. Furthermore, by ceasing to execute control commands already transmitted by the first control node, the second control node is not affected by outdated or mismatched control commands transmitted before the first control node's malfunction, thus preventing abnormal power output or chaotic execution logic caused by a mismatch between the last command sent by the first control node before the malfunction and the vehicle's current actual operating state, which could lead to vehicle loss of control.

[0033] In the event of a control routing anomaly (abnormal first control node), the second control node no longer passively waits for or blindly executes control commands transmitted from the abnormal first control node. Instead, it actively severs its command dependency with the abnormal first control node and autonomously generates drive commands based on its stored historical driving control data or preset degradation curves to drive the vehicle to maintain its current driving state or gradually decelerate. This ensures that the vehicle can still maintain a basic controllable state when the first control node is abnormal, avoiding sudden power interruption or sudden loss of control due to the failure of the first control node, and significantly improving the driving safety and control stability of the vehicle under abnormal conditions.

[0034] In one embodiment of the present invention, controlling a second control node to drive a vehicle normally based on a second control signal includes: performing status detection on a backup communication link to obtain the backup link status; when the backup link status is a normal backup link status, the second control node drives the vehicle to maintain the current driving state based on driving control data; when the backup link status is an abnormal backup link status, the second control node drives the vehicle to decelerate step by step based on a preset degradation curve.

[0035] Before switching from the primary communication link to the backup communication link, this invention detects whether the backup communication link can transmit data normally, thus avoiding a complete loss of vehicle control due to switching to an unavailable backup communication link. Simultaneously, in the event of a backup communication link malfunction, the second control node can independently drive the vehicle to gradually decelerate based on a preset degradation curve, preventing a complete loss of vehicle control due to both a primary and backup communication link malfunction. This invention pre-detects the availability of the backup communication link through a second control signal and retains the ability to degrade even in the extreme case where both links are unavailable. This achieves dual protection of communication link redundancy and safety, ensuring that the vehicle maintains a basic controllable state under any communication condition, thereby improving the fault tolerance of vehicle control and driving safety.

[0036] In one embodiment of the present invention, the control method further includes: when the control route abnormality is eliminated or the main communication link abnormality is eliminated, and the elimination time of the control route abnormality or the main communication link abnormality is eliminated is greater than a preset time, the first control node generates a recovery control signal; based on the recovery control signal, the first control node and the second control node are restored to normal working state.

[0037] See Figure 2 As shown, the present invention discloses a distributed control architecture for a tricycle, applied to the aforementioned distributed control method for a tricycle, comprising: a main control module 1, a power control module 2, a communication coordination module 3, and a peripheral management module 4; the main control module 1 is provided with a first control node 101, which is used to acquire vehicle operating data; the power control module is provided with a second control node 201, which is used to drive the vehicle; the main control module 1 is connected to the communication coordination module 3 and the peripheral management module 4 through the first control node 101, and the power control module 2 is connected to the communication coordination module 3 through the second control node 201; wherein, the connection link between the main control module 1 and the communication coordination module 3 through the first control node 101, and the connection link between the communication coordination module 3 and the second control node 201 of the power control module 2, are the main communication link or the backup communication link, the main communication link being a CAN communication link, and the backup communication link being a LIN communication link.

[0038] In one embodiment of the present invention, it further includes a battery management module, a human-machine interaction module, a communication and positioning module, an attitude acquisition module, and a peripheral storage and clock module; the main control module 1 and the human-machine interaction module constitute the main control interaction layer, the communication coordination module 3 constitutes the communication coordination layer, the power control module 2 and the battery management module constitute the power execution layer, the peripheral management module 4, the communication and positioning module, and the peripheral storage and clock module constitute the peripheral management layer, and the attitude acquisition module, as an auxiliary information acquisition part, works in conjunction with the main control interaction layer, the communication coordination layer, and the power execution layer.

[0039] Next, based on the above-mentioned distributed control method for tricycles, the workflow of vehicle control by the distributed control architecture for tricycles will be explained: When the distributed control architecture of the tricycle is in normal working condition: After the vehicle is powered on, the main control module 1 starts the control program, completes the initialization of the application main thread, service thread and vehicle control communication thread, and loads CanServiceManager and its corresponding system Java and AIDL interface files, and establishes a connection link with the communication coordination module 3. The communication coordination module 3 synchronously completes the UART / local bus receiving task, the main communication link initialization task, the backup communication link initialization task and the heartbeat sending task. The attitude acquisition module completes the sensor zero point calibration, attitude baseline establishment and filter parameter initialization. The communication and positioning module completes network registration, signal detection, positioning initialization and clock synchronization.

[0040] During the system startup phase, the main control module 1 executes a system self-test process, sequentially reading the vehicle version information, communication control unit version information, device identity information, cellular network status and signal strength, external network connectivity, RTC time status, TF card and external Flash status, low-voltage power supply status and remaining power status, and encapsulates the test results into a startup status object; if only non-critical anomalies such as display anomalies, storage anomalies or positioning anomalies exist, they are recorded and displayed through fault prompt logic without interrupting the power link initialization.

[0041] The human-machine interaction module receives user input, encapsulates the input events into operation objects, and sends them to the main control module 1. The main control module 1 periodically acquires vehicle speed, gear, remaining battery power, and network status, while simultaneously receiving tilt angle, angular velocity, acceleration, and operating condition identification results reported by the attitude acquisition module. The first control node 101 of the main control module 1 performs status fusion and parameter judgment on the acquired speed, gear, battery power, battery, attitude, network status, and user input data, generates scene control parameters or power control requests, and encapsulates the corresponding requests into unified control messages and sends them to the communication coordination module 3.

[0042] After receiving the control request from the main control module 1, the communication coordination module 3 first unpacks the request, and then sequentially performs frame integrity verification, message source verification, priority sorting and target route determination. It writes the power-related requests into the CAN transmission queue of the main communication link or the LIN transmission queue of the backup communication link, and sends the status synchronization request, storage access request or communication positioning request to the power control module 2.

[0043] After receiving the target speed, target gear, torque limit value and attitude compensation amount transmitted by the communication coordination module 3, the second control node 201 of the power control module 2 parses the control command, calculates the speed deviation and adds the attitude compensation amount, limits the maximum torque according to the battery's allowable output capacity, and finally outputs the final control amount to drive the motor to run, thereby realizing the driving control of the vehicle.

[0044] During operation, the power control module 2 reports real-time vehicle speed, gear status, output current, bus voltage, temperature rise status, and fault codes to the communication coordination module 3; the battery management module reports battery voltage, current, temperature, SOC, protection status, and fault codes to the communication coordination module 3; the communication coordination module 3 writes the above statuses into a unified status cache and synchronously displays and records them to the main control module 1; the peripheral storage and clock module encapsulates speed, gear, battery level, network status, fault type, mode switching time, and protection action records into an operation log object and writes it to the TF card or external Flash according to the timestamp; the peripheral storage and clock module provides a unified time reference through getPDRTCTime().

[0045] When the distributed control architecture of a tricycle experiences a control routing anomaly: When the communication coordination module 3 continuously detects the heartbeat signal of the first control node 101 in the main control module 1 through the heartbeat monitoring task (heartbeatMonitorTask), if no heartbeat signal is received for several consecutive heartbeat cycles, the fault is written into the fault state table (FaultStateTable) and it is determined that the main control module 1 is abnormal, that is, the control routing is abnormal.

[0046] The communication coordination module 3 invokes the degradation mode switching logic to switch to the first safety degradation mode. After entering this mode, the communication coordination module 3 stops waiting for new upper-level control requests from the main control module 1, freezes new scene switching commands and non-critical control requests from the main control interaction layer, and disables log writing, network extended interaction, multimedia prompts and other non-critical peripheral access, retaining only the minimum necessary control links required for power control, battery protection, fault codes, vehicle speed and gear status.

[0047] The second control node 201 of the power control module 2 calls the preset degradation strategy (applySafeDegrade) to freeze the new scene switching command from the main control interaction layer, maintain the current safe output state, and gradually limit the upper limit of torque output and reduce the acceleration slope according to the preset degradation curve to prevent the vehicle from suddenly losing control or power interruption due to the abnormality of the main control module 1.

[0048] The battery management module continuously collects the operating status of the power battery and judges abnormal voltage, abnormal temperature, abnormal current and remaining capacity status. When an abnormality is detected, it first generates a protection flag locally, and then uploads the protection status and fault code to the communication coordination module 3. The communication coordination module 3 synchronizes it to the second control node 201 of the power control module 2 to perform power limiting, acceleration restriction or switching protection output.

[0049] During the period of control routing anomaly, the peripheral management module 4 shuts down the access channels of non-critical peripherals, stops non-essential services such as log writing, network extension interaction and multimedia prompts, and only retains basic fault code records. When the communication coordination module 3 detects that the main control module 1 has resumed response and continues to meet the recovery conditions for a preset time, it switches back from the first security degradation mode to the normal working mode.

[0050] When the distributed control architecture of a tricycle experiences a main communication link failure: The communication coordination module 3 continuously monitors the main communication link for error frames, packet loss, and communication timeouts via the CAN error monitoring task (canErrorMonitorTask), and monitors the response status of the backup communication link via the LIN health monitoring task (linHealthMonitorTask). When the main communication link continuously generates error frames, experiences continuous packet loss, or fails to respond within a preset time window, the fault is written to the fault state table (FaultStateTable) and the main communication link is determined to be abnormal.

[0051] The communication coordination module 3 calls the second safety degradation mode switching logic (enterSafeMode2), and uses the backup link switching command (switchToLinBackup) to make the backup communication link take over the transmission of driving control data within a preset time. At the same time, it calls the extended data channel closing command (disableExtendedDataRoute) to suspend log synchronization, extended positioning data synchronization and other non-critical peripheral data transmission, and only retains key data such as gear information, speed information, power request, battery protection status and fault code, and continues to send them to the second control node 201 of the power control module 2 through the backup communication link.

[0052] At this time, the second control node 201 of the power control module 2 receives the driving control data transmitted by the communication coordination module 3 through the backup communication link, calls the control command parsing method (parseDriveCommand) to parse the target speed, target gear, control mode, torque limit value and attitude compensation amount, read the motor speed, output current, vehicle speed and gear status, read the upper limit of the battery's allowable output power, calculate the speed deviation and add the attitude compensation amount, limit the maximum torque according to the battery status, and finally output the final control amount to drive the motor to run so as to drive the vehicle to drive normally.

[0053] The battery management module continuously collects the operating status of the power battery and uploads the battery status data to the communication coordination module 3. The communication coordination module 3 then synchronizes the data to the second control node 201 of the power control module 2 via a backup communication link to perform power limiting or acceleration restriction.

[0054] During the period of main communication link abnormality, the peripheral management module 4 and the communication coordination module 3 suspend log synchronization, extended positioning data synchronization and other non-critical peripheral data transmission, but retain the basic fault code recording function. When the communication coordination module 3 detects that the CAN main communication link has resumed normal transmission and the recovery conditions have been met for a preset time, it switches back to normal working mode from the second security degradation mode.

[0055] When the distributed control architecture of the tricycle experiences a peripheral failure: The communication coordination module 3 continuously monitors the online status of non-critical peripherals such as the display module, communication and positioning module, storage module, and voice prompt module through the peripheralalalal task. When it detects that the display module is unresponsive, the positioning module has no valid data, the TF card writing fails, the voice module is offline, or the network module cannot connect for a long time, it writes the fault to the fault state table and classifies the fault as a peripheral management layer fault, rather than classifying it as a main control abnormality, main communication link abnormality, or power execution abnormality.

[0056] The communication coordination module 3 shuts down or suspends data routing and service requests related to the faulty module based on the type of the fault, including: stopping the writing of normal operation logs, detailed logs, and extended data when the storage module is abnormal, retaining only the minimum fault code or using backup Flash records when available; suspending remote reporting, location trajectory uploading, and network extended interaction when the communication and positioning module is abnormal, retaining only local basic operation; stopping voice broadcast requests when the voice module is abnormal but not affecting its display prompts and power control; and stopping interface refresh or prompt output when the display module is abnormal but not affecting its speed, gear, torque, and battery protection data transmission.

[0057] The communication coordination module 3 blocks, downgrades, or queues and discards subsequent requests from the same peripheral device. It no longer sends detailed log writing requests to the faulty storage module, nor sends extended positioning synchronization requests to the abnormal positioning module, thus preventing abnormal modules from repeatedly occupying communication resources or blocking critical control queues.

[0058] After receiving the peripheral device fault synchronization, the main control module 1 only performs processing such as prompt display, status recording, function graying, service degradation or user alarm, without generating a shutdown command for the power execution layer, nor changing the core control link between the power control module 2 and the battery management module; the power control module 2 maintains its current operating state, unaffected by the peripheral device fault, and continues to drive the vehicle normally; the communication coordination module 3 continues to maintain the normal forwarding of key data frames such as power-related requests, battery protection status, vehicle speed, gear position and fault codes, ensuring that non-critical peripheral device faults do not spread to the power execution layer.

[0059] When the tricycle's distributed control architecture is restored to normal operating status: A tiered recovery strategy is adopted. First, the core synchronization link between the main control module 1 and the communication coordination module 3 is restored. Second, basic displays such as vehicle speed, battery level, gear position, and network status are restored. Then, non-critical services such as storage access, log recording, network expansion functions, and multimedia prompts are restored. If necessary, a smooth switching logic is used to avoid sudden power changes, status jumps, display anomalies, or data corruption during the recovery process.

[0060] The smooth switching logic is as follows: when the main control module 1 resends a valid heartbeat or the CAN main communication link re-emerges with a stable response, the communication coordination module 3 first enters the recovery confirmation phase and continues to perform continuous detection within the preset recovery time: the recovery conditions are considered to be met only if the main control heartbeat is valid for 5 consecutive times, there is no continuous packet loss in the CAN key frame within 1 to 3 seconds and the CRC check is correct, and the message sequence number and timestamp issued by the main control are valid consecutively. During the confirmation phase, the system still maintains the speed limit, torque limit and non-critical business freeze state in the security degradation mode and does not immediately release all control permissions. Once the recovery conditions are met, the communication coordination module 3 first restores the core synchronization link between the main control module 1 and the communication coordination module 3. This requires the main control module 1 to resynchronize the current vehicle speed, gear, battery level, fault status, degraded mode status, most recent valid power request, and current torque limit value. This prevents the main control module 1 from directly issuing control requests unsuitable for the current vehicle state based on the old state before the disconnection. After completing the state synchronization, the communication coordination module 3 then performs a smooth transition of power parameters. It uses the current output value in the safe degraded mode as the starting point and the target output value calculated by the main control module 1 in the normal mode as the endpoint. The target torque, target vehicle speed, acceleration limit, and attitude compensation are gradually adjusted according to a preset slope or piecewise interpolation. For example, if the torque limit in the current degraded mode is 35%, and the target torque calculated in the normal mode is 60%, the system does not jump directly to 60%. Instead, it gradually increases the torque by 3% to 5% every 100ms, or recovers it through multiple interpolations within a transition window of 1 to 3 seconds. If, during the recovery process, the battery temperature is too high, the SOC is too low, the attitude angle is abnormal, the vehicle speed fluctuates too much, or the main link loses packets again, the upgrade will be stopped immediately and the current safe output will be maintained, and the system will re-enter the safe degradation mode.

[0061] For scene parameter switching, the same smooth approach is adopted. When restoring from degraded mode to hill climbing, cargo loading, or commuting scenarios, parameters such as Kp, Ki, Kd, ​​T_limit, and ΔT can be gradually implemented after confirmation according to the parameter version number, avoiding vehicle jerking caused by instantaneous changes in PID parameters or torque limit. For display and status synchronization, the communication coordination module 3 first restores basic displays such as vehicle speed, battery level, gear position, fault codes, and current mode, and discards expired data before restoration by using timestamps and message sequence numbers to prevent the interface from jumping back to the old state. For non-critical services such as storage, logs, network expansion, and multimedia prompts, they are restored in batches after the power control link is stable, first restoring fault logs, then restoring ordinary operation logs, and finally restoring remote detailed reporting and voice / multimedia prompts.

[0062] The distributed control architecture of this invention sets up a main control module 1, a power control module 2, a communication coordination module 3, and a peripheral management module 4. The control function and driving function are respectively configured on the first control node 101 and the second control node 201. A redundant backup communication link is added on the basis of the main communication link, so that the first control node 101 and the second control node 201 form a cooperative control architecture with distributed redundant communication and hierarchical fault isolation. When the control route is abnormal, the second control node 201 can independently maintain driving control; when the main communication link is abnormal, it can automatically switch to the backup link to continue transmitting driving control data; when the peripheral device fails, the fault is isolated outside the power execution layer by route blocking; and after the fault is eliminated, it can be smoothly restored to the normal working state through a hierarchical recovery strategy.

[0063] Compared with the traditional centralized architecture, this invention can avoid sudden power loss and unexpected shutdown caused by a single control node failure, communication link interruption or non-critical peripheral failure under different complex working conditions. It ensures that the tricycle can maintain a basic driving controllable state under various abnormal scenarios, significantly improving the driving safety and control continuity of the tricycle under complex working conditions. At the same time, the layered deployment reduces the functional coupling, which is convenient for subsequent functional expansion and vehicle model adaptation.

[0064] This invention discloses a computer-readable storage medium storing a computer program thereon, which, when executed, implements the aforementioned distributed control method for tricycles.

[0065] Optionally, the computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. The random access memory may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM).

[0066] The computer device of the present invention includes a processor and a memory. The memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the above-described distributed control method for tricycles.

[0067] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0068] The memory can be used to store the computer programs or modules. The processor implements various functions of the tricycle distributed control method by running or executing the computer programs or modules stored in the memory and calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0069] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A distributed control method for a tricycle, characterized in that, include: Establish a primary communication link and a backup communication link between the first control node and the second control node; The first control node acquires the vehicle's operating data based on the main communication link and determines the vehicle's operating status based on the operating data; When the operating state is a control routing abnormality, the second control node generates a first control signal; When the operating state is that the main communication link is abnormal, the first control node generates a second control signal to switch the main communication link to the backup communication link, and the backup communication link only transmits driving control data for controlling the normal driving of the vehicle to the second control node. When the operating state is a peripheral fault, the first control node generates a peripheral blocking signal to block the transmission of the peripheral fault signal to the second control node. Based on at least one of the first control signal, the second control signal, and the peripheral blocking signal, the second control node is controlled to drive the vehicle to drive normally.

2. The distributed control method for a tricycle according to claim 1, characterized in that, The operational data includes heartbeat signals, link parameters, and peripheral status. Determining the operating status of the vehicle based on the operating data includes: When the first control node fails to acquire the heartbeat signal for multiple consecutive heartbeat cycles, and the number of multiple consecutive heartbeat cycles is greater than the preset number of cycles, the operating state is a control routing abnormality. The link parameters are parsed to obtain the number of error frames and the number of consecutive packet losses. When the number of error frames or the number of consecutive packet losses exceeds a preset number within a preset time window, the operating status is that the main communication link is abnormal. When the peripheral device is in an offline or faulty state, the operating state is a peripheral device fault.

3. The distributed control method for a tricycle according to claim 1, characterized in that, The second control node generates a first control signal, including: The second control node generates the first control signal based on the driving control data or preset degradation curve transmitted historically by the first control node.

4. The distributed control method for a tricycle according to claim 1, characterized in that, The first control node generates a peripheral blocking signal to block the transmission of a fault signal from the peripheral device to the second control node, including: The first control node obtains the fault type of the peripheral device; Based on the fault type, determine the blocking action for shutting down or suspending the peripheral data route from the first control node to the second control node to transmit the peripheral data; Based on the blocking action, the peripheral blocking signal is generated.

5. The distributed control method for a tricycle according to claim 1, characterized in that, Based on the first control signal, controlling the second control node to drive the vehicle normally includes: The second control node stops receiving control commands transmitted by the first control node and stops executing control commands already transmitted by the first control node; The second control node drives the vehicle to maintain its current driving state or to decelerate gradually.

6. The distributed control method for a tricycle according to claim 1, characterized in that, Based on the second control signal, controlling the second control node to drive the vehicle normally includes: The status of the backup communication link is obtained by performing status detection on the backup communication link. When the backup link status is normal, the second control node drives the vehicle to maintain the current driving state based on the driving control data. When the backup link is in an abnormal state, the second control node drives the vehicle to decelerate step by step based on a preset degradation curve.

7. The distributed control method for a tricycle according to claim 1, characterized in that, Also includes: When the control route abnormality is eliminated or the main communication link abnormality is eliminated, and the elimination time of the control route abnormality or the main communication link abnormality is greater than a preset time, the first control node generates a recovery control signal. Based on the recovery control signal, the first control node and the second control node return to normal operating status.

8. A distributed control architecture for a tricycle, applied to the distributed control method for a tricycle as described in any one of claims 1-7, characterized in that, include: The system includes a main control module, a power control module, a communication coordination module, and a peripheral management module. The main control module has a first control node, which is used to acquire the vehicle's operating data. The power control module has a second control node, which is used to drive the vehicle. The main control module is connected to the communication coordination module and the peripheral management module through the first control node, and the power control module is connected to the communication coordination module through the second control node.

9. A computer-readable storage medium, characterized in that, It is a computer-readable storage medium on which a computer program is stored, which, when executed, implements a distributed control method for a tricycle as described in any one of claims 1-7.

10. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one instruction, at least one program, code set, or instruction set, the at least one instruction, at least one program, code set, or instruction set being loaded and executed by the processor to implement a distributed control method for a tricycle as described in any one of claims 1 to 7.