Motor control method, device and motor controller

By introducing a state machine into the motor controller to simplify the control logic and realize a method of independently judging the completion of high-voltage power-on, the problem of complex MCU control logic and many interactive signals in the existing technology is solved, and the control efficiency of the motor system is improved.

CN114714922BActive Publication Date: 2025-01-21FAW JIEFANG AUTOMOTIVE CO
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210404345.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-18
Publication Date
2025-01-21
Estimated Expiration
2042-04-18

AI Technical Summary

Technical Problem

The control logic of existing MCUs is complex, and the interactive signals between the HCU and the MCU are large, which extends the control time of the motor controller on the motor and reduces the control efficiency of the motor system.

Method used

Provide a motor control method that simplifies the control logic through the state machine of the motor controller. The state machine includes initialization state, precharge state, standby state, torque control state, speed control state and angle marking state to realize independent judgment of the completion of high-voltage power-on. and automatically enter standby state.

Benefits of technology

The control logic between the motor controller and the vehicle controller is simplified, the interactive signals between the vehicle controller and the motor controller are reduced, and the control efficiency of the motor system is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114714922B_ABST
    Figure CN114714922B_ABST
Patent Text Reader

Abstract

The present application relates to a motor control method, device and motor controller. The method is executed by the motor controller, and the state machine of the motor controller includes an initialization state, a pre-charging state, a standby state, a torque control state, a speed control state and an angle mark state. The method includes: in the dormant state, if a wake-up signal is received, the initialization state is entered, in the initialization state, initialization is performed, and if the initialization is completed, the pre-charging state is entered; in the pre-charging state, the DC capacitor is pre-charged and the DC capacitor voltage is monitored. If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, it is determined that the pre-charging is completed and the standby state is entered; in the standby state, if a torque control command, a speed control command or an angle mark command is received from the vehicle controller, the corresponding torque control state, speed control state or angle mark state is entered. The use of this method can improve the control efficiency of the motor system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of new energy vehicle technology, and in particular to a motor control method, device, motor controller, storage medium and computer program product. Background Art

[0002] The power system of new energy vehicles includes a motor system and a power battery. The motor system includes a motor and a motor controller (MCU, Motor Control Unit), and the power battery includes a battery body and a battery management system (BMS, Battery Management System). MCU is a high-power, high-voltage power electronic module that can convert high-voltage DC into AC according to the requirements of the vehicle controller (HCU, Hybrid Control Unit), and interact with other modules on the vehicle to achieve torque (also called torque) control and speed closed-loop control of the three-phase AC permanent magnet synchronous motor in four quadrants. The motor converts electrical energy into mechanical energy to drive the car. MCU, HCU and BMS communicate through the CAN bus.

[0003] Usually, MCU needs to have sleep wake-up function, high voltage power-on function, high voltage power-off function and fault handling function, etc. At present, for MCU to realize these functions, HCU needs to send MCU work enable command, MCU work mode command, MCU active discharge enable command and MCU high voltage power-off permission command through CAN bus; after receiving the command information sent by HCU, MCU starts to execute the corresponding function and feeds back the corresponding status information of MCU to HCU through CAN bus.

[0004] The control logic of the above-mentioned MCU is relatively complex, and there are many interactive signals between the HCU and the MCU, which prolongs the control time of the motor controller over the motor and reduces the control efficiency of the motor system. Summary of the invention

[0005] Based on this, it is necessary to provide a motor control method, device, motor controller, computer-readable storage medium and computer program product that can improve the control efficiency of the motor system in order to address the above technical problems.

[0006] In a first aspect, the present application provides a motor control method. The method is executed by a motor controller, the state machine of the motor controller includes an initialization state, a pre-charge state, a standby state, a torque control state, a speed control state and an angle mark state, and the method includes:

[0007] In the dormant state, if a hardware or network wake-up signal is received, the device enters the initialization state. In the initialization state, the device performs initialization. If the initialization is completed, the device enters the pre-charge state.

[0008] In the pre-charging state, the DC capacitor is pre-charged and the DC capacitor voltage is monitored. If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, the pre-charging is determined to be completed and the standby state is entered;

[0009] In the standby state, if a torque control command, speed control command or angle control command is received from the vehicle controller, the corresponding torque control state, speed control state or angle control state is entered, and the IGBT is controlled to switch from the off state to the on state;

[0010] In the torque control state, the motor is controlled to run in the four quadrants. If a request for standby or a request for speed control is received from the vehicle controller, the corresponding standby state or speed control state is entered;

[0011] In the speed control state, the motor is controlled to perform speed closed-loop control. If a request for standby or request for torque control is received from the vehicle controller, the corresponding standby state or torque control state is entered;

[0012] In the angle calibration state, the initial position angle of the motor resolver is calibrated. If the angle calibration is completed, the standby state is entered.

[0013] In a second aspect, the present application also provides a motor control device. The device comprises:

[0014] The power-on module is used to enter the initialization state if a hardware or network wake-up signal is received in the sleep state, and to perform initialization in the initialization state. If the initialization is completed, the module enters the pre-charge state;

[0015] The power-on module is also used to pre-charge the DC capacitor in the pre-charging state and monitor the DC capacitor voltage. If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, it is determined that the pre-charging is completed and enters the standby state;

[0016] The control module is used for, in the standby state, if receiving a torque control request instruction, a speed control request instruction or an angle marking request instruction sent by the vehicle controller, entering the corresponding torque control state, speed control state or angle marking state, and controlling the IGBT to switch from the off-tube state to the on-tube state;

[0017] The control module is also used to control the motor to run in four quadrants in the torque control state, and enter the corresponding standby state or speed control state if a request for standby command or a request for speed control command sent by the vehicle controller is received;

[0018] The control module is also used to control the motor to perform speed closed-loop control in the speed control state, and enter the corresponding standby state or torque control state if a request standby command or a request torque control command sent by the vehicle controller is received;

[0019] The control module is also used to calibrate the initial position angle of the motor resolver in the angle calibration state. If the angle calibration is completed, the control module enters the standby state.

[0020] In a third aspect, the present application further provides a motor controller. The motor controller includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0021] In the dormant state, if a hardware or network wake-up signal is received, the device enters the initialization state. In the initialization state, the device performs initialization. If the initialization is completed, the device enters the pre-charge state.

[0022] In the pre-charging state, the DC capacitor is pre-charged and the DC capacitor voltage is monitored. If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, the pre-charging is determined to be completed and the standby state is entered;

[0023] In the standby state, if a torque control command, speed control command or angle control command is received from the vehicle controller, the corresponding torque control state, speed control state or angle control state is entered, and the IGBT is controlled to switch from the off state to the on state;

[0024] In the torque control state, the motor is controlled to run in the four quadrants. If a request for standby or a request for speed control is received from the vehicle controller, the corresponding standby state or speed control state is entered;

[0025] In the speed control state, the motor is controlled to perform speed closed-loop control. If a request for standby or request for torque control is received from the vehicle controller, the corresponding standby state or torque control state is entered;

[0026] In the angle calibration state, the initial position angle of the motor resolver is calibrated. If the angle calibration is completed, the standby state is entered.

[0027] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0028] In the dormant state, if a hardware or network wake-up signal is received, the device enters the initialization state. In the initialization state, the device performs initialization. If the initialization is completed, the device enters the pre-charge state.

[0029] In the pre-charging state, the DC capacitor is pre-charged and the DC capacitor voltage is monitored. If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, the pre-charging is determined to be completed and the standby state is entered;

[0030] In the standby state, if a torque control command, speed control command or angle control command is received from the vehicle controller, the corresponding torque control state, speed control state or angle control state is entered, and the IGBT is controlled to switch from the off state to the on state;

[0031] In the torque control state, the motor is controlled to run in the four quadrants. If a request for standby or a request for speed control is received from the vehicle controller, the corresponding standby state or speed control state is entered;

