Controller fault take-over system and method

文档序号:85095 发布日期:2021-10-08 浏览:61次 中文

阅读说明:本技术 控制器故障接替系统及方法 (Controller fault take-over system and method ) 是由 田学明 张晓谦 李岩 孟祥泰 田娇 孙荫权 于 2021-07-22 设计创作,主要内容包括:本发明实施例公开了一种控制器故障接替系统及方法,包括第一通信总线、第二通信总线、车辆通信网络、主控制器和至少一个副控制器,副控制器通过第一通信总线接收主控制器书传输的控制器运行数据,并通过第二通信总线接收车辆通信网络传输的外部控制器数据,实现了主控制器与副控制器之间的数据共享,使得主控制器与副控制器之间时刻保持数据同步,进而在主控制器检测出发生预设切换故障时,由于主控制器与副控制器的数据同步,可以立即切换副控制器代替主控制器通过第二通信总线向车辆通信网络传输控制器运行数据,实现了主控制器宕机时副控制器的接替,保证了控制器的稳定性,避免在车辆的使用场景下因控制器宕机而导致的车辆功能异常。(The embodiment of the invention discloses a controller fault replacing system and a method, which comprises a first communication bus, a second communication bus, a vehicle communication network, a main controller and at least one auxiliary controller, wherein the auxiliary controller receives controller operation data transmitted by the main controller through the first communication bus and receives external controller data transmitted by the vehicle communication network through the second communication bus, so that data sharing between the main controller and the auxiliary controller is realized, data synchronization is kept between the main controller and the auxiliary controller at any time, and further when the main controller detects that a preset switching fault occurs, the auxiliary controller can be switched immediately to replace the main controller to transmit controller operation data to the vehicle communication network through the second communication bus, so that the auxiliary controller can be replaced when the main controller is down, the stability of the controller is guaranteed, and abnormal vehicle functions caused by the breakdown of the controller in a vehicle use scene are avoided.)

1. A controller failure take-over system is characterized by comprising a first communication bus, a second communication bus, a vehicle communication network, a main controller and at least one auxiliary controller; wherein the content of the first and second substances,

the main controller is in communication connection with the sub-controller through the first communication bus, is in communication connection with the vehicle communication network through the second communication bus, and is used for sending controller operation data to the vehicle communication network and sending a switching trigger signal to the sub-controller based on the first communication bus if the main controller is detected to have a fault and the fault is a preset switching fault;

and the sub-controller is in communication connection with the vehicle communication network through the second communication bus and is used for replacing the main controller to send controller operation data to the vehicle communication network through the second communication bus when receiving the switching trigger signal based on the received controller operation data sent by the main controller through the first communication bus and the received external controller data transmitted by the vehicle communication network through the second communication bus.

2. The system of claim 1, wherein the primary controller and at least one of the secondary controllers are integrated into a dual controller.

3. The system of claim 2, wherein the dual controller is specifically configured to determine the operation type of the dual controller as a primary controller or a secondary controller according to the position of a dial switch of the dual controller.

4. The system of claim 1, wherein the secondary controller is further configured to switch a communication protocol stack on the first communication bus to a protocol stack corresponding to the secondary controller, so as to receive the controller operation data sent by the primary controller based on the first communication bus.

5. The system according to claim 4, wherein the controller failover system further comprises a protocol stack configuration module, and the protocol stack configuration module is configured to provide the communication protocol stacks corresponding to the primary controller and the secondary controller.

6. The system according to claim 5, wherein the protocol stack configuration module is specifically configured to configure corresponding communication protocol stacks for the primary controller and the secondary controller based on a same input file.

7. The system of claim 1, wherein the secondary controller is further configured to send controller operational data to the primary controller via the first communication bus upon receiving a fault trigger signal.

8. The system according to claim 7, wherein the main controller is further configured to, when sending the switching trigger signal to the secondary controller, switch the communication protocol stack on the first communication bus to the protocol stack corresponding to the secondary controller if the communication protocol stack on the first communication bus is switched to the protocol stack corresponding to the secondary controller, so as to receive the controller operation data sent by the secondary controller based on the first communication bus.

