Control System, Clock Synchronization Method, Controller, Node Device, and Vehicle

The control system addresses low synchronization accuracy in vehicle control systems by using a ring network with a primary controller to directly transmit a reference clock signal, improving synchronization accuracy and reliability for high-precision vehicle control.

JP7715799B2Active Publication Date: 2025-07-30YINWANG INTELLIGENT TECHNOLOGIES CO LTD
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
JP2023526155
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-10-29
Publication Date
2025-07-30
Estimated Expiration
2040-10-29

AI Technical Summary

Technical Problem

Existing clock synchronization methods in vehicle control systems, such as Precision Time Protocol (PTP) and Ethernet Control Automation Technology (EtherCAT), suffer from low synchronization accuracy and reliability due to the primary ECU sending and receiving data frames to synchronize local clocks, leading to inefficiencies in high-precision vehicle control.

Method used

A control system utilizing a ring network with a primary controller that directly transmits a reference clock signal to node devices, enabling time adjustment based on the primary controller's local clock frequency, and forming a redundant signal exchange path to enhance synchronization accuracy and reliability.

Benefits of technology

The direct transmission of the reference clock signal improves clock synchronization accuracy to the pulse width level, ensuring reliable signal transmission and reducing synchronization errors, thereby enhancing the precision and efficiency of vehicle control systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007715799000002
    Figure 0007715799000002
  • Figure 0007715799000003
    Figure 0007715799000003
  • Figure 0007715799000004
    Figure 0007715799000004
Patent Text Reader

Abstract

This application provides a control system, a clock synchronization method, a controller, a node device, and a vehicle, and relates to the field of electronic technology in the automotive field. In the control system provided in this application, a primary controller directly transmits a reference clock signal to at least one node device using a ring network, thereby allowing the at least one node device to perform time adjustment based on the frequency of the reference clock signal. In this way, the accuracy of clock synchronization between the primary controller and the node device can be improved to an accuracy equivalent to the pulse width of the reference clock signal. In addition, because the control system includes a ring network, it is guaranteed that a redundant path exists when exchanging signals between the primary controller and the node device, thereby ensuring the reliability of signal transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technology in the automotive field, and particularly relates to a control system, a clock synchronization method, a controller, a node device, and a vehicle.

Background Art

[0002] With the development of vehicle intelligence, the number of electronic control units (ECUs) included in vehicle control systems is increasing. An ECU can be connected to sensors and actuators. The ECU can process data collected by the sensors and control the actuator to perform corresponding operations.

[0003] To achieve high-precision control of a vehicle, clock synchronization among multiple ECUs needs to be guaranteed. In related technologies, the precision time protocol (PTP) or Ethernet control automation technology (EtherCAT) is used to perform clock synchronization among multiple ECUs.

[0004] However, when PTP or EtherCAT is used for clock synchronization, the primary ECU among multiple ECUs can send data frames to other ECUs and receive data frames returned by other ECUs. The primary ECU can determine the clock error between the local clocks of multiple ECUs based on the data frames returned by other ECUs, and then perform clock synchronization for the local clocks of the ECUs. In this synchronization method, the synchronization accuracy is low.

Summary of the Invention

[0005] This application provides a control system, a clock synchronization method, a controller, a node device, and a vehicle for solving the problem of low synchronization accuracy in clock synchronization among a plurality of control devices that are within a control system and configured to control sensors and actuators.

[0006] According to an aspect, this application provides a control system. The control system includes a ring network. The ring network includes a primary controller and at least one node device. The primary controller is configured to perform time adjustment based on the frequency of the local clock signal of the primary controller, execute tasks, and transmit a reference clock signal to at least one node device using the ring network. The reference clock signal is obtained based on the local clock signal of the primary controller. The at least one node device is configured to perform time adjustment based on the frequency of the reference clock signal and execute tasks.

[0007] In the solution provided in this application, the primary controller directly transmits a reference clock signal to perform time synchronization, thereby improving the accuracy of clock synchronization between the primary controller and the node device to an accuracy equal to the pulse width of the reference clock signal. Thereby, the accuracy of clock synchronization is effectively improved. In addition, in order to form a ring network, the primary controller and at least one node device in the control system can be sequentially connected, so as to ensure that there is a redundant signal exchange path during the signal exchange between the primary controller and at least one node device, thereby ensuring the reliability of signal transmission.

[0008] Optionally, the reference clock signal may be the local clock signal of the primary controller, i.e., the primary controller may directly transmit the local clock signal of the primary controller to at least one node device.

[0009] Optionally, the reference clock signal may be a clock signal obtained by performing frequency division of the local clock signal of the primary controller. Since the frequency of the local clock signal of the primary controller is generally high, the primary controller may perform frequency division of the local clock signal of the primary controller to obtain a reference clock signal to ensure that the node device can support the frequency of the reference clock signal.

[0010] Optionally, at least one node device may include a phase-locked loop. At least one node device may use the phase-locked loop to correct the frequency of the local clock signal of the node device based on the frequency of the reference clock signal to maintain a target ratio between the frequency of the local clock signal of the node device and the frequency of the reference clock signal, and may be configured to perform time adjustment based on the frequency of the local clock signal of the node device.

[0011] The target ratio may be a fixed value preset in the node device, and the target ratio is a ratio of two positive integers. The node device may use the phase-locked loop to correct the frequency of the local clock signal of the node device, so that the frequency of the local clock signal of the node device and the frequency of the reference clock signal can achieve pulse-level synchronization.

[0012] Optionally, at least one node device may be configured to perform time adjustment based on the frequency of the reference clock signal. In other words, the node device can directly execute tasks based on the beats of the reference clock signal without the need to correct the frequency of the local clock signal of the node device.

[0013] Optionally, the primary controller may be further configured to adjust the frequency of the local clock signal of the primary controller within a target frequency range, i.e., the primary controller may perform frequency modulation of the local clock signal of the primary controller to achieve frequency modulation of the reference clock signal.

[0014] By performing frequency modulation of the reference clock signal, the electromagnetic compatibility (EMC) performance of circuits sensitive to frequency within the control system can be effectively improved in the task execution process.

[0015] Optionally, the primary controller may be further configured to use a ring network to send a synchronization signal to at least one node device. At least one node device is further configured to correct the time of the local clock of the node device based on the received synchronization signal. In this way, not only frequency synchronization of the clock but also time synchronization can be achieved between the primary controller and at least one node device.

[0016] Optionally, the primary controller may be connected to at least one node device using a clock signal cable. The primary controller is configured to send a synchronization signal and a reference clock signal to at least one node device using the clock signal cable. At least one node device is configured to separately obtain the synchronization signal and the reference clock signal from the received signal based on the amplitude and / or pulse width of the received signal.

[0017] The primary controller sends the synchronization signal and the reference clock signal using one clock signal cable. Thereby, an increase in the number of signal cables between the primary controller and the node device within the control system can be prevented, and the structure of the control system can be simplified.

[0018] Optionally, the primary controller may be connected to at least one node device using a clock signal cable and a synchronization signal cable. The primary controller is configured to transmit a reference clock signal to at least one node device using the clock signal cable and to transmit a synchronization signal to at least one node device using the synchronization signal cable.

[0019] The primary controller uses different signal cables to transmit the synchronization signal and the reference clock signal separately, so that the node device does not need to parse the synchronization signal and the reference clock signal from the composite signal. This reduces the complexity of receiving the synchronization signal and the reference clock signal by the node device.

[0020] Optionally, at least one node device may be at least one secondary controller. The control system may further include at least one sensor and at least one actuator. The at least one sensor is connected to the primary controller or at least one secondary controller, and the at least one actuator is connected to the primary controller or at least one secondary controller. The tasks that need to be executed by the primary controller and the tasks that need to be executed by at least one secondary controller each include one or more of the following tasks: namely, data transmission task, data processing task, instruction transmission task, and drive signal output task. The instruction is used to instruct at least one sensor to collect data or to instruct at least one actuator to output a drive signal.

[0021] In the solution provided in this application, a primary controller can cooperate with at least one secondary controller to control at least one sensor and at least one actuator within a control system.

[0022] Optionally, the primary controller may be further configured to determine tasks that need to be executed by the primary controller and the timing of execution of such tasks, determine tasks that need to be executed by at least one secondary controller and the timing of execution of such tasks, execute tasks at the timing of execution of tasks that need to be executed by the primary controller, and send a task scheduling table to at least one secondary controller. The task scheduling table received by at least one secondary controller includes tasks that need to be executed by at least one secondary controller and the timing of execution of such tasks. Correspondingly, at least one secondary controller may be configured to execute tasks at the timing of execution of tasks that need to be executed by at least one secondary controller based on the task scheduling table.

[0023] Since the primary controller can schedule tasks in a unified manner, the primary controller and at least one secondary controller can execute tasks in a regular and efficient manner to prevent problems such as resource preemption or competition that occur when multiple tasks are executed simultaneously.

[0024] Optionally, the primary controller may further be configured to divide general data processing tasks into multiple data processing tasks and determine, based on the load of the primary controller and the load of at least one secondary controller, the data processing tasks that need to be executed by the primary controller and the data processing tasks that need to be executed by at least one secondary controller. In this way, the multiple controllers included in the ring network can achieve distributed execution of data processing tasks and further improve the utilization rate of the computing resources of the controllers based on the improvement of task execution efficiency.

[0025] Optionally, at least one secondary controller may further maintain a priority list, which includes the priorities of at least one secondary controller. When it is determined that the primary controller is faulty or any signal cable connected to the primary controller is faulty, at least one secondary controller may further be configured to determine a new primary controller from at least one secondary controller based on the priority list. Thereafter, the new primary controller may perform unified scheduling management of the multiple controllers in the control system. Specifically, the primary control right of the control system can be handed over to the new primary controller to ensure that the control system can still operate normally.

[0026] Optionally, the primary controller and at least one secondary controller may use the ring network to send target data to other controllers in the control system. If the target data sent using the ring network is not received, or if the received target data sent using the ring network does not match the sent target data, they may further be configured to perform fault detection on the ring network and / or retransmit the target data.

[0027] The target data may be data that has high requirements for security and needs to be shared by multiple controllers within the ring network. By using the above method, it can be guaranteed that the target data can be reliably transmitted to the receiver.

[0028] Optionally, the control system may further include at least one first router. The first port of the at least one first router is connected to the primary controller or at least one secondary controller, and the second port of the at least one first router is connected to at least one sensor and / or at least one actuator. The data transmission rate of the first port is lower than the data transmission rate of the ring network, and the data transmission rate of the second port is lower than the data transmission rate of the first port. The controller connected to the at least one first router may be further configured to perform frequency division of the frequency of the reference clock signal and transmit the frequency-divided reference clock signal to the at least one first router. The at least one first router may be configured to perform time adjustment based on the frequency of the received reference clock signal to execute tasks. The tasks performed by the first router may at least include exchanging data with the controller connected to the first router via the first port and exchanging data with at least one sensor and / or at least one actuator connected to the first router via the second port.

[0029] In the solution provided in this application, sensors and / or actuators with high requirements for data transmission rate may be directly connected to a controller (which may be a primary controller or a secondary controller) within the control system. The controller transmits commands at a higher frequency of the reference clock signal and transmits data at a higher data transmission rate. Sensors and / or actuators with general requirements for data transmission rate may be connected to a first router. The first router transmits commands at the frequency of an intermediate reference clock signal and transmits data at an intermediate data transmission rate. In this way, the control system can be adapted to different types of sensors and actuators. Thereby, the application flexibility of the control system is effectively improved.

[0030] Optionally, the control system may further include at least one second router. The third port of the at least one second router is connected to the second port of the at least one first router, and the fourth port of the at least one second router is connected to at least one sensor and / or at least one actuator. The data transmission rate of the third port is equal to the data transmission rate of the second port, and the data transmission rate of the fourth port is lower than the data transmission rate of the third port. The at least one first router may be further configured to perform frequency division of the frequency of the received reference clock signal and transmit the frequency-divided reference clock signal to the at least one second router. The at least one second router is configured to perform time adjustment based on the frequency of the received reference clock signal to execute tasks. The tasks executed by the at least one second router include at least exchanging data with the at least one first router via the third port and exchanging data with at least one sensor and / or at least one actuator connected to the at least one second router via the fourth port.

[0031] According to the control system provided in this application, the first router and the second router may be used to gradually reduce the data transmission rate and the frequency of the reference clock signal level by level. Thereby, the controller, the first router, and the second router can execute instructions based on reference clock signals with different frequencies. In this way, the application flexibility and compatibility of the control system are effectively improved. In addition, a plurality of routers at different levels are arranged. Thereby, smooth transmission of the data transmission rate and the frequency of the reference clock signal can be guaranteed, and the stability of data transmission can be further guaranteed.

[0032] Optionally, at least one node device may be at least one first router. The control system may further include at least one sensor and at least one execution unit. The at least one sensor is connected to the primary controller or at least one first router, and the at least one execution unit is connected to the primary controller or at least one first router. The tasks that need to be executed by the primary controller include one or more of the following tasks, namely, the data transmission task, the data processing task, the instruction transmission task, and the drive signal output task. The tasks that need to be executed by at least one first router include one or more of the following tasks, namely, the data transmission task, the instruction transmission task, and the drive signal output task. The instructions are used to instruct at least one sensor to collect data or to instruct at least one execution unit to output a drive signal.

[0033] In the solution provided in this application, the ring network may include only one primary controller, and the primary controller can perform centralized control on at least one first router, at least one sensor, and at least one execution unit in the control system.

[0034] Optionally, the first port of at least one first router is connected to the primary controller. Specifically, at least one first router accesses the ring network via the first port. The control system may further include at least one second router. The third port of at least one second router is connected to the second port of at least one first router, and the fourth port of at least one second router is connected to at least one sensor and / or at least one actuator. The data transmission rate of the first port is equal to the data transmission rate of the ring network. The data transmission rate of the second port is lower than the data transmission rate of the first port. The data transmission rate of the third port is equal to the data transmission rate of the second port. The data transmission rate of the fourth port is lower than the data transmission rate of the third port. At least one first router is further configured to perform frequency division of the frequency of the received reference clock signal and transmit the frequency-divided reference clock signal to at least one second router. At least one second router is configured to perform time adjustment based on the frequency of the received reference clock signal and execute tasks. The tasks executed by at least one second router include at least communicating data with at least one first router via the third port and communicating data with at least one sensor and / or at least one actuator connected to at least one second router via the fourth port.

[0035] In a scenario where the node device is the first router, the second router may be utilized to reduce the data transmission rate and the frequency of the reference clock signal, whereby the devices within the ring network (including the primary controller and at least one first router) and the second router may execute instructions at different frequencies of the reference clock signal. In this way, the application flexibility and compatibility of the control system are effectively improved.

[0036] Optionally, the primary controller may include a primary control module and a secondary control module connected to the primary control module. At least one node device may include a primary node module and a secondary node module connected to the primary node module. The ring network includes a first ring subnet and a second ring subnet. The first ring subnet includes the primary control module and the primary node module in at least one node device, and the second ring subnet includes the secondary control module and the secondary node module in at least one node device. The reference clock signal is obtained based on the local clock signal of the primary control module. The primary control module is configured to individually transmit the reference clock signal to the secondary control module and the primary node module in at least one node device. The secondary control module is configured to transmit the reference clock signal to the secondary node module in at least one node device. Alternatively, the primary node module in at least one node device is configured to transmit the reference clock signal to the secondary node module connected to the primary node module.

