Driving circuit based on double microprogrammed control units (MCU), motor control method and braking system
By designing a dual MCU-based driving circuit and motor control method in an electronic mechanical braking system, the problem of difficulty in achieving quick takeover and smooth transition when switching and controlling the motor by dual MCUs is solved, and the braking performance is improved.
Patent Information
- Application Number
- CN202411459570.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-02-28
AI Technical Summary
When the existing electronic mechanical braking system switches the motor to control the motor, it is difficult to achieve quick takeover and smooth transition, resulting in jitter easily when the motor rotates, affecting braking performance.
A driving circuit and motor control method based on a dual MCU are designed, and the synchronous communication and control signal transmission between the first MCU and the second MCU are realized through multiple switches and driving modules. When the first MCU is operating normally, the communication data and synchronization signals are periodically transmitted to the second MCU, which maintains the synchronization initial control logic based on these signals. When the first MCU fails, the control pin returns to the default state and triggers the multiple switch to connect to the second MCU. After the second MCU monitors the fault, it takes over the control in time to generate a target control signal consistent with the first MCU.
It realizes quick takeover and smooth transition when switching the dual MCUs to control the motor, avoids jitter when the three-phase motor rotates, improves the stability during control switching, and ensures braking performance.
Smart Images

Figure CN119543709A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of motor control, and in particular to a dual MCU-based driving circuit, a motor control method and a braking system. Background Art
[0002] With the development of automobile intelligence and autonomous driving technology, automobiles have higher and higher requirements for the response speed and safety level of the braking system. The braking system has gradually developed from the mainstream electronic hydraulic braking system to the electronic mechanical braking system EMB, which has the advantages of simple structure, small overall size, easy installation and maintenance, and fast braking response. However, EMB-related technologies at home and abroad are still under development and are not yet mature. In the existing electronic mechanical braking system EMB, a collaborative control system for a dual-winding permanent magnet synchronous motor is provided, which adopts dual MCUs, dual drive circuits, dual winding motors, and dual position detection to achieve redundant control of dual winding motors. However, when their dual MCUs switch to control the motor, it is difficult to achieve fast takeover and smooth transition, which causes the motor to easily jitter when it rotates, thereby affecting the braking performance.
[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0004] In order to overcome the technical problem that the traditional electromechanical braking system is difficult to achieve quick takeover and smooth transition when the dual MCU switches to control the motor, which causes the motor to easily vibrate when rotating, thereby affecting the braking performance, the present invention provides a driving circuit, a motor control method and a braking system based on dual MCUs.
[0005] In a first aspect, in order to solve the above technical problems, the present invention provides a driving circuit based on dual MCUs, comprising: a multi-way switch, a driving module, and a first MCU and a second MCU that are communicatively connected to each other; wherein:
[0006] The synchronization output terminal of the first MCU is connected to the synchronization input terminal of the second MCU;
[0007] The signal output end of the first MCU is connected to the first input end of the multi-way switch, and the signal output end of the second MCU is connected to the second input end of the multi-way switch; the signal control end of the first MCU and the selection feedback end of the second MCU are both connected to the selection signal end of the multi-way switch, and the output end of the multi-way switch is connected to the three-phase motor through the driving module.
[0008] In a second aspect, in order to solve the above technical problems, the present invention provides a motor control method based on dual MCUs, which is applied to the aforementioned dual MCU-based driving circuit, comprising:
[0009] The first MCU periodically transmits real-time communication data and synchronization signals to the second MCU, triggering the initial control logic of the second MCU to maintain synchronization with the first MCU based on the communication data and synchronization signal; wherein the communication data includes the initial control logic;
[0010] When the first MCU fails, the control pin is controlled to restore the default low level or hang in the air, triggering the output end of the multi-way switch to be connected with the second input end; wherein the control pin is a pin between the signal control end and the selection signal end of the first MCU;
[0011] When the second MCU monitors through the strobe feedback end that the control pin has returned to the default low level state or is suspended, it generates a target control signal based on the initial control logic and the real-time first working data, and transmits it to the drive module through the multi-way switch, triggering the drive module to control the three-phase motor based on the target control signal.
[0012] In a third aspect, in order to solve the above technical problems, the present invention provides an electromechanical braking system, including the dual MCU-based driving circuit as described above.
[0013] The beneficial effects of the present invention are:
[0014] When the first MCU is operating normally, the control pin is in a high-level state to connect the multi-way switch and the first MCU, and generates a corresponding control signal based on the working data of the three-phase motor and the three-phase full-bridge, and transmits the control signal to the multi-way switch and the drive module to control the three-phase motor. The first MCU periodically transmits communication data and synchronization signals carrying the initial control logic to the second MCU, and the second MCU ensures the initial control logic synchronized with the first MCU based on the communication data and the synchronization signal, so that the second MCU outputs a target control signal consistent with the first MCU. At this time, since the second MCU is not connected to the multi-way switch, the multi-way switch does not transmit the target control signal output by the second MCU to the drive module. When the first MCU fails, the control pin returns to the default low level or is suspended to connect the multi-way switch and the second MCU. At this time, the second MCU detects that the control pin returns to the default low level or is suspended, indicating that it needs to take over the control of the three-phase motor. Since the initial control logic of the second MCU is the same as and synchronized with the first MCU, the target control signal generated by it is consistent with the control signal generated by the first MCU.
[0015] In this way, when the first MCU fails, the multi-way switch and the second MCU can be quickly connected, and the second MCU can quickly detect the failure of the first MCU, so that the second MCU can take over the control of the three-phase motor in time and quickly take over. Since the target control signal generated by the second MCU is consistent with the control signal generated by the first MCU, when the second MCU controls the three-phase motor based on the target control signal, a smooth transition from the first MCU to the second MCU can be achieved. When the dual MCUs switch to control the motor, through rapid takeover and smooth transition, jitter can be avoided when the three-phase motor rotates, and the stability of the three-phase motor drive when the control right is switched can be improved, thereby ensuring the braking performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A control logic diagram of a dual MCU-based driving circuit provided by the present invention;
[0017] Figure 2 A specific circuit diagram of a dual MCU-based driving circuit provided by the present invention;
[0018] Figure 3 A flow chart of a motor control method based on dual MCUs provided by the present invention;
[0019] Figure 4 An embodiment of a motor control method based on dual MCUs provided by the present invention. DETAILED DESCRIPTION
[0020] The principles and features of the present invention are described below. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.
[0021] The following describes a dual MCU-based driving circuit, a motor control method, and a braking system according to an embodiment of the present invention in conjunction with the accompanying drawings.
[0022] like Figure 1 As shown, the embodiment of the present disclosure provides a driving circuit based on dual MCUs, including: a multi-way switch, a driving module, and a first MCU and a second MCU that are connected to each other in communication. The synchronization output terminal of the first MCU is connected to the synchronization input terminal of the second MCU; the signal output terminal of the first MCU is connected to the first input terminal of the multi-way switch, and the signal output terminal of the second MCU is connected to the second input terminal of the multi-way switch; the signal control terminal of the first MCU and the selection feedback terminal of the second MCU are both connected to the selection signal terminal of the multi-way switch, and the output terminal of the multi-way switch is connected to the three-phase motor through the driving module; the multi-way switch is used to connect the output terminal of the multi-way switch to the first input terminal or the second input terminal based on the level signal received by the selection signal terminal.
[0023] A dual-MCU based driving circuit provided by an embodiment of the present disclosure is adopted. When the first MCU operates normally, the control pin is in a high level state to connect the multi-way switch and the first MCU, and generates a corresponding control signal based on the working data of the three-phase motor and the three-phase full bridge, and transmits the control signal to the multi-way switch and the driving module to control the three-phase motor. The first MCU periodically transmits communication data and synchronization signals carrying the initial control logic to the second MCU, and the second MCU ensures the initial control logic synchronized with the first MCU based on the communication data and the synchronization signal, so that the second MCU outputs a target control signal consistent with the first MCU. At this time, since the second MCU is not connected to the multi-way switch, the multi-way switch does not transmit the target control signal output by the second MCU to the driving module. When the first MCU fails, the control pin returns to the default low level or is suspended to connect the multi-way switch and the second MCU. At this time, the second MCU detects that the control pin returns to the default low level or is suspended, indicating that it needs to take over the control of the three-phase motor. Since the initial control logic of the second MCU is the same as and synchronized with the first MCU, the target control signal generated by it is consistent with the control signal generated by the first MCU.
[0024] In this way, when the first MCU fails, the multi-way switch and the second MCU can be quickly connected, and the second MCU can quickly detect the failure of the first MCU, so that the second MCU can take over the control of the three-phase motor in time and quickly take over. Since the target control signal generated by the second MCU is consistent with the control signal generated by the first MCU, when the second MCU controls the three-phase motor based on the target control signal, a smooth transition from the first MCU to the second MCU can be achieved. When the dual MCUs switch to control the motor, through rapid takeover and smooth transition, jitter can be avoided when the three-phase motor rotates, and the stability of the three-phase motor drive when the control right is switched can be improved, thereby ensuring the braking performance.
[0025] Specifically, combined Figure 2 As shown, Figure 2 A specific circuit diagram of a driving circuit based on dual MCUs is provided. The signal control terminal of the first MCU is its pin 1, and the signal output terminal is its pin 2. The strobe feedback terminal of the second MCU is its pin 1, and the signal output terminal is its pin 2. The strobe signal terminal of the multi-way switch is its pin S, the first input terminal is its pin 1, the second input terminal is its pin 2, and the output terminal is its pin Z.
[0026] In addition, the 7-pin of the first MCU is connected to the 7-pin of the second MCU, and the two communicate and transmit via CAN or SPI to transmit communication data. The synchronization output terminal of the first MCU is its 8-pin, and the synchronization input terminal of the second MCU is its 8-pin. The first MCU transmits a synchronization signal to the second MCU through the synchronization output terminal and the synchronization input terminal. In this way, data exchange and synchronization initial control logic are realized between the first MCU and the second MCU through data transmission and synchronization signals.
[0027] Preferably, see again Figure 2 The driving module includes a pre-driver IC and a three-phase full bridge. The output end of the multi-way switch is connected to the control input end of the pre-driver IC, the driving output end of the pre-driver IC is connected to the three-phase full bridge; the three-phase full bridge is connected to the three-phase motor. Specifically, the endpoints of the three-phase full bridge are connected to the three windings of the three-phase motor.
[0028] In this way, the first MCU or the second MCU can transmit the corresponding control signal to the pre-driver IC through the multi-way switch. The pre-driver IC generates a corresponding drive signal (i.e., PWM signal) based on the received control signal. The drive signal is transmitted to the three-phase motor after the three-phase full bridge, thereby realizing the control of the three-phase motor.
[0029] Specifically, the control input terminal of the pre-driver IC is its pin 1, and the driving output terminal is a collection of its pins 2 and 3.
[0030] Preferably, see again Figure 2 The signal collection end of the pre-drive IC is respectively connected to each bridge arm of the three-phase full bridge; the pre-drive IC is used to collect the current of each bridge arm.
[0031] In this way, the current of each bridge arm between the bridge arms of the three-phase full bridge is collected in real time through the signal collection end of the pre-drive IC to realize current closed-loop control.
[0032] Specifically, the signal collection end of the pre-driver IC is a collection of pins 4, 5, 6, and 7 thereof.
[0033] Preferably, see again Figure 2, a driving circuit based on dual MCUs, also includes a position detection module and a temperature detection module; wherein the current output terminal and the state output terminal of the pre-drive IC, the position detection module, and the temperature detection module are all connected to the first MCU and the second MCU; the position detection module is used to collect the position information of the three-phase motor rotor and transmit the position information to the first MCU and the second MCU; the temperature detection module is used to collect the temperature information of the three-phase full-bridge bridge drive and transmit the temperature information to the first MCU and the second MCU; the pre-drive IC is used to diagnose the state information of the pre-drive IC and the three-phase full-bridge, and obtain the current single-ended signal, and transmit the state information to the first MCU and the second MCU respectively through the state output terminal, and transmit the current single-ended signal to the first MCU and the second MCU respectively through the current output terminal.
[0034] In this way, by collecting the position information of the three-phase motor rotor, the temperature information of the three-phase full-bridge bridge driver, the status information of the pre-driver IC and the three-phase full-bridge, and the current single-ended signal, the first MCU and the second MCU can both determine whether the circuit is operating normally, so that the first MCU or the second MCU can control the three-phase motor based on the operating conditions of the circuit.
[0035] Specifically, the temperature detection module is two NTC resistors. Figure 2 In the figure, two NTC*2 are used to represent the temperature. The two NTC resistors are placed on the bridge driver of the three-phase full bridge to detect the temperature of the three-phase full bridge driver. The state output terminal of the pre-driver IC is its 8th pin, and the current output terminal of the pre-driver IC is its 9th pin.
[0036] Preferably, see again Figure 2 , a driving circuit based on dual MCU, further comprising filter circuit RC1, filter circuit RC2, filter circuit RC3, filter circuit RC4, filter circuit RC5, filter circuit RC6, filter circuit RC7, and filter circuit RC8. Among them,
[0037] The status output terminal of the pre-driver IC is connected to pin 3 of the first MCU through the filter circuit RC1, and is connected to pin 3 of the second MCU through the filter circuit RC2. The pre-driver IC is used to transmit the status information to the first MCU and the second MCU through the filter circuit RC1 and the filter circuit RC2, respectively. The current output terminal of the pre-driver IC is connected to pin 4 of the first MCU through the filter circuit RC3, and is connected to pin 4 of the second MCU through the filter circuit RC4. The pre-driver IC is used to transmit the current single-ended signal to the first MCU and the second MCU, respectively, through the filter circuit RC3 and the filter circuit RC4.
[0038] The temperature detection module is connected to pin 5 of the first MCU through the filter circuit RC5, and is connected to pin 5 of the second MCU through the filter circuit RC6. The temperature detection module is used to transmit temperature information to the first MCU and the second MCU through the filter circuit RC5 and the filter circuit RC6 respectively. The position detection module is connected to pin 6 of the first MCU through the filter circuit RC7, and is connected to pin 6 of the second MCU through the filter circuit RC8. The position detection module is used to transmit position information to the first MCU and the second MCU through the filter circuit RC7 and the filter circuit RC8 respectively.
[0039] Combination Figure 3 As shown, the embodiment of the present disclosure provides a motor control method based on dual MCUs, which is applied to a driving circuit based on dual MCUs as shown above. The method includes:
[0040] Step S101, the first MCU periodically transmits real-time communication data and synchronization signals to the second MCU, triggering the initial control logic of the second MCU to maintain synchronization with the first MCU based on the communication data and the synchronization signal; wherein the communication data includes the initial control logic.
[0041] Specifically, the second MCU maintains clock synchronization with the first MCU based on the synchronization signal.
[0042] In some embodiments, the first MCU periodically transmits real-time communication data and synchronization signals to the second MCU, including: the first MCU transmits real-time communication data to the second MCU according to a preset communication cycle, and transmits synchronization signals to the second MCU according to a preset synchronization cycle. The preset communication cycle and the preset synchronization cycle are significantly smaller than the operating cycle of the three-phase motor, so that the control right can be quickly and smoothly switched from the first MCU to the second MCU within the operating cycle of the three-phase motor, thereby ensuring the stability of braking, so as to ensure the braking performance of the vehicle. For example, if SPI is used for communication between the first MCU and the second MCU, the preset communication cycle is 100us. The synchronization signal is based on the clock of the first MCU, the PWM cycle of the three-phase motor control is the synchronization cycle, and the output duty cycle is 50% of the square wave signal.
[0043] Step S102, when the first MCU fails, the control pin is controlled to restore the default low level or suspended, triggering the output end of the multi-way switch to be connected to the second input end; wherein the control pin is the pin of the signal control end of the first MCU.
[0044] Step S103, when the second MCU monitors through the strobe feedback end that the control pin returns to the default low level or is suspended, it generates a target control signal based on the initial control logic and the real-time first working data, and transmits it to the drive module through the multi-way switch, triggering the drive module to control the three-phase motor based on the target control signal.
[0045] It is understandable that the first working data represents the working data of the three-phase full bridge and the three-phase motor acquired by the second MCU (such as the three-phase PWM duty cycle, the motor working current, the motor speed, etc.). Since the three-phase full bridge and the three-phase motor are working continuously, the real-time first working data is constantly changing.
[0046] A motor control method based on dual MCUs provided by an embodiment of the present disclosure is adopted. When the first MCU operates normally, the control pin is in a high-level state to connect the multi-way switch and the first MCU, and a corresponding control signal is generated based on the working data of the three-phase motor and the three-phase full bridge, and the control signal is transmitted to the multi-way switch and the drive module to control the three-phase motor. The first MCU periodically transmits communication data and synchronization signals carrying the initial control logic to the second MCU, and the second MCU ensures the initial control logic synchronized with the first MCU based on the communication data and the synchronization signal, so that the second MCU outputs a target control signal consistent with the first MCU. At this time, since the second MCU is not connected to the multi-way switch, the multi-way switch does not transmit the target control signal output by the second MCU to the drive module. When the first MCU fails, the control pin returns to the default low level or is suspended to connect the multi-way switch and the second MCU. At this time, the second MCU detects that the control pin returns to the default low level or is suspended, indicating that it needs to take over the control of the three-phase motor. Since the initial control logic of the second MCU is the same as and synchronized with the first MCU, the target control signal generated by it is consistent with the control signal generated by the first MCU.
[0047] In this way, when the first MCU fails, the multi-way switch and the second MCU can be quickly connected, and the second MCU can quickly detect the failure of the first MCU, so that the second MCU can take over the control of the three-phase motor in time and quickly take over. Since the target control signal generated by the second MCU is consistent with the control signal generated by the first MCU, when the second MCU controls the three-phase motor based on the target control signal, a smooth transition from the first MCU to the second MCU can be achieved. When the dual MCUs switch to control the motor, through rapid takeover and smooth transition, jitter can be avoided when the three-phase motor rotates, and the stability of the three-phase motor drive when the control right is switched can be improved, thereby ensuring the braking performance.
[0048] Preferably, the target control signal includes a first target signal and a second target signal; the target control signal is generated based on the initial control logic and the real-time first working data, and is transmitted to the driving module via a multiplexer, including: the second MCU determines the target control logic; within a preset waiting period, the second MCU generates the first target signal based on the target control logic and the real-time first working data, and transmits it to the driving module via the multiplexer; the second MCU generates the second target signal based on the initial control logic and the real-time first working data, and after the preset waiting period ends, transmits the second target signal to the driving module via the multiplexer.
[0049] In this way, by setting a preset waiting period as a buffer period, the second MCU selects the corresponding target control logic to process the real-time first working data during the buffer period to reduce the jitter of the three-phase motor when switching control rights. After the preset waiting period, the initial control logic is used to process the real-time first working data, so that the second MCU formally takes over the control of the three-phase motor, thereby achieving the stability of the three-phase motor drive when switching control rights, thereby ensuring the braking performance.
[0050] In some embodiments, the preset waiting period is 3 preset communication cycles.
[0051] Preferably, the second MCU determines the target control logic, including: if the second MCU receives the communication data on time, and the latest received communication data carries an instruction to take over control, then the target control logic is determined to be the initial control logic; if the second MCU does not receive the communication data on time, then the target control logic is determined to be a preset angle compensation algorithm.
[0052] The faults of the first MCU include minor faults and major faults. Minor faults are characterized by faults that do not affect the data communication between the first MCU and the second MCU. For example, the first MCU's own logic errors, detection errors, lock-step cores, etc. That is, when a minor fault occurs in the first MCU, real-time communication data and synchronization signals can still be periodically transmitted between the first MCU and the second MCU. Severe faults are characterized by the first MCU being unable to communicate data with the second MCU, that is, being unable to periodically transmit real-time communication data and synchronization signals, that is, the pins used to transmit communication data and synchronization signals between the first MCU and the second MCU cannot be output normally.
[0053] Therefore, when the second MCU can receive the communication data on time, and the latest received communication data carries the instruction to take over the control right, it means that the first MCU has a minor fault, and the control error of the three-phase motor when the first MCU fails is small, and the three-phase motor can still be controlled by using the initial control strategy carried by the communication data. When the second MCU cannot receive the communication data on time, it means that the first MCU has a verification fault, that is, the control error of the first MCU on the three-phase motor is large when the fault occurs, so the preset angle compensation algorithm is temporarily selected to control the three-phase motor to reduce the impact of the first MCU failure on the three-phase motor. In this way, the corresponding target control algorithm is selected based on the fault type of the first MCU, so that when the first MCU fails, the control right can be smoothly switched to the second MCU to achieve the stability of the three-phase motor drive when switching the control right, thereby ensuring the braking performance.
[0054] In some embodiments, the angle compensation algorithm assumes that the speed and load torque of the three-phase motor remain unchanged during the process of confirming the fault of the first MCU, but the electrical angle of the three-phase motor is changing. In order to maintain the torque and speed, it is necessary to output a control signal (i.e., a PWM signal) according to the electrical angle of the three-phase motor. The electrical angle is compensated by the following formula: Taking a 4-pole motor as an example, the compensation angle = t*n / 60*4*2*π(ω*t). t is the waiting time (s) and n is the speed (rpm).
[0055] Furthermore, when the target control logic is the initial control logic, the second MCU generates a first target signal based on the target control logic and the real-time first working data, including: the second MCU processes the real-time first working data based on the initial control logic to generate an initial signal. The second MCU corrects the initial signal using the second working data in the communication data most recently transmitted by the first MCU to obtain the first target signal. Among them, the communication data includes the second working data and the initial control logic. The second working data represents the working data of the three-phase full-bridge and three-phase motor collected by the first MCU (such as the three-phase PWM duty cycle, the motor working current, the motor speed, etc.).
[0056] In actual testing, since the second MCU does not actually control the three-phase motor, there is an error between the control signal (i.e., the initial signal) generated based on the initial control logic and the control signal generated by the first MCU. In this way, the second working data in the communication data is used for correction to obtain a control signal consistent with the first MCU, so as to achieve a smooth transition of control from the first MCU to the second MCU. When the dual MCU switches to control the motor, through rapid takeover and smooth transition, jitter can be avoided when the three-phase motor rotates, and the stability of the three-phase motor drive when the control is switched can be improved, thereby ensuring braking performance.
[0057] Preferably, the second MCU generates a second target signal based on the initial control logic and the real-time first working data, including: within a preset waiting period, the second MCU verifies the fault condition of the first MCU and obtains a verification result; when the verification result is that a fault has occurred, the second MCU generates a second target signal based on the initial control logic and the real-time first working data.
[0058] Since the second MCU may make a monitoring error when monitoring the first MCU, a preset waiting period is set to verify the fault condition of the first MCU during the waiting period. When the verification result is a fault, the second MCU generates a second target signal so as to formally take over the control of the three-phase motor after the preset waiting period, so as to realize a smooth switch of control from the first MCU to the second MCU, thereby ensuring the braking performance.
[0059] It is understandable that if the verification result is that there is no fault, it means that the second MCU's strobe feedback terminal may have misdetected the level state of the strobe signal terminal, and the first MCU can still operate normally, and its control pin is still at a high level to connect the first MCU and the multi-way switch. However, the second MCU is not connected to the multi-way switch at this time, and the control signal output by the second MCU cannot be transmitted to the drive module through the multi-way switch, that is, the output signal of the second MCU will not affect the first MCU's control of the three-phase motor.
[0060] Preferably, the second MCU verifies the fault condition of the first MCU to obtain a verification result, including: when the second MCU fails to receive the communication data transmitted by the first MCU on time, fails to receive the synchronization signal transmitted by the first MCU on time, and one or more situations of the control pin being restored to the default low level or suspended is monitored through the selection feedback end and is triggered, the second MCU verifies that the verification result corresponding to the fault condition of the first MCU is that a fault has occurred.
[0061] After the first MCU fails, it will pull down the control pin to restore to the default low level or hang. And after the first MCU fails seriously, it will also affect the data transmission between it and the second MCU. Therefore, if the second MCU does not receive the communication data or synchronization signal transmitted by the first MCU on time, or monitors that the control pin returns to the default low level or hangs, it means that the first MCU has failed.
[0062] For ease of understanding, combined Figure 4 As shown, Figure 4An embodiment of a motor control method based on dual MCUs is provided. When the first MCU is operating normally, the first MCU transmits a high-level signal to the selection signal end (its S pin) of the multi-way switch, triggering the multi-way switch to connect its first input end (its 1 pin) with its output end (its Z pin), thereby realizing the connection between the first MCU and the multi-way switch. At this time, the first MCU samples the real-time second working data, that is, collects the state information, temperature information, position information and current single-ended signal of the three-phase full bridge and the three-phase motor, processes the real-time second working data using the initial control logic, generates a control signal, and transmits it to the multi-way switch, the pre-drive IC and the three-phase full bridge to trigger the pre-drive IC and the three-phase full bridge to control the three-phase motor. At the same time, the first MCU also transmits communication data and synchronization signals to the second MCU by means of data communication, triggering the second MCU to synchronize with the initial control logic of the first MCU based on the communication data and synchronization signal. The second MCU also samples the real-time first working data at the same time, and generates a corresponding control signal using the initial control logic synchronized with the first MCU, and transmits the control signal to the second input end (its 2 pin) of the multi-way switch. Since the second input end of the multi-way switch is not connected to its output end at this time, the multi-way switch cannot output the control signal to the pre-drive IC, etc. However, when the first MCU fails, the control pin of the first MCU returns to the default low level or is suspended, triggering the multi-way switch to connect its second input end to its output end, thereby realizing the connection between the second MCU and the multi-way switch. At this time, the second MCU temporarily takes over the control. During the period of temporary control (i.e., the preset waiting period), if the first MCU has a minor fault, the second MCU uses the initial control logic as the target control logic; if the first MCU has a serious fault, the preset angle compensation algorithm is used as the target control logic, and the target control logic is used to process the first working data sampled in real time to generate the first target signal to control the three-phase motor. During the preset waiting period, the second MCU verifies the first MCU. If it is verified that there is a fault, the second MCU officially takes over the control after the preset waiting period ends. Thereafter, the second MCU uses the initial control logic to process the real-time first working data to obtain the first target signal to control the three-phase motor. Thereby, the control right is switched from the first MCU to the second MCU, and the stable rotation of the three-phase motor is ensured during the switching, so as to ensure the braking performance of the vehicle.
[0063] An electromechanical braking system according to an embodiment of the present invention includes a dual MCU-based driving circuit as shown above.
[0064] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0065] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A dual MCU based driving circuit, characterized in that: include: A multi-way switch, a driving module, and a first MCU and a second MCU that are communicatively connected to each other; wherein, The synchronization output terminal of the first MCU is connected to the synchronization input terminal of the second MCU; The signal output end of the first MCU is connected to the first input end of the multi-way switch, and the signal output end of the second MCU is connected to the second input end of the multi-way switch; the signal control end of the first MCU and the selection feedback end of the second MCU are both connected to the selection signal end of the multi-way switch, and the output end of the multi-way switch is connected to the three-phase motor through the driving module.
2. The driving circuit according to claim 1, characterized in that: The driving module includes a pre-driving IC and a three-phase full bridge; wherein, The output end of the multi-way switch is connected to the control input end of the pre-driver IC, the driving output end of the pre-driver IC is connected to the three-phase full bridge; the three-phase full bridge is connected to the three-phase motor.
3. The driving circuit according to claim 2, characterized in that: The signal collection end of the pre-drive IC is respectively connected to each bridge arm of the three-phase full bridge; The pre-driver IC is used to detect the current of each bridge arm.
4. The driving circuit according to claim 3, characterized in that: It also includes a position detection module and a temperature detection module; wherein, The current output terminal and the state output terminal of the pre-drive IC, the position detection module, and the temperature detection module are all connected to the first MCU and the second MCU; The position detection module is used to collect the position information of the rotor of the three-phase motor and transmit the position information to the first MCU and the second MCU; The temperature detection module is used to collect temperature information of the three-phase full-bridge driver and transmit the temperature information to the first MCU and the second MCU; The pre-driver IC is used to diagnose the status information of the pre-driver IC and the three-phase full bridge, and to obtain a current single-ended signal, and to transmit the status information to the first MCU and the second MCU respectively through the status output end, and to transmit the current single-ended signal to the first MCU and the second MCU respectively through the current output end.
5. A motor control method based on dual MCUs, applied to the dual MCU-based driving circuit as claimed in claim 1, characterized in that: include: The first MCU periodically transmits real-time communication data and synchronization signals to the second MCU, triggering the initial control logic of the second MCU to maintain synchronization with the first MCU based on the communication data and synchronization signal; wherein the communication data includes the initial control logic; When the first MCU fails, the control pin is controlled to restore the default low level or be suspended, triggering the output end of the multi-way switch to be connected to the second input end; wherein the control pin is the pin of the signal control end of the first MCU; When the second MCU monitors through the strobe feedback end that the control pin has returned to the default low level state or is suspended, it generates a target control signal based on the initial control logic and the real-time first working data, and transmits it to the drive module through the multi-way switch, triggering the drive module to control the three-phase motor based on the target control signal.
6. The method according to claim 5, characterized in that The target control signal includes a first target signal and a second target signal; the target control signal is generated based on the initial control logic and the real-time first working data, and is transmitted to the driving module via the multi-way switch, including: The second MCU determines the target control logic; During the preset waiting period, the second MCU generates a first target signal based on the target control logic and the real-time first working data, and transmits the first target signal to the driving module via the multi-way switch; The second MCU generates a second target signal based on the initial control logic and the real-time first working data, and transmits the second target signal to the driving module via the multi-way switch after the preset waiting period ends.
7. The method according to claim 6, characterized in that The second MCU determines the target control logic, including: If the second MCU receives the communication data on time and the latest received communication data carries an instruction to take over control, the target control logic is determined to be the initial control logic; If the second MCU does not receive the communication data on time, it determines that the target control logic is a preset angle compensation algorithm.
8. The method according to claim 6, characterized in that The second MCU generates a second target signal based on the initial control logic and the real-time first working data, including: During a preset waiting period, the second MCU verifies the fault condition of the first MCU and obtains a verification result; When the verification result is that a failure occurs, the second MCU generates a second target signal based on the initial control logic and the real-time first working data.
9. The method according to claim 8, characterized in that The second MCU verifies the fault condition of the first MCU to obtain a verification result, including: When the second MCU fails to receive the communication data transmitted by the first MCU on time, fails to receive the synchronization signal transmitted by the first MCU on time, and one or more situations are triggered by monitoring through the selection feedback end that the control pin returns to the default low level or is suspended, the second MCU verifies that the verification result corresponding to the fault condition of the first MCU is that a fault has occurred.
10. An electromechanical braking system, characterized in that: It comprises a dual MCU based driving circuit as described in any one of claims 1 to 4.