[0032] In the speed control state, the motor is controlled to perform speed closed-loop control. If a request for standby or request for torque control is received from the vehicle controller, the corresponding standby state or torque control state is entered;

[0033] In the angle calibration state, the initial position angle of the motor resolver is calibrated. If the angle calibration is completed, the standby state is entered.

[0034] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0035] In the dormant state, if a hardware or network wake-up signal is received, the device enters the initialization state. In the initialization state, the device performs initialization. If the initialization is completed, the device enters the pre-charge state.

[0036] In the pre-charging state, the DC capacitor is pre-charged and the DC capacitor voltage is monitored. If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, the pre-charging is determined to be completed and the standby state is entered;

[0037] In the standby state, if a torque control command, speed control command or angle control command is received from the vehicle controller, the corresponding torque control state, speed control state or angle control state is entered, and the IGBT is controlled to switch from the off state to the on state;

[0038] In the torque control state, the motor is controlled to run in the four quadrants. If a request for standby or a request for speed control is received from the vehicle controller, the corresponding standby state or speed control state is entered;

[0039] In the speed control state, the motor is controlled to perform speed closed-loop control. If a request for standby or request for torque control is received from the vehicle controller, the corresponding standby state or torque control state is entered;

[0040] In the angle calibration state, the initial position angle of the motor resolver is calibrated. If the angle calibration is completed, the standby state is entered.

[0041] The motor control method, device, motor controller, storage medium and computer program product provide a state machine of the motor controller, which includes an initialization state, a pre-charge state, a standby state, a torque control state, a speed control state and an angle mark state, thereby simplifying the control logic between the motor controller and the vehicle controller, strengthening the motor controller's judgment of the vehicle state, and the vehicle controller and the motor controller have fewer interactive signals, and the interactive signals between the motor controller and the vehicle controller occupy less communication resources, thereby achieving the purpose of improving the control efficiency of the motor system. In addition, the motor controller can judge whether the high-voltage power-on is completed and automatically enter the standby state without being controlled by external commands, that is, the vehicle controller does not need to send a standby command to the motor controller after the high-voltage power-on is completed to request the motor controller to enter the standby state, so that the motor controller does not need to rely too much on the vehicle controller to give the command to execute the predefined function, further simplifying the control logic between the motor controller and the vehicle controller, which is conducive to achieving the purpose of improving the control efficiency of the motor system. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A diagram showing an application environment of a motor control method in an embodiment;

[0043] Figure 2 is a flow chart of a motor control method in one embodiment;

[0044] Figure 3 A schematic diagram of a flow chart of a motor controller in a power-off state in one embodiment;

[0045] Figure 4 is a flow chart of a motor control method in another embodiment;

[0046] Figure 5 A schematic diagram of a flow chart of a motor controller in a power-off state in another embodiment;

[0047] Figure 6 is a structural block diagram of a motor control device in one embodiment;

[0048] Figure 7 FIG. 4 is a diagram showing the internal structure of a motor controller in one embodiment. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0050] The motor control method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the application environment includes a motor controller (MCU) 102 and a vehicle control unit (HCU) 104 of a new energy vehicle, and the motor controller 102 communicates with the vehicle control unit 104 through a CAN bus. The state machine of the motor controller 102 includes an initialization state, a pre-charging state, a standby state, a torque control state, a speed control state and an angle state. The motor controller 102 executes a motor control method including: when the motor controller 102 is in a dormant state, if it receives a hardware or network wake-up signal, it enters an initialization state. In the initialization state, it performs initialization. If the initialization is completed, it enters a pre-charging state; in the pre-charging state, the DC capacitor is pre-charged and the DC capacitor voltage is monitored. If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, it is determined that the pre-charging is completed and enters a standby state; in the standby state, if a torque control instruction request sent by the vehicle controller 104 is received, If a speed control command or an angle control command is requested, the corresponding torque control state, speed control state or angle control state is entered, and the IGBT is controlled to switch from the off-tube state to the open-tube state; in the torque control state, the motor is controlled to operate in the four quadrants. If a request for standby or a request for speed control is received from the vehicle controller 104, the corresponding standby state or speed control state is entered; in the speed control state, the motor is controlled to perform speed closed-loop control. If a request for standby or a request for torque control is received from the vehicle controller 104, the corresponding standby state or torque control state is entered; in the angle control state, the initial position angle of the motor resolver is calibrated. If the angle calibration is completed, the standby state is entered.

[0051] Among them, new energy vehicles can be commercial vehicles or passenger vehicles. Commercial vehicles are vehicles that mainly transport people and goods, including trucks and buses with more than 9 seats, etc. Passenger vehicles are vehicles that mainly carry passengers and their carry-on luggage or temporary items, with a maximum of 9 seats including the driver's seat.

[0052] In one embodiment, Figure 2 As shown, a motor control method is provided, which is applied to Figure 1 Taking the motor controller in as an example, the state machine of the motor controller includes an initialization state, a pre-charge state, a standby state, a torque control state, a speed control state and an angle control state. The method includes the following steps:

[0053] Step 202, in the sleep state, if a hardware or network wake-up signal is received, the initialization state is entered, and in the initialization state, initialization is performed. If the initialization is completed, the pre-charge state is entered.

[0054] Among them, the state machine is the process of the motor controller executing its preset functions, which is used to describe the operating state of the motor controller and the jump between each operating state. The jump between each operating state is that when the trigger condition is met, the motor controller jumps from the current operating state to another operating state. The trigger condition can be an external command sent by the vehicle controller or other host computer, or it can be determined by the motor controller itself. In different states, the motor controller will communicate with the vehicle controller through the CAN bus and feed back the information of the motor controller in each state to the vehicle controller.

[0055] In this embodiment, the preset functions of the motor controller include a sleep wake-up function, a high-voltage power-on function, a torque control function, a speed control function, an angle marking function, a high-voltage power-off function, and a fault handling function. The state machine of the motor controller includes an initialization state, a pre-charge state, a standby state, a torque control state, a speed control state, an angle marking state, a power-off state, and a fault state corresponding to the preset functions.

[0056] The sleep state of the motor controller is a running state in which the motor controller is in a low-power mode when the car is parked. There are two ways to wake up the motor controller: hardware wakeup, that is, turning the key to the ON position; and network wakeup, by receiving network messages, such as CAN signals. The wakeup signal for hardware wakeup is the hardware wakeup signal, and the wakeup signal for network wakeup is the network wakeup signal.

[0057] The initialization state of the motor controller is the running state of the motor controller after the vehicle is awakened and before the vehicle is driven normally. In this state, necessary preparations and self-tests are performed to start the motor, including troubleshooting of motor and motor controller faults, RAM, ROM, EEPROM detection, and current acquisition circuit calibration.

[0058] Specifically, when the motor controller is in the sleep state, if it receives a hardware or network wake-up signal, it enters the initialization state. In the initialization state, it performs an initialization self-check. If the initialization is completed, the motor controller enters the pre-charge state.

[0059] Step 204, in the pre-charging state, pre-charge the DC capacitor and monitor the DC capacitor voltage. If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, it is determined that the pre-charging is completed and enters the standby state.

[0060] Among them, the pre-charge state of the motor controller is an operating state of the motor controller during the power-on stage. Because the capacitance value of the motor controller's own DC capacitor is zero before the motor controller performs the high-voltage power-on function, if the high voltage is directly used to charge the motor controller at this time, it is equivalent to a direct short circuit at the moment the circuit is closed. Excessive current will damage the components in the motor controller, battery and other circuits. Therefore, in order to limit the current during high-voltage power-on and protect components such as the motor controller and battery, it is necessary to add a pre-charging circuit to the power supply system. Through the pre-charging circuit, the DC capacitor is pre-charged when the high-voltage power-on is on, until the DC capacitor voltage is close to the internal voltage of the power battery, the pre-charging is completed, that is, the high-voltage power-on is completed, and then the pre-charging circuit is disconnected, the vehicle enters the standby state, and can drive normally after receiving instructions.