[0037] In this application, the functions of the secondary control module and the primary control module included in the primary controller may be the same. Therefore, the secondary control module may sometimes be referred to as a redundant control module. The functions of the primary node module and the secondary node module included in the node device may also be the same. Therefore, the secondary node module may sometimes be referred to as a redundant node module. The redundant control module and the redundant node module are arranged to ensure the reliability of the primary controller and the node device during operation, thereby improving the reliability of the entire control system.

[0038] Optionally, at least one sensor in the control system may include a first type of sensor and a second type of sensor, and the functional safety integrity level (SIL) of the first type of sensor is higher than that of the second type of sensor. At least one actuator in the control system may include a first type of actuator and a second type of actuator, and the functional safety integrity level of the first type of actuator is higher than that of the second type of actuator. The first type of sensor is individually connected to the primary control module and the secondary control module, or is individually connected to the primary node module and the secondary node module. The second type of sensor is connected to one of the primary control module, the secondary control module, the primary node module, and the secondary node module. The first type of actuator is individually connected to the primary control module and the secondary control module, or is individually connected to the primary node module and the secondary node module. The second type of actuator is connected to one of the primary control module, the secondary control module, the primary node module, and the secondary node module.

[0039] According to the solution provided in this application, a device with a higher functional safety integrity level is connected to both control modules of the primary controller or to both node modules of the node device. This ensures the reliability of data collection and command execution, thereby improving the security of the control system. However, for a device with a lower functional safety integrity level, the device is connected to only one control module or node device within the primary controller. This simplifies the architecture of the control system and can reduce the complexity of the system.

[0040] Optionally, the control system may further include a first power source and a second power source. The first power source is individually connected to the primary control module and the primary node module in at least one node device, and the first power source is configured to supply power to the primary control module and the primary node module in at least one node device. The second power source is individually connected to the secondary control module and the secondary node module in at least one node device, and the second power source is configured to supply power to the secondary control module and the secondary node module in at least one node device.

[0041] A redundant second power source is arranged to supply power to the secondary control module and the secondary node module. This ensures that the two ring subnets within the control system can operate independently, and further ensures the functional safety and reliability of the control system.

[0042] Optionally, the primary controller may be further configured to perform a failure response operation when it is detected that any task is not executed at the execution timing of the any task. The failure response operation may include one or more of the following operations: restarting the device for executing the any task, where the device is the primary controller or at least one node device; restarting the sensor and / or actuator connected to the device for executing the any task; and executing the security task set in the primary controller.

[0043] When detecting that an error occurs at the task execution timing, the primary controller can timely perform the failure response operation, effectively ensuring the security and reliability of the control system.

[0044] Optionally, the control system may further include a gateway. The gateway is connected to the primary controller or at least one node device. The gateway is configured to send data from the devices connected to the gateway to an external device and to send data from the external device to the devices connected to the gateway. The external device is a device independent of the control system.

[0045] In the control system provided in this application, the primary controller or at least one node device can further communicate with an external device using the gateway. Thereby, the functions of the control system are enhanced and the flexibility of the control system in operation is improved.

[0046] Optionally, the gateway may include a primary communication module and a secondary communication module connected to the primary communication module. Two redundant communication modules are designed to ensure functional safety and reliability when the primary controller or at least one node device exchanges data with an external device.

[0047] Optionally, the control system may be a vehicle control system.

[0048] In another aspect, a clock synchronization method is provided. The method may be applied to a primary controller in a control system. The control system includes a ring network, and the ring network includes a primary controller and at least one node device. The method includes performing time adjustment based on the frequency of the local clock signal of the primary controller and executing a task, and transmitting a reference clock signal to at least one node device using the ring network. The reference clock signal is obtained based on the local clock signal of the primary controller, and the reference clock signal performs time adjustment based on the frequency of the reference clock signal and is used by at least one node device to execute a task.

[0049] Optionally, the reference clock signal is the local clock signal of the primary controller. Alternatively, the reference clock signal is a clock signal obtained by performing frequency division of the local clock signal of the primary controller.

[0050] Optionally, the method further includes adjusting the frequency of the local clock signal of the primary controller within a target frequency range.

[0051] Optionally, the method further includes transmitting a synchronization signal to at least one node device using the ring network. The synchronization signal is used by at least one node device to correct the time of the local clock of at least one node device.

[0052] Optionally, the primary controller is connected to at least one node device using a clock signal cable. The process of transmitting a reference clock signal and a synchronization signal to at least one node device using the ring network may include transmitting a reference clock signal and a synchronization signal to at least one node device using a clock signal cable.

[0053] Optionally, the primary controller is connected to at least one node device using a clock signal cable and a synchronization signal cable. The process of transmitting a reference clock signal to at least one node device using a ring network may include the step of transmitting a reference clock signal to at least one node device using a clock signal cable. The process of transmitting a synchronization signal to at least one node device using a ring network may include the step of transmitting a synchronization signal to at least one node device using a synchronization signal cable.

[0054] Optionally, at least one node device is at least one secondary controller. The control system further includes at least one sensor and at least one actuator. At least one sensor is connected to the primary controller or at least one secondary controller, and at least one actuator is connected to the primary controller or at least one secondary controller. The tasks that need to be executed by the primary controller and the tasks that need to be executed by at least one secondary controller each include one or more of the following tasks: namely, a data transmission task, a data processing task, an instruction transmission task, and a drive signal output task. The instructions are used to instruct at least one sensor to collect data or to instruct at least one actuator to output a drive signal.

[0055] Optionally, the method may further include determining tasks that need to be executed by a primary controller and the timing of executing the tasks, determining tasks that need to be executed by at least one secondary controller and the timing of executing the tasks, and sending a task scheduling table to the at least one secondary controller. The task scheduling table includes tasks that need to be executed by the at least one secondary controller and the timing of executing the tasks. Correspondingly, time adjustment is performed based on the frequency of the local clock signal of the primary controller, and the process of executing the tasks may include performing time adjustment based on the frequency of the local clock signal of the primary controller and executing the tasks at the timing of the tasks that need to be executed by the primary controller.

[0056] Optionally, the method may further include dividing a general data processing task into a plurality of data processing tasks, and determining, based on the load of the primary controller and the load of the at least one secondary controller, the data processing tasks that need to be executed by the primary controller and the data processing tasks that need to be executed by the at least one secondary controller.

[0057] Optionally, the method may further include using a ring network to send target data to the at least one secondary controller, and performing fault detection on the ring network and / or retransmitting the target data when the target data sent using the ring network is not received, or when the received target data sent using the ring network does not match the sent target data.

[0058] Optionally, the control system may further include at least one first router. A first port of the at least one first router is connected to the primary controller, and a second port of the at least one first router is connected to at least one sensor and / or at least one actuator. The data transmission rate of the first port is lower than the data transmission rate of the ring network, and the data transmission rate of the second port is lower than the data transmission rate of the first port. The method may further include performing frequency division of the frequency of the reference clock signal and transmitting the frequency-divided reference clock signal to at least one first router.

[0059] Optionally, the primary controller includes a primary control module and a secondary control module connected to the primary control module. At least one node device includes a primary node module and a secondary node module connected to the primary node module. The ring network includes a first ring subnet and a second ring subnet. The first ring subnet includes the primary control module and the primary node module within at least one node device, and the second ring subnet includes the secondary control module and the secondary node module within at least one node device. The reference clock signal is obtained based on the local clock signal of the primary control module. The process of transmitting the reference clock signal to at least one node device using the ring network may include the primary control module individually transmitting the reference clock signal to the secondary control module and the primary node module within at least one node device. The reference clock signal is transmitted by the primary node module to the secondary node module. Alternatively, the step of transmitting the reference clock signal to at least one node device using the ring network may further include the secondary control module transmitting the reference clock signal to the secondary node module within at least one node device.

[0060] Optionally, the method may further include performing a failure response operation when it is detected that any of the tasks is not executed at the execution time of the any of the tasks. The failure response operation includes one or more of the following operations: restarting the device for executing any of the tasks, where the device is the primary controller or at least one node device; restarting the sensor and / or execution unit connected to the device for executing any of the tasks; and executing the security task set in the primary controller.

[0061] According to yet another aspect, a clock synchronization method is provided. The method is applied to node devices within a control system. The control system includes a ring network, and the ring network includes a primary controller and at least one node device. The method may include receiving, using the ring network, a reference clock signal transmitted by the primary controller, where the reference clock signal is obtained based on the local clock signal of the primary controller; and performing a time adjustment based on the frequency of the reference clock signal and executing a task.

[0062] Optionally, the node device may include a phase-locked loop. The process by which the node device performs a time adjustment based on the frequency of the reference clock signal may include using the phase-locked loop to correct the frequency of the local clock signal of the node device based on the frequency of the reference clock signal to maintain a target ratio between the frequency of the local clock signal of the node device and the frequency of the reference clock signal; and performing a time adjustment based on the frequency of the local clock signal of the node device.

[0063] Optionally, the process by which the node device performs a time adjustment based on the frequency of the reference clock signal may include performing a time adjustment based on the frequency of the reference clock signal.

[0064] Optionally, the method may further include receiving, using the ring network, a synchronization signal transmitted by the primary controller; and correcting the time of the local clock of the node device based on the synchronization signal.

[0065] Optionally, the node device is connected to the primary controller using a clock signal cable. The process of receiving the reference clock signal and the synchronization signal transmitted by the primary controller using a ring network may include the steps of receiving the signal transmitted by the primary controller using a clock signal cable, and separately obtaining the synchronization signal and the reference clock signal from the received signal based on the amplitude and / or pulse width of the received signal.

[0066] Optionally, the node device is connected to the primary controller using a clock signal cable and a synchronization signal cable. The process of receiving the reference clock signal transmitted by the primary controller using a ring network may include the step of receiving the reference clock signal transmitted by the primary controller using a clock signal cable. The process of receiving the synchronization signal transmitted by the primary controller using a ring network may include the step of receiving the synchronization signal transmitted by the primary controller using a synchronization signal cable.

[0067] Optionally, the node device is a secondary controller. The control system further includes at least one sensor and at least one actuator. The at least one sensor is connected to the primary controller or the secondary controller, and the at least one actuator is connected to the primary controller or the secondary controller. The tasks that need to be executed by the primary controller and the tasks that need to be executed by the secondary controller each include one or more of the following tasks, namely, data transmission task, data processing task, instruction transmission task, and drive signal output task. The instructions are used to instruct at least one sensor to collect data or to instruct at least one actuator to output a drive signal.

[0068] Optionally, the method may further include receiving, using a ring network, a task scheduling table transmitted by a primary controller. The task scheduling table includes tasks that need to be executed by a secondary controller and the timing of execution of the tasks. Time adjustment is performed based on the frequency of the reference clock signal, and the process of executing a task may include performing time adjustment based on the frequency of the reference clock signal and executing the task at the timing of execution of the tasks that need to be executed by the secondary controller.

[0069] Optionally, the secondary controller further holds a priority list. The priority list includes the priorities of at least one secondary controller included in the control system. The method may further include determining, based on the priority list, a new primary controller from at least one secondary controller when it is determined that the primary controller is defective or any signal cable connected to the primary controller is defective.

[0070] Optionally, the method may further include transmitting, using a ring network, target data to other controllers within the control system and performing fault detection on the ring network and / or retransmitting the target data when the target data transmitted using the ring network is not received or when the received target data transmitted using the ring network does not match the transmitted target data.

[0071] Optionally, the control system may further include at least one first router. The first port of the at least one first router is connected to the secondary controller, and the second port of the at least one first router is connected to at least one sensor and / or at least one actuator. The data transmission rate of the first port is lower than the data transmission rate of the ring network, and the data transmission rate of the second port is lower than the data transmission rate of the first port. The method may further include performing frequency division of the frequency of the reference clock signal and transmitting the frequency-divided reference clock signal to at least one first router.

[0072] Optionally, the node device is a first router. The control system further includes at least one sensor and at least one actuator. The at least one sensor is connected to the primary controller or the first router, and the at least one actuator is connected to the primary controller or the first router. The tasks that need to be performed by the primary controller include one or more of the following tasks, namely, the data transmission task, the data processing task, the instruction transmission task, and the drive signal output task. The tasks that need to be performed by the first router include one or more of the following tasks, namely, the data transmission task, the instruction transmission task, and the drive signal output task. The instructions are used to instruct at least one sensor to collect data or to instruct at least one actuator to output a drive signal.

[0073] Optionally, the first port of the first router is connected to the primary controller. The control system further includes at least one second router. The third port of the at least one second router is connected to the second port of the first router, and the fourth port of the at least one second router is connected to at least one sensor and / or at least one actuator. The data transmission rate of the first port is equal to the data transmission rate of the ring network, the data transmission rate of the second port is lower than the data transmission rate of the first port, the data transmission rate of the third port is equal to the data transmission rate of the second port, and the data transmission rate of the fourth port is lower than the data transmission rate of the third port. The method may further include performing frequency division of the frequency of the received reference clock signal and transmitting the frequency-divided reference clock signal to at least one second router.

[0074] For the advantageous effects of the clock synchronization method provided in the above aspect, refer to the description of the effects of the corresponding features of the control system. For details, it will not be described again in this application.

[0075] According to yet another aspect, a primary controller is provided. The primary controller can be applied to the control system provided in the above aspect. Additionally, the primary controller may include a programmable logic circuit and / or program instructions, and the primary controller is configured to implement the method provided in the above aspect and applied to the primary controller.

[0076] According to yet another aspect, a node device is provided. The node device can be applied to the control system provided in the above aspect. Additionally, the node device may include a programmable logic circuit and / or program instructions, and the node device is configured to implement the method provided in the above aspect and applied to the node device.

[0077] According to yet another aspect, a vehicle is provided. The vehicle includes the control system provided in the above aspect. The vehicle may be an electric vehicle. Additionally, the vehicle may be an autonomous vehicle, a remotely operated vehicle, an air transportation vehicle, or the like.

[0078] The technical solutions provided in this application include at least the following advantageous effects.

[0079] This application provides a control system, a clock synchronization method, a controller, a node device, and a vehicle. The primary controller in the control system may directly transmit a reference clock signal to at least one node device using a ring network, whereby at least one node device can perform time adjustment based on the frequency of the reference clock signal. In this way, clock synchronization between the primary controller and at least one node device is achieved. Compared with transmitting a data frame, the direct transmission of the reference clock signal improves the accuracy of clock synchronization between the primary controller and at least one node device to an accuracy equal to the pulse width of the reference clock signal, thereby effectively improving the accuracy of clock synchronization. Additionally, since the primary controller and at least one node device in the control system can be sequentially connected to form a ring network, it is ensured that there is a redundant signal exchange path during the signal exchange between the primary controller and at least one node device, thereby ensuring the reliability of signal transmission.

