CN114115177A - Multi-controller system and encoding method thereof - Google Patents

Multi-controller system and encoding method thereof Download PDF

Info

Publication number
CN114115177A
CN114115177A CN202111322424.6A CN202111322424A CN114115177A CN 114115177 A CN114115177 A CN 114115177A CN 202111322424 A CN202111322424 A CN 202111322424A CN 114115177 A CN114115177 A CN 114115177A
Authority
CN
China
Prior art keywords
controller
signal
encoding
slave
slave controller
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111322424.6A
Other languages
Chinese (zh)
Inventor
***
汤殷霞
颜靖力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
United Automotive Electronic Systems Co Ltd
Original Assignee
United Automotive Electronic Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by United Automotive Electronic Systems Co Ltd filed Critical United Automotive Electronic Systems Co Ltd
Priority to CN202111322424.6A priority Critical patent/CN114115177A/en
Publication of CN114115177A publication Critical patent/CN114115177A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0208Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system
    • G05B23/0213Modular or universal configuration of the monitoring system, e.g. monitoring system having modules that may be combined to build monitoring program; monitoring system that can be applied to legacy systems; adaptable monitoring system; using different communication protocols

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a multi-controller system and an encoding method thereof, wherein a main controller and a 1 st slave controller, the main controller and an m-th slave controller and two adjacent slave controllers are connected through encoding lines. During coding, a 1 st coding signal can be sent to a 1 st slave controller through the master controller, the 1 st slave controller codes after receiving the 1 st coding signal, and sends a 2 nd coding signal to a 2 nd slave controller; and sequentially executing until the last slave controller completes coding, sending a coding signal to the master controller by the last slave controller, and completing coding after the master controller receives the coding signal. The invention does not need to encode the slave controller in advance, reduces the difficulty of the slave controller in production, transportation, after sale and management, does not need to worry about confusion of the slave controller in transportation and installation, carries out an encoding step every time the system is electrified, and has better robustness.

Description