[0061] The DC capacitor is a capacitor that comes with the motor controller. For example, the DC capacitor can be a thin film capacitor, such as a DC-Link capacitor. The DC capacitor voltage is the voltage of the DC capacitor, which is monitored by the motor controller. The power battery internal voltage is the voltage of the power battery, which is monitored by the battery management system. The voltage threshold is a critical value used to determine whether the pre-charging of the motor controller is completed, which can be pre-set.

[0062] Specifically, in the pre-charging state, the motor controller pre-charges the DC capacitor through the pre-charging circuit, monitors the voltage of the DC capacitor in real time, and receives the internal voltage of the power battery transmitted by the CAN bus. After monitoring the internal voltage of the power battery, the battery management system sends the internal voltage of the power battery to the vehicle controller in real time through the CAN bus, and the vehicle controller transmits the internal voltage of the power battery to the motor controller in real time through the CAN bus. If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, the motor controller determines that the pre-charging is completed and enters the standby state.

[0063] Step 206, in the standby state, if a torque control command, a speed control command or an angle control command is received from the vehicle controller, the corresponding torque control state, speed control state or angle control state is entered, and the IGBT is controlled to switch from the off state to the on state.

[0064] Among them, the standby state of the motor controller is an operating state after the pre-charging and high-voltage power-on of the motor controller are completed. In this state, the IGBT is in the off state, and the vehicle cannot be driven in gear. It needs to wait for the vehicle controller to send a corresponding request command to enter the working mode. IGBT (Insulated Gate Bipolar Transistor) is a power switching device with high input impedance and fast switching speed. It is divided into two states: on and off, which can also be called open tube state and off tube state. It can be regarded as a wire when on and an open circuit when off.

[0065] The torque control request instruction, the speed control request instruction and the angle control request instruction are all request instructions sent by the vehicle controller to the motor controller, which are used to request the motor controller to enter the torque control state, the speed control state and the angle control state respectively.

[0066] The torque control state of the motor controller is the operating state in which the motor controller controls the torque of the motor in the four quadrants, and the speed control state of the motor controller is the operating state in which the motor controller controls the speed of the motor in the four quadrants. Among them, since the torque control state and speed control state of the motor controller cannot exist at the same time, the vehicle controller cannot send torque control instructions and speed control instructions to the motor controller at the same time. The angle calibration state of the motor controller is the operating state in which the motor controller calibrates the initial position angle of the motor resolver. Calibration of the initial position angle of the motor resolver is a service function for the motor drive system, not a vehicle function, and is usually performed after the resolver is installed on the motor.

[0067] Specifically, when the motor controller is in standby mode, if it receives a torque control instruction requesting from the vehicle controller, it enters a torque control state and controls the IGBT to switch from the off-state to the on-state; if it receives a speed control instruction requesting from the vehicle controller, it enters a speed control state and controls the IGBT to switch from the off-state to the on-state; if it receives an angle marking instruction requesting from the vehicle controller, it enters an angle marking state and controls the IGBT to switch from the off-state to the on-state; otherwise, it stays in the standby mode and feeds back the information that the motor controller is in the standby mode to the vehicle controller.

[0068] Step 208, in the torque control state, the motor is controlled to run in four quadrants. If a request for standby or a request for speed control is received from the vehicle controller, the corresponding standby state or speed control state is entered.

[0069] Specifically, in the torque control state, the motor controller controls the motor to output the specified torque in the four quadrants according to the received request torque control command, drives the vehicle, and monitors the actual torque when the motor is running, and feeds back the actual torque and other information of the motor controller in the torque control state to the vehicle controller. In this state, if the motor controller receives a request standby command sent by the vehicle controller, it enters the standby state; if it receives a request speed control command sent by the vehicle controller, it enters the speed control state.

[0070] Step 210, in the speed control state, the motor is controlled to perform speed closed-loop control. If a request standby command or a request torque control command sent by the vehicle controller is received, the corresponding standby state or torque control state is entered.

[0071] Specifically, in the speed control state, the motor controller controls the motor to output the specified speed in the four quadrants according to the received request speed control command, drives the vehicle, and monitors the actual speed of the motor, and feeds back the actual speed and other information of the motor controller in the speed control state to the vehicle controller. In this state, if the motor controller receives a request standby command sent by the vehicle controller, it enters the standby state; if it receives a request torque control command sent by the vehicle controller, it enters the torque control state.

[0072] Step 212, in the angle calibration state, calibrate the initial position angle of the motor resolver, and if the angle calibration is completed, enter the standby state.

[0073] The motor resolver initial position angle is also called the motor resolver deviation angle, which is the deviation angle between the zero position angle of the motor resolver and the motor zero position angle.

[0074] Due to processing deviations and installation deviations in the motor production process, the motor resolver will have angle deviations during the actual assembly and debugging process, and the resolver deviation angles of each motor may be different. Angle deviations in the motor resolver will cause the motor to be unable to accurately control torque and speed during operation, affect the motor's output power, and may even endanger the driver's driving safety. Therefore, when the vehicle is offline, the resolver initial position angle of each motor must be measured and calibrated so that the resolver initial position angle set in the motor controller is consistent with the resolver initial position angle of the motor.

[0075] Specifically, the motor controller, in the angle calibration state, self-learns the initial position angle of the motor's rotary transformer according to the received request angle calibration instruction to calibrate the initial position angle of the motor's rotary transformer. If the angle calibration is completed, the initial position angle of the motor's rotary transformer obtained by self-learning is used as the initial position angle of the rotary transformer set in the motor controller, and enters the standby state. Wherein, the motor controller self-learns the initial position angle of the motor's rotary transformer according to the received request angle calibration instruction, including: the motor controller connects the motor rotary transformer, the motor controller runs the built-in self-learning software according to the received request angle calibration instruction, and obtains the initial position angle of the motor's rotary transformer through the self-learning software. If the self-learning software can obtain the initial position angle of the motor's rotary transformer, it is determined that the angle calibration is successful, and the initial position angle of the motor's rotary transformer obtained by the self-learning software is used as the initial position angle of the rotary transformer set in the motor controller; otherwise, it is determined that the angle calibration fails.

[0076] In the above motor control method, by providing a state machine of the motor controller, the state machine includes initialization state, pre-charging state, standby state, torque control state, speed control state and angle mark state, the control logic between the motor controller and the vehicle controller is simplified, the motor controller's judgment on the state of the vehicle is strengthened, and the motor controller realizes its preset function based on the state machine. Among them, the motor controller can determine whether the high-voltage power-on is completed and automatically enter the standby state by judging whether the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold. It is not controlled by external commands, that is, there is no need for the vehicle controller to send a standby command to the motor controller after the high-voltage power-on is completed to request the motor controller to enter the standby state, thereby achieving the purpose of improving the control efficiency of the motor system.

[0077] Moreover, in the above motor control method, there are fewer interactive signals between the vehicle controller and the motor controller. The signals sent by the vehicle controller to the motor controller include: requesting a standby command, requesting a torque control command, requesting a speed control command, requesting an angle mark command, etc. The signals sent by the motor controller to the vehicle controller include: the motor controller is in an initialization state, the motor controller is in a pre-charging state, the motor controller is in a standby state, the motor controller is in a speed control state, the motor controller is in a torque control state, the motor controller is in a speed control state, the motor controller is in an angle mark state, etc. Each corresponding information in the above signals only needs to occupy 3 bits in 1 byte of the vehicle controller communication, so it can reduce resource occupancy and save costs. Therefore, since the interactive signals between the motor controller and the vehicle controller are reduced, and the interactive signals between the motor controller and the vehicle controller occupy less communication resources, it is beneficial to improve the control efficiency of the motor system.