9. The system of claim 1, wherein the primary controller and the secondary controller are an engine controller, a motor controller, a battery controller, or a vehicle control unit.

10. A method of controller failover, comprising:

the method comprises the steps that a main controller sends controller operation data to a vehicle communication network based on a second communication bus, and if the main controller is detected to have a fault and the fault is a preset switching fault, a switching trigger signal is sent to a sub-controller based on a first communication bus;

and when receiving the switching trigger signal, the sub-controller replaces the main controller to send controller operation data to the vehicle communication network through the second communication bus based on the received controller operation data sent by the main controller through the first communication bus and the received external controller data transmitted by the vehicle communication network through the second communication bus.

Technical Field

The embodiment of the invention relates to the technical field of vehicle controllers, in particular to a controller fault replacing system and method.

Background

At present, people pay more and more attention to the safety of vehicles, and especially under some important scenes, important vehicle components such as an engine, a motor or a battery and the like must be ensured to normally operate. If a controller for controlling components such as an engine, a motor or a battery has a major fault, the components cannot normally operate, and further unpredictable loss is brought to a user. Therefore, the stability of the vehicle controller is of great importance.

Disclosure of Invention

The embodiment of the invention provides a controller fault relay system and a controller fault relay method, which are used for improving the stability of a vehicle controller.

In a first aspect, an embodiment of the present invention provides a controller failure successor system, including a first communication bus, a second communication bus, a vehicle communication network, a master controller, and at least one slave controller; wherein the content of the first and second substances,

the main controller is in communication connection with the sub-controller through the first communication bus, is in communication connection with the vehicle communication network through the second communication bus, and is used for sending controller operation data to the vehicle communication network and sending a switching trigger signal to the sub-controller based on the first communication bus if the main controller is detected to have a fault and the fault is a preset switching fault;

and the sub-controller is in communication connection with the vehicle communication network through the second communication bus and is used for replacing the main controller to send controller operation data to the vehicle communication network through the second communication bus when receiving the switching trigger signal based on the received controller operation data sent by the main controller through the first communication bus and the received external controller data transmitted by the vehicle communication network through the second communication bus.

Optionally, the main controller and at least one of the sub-controllers are integrated in a dual controller.

Optionally, the dual controller is specifically configured to determine that the working type of the dual controller is a primary controller or a secondary controller according to the position of the dial switch of the dual controller.

Optionally, the sub-controller is further configured to switch a communication protocol stack on the first communication bus to a protocol stack corresponding to the sub-controller, so as to receive, based on the first communication bus, controller operation data sent by the main controller.

Optionally, the controller failure successor system further includes a protocol stack configuration module, where the protocol stack configuration module is used for providing a communication protocol stack corresponding to the primary controller and the secondary controller.

Optionally, the protocol stack configuration module is specifically configured to configure corresponding communication protocol stacks for the primary controller and the secondary controller based on the same input file.

Optionally, the sub-controller is further configured to send controller operation data to the main controller through the first communication bus after receiving the fault trigger signal.

Optionally, when the switching trigger signal is sent to the sub-controller, if the communication protocol stack on the first communication bus is switched to the protocol stack corresponding to the sub-controller, the main controller is further configured to switch the communication protocol stack on the first communication bus to the protocol stack corresponding to the main controller, so as to receive, based on the first communication bus, the controller operation data sent by the sub-controller.

Optionally, the primary controller and the secondary controller are an engine controller, a motor controller, a battery controller or a vehicle control unit.

In a second aspect, an embodiment of the present invention further provides a controller failure successor method, including:

the method comprises the steps that a main controller sends controller operation data to a vehicle communication network based on a second communication bus, and if the main controller is detected to have a fault and the fault is a preset switching fault, a switching trigger signal is sent to a sub-controller based on a first communication bus;

and when receiving the switching trigger signal, the sub-controller replaces the main controller to send controller operation data to the vehicle communication network through the second communication bus based on the received controller operation data sent by the main controller through the first communication bus and the received external controller data transmitted by the vehicle communication network through the second communication bus.

The embodiment of the invention has the following advantages or beneficial effects:

the controller fault replacing system provided by the embodiment of the invention comprises a first communication bus, a second communication bus, a vehicle communication network, a main controller and at least one sub-controller, wherein the sub-controller receives controller operation data transmitted by the main controller through the first communication bus and receives external controller data transmitted by the vehicle communication network through the second communication bus, so that data sharing between the main controller and the sub-controller is realized, data synchronization is kept between the main controller and the sub-controller at any time, and further when the main controller detects that a preset switching fault occurs, the sub-controller can be switched immediately to replace the main controller to transmit controller operation data to the vehicle communication network through the second communication bus due to the data synchronization of the main controller and the sub-controller, the replacement of the sub-controller when the main controller crashes is realized, and the stability of the controller is ensured, the abnormal function of the vehicle caused by the breakdown of the controller in the use scene of the vehicle is avoided, and the safety of the vehicle and the user experience are improved. In addition, because the data generated and received by the main controller are synchronized to the sub-controller all the time, the sub-controller can be quickly replaced when the main controller fails, the replacing speed of the sub-controller is improved, and the abnormal time of the vehicle caused by the breakdown of the controller is reduced.

Drawings

In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.

Fig. 1 is a schematic structural diagram of a controller failure successor system according to an embodiment of the present invention;

fig. 2 is a schematic flowchart of a controller failure replacing method according to a third embodiment of the present invention;

fig. 3 is a flowchart illustrating another controller failure successor method according to a third embodiment of the present invention.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.

Example one

Fig. 1 is a schematic structural diagram of a controller failure successor system according to an embodiment of the present invention. As shown in fig. 1, the controller failure successor system provided by the present embodiment includes a first communication bus 11, a second communication bus 12, a vehicle communication network 13, a main controller 14, and at least one sub-controller 15; the main controller 14 is in communication connection with the sub-controller 15 through a first communication bus 11, is in communication connection with the vehicle communication network 13 through a second communication bus 12, and is used for sending controller operation data to the vehicle communication network 13 and sending a switching trigger signal to the sub-controller 15 based on the first communication bus 11 if the main controller 14 is detected to have a fault and the fault is a preset switching fault; and the sub-controller 15 is in communication connection with the vehicle communication network 13 through the second communication bus 12 and is used for sending the controller operation data to the vehicle communication network 13 through the second communication bus 12 instead of the main controller 14 based on the received controller operation data sent by the main controller 14 through the first communication bus 11 and the received external controller data transmitted by the vehicle communication network 13 through the second communication bus 12 when the switching trigger signal is received.

As shown in fig. 1, the main controller 14 and the sub-controller 15 are communicatively connected by a first communication bus 11, the main controller 14 and the vehicle communication network 13 are communicatively connected by a second communication bus 12, and the sub-controller 15 and the vehicle communication network 13 are communicatively connected by the second communication bus 12.

In this embodiment, the controller types of the main controller 14 and the at least one sub-controller 15 are the same, and thus, when the main controller 14 fails, the sub-controller 15 may operate to control the corresponding components of the vehicle instead of the main controller 14. Of course, the main controller 14 and the sub-controller 15 may be controllers having the same configuration.

Optionally, the primary controller 14 and the secondary controller 15 are an engine controller, a motor controller, a battery controller or a vehicle controller. Of course, the main controller 14 and the sub-controller 15 may be other types of controllers, such as an airbag controller, a seat adjustment controller, a transmission controller, etc., which are not limited in this application, but the main controller 14 and the sub-controller 15 need to be the same type of controller, and illustratively, the main controller 14 and the sub-controller 15 are identical engine controllers, and the main controller 14 and at least one sub-controller 15 may be integrated into a dual controller.

In one embodiment, the primary controller 14 and the secondary controller 15 are identical controllers, and each controller needs to determine the operation type as the primary controller or the secondary controller before starting the operation. For example, each controller may be configured with a dial switch, and each controller determines the operation type of the controller as a primary controller or a secondary controller based on the position of the dial switch; or the storage space of each controller is written with a work type identifier configured by a user, and each controller determines that the work type is a main controller or a sub-controller based on the work type identifier. For example, the controller fault relay system comprises a controller A and a controller B, and the controller A and the controller B can be determined to be a main controller or a secondary controller according to the position of the dial switch or the working type identifier.