Multi-controller system and encoding method thereof
Technical Field
The invention relates to the technical field of multi-controller communication, in particular to a multi-controller system and an encoding method thereof.
Background
In a multi-controller System such as a Battery Management System (BMS), it is common to have a master controller and a plurality of slave controllers, with the master controller and two slave controllers communicating with each other through a CAN. Because the hardware of the slave controllers is the same, in order to ensure normal operation of the CAN communication, the codes of the slave controllers need to be recognized before the system operates, so that a correct CAN ID CAN be generated for CAN communication, and how to correctly code a plurality of slave controllers is the key for ensuring normal operation of the system. In addition, for slave configuration, it is also necessary to consider that in the aftermarket, the system will also operate properly if there is a situation where the slave is exchanged or replaced.
At present, because the hardware of the slave controllers is the same, the conventional method is to encode the software of the slave controllers in advance and write the software into the slave controllers, define different slave controllers, and identify the slave controllers with the same appearance through tags, and the scheme has the following problems: 1) the appearance of the slave controllers is the same, and only the software is different, so that the slave controllers are easy to be confused in transportation and installation, and the system cannot normally run; 2) in inventory management, slave controllers with the same appearance need to be identified and managed, so that the management difficulty is greatly increased, and the management cost is increased; 3) in the after-sale market, the slave controllers cannot be used with each other due to different software, so that the maintenance difficulty is increased, for example, after the slave controllers are installed, the slave controllers may be installed in wrong positions, and a large amount of manpower is consumed for identification and replacement.
Disclosure of Invention
The invention aims to provide a multi-controller system and a coding method thereof, which are used for solving the problem that the conventional coding method causes the slave controllers to have high difficulty in production, transportation, after sale and management.
In order to achieve the aim, the invention provides a multi-controller system which comprises a main controller and m sub-controllers, wherein the main controller is communicated with the sub-controllers through a CAN, the main controller is connected with the 1 st sub-controller, the main controller is connected with the mth sub-controller, and the jth sub-controller is connected with the j +1 th sub-controller through coding lines, the coding lines are used for sending/receiving coding signals, wherein m is more than or equal to 2, and j is more than or equal to 1 and less than or equal to m-1.
Optionally, the encoding line includes a hard wire or a communication line.
Optionally, the multi-controller system comprises a battery management system.
The invention also provides an encoding method of the multi-controller system, which comprises an encoding step, wherein the encoding step comprises the following steps:
the master controller sends a 1 st coded signal to the 1 st slave controller, and the 1 st slave controller codes the 1 st coded signal into n after receiving the 1 st coded signal1And sending a 2 nd coded signal to the 2 nd slave controller;
after the ith slave controller receives the ith coded signal sent by the (i-1) th slave controller, the ith coded signal is coded into niWhen i is less than or equal to m, the ith slave controller sends an i +1 th coding signal to the (i + 1) th slave controller, and when i is equal to m, the mth slave controller sends an m +1 th coding signal to the master controller; and the number of the first and second groups,
and when the main controller receives the (m + 1) th encoding signal within the first preset time, judging that the encoding is successful, otherwise, judging that the encoding is failed.
Optionally, when the slave controller does not receive the corresponding encoding signal within the corresponding second predetermined time, the slave controller sends a first fault signal to the master controller; and the number of the first and second groups,
and when the main controller receives the first fault signal and/or does not receive the mth code signal within the first preset time, judging that the coding fails.
Optionally, the encoding signals are PWM signals, and the duty ratio and/or frequency of each encoding signal is different; or the coded signals are pulse signals, and the pulse width and/or the number of pulses in a period of each coded signal are different.
Optionally, after the slave controller encodes, the encoding is stored in its memory.
Optionally, after determining that the coding fails, the master controller reads the memory of each slave controller, and when no coding or a coding with an error is stored in the memory of any slave controller, the coding step is executed again.
Optionally, the method further includes a code line detection step, where the code line detection step includes:
the master controller sends a 1 st detection signal to the 1 st slave controller, and the 1 st slave controller sends a 2 nd detection signal to the 2 nd slave controller after receiving the 1 st detection signal;
after the ith slave controller receives the ith detection signal sent by the (i-1) th slave controller, when i is less than m, the ith slave controller sends the (i + 1) th detection signal to the (i + 1) th slave controller, and when i is equal to m, the mth slave controller sends the (m + 1) th detection signal to the master controller;
and when the main controller receives the (m + 1) th detection signal within the third preset time, judging that the detection is successful, otherwise, judging that the detection is failed.
Optionally, when the slave controller does not receive the corresponding detection signal within the corresponding fourth predetermined time, the slave controller sends a second fault signal to the master controller; and the number of the first and second groups,
and when the main controller receives the second fault signal and/or does not receive the mth detection signal within the third preset time, judging that the detection fails.
Optionally, the code line detecting step further includes:
the method comprises the steps that a main controller reads a fault zone bit in a fault register of the main controller, and when the fault zone bit indicates that a coding line between the main controller and a 1 st slave controller is normal, the main controller sends a 1 st detection signal to the 1 st slave controller.
Optionally, the encoding line detecting step is performed before the encoding step and/or the encoding line detecting step is performed cyclically after the encoding step.
Optionally, the detection signal and the coding signal are both PWM signals, and the duty ratio or frequency of each detection signal and each coding signal is different; or, the detection signal and the coding signal are both pulse signals, and the pulse width or the number of pulses in a period of each detection signal and each coding signal is different.
In the multi-controller system and the coding method thereof provided by the invention, a main controller and a 1 st slave controller, a main controller and an m-th slave controller and two adjacent slave controllers are connected through coding lines. During coding, a 1 st coding signal can be sent to a 1 st slave controller through the master controller, the 1 st slave controller codes after receiving the 1 st coding signal, and sends a 2 nd coding signal to a 2 nd slave controller; and then, each slave controller receives the coding signal sent by the previous slave controller, codes the coding signal, sends the coding signal to the next slave controller after the coding is finished, and sends the coding signal to the master controller after the last slave controller finishes coding. The invention does not need to encode the slave controller in advance, reduces the difficulty of the slave controller in production, transportation, after sale and management, does not need to worry about confusion of the slave controller in transportation and installation, carries out an encoding step every time the system is electrified, and has better robustness.
Drawings
FIG. 1 is a schematic structural diagram of a multi-controller system according to an embodiment of the present invention;
FIG. 2 is a flowchart of the encoding steps of the encoding method of the multi-controller system according to the embodiment of the present invention
FIG. 3 is a flowchart illustrating the encoding steps of the encoding method of the multi-controller system according to an embodiment of the present invention;
FIGS. 4 a-4 c are diagrams of three signal twists during the encoding step of the multi-controller system according to the present invention;
FIG. 5 is a flowchart illustrating the code line detection step of the encoding method of the multi-controller system according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of a specific process of the code line detection step of the coding method of the multi-controller system according to the embodiment of the present invention;
FIGS. 7 a-7 c are diagrams of three signal twists of a multi-controller system in a code line detection step according to an embodiment of the present invention;
wherein the reference numerals are:
10-a main controller; 11. 12-a slave controller; EM1, EM2, EM 3-encoding line; CAN1, CAN2-CAN bus; s11-1 st encoded signal; s12-2 nd encoded signal; s13-3 rd encoded signal; s21-1 st detection signal; s22-2 nd detection signal; S23-No. 3 detection signal; p11, P12-first fault signal; p21, P22-second fault signal.
Detailed Description
The following describes in more detail embodiments of the present invention with reference to the schematic drawings. The advantages and features of the present invention will become more apparent from the following description. It is to be noted that the drawings are in a very simplified form and are not to precise scale, which is merely for the purpose of facilitating and distinctly claiming the embodiments of the present invention.
Fig. 1 is a schematic structural diagram of a multi-controller system according to this embodiment. As shown in FIG. 1, the multi-controller system comprises a master controller 10 and m slave controllers, wherein m is more than or equal to 2, and the master controller 10 and the slave controllers communicate through a CAN.
Further, the master controller 10 and the 1 st slave controller, the master controller 10 and the mth slave controller, and the jth slave controller and the j +1 th slave controller are connected by encoding lines, wherein j is greater than or equal to 1 and is less than or equal to m-1. That is, the master controller 10 and the 1 st slave controller and the master controller 10 and the mth slave controller are connected by an encoding line, and two adjacent slave controllers are also connected by an encoding line, and the encoding line can be used for transmitting/receiving an encoding signal to prepare for encoding.
Optionally, the encoding line may be a signal line capable of communicating, such as a hard line or a communication line, and is not limited herein.
In this embodiment, the multi-controller system is a battery management system, and m is 2, that is, the number of the slave controllers is two, and the two slave controllers are used to monitor the state of the electric core in the battery pack. For convenience of description, the two slave controllers are named a slave controller 11 and a slave controller 12.
It should be understood that the number of the slave controllers is not limited to two, but may be three, four or 5, etc., as long as m ≧ 2 is satisfied.
The master controller 10 and the slave controllers 11 and 12 are communicated through CAN, that is, the master controller 10 and the slave controllers 11 are connected through a CAN bus CAN1 to realize CAN communication; similarly, the master controller 10 is connected with the slave controller 12 through a CAN bus CAN2 to realize CAN communication.
It should be understood that the multi-controller system is not limited to the battery management system, and other multi-controller systems having a master controller 10 and at least two identical slave controllers in industrial applications, and the communication between the master controller 10 and the slave controllers is through CAN, are within the scope of the present invention.
Further, in this embodiment, the master controller 10 and the slave controller 11, the slave controller 11 and the slave controller 12, and the slave controller 12 and the master controller 1011 are connected by encoding lines. For convenience of description, an encoding line between the master controller 10 and the slave controller 11 is referred to as an encoding line EM1, an encoding line between the slave controller 11 and the slave controller 12 is referred to as an encoding line EM2, and an encoding line between the slave controller 12 and the master controller 10 is referred to as an encoding line EM 3.
Based on this, the embodiment also provides an encoding method of the multi-controller system. Fig. 2 is a flowchart of an encoding step of an encoding method of a multi-controller system provided in this embodiment, and as shown in fig. 2, the encoding step of the encoding method of the multi-controller system includes:
step S101: the master controller 10 sends a 1 st coded signal to the 1 st slave controller, and the 1 st slave controller receives the 1 st coded signal and then codes the coded signal into n1And sending a 2 nd coded signal to the 2 nd slave controller;
step S102: ith instituteThe slave controller receives the ith coded signal sent by the ith-1 slave controller and then codes the ith coded signal into niWhen i is less than or equal to m, the ith slave controller sends an i +1 th coded signal to the (i + 1) th slave controller, and when i is equal to m, the mth slave controller sends an m +1 th coded signal to the master controller 10; and the number of the first and second groups,
step S103: when the main controller 10 receives the (m + 1) th encoding signal within the first predetermined time, it determines that the encoding is successful, otherwise, it determines that the encoding is failed.
Specifically, fig. 3 is a schematic specific flowchart of an encoding step of the encoding method of the multi-controller system provided in this embodiment, and fig. 4a to 4c are three signal twist diagrams of the multi-controller system provided in this embodiment during the encoding step. Referring to fig. 3, 4a and 4b, step S101 is first executed, the master controller, the slave controller 11 and the slave controller 12 are powered on, and the master controller 10 sends the 1 st encoding signal S11 to the slave controller 11 through the encoding line EM 1. When the slave controller 11 receives the 1 st encoding signal S11 within the corresponding second predetermined time T21, the slave controller 11 encodes n1And will code n1Stored in the memory thereof, is prevented from being lost, and the slave controller 11 also sends the 2 nd encoding signal S12 to the slave controller 12 through the encoding line EM 2; when the slave controller 11 does not receive the 1 st encoding signal S11 within the corresponding second predetermined time T21, the slave controller 11 sends a first fault signal P11 to the master controller 10 through the CAN bus CAN 1. After receiving the first failure signal P11, the main controller 10 may determine that the encoding has failed.
It should be understood that there may be two cases where the slave 11 does not receive the 1 st coded signal S11, the first case is that the slave 11 does not receive the coded signal directly, and the second case is that the slave 11 receives an error signal, and both cases can be considered that the slave 11 does not receive the 1 st coded signal S11.
Next, as shown in fig. 3, 4b and 4c, step S102 is executed, and when the slave controller is started12 receives the 2 nd coded signal S12 within the corresponding second predetermined time T22, the slave controller 12 is coded as n2And will code n2Storing the data into the internal memory of the slave controller 12 to prevent loss, wherein the slave controller 12 sends the 3 rd encoding signal S13 to the master controller 10 through the encoding line EM3 because the slave controller 12 is the second slave controller, i ═ 2 ═ m; when the slave controller 12 does not receive the 2 nd encoding signal S12 within the corresponding second predetermined time T22, the slave controller 12 sends a first fault signal P12 to the master controller 10 through the CAN bus CAN 2. After receiving the first failure signal P12, the main controller 10 may determine that the encoding has failed.
It should be understood that there may be two situations where the slave controller 12 does not receive the 2 nd encoding signal S12, the first situation is that the slave controller 12 does not receive the signal directly, and the second situation is that the slave controller 12 receives an error signal, and both situations can be considered that the slave controller 12 does not receive the 2 nd encoding signal S12.
It should be understood that when m is>When 2, i is 2<m, when the 2 nd slave controller receives the 1 st coded signal sent by the 1 st slave controller and then codes the coded signal into n2And when a 3 rd coded signal … is further sent to the 3 rd slave controller until i is equal to m, the 1 st to the m th slave controllers are respectively coded as n1~nmAnd the mth slave controller sends the (m + 1) th coding signal to the master controller 10 after the coding is finished.
Referring to fig. 3, step S103 is executed to determine that encoding is successful when the main controller 10 receives the 3 rd encoding signal S13 within a first predetermined time T1; when the main controller 10 does not receive the 3 rd encoding signal S13 within the first predetermined time T1, it is determined that encoding has failed. Since each slave controller stores a code, the master controller 10 CAN generate a CAN ID for subsequent CAN communication through the code of the slave controller.
It should be understood that there may be two cases where the master controller 10 does not receive the 3 rd encoded signal S13, the first case is that the signal is not received directly, and the second case is that an error signal is received, and both cases can be considered that the master controller 10 does not receive the 3 rd encoded signal S13.
Further, since the master controller 10 may determine the coding failure even when receiving the first failure signal P11/the first failure signal P12, the master controller 10 does not need to wait for the first predetermined time T1 before determining the coding failure, which is equivalent to improving the efficiency of determining the coding failure.
It should be understood that even if the encoding is determined to fail, each slave controller may have encoding completed (for example, a failure occurs after the slave controller 12 has encoded), based on which, after the encoding is determined to fail, the master controller 10 reads the memory of each slave controller, and when the correct encoding is stored in the memories of all the slave controllers, the encoding is completed, and the encoding step does not need to be executed again; and when no code is stored in the memory of any slave controller or an error code is stored in the memory of any slave controller, the coding step is executed again, so that the waste of coding time is avoided.
In this embodiment, the code n from the controller 122Coding n that can be at the slave controller 111By 1, e.g. the code n from the controller 111E.g. NO.1, said code n from the controller 122No.2, but not limited thereto, the slave controllers are not limited to start from 1, and may start from any possible codes, and the code of each slave controller is not limited to increase by 1 on the basis of the code of the last slave controller, and may increase or decrease by any possible value as long as the code of each slave controller is ensured to be different.
Further, the encoding signal may be a PWM signal or a pulse signal. When the coded signals are PWM signals, the duty ratio and/or the frequency of each coded signal are different; when the coded signals are pulse signals, the pulse width and/or the number of pulses in a period of each coded signal are different. That is, each of the encoded signals is a different signal for ease of distinction.
Further, the first fault signal P11 and the first fault signal P12 may be PWM signals or pulse signals, and when the first fault signal P11 and the first fault signal P12 are PWM signals, the duty ratios and frequencies of the first fault signal P11 and the first fault signal P12 may be the same or different, but the duty ratios and/or frequencies of the first fault signal P11 and the first fault signal P12 and each of the code signals are different, so that the first fault signal P11 and the first fault signal P12 and each of the code signals are different signals for distinction.
Similarly, the first fault signal P11 and the first fault signal P12 may be pulse signals, and when the first fault signal P11 and the first fault signal P12 are pulse signals, the duty ratios and frequencies of the first fault signal P11 and the first fault signal P12 may be the same or different, but the pulse widths and/or the number of pulses in a period of the first fault signal P11 and the first fault signal P12 and each of the coded signals are different, so that the first fault signal P11 and the first fault signal P12 and each of the coded signals are different signals for distinguishing.
Due to the fact that the transmission/reception speed of the coded signals is high, the second preset time corresponding to each slave controller can be equal, namely the second preset time T21 is equal to the second preset time T22; however, in alternative embodiments, the second predetermined time may not be equal for each slave controller.
Further, since the master controller 10 and the 1 st slave controller, the master controller 10 and the mth slave controller, and the jth slave controller and the j +1 th slave controller are all connected by an encoding line, in this embodiment, the encoding method of the multi-controller system further includes an encoding line detecting step for detecting whether the encoding line has a fault.
Optionally, the encoding line detecting step may be performed before the encoding step, or may be performed cyclically after the encoding step, or may be performed both before the encoding step and after the encoding step, so as to improve the coverage rate of detecting the encoding line fault.
Fig. 5 is a flowchart of the encoding line detection step of the encoding method of the multi-controller system according to this embodiment. As shown in fig. 5, the code line detecting step includes:
step S201: the master controller 10 sends a 1 st detection signal to the 1 st slave controller, and the 1 st slave controller sends a 2 nd detection signal to the 2 nd slave controller after receiving the 1 st detection signal;
step S202: after the ith slave controller receives the ith detection signal sent by the (i-1) th slave controller, when i is less than m, the ith slave controller sends the (i + 1) th detection signal to the (i + 1) th slave controller, and when i is equal to m, the mth slave controller sends the (m + 1) th detection signal to the master controller 10;
step S203: when the main controller 10 receives the (m + 1) th detection signal within the third predetermined time, it determines that the detection is successful, otherwise it determines that the detection is failed.
Specifically, fig. 6 is a schematic flow chart of a specific process of the code line detection step of the coding method of the multi-controller system provided in this embodiment, and fig. 7a to 7c are three signal twist charts of the multi-controller system provided in this embodiment in the code line detection step. Referring to fig. 6, 7a and 7b, step S201 is first executed, the master controller, the slave controller 11 and the slave controller 12 are powered on, the master controller 10 reads a fault flag in its fault register to detect a fault of the encoding line EM1, and the fault flag may be used to indicate whether the encoding line EM1 is normal. When the encode line EM1 is normal, the master controller 10 sends the 1 st detect signal S21 to the slave controller 11 through the encode line EM 1. When the slave controller 11 receives the 1 st detection signal S21 within the corresponding fourth predetermined time T41, which may also characterize that the encoded line EM1 is normal, the slave controller 11 sends the 2 nd detection signal S22 to the slave controller 12 through the encoded line EM 2; when the slave controller 11 does not receive the 1 st detection signal S21 within the corresponding fourth predetermined time T41, the slave controller 11 sends a second fault signal P21 to the master controller 10 through the CAN bus CAN 1. When the master controller 10 receives the first fault signal P21, it can determine that the detection has failed and the encoding line EM1 has a fault.
It should be understood that there may be two cases where the slave 11 does not receive the 1 st detection signal S21, the first case is that the slave 11 does not receive the signal directly, and the second case is that the slave 11 receives an error signal, and both cases can be considered that the slave 11 does not receive the 1 st detection signal S21.
Next, as shown in fig. 6, 7b and 7c, step S202 is executed, when the slave controller 12 receives the 2 nd detection signal S22 within the corresponding fourth predetermined time T42, indicating that the encoding line EM2 is normal, since the slave controller 12 is the second slave controller, i ═ 2 ═ m, the slave controller 12 sends the 3 rd detection signal S23 to the master controller 10 through the encoding line EM 3; when the slave controller 12 does not receive the 2 nd detection signal S22 within the corresponding fourth predetermined time T42, the slave controller 12 sends a second fault signal P22 to the master controller 10 through the CAN bus CAN 2. When the master controller 10 receives the second fault signal P22, it can determine that the detection has failed and the encoding line EM2 has a fault.
It should be understood that there may be two situations where the slave controller 12 does not receive the 2 nd detection signal S22, the first situation is that the slave controller 12 does not receive the signal directly, and the second situation is that an error signal is received, and both situations can be considered that the slave controller 12 does not receive the 2 nd detection signal S22.
It should be understood that when m >2, i is 2< m, and after the 2 nd slave controller receives the 1 st detection signal sent by the 1 st slave controller, the 3 rd detection signal … is sent to the 3 rd slave controller until i is m, the m th slave controller sends the m +1 th detection signal to the master controller 10.
Referring to fig. 6, step S203 is executed, when the master controller 10 receives the 3 rd detection signal S23 within a third predetermined time T3, it is determined that the detection is successful, and the code line EM1, the code line EM2 and the code line EM3 are all normal; when the main controller 10 does not receive the 3 rd detection signal S23 within the third predetermined time T3, it is determined that the detection is failed, and the encode line EM3 has a fault.
It should be understood that there may be two cases where the master controller 10 does not receive the 3 rd detection signal S23, the first case is that no signal is directly received, and the second case is that an error signal is received, and both cases can be considered that the master controller 10 does not receive the 3 rd detection signal S23.
Further, since the master controller 10 may determine that the detection fails even when receiving the second fault signal P21/the second fault signal P22, the master controller 10 does not need to wait for the third predetermined time T3 and then determine, which is equivalent to improving the efficiency of determining that the detection fails.
Further, the detection signal may be a PWM signal or a pulse signal. When the detection signals are PWM signals, the duty ratio and/or the frequency of each detection signal are different; when the detection signals are pulse signals, the pulse width and/or the number of pulses in a period of each detection signal are different. That is, each of the detection signals is a different signal for easy discrimination.
Alternatively, the detection signal may be a PWM signal or a pulse signal. When the detection signals are PWM signals, the duty ratio and/or the frequency of each detection signal are different; when the detection signals are pulse signals, the pulse width and/or the number of pulses in a period of each detection signal are different. That is, each of the detection signals is a different signal for easy discrimination. And when the detection signal and the coding signal are both PWM signals or both pulse signals, the duty ratio and/or frequency of the detection signal and the coding signal are different or the pulse width and/or the number of pulses in a period of the detection signal and the coding signal are different, so that the detection signal and the coding signal are different signals, which is convenient for distinguishing.
Further, the second fault signal P21 and the second fault signal P22 may be PWM signals or pulse signals, and when the second fault signal P21 and the second fault signal P22 are PWM signals, the duty ratios and frequencies of the second fault signal P21 and the second fault signal P22 may be the same or different, but the duty ratios and/or frequencies of the second fault signal P21 and the second fault signal P22 and each of the detection signals are different, so that the second fault signal P21 and the second fault signal P22 and each of the detection signals are different signals for distinguishing.
It is understood that, since the first fault signal P11, the first fault signal P12, the second fault signal P21 and the second fault signal P22 are all signals for indicating faults, the first fault signal P11, the first fault signal P12, the second fault signal P21 and the second fault signal P22 may be the same signal, but should not be limited thereto.
Similarly, the second fault signal P21 and the second fault signal P22 may be pulse signals, and when the second fault signal P21 and the second fault signal P22 are pulse signals, the duty ratios and frequencies of the second fault signal P21 and the second fault signal P22 may be the same or different, but the pulse widths and/or the number of pulses in a cycle of the second fault signal P21 and the second fault signal P22 and each of the detection signals are different, so that the second fault signal P21 and the second fault signal P22 and each of the detection signals are different signals for convenience of distinction.
Since the transmission/reception speed of the detection signal is fast, the fourth predetermined time T41 corresponding to each slave controller may be equal to the second predetermined time T42; however, for alternative embodiments, the fourth predetermined time corresponding to each slave controller may not be equal.
It should be noted that, since the slave controller stores the code in its memory after the slave controller codes, the code in the memory of the slave controller is not lost even if the multi-controller system is powered down. And when the multi-controller system is powered on again, coding is carried out again, and the old coding is covered by the new coding in the memory.
Further, only when the codes are stored in the memory of the slave controller, CAN the CAN communication be carried out with the master controller. For example, in fig. 4a to 4b and fig. 7a to 7b, before the coding is successful, if the slave controller 11 or the slave controller 12 needs to send the first fault signal P11/the second fault signal P21 or the first fault signal P12/the second fault signal P22 to the master controller 10, it is necessary to ensure that the codes are stored in the memories of the slave controller 11 and the slave controller 12, that is, the multi-controller system cannot perform the coding for the first time, and at least one coding is required to be successful.
In summary, in the multi-controller system and the encoding method thereof provided by the embodiments of the present invention, the master controller and the 1 st slave controller, the master controller and the mth slave controller, and two adjacent slave controllers are connected by the encoding line. During coding, a 1 st coding signal can be sent to a 1 st slave controller through the master controller, the 1 st slave controller codes after receiving the 1 st coding signal, and sends a 2 nd coding signal to a 2 nd slave controller; and then, each slave controller receives the coding signal sent by the previous slave controller, codes the coding signal, sends the coding signal to the next slave controller after the coding is finished, and sends the coding signal to the master controller after the last slave controller finishes coding. The invention does not need to encode the slave controller in advance, reduces the difficulty of the slave controller in production, transportation, after sale and management, does not need to worry about confusion of the slave controller in transportation and installation, carries out an encoding step every time the system is electrified, and has better robustness.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
It should be noted that, although the present invention has been described with reference to the preferred embodiments, the above embodiments are not intended to limit the present invention. It will be apparent to those skilled in the art from this disclosure that many changes and modifications can be made, or equivalents modified, in the embodiments of the invention without departing from the scope of the invention. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention are still within the protection scope of the technical solution of the present invention, unless the content of the technical solution of the present invention is departed from.
It should be further understood that the terms "first," "second," "third," and the like in the description are used for distinguishing between various components, elements, steps, and the like, and are not intended to imply a logical or sequential relationship between various components, elements, steps, or the like, unless otherwise indicated or indicated.
It is also to be understood that the terminology used herein is for the purpose of describing particular embodiments only, and is not intended to limit the scope of the present invention. It must be noted that, as used herein and in the appended claims, the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. For example, reference to "a step" or "an apparatus" means a reference to one or more steps or apparatuses and may include sub-steps as well as sub-apparatuses. All conjunctions used should be understood in the broadest sense. And, the word "or" should be understood to have the definition of a logical "or" rather than the definition of a logical "exclusive or" unless the context clearly dictates otherwise. Further, implementation of the methods and/or apparatus of embodiments of the present invention may include performing the selected task manually, automatically, or in combination.
The above description is only a preferred embodiment of the present invention, and does not limit the present invention in any way. It will be understood by those skilled in the art that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (13)