[0078] In one embodiment, in the pre-charging state, the DC capacitor is pre-charged and the DC capacitor voltage is monitored. If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, it is determined that the pre-charging is completed and the standby state is entered, including: in the pre-charging state, the main negative contactor of the power battery is controlled to be in a closed state through the battery management system, and the pre-charging contactor of the high-voltage distribution box is controlled to be in a closed state and the main positive contactor is in a disconnected state through the high-voltage distribution box, and the DC capacitor is pre-charged; if the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, it is determined that the pre-charging is completed, and the standby state is entered, and the standby state signal is fed back to the vehicle controller, and the pre-charging contactor is disconnected and the main positive contactor is closed through the high-voltage distribution box.

[0079] Among them, the main negative contactor, main positive contactor and pre-charge contactor are all high-voltage contactors, used as controllable switches. The pre-charge contactor is part of the pre-charge circuit, and together with the pre-charge resistor, main negative contactor, power battery, DC capacitor, etc., it forms a complete pre-charge circuit. The main positive contactor is part of the power supply circuit corresponding to the normal driving of the vehicle, and together with the main negative contactor, power battery, DC capacitor, etc., it forms a complete power supply circuit.

[0080] In commercial vehicles, the main negative contactor is assembled with the power battery, and the battery management system controls its closing or disconnection; the main positive contactor and pre-charge contactor are assembled with the high-voltage distribution box (also called PDU, Power Distribution Unit), and the high-voltage distribution box controls their closing or disconnection. In passenger cars, the main negative contactor, main positive contactor and pre-charge contactor are all assembled with the power battery, and the battery management system controls their closing or disconnection.

[0081] Specifically, for commercial vehicles, when the motor controller is in the pre-charging state, it feeds back the information that the motor controller is in the pre-charging state to the vehicle controller. The vehicle controller sends instructions to the battery management system and the high-voltage distribution box respectively. The battery management system controls the main negative contactor of the power battery to be in a closed state according to the instructions. The high-voltage distribution box controls the pre-charging contactor of the high-voltage distribution box to be in a closed state and the main positive contactor to be in a disconnected state according to the instructions, so that the pre-charging circuit is turned on, and the DC capacitor is pre-charged through the pre-charging circuit.

[0082] If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, the pre-charging is determined to be completed, and the motor controller enters the standby state. The information that the motor controller is in the standby state is fed back to the vehicle controller. The vehicle controller sends an instruction to the high-voltage distribution box. The high-voltage distribution box disconnects the pre-charging contactor and closes the main positive contactor according to the instruction, so that the power supply circuit is turned on. The motor controller converts the high-voltage DC power into AC power to power the motor, and the motor converts electrical energy into mechanical energy to drive the car.

[0083] If the vehicle controller does not receive the information that the motor controller is in standby mode after the preset time, at least one of the battery management system and the high-voltage distribution box sends a pre-charge timeout message to the vehicle controller, indicating that the pre-charge circuit has failed. Here, the preset time is set by the battery management system and the high-voltage distribution box manufacturer according to actual needs.

[0084] In this example, by introducing the status information of the main positive contactor, the main negative contactor, and the pre-charge contactor, when the motor controller enters the standby state and feeds back the information that the motor controller is in the standby state to the vehicle controller, the pre-charge contactor is disconnected and the main positive contactor is closed, thereby realizing the state machine interlock. Since the motor controller in this embodiment determines that the high-voltage power-on is completed and automatically enters the standby state, and is not controlled by external commands, therefore, considering the safety of the whole vehicle when the motor controller is powered on at high voltage, the motor control method provided in this embodiment, through the state machine interlock, can only disconnect the pre-charge contactor and close the main positive contactor when the motor controller enters the standby state, so as to avoid the high-voltage contactor from causing damage or reduction in the life of the motor controller and other vehicle components due to interference or control logic defects, thereby achieving the purpose of ensuring the safety of the whole vehicle when the high voltage is powered on.

[0085] In another embodiment, for a passenger car, in a pre-charging state, the DC capacitor is pre-charged and the DC capacitor voltage is monitored. If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than a voltage threshold, the pre-charging is determined to be completed and the standby state is entered, including: in the pre-charging state, the motor controller feeds back information that the motor controller is in the pre-charging state to the vehicle controller, the vehicle controller sends instructions to the battery management system, and the battery management system controls the main negative contactor of the power battery to be in a closed state, the pre-charging contactor to be in a closed state, and the main positive contactor to be in a disconnected state according to the instructions, so that the pre-charging circuit is turned on, and the DC capacitor is pre-charged through the pre-charging circuit.

[0086] If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, the pre-charging is determined to be completed, and the motor controller enters the standby state. The information that the motor controller is in the standby state is fed back to the vehicle controller. The vehicle controller sends instructions to the battery management system. The battery management system disconnects the pre-charging contactor and closes the main positive contactor according to the instructions to make the power supply circuit conductive. The motor controller converts high-voltage DC into AC to power the motor, and the motor converts electrical energy into mechanical energy to drive the car.

[0087] If the vehicle controller does not receive the information from the motor controller that the motor controller is in standby mode after the preset time, the battery management system sends a pre-charge timeout message to the vehicle controller, indicating that the pre-charge circuit has failed. Here, the preset time is set by the battery management system according to actual needs.

[0088] In one embodiment, Figure 3 As shown, the state machine of the motor controller also includes a power-off state, and the motor control method also includes:

[0089] Step 302, when the motor controller is in any of the pre-charging state, the standby state, the torque control state, and the speed control state, if a power-off request instruction sent by the vehicle controller is received, the power-off state is entered.

[0090] The power-off state of the motor controller is the running state of the motor controller when preparing to park. In the power-off state, the motor controller actively discharges. The request power-off instruction is a request instruction sent by the vehicle controller to the motor controller, which is used to request the motor controller to enter the power-off state.

[0091] Specifically, when the motor controller is in any of the pre-charging state, the standby state, the torque control state, and the speed control state, if it receives a power-off request instruction sent by the vehicle controller, it enters the power-off state.

[0092] Step 304: In the power-off state, if the active discharge entry condition is met, the active discharge state is entered to control the DC capacitor voltage to discharge.

[0093] The active discharge state is an operating state of the motor controller in the power-off stage. The active discharge entry condition is a condition under which the motor controller controls the DC capacitor to discharge the voltage.

[0094] Specifically, when the motor controller is in a power-off state and the active discharge entry condition is met, the motor controller enters an active discharge state and controls the DC capacitor to discharge the voltage.

[0095] Step 306: In the active discharge state, if the active discharge exit condition is met, the DC capacitor voltage is controlled to stop discharging and enter the power-off state.

[0096] Among them, the active discharge exit condition is the condition for the motor controller to control the DC capacitor to stop voltage discharge, which may include: the active discharge exit condition when the active discharge is completed, the active discharge exit condition when a fault occurs during the active discharge process, and the active discharge exit condition when an external command request is received to jump to other states.

[0097] Specifically, when the motor controller is in the active discharge state, if the active discharge exit condition is met, the DC capacitor voltage is controlled to stop discharging and enter the power-off state.

[0098] In this embodiment, by judging whether the active discharge entry condition is met to enter the active discharge state when the motor controller is in the power-off state, and judging whether the active discharge exit condition is met to enter the power-off state in the active discharge state, the motor controller can judge whether the active discharge is completed by itself without being controlled by external commands. That is, there is no need for the vehicle controller to send an active discharge command to the motor controller to request the motor controller to enter the active discharge state. Therefore, the control time is greatly shortened, the vehicle control logic and communication message information are simplified, thereby achieving the purpose of improving the control efficiency of the motor system.

[0099] In one embodiment, the state machine of the motor controller also includes a fault state, and the fault levels are divided into four-level faults, three-level faults, two-level faults and one-level faults according to the severity. The motor control method also includes: in the initialization state, pre-charging state, standby state, torque control state, speed control state or angle marking state, if a first-level fault occurs, a fault warning is issued; in the initialization state, pre-charging state, standby state, torque control state, speed control state or angle marking state, if a second-level fault occurs, the power output is reduced; in the initialization state, pre-charging state or standby state, if a third-level fault or a fourth-level fault occurs, the fault state is entered, and the IGBT is controlled to remain in the off-tube state; in the torque control state, speed control state or angle marking state, if a third-level fault occurs, the fault state is entered, and the IGBT is controlled to remain in the open-tube state, and if a request for power-off sent by the vehicle controller is received, the power-off state is entered; if a fourth-level fault occurs, the fault state is entered, and the IGBT is controlled to switch from the open-tube state to the off-tube state; in the angle marking state, if the angle calibration is not completed, the fault state is entered, and the IGBT is controlled to switch from the open-tube state to the off-tube state.

[0100] The fault state refers to the operating state of the motor controller when a level 3 or level 4 fault occurs in the motor controller, or when the angle calibration fails.

[0101] The fault level of the motor controller is determined according to the severity of the fault. There are four levels of fault levels, namely: level 4 fault, level 3 fault, level 2 fault and level 1 fault. Among them, level 1 fault and level 2 fault are faults that do not affect the function of the whole vehicle. Under level 1 fault and level 2 fault, the motor controller can still receive the instructions sent by the whole vehicle controller and enter the corresponding state according to the instructions to perform the corresponding function; when the fault condition is not met, the state machine of the motor controller can recover automatically. Level 3 fault and level 4 fault are faults that affect the normal driving of the vehicle. When the fault condition is not met, the state machine of the motor controller cannot recover automatically.

[0102] Among them, the fourth-level fault is a major fault of the motor system, indicating that the motor system cannot output energy, the IGBT is in the off-tube state, and the vehicle cannot drive; when the fault conditions are not met, the vehicle cannot drive. The third-level fault is a serious fault of the motor system, indicating that the motor system actively limits the power output to zero, the IGBT is in the open-tube state, and the vehicle cannot drive, but the motor controller can actively discharge; when the fault conditions are not met, the vehicle cannot drive. The second-level fault is a general fault of the motor system, indicating that the motor system reduces the power output, the IGBT is in the open-tube state, and the vehicle can drive; when the fault conditions are not met, the motor system can restore to normal output power when the vehicle is driving. The first-level fault is a minor fault of the motor system, indicating that the motor system can output full power, but a fault warning is issued, the IGBT is in the open-tube state, and the vehicle can drive; when the fault conditions are not met, the fault warning will no longer appear when the vehicle is driving.

[0103] Specifically, if a level 1 fault occurs in the initialization state, pre-charging state, standby state, torque control state, speed control state or angle marking state, the motor controller issues a fault warning; if a level 2 fault occurs in the initialization state, pre-charging state, standby state, torque control state, speed control state or angle marking state, the motor controller reduces power output; if a level 3 fault or a level 4 fault occurs in the initialization state, pre-charging state or standby state, the motor controller enters a fault state and controls the IGBT to remain in an off state; if a level 3 fault occurs in the torque control state, speed control state or angle marking state, the motor controller enters a fault state and controls the IGBT to remain in an open state, and enters a power-off state if a request for power-off is received from the vehicle controller; if a level 4 fault occurs in the torque control state, speed control state or angle marking state, the motor controller enters a fault state and controls the IGBT to switch from an open state to an off state; if the angle calibration fails in the angle marking state, the motor controller enters a fault state and controls the IGBT to switch from an open state to an off state.

[0104] In this embodiment, by defining the fault level and the state machine recovery status of the motor controller when the fault condition is not met, the purpose of the motor controller performing fault processing based on the state machine can be achieved.

[0105] In one embodiment, the active discharge entry condition includes the following four conditions being satisfied: the main positive contactor or the main negative contactor is in the disconnected state, the fault level does not exceed the third level fault, the bus voltage is not less than the first preset bus voltage, and the motor speed is less than the preset motor speed. The active discharge exit condition includes any one of the following four conditions: the bus voltage is less than the second preset bus voltage, a fourth level fault occurs, the active discharge duration exceeds the preset active discharge duration, and a request standby instruction sent by the vehicle controller is received.

[0106] Among them, the main positive contactor and the main negative contactor, power battery, DC capacitor, etc. form a complete power supply circuit to supply power to the motor, and the motor converts electrical energy into mechanical energy to drive the car. When the main positive contactor and the main negative contactor are both closed, the power supply circuit is turned on. At this time, the motor controller converts high-voltage DC power into AC power to supply power to the motor. When at least one of the main positive contactor and the main negative contactor is disconnected, the power supply circuit is not turned on. At this time, the motor controller cannot convert high-voltage DC power into AC power and cannot supply power to the motor.

[0107] For commercial vehicles, the main positive contactor is assembled with the high-voltage distribution box, which controls its closing or disconnection; the main negative contactor is assembled with the power battery, which is controlled by the battery management system. For passenger cars, both the main positive contactor and the main negative contactor are assembled with the power battery, which are controlled by the battery management system.

[0108] Faults with a fault level not exceeding level three include: a level one fault in the vehicle, a level two fault, and no fault. When the vehicle is driving, the bus voltage in the power supply circuit is the DC capacitor voltage of the motor controller. The first preset bus voltage, the second preset bus voltage, the preset motor speed, and the preset active discharge duration can be set according to the industry standards for new energy vehicles, or according to indicators in the actual production process. Among them, the first preset bus voltage is greater than the second preset bus voltage.

[0109] In this embodiment, the active discharge entry condition and the active discharge exit condition are obtained by analyzing the status information of the main positive contactor and the main negative contactor, the fault level, the bus voltage, the motor speed, the active discharge duration and the external instructions, so that the motor controller can judge whether the active discharge is completed by itself, thereby achieving the purpose of improving the control efficiency of the motor system.

[0110] In one embodiment, the motor control method also includes: in the power-off state, if a request standby instruction sent by the vehicle controller is received, determining whether the power-on jump condition is met, and the power-on jump condition is that the active discharge state has not been entered or the active discharge state has just been entered; if the power-on jump condition is met, entering the pre-charge state; in the pre-charge state, entering the standby state after staying for a preset pre-charge time.

[0111] Among them, just entering the active discharge state may be that the motor controller is in the active discharge state, and the difference between the DC capacitor voltage and the internal voltage of the power battery is a first voltage threshold, wherein the first voltage threshold is greater than the voltage threshold. The preset pre-charge time is a buffer time, which is used to ensure that the motor controller can communicate with the vehicle controller through the CAN bus when it is in the pre-charge state, and feed back the information that the motor controller is in the pre-charge state to the vehicle controller.

[0112] When the motor controller is powered off and then powered on quickly, if the high-voltage contactor is switched quickly, the current will be too large, causing a safety accident. In order to prevent damage to the high-voltage contactor and ensure the safety of high-voltage power-on, the motor controller needs to jump from the power-off state to the pre-charge state first, and then jump from the pre-charge state to the standby state, but not directly from the power-off state to the standby state. Therefore, in order to avoid the motor controller not having enough time to communicate with the vehicle controller through the CAN bus when it is in the pre-charge state due to too short a stay time in the pre-charge state, and to feed back the information of the motor controller in the pre-charge state to the vehicle controller, a preset pre-charge time needs to be set.

[0113] Specifically, when the motor controller is in the power-off state, if the vehicle has not suffered a level 3 fault or a level 4 fault, at this time, at least one of the main negative contactor and the main positive contactor is in the disconnected state, and the pre-charging contactor is in the disconnected state; when a request standby instruction is received from the vehicle controller, it is determined whether the power-on jump condition is met, and the power-on jump condition is that the vehicle has not entered the active discharge state or has just entered the active discharge state.