Brief Description of the Drawings

[0080]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Figure 17

Figure 18

Figure 19

Figure 20

Figure 21

Figure 22

Figure 23

Figure 24

Mode for Carrying Out the Invention

[0081] To make the object, technical solution, and advantages of this application clearer, the implementation of this application will be described in more detail below with reference to the accompanying drawings.

[0082] Embodiments of this application provide a control system. As shown in FIG. 1, the control system includes a ring network, and the ring network includes a primary controller 01 (which may also be referred to as a central controller) and at least one node device 02. For example, FIG. 1 shows three node devices 02. The node device 02 may be a secondary controller or a first router. Both the primary controller 01 and the secondary controller may be control devices including one or more processing chips. The first router may be a transfer device including one or more transfer chips.

[0083] The primary controller 01 is configured to perform time adjustment based on the frequency of the local clock signal of the primary controller 01, execute tasks, and transmit a reference clock signal to at least one node device 02 using a ring network. The reference clock signal is obtained based on the local clock signal of the primary controller 01.

[0084] At least one node device 02 is configured to perform time adjustment based on the frequency of the reference clock signal and execute tasks. For example, the node device 02 can correct the frequency of the local clock signal of the node device 02 based on the frequency of the reference clock signal and perform time adjustment based on the corrected frequency of the local clock signal. Alternatively, the node device 02 may directly perform time adjustment based on the frequency of the reference clock signal. In this way, clock synchronization between the primary controller 01 and at least one node device 02 can be achieved.

[0085] Since the primary controller 01 and at least one node device 02 can form a ring network, it can be ensured that there is a redundant signal exchange path during the signal exchange between the primary controller 01 and at least one node device 02. For example, assume that the first interface of the primary controller 01 is connected to one node device 02, and the second interface of the primary controller 01 is connected to the other node device 02. If the signal cable connected to the first interface of the primary controller 01 is faulty, the primary controller 01 may further transmit data to the ring network through the second interface of the primary controller 01, thereby enabling data to be transmitted to the node device 02 connected to the first interface of the primary controller 01 using the ring network.

[0086] It should be understood that clock synchronization between the primary controller 01 and the node device 02 may mean that the ratio of the frequencies of the clock signals referred to when the primary controller 01 and the node device 02 execute tasks is the target ratio. That is, the primary controller 01 and the node device 02 may execute tasks based on beats of a fixed ratio. For example, when the target ratio is 1, it indicates that the frequencies of the clock signals referred to when the primary controller 01 and the node device 02 execute tasks are the same. When the target ratio is n, where n is a ratio of two positive integers and n is not 1, it indicates that the frequency of the clock signal referred to when the primary controller 01 executes a task is n times the frequency of the clock signal referred to when the node device 02 executes a task.

[0087] As shown in FIG. 1, it should be further understood that the primary controller 01 may be individually connected to two node devices 02. When transmitting the reference clock signal, the primary controller 01 may transmit the reference clock signal to only one of the node devices 02 connected to the primary controller 01, and then the node device 02 sequentially transmits the reference clock signal to the other node devices 02. In other words, the reference clock signal in the ring network may be transmitted unidirectionally in the clockwise direction or the counterclockwise direction. Alternatively, the primary controller 01 may individually transmit the reference clock signal to the two node devices 02 connected to the primary controller 01, and then the two node devices 02 transfer the reference clock signal to the other node devices 02. In other words, the reference clock signal in the ring network may be transmitted bidirectionally in parallel in the clockwise direction and the counterclockwise direction.

[0088] In this embodiment of the present application, in the ring network, not only the primary controller 01 and the node device 02, but also two adjacent node devices 02 can be connected using signal cables (which may also be referred to as signal links). Therefore, the primary controller 01 can transmit a reference clock signal to at least one node device 02 using a signal cable. The method in which the primary controller 01 transmits a reference clock signal to at least one node device 02 using a signal cable to achieve clock synchronization is sometimes referred to as hardware synchronization.

[0089] FIG. 2 is a schematic diagram of a synchronization error between a primary controller and a node device according to an embodiment of the present application. As shown in FIG. 2, since the primary controller 01 can directly transmit a reference clock signal to the node device 02, it can be guaranteed that the synchronization cycle of the clock synchronization implemented between the primary controller 01 and the node device 02 is the cycle of the reference clock signal. Correspondingly, it can be guaranteed that the error between the time of the primary controller 01 and the time of the node device 02 (i.e., the synchronization error) can be reduced to a level equal to the pulse width of the reference clock signal. In other words, it can be guaranteed that pulse-level clock synchronization can be achieved. For example, assume that the frequency of the reference clock signal is 1 gigahertz (GHz), that is, one clock cycle of the reference clock signal is 1 nanosecond (ns). In this case, the reference clock signal transmitted by the primary controller 01 every 1 ns can guide the node device 02 to correct the local clock of the node device 02, and thereby the synchronization error can be less than 1 ns. The synchronization error at the ns level can meet the requirements of most real-time control scenarios.

[0090] In summary, the embodiments of this application provide a control system. The primary controller in the control system may directly transmit a reference clock signal to at least one node device using a ring network, whereby at least one node device can perform time adjustment based on the frequency of the reference clock signal. In this way, clock synchronization between the primary controller and at least one node device is achieved. Compared with the transmission of data frames, the direct transmission of the reference clock signal improves the accuracy of clock synchronization between the primary controller and at least one node device to an accuracy equal to the pulse width of the reference clock signal, thereby effectively improving the accuracy of clock synchronization. In addition, since the primary controller in the control system and at least one node device can be sequentially connected to form a ring network, it is ensured that there is a redundant signal exchange path during the signal exchange between the primary controller and at least one node device, and the reliability of signal transmission can be guaranteed.

[0091] In addition, in the control system provided in this embodiment of this application, the accuracy of time synchronization between the primary controller and at least one node device is high. Therefore, the ECU can ensure that all time-sensitive tasks can be transferred to the primary controller or the node device for execution. Thereby, the number of ECUs in the control system is effectively reduced, and the functions of the ECUs are simplified (for example, the ECUs can be simplified like routers). The control system has lower complexity and higher flexibility.

[0092] Optionally, the reference clock signal may be the local clock signal of the primary controller 01, that is, the primary controller 01 can directly transmit the local clock signal of the primary controller 01 to at least one node device 02 as the reference clock signal.

[0093] Alternatively, the reference clock signal may be a clock signal obtained by performing frequency division on the local clock signal of the primary controller 01. That is, the primary controller 01 may first perform frequency division on the local clock signal of the primary controller 01 to obtain a reference clock signal, and then transmit the reference clock signal to at least one node device 02.

[0094] Since the frequency of the source clock signal generated by the crystal oscillator in the primary controller 01 is generally within the intermediate frequency range, the local clock signal of the primary controller 01 can be generated after the phase-locked loop (PLL) in the primary controller 01 performs frequency multiplication on the source clock signal based on a preset frequency multiplication value. In addition, since the frequency of the local clock signal generated by the PLL in the primary controller 01 is generally high, in order to ensure that the node device 02 can support the frequency of the reference clock signal, the primary controller 01 may perform frequency division on the local clock signal of the primary controller 01 to obtain a reference clock signal.

[0095] In an optional implementation, at least one node device 02 may include a PLL. At least one node device 02 can use the PLL to correct the frequency of the local clock signal of the node device 02 based on the frequency of the reference clock signal and maintain the target ratio between the frequency of the local clock signal of the node device 02 and the frequency of the reference clock signal. Then, at least one node device 02 can perform time adjustment based on the corrected frequency of the local clock signal of at least one node device 02. The node device 02 can use the phase-locked loop to correct the frequency of the local clock signal of the node device 02, so that the frequency of the local clock signal of the node device 02 and the frequency of the reference clock signal can achieve pulse-level synchronization.

[0096] The target ratio may be a fixed value pre-set in the node device 02, and the target ratio may be a ratio of two positive integers. For example, when the target ratio is 1, the node device 02 may utilize a PLL to trace and lock the frequency of the reference clock signal, whereby the frequency of the local clock signal of the node device 02 becomes equal to the frequency of the reference clock signal.

[0097] [[ID=IS6]]In other alternative implementations, the node device 02 may alternatively perform time adjustment directly based on the frequency of the reference clock signal. In other words, the node device 02 can execute tasks based on the beats of the reference clock signal, and there is no need to modify the frequency of the local clock signal of the node device 02.

[0098] In this embodiment of this application, in the scenario where the node device 02 is a secondary controller, the secondary controller may include a processor and at least one peripheral device connected to the processor. The at least one peripheral device may include an analog-to-digital converter (ADC), a timer, a pulse width modulation (PWM) circuit, a communication interface, and the like. The processor may be connected to the at least one peripheral device using a frequency bus and can control the at least one peripheral device to execute tasks. Correspondingly, in this implementation, the processor in the secondary controller can directly control the peripheral device to execute tasks based on the frequency of the reference clock signal. In this way, the peripheral bus task synchronization of at least one secondary controller can be implemented. This synchronization method may also be referred to as peripheral hardware synchronization (PHS).

[0099] Optionally, the primary controller 01 may be further configured to adjust the frequency of the local clock signal of the primary controller 01 within a target frequency range. In other words, the primary controller 01 may perform frequency modulation (FM) on the local clock signal of the primary controller 01. Correspondingly, the reference clock signal transmitted by the primary controller 01 to at least one node device 02 is also a clock signal obtained after frequency modulation. The target frequency range may be a fixed frequency range pre-stored in the primary controller 01.

[0100] Frequency modulation is performed on the local clock signal of the primary controller 01, whereby the EMC performance of circuits in the control system that are sensitive to frequency (hereinafter abbreviated as frequency-sensitive circuits) can be effectively improved in the task execution process. Frequency-sensitive circuits may include communication circuits, drive circuits (sometimes referred to as power output circuits), and the like. For example, assume that the drive circuit is a PWM circuit. Since the PWM circuit outputs a PWM signal based on the frequency of the reference clock signal, after the primary controller 01 performs frequency modulation on the local clock signal of the primary controller 01, frequency modulation on the PWM signal is also performed. Thereby, the EMC performance of the PWM circuit is effectively improved.

[0101] FIG. 3 is a schematic diagram showing how the amplitude of a conductive or radiated signal generated by a frequency-sensitive circuit changes with frequency f according to an embodiment of this application. The unit of amplitude is decibel millivolt (dBmv). Referring to FIG. 3, it can be understood that before the primary controller 01 performs frequency modulation on the local clock signal of the primary controller 01, the amplitude of the conductive or radiated signal generated by the frequency-sensitive circuit is high and the spectrum is narrow. After performing frequency modulation on the local clock signal of the primary controller 01, the primary controller 01 can reduce the amplitude of the conductive or radiated signal generated by the frequency-sensitive circuit and broaden the spectrum. Thereby, the EMC performance of the frequency-sensitive circuit is effectively improved.

[0102] Optionally, the primary controller 01 may be further configured to use a ring network to transmit a synchronization signal to at least one node device 02. Correspondingly, at least one node device 02 may be further configured to correct the time of the local clock of the node device 02 based on the received synchronization signal. In other words, based on the solution provided in this embodiment of this application, the primary controller 01 and at least one node device 02 can perform not only clock frequency synchronization but also time synchronization. The frequency of the synchronization signal may be much lower than the frequency of the reference clock signal, and the frequency of the reference clock signal may be an integer multiple of the frequency of the synchronization signal. For example, the frequency of the reference clock signal may be 1 GHz, and the frequency of the synchronization signal may be 1 kilohertz (kHz).

[0103] For example, assume that the frequency of the synchronization signal is 1 kHz, that is, the primary controller 01 transmits pulses of the synchronization signal every 1 ms. After receiving the pulse of the synchronization signal each time, the node device 02 may correct the time of the local clock of the node device 02 to a value that is closest to the current time and is an integer multiple of ms. For example, assume that the node device 02 receives the pulse of the synchronization signal and the time of the local clock of the node device 02 is 100.001 ms. The node device 02 may correct the time of the local clock of the node device 02 to 100 ms.

[0104] In an optional implementation, the primary controller 01 in the ring network may be connected to at least one node device 02 using a clock signal cable. That is, not only the primary controller 01 and the node device 02, but also two adjacent node devices 02 are connected using a clock signal cable. In this implementation, the primary controller 01 may be configured to transmit a synchronization signal and a reference clock signal to at least one node device 02 using a clock signal cable. In other words, the primary controller 01 may transmit a composite signal (sometimes referred to as a superimposed signal) of the synchronization signal and the reference clock signal to at least one node device 02 using one clock signal cable.

[0105] Correspondingly, at least one node device 02 may be configured to separately obtain the synchronization signal and the reference clock signal from the received signal based on the amplitude and / or pulse width of the received signal.

[0106] For example, refer to FIG. 4. The pulse width of the synchronization signal may be the same as the pulse width of the reference clock signal, and the primary controller 01 may generate a composite signal by adding the amplitude of the reference clock signal and the amplitude of the synchronization signal. Correspondingly, in the process where at least one node device 02 receives the composite signal, if a pulse whose amplitude is greater than the amplitude of the reference clock signal is detected, it may be determined that a pulse of the synchronization signal is received.

[0107] Alternatively, refer to FIG. 5. The pulse width of the synchronization signal may be the same as the pulse width of the reference clock signal, and the primary controller 01 may generate a composite signal by subtracting the amplitude of the reference clock signal from the amplitude of the synchronization signal. Correspondingly, in the process where at least one node device 02 receives the composite signal, if a pulse with an amplitude smaller than that of the reference clock signal is detected, or if no pulse is detected within the clock cycle, it may be determined that the synchronization signal is received.

[0108] In other words, in the scenario where the primary controller 01 generates a composite signal after adding or subtracting the amplitudes of the reference clock signal and the synchronization signal, at least one node device 02 can separate the reference clock signal and the synchronization signal from the composite signal based on the amplitude of the composite signal.

[0109] Optionally, refer to FIG. 6. The pulse width of the synchronization signal may be larger than the pulse width of the reference clock signal. For example, the pulse width of the synchronization signal may be an integer multiple of the pulse width of the reference clock signal. The primary controller 01 may generate a composite signal by adding the reference clock signal and the synchronization signal in the time domain. Correspondingly, in the process where at least one node device 02 receives the composite signal, if a pulse width that is within a specific pulse cycle and larger than the pulse width of the reference clock signal is detected, it may be determined that the pulse of the synchronization signal is received. In other words, at least one node device 02 can separate the reference clock signal and the synchronization signal from the composite signal based on the pulse width of the composite signal.

[0110] In the above implementation, the primary controller 01 uses one clock signal cable to transmit a composite signal of the synchronization signal and the reference clock signal. This can prevent an increase in the number of signal cables between adjacent devices in the ring network and simplify the structure of the control system.

[0111] In the above implementation, it should be understood that the clock signal cable connected between two adjacent devices in the ring network may be a signal cable capable of transmitting both data and clock signals. For example, the signal cable may be an Ethernet cable. Alternatively, for a time sensitive network (TSN), two adjacent devices in the ring network may be connected to both a data signal cable for transmitting data and a dedicated clock signal cable for transmitting a reference clock signal.