1. A multi-controller system is characterized by comprising a master controller and m slave controllers, wherein the master controller is communicated with the slave controllers through a CAN, the master controller is connected with the 1 st slave controller, the master controller is connected with the mth slave controller, the jth slave controller is connected with the j +1 th slave controller through coding lines, the coding lines are used for sending/receiving coding signals, wherein m is more than or equal to 2, and j is more than or equal to 1 and less than or equal to m-1.
2. The multi-controller system of claim 1, wherein the encoding line comprises a hard-wired or communication line.
3. The multi-controller system according to claim 1 or 2, wherein the multi-controller system comprises a battery management system.
4. A coding method of a multi-controller system according to any one of claims 1-3, characterized in that it comprises a coding step comprising:
the master controller sends a 1 st coded signal to the 1 st slave controller, and the 1 st slave controller codes the 1 st coded signal into n after receiving the 1 st coded signal1And sending a 2 nd coded signal to the 2 nd slave controller;
the ith slave controller receives the (i-1) th slave controller transmissionIs then encoded as niWhen i is less than or equal to m, the ith slave controller sends an i +1 th coding signal to the (i + 1) th slave controller, and when i is equal to m, the mth slave controller sends an m +1 th coding signal to the master controller; and the number of the first and second groups,
and when the main controller receives the (m + 1) th encoding signal within the first preset time, judging that the encoding is successful, otherwise, judging that the encoding is failed.
5. The encoding method of a multi-controller system according to claim 4, wherein the slave controller transmits a first failure signal to the master controller when the slave controller does not receive the corresponding encoding signal for a corresponding second predetermined time; and the number of the first and second groups,
and when the main controller receives the first fault signal and/or does not receive the mth code signal within the first preset time, judging that the coding fails.
6. The encoding method of a multi-controller system according to claim 4, wherein the encoding signals are PWM signals, each of the encoding signals having a different duty ratio and/or frequency; or the coded signals are pulse signals, and the pulse width and/or the number of pulses in a period of each coded signal are different.
7. The encoding method of a multi-controller system according to claim 4, wherein after the slave controller encodes, the encoding is stored in a memory thereof.
8. The encoding method of a multi-controller system according to claim 7, wherein after determining that the encoding has failed, the master controller reads the memory of each slave controller, and when no encoding or an erroneous encoding is stored in the memory of any one of the slave controllers, the encoding step is executed again.
9. The encoding method of the multi-controller system according to any one of claims 4 to 8, further comprising an encoding line detecting step, the encoding line detecting step comprising:
the master controller sends a 1 st detection signal to the 1 st slave controller, and the 1 st slave controller sends a 2 nd detection signal to the 2 nd slave controller after receiving the 1 st detection signal;
after the ith slave controller receives the ith detection signal sent by the (i-1) th slave controller, when i is less than m, the ith slave controller sends the (i + 1) th detection signal to the (i + 1) th slave controller, and when i is equal to m, the mth slave controller sends the (m + 1) th detection signal to the master controller;
and when the main controller receives the (m + 1) th detection signal within the third preset time, judging that the detection is successful, otherwise, judging that the detection is failed.
10. The encoding method of a multi-controller system according to claim 9, wherein the slave controller transmits a second failure signal to the master controller when the slave controller does not receive the corresponding detection signal for a corresponding fourth predetermined time; and the number of the first and second groups,
and when the main controller receives the second fault signal and/or does not receive the mth detection signal within the third preset time, judging that the detection fails.
11. The encoding method of a multi-controller system according to claim 10, wherein the encoding line detecting step further comprises:
the method comprises the steps that a main controller reads a fault zone bit in a fault register of the main controller, and when the fault zone bit indicates that a coding line between the main controller and a 1 st slave controller is normal, the main controller sends a 1 st detection signal to the 1 st slave controller.
12. The encoding method of a multi-controller system according to claim 10, wherein the encoding line detecting step is performed before the encoding step and/or the encoding line detecting step is performed cyclically after the encoding step.
13. The encoding method of a multi-controller system according to claim 9, wherein the detection signal and the encoding signal are both PWM signals, and each of the detection signal and each of the encoding signal has a different duty ratio or frequency; or, the detection signal and the coding signal are both pulse signals, and the pulse width or the number of pulses in a period of each detection signal and each coding signal is different.
CN202111322424.6A 2021-11-09 2021-11-09 Multi-controller system and encoding method thereof Pending CN114115177A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111322424.6A CN114115177A (en) 2021-11-09 2021-11-09 Multi-controller system and encoding method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111322424.6A CN114115177A (en) 2021-11-09 2021-11-09 Multi-controller system and encoding method thereof