[0114] When the power-on jump condition is that the active discharge state has not been entered, if the power-on jump condition is met, the pre-charge state is entered. At this time, since the difference between the DC capacitor voltage and the internal voltage of the power battery is still less than the voltage threshold, there is no need to pre-charge the DC capacitor. At least one of the main negative contactor and the main positive contactor can be kept in a disconnected state, and the pre-charge contactor is in a disconnected state; the main negative contactor can also be controlled to be in a closed state, the main positive contactor to be in a disconnected state, and the pre-charge contactor to be in a closed state. At this time, although the pre-charge circuit is conductive, the DC capacitor has reached a saturated charge state. In the pre-charge state, the motor controller stays for a preset pre-charge time and then enters a standby state. In the standby state, the pre-charge contactor is controlled to be in a disconnected state, and the main positive contactor and the main negative contactor are in a closed state.

[0115] When the power-on jump condition is just entering the active discharge state, if the power-on jump condition is met, the pre-charge state is entered. At this time, since the difference between the DC capacitor voltage and the internal voltage of the power battery is the first voltage threshold, where the first voltage threshold is greater than the voltage threshold, it is necessary to pre-charge the DC capacitor in the pre-charge state, control the main negative contactor to be in a closed state, the main positive contactor to be in a disconnected state, and the pre-charge contactor to be in a closed state. When the motor controller stays in the pre-charge state for at least the preset pre-charge time and the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, it enters the standby state. In the standby state, the pre-charge contactor is controlled to be in a disconnected state, and the main positive contactor and the main negative contactor are in a closed state.

[0116] In this embodiment, when the motor controller is in a power-off state, if it receives a request standby command sent by the vehicle controller, and the motor controller has not entered the active discharge state or has just entered the active discharge state, it can jump from the power-off state to the pre-charging state, and enter the standby state after staying in the pre-charging state for a preset pre-charging time, thereby achieving the purpose of the motor controller executing the fast power-off and power-on function based on the state machine.

[0117] In another embodiment, Figure 4 As shown, a motor control method is provided, comprising:

[0118] 1. Configure the state machine of the motor controller (MCU), which includes Initial (initialization state), Precharge (precharge state), Standby (standby state), TrqCtrl (torque control state), SpdCtrl (speed control state), AgOffsetCal (angle state), Failure (fault state) and ShutDown (power-off state).

[0119] 2. Initial (initialization state) definition and jump conditions: When the MCU is in sleep state, after receiving hard line or network wake-up, it automatically enters Initial and performs initialization self-test. The initialization self-test includes completing RAM, ROM, EEPROM detection and current acquisition circuit calibration. During this process, if MCU level 3 or above fault occurs, the MCU jumps to Failure.

[0120] 3. Prechage (pre-charge state) definition and jump conditions: After the MCU completes the initialization self-test, it automatically enters Prechage. In this state, the MCU pre-charges its own DC-Link capacitor, monitors the DC-Link capacitor voltage in real time, and receives the internal voltage of the power battery transmitted by the CAN signal. The internal voltage of the power battery is monitored by the BMS; if the difference between the DC-Link capacitor voltage and the internal voltage of the power battery is less than 20V, the MCU determines that the pre-charge is completed, that is, the high-voltage power-on is completed, and the MCU jumps to Standby, otherwise it stays in Prechage. During this process, if an MCU level 3 or above fault occurs, the MCU jumps to Failure. During this process, if the HCU sends a request to enter the ShutDown command, the MCU jumps to ShutDown.

[0121] 4. Standby (standby state) definition and jump conditions: MCU completes high voltage power-up, but IGBT is not turned on. In this state, if MCU level 3 or above fault occurs, the MCU jumps to Failure. In this state, if HCU sends a request to enter TrqCtrl / SpdCtrl / AgOffsetCal / ShutDown command, the MCU jumps to the corresponding state.

[0122] 5. TrqCtrl (torque control state) definition and jump conditions: HCU sends a request to enter the TrqCtrl instruction to the MCU, requesting the MCU to enter TrqCtrl. At this time, the IGBT is turned on and the MCU receives the request sent by the HCU to enter the TrqCtrl instruction to control the motor to run in the four quadrants. During this process, if a MCU level 3 or above fault occurs, the MCU jumps to Failure. During this process, if the HCU sends a request to enter the Standby / SpdCtrl / ShutDown instruction, the MCU jumps to the corresponding state.

[0123] 6. Definition and jump conditions of SpdCtrl (speed control state): HCU sends a request to enter the SpdCtrl instruction to the MCU, requesting the MCU to enter SpdCtrl. At this time, the IGBT is turned on, and the MCU receives the request sent by HCU to enter the SpdCtrl instruction to control the motor to perform speed closed-loop control. During this process, if a MCU level 3 or above fault occurs, the MCU jumps to Failure. During this process, if the HCU sends a request to enter the Standby / TrqCtrl / ShutDown instruction, the MCU jumps to the corresponding state.

[0124] 7. Definition and jump conditions of AgOffsetCal (standard angle state): HCU or other host computer sends a request to enter the AgOffsetCal instruction to the MCU, requesting the MCU to enter AgOffsetCal. At this time, the IGBT is turned on and the MCU receives the request sent by the HCU to enter the AgOffsetCal instruction, self-learns the initial position angle of the motor resolver, and calibrates the initial position angle of the motor resolver. After the angle calibration is completed, the initial position angle of the motor resolver obtained by self-learning is written into the MCU as the initial position angle of the resolver set in the MCU. The MCU automatically enters Standby, and the IGBT is still in the off state. During this process, if the MCU fails at level 3 or above or the angle calibration fails, it jumps to Failure. During this process, the HCU or other host computer is not allowed to send a request to enter other working state instructions to the MCU.

[0125] 8. Failure (failure state) definition and jump conditions: If the MCU has a level 3 or higher fault or the motor system angle calibration fails, the MCU jumps to Failure. In this state, if the HCU requests the MCU to enter the ShutDown command, the MCU jumps to ShutDown.

[0126] 9. Definition and jump conditions of ShutDown (power-off state): If the HCU sends a request to enter the ShutDown instruction to the MCU, requesting the MCU to enter the ShutDown state, the MCU receives the request to enter the ShutDown instruction sent by the HCU, jumps into the ShutDown state, and determines whether the active discharge entry condition and the active discharge exit condition are met. When the active discharge entry condition is met, the MCU performs active discharge and controls the DC-Link capacitor to discharge the voltage. When the active discharge exit condition is met, the MCU controls the DC-Link capacitor to stop discharging the voltage, and the MCU remains in the ShutDown state.

[0127] 10. When the HCU sends a request to enter the EmShutDown command (emergency power-off command), the MCU must enter ShutDown in any state.

[0128] 11. The signals sent by HCU to MCU include the following: request to enter Standby command, request to enter TrqCtrl command, request to enter SpdCtrl command, request to enter ShutDown command, request to enter EmShutdown command, request to enter AgOffsetCal command. The above information only needs to occupy 3 bits in 1 bit of HCU communication to achieve.

[0129] 12. The signals sent by MCU to HCU include: Intial, Precharge, Standby, TrqCtrl, SpdCtrl, ShutDown, Failure, AgOffsetCal. The above information only needs to occupy 3 bits in 1 bit of MCU communication to achieve.

[0130] 13. There are four levels of MCU fault levels, namely, level 4 fault is a major fault of the motor system, indicating that the motor system cannot output energy, the IGBT shuts down and stops working, and when the fault conditions are not met, the current driving cycle (i.e., the state machine of the motor controller) cannot self-recover; level 3 fault is a serious fault of the motor system, indicating that the motor system actively limits the power output to 0, the IGBT can start working (such as active discharge function), and when the fault conditions are not met, the current driving cycle cannot self-recover; level 2 fault is a general fault of the motor system, the IGBT can start working, indicating that the motor system reduces power output, and when the fault conditions are not met, the current driving cycle can self-recover; level 1 fault is a minor fault of the motor system, the IGBT can start working, indicating that the motor system can output full power, but a fault warning is issued, and when the fault conditions are not met, the current driving cycle can self-recover.

[0131] In this embodiment, by providing a state machine and control method of a motor controller, the motor controller performs predefined functions based on the state machine, strengthens the MCU's judgment of the state of the whole vehicle, simplifies the control logic and interactive information between the MCU and the HCU, and greatly shortens the control time. Among them, the internal voltage information of the power battery and the state information of the main positive / main negative contactor of the motor system are introduced, and the MCU autonomously judges the pre-charging process and the MCU active discharge process, which can achieve the purpose of improving the control efficiency of the motor system. The state machine structure of the motor controller is concise and clear, the logical relationship is rigorous and clear, and each state jump has a state machine interlock, which can avoid the mis-issuance of instructions due to external interference of the whole vehicle or the immature control logic of the whole vehicle to the greatest extent, affecting the safety of the whole vehicle. This embodiment also considers the control of the motor system in an emergency situation of the whole vehicle, such as collision, serious failure of the whole vehicle, and serious failure of the high-voltage interlock. By receiving the emergency power-off command issued by the HCU through the MCU, the MCU can jump to ShutDown from any state, turn off the power output, and autonomously judge that the active discharge entry conditions are met, and discharge the DC-LINK capacitor voltage to ensure the high-voltage safety of the whole vehicle.

[0132] In another embodiment, Figure 5 As shown, a control method for a motor controller in a power-off state is provided, that is, a method for quickly powering off and then powering on the motor controller, comprising:

[0133] 1. During the pre-charging process of the MCU, it independently judges the voltage difference <U between the internal voltage of the power battery and the MCU bus voltage. When the MCU enters Standby, only after the HCU or BMS receives the Standby feedback from the MCU can it perform the operation of disconnecting the pre-charge contactor and closing the main positive contactor. That is, a state machine interlock needs to be done to ensure the safety of high-voltage power-on and prevent damage to the MCU. The BMS or the high-voltage distribution box (PDU) needs to detect pre-charge timeout faults. That is, after closing the main negative contactor and the pre-charge contactor, if the Standby feedback from the MCU is not received after T1 time, the BMS or PDU must report a pre-charge failure (pre-charge timeout) fault.

[0134] 2. It is recommended to set the value of the voltage difference U as U = 20V; the definition of the T1 time should be defined by the BMS or PDU manufacturer.

[0135] 3. Before the HCU sends the request TrqCtrl / SpdCtrl / AgOffsetCal instruction, it needs to judge that the MCU is in Standby, that is, the MCU has completed high-voltage power-on. At the same time, the HCU judges the disconnection state of the pre-charge contactor of the motor system and the closed states of the main positive and main negative contactors of the motor system. The purpose is to do a state machine interlock to ensure the safe operation of the entire motor system.

[0136] 4. When the vehicle performs a quick power-off and then power-on operation, when the MCU is in ShutDown but has not performed active discharge or the active discharge has just started, for example, when the voltage difference between the internal voltage of the power battery and the DC-LINK capacitor voltage of the MCU <U, the HCU sends a request to enter the Standby instruction. After the MCU judges that it meets the power-on jump condition, it needs to jump from ShutDown to Precharge and stay in Precharge for T2 time before entering Standby. The purpose is to do a state machine interlock to prevent damage to the high-voltage contactor and ensure the safety of high-voltage power-on.

[0137] 5. It is recommended to set the residence duration in Precharge as T2 = 70ms.

[0138] 6. After the MCU enters ShutDown from the high-voltage power-on state (including the standby state, torque control state, or speed control state), the MCU independently judges whether it meets the active discharge entry conditions and discharges the DC-LINK capacitor voltage.

[0139] 7. The MCU active discharge entry conditions include the following:

[0140] 1) The MCU is in ShutDown; 2) The MCU judges that the main positive contactor or the main negative contactor is in the disconnected state; 3) The MCU fault level is less than level four; 4) The MCU bus voltage ≥ 60V; 5) The motor speed < 100rpm.

[0141] 8. MCU active discharge exit conditions include the following:

[0142] 1) MCU bus voltage < 55V; 2) MCU has a fourth-level fault; 3) Active discharge duration > 5S; 4) HCU sends a request to enter the Standby instruction.

[0143] In this embodiment, the motor controller can realize the function of performing rapid power-off and power-on based on the state machine.

[0144] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0145] Based on the same inventive concept, the embodiment of the present application also provides a motor control device for implementing the motor control method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more motor control device embodiments provided below can refer to the limitations of the motor control method above, and will not be repeated here.

[0146] In one embodiment, Figure 6 As shown, a motor control device 600 is provided, including: a power-on module 602 and a control module 604, wherein:

[0147] The power-on module 602 is used to enter the initialization state if a hardware or network wake-up signal is received in the sleep state, and perform initialization in the initialization state. If the initialization is completed, it enters the pre-charging state.

[0148] The power-on module 602 is also used to pre-charge the DC capacitor in the pre-charging state and monitor the DC capacitor voltage. If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, it is determined that the pre-charging is completed and enters the standby state.

[0149] The control module 604 is used to enter the corresponding torque control state, speed control state or angle control state when receiving a request for torque control command, speed control command or angle control command sent by the vehicle controller in the standby state, and control the IGBT to switch from the off state to the on state.

[0150] The control module 604 is also used to control the motor to run in four quadrants in the torque control state. If a request for standby or a request for speed control is received from the vehicle controller, the control module 604 enters the corresponding standby state or speed control state.

[0151] The control module 604 is also used to control the motor to perform closed-loop speed control in the speed control state. If a request standby command or a request torque control command sent by the vehicle controller is received, the corresponding standby state or torque control state is entered.

[0152] The control module 604 is also used to calibrate the initial position angle of the motor resolver in the angle calibration state, and enter the standby state if the angle calibration is completed.

[0153] In one embodiment, the power-on module 602 is also used to control the main negative contactor of the power battery to be in a closed state through the battery management system in the pre-charging state, and to control the pre-charging contactor of the high-voltage distribution box to be in a closed state and the main positive contactor to be in a disconnected state through the high-voltage distribution box, so as to pre-charge the DC capacitor; if the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, it is determined that the pre-charging is completed, and the standby state is entered, and the standby state signal is fed back to the vehicle controller, and the pre-charging contactor is disconnected and the main positive contactor is closed through the high-voltage distribution box.

[0154] In one embodiment, the motor control device also includes a power-off module 606, which is used to enter the power-off state if a power-off request instruction sent by the vehicle controller is received when the motor controller is in any of the pre-charging state, standby state, torque control state, and speed control state; in the power-off state, if the active discharge entry condition is met, the active discharge state is entered to control the DC capacitor voltage to discharge; in the active discharge state, if the active discharge exit condition is met, the DC capacitor voltage is controlled to stop discharging and enter the power-off state.

[0155] In one embodiment, the fault levels are divided into four-level faults, three-level faults, two-level faults and one-level faults according to the severity. The motor control device also includes a fault module 608, which is used to issue a fault warning if a first-level fault occurs in the initialization state, pre-charging state, standby state, torque control state, speed control state or angle marking state; reduce the power output if a second-level fault occurs in the initialization state, pre-charging state, standby state, torque control state, speed control state or angle marking state; enter a fault state if a third-level fault or a fourth-level fault occurs in the initialization state, pre-charging state or standby state, and control the IGBT to maintain the off-tube state; in the torque control state, speed control state or angle marking state, if a third-level fault occurs, enter a fault state, control the IGBT to maintain the open-tube state, and enter the power-off state if a request for power-off sent by the vehicle controller is received; if a fourth-level fault occurs, enter a fault state, control the IGBT to switch from the open-tube state to the off-tube state; in the angle marking state, if the angle calibration is not completed, enter a fault state, and control the IGBT to switch from the open-tube state to the off-tube state.

[0156] In one embodiment, the active discharge entry conditions include the following four conditions being met: the main positive contactor or the main negative contactor is in the disconnected state, the fault level does not exceed the third level fault, the bus voltage is not less than the first preset bus voltage, and the motor speed is less than the preset motor speed; the active discharge exit conditions include any one of the following four conditions: the bus voltage is less than the second preset bus voltage, a fourth level fault occurs, the active discharge duration exceeds the preset active discharge duration, and a request standby instruction sent by the vehicle controller is received.

[0157] In one embodiment, the power-off module 606 is also used to determine whether the power-on jump condition is met when it receives a request standby instruction sent by the vehicle controller in the power-off state. The power-on jump condition is that it has not entered the active discharge state or has just entered the active discharge state; if the power-on jump condition is met, it enters the pre-charging state; in the pre-charging state, it enters the standby state after staying for a preset pre-charging time.

[0158] Each module in the above motor control device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of the processor in the motor controller in the form of hardware, or can be stored in the memory in the motor controller in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0159] In one embodiment, a motor controller is provided, the internal structure diagram of which can be as follows: Figure 7As shown. The motor controller includes a control mainboard, an IGBT module, a film capacitor, and an interface circuit. Among them, the IGBT module, the film capacitor and the interface circuit are connected through the control mainboard. Among them, a processor and a memory are provided on the control mainboard of the motor controller, the processor is used to provide computing and control capabilities, and the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the motor controller is used to store data such as the film capacitor voltage, the internal voltage of the power battery, the voltage threshold, the initial position angle of the motor rotary transformer, the motor speed, the preset motor speed, the first preset bus voltage, the second preset bus voltage, the active discharge duration, the preset active discharge duration, and the preset pre-charge time. The IGBT module of the motor controller includes an IGBT, which is used to convert the DC power supply into AC power according to the instructions of the control mainboard. The film capacitor of the motor controller is used for energy storage, charging and discharging. The communication interface of the motor controller is used to control the mainboard and the vehicle controller to communicate through the CAN bus. When the computer program is executed by the processor, a motor control method is implemented.

[0160] Those skilled in the art will understand that Figure 7 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the motor controller to which the scheme of the present application is applied. The specific motor controller may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0161] In one embodiment, a motor controller is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0162] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0163] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0164] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0165] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0166] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0167] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A motor control method, characterized in that: The method is executed by a motor controller, wherein the state machine of the motor controller includes an initialization state, a pre-charge state, a standby state, a torque control state, a speed control state and an angle mark state. The method includes: In the dormant state, if a hardware or network wake-up signal is received, the device enters the initialization state. In the initialization state, the device performs initialization. If the initialization is completed, the device enters the pre-charge state. In the pre-charging state, the DC capacitor is pre-charged and the DC capacitor voltage is monitored. If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, the pre-charging is determined to be completed and the standby state is entered; In the standby state, if a torque control command, speed control command or angle control command is received from the vehicle controller, the corresponding torque control state, speed control state or angle control state is entered, and the IGBT is controlled to switch from the off state to the on state; In the torque control state, the motor is controlled to run in the four quadrants. If a request for standby or a request for speed control is received from the vehicle controller, the corresponding standby state or speed control state is entered; In the speed control state, the motor is controlled to perform speed closed-loop control. If a request for standby or request for torque control is received from the vehicle controller, the corresponding standby state or torque control state is entered; In the angle calibration state, the initial position angle of the motor resolver is calibrated. If the angle calibration is completed, the standby state is entered.

2. The method according to claim 1, characterized in that: In the pre-charging state, the DC capacitor is pre-charged and the DC capacitor voltage is monitored. If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, it is determined that the pre-charging is completed and the standby state is entered, including: In the pre-charging state, the main negative contactor of the power battery is controlled to be in a closed state through the battery management system, and the pre-charging contactor of the high-voltage distribution box is controlled to be in a closed state and the main positive contactor is in a disconnected state through the high-voltage distribution box to pre-charge the DC capacitor; If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, the pre-charging is determined to be completed, and the vehicle enters the standby state. The standby state signal is fed back to the vehicle controller, and the pre-charging contactor is disconnected and the main positive contactor is closed through the high-voltage distribution box.

3. The method according to claim 1, characterized in that The state machine of the motor controller also includes a power-off state, and the method further includes: When the motor controller is in any of the pre-charging state, the standby state, the torque control state, and the speed control state, if a power-off request instruction sent by the vehicle controller is received, the power-off state is entered; In the power-off state, if the active discharge entry conditions are met, the active discharge state is entered to control the DC capacitor voltage discharge; In the active discharge state, if the active discharge exit condition is met, the DC capacitor voltage is controlled to stop discharging and enter the power-off state.

4. The method according to claim 3, characterized in that The state machine of the motor controller also includes a fault state, and the fault level is divided into a fourth-level fault, a third-level fault, a second-level fault and a first-level fault according to the severity. The method also includes: In the initialization state, pre-charging state, standby state, torque control state, speed control state or angle marking state, if a primary fault occurs, a fault warning will be issued; In the initialization state, pre-charge state, standby state, torque control state, speed control state or angle control state, if a secondary fault occurs, the power output will be reduced; In the initialization state, pre-charge state or standby state, if a third-level fault or a fourth-level fault occurs, the fault state is entered and the IGBT is controlled to remain in the off state; In the torque control state, speed control state or angle control state, if a third-level fault occurs, the system enters the fault state and controls the IGBT to remain in the open state. If a power-off request is received from the vehicle controller, the system enters the power-off state. If a fourth-level fault occurs, the system enters the fault state and controls the IGBT to switch from the open state to the closed state. In the angle calibration state, if the angle calibration is not completed, the fault state is entered and the IGBT is controlled to switch from the on-state to the off-state.

5. The method according to claim 4, characterized in that The active discharge entry conditions include the following four conditions being satisfied: the main positive contactor or the main negative contactor is in the disconnected state, the fault level does not exceed the third level fault, the bus voltage is not less than the first preset bus voltage, and the motor speed is less than the preset motor speed; The active discharge exit condition includes any one of the following four situations: the bus voltage is less than the second preset bus voltage, a fourth-level fault occurs, the active discharge duration exceeds the preset active discharge duration, and a request standby instruction sent by the vehicle controller is received.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: In the power-off state, if a request standby command sent by the vehicle controller is received, it is determined whether a power-on jump condition is met, and the power-on jump condition is that the active discharge state has not been entered or the active discharge state has just been entered; If the power-on jump condition is met, the pre-charge state is entered; In the pre-charging state, it stays for the preset pre-charging time and then enters the standby state.

7. A motor control device, characterized in that: The device comprises: The power-on module is used to enter the initialization state if a hardware or network wake-up signal is received in the sleep state, and to perform initialization in the initialization state. If the initialization is completed, the module enters the pre-charge state; The power-on module is also used to pre-charge the DC capacitor in the pre-charging state and monitor the DC capacitor voltage. If the difference between the DC capacitor voltage and the internal voltage of the power battery is less than the voltage threshold, it is determined that the pre-charging is completed and enters the standby state; The control module is used for, in the standby state, if receiving a torque control request instruction, a speed control request instruction or an angle marking request instruction sent by the vehicle controller, entering the corresponding torque control state, speed control state or angle marking state, and controlling the IGBT to switch from the off-tube state to the on-tube state; The control module is also used to control the motor to run in four quadrants in the torque control state, and enter the corresponding standby state or speed control state if a request for standby command or a request for speed control command sent by the vehicle controller is received; The control module is also used to control the motor to perform speed closed-loop control in the speed control state, and enter the corresponding standby state or torque control state if a request standby command or a request torque control command sent by the vehicle controller is received; The control module is also used to calibrate the initial position angle of the motor resolver in the angle calibration state. If the angle calibration is completed, the control module enters the standby state.

8. A motor controller, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Automotive motor controller and controlling method thereof

    CN104022700A

  • Vehicle power-on control method and device, vehicle and storage medium

    CN110341624A