[0112] In another optional implementation, the primary controller 01 in the ring network may be connected to at least one node device 02 using a clock signal cable and a synchronization signal cable. That is, not only the primary controller 01 and the node device 02, but also two adjacent node devices 02 are connected using the clock signal cable and the synchronization signal cable. Refer to Figure 7. In this implementation, the primary controller 01 may be configured to transmit a reference clock signal to at least one node device 02 using the clock signal cable and transmit a synchronization signal to at least one node device 02 using the synchronization signal cable. At least one node device 02 may receive the reference clock signal using the clock signal cable and receive the synchronization signal using the synchronization signal cable.

[0113] The primary controller 01 transmits the synchronization signal and the reference clock signal separately using different signal cables, so that at least one node device 02 does not need to parse the synchronization signal and the reference clock signal from the received composite signal. This reduces the complexity of receiving the synchronization signal and the reference clock signal by the node device 02.

[0114] Optionally, as shown in FIG. 8, the control system may further include at least one sensor 03 and at least one actuator 04. The at least one sensor 03 may be connected to the primary controller 01 or the node device 02, and the at least one actuator 04 may be connected to the primary controller 01 or the node device 02. The sensor 03 may be an image sensor, a speed sensor, a temperature sensor, a pressure sensor, a lidar, or an ultrasonic radar, etc. The actuator 04 may be a motor, a valve, a switch, or a relay, etc.

[0115] In a scenario where at least one node device 02 is at least one secondary controller, the tasks that need to be executed by the primary controller 01 and the tasks that need to be executed by at least one secondary controller 02 may each include one or more of the following tasks, namely, a data transmission task, a data processing task, a command transmission task, and a drive signal output task. The command may be used to command the sensor 03 to collect data, or may be used to command to output a drive signal to the actuator 04. Correspondingly, data transmission may be to transmit the data collected by the sensor 03. Data processing may be to process the data collected by the sensor 03.

[0116] In this embodiment of this application, the controller (which may be the primary controller 01 or the secondary controller 02) within the control system can directly generate a drive signal, output the drive signal to the actuator 04 connected to the controller, and drive the actuator 04 to operate. Alternatively, the controller may be connected to the actuator 04 using a drive circuit. When the controller needs to drive the actuator 04 to operate, the controller can send the command used to command to output a drive signal to the drive circuit. The drive circuit can further output a drive signal to the actuator 04 based on the command and drive the actuator 04 to operate.

[0117] Optionally, the primary controller 01 may further be configured to determine tasks that need to be executed by the primary controller 01 and the timing of execution of those tasks, determine tasks that need to be executed by at least one secondary controller 02 and the timing of execution of those tasks, execute tasks at the timing of tasks that need to be executed by the primary controller 01, and use a ring network to send a task scheduling table to at least one secondary controller 02. The task scheduling table received by at least one secondary controller 02 may include tasks that need to be executed by at least one secondary controller 02 and the timing of execution of those tasks.

[0118] Correspondingly, at least one secondary controller 02 may execute a task at a timing corresponding to the task that needs to be executed by at least one secondary controller 02 based on the task scheduling table.

[0119] In this embodiment of this application, the primary controller 01 may use time division task (TDT) technology to uniformly plan and schedule tasks that need to be executed by the primary controller 01 and at least one secondary controller 02. Tasks that need to be executed by different controllers are assigned to different time slots. In this way, the primary controller 01 and at least one secondary controller 02 can execute each task in a regular manner based on a pre-set task scheduling table, prevent problems such as resource preemption or contention that occur when multiple tasks are executed simultaneously, and ensure that each task can be executed in a regular and efficient manner.

[0120] For example, assume that tasks that need to be executed by a specific controller (which may be the primary controller 01 or the secondary controller 02) include an instruction transmission task and a data transmission task, and the instruction is used to instruct the sensor 03 to collect data. In this case, the timing of executing the instruction transmission task recorded in the task scheduling table is the collection time point, and the timing of executing the data transmission task is the data transmission time point. Correspondingly, when detecting that the collection time point has arrived, the controller may automatically send an instruction to the sensor 03 connected to the controller and instruct the sensor 03 to collect data. In addition, after obtaining the data collected by the sensor 03, when detecting that the transmission time point has arrived, the controller may automatically transmit the data.

[0121] When the control system includes a plurality of different types of sensors 03 that need to collect data synchronously, it should be understood that the primary controller 01 can set the execution timing of the tasks used to instruct the sensors 03 to collect data to the same timing. In other words, the controllers in the ring network can send the instructions used to instruct the sensors 03 to collect data at the same timing.

[0122] For example, sensors that need to collect data synchronously in the control system may include a sensor for collecting the position of the rotor and a sensor for collecting the phase current physically dependent signal during the field oriented control (FOC) of a permanent-magnet synchronous motor (PMSM), or may include sensors for collecting intensive data such as lidar, ultrasonic radar, and visible light image sensors, or may include a plurality of sensors for redundant inspection.

[0123] Optionally, the primary controller 01 may be further configured to generate a general task scheduling table. The general task scheduling table may include tasks that need to be executed by the primary controller 01 and the timing of executing those tasks, and tasks that need to be executed by at least one secondary controller 02 and the timing of executing those tasks. In addition, the task scheduling table transmitted by the primary controller 01 to each secondary controller 02 may be a general task scheduling table. In a scenario where the primary controller 01 directly transmits the general task scheduling table to each secondary controller 02, each secondary controller 02 can obtain tasks that need to be executed by other secondary controllers 02 and the timing of executing those tasks. Thereby, when the primary controller 01 is defective, any secondary controller 02 can uniformly schedule and manage tasks that need to be executed by the controllers in the control system based on the general task scheduling table, that is, it can be guaranteed that any secondary controller 02 can quickly take over the operation of the primary controller 01 based on the general task scheduling table.

[0124] Alternatively, the task scheduling table transmitted by the primary controller 01 to each secondary controller 02 may only include tasks that need to be executed by the secondary controller 02 and the timing of executing those tasks, and does not need to include tasks that need to be executed by other secondary controllers 02 and the timing of executing those tasks. In this way, when the secondary controller 02 determines the execution timing of tasks that need to be executed by the secondary controller 02 from the task scheduling table, interference by tasks that need to be executed by other controllers is prevented.

[0125] For example, as shown in FIG. 9, assume that a control system includes a primary controller E5 and four secondary controllers E1 to E4. A general task scheduling table generated by the primary controller E5 may be as shown in Table 1. It can be understood from Table 1 that the secondary controller E1 needs to execute Task 1 at timing t1, and the secondary controller E3 needs to execute Task 4 at timing t4 and needs to execute Task 5 at timing t5. In this case, the primary controller E5 may individually send the general task scheduling table shown in Table 1 to the secondary controllers E1 to E4, or specifically, the primary controller E5 may send only a part of the content in Table 1 to each secondary controller. For example, the task scheduling table sent by the primary controller E5 to the secondary controller E1 may include only Task 1 and the execution timing t1 of Task 1. The task scheduling table sent by the primary controller E5 to the secondary controller E4 may include only Task 6 and the execution timing t6 of Task 6.

[0126] [Table 1]

[0127] Optionally, each of the primary controller 01 and at least one secondary controller 02 in the control system may be connected to a sensor 03 and / or an execution unit 04 that are physically close to the primary controller 01 and the at least one secondary controller 02. Different controllers may have different software modules and operating systems loaded, but the communication interfaces of different controllers may be the same, and the computing resources of different controllers may be shared.

[0128] Correspondingly, the primary controller 01 may be further configured to divide a general data processing task into a plurality of data processing tasks, and determine, based on the load of the primary controller 01 and the load of at least one secondary controller 02, a data processing task that needs to be executed by the primary controller 01 and a data processing task that needs to be executed by at least one secondary controller 02.

[0129] In other words, for a general data processing task that requires a large amount of computing resources, the primary controller 01 may schedule a plurality of controllers in the ring network to execute the general data processing task in cooperation. Thereby, distributed execution of the data processing task can be realized, and the utilization rate of the computing resources of the controller can be further improved based on the improvement of the task execution efficiency.

[0130] In addition, in this embodiment of this application, the primary controller 01 may further dynamically allocate data processing tasks based on the importance, function requirements, security requirements, and impact on performance of each data processing task. Thereby, the flexibility of task scheduling is effectively improved, and appropriate utilization of the computing resources of each controller is realized.

[0131] Optionally, the secondary controller 02 in the control system may further maintain a priority list that includes the priorities of at least one secondary controller 02. At least one secondary controller 02 may be further configured to determine a new primary controller from among at least one secondary controller 02 based on the priority list when it is determined that the primary controller 01 is defective or any signal cable connected to the primary controller 01 is defective. The new primary controller may then perform unified scheduling management for a plurality of controllers in the control system. Specifically, it can be ensured that the primary control right of the control system is handed over to the new primary controller and the control system can still operate properly.

[0132] For example, in relation to FIG. 9, assume that when the priorities of the four secondary controllers E1 to E4 in the priority list are E4 > E3 > E2 > E1 and the primary controller E5 is defective, the secondary controller E4 can operate in place of the primary controller E5.

[0133] It should be understood that the primary controller 01 may also maintain a priority list. In addition to the priorities of at least one secondary controller 02, the priority list may further record the priority of the primary controller 01, and the priority of the primary controller 01 may be higher than the priorities of at least one secondary controller 02. In this way, it can be ensured that after the primary controller 01 recovers from the defective state, the primary controller 01 can reacquire the primary control right of the control system.

[0134] Optionally, the fault detection algorithm is configured in both the primary controller 01 and at least one secondary controller 02. Based on the fault detection algorithm, the primary controller 01 and at least one secondary controller 02 can detect whether the primary controller 01 is defective or whether the signal cable connected to the primary controller 01 is defective. For example, the primary controller 01 may periodically send a heartbeat message to at least one secondary controller 02 based on a preset period. If none of the at least one secondary controller 02 receives the heartbeat message within a specific period, the at least one secondary controller 02 can determine that the primary controller 01 is defective. If some of the secondary controllers 02 do not receive the heartbeat message within a specific period, but the remaining secondary controllers 02 receive the heartbeat message, the at least one secondary controller 02 can determine that the primary controller 01 is not defective. However, the signal cable between the primary controller 01 and some of the secondary controllers 02 is defective.

[0135] In this embodiment of this application, after receiving data sent by another controller, the controller (which may be the primary controller 01 or the secondary controller 02) in the control system may compare the identifier (ID) of the received data with the ID of the controller. If the ID of the data is the same as the ID of the controller, the controller may perform reception processing on the received data. If the ID of the data is different from the ID of the controller, the controller may transfer the received data. In addition, to ensure that the data can be effectively transmitted to the receiving end, the controller may drive (e.g., shape and amplify) the data before transferring it.

[0136] Optionally, the ring network can transmit data via a shared bus. That is, at each time instance, only one of the primary controller 01 and at least one secondary controller 02 can be used as a transmitting end for transmitting data, and the remaining controllers are only used as receiving ends for receiving data. For example, only the secondary controller E1 can transmit data at a specific time instance, and all of the secondary controllers E2 to E4 and the primary controller E5 receive data. Alternatively, the ring network may be a packet network, that is, the primary controller 01 and at least one secondary controller 02 included in the control system may be divided into a plurality of groups, and each group includes at least two controllers. At each time instance, controllers in different groups can exchange data simultaneously. For example, assume that the secondary controller E1 and the secondary controller E2 form a group, and the secondary controller E3 and the secondary controller E4 form a group. At a specific time instance, the secondary controller E1 may transmit data to the secondary controller E2, and the secondary controller E3 may transmit data to the secondary controller E4.

[0137] Optionally, a controller (which may be the primary controller 01 or the secondary controller 02) within the control system may be further configured to use the ring network to transmit target data to other controllers, and to perform a fault detection on the ring network and / or retransmit the target data when the target data transmitted using the ring network is not received, or when the received target data transmitted using the ring network does not match the target data transmitted by the controller.

[0138] Target data may be data that has high security requirements and needs to be shared by a plurality of controllers included in a ring network. For example, the target data may include vehicle speed. In other words, after transmitting target data having high security requirements using a ring network, the primary controller 01 or the secondary controller 02 may detect whether other controllers in the ring network have correctly received the target data. In this way, it can be ensured that the target data can be reliably transmitted to the receiver.

[0139] For example, assume that the ring network includes a primary controller 01 and m - 1 secondary controllers 02, that is, the ring network includes a total of m controllers. In this case, all target data transmitted by the controllers in the ring network needs to be transferred m times before being returned to the controller again. Here, m is an integer greater than 1. If the period for transmitting target data between two adjacent controllers is n clock cycles, after transmitting the target data, the controller in the ring network can detect whether the data received after n×m clock cycles matches the target data to verify data integrity. If the controller does not receive data after n×m clock cycles or the received data does not match the target data, the controller can perform fault detection on the ring network and / or retransmit the target data.

[0140] The process by which the controller performs fault detection on the ring network may include that the controller transmits detection data to other controllers in the ring network, after receiving the detection data, other controllers in the ring network feedback response data to the sender of the detection data, and finally, the sender of the detection data can determine a controller failure or a signal cable failure based on the received response data.

[0141] In a scenario where at least one node device 02 is a secondary controller, as shown in FIG. 8, the control system may further include at least one first router 05. The first port 051 of the first router 05 is connected to the primary controller 01 or the secondary controller 02. The second port 052 of the first router 05 is connected to at least one sensor 03 and / or at least one actuator 04. The data transmission rate of the first port 051 is lower than the data transmission rate of the ring network, and the data transmission rate of the second port 052 is lower than the data transmission rate of the first port 051.

[0142] The controller connected to at least one first router 05 is further configured to perform frequency division on the frequency of the reference clock signal transmitted in the ring network and transmit the frequency-divided reference clock signal to at least one first router 05.

[0143] At least one first router 05 may be configured to perform time adjustment based on the frequency of the received frequency-divided reference clock signal and execute tasks. The tasks executed by at least one first router 05 may include at least exchanging data with the controller connected to at least one first router 05 via the first port 051, and exchanging data with at least one sensor 03 and / or at least one actuator 04 connected to at least one first router 05 via the second port 052.

[0144] Based on the above description, it can be understood that within the ring network, the primary controller 01 and the secondary controller 02 can transmit data at a higher data transmission rate and perform time adjustment at a higher frequency. In addition, the primary controller 01 or the secondary controller 02 connected to the first router 05 may transmit data to the first router 05 after reducing the data transmission rate, and may transmit the reference clock signal to the first router 05 after reducing the frequency of the reference clock signal. Similarly, the first router 05 may transmit data to the controller connected to the first router 05 after increasing the data transmission rate.

[0145] Therefore, in this embodiment of this application, the sensor 03 (for example, an image sensor) and / or the execution unit 04 having high requirements for the data transmission rate can be directly connected to the controller within the ring network. The controller transmits instructions at a higher frequency of the reference clock signal and transmits data at a higher data transmission rate. The sensor 03 (for example, a sound sensor) and / or the execution unit 04 having general requirements for the data transmission rate may be connected to the first router 05. The first router 05 transmits instructions at an intermediate frequency of the reference clock signal and transmits data at an intermediate data transmission rate. Therefore, the control system provided in this embodiment of this application can be compatible with different types of sensors and execution units. Thereby, the application flexibility of the control system is effectively improved.

[0146] Referring further to FIG. 8, the control system may further include at least one second router 06. The third port 061 of the second router 06 is connected to the second port 052 of the first router 05. The fourth port 062 of the second router 06 is connected to at least one sensor 03 and / or at least one execution unit 04. The data transmission rate of the third port 061 is equal to the data transmission rate of the second port 052, and the data transmission rate of the fourth port 062 may be lower than the data transmission rate of the third port 061.

[0147] The first router 05 connected to the second router 06 may be further configured to perform frequency division on the frequency of the reference clock signal received via the first port 051 and transmit the frequency-divided reference clock signal to the second router 06 connected to the first router 05 via the second port 052.

[0148] At least one second router 06 may be configured to perform time adjustment based on the frequency of the reference clock signal transmitted by the first router 05 and execute tasks. The tasks executed by the second router 06 may include at least communicating data with at least one first router 05 via the third port 061 and communicating data with at least one sensor 03 and / or at least one execution unit 04 connected to the second router 06 via the fourth port 062.

[0149] Based on the above description, it can be understood that the first router 05 may transmit data to the second router 06 after reducing the data transmission rate, and may transmit the reference clock signal to the second router 06 after reducing the frequency of the reference clock signal. Similarly, the second router 06 may transmit data to the first router 05 after increasing the data transmission rate. Therefore, in the control system, sensors 03 (e.g., water temperature sensors) and / or execution units 04 with low requirements for the data transmission rate may be connected to the second router 06. The second router 06 transmits instructions at a lower frequency of the reference clock signal and transmits data at a lower data transmission rate.

[0150] Based on the above value relationship between the data transmission rate and the frequency of the reference clock signal, it can be understood that the ring network may be referred to as a high-speed ring network, the first router 05 may be referred to as a medium-speed router, and the second router 06 may be referred to as a low-speed router. In other words, the control system uses the primary controller 01 and at least one secondary controller 02 in the ring network as route nodes to form a tree structure through a combination of cascade routers at various levels. It can be understood that the control system may further include more other low-level routers connected to the second router 06. This is not limited in this embodiment of this application.

[0151] According to the control system provided in this embodiment of this application, the first router 05 and the second router 06 may be used to gradually reduce the data transmission rate and the frequency of the reference clock signal, so that the controllers (including the primary controller 01 and the secondary controller 02) in the ring network, the first router 05, and the second router 06 can execute instructions based on reference clock signals with different frequencies. In this way, the application flexibility and compatibility of the control system are effectively improved. In addition, a plurality of routers at different levels are arranged. Thereby, a smooth transition of the data transmission rate and the frequency of the reference clock signal can be guaranteed, and the stability of data transmission can be further guaranteed.

[0152] In the control system, it should be understood that the primary controller 01, the secondary controller 02, and the first router 05 can all perform frequency division on the reference clock signal based on preset frequency division values. For example, refer to FIG. 10. The frequency of the reference clock signal transmitted by the primary controller 01 in the ring network to at least one secondary controller 02 is F1, and the frequency F2 of the reference clock signal transmitted by any controller in the ring network to the first router 05 connected to that controller may satisfy F2 = F1 / N1. Assume that the frequency F3 of the reference clock signal transmitted by the first router 05 to the second router 06 may satisfy F3 = F2 / N2. Both N1 and N2 may be integers greater than 1, and N1 and N2 may or may not be equal. For example, the value range of the frequency F1 may be 1 GHz to 10 GHz, the value range of the frequency F2 may be 100 megahertz (MHz) to 500 MHz, and the value range of the frequency F3 may be 10 MHz to 20 MHz.

[0153] Correspondingly, as shown in FIG. 11, the primary controller 01 and at least one secondary controller 02 in the ring network can execute high-speed tasks based on the reference clock signal with a frequency of F1. At least one first router 05 can execute medium-speed tasks based on the reference clock signal with a frequency of F2. At least one second router 06 can execute low-speed tasks based on the reference clock signal with a frequency of F3.

[0154] It should be further understood that the frequency division values set for the primary controller 01, the frequency division values set for at least one secondary controller 02, and the frequency division values set for the first router 05 may all be dynamically set by the primary controller 01 based on the rate requirements of the tasks to be executed.

[0155] In this embodiment of this application, the primary controller 01 can allocate tasks with different rate requirements to different levels of devices (including the primary controller, secondary controller, first router, and second router) for execution based on the rate requirements of the tasks to be executed. In addition, the execution time slot of a task (i.e., the execution timing) can be dynamically allocated by the primary controller 01. Thereby, the flexibility of task execution is effectively improved. In addition, in the task execution process, the secondary controller 02, the first router 05, and the second router 06 may further monitor the execution time of the task and report the monitoring result to the primary controller 01. When the primary controller 01 needs to allocate a new task, the primary controller 01 may determine a controller for executing the new task and the execution timing of the new task based on the time series in the general task scheduling table, the monitoring result of the received task, and the load of each controller in the ring network. In this way, dynamic allocation of computing resources and communication resources in the control system can be realized.

[0156] For any one of at least one first router 05 and at least one second router 06, when the instruction received by the router is an instruction used to instruct to collect data, it should be further understood that the router may directly transfer the instruction to the sensor 03 connected to the router to instruct the sensor 03 to collect data. When the instruction received by the router is an instruction used to instruct to output a drive signal and the router includes a drive circuit, the router may directly execute the instruction. That is, the router may output a drive signal to the execution unit 04 connected to the router based on the frequency of the received reference clock signal. When the instruction received by the router is an instruction used to instruct to output a drive signal and the router does not include a drive circuit, the router may directly transfer the instruction to the drive circuit of the execution unit 04. After receiving the instruction, the drive circuit can generate a drive signal and output the drive signal to the execution unit 04.

[0157] In this embodiment of this application, it should be understood that both the primary controller 01 and the secondary controller 02 may be connected to one or more first routers 05, and each first router 05 may also be connected to one or more second routers 06. For example, referring to FIG. 12. Each of the secondary controllers E1 to E4 is connected to two first routers. For example, the secondary controller E1 is connected to two first routers M1, and the secondary controller E2 is connected to two first routers M2. The primary controller E5 is connected to the first router M5. In addition, each of the first routers M1 to M4 is connected to three second routers. For example, the first router M1 is connected to three second routers L1, and the first router M4 is connected to three second routers L4. The first router M5 is not connected to a second router.

[0158] Refer to FIG. 13. In the scenario where at least one node device 02 is at least one first router 02, at least one sensor 03 in the control system can be connected to the primary controller 01 or at least one first router 02. At least one execution unit 04 in the control system can be connected to the primary controller 01 or at least one first router 02.

[0159] The tasks that need to be executed by the primary controller 01 include one or more of the following tasks, namely, the data transmission task, the data processing task, the instruction transmission task, and the drive signal output task. The tasks that need to be executed by at least one first router 02 may include one or more of the following tasks, namely, the data transmission task, the instruction transmission task, and the drive signal output task. The instructions can be used to instruct the sensor 03 to collect data or to instruct the execution unit 04 to output a drive signal.

[0160] In the scenario where at least one node device 02 is at least one first router 02, the primary controller 01 can implement centralized control over the devices in the control system. Since most software functions can be moved to the primary controller 01, the conventional ECU can be changed to the first router 02. The first router 02 only needs to collect data and output a drive signal, or transfer instructions according to the instructions of the primary controller 01 and strict time series. Therefore, compared with the conventional ECU, the hardware structure of the first router 02 can be effectively simplified, and the cost can be significantly reduced. For example, the first router 02 only needs to hold circuits such as an analog amplification circuit, an ADC, a timer, a PWM circuit, and a communication interface, and does not need to hold a circuit for implementing data processing, such as a processor.

[0161] Optionally, as shown in FIG. 13, the first router 02 may be connected to the primary controller 01 via the first port 021 of the first router 02. In particular, the first router 02 may access the ring network via the first port 021 of the first router 02. Additionally, the control system may further include at least one second router 06. The third port 061 of the second router 06 is connected to the second port 022 of the first router 02, and the fourth port 062 of the second router is connected to at least one sensor 03 and / or at least one execution unit 04. The data transmission rate of the first port 021 is equal to the data transmission rate of the ring network, the data transmission rate of the second port 022 is lower than the data transmission rate of the first port 021, the data transmission rate of the third port 061 is equal to the data transmission rate of the second port 022, and the data transmission rate of the fourth port 062 is lower than the data transmission rate of the third port 061.

[0162] Additionally, the first router 02 connected to the second router 06 may be further configured to perform frequency division on the frequency of the reference clock signal and transmit the frequency-divided reference clock signal to the second router 06.

[0163] At least one second router 06 may be configured to perform time adjustment based on the frequency of the reference clock signal transmitted by the first router 02 and execute tasks. The tasks executed by at least one second router 06 may include at least exchanging data with at least one first router 02 via the third port 061 and exchanging data with at least one sensor 03 and / or at least one execution unit 04 connected to at least one second router 06 via the fourth port 062.

[0164] For example, as shown in FIG. 14, the control system may include a primary controller E5 and a total of four first routers H1 to H4. Each first router is further connected to two second routers. For example, the first router H1 is connected to two second routers M1, and the first router H3 is connected to two second routers M3.

[0165] In the scenario where at least one node device 01 is the first router, it should be understood that the control system may further include at least one third router connected to the second router 06. Correspondingly, the second router 06 may perform frequency division on the frequency of the reference clock signal transmitted by the first router 02 and transmit the frequency-divided reference clock signal to the third router. The third router may further perform time adjustment based on the frequency of the reference clock signal transmitted by the second router 06 and execute tasks.

[0166] For example, referring to FIG. 14. Each second router is connected to three third routers. For example, the second router M2 is connected to three third routers L2, and the second router M4 is connected to three third routers L4. It can be understood that the control system may further include more other low-level routers connected to the third router. This is not limited to this embodiment of this application.

[0167] Based on the above-described value relationship between the data transmission rate and the frequency of the reference clock signal, it can be understood that the first router 02 in the control system may sometimes be referred to as a high-speed router, the second router 06 may sometimes be referred to as a medium-speed router, and the third router may sometimes be referred to as a low-speed router. In other words, the control system can form a tree structure by using the primary controller 01 as a centralized controller, using the primary controller 01 and at least one first router 02 as root nodes, and through combinations of other low-level routers such as the second router and the third router.

[0168] Optionally, in this embodiment of this application, the primary controller 01 may further monitor the execution timing at which the primary controller 01 executes a task and monitor the execution timing at which the node device 02 executes a task. For example, the primary controller 01 may utilize a watchdog timer to monitor the execution timing of a task. The primary controller 01 may be further configured to perform a failure response operation when it is detected that any task is not executed at the execution timing of the any task. The failure response operation may include one or more of the following operations: restarting a device for executing the any task, where the device may be the primary controller 01 or at least one node device 02; restarting a sensor 03 and / or an execution unit 04 connected to the device for executing the any task; and executing a security task set in the primary controller 01.

[0169] A security task is a task that can enable the control system to enter a safe state. The type of security task varies based on different application scenarios. For example, in a vehicle control system, the security task may be a redundancy switching task, a deceleration task, or a pull-over task. In other types of control systems, the security task may be a redundancy switching task and a system diagnosis and protection task, etc.

[0170] The redundant switching task may be to allocate a task that needs to be executed by a device for executing any of the above tasks to another device. For example, when the primary controller 01 determines that a secondary controller for executing any of the above tasks is a defective controller, the primary controller 01 may instruct another secondary controller to execute the related tasks of the defective secondary controller. Optionally, the primary controller 01 may further determine whether to instruct the restarted device to execute any of the above tasks again based on the state of the restarted device, or the state of the restarted sensor 03 and / or the state of the restarted execution unit 04.

[0171] For example, in the general task scheduling table shown in Table 1, assume that t6 > t5. When the primary controller 01 detects that task 6 is executed before task 5 due to a timing error during execution, the secondary controller E4 may be restarted. Alternatively, the sensor 03 and the execution unit 04 connected to the secondary controller E4 are restarted. In the control system provided in this embodiment of this application, when the primary controller 01 detects that an error has occurred in the task execution timing, it timely performs a failure response operation, thereby effectively guaranteeing the security and reliability of the control system.

[0172] Optionally, in this embodiment of this application, in the control system provided, the primary controller 01 may include a primary control module and a secondary control module connected to the primary control module. At least one node device 02 may include a primary node module and a secondary node module connected to the primary node module. Additionally, the ring network may include a first ring subnet and a second ring subnet. The first ring subnet includes the primary control module and the primary node module in at least one node device 02, and the second ring subnet includes the secondary control module and the secondary node module in at least one node device 02. In other words, the primary control module and the primary node module in at least one node device 02 may be sequentially connected to form a first ring subnet within the ring network. The secondary control module and the secondary node module in at least one node device 02 may be sequentially connected to form a second ring subnet within the ring subnet.

[0173] The functions of the primary control module and the secondary control module may be the same, and the two control modules may operate in parallel. Additionally, each of the primary control module and the secondary control module may be a processing chip. Similarly, the functions of the primary node module and the secondary node module may be the same, and the two node modules may operate in parallel. Additionally, when the node device 02 is a secondary controller, each of the primary node module and the secondary node module may be a processing chip. When the node device 02 is a first router, each of the primary node module and the secondary node module may be a transfer chip.

[0174] For example, refer to FIGS. 9, 12, and 14. The primary controller E5 includes a primary control module E5(A) and a secondary control module E5(B). In the scenario where the node device 02 is a secondary controller, as shown in FIGS. 9 and 12, in the secondary controllers E1 to E4, the secondary controller Em includes a primary node module Em(A) and a secondary node module Em(B). In the scenario where the node device 02 is the first router, as shown in FIG. 14, in the first routers H1 to H4, the first router Hm includes a primary node module Hm(A) and a secondary node module Hm(B). m represents the serial numbers of the four node devices 02, that is, m is an integer greater than or equal to 1 and less than or equal to 4. For example, the secondary controller E1 includes a primary node module E1(A) and a secondary node module E1(B).

[0175] Refer to FIG. 9. For example, the node device 02 is a secondary controller. The primary control module E5(A) and the primary node modules of the four secondary controllers can be sequentially connected using the signal cables X15(A), X12(A), X23(A), X34(A), and X45(A) to form the first ring subnet within the ring network. The secondary control module E5(B) and the secondary node modules of the four secondary controllers can be sequentially connected using the signal cables X15(B), X12(B), X23(B), X34(B), and X45(B) to form the second ring subnet within the ring network.

[0176] In the control system provided in this embodiment of this application, the functions of the secondary control module and the primary control module may be the same, and the functions of the secondary node module and the primary node module may also be the same. Therefore, the secondary control module may sometimes be referred to as a redundant control module, and the secondary node module may sometimes be referred to as a redundant node module. Correspondingly, both the signal cable between the secondary control module and the primary control module, and the signal cable between the primary node module and the secondary node module may sometimes be referred to as redundant signal cables. The redundant control module and the redundant node module are used to ensure the reliability of the primary controller and the node device during operation, thereby improving the reliability of the entire control system.

[0177] Each of the primary control module and the secondary control module in the primary controller 01 has a local clock signal, and it should be understood that the reference clock signal can be obtained based on the local clock signal of the primary control module in the primary controller 01. In other words, the local clock signal of the primary control module of the primary controller 01 can be used as the clock reference for the entire control system. For example, the reference clock signal may be the local clock signal of the primary control module in the primary controller 01, or the reference clock signal may be a clock signal obtained by performing frequency division on the local clock signal of the primary control module in the primary controller 01.

[0178] Correspondingly, the primary control module in the primary controller 01 may be configured to transmit the reference clock signal to the primary node module in at least one node device 02 and to the secondary control module in the primary controller 01 by using the first ring subnet.

[0179] The secondary control module in the primary controller 01 is configured to transmit the reference clock signal to the secondary node module in at least one node device 02 by using the second ring subnet. Alternatively, the primary node module in at least one node device 02 may be configured to transmit the reference clock signal to the secondary node module connected to the primary node module. In other words, the reference clock signal received by the secondary node module in the node device 02 may be transmitted by the primary node module connected to the secondary node module, or may be transmitted by the secondary control module in the primary controller 01 by using the second ring subnet.

[0180] For example, FIG. 15 is a schematic diagram of a clock synchronization path. Referring to FIG. 15, the primary control module E5(A) of the primary controller E5 may individually transmit a reference clock signal to the secondary control module E5(B), the primary node module E1(A) of the secondary controller E1, and the primary node module E4(A) of the secondary controller E4. Next, the primary node module E1(A) of the secondary controller E1 may individually transmit the reference clock signal to the secondary node module E1(B) and the primary node module E2(A) of the secondary controller E2. Similarly, the primary node module E4(A) of the secondary controller E4 may also individually transmit the reference clock signal to the secondary node module E4(B) and the primary node module E3(A) of the secondary controller E3. Finally, the primary node module E2(A) of the secondary controller E2 may transmit the reference clock signal to the secondary node module E2(B), and the primary node module E3(A) of the secondary controller E3 may transmit the reference clock signal to the secondary node module E3(B). In this way, clock synchronization of the entire control system can be achieved.

[0181] It should be understood that the transmission directions of the signals (including the reference clock signal, data, instructions, etc.) transmitted in the first ring subnet and the second ring subnet may be the same or different. For example, the transmission direction of the signals transmitted in the first ring subnet may be clockwise, and the transmission direction of the signals transmitted in the second ring subnet may be counterclockwise.

[0182] Referring to FIG. 15, in the control system, when a control module (which may be a primary control module or a secondary control module) in the primary controller 01 transmits a signal, three transmission directions can exist, namely, clockwise transmission in the ring subnet, counterclockwise transmission in the ring subnet, and transmission to other control modules. When a node module (which may be a primary node module or a secondary node module) in the node device 02 transmits a signal, three transmission directions can also exist, namely, clockwise transmission in the ring subnet, counterclockwise transmission in the ring subnet, and transmission to other node modules. The transmission direction in which the control module and the node module actually transmit a signal may be controlled by the primary control module in the primary controller 01. Alternatively, in a scenario where the node device 02 is a secondary controller, the transmission method in which the node module transmits a signal may be determined by the node module based on the fault situation detected by the node module. For example, when it is detected that the interface of the node module is defective or the signal cable connected to the interface is defective, the node module may stop the interface, for example, set the interface to an inactive (down) state, and transmit a signal via another interface.

[0183] In this embodiment of the present application, at least one sensor 03 included in the control system may be classified into a first type of sensor and a second type of sensor. The functional safety level of the first type of sensor may be higher than that of the second type of sensor. The first type of sensor may be individually connected to the primary control module and the secondary control module within the primary controller 01, or may be individually connected to the primary node module and the secondary node module within the node device 02. The second type of sensor may be connected to one of the primary control module, the secondary control module, the primary node module, and the secondary node module.

[0184] In other words, the first type of sensor with a higher functional safety level may be connected to both control modules within the primary controller 01, or may be connected to both node modules within the node device 02. However, the second type of sensor with a lower functional safety level may be connected to only one module within the primary controller 01 or the node device 02.

[0185] Similarly, at least one execution unit 04 may include a first type of execution unit and a second type of execution unit. The functional safety level of the first type of execution unit is higher than that of the second type of execution unit. The first type of execution unit may be individually connected to the primary control module and the secondary control module, or may be individually connected to the primary node module and the secondary node module. The second type of execution unit may be connected to one of the primary control module, the secondary control module, the primary node module, and the secondary node module.

[0186] In other words, the first type of execution unit with a higher functional safety level may be connected to both control modules in the primary controller 01, or may be connected to both node modules in the node device 02. The second type of execution unit with a lower functional safety level may be connected to only one module in the primary controller 01 or the node device 02.

[0187] For example, in a vehicle control system, the first type of sensor may include a speed sensor, a brake sensor, a steering sensor, an image sensor, an airbag sensor, etc., and the second type of sensor may include a temperature sensor, etc. The first type of execution unit may include a brake system motor, a steering system motor, etc., and the second type of execution unit may include a window lifting motor, a drive circuit of a sound box, etc.

[0188] According to the solution provided in this embodiment of this application, a device with a higher functional safety level is connected to both control modules of the primary controller 01 or to both node modules of the node device 02. Thereby, the reliability of data collection and instruction execution is guaranteed, and thereby, the security of the control system can be improved. However, for a device with a lower functional safety level, the device is connected to only one module in the primary controller 01 or the node device 02. Thereby, the architecture of the control system becomes simple, and the complexity of the system can be reduced.

[0189] Optionally, refer to FIGS. 9 and 15. The control system may further include a first power supply A0(A) and a second power supply A0(B). The first power supply A0(A) may be individually connected to a primary control module in the primary controller 01 and a primary node module in at least one node device 02, and is configured to supply power to the primary control module and the primary node module in at least one node device 02. The second power supply A0(B) may be individually connected to a secondary control module in the primary controller 01 and a secondary node module in at least one node device 02, and is configured to supply power to the secondary control module and the secondary node module in at least one node device 02.

[0190] The redundant second power supply A0(B) is arranged to supply power to the secondary control module and the secondary node module. This ensures that the two ring subnets in the control system can operate independently, and further ensures the functional safety and reliability of the control system.

[0191] In addition to supplying power to the primary control module and the primary node module, the first power supply A0(A) should be understood to further supply power to other devices (such as sensors and actuators) connected to the primary control module, and other devices connected to the primary node module. Similarly, the second power supply A0(B) may supply power to other devices connected to the secondary control module and other devices connected to the secondary node module.

[0192] As shown in FIGS. 9, 12, 14, and 15, the control system provided in this embodiment of this application may further include a gateway W0. The gateway W0 is connected to the primary controller 01 or at least one node device 02. For example, refer to FIGS. 9, 12, 14, and 15. The gateway W0 may be connected to the primary controller E5.

[0193] The gateway W0 is configured to transmit data from the primary controller 01 or at least one node device 02 connected to the gateway W0 to an external device, and also transmit data from the external device to the primary controller 01 or at least one node device 02 connected to the gateway W0. In other words, the gateway W0 may be configured to exchange data between the external device and the primary controller 01, or between the external device and at least one node device 02. The external device may be a device independent of the control system. For example, in a vehicle control system, the external device may include mobile terminals such as mobile phones, communication base stations, roadside data base stations, and other vehicles.

[0194] In the control system provided in this embodiment of this application, the primary controller 01 or at least one node device 02 may further communicate with an external device using the gateway. Thereby, the function of the control system is enhanced, and the flexibility of the control system during operation is improved.

[0195] Optionally, refer to FIGS. 9, 12, 14, and 15. It can be understood that the gateway W0 may include a primary communication module W0(A) and a secondary communication module W0(B) connected to the primary communication module W0(A). The primary communication module W0(A) may be connected to a primary control module or a primary node module, and can establish a communication connection with an external device via a primary channel D0(A). The secondary communication module W0(B) may be connected to a secondary control module or a secondary node module, and can establish a communication connection with an external device via a secondary channel D0(B). Additionally, as shown in FIGS. 9, 12, 14, and 15, the primary communication module W0(A) is connected to a first power supply A0(A) and can be powered by the first power supply A0(A). The secondary communication module W0(B) is connected to a second power supply A0(B) and can be powered by the second power supply A0(B).

[0196] Two communication modules are designed, and the two communication modules are independently powered by different power supplies. Thereby, the functional safety and reliability when the primary controller 01 or the node device 02 exchanges data with an external device can be guaranteed.

[0197] In this embodiment of the present application, data is exchanged between two devices in the ring network (for example, between the primary controller and the node device, or between different node devices). When a device in the ring network exchanges data with an external device, the data sender may add a timestamp to the data based on coordinated universal time (UTC). In this way, it can be ensured that the data receiver can reconstruct the data time series based on the timestamp and check the data time series. In addition, by adding a timestamp, it is further possible to enable the receiver to determine the data transmission delay and perform delay correction, thereby ensuring that the receiver has good automatic control performance for the received data.

[0198] Optionally, in this embodiment of the present application, each of the first router and the second router may include a primary routing module and a redundant secondary routing module connected to the primary routing module. The functions of the primary routing module and the secondary routing module may be the same, and each of the primary routing module and the secondary routing module may be a chip with a transfer function. The primary routing module in the first router may be connected to the primary routing module in the second router, and may be connected to the primary control module in the primary controller 01 or the primary node module in the node device 02. The secondary routing module in the first router may be connected to the secondary routing module in the second router, and may be connected to the secondary control module in the primary controller 01 or the secondary node module in the node device 02.

[0199] For example, refer to FIG. 16. The first router M1 in the control system includes a primary routing module M1(A) and a secondary routing module M1(B), and the second router L1 includes a primary routing module L1(A) and a secondary routing module L1(B). The primary routing module M1(A) is individually connected to the primary node module E1(A) of the secondary controller E1 and the primary routing module L1(A) in the second router L1. The secondary routing module M1(B) is individually connected to the secondary node module E1(B) of the secondary controller E1 and the secondary routing module L1(B) in the second router L1.

[0200] In addition, referring to FIG. 16, it can be further understood that both the primary routing module and the secondary routing module in the router can be powered by independent power supplies. For example, all the primary routing modules are connected to the first power supply A0(A) and are powered by the first power supply A0(A). All the secondary routing modules are connected to the second power supply A0(B) and are powered by the second power supply A0(B).

[0201] In a scenario where the router in the control system includes a primary routing module and a secondary routing module, the primary control module in the primary controller 01 or the primary node module in the node device 02 can transmit a reference clock signal to the primary routing module. The primary routing module can further transmit the received reference clock signal to the secondary routing module. Alternatively, the secondary control module in the primary controller 01 or the secondary node module in the node device 02 can transmit a reference clock signal to the secondary routing module.

[0202] FIG. 17 is a schematic diagram of another clock synchronization path in the control system according to the embodiment of this application. Refer to FIG. 17. It can be understood that the primary control module E5(A) in the primary controller E5 transmits a reference clock signal to the primary routing module E1(A) in the first router E1 to perform clock synchronization. Further, the primary routing module E1(A) in the first router E1 can transmit the reference clock signal individually to the secondary routing module E1(B) and the primary routing module M1(A) in the second router M1 to perform clock synchronization. Finally, the primary routing module M1(A) in the second router M1 can transmit the reference clock signal to the secondary routing module M1(B) to perform clock synchronization.

[0203] In this embodiment of this application, the first type of sensor with a high safety level may be connected to both routing modules in the router, and the second type of sensor with a low safety level may be connected to only one routing module in the router. Similarly, the first type of execution unit with a high safety level may be connected to both routing modules in the router, and the second type of execution unit with a low safety level may be connected to only one routing module in the router.

[0204] For example, refer to FIG. 16. The first type of sensor S1 may include a primary sensor module S1(A) and a secondary sensor module S1(B). The primary sensor module S1(A) may be connected to a primary routing module, a primary control module, or a primary node module. The secondary sensor module S1(B) may be connected to a secondary routing module, a secondary control module, or a secondary node module. The first type of execution unit P1 may include a primary execution module P1(A) and a secondary execution module P1(B). The primary execution module P1(A) may be connected to a primary routing module, a primary control module, or a primary node module. The secondary execution module P1(B) may be connected to a secondary routing module, a secondary control module, or a secondary node module.

[0205] In the control system provided in this embodiment of this application, both the controller and the router have redundant functional modules and redundant signal links, and can be powered by redundant power supplies. Therefore, the functional safety and reliability of the control system are effectively improved.

[0206] Optionally, in this embodiment of this application, the number of controllers included in the control system provided may be flexibly adjusted based on the requirements of the application scenario. For example, the number of controllers included in the control system may be comprehensively determined based on factors such as controller performance, communication rate requirements of the ring network, the number of sensors and actuators included in the control system, functional complexity, and cost. An on-board control system is used as an example. Refer to FIGS. 9, 12, and 15. The on-board control system may include a total of five controllers, namely, E1 to E5, where E5 is the primary controller and E1 to E4 are secondary controllers. In addition, based on the setting directions of each secondary controller, secondary controller E1 may sometimes be referred to as the left front controller, secondary controller E2 may sometimes be referred to as the left rear controller, secondary controller E3 may sometimes be referred to as the right rear controller, and secondary controller E4 may sometimes be referred to as the right front controller.

[0207] Alternatively, refer to FIG. 18. The control system may include a total of four controllers, namely, E1 to E4, and one of the four controllers is the primary controller and the other three controllers are secondary controllers. Alternatively, refer to FIG. 19. The control system may include a total of three controllers, namely, E1 to E3, where E1 is the left front controller, E2 is the rear controller, and E3 is the right front controller. In addition, one of the three controllers is the primary controller and the other two controllers are secondary controllers. Alternatively, refer to FIG. 20. The control system may include two controllers, namely, E1 and E2, where E1 is the front controller and E2 is the rear controller. In addition, one of the two controllers is the primary controller and the other is the secondary controller.

[0208] In addition to being a vehicle control system, it can be understood that the control system provided in this embodiment of this application may be other types of control systems. For example, the control system may be a system with high requirements for real-time control or a control system with high requirements for functional safety. Systems with high requirements for real-time control may include aircraft power systems, steering systems, telemetry systems, industrial control servo systems, cyclotrons, electromagnetic radiation systems, and electromagnetic gun systems. Systems with high requirements for functional safety include surgical robot control systems, remote control systems, and railway transportation drive systems in the medical field, and may further include the operation and control systems of autonomous vehicles, remotely operated driving vehicles, and airborne vehicles. In addition, the control system provided in this embodiment of this application can be further applied to the automation industry field with high requirements for security. For example, the control system may be a remote or remote control system for the chemical industry, nuclear energy, coal mines, or ports, or may be a defective location identification and range identification system for the power industry.

[0209] The control system provided in this embodiment of this application further has the following functions and advantageous effects.

[0210] 1. All software functions are transferred to the controller in the ring network, realizing the separation of software and hardware, expanding the flexibility of the control system, reducing the complexity of sensor and actuator testing, ensuring the test quality, reducing the co-driving time of the control system, and reducing the development difficulty. [[ID=]10]

[0211] 2. The transmission direction of the signal (i.e., the communication route) can be dynamically adjusted based on the fault situation. In addition, the execution timing of tasks, the physical carrier on which the software module operates (e.g., the primary controller or the secondary controller), and the functions of each software module are all dynamically scheduled by the primary controller, which can improve the reliability and application flexibility of the control system.

[0212] 3. For the vehicle control system, based on the clock synchronization and task scheduling functions of the primary controller at the vehicle system level, the implementation of conventional ECU functions such as sensor control and execution unit control can be replaced by the implementation of the controller, effectively reducing the number of ECUs in the vehicle and reducing the costs of the vehicle's ECUs and harnesses.

[0213] 4. High-level functional safety algorithms (e.g., high-speed functional safety protection overcurrent in microseconds) and the detection of potential faults can be realized by the controller at the top layer. The functional safety check and model check at the top layer can effectively enhance the security of the entire control system and reduce the hardware and software overhead costs caused by the functional safety mechanism at the bottom layer.

[0214] 5. Each device in the control system adopts a redundant structure. Thereby, the functional safety level can be reduced at the system level. For example, in the vehicle control system, the automotive safety integration level (ASIL) can be reduced from level D to level B or below.

[0215] 6. The EMC performance of the entire control system is improved through the frequency modulation of the reference clock signal.

[0216] 7. The primary controller schedules tasks in a unified manner, prevents problems such as resource preemption and competition that occur in tasks within the control system, and ensures the regular execution of tasks.

[0217] 8. The primary / secondary controller is dynamically adjusted based on the operating state detection mechanism and fault detection mechanism for multiple controllers within the ring network. The adjustment principle includes the priority and bad state of the controller.

[0218] 9. The operations of related registers within the control system are synchronously implemented based on the frequency of the reference clock signal. In addition, in the primary controller, the codes used to perform different tasks are stored in different regions, are independent of each other in time series, and do not interfere with each other.

[0219] In summary, the embodiments of this application provide a control system. The primary controller within the control system may directly transmit a reference clock signal to at least one node device using a ring network, whereby at least one node device can perform time adjustment based on the frequency of the reference clock signal. In this way, clock synchronization between the primary controller and at least one node device is achieved. Compared with the transmission of data frames, the direct transmission of the reference clock signal improves the accuracy of clock synchronization between the primary controller and at least one node device to an accuracy equal to the pulse width of the reference clock signal, thereby effectively improving the accuracy of clock synchronization. In addition, since the primary controller and at least one node device within the control system can be sequentially connected to form a ring network, it is ensured that there is a redundant signal exchange path during the signal exchange between the primary controller and at least one node device, thereby ensuring the reliability of signal transmission.

[0220] In addition, in the control system provided in this embodiment of this application, the time synchronization accuracy between the primary controller and at least one node device is high. Therefore, it is guaranteed that all time-sensitive tasks can be transferred to the primary controller or the node device for execution by the ECU, thereby effectively reducing the quantity of ECUs in the control system and simplifying the functions of the ECUs (for example, the ECUs can be simplified like a router). The control system has lower complexity and higher flexibility.

[0221] Embodiments of this application further provide a clock synchronization method. The clock synchronization method can be applied to the control system provided in the above embodiment. Refer to FIG. 21. The method may include the following steps.

[0222] Step 101: The primary controller performs time adjustment based on the frequency of the local clock signal of the primary controller and executes a task.

[0223] The local clock signal of the primary controller can be generated after the PLL in the primary controller performs frequency multiplication on the source clock signal generated by the crystal oscillator in the primary controller based on a preset frequency multiplication value.

[0224] The tasks executed by the primary controller may include one or more of the following tasks, namely, a data transmission task, a data processing task, an instruction transmission task, and a drive signal output task. The instructions may be used to instruct a sensor to collect data or to instruct an execution unit to output a drive signal.

[0225] Step 102: The primary controller uses the ring network to send a reference clock signal to at least one node device.

[0226] The reference clock signal is obtained based on the local clock signal of the primary controller, and the reference clock signal is utilized by at least one node device to perform time adjustment based on the frequency of the reference clock signal to execute tasks. The reference clock signal is the local clock signal of the primary controller. Alternatively, the reference clock signal is a clock signal obtained by performing frequency division on the local clock signal of the primary controller.

[0227] Optionally, the primary controller may include a primary control module and a secondary control module connected to the primary control module. At least one node device may include a primary node module and a secondary node module connected to the primary node module. The ring network includes a first ring subnet and a second ring subnet. The first ring subnet includes the primary control module and the primary node module within at least one node device, and the second ring subnet includes the secondary control module and the secondary node module within at least one node device. In a scenario where the primary controller includes two control modules, the reference clock signal may be obtained based on the local clock signal of the primary control module.

[0228] Correspondingly, in step 102, the primary control module may individually transmit the reference clock signal to the secondary control module and the primary node module within at least one node device.

[0229] Next, the primary node module within the node device may transmit the received reference clock signal to a secondary node module connected to the primary node module. Alternatively, the secondary control module within the primary controller may transmit the reference clock signal to a secondary node module within at least one node device using a second ring subnet.

[0230] Step 103: The primary controller transmits a synchronization signal to at least one node device using the ring network.

[0231] The synchronization signal is utilized by at least one node device to correct the time of the local clock of the node device.

[0232] In an optional implementation, the primary controller is connected to at least one node device using a clock signal cable. In this implementation, the primary controller may transmit a composite signal of the reference clock signal and the synchronization signal to at least one node device using the clock signal cable.

[0233] In another optional implementation, the primary controller is connected to at least one node device using a clock signal cable and a synchronization signal cable. In this implementation, the primary controller may transmit the reference clock signal to at least one node device using the clock signal cable and transmit the synchronization signal to at least one node device using the synchronization signal cable.

[0234] Step 104: The node device corrects the time of the local clock of the node device based on the synchronization signal.

[0235] After receiving the synchronization signal, the node device may correct the time of the local clock of the node device based on the synchronization signal to ensure time synchronization with the primary controller.

[0236] In a scenario where the primary controller transmits a composite signal of a reference clock signal and a synchronization signal using a clock signal cable, the node device can individually obtain the synchronization signal and the reference clock signal from the received composite signal based on the amplitude and / or pulse width of the received composite signal.

[0237] In a scenario where the primary controller transmits a reference clock signal using a clock signal cable and transmits a synchronization signal using a synchronization signal cable, the node device may receive the reference clock signal transmitted by the primary controller using the clock signal cable and may receive the synchronization signal transmitted by the primary controller using the synchronization signal cable. In other words, the node device does not need to parse the synchronization signal and the reference clock signal from the composite signal. Thereby, the complexity of receiving the synchronization signal and the reference clock signal by the node device is reduced.

[0238] Step 105: The node device performs time adjustment based on the frequency of the reference clock signal and executes a task.

[0239] In an optional implementation, the node device may include a PLL. The node device may use the PLL to correct the frequency of the local clock signal of the node device based on the frequency of the reference clock signal and maintain a target ratio between the frequency of the local clock signal of the node device and the frequency of the reference clock signal. Then, the node device may perform time adjustment based on the corrected frequency of the local clock signal of the node device and execute a task.

[0240] In another optional implementation, the node device may directly perform time adjustment based on the frequency of the reference clock signal and execute a task. In other words, the node device may not need to correct the frequency of the local clock signal of the node device.

[0241] Step 106: The primary controller adjusts the frequency of the local clock signal of the primary controller within the target frequency range.

[0242] In this embodiment of this application, the primary controller may further perform frequency modulation on the local clock signal of the primary controller, thereby effectively improving the EMC performance of the frequency-sensitive circuits in the control system during the task execution process.

[0243] Step 107: When the primary controller detects that any task is not executed at the execution time of the any task, the primary controller performs a failure response operation.

[0244] The primary controller may further monitor the execution status of tasks in the control system. When the primary controller detects that any task is not executed at the execution time of the any task, the primary controller may perform a failure response operation. The failure response operation may include one or more of the following operations: restarting the device for executing the any task, where the device is the primary controller or at least one node device; restarting the sensor and / or execution unit connected to the device for executing the any task; and executing the security task set in the primary controller.

[0245] Optionally, at least one node device in the control system may be at least one secondary controller. The control system may further include at least one sensor and at least one execution unit. The at least one sensor is connected to the primary controller or at least one secondary controller, and the at least one execution unit is connected to the primary controller or at least one secondary controller. The tasks that need to be executed by the primary controller and the tasks that need to be executed by at least one secondary controller each include one or more of the following tasks, namely, data transmission task, data processing task, instruction transmission task, and drive signal output task. The instructions are used to instruct at least one sensor to collect data or to instruct at least one execution unit to output a drive signal.

[0246] Refer to FIG. 22. In a scenario where at least one node device is at least one secondary controller, the method may further include the following steps.

[0247] Step 108a: The primary controller determines the tasks that need to be executed by the primary controller and the timing of executing those tasks, and the tasks that need to be executed by at least one secondary controller and the timing of executing those tasks.

[0248] In this embodiment of this application, the primary controller may determine the tasks that need to be executed by a plurality of controllers (including the primary controller and secondary controllers) in the ring network and the timing of executing those tasks. In other words, the primary controller may perform unified scheduling and management of tasks to ensure regular execution of tasks.

[0249] When the task to be executed includes general data processing tasks and the general data processing tasks require a large amount of computing resources, the primary controller may divide the general data processing tasks into a plurality of data processing tasks. In addition, the primary controller determines, based on the load of the primary controller and the load of at least one secondary controller, the data processing tasks that need to be executed by the primary controller and the data processing tasks that need to be executed by at least one secondary controller. Thereby, distributed execution of data processing tasks can be realized, and based on the improvement of task execution efficiency, the utilization rate of the computing resources of the controller can be further improved.

[0250] Step 109a: The primary controller sends a task scheduling table to at least one secondary controller.

[0251] The task scheduling table may include tasks that need to be executed by at least one secondary controller and the timing of execution of those tasks. After receiving the task scheduling table sent by the primary controller using the ring network, the secondary controller can execute the tasks based on the timing of execution of the tasks recorded in the task scheduling table. In other words, in step 105, the secondary controller performs time adjustment based on the frequency of the reference clock signal and can execute the tasks at the timing of execution of the tasks that need to be executed by the secondary controller.

[0252] At the same time, in step 101, the primary controller performs time adjustment based on the frequency of the local clock signal of the primary controller and can execute the tasks at the timing of execution of the tasks that need to be executed by the primary controller.

[0253] Step 110a: The primary controller uses the ring network to send target data to at least one secondary controller.

[0254] The target data may be data that has high security requirements and needs to be shared by multiple controllers included in the ring network. For example, the target data may include vehicle speed.

[0255] Step 111a: If the target data sent using the ring network is not received, or if the received target data sent using the ring network does not match the sent target data, the primary controller performs fault detection on the ring network and / or re - sends the target data.

[0256] In this embodiment of this application, after sending target data with high security requirements using the ring network, the primary controller can detect whether the secondary controllers in the ring network have correctly received the target data. In this way, it can be guaranteed that the target data can be reliably sent to the secondary controllers.

[0257] It should be understood that the secondary controllers in the control system may also implement the methods shown in Step 110a and Step 111a. In other words, the secondary controllers may also send target data using the ring network, and may also perform fault detection on the ring network and / or re - send the target data when detecting that other controllers in the ring network have not correctly received the target data.

[0258] Step 112a: When the secondary controller determines that the primary controller is defective or any of the signal cables connected to the primary controller is defective, the secondary controller determines a new primary controller from at least one secondary controller based on the priority list.

[0259] The secondary controller may further maintain a priority list, and the priority list includes the priorities of at least one secondary controller included in the control system. When the secondary controller determines that the primary controller is defective or any of the signal cables connected to the primary controller is defective, the secondary controller may determine a new primary controller from at least one secondary controller included in the control system based on the priority list. Then, the new primary controller may perform unified scheduling management for a plurality of controllers in the control system. Specifically, it can ensure that the primary control right of the control system is handed over to the new primary controller and the control system can still operate properly.

[0260] Optionally, the control system may further include at least one router. The first port of at least one first router is connected to the primary controller, and the second port of at least one first router is connected to at least one sensor and / or at least one execution unit. The data transmission rate of the first port is lower than the data transmission rate of the ring network, and the data transmission rate of the second port is lower than the data transmission rate of the first port. Further refer to FIG. 22. The method may further include the following steps.

[0261] Step 113a: The primary controller performs frequency division on the frequency of the reference clock signal.

[0262] The primary controller may perform frequency division on the frequency of the reference clock signal based on a preset frequency division value.

[0263] Step 114a: The primary controller transmits the frequency-divided reference clock signal to at least one first router.

[0264] Step 115a: The first router performs time adjustment based on the frequency of the received reference clock signal and executes a task.

[0265] After receiving the frequency-divided reference clock signal transmitted by the primary controller, the first router may perform time adjustment based on the frequency of the frequency-divided reference clock signal and execute a task.

[0266] It should be understood that the secondary controller in the control system may also be connected to the first port of the first router. When the secondary controller is also connected to the first router, the secondary controller may also perform the methods shown in Step 113a and Step 114a. In other words, the secondary controller may perform frequency division on the frequency of the reference clock signal transmitted by the primary controller and transmit the frequency-divided reference clock signal to the first router connected to the secondary controller.

[0267] In a scenario where at least one node device is at least one first router, at least one sensor in the control system may be connected to the primary controller or the first router, and at least one executor in the control system may be connected to the primary controller or the first router. Tasks that need to be executed by the primary controller include one or more of the following tasks: data transmission task, data processing task, instruction transmission task, and drive signal output task. Tasks that need to be executed by the first router include one or more of the following tasks: data transmission task, instruction transmission task, and drive signal output task. Instructions are used to instruct at least one sensor to collect data or to instruct at least one executor to output a drive signal.

[0268] The first port of the first router is connected to the primary controller. The control system may further include at least one second router. The third port of the at least one second router is connected to the second port of the first router, and the fourth port of the at least one second router is connected to at least one sensor and / or at least one executor. The data transmission rate of the first port is equal to the data transmission rate of the ring network, the data transmission rate of the second port is lower than the data transmission rate of the first port, the data transmission rate of the third port is equal to the data transmission rate of the second port, and the data transmission rate of the fourth port is lower than the data transmission rate of the third port.

[0269] In a scenario where at least one node device is at least one first router, as shown in FIG. 23, the clock synchronization method may further include the following steps.

[0270] Step 108b: The first router performs frequency division on the frequency of the received reference clock signal.

[0271] After receiving the reference clock signal transmitted by the primary controller, the first router can perform frequency division on the frequency of the reference clock signal based on a preset frequency division value.

[0272] Step 109b: The first router transmits the frequency-divided reference clock signal to at least one second router.

[0273] Step 110b: The second router performs time adjustment based on the frequency of the received reference clock signal and executes a task.

[0274] After receiving the frequency-divided reference clock signal transmitted by the first router, the second router can perform time adjustment based on the frequency of the frequency-divided reference clock signal and execute a task.

[0275] It should be understood that the order of steps in the clock synchronization method provided in this embodiment of this application may be appropriately adjusted, or, correspondingly, steps may be added or deleted based on the situation. For example, in the embodiment shown in FIG. 21, step 103 may be performed before step 102, step 106 may be performed before step 103, and step 107 may be performed before step 106. Alternatively, step 103 and step 104 may be deleted based on the situation, and step 106 and step 107 may also be deleted based on the situation. In the embodiment shown in FIG. 22, step 110a and step 111a may be deleted based on the situation, step 112a may be deleted based on the situation, and steps 113a to 115a may also be deleted based on the situation. In addition, in the embodiment shown in FIG. 22, the first router may also perform the methods shown in step 108b and step 109b in the embodiment shown in FIG. 23.

[0276] In summary, the embodiments of this application provide a clock synchronization method. The primary controller may directly transmit a reference clock signal to at least one node device by using a ring network, so that at least one node device can perform time adjustment based on the frequency of the reference clock signal. In this way, clock synchronization between the primary controller and at least one node device is achieved. Compared with transmitting a data frame, the direct transmission of the reference clock signal improves the accuracy of clock synchronization between the primary controller and at least one node device to an accuracy equal to the pulse width of the reference clock signal, whereby the accuracy of clock synchronization can be effectively improved.

[0277] For the purpose of convenient and concise description, for the specific operation process of the clock synchronization method described above, the relevant descriptions in the above system embodiments may be referred to, and it can be clearly understood by those skilled in the art that the details will not be described again here.

[0278] The embodiments of this application further provide a primary controller. The primary controller can be applied to the control system provided in the above embodiments. The primary controller may include a programmable logic circuit and / or program instructions, and the primary controller is configured to perform the steps performed by the primary controller in the above method embodiments.

[0279] FIG. 24 is a schematic diagram of the structure of the primary controller according to an embodiment of this application. Referring to FIG. 24, the primary controller may include a processor 2101, a memory 2102, a network interface 2103, and a bus 2104. The bus 2104 is configured to connect the processor 2101, the memory 2102, and the network interface 2103. Communication connections to other devices may be implemented via the network interface 2103 (which may be wired or wireless). The memory 2102 stores a computer program 21021. The computer program 21021 is used to implement various application functions.

[0280] In this embodiment of this application, the processor 2101 may be a CPU, or it should be understood that the processor 2101 may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), GPUs, or other programmable logic devices, discrete gates or transistor logic devices, or discrete hardware assemblies, etc. General-purpose processors may be microprocessors or any existing processors, etc.

[0281] The memory 2102 may be a volatile memory, a non-volatile memory, or may include both a volatile memory and a non-volatile memory. The non-volatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM) and can be used as an external cache. Through non-limiting and illustrative explanations, many forms of RAM can be used, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0282] In addition to the data bus, the bus 2104 may further include a power bus, a control bus, a status signal bus, etc. However, for clarity of description, various buses are marked as bus 2104 in the figure.

[0283] The processor 2101 is configured to execute a computer program stored in the memory 2102. The processor 2101 executes the computer program 21021 to implement the above-described functions of the primary controller.

[0284] Embodiments of this application further provide a node device. The node device can be applied to the control system provided in the above-described embodiments. The node device may include a programmable logic circuit and / or program instructions, and the node device can be configured to implement the steps executed by the node device in the above-described method embodiments.

[0285] It should be understood that both the primary controller and the node device in the control system provided in this embodiment of this application can be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. Of course, the functions of the primary controller and the secondary controller can also be implemented using software. When the functions of the primary controller and the secondary controller are implemented using software, the modules in the primary controller and the secondary controller can be software modules.

[0286] Embodiments of this application further provide a vehicle. The vehicle can include the control system provided in the above-described embodiments. For example, the vehicle can include the control system shown in any one of FIGS. 1, 8, 9, and 12-20.

[0287] Optionally, the vehicle can be an electric vehicle. In addition, the vehicle can be an autonomous vehicle, a remotely operated vehicle, an air transportation vehicle, or the like.

[0288] All or part of the above-described embodiments may be implemented using software, hardware, firmware, or any combination thereof. When software is used for implementation, all or part of the above-described embodiments may be implemented in the form of a computer program product. The computer program product includes at least one computer instruction. When the computer instruction is loaded or executed on a computer, all or part of the procedures or functions according to the embodiments of this application are generated. The computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices. The computer instruction is stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instruction may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired (such as coaxial cable, optical fiber, or digital subscriber line (DSL)) or wireless (such as infrared, radio wave, or microwave) manner. The computer-readable storage medium may be any available medium accessible by a computer or a data storage device such as a server or data center including at least one set of available media. The available media may be a magnetic medium (such as a floppy disk, hard disk, or magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium may be a solid state drive (SSD).

[0289] In this application, terms such as "first" and "second" are used to distinguish the same item or similar items having basically the same effects and functions. It should be understood that there is no logical or chronological order dependence among "first", "second", and "nth". The quantity and execution order are not limited. Although terms such as "first" and "second" are used in the following description to describe various elements, it should also be understood that these elements should not be limited to those terms. These terms are only used to distinguish one element from another. For example, the first power source may also be referred to as the second power source without departing from the scope of the various examples described, and similarly, the second power source may also be referred to as the first power source. Both the first power source and the second power source can be power sources, and in some cases, they may be separate or different power sources.

[0290] In this application, the term "at least one" means at least one, and the term "a plurality" means two or more. The terms "system" and "network" may be used interchangeably in this specification. It should be understood that the "and / or" described in this specification indicates that three relationships may exist. For example, A and / or B may indicate that only A exists, both A and B exist, and only B exists. The symbol " / " generally indicates an "or" relationship between related objects.

[0291] The above description is only about the optional implementation of this application, but the protection scope of this application is not limited thereto. Any equivalent modification or substitution that can be immediately understood by those skilled in the art within the technical scope disclosed in this application should fall within the protection scope of this application. Therefore, the protection scope of this application should be targeted at the protection scope of the claims.

Claims

1. A control system, the control system including a ring network, the ring network including a primary controller and at least one node device; The primary controller is configured to perform time adjustments based on a frequency of a local clock signal of the primary controller to execute tasks, and to transmit a reference clock signal and a synchronization signal to the at least one node device using the ring network, wherein the reference clock signal is obtained based on the local clock signal of the primary controller; the at least one node device includes a phase-locked loop, and the at least one node device is configured to modify a time of a local clock signal of the node device based on the synchronization signal, utilize the phase-locked loop to modify a frequency of the local clock signal of the node device based on a frequency of the reference clock signal to maintain a target ratio between the frequency of the local clock signal of the node device and the frequency of the reference clock signal, and perform time adjustments based on the frequency of the local clock signal of the node device to perform a task. Control system.

2. the at least one node device is at least one secondary controller, and the control system further includes at least one sensor and at least one execution unit, the at least one sensor being connected to the primary controller or the at least one secondary controller, and the at least one execution unit being connected to the primary controller or the at least one secondary controller; The tasks that need to be performed by the primary controller and the tasks that need to be performed by the at least one secondary controller each include one or more of the following tasks: a data transmission task, a data processing task, a command transmission task, and a drive signal output task; the instructions are utilized to instruct the at least one sensor to collect data or to output the drive signal to the at least one execution unit. The control system of claim 1 .

3. A control system, the control system including a ring network, the ring network including a primary controller and at least one node device; The primary controller is configured to perform time adjustments based on a frequency of a local clock signal of the primary controller to execute tasks, and to transmit a reference clock signal to the at least one node device using the ring network, the reference clock signal being obtained based on the local clock signal of the primary controller; The at least one node device is configured to perform time adjustments based on a frequency of the reference clock signal to execute tasks; the at least one node device is at least one secondary controller; The primary controller determining the tasks that need to be executed by the primary controller and execution times for the tasks; determining the tasks that need to be executed by the at least one secondary controller and execution times for the tasks; executing the tasks at the execution times for the tasks that need to be executed by the primary controller; and sending a task scheduling table to the at least one secondary controller, wherein the task scheduling table received by the at least one secondary controller includes the tasks that need to be executed by the at least one secondary controller and the execution times for the tasks; the at least one secondary controller is configured to execute the task at the execution time of the task that needs to be executed by the at least one secondary controller based on the task scheduling table; Control system.

4. A control system, the control system including a ring network, the ring network including a primary controller and at least one node device; The primary controller is configured to perform time adjustments based on a frequency of a local clock signal of the primary controller to execute tasks, and to transmit a reference clock signal to the at least one node device using the ring network, the reference clock signal being obtained based on the local clock signal of the primary controller; The at least one node device is configured to perform time adjustments based on a frequency of the reference clock signal to execute tasks; the at least one node device is at least one secondary controller; The primary controller further configured to divide a general data processing task into a plurality of data processing tasks, and determine, based on a load of the primary controller and a load of the at least one secondary controller, a data processing task that needs to be executed by the primary controller and a data processing task that needs to be executed by the at least one secondary controller. Control system.

5. A control system, the control system including a ring network, the ring network including a primary controller and at least one node device; The primary controller is configured to perform time adjustments based on a frequency of a local clock signal of the primary controller to execute tasks, and to transmit a reference clock signal to the at least one node device using the ring network, the reference clock signal being obtained based on the local clock signal of the primary controller; The at least one node device is configured to perform time adjustments based on a frequency of the reference clock signal to execute tasks; the at least one node device is at least one secondary controller; The at least one secondary controller further maintains a priority list, the priority list including a priority of the at least one secondary controller, and the at least one secondary controller: and further configured to determine a new primary controller from the at least one secondary controller based on the priority list when it is determined that the primary controller is faulty or any signal cable connected to the primary controller is faulty. Control system.

6. A control system, the control system including a ring network, the ring network including a primary controller and at least one node device; The primary controller is configured to perform time adjustments based on a frequency of a local clock signal of the primary controller to execute tasks, and to transmit a reference clock signal to the at least one node device using the ring network, the reference clock signal being obtained based on the local clock signal of the primary controller; The at least one node device is configured to perform time adjustments based on a frequency of the reference clock signal to execute tasks; the at least one node device is at least one secondary controller; The primary controller and the at least one secondary controller utilizing the ring network to transmit target data to other controllers in the control system; If the target data transmitted over the ring network is not received or if the received target data transmitted over the ring network does not match the transmitted target data, performing fault detection on the ring network and / or retransmitting the target data. further configured as follows: Control system.

7. The control system further includes a gateway, the gateway being connected to the primary controller or the at least one node device, and the gateway: configured to transmit data from a device connected to the gateway to an external device, and to transmit data from the external device to the device connected to the gateway; The external device is a device independent of the control system. A control system according to any one of claims 1 to 6.

8. A clock synchronization method applied to a control system, the control system including a ring network, the ring network including a primary controller and at least one node device, the at least one node device including a phase-locked loop, the method comprising: performing, by the primary controller, time adjustments based on the frequency of the primary controller's local clock signal to execute tasks; and transmitting, by the primary controller, a reference clock signal and a synchronization signal to the at least one node device using the ring network, wherein the reference clock signal is obtained based on the local clock signal of the primary controller, the method comprising: and further comprising: modifying, by the at least one node device, a time of a local clock signal of the node device based on the synchronization signal; utilizing the phase-locked loop to modify a frequency of the local clock signal of the node device based on a frequency of the reference clock signal to maintain a target ratio between the frequency of the local clock signal of the node device and the frequency of the reference clock signal; and performing time adjustment based on the frequency of the local clock signal of the node device to perform a task. Clock synchronization method.

9. A vehicle, said vehicle including a control system according to any one of claims 1 to 7.

10. A clock synchronization method applied to a primary controller in a control system, the control system including a ring network, the ring network including the primary controller and at least one node device, the at least one node device being at least one secondary controller, the method comprising: performing time adjustment based on a frequency of a local clock signal of the primary controller, executing tasks, and transmitting a reference clock signal to the at least one node device using the ring network, wherein the reference clock signal is obtained based on the local clock signal of the primary controller, and the method includes: determining the tasks that need to be executed by the primary controller and the execution times of the tasks; determining the tasks that need to be executed by the at least one secondary controller and the execution times of the tasks; executing the tasks at the execution times of the tasks that need to be executed by the primary controller; and transmitting a task scheduling table to the at least one secondary controller, wherein the task scheduling table received by the at least one secondary controller includes the tasks that need to be executed by the at least one secondary controller and the execution times of the tasks. Clock synchronization method.

11. A clock synchronization method applied to a primary controller in a control system, the control system including a ring network, the ring network including the primary controller and at least one node device, the at least one node device being at least one secondary controller, the method comprising: performing time adjustment based on a frequency of a local clock signal of the primary controller, executing tasks, and transmitting a reference clock signal to the at least one node device using the ring network, wherein the reference clock signal is obtained based on the local clock signal of the primary controller, and the method includes: further comprising dividing a general data processing task into a plurality of data processing tasks, and determining, based on a load of the primary controller and a load of the at least one secondary controller, a data processing task that needs to be executed by the primary controller and a data processing task that needs to be executed by the at least one secondary controller; Clock synchronization method.

12. A clock synchronization method applied to a control system, the control system including a ring network, the ring network including a primary controller and at least one node device, the at least one node device being at least one secondary controller, the method comprising: The method includes a step of: performing time adjustment and executing tasks by the primary controller based on a frequency of a local clock signal of the primary controller; and transmitting a reference clock signal to the at least one node device using the ring network, wherein the reference clock signal is obtained based on the local clock signal of the primary controller; maintaining, by the at least one secondary controller, a priority list, the priority list including a priority of the at least one secondary controller; determining, by the at least one secondary controller, a new primary controller from the at least one secondary controller based on the priority list, if it is determined that the primary controller is faulty or any signal cable connected to the primary controller is faulty; The clock synchronization method further includes:

13. A clock synchronization method applied to a control system, the control system including a ring network, the ring network including a primary controller and at least one node device, the at least one node device being at least one secondary controller, the method comprising: The method includes a step of: performing time adjustment and executing tasks by the primary controller based on a frequency of a local clock signal of the primary controller; and transmitting a reference clock signal to the at least one node device using the ring network, wherein the reference clock signal is obtained based on the local clock signal of the primary controller; transmitting, by the primary controller and the at least one secondary controller, target data to other controllers in the control system using the ring network; performing, by the primary controller and the at least one secondary controller, fault detection on the ring network and / or retransmitting the target data if the target data transmitted over the ring network is not received or if the received target data transmitted over the ring network does not match the transmitted target data; The clock synchronization method further includes:

Citation Information

Patent Citations

  • Dynamically configurable high-precision and high-reliability clock network

    CN110865962A

  • Data communication system

    JP2002077196A

  • Distributed computing environment with real-time scheduling logic and time-deterministic architecture

    JP2002517035A

  • Dual loop PLL and multiplication clock generation apparatus

    JP2006191372A

  • Node device, and clock switching method

    JP2008118680A