In another embodiment, the primary controller 14 and the at least one secondary controller 15 may be integrated into a dual controller, which is specifically configured to determine the operation type of the dual controller as either the primary controller or the secondary controller based on the toggle position of the dual controller. That is, the dual controller includes a main controller 14 and at least one sub-controller 15, and a dial switch is configured in the dual controller, and according to the position of the dial switch, the operation type of each controller in the dual controller can be determined to be the main controller or the sub-controller.

In the present embodiment, the number of the sub controllers 15 is not limited, and the number of the sub controllers 15 may be one or more. If the number of the sub-controllers 15 is one, when the main controller 14 detects that a preset switching failure occurs, a switching trigger signal is sent to the sub-controller 15; if the number of sub-controllers 15 is plural, the main controller 14 transmits a switching trigger signal to one of the sub-controllers 15 when detecting that a preset switching failure has occurred. Preferably, the controller failure take-over system includes a first communication bus, a second communication bus, a vehicle communication network, a main controller and a sub-controller, in consideration that the number of controllers affects the weight of the vehicle; that is, the number of sub-controllers in the system may be 1.

In the present embodiment, the first communication bus 11 and the second communication bus 12 may be CAN (controller area Network) buses. The vehicle communication network 13 may be a CAN bus or an ethernet, and may acquire operation data of an external controller, or may transmit data to an external controller, for example, if the main controller 14 and the sub-controller 15 are engine controllers, the vehicle communication network 13 may perform data interaction with other controllers except the engine controller, such as a motor controller, a battery controller, a vehicle control unit, an airbag controller, a seat adjustment controller, and a transmission controller.

When the main controller 14 of the present embodiment operates, the sub-controller 15 receives only data and does not transmit data to the outside. Specifically, when the main controller 14 operates, the operation data of the main controller can be sent to the sub controller 15 through the first communication bus 11, so that the data of the sub controller 15 and the main controller 14 are kept synchronous; the master controller 14 can also transmit the operation data of the master controller to the vehicle communication network 13 through the second communication bus 12, and receive the data transmitted to other controllers, i.e., external controller data, by the vehicle communication network 13 based on the second communication bus 12, so as to realize the data interaction with the rest of the controllers when the master controller 14 works. Meanwhile, the sub-controller 15 may receive the controller operation data transmitted from the main controller 14 based on the first communication bus 11 and the external controller data transmitted from the vehicle communication bus based on the second communication bus 12 to maintain the state, data synchronization with the main controller 14.

In other words, when the main controller 14 of the present embodiment operates, the main controller 14 has a function of receiving data and transmitting data, and the sub-controller 15 has only a function of receiving data.

Optionally, the sub-controller 15 is further configured to switch a communication protocol stack on the first communication bus 11 to a protocol stack corresponding to the sub-controller 15, so as to receive the controller operation data sent by the main controller 14 based on the first communication bus 11.

The master controller 14 and the slave controller 15 have corresponding protocol stacks, and if the communication protocol stack on the first communication bus 11 is the protocol stack corresponding to the slave controller 15, the message sent by the master controller 14 on the first communication bus 11 is used as the received message of the slave controller 15 on the first communication bus 11, and if the communication protocol stack on the first communication bus 11 is the protocol stack corresponding to the master controller 14, the message sent by the slave controller 15 on the first communication bus 11 is used as the received message of the master controller 14 on the first communication bus 11.

Therefore, when the sub-controller 15 needs to receive the controller operation data sent by the main controller 14 based on the first communication bus 11, the sub-controller 15 may control to switch the communication protocol stack on the first communication bus 11 to the protocol stack corresponding to the sub-controller 15 so as to receive the message sent by the main controller 14 on the first communication bus 11.

Optionally, the controller failure successor system further includes a protocol stack configuration module, where the protocol stack configuration module is configured to configure corresponding communication protocol stacks for the primary controller 14 and the secondary controller 15. That is, the protocol stack configuration module may configure the communication protocol stacks for the main controller 14 and the sub-controller 15, respectively.