Publications (1)

Publication Number Publication Date
CN114115177A true CN114115177A (en) 2022-03-01

Family

ID=80377722

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111322424.6A Pending CN114115177A (en) 2021-11-09 2021-11-09 Multi-controller system and encoding method thereof

Country Status (1)

Country Link
CN (1) CN114115177A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114844742A (en) * 2022-07-04 2022-08-02 广东采日能源科技有限公司 Battery management system and control method thereof
WO2024016357A1 (en) * 2022-07-22 2024-01-25 宁德时代新能源科技股份有限公司 Multi-controller system and coding method therefor, and electric apparatus and control device
WO2024050752A1 (en) * 2022-09-08 2024-03-14 宁德时代新能源科技股份有限公司 Multi-controller system, coding method, electronic device, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205620786U (en) * 2016-04-20 2016-10-05 乐清市远浦电气有限公司 Robot motion control ware
CN111509308A (en) * 2019-01-31 2020-08-07 北京新能源汽车股份有限公司 Control method, device and system for coding of daughter board of battery management system
CN111787128A (en) * 2019-04-03 2020-10-16 郑州宇通集团有限公司 Automatic addressing method, system and main control module thereof
CN111969839A (en) * 2020-08-03 2020-11-20 华中科技大学 Multichannel linear adjustable power supply based on coding addressing and control method
CN112395237A (en) * 2019-08-19 2021-02-23 广州汽车集团股份有限公司 Method and system for communication between at least two controllers
CN112532495A (en) * 2020-11-16 2021-03-19 中国汽车技术研究中心有限公司 Vehicle-mounted CAN bus delay optimization method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205620786U (en) * 2016-04-20 2016-10-05 乐清市远浦电气有限公司 Robot motion control ware
CN111509308A (en) * 2019-01-31 2020-08-07 北京新能源汽车股份有限公司 Control method, device and system for coding of daughter board of battery management system
CN111787128A (en) * 2019-04-03 2020-10-16 郑州宇通集团有限公司 Automatic addressing method, system and main control module thereof
CN112395237A (en) * 2019-08-19 2021-02-23 广州汽车集团股份有限公司 Method and system for communication between at least two controllers
CN111969839A (en) * 2020-08-03 2020-11-20 华中科技大学 Multichannel linear adjustable power supply based on coding addressing and control method
CN112532495A (en) * 2020-11-16 2021-03-19 中国汽车技术研究中心有限公司 Vehicle-mounted CAN bus delay optimization method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114844742A (en) * 2022-07-04 2022-08-02 广东采日能源科技有限公司 Battery management system and control method thereof
CN114844742B (en) * 2022-07-04 2022-10-21 广东采日能源科技有限公司 Battery management system and control method thereof
WO2024016357A1 (en) * 2022-07-22 2024-01-25 宁德时代新能源科技股份有限公司 Multi-controller system and coding method therefor, and electric apparatus and control device
WO2024050752A1 (en) * 2022-09-08 2024-03-14 宁德时代新能源科技股份有限公司 Multi-controller system, coding method, electronic device, and storage medium