Illustratively, the process of configuring the communication protocol stack by the protocol stack configuration module is as follows: the method comprises the steps of obtaining an input file imported by a user, configuring a protocol station project based on the input file, generating codes, transplanting the codes into a development project, compiling the codes into an executable file, burning the executable file into a controller, and executing the executable file to obtain a communication protocol stack.

Considering that the communication protocol stacks of the main controller 14 and the sub-controller 15 are different in channel number, reception interrupt, and the like, the channel number of the communication protocol stack may be modified to correspond to the first communication bus 11, and it may be realized to generate the communication protocol stacks of the main controller 14 and the sub-controller 15, respectively, based on the same input file. That is, in one embodiment, the protocol stack configuration module is specifically configured to configure corresponding communication protocol stacks for the primary controller 14 and the secondary controller 15 based on the same input file.

In the optional embodiment, the communication protocol stacks corresponding to the main controller 14 and the sub-controller 15 are respectively generated by the same input file, so that software sharing of the main controller 14 and the sub-controller 15 is realized, the workload of software writing and maintenance of the main controller 14 and the sub-controller 15 is reduced, and further the development cost of the fault relay system of the controller is reduced.

In this embodiment, the main controller 14 may detect a failure of itself, and when it is detected that the main controller has failed and the failure is a predetermined switching failure, may transmit a switching trigger signal to the sub-controller 15 based on the first communication bus 11 to start the operation of the sub-controller 15. The preset switching fault may be a preset fault of the controller that needs to be switched to operate, for example, the controller cannot operate, or the controller cannot receive data, and the like.

The sub-controller 15, upon receiving the switching trigger signal, operates in place of the main controller based on the controller operation data that has been received and sent by the main controller 14 through the first communication bus 11, and the external controller data that has been received and transmitted by the vehicle communication network 13 through the second communication bus 12. The sub-controller 15 may transmit the controller operation data to the vehicle communication network 13 through the second communication bus 12 instead of the main controller 14 after the start-up operation. At this time, of course, the main controller 14 is in the non-operating state, the sub-controller 15 is in the operating state, and the controller operation data transmitted by the sub-controller 15 is the operation data of the sub-controller.

In other words, when the main controller 14 has a default switching failure, the sub-controller 15 at this time has functions of transmitting data and receiving data. For example, the sub-controller 15 may turn on a function of transmitting data on the second communication bus upon receiving the switching trigger signal, so that the sub-controller 15 may transmit data to the vehicle communication network 13 based on the second communication bus 12.

If the number of sub-controllers 15 is plural, each sub-controller 15 may be configured to transmit controller operation data to a sub-controller other than the sub-controller 15 based on the first communication bus 11, detect a failure, and transmit a switching trigger signal to the sub-controller other than the sub-controller based on the first communication bus when the sub-controller failure is detected and the failure is a predetermined switching failure, so that the sub-controller transmits controller operation data to the vehicle communication network 13 instead of the sub-controller via the second communication bus based on the received controller operation data and external controller data after receiving the switching trigger signal, that is, when the sub-controller instead of the main controller has the predetermined switching failure, the sub-controller other than the main controller operates instead of the sub-controller.

The controller failure replacing system provided by the embodiment comprises a first communication bus, a second communication bus, a vehicle communication network, a main controller and at least one auxiliary controller, wherein the auxiliary controller receives controller operation data transmitted by the main controller through the first communication bus and receives external controller data transmitted by the vehicle communication network through the second communication bus, so that data sharing between the main controller and the auxiliary controller is realized, data synchronization is kept between the main controller and the auxiliary controller at any time, and further when the main controller detects that a preset switching failure occurs, due to the data synchronization between the main controller and the auxiliary controller, the auxiliary controller can be switched immediately to replace the main controller to transmit the controller operation data to the vehicle communication network through the second communication bus, the replacement of the auxiliary controller when the main controller is down is realized, and the stability of the controller is ensured, the abnormal function of the vehicle caused by the breakdown of the controller in the use scene of the vehicle is avoided, and the safety of the vehicle and the user experience are improved. In addition, because the data generated and received by the main controller are synchronized to the sub-controller all the time, the sub-controller can be quickly replaced when the main controller fails, the replacing speed of the sub-controller is improved, and the abnormal time of the vehicle caused by the breakdown of the controller is reduced.

Example two

In this embodiment, on the basis of the foregoing embodiments, optionally, the sub controller is further configured to send the controller operation data to the main controller through the first communication bus after receiving the failure trigger signal.

In this embodiment, after the sub-controller operates in place of the main controller, the sub-controller can transmit not only the controller operation data to the vehicle communication network but also the controller operation data to the main controller.

The benefit of sending controller operational data to the master controller is: the backup of the operation data of the sub-controller can be realized, and further, when the sub-controller has major faults, the diagnosis and analysis of the sub-controller can be carried out based on the data backed up in the main controller; or, the data synchronization of the main controller and the sub-controller can be realized, and after the main controller performs fault repair, if the sub-controller fails, the sub-controller can be replaced by the synchronized data in the main controller to work.

For example, the main controller may transmit the controller operation data to the vehicle communication network through the second communication bus instead of the sub-controller based on the controller operation data transmitted by the sub-controller through the first communication bus and the external controller data transmitted by the vehicle communication network through the second communication bus.

Optionally, when the switching trigger signal is sent to the sub-controller, if the communication protocol stack on the first communication bus is switched to the protocol stack corresponding to the sub-controller, the main controller is further configured to switch the communication protocol stack on the first communication bus to the protocol stack corresponding to the main controller, so as to receive the controller operation data sent by the sub-controller based on the first communication bus.

If the main controller fails and the failure is a preset switching failure, the main controller can switch the communication protocol stack to the protocol stack corresponding to the main controller by switching the communication protocol stack on the first communication bus while switching to the sub-controller to replace the main controller to work, so that the sending message of the sub-controller on the first communication bus is the receiving message of the main controller on the first communication bus, namely, the controller operation data sent by the sub-controller is received.

According to the technical scheme of the embodiment, when the sub-controller works in place of the main controller, the sub-controller can also send controller operation data to the main controller based on the first communication bus, so that backup of the operation data of the sub-controller is realized, and further, when major faults occur to the sub-controller, diagnosis and analysis of the sub-controller can be performed based on the data backed up in the main controller; and moreover, the data synchronization of the main controller and the auxiliary controller is realized, and after the main controller is subjected to fault repair, if the auxiliary controller is also in fault, the auxiliary controller can be replaced by the synchronous data in the main controller to work, so that the stability of the controller is further improved, and the abnormal vehicle functions caused by the breakdown of the controller are avoided.

EXAMPLE III

Fig. 2 is a schematic flow chart of a controller failure successor method according to a third embodiment of the present invention, where this embodiment is applicable to a case where a sub-controller is adopted to succeed a main controller when a main controller fails, and the method can be executed by a controller failure successor system, where the system can be implemented by hardware and/or software, and the method specifically includes the following steps:

s210, the main controller sends controller operation data to a vehicle communication network based on a second communication bus, and if the main controller is detected to have a fault and the fault is a preset switching fault, a switching trigger signal is sent to the sub-controller based on the first communication bus.

And S220, when receiving the switching trigger signal, the sub-controller replaces the main controller to send controller operation data to the vehicle communication network through the second communication bus based on the received controller operation data sent by the main controller through the first communication bus and the received external controller data transmitted by the vehicle communication network through the second communication bus.

Optionally, the main controller and at least one of the sub-controllers are integrated in a dual controller.

Optionally, the dual controller is specifically configured to determine that the working type of the dual controller is a primary controller or a secondary controller according to the position of the dial switch of the dual controller.

Optionally, the receiving the controller operation data sent by the master controller through the first communication bus includes:

and switching a communication protocol stack on the first communication bus into a protocol stack corresponding to the secondary controller so as to receive controller operation data sent by the main controller based on the first communication bus.

Optionally, the controller failure successor method further includes:

and configuring communication protocol stacks corresponding to the main controller and the auxiliary controller based on a protocol stack configuration module.

Optionally, the protocol stack configuration module is a communication protocol stack corresponding to the primary controller and the secondary controller, and includes:

and configuring corresponding communication protocol stacks for the main controller and the auxiliary controller based on the same input file through a protocol stack configuration module.

Optionally, the controller failure successor method further includes:

and after the sub controller receives the fault trigger signal, the sub controller sends controller operation data to the main controller through the first communication bus.

Optionally, the controller failure successor method further includes:

when the main controller sends a switching trigger signal to the sub-controller, if the communication protocol stack on the first communication bus is switched to the protocol stack corresponding to the sub-controller, the main controller switches the communication protocol stack on the first communication bus to the protocol stack corresponding to the main controller, so as to receive controller operation data sent by the sub-controller based on the first communication bus.

Optionally, the primary controller and the secondary controller are an engine controller, a motor controller, a battery controller or a vehicle control unit.

In the technical scheme of the embodiment, the sub-controller receives the controller operation data transmitted by the main controller through the first communication bus, and receives the data of the external controller transmitted by the vehicle communication network through the second communication bus, realizes the data sharing between the main controller and the sub-controller, so that the data synchronization is kept between the main controller and the sub-controller, and when the main controller detects the occurrence of the preset switching fault, because the data of the main controller and the auxiliary controller are synchronous, the auxiliary controller can be switched immediately to replace the main controller to transmit the controller operation data to the vehicle communication network through the second communication bus, the auxiliary controller is taken over when the main controller is down, the stability of the controller is ensured, the abnormal vehicle function caused by the down of the controller in the use scene of the vehicle is avoided, and the vehicle safety and the user experience are improved. In addition, because the data generated and received by the main controller are synchronized to the sub-controller all the time, the sub-controller can be quickly replaced when the main controller fails, the replacing speed of the sub-controller is improved, and the abnormal time of the vehicle caused by the breakdown of the controller is reduced.

It should be noted that the present embodiment also provides another controller failure successor method, as shown in fig. 3. With reference to the flowchart of the controller failure successor method shown in fig. 3, the method includes the following steps:

step 1, hardware dial switches of two controllers (a controller A and a controller B) installed on a vehicle are dialed to different positions in advance; to distinguish between the primary and secondary controllers of the two controllers.

And 2, electrifying the vehicle, initializing a controller program, and detecting the position of the dial switch.

And 3, judging whether the controller A is a main controller or not according to the position of the dial switch, if so, executing the step 4, and if not, executing the step 7.

And 4, if so, operating a main controller program by the controller A according to default settings, interacting the controller A with the vehicle communication network through the second communication bus, and transmitting information to be shared to the controller B through the first communication bus.

And 5, switching the communication protocol stack on the first communication bus to the communication protocol stack corresponding to the controller B by the controller B, receiving the message sent by the controller A on the first communication bus, and receiving the message on the second communication bus without sending the message.

Step 4 and step 5 may also be executed simultaneously, which is not limited in this application.

And 6, if the controller A detects whether the controller A has a preset serious fault, the controller B takes over the work of the controller A, and the controller B sends and receives messages on the second communication bus.

And 7, operating a main controller program by the controller B according to default settings, interacting the controller B with the vehicle communication network through the second communication bus, and transmitting information to be shared to the controller A through the first communication bus.

And 8, switching the communication protocol stack on the first communication bus to the communication protocol stack corresponding to the controller A by the controller A, receiving the message sent by the controller B on the first communication bus, and receiving the message on the second communication bus without sending the message.

Step 7 and step 8 may also be performed simultaneously, which is not limited in this application.

And 9, if the controller B detects whether the controller B has a preset serious fault, controlling the controller A to take over the controller B to work, and sending and receiving messages on the second communication bus by the controller A.

In the embodiment, the main controller and the sub-controller are determined by determining the working types of the two controllers, when the main controller works, the main controller sends messages to the sub-controller and sends and receives messages on a second communication bus interacting with a vehicle communication network, when a preset serious fault occurs in the main controller, the main controller is switched to the sub-controller to work, and the sub-controller always receives the messages sent by the main controller and the messages sent by the vehicle communication network, the data in the sub-controller and the data in the main controller are kept synchronous, the sub-controller can quickly take over the main controller to work, the stability of the controllers is guaranteed, meanwhile, the replacing speed of the sub-controller is improved, and the abnormal time of the vehicle caused by the crash of the controllers is reduced.

It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:PID控制器参数整定方法、装置、设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!