Similar Documents

Publication Publication Date Title
CN114115177A (en) Multi-controller system and encoding method thereof
CN101587634B (en) On-line real-time updating method for wireless cab signal vehicular equipment control program and parameter
CN107592211B (en) Identifying and configuring multiple intelligent devices on a CAN bus
US8959405B2 (en) Signal transmission device for elevator
CN111787128B (en) Automatic addressing method, system and main control module thereof
CN105224362A (en) Host computer carries out the method and system of program upgrade to slave computer
CN102306023B (en) Online configuration method of automobile controller
CN104753716A (en) Transmission system error detection and correction system and method
CN111600385B (en) Information interaction method and monitoring system
CN109230916B (en) Elevator operation control method, system, controller and encoder
CN104750566A (en) Serial link fault detection system and method
CN111123807A (en) Calibration method for whole vehicle controller of new energy bus
CN113114545A (en) Equipment ad hoc network method and device and air conditioning system
CA2551433C (en) Sending device, receiving device, communication control device, communication system, and communication control method
CN111509308A (en) Control method, device and system for coding of daughter board of battery management system
CN111565236B (en) Automatic coding method and device for sensor of fire protection system
US6725419B1 (en) Automation system and method for operating an automation system
JP2014068466A (en) Charge device
CN114844742B (en) Battery management system and control method thereof
CN113726598B (en) Communication method and device and electronic equipment
CN110769443A (en) Vehicle-vehicle communication performance analysis system based on stochastic Petri network
CN112947393B (en) Diagnostic method of PLC system
CN112636762A (en) Battery management system, slave control encoding method and device
CN110262459B (en) Fault information output control method and system
JP2020061655A (en) Communication system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination