Motor controller control method and system based on state dynamic switching
Patent Information
- Application Number
- CN202611272099.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-09-25
AI Technical Summary
[0003]现有上下电控制策略在流程完整性和故障处理精细度方面存在一定不足,在复杂工况下响应不够精确,尤其在急加速、急减速等工况下时序容易出现偏差,以及故障诊断和容错策略上存在故障诊断死区,对突发故障的响应不够及时
本发明提供了一种基于状态动态切换的电机控制器控制方法及系统,将电机控制器的工作状态划分为初始化流程、低压待机流程、高压待机流程、运行流程、故障流程、泄放流程、休眠流程和关闭流程,各流程之间依据预定条件相互转换,形成完整的闭环控制逻辑,且设计了故障模式中的双向处理逻辑——既可向下进入泄放流程,也可在故障降级后向上恢复至正常工作流程——使电机控制器具备了完善的故障容错能力,提升了系统的安全性。
Smart Images

Figure CN122808499A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of motor controller technology, and particularly relates to a motor controller control method and system based on dynamic state switching. Background Technology
[0002] The new energy motor controller (MCU) is the core control unit of the drive motor system, and its power-on and power-off control strategies are directly related to the safety and reliability of the vehicle's high-voltage system. The motor controller interacts with the vehicle controller in real time through a CAN network, monitors the motor's operating status using current, voltage, and temperature sensors, and adjusts the voltage, current, and temperature based on the collected parameters.
[0003] Existing power-on / off control strategies have certain shortcomings in terms of process integrity and fault handling precision. They are not accurate enough in response to complex operating conditions, especially in the case of rapid acceleration and deceleration, where timing deviations are prone to occur. Furthermore, there are fault diagnosis dead zones in fault diagnosis and fault tolerance strategies, and the response to sudden faults is not timely enough. Summary of the Invention
[0004] To overcome the shortcomings of the prior art, this invention provides a motor controller control method and system based on dynamic state switching. The working state of the motor controller is divided into initialization process, low-voltage standby process, high-voltage standby process, running process, fault process, discharge process, hibernation process, and shutdown process. Each process is mutually converted according to predetermined conditions to form a complete closed-loop control logic. Furthermore, a bidirectional processing logic is designed in the fault mode—it can either enter the discharge process or recover to the normal working process after the fault is downgraded—giving the motor controller a complete fault tolerance capability and improving the system's safety.
[0005] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions: The first aspect of this invention provides a motor controller control method based on dynamic state switching.
[0006] The motor controller control method based on dynamic state switching includes the following steps: Perform an initialization self-test on the motor controller and obtain the self-test results; The fault level is determined based on the self-test results. If the fault level is not lower than the preset level threshold, the fault mode is entered. If the fault level is lower than the preset level threshold, the zero drift data of the drive motor is tested to obtain the zero drift test result. If the zero-drift test result is qualified, it enters low-voltage standby mode; if the zero-drift test result is unqualified, it enters fault mode. In failure mode: If the motor controller receives any of the following states from the vehicle controller: a power-down request, a collision discharge request, or a battery relay disconnect signal, it will enter the discharge process. If the fault level drops below the preset level threshold, the corresponding response process will be initiated according to the current instructions from the vehicle controller.
[0007] By using the above method, a zero-drift data detection step is introduced into the low-voltage power-on process, and a two-way processing logic in the fault mode is designed—it can either enter the discharge process downwards or recover to the normal working process after the fault is downgraded—giving the motor controller a complete fault tolerance capability.
[0008] As alternative technical solutions, the following also include: Upon receiving a high-voltage request command from the vehicle controller, the motor controller performs pre-charging of its internal voltage and enters high-voltage standby mode once the internal voltage exceeds the undervoltage threshold. It receives operating commands from the vehicle controller and controls the motor to operate according to the corresponding operating mode. Receive the power-down trigger signal and execute the discharge process.
[0009] As an alternative technical solution, in the low-voltage standby state, if the motor controller receives any of the following states from the vehicle controller: power-down request, collision discharge request, battery relay disconnection signal, key signal off, or network management message disappearance, then the motor controller enters the discharge process.
[0010] By monitoring the above-mentioned multiple triggering conditions, the motor controller can respond in a timely manner in any scenario where power needs to be cut off, thereby improving the safety of the system.
[0011] As an optional technical solution, the motor operation is controlled according to the corresponding operating mode: If the motor controller receives any of the following states from the vehicle controller: a power-down request, a collision discharge request, or a battery relay disconnect signal, it will enter the discharge process. If the fault level is not lower than the preset level threshold during operation, the system will enter fault mode.
[0012] This mechanism ensures that in the event of an emergency during operation, the motor controller can respond immediately and execute the appropriate safety procedures.
[0013] As an alternative technical solution, the leakage process includes: The motor controller is controlled to actively discharge, releasing the internal voltage to below the safe voltage. If active discharge is not completed within the first time limit, switch to passive discharge and report an active discharge timeout fault, and continue to release the internal voltage to below the safe voltage. Passive discharge must release the internal voltage to below the safe voltage within the second time limit. If the discharge is not completed within the second time limit, a passive discharge timeout fault will be reported and the discharge will continue.
[0014] By establishing a dual discharge mechanism that combines active and passive discharge, and automatically switching to passive discharge and reporting the fault when active discharge times out, the high-voltage system can reliably discharge to below the safe voltage under various operating conditions.
[0015] As an alternative technical solution, during the discharge process, if a low-voltage standby request or a high-voltage standby request is received from the vehicle controller, and the fault level is lower than the preset level threshold, and there is a key hardwire signal or network management message on the network, then the discharge is stopped and the vehicle controller command is responded to.
[0016] As an alternative technical solution, after executing the discharge process, the system enters a sleep state when four conditions are met simultaneously: the key signal is off, there are no network management messages in the vehicle network, the drive motor speed is below the speed threshold, and the bus voltage is below the safe voltage.
[0017] By requiring four conditions to be met simultaneously before entering hibernation, a strict multi-condition joint hibernation judgment mechanism was established, eliminating the safety hazard of mistakenly entering hibernation due to lax hibernation conditions.
[0018] As an alternative technical solution, in the sleep state, if a low-voltage standby request or a high-voltage standby request is received from the vehicle controller, and the fault level is lower than the preset level threshold, and there is a key hardwire signal or network management message on the network, then the sleep state is exited and the vehicle controller command is responded to. When in hibernation mode, if there is no work requirement, the system will continue to enter deep sleep after a preset hibernation duration.
[0019] As an alternative technical solution, the motor controller uploads controller status information and fault information to the vehicle controller in real time, and sends the drive motor speed information to the instrument; the controller status information includes operating parameters collected by current sensors, voltage sensors and temperature sensors.
[0020] By uploading status and fault information in real time throughout the entire process, coordinated linkage between the motor controller, vehicle controller, and instrument panel is achieved, enabling the vehicle system to make corresponding decisions based on the real-time status of the motor controller.
[0021] A second aspect of the present invention provides a motor controller control system based on dynamic switching of fault states.
[0022] A motor controller control system based on dynamic state switching includes: The self-test module is configured to perform an initialization self-test on the motor controller and obtain the self-test results. The zero-drift detection module is configured to: determine the fault level based on the self-test results; if the fault level is not lower than the preset level threshold, enter the fault mode; if the fault level is lower than the preset level threshold, perform detection on the zero-drift data of the drive motor to obtain the zero-drift detection result. The low-voltage standby module is configured to: enter low-voltage standby mode when the zero-drift test result is qualified; and enter fault mode when the zero-drift test result is unqualified. The fault mode bidirectional switching module is configured as follows: In fault mode: If the motor controller receives any of the following states from the vehicle controller: a power-down request, a collision discharge request, or a battery relay disconnect signal, it will enter the discharge process. If the fault level drops below the preset level threshold, the corresponding response process will be initiated according to the current instructions from the vehicle controller.
[0023] The above one or more technical solutions have the following beneficial effects: This invention provides a motor controller control method and system based on dynamic state switching. The working state of the motor controller is divided into initialization process, low-voltage standby process, high-voltage standby process, running process, fault process, discharge process, hibernation process and shutdown process. Each process is converted to another according to predetermined conditions to form a complete closed-loop control logic. Furthermore, a bidirectional processing logic is designed in the fault mode - it can either enter the discharge process or recover to the normal working process after the fault is downgraded - giving the motor controller a complete fault tolerance capability and improving the safety of the system.
[0024] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0025] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0026] Figure 1 This is a flowchart of the method in Example 1. Detailed Implementation
[0027] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0028] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.
[0029] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0030] Example 1 The motor controller establishes communication connections with the vehicle controller, TCU, and instrument cluster via the vehicle data transmission network (CAN network). Internally, the motor controller is equipped with current, voltage, and temperature sensors to collect real-time motor operating status data. The current sensor detects the actual operating current of the motor, including bus current and three-phase AC current; the voltage sensor detects the actual voltage supplied to the motor controller, including the power battery voltage and the 12-volt battery voltage; and the temperature sensor detects the operating temperature of the motor control system, including the temperature of the IGBT modules. The data collected by these sensors is processed by the motor controller in real time and uploaded to the vehicle controller via the CAN network, providing controller status and fault information. Simultaneously, the drive motor speed information is sent to the instrument cluster for display.
[0031] There is a control strategy for powering on and off an electric vehicle motor controller in the prior art. This scheme includes a low-voltage power-on process, a high-voltage power-on process, an active discharge process, and a high-voltage power-off process. The control process jumps based on a three-level fault as a binary judgment criterion, and enters sleep mode after high-voltage power-off.
[0032] However, this solution has a single operating mode, with only a unified motor operation process control mode, which cannot flexibly switch between multiple control modes according to the needs of the vehicle. The discharge process also lacks interrupt recovery logic to respond to the vehicle controller's re-request, resulting in insufficient flexibility in system state switching. After active discharge drops below 36 volts, it directly enters sleep mode, lacking a dual guarantee mechanism of automatically switching to passive discharge after active discharge timeout, resulting in insufficient high-voltage release reliability. The sleep mode judgment conditions are not strict, lacking multi-condition joint judgment, which poses a risk of erroneously entering sleep mode. The low-voltage power-on process lacks a detection step for drive motor zero drift data, and the motor zero drift deviation cannot be identified before entering the operating state, affecting operating accuracy. The fault level is only judged binaryly at level three, which is not precise enough for fault handling response under complex operating conditions.
[0033] Based on this, this embodiment relates to a motor controller control method based on dynamic state switching. The method takes a state machine as the core architecture and divides the working state of the motor controller into initialization process, low-voltage standby process, high-voltage standby process, running process, fault process, discharge process, hibernation process and shutdown process. Each process is converted to the other according to predetermined conditions to form a complete closed-loop control logic.
[0034] Overall, the motor controller control method based on dynamic state switching provided in this embodiment, such as Figure 1 As shown, it includes the following steps: Perform an initialization self-test on the motor controller and obtain the self-test results; The fault level is determined based on the self-test results. If the fault level is not lower than the preset level threshold, the fault mode is entered. If the fault level is lower than the preset level threshold, the zero drift data of the drive motor is tested to obtain the zero drift test result. If the zero-drift test result is qualified, it enters low-voltage standby mode; if the zero-drift test result is unqualified, it enters fault mode. In failure mode: If the motor controller receives any of the following states from the vehicle controller: a power-down request, a collision discharge request, or a battery relay disconnect signal, it will enter the discharge process. If the fault level drops below the preset level threshold, the corresponding response process will be initiated according to the current instructions from the vehicle controller.
[0035] Also includes: Upon receiving a high-voltage request command from the vehicle controller, the motor controller performs pre-charging of its internal voltage and enters high-voltage standby mode once the internal voltage exceeds the undervoltage threshold. It receives operating commands from the vehicle controller and controls the motor to operate according to the corresponding operating mode. Receive the power-down trigger signal and execute the discharge process.
[0036] In the technical solution of this embodiment: A two-way processing logic was designed in the fault mode—it can either enter the discharge process downwards or recover to the normal working process after the fault is degraded—giving the motor controller a complete fault tolerance capability. It provides logic for recovering from the interruption of the discharge process, realizing complete closed-loop control from initialization self-test to sleep state; A dual discharge mechanism combining active and passive discharge is established, and the system automatically switches to passive discharge and reports the fault when the active discharge times out, ensuring that the high voltage system can reliably discharge to below the safe voltage under various operating conditions. The dual discharge mechanism, which automatically switches to passive discharge after active discharge timeout during the discharge process, combined with the set multi-condition joint hibernation judgment logic, significantly improves the reliability of high-voltage system release and the accuracy of hibernation state entry. A step for detecting zero drift data of the drive motor has been added to the low-voltage power-on process, so that the zero drift deviation of the motor can be identified and processed before entering the running state. The operation process is divided into three modes: speed control mode, torque control mode, and voltage control mode, enabling the motor controller to respond flexibly according to the actual needs of the vehicle controller.
[0037] Next, the technical solution of this embodiment will be explained in detail. The complete execution process of the motor controller control method based on dynamic state switching in this embodiment is as follows: I. Wake-up and Initialization Process.
[0038] The motor controller is initially in a shutdown or deep sleep state. When the vehicle's hardwired key signal is in the ON or ACC position, the hardwired signal is transmitted to the motor controller via the key's hardwire. Upon detecting this signal, the motor controller exits the shutdown or deep sleep state and enters the initialization process, starting to perform the initialization self-test.
[0039] In addition to the hard-wired key signal, when a network management message exists on the vehicle's CAN network, the motor controller can also detect the message and be woken up to enter the initialization process.
[0040] The two wake-up paths described above are independent of each other; the motor controller can be woken up as long as either condition is met. Hard-wired key signal wake-up is suitable for scenarios where the driver starts the vehicle using a key or button; network management message wake-up is suitable for scenarios where other controllers in the vehicle initiate communication requests via the network, requiring the motor controller to participate in collaborative work. Both wake-up methods ensure that the motor controller can respond reliably in different vehicle wake-up scenarios.
[0041] After entering the initialization process, the motor controller performs a self-test on its hardware, software, and communication status. The self-test includes: Perform a hardware status check on the acquisition paths of the current sensor, voltage sensor, and temperature sensor to confirm that the signals of each sensor are within the normal range. Perform software self-checks on the storage integrity and runtime status of the control program; Perform a communication self-test on the CAN network communication link to confirm whether the communication channel with the vehicle controller is established normally.
[0042] During the self-test, the motor controller performs real-time fault level assessment on detected anomalies. The fault level adopts a multi-level classification mechanism. When there is a fault with a fault level not lower than the preset level threshold in the self-test results, the motor controller directly enters the fault process; when the level of all faults in the self-test results is lower than the preset level threshold, the motor controller exits the initialization process, enters the low-voltage power-on process, and executes the subsequent zero-drift data detection steps.
[0043] In some implementations, the preset fault level threshold is 5. When the fault level is below 5, it is considered a minor fault, and the motor controller can continue to execute subsequent processes; when the fault level is not lower than 5, it is considered a serious fault, and the motor controller immediately enters the fault process.
[0044] This hierarchical mechanism enables the system to adopt differentiated handling strategies for faults of different severities. While ensuring rapid isolation of severe faults, it allows the corresponding processes to continue to be executed under the condition of minor faults, avoiding the problem of excessive interruption caused by handling faults with only binary judgment.
[0045] II. Low-voltage power-on process and zero-drift detection.
[0046] After the motor controller completes its initialization self-test and the fault level is below the preset threshold, it enters the low-voltage power-on process. During the low-voltage power-on process, the motor controller continues to monitor the fault level while simultaneously detecting the zero-drift data of the drive motor, obtaining the zero-drift detection result.
[0047] Zero drift deviation of a drive motor refers to the non-zero bias signal output by the current sensor or control circuit when no actual current flows through it. If the zero drift deviation exceeds the allowable range and is not detected, the motor controller will perform control calculations based on the biased current signal during subsequent operation, resulting in a systematic deviation between the actual output torque or speed and the target value, affecting the motor's operating accuracy.
[0048] Therefore, performing zero-drift detection before the motor enters the running state is a necessary step to ensure the accuracy of motor control.
[0049] The zero-drift detection process is as follows: When the motor is stationary and not powered on, the motor controller reads the output signal of the current sensor and compares it with the standard zero-point reference value to determine whether the deviation is within the allowable range. If the deviation is within the allowable range, the zero-drift test result is deemed qualified; if the deviation exceeds the allowable range, the zero-drift test result is deemed unqualified.
[0050] When the zero-drift test result is qualified and the fault level is lower than the preset level threshold, the motor controller enters the low-voltage standby state and waits for the vehicle controller to issue the next instruction.
[0051] In some implementations, when the zero-drift detection result is unqualified, the motor controller enters a fault procedure. In the fault procedure, if the fault level decreases to below a preset level threshold, the motor controller re-enters the corresponding procedure according to the current instruction of the vehicle controller; if the current instruction of the vehicle controller is low-voltage standby, the low-voltage power-on procedure and zero-drift detection are re-executed; if the current instruction of the vehicle controller is high-voltage standby, the high-voltage power-on procedure is continued after the low-voltage standby state is established.
[0052] This fault degradation recovery mechanism enables the motor controller to automatically return to normal operating procedures after the fault is cleared, without the need for manual intervention.
[0053] In low-voltage standby mode, the motor controller continuously monitors commands from the vehicle controller and vehicle status signals. If it receives any of the following statuses from the vehicle controller in low-voltage standby mode: power-down request, collision discharge request, battery relay disconnection signal, key signal off, or network management message disappearance, the motor controller immediately enters the discharge process and performs a high-voltage release operation.
[0054] The monitoring of the above-mentioned multiple triggering conditions ensures that the motor controller can respond in a timely manner in any scenario where power needs to be cut off, thereby improving the safety of the system.
[0055] III. High-voltage power-on procedure.
[0056] In low-voltage standby mode, if the motor controller receives a high-voltage request command from the vehicle controller, it enters the high-voltage power-on process. Upon receiving the high-voltage request command, the motor controller performs a pre-charge operation on the internal high-voltage capacitor, gradually raising the internal voltage to the target level through the pre-charge circuit. During pre-charge, the voltage sensor monitors the internal voltage of the motor controller in real time, comparing the detected internal voltage with an undervoltage threshold. When the internal voltage exceeds the undervoltage threshold, pre-charge is complete, and the motor controller enters high-voltage standby mode.
[0057] In high-voltage standby mode, the motor controller continuously monitors the fault level in real time. If the fault level detected during high-voltage standby is not lower than the preset level threshold, the motor controller immediately enters the fault procedure. In the fault procedure, if the fault level drops below the preset level threshold and the internal voltage is higher than the undervoltage threshold, the motor controller re-enters the high-voltage standby mode according to the current instructions from the vehicle controller, preparing to respond to the operation instructions.
[0058] IV. Three-mode operation process.
[0059] In high-voltage standby mode, the motor controller awaits operating commands from the vehicle controller. Based on the actual needs of the vehicle, the vehicle controller can send one of three types of operating commands to the motor controller: speed control, torque control, or voltage control. Upon receiving the operating command, the motor controller determines the corresponding operating mode from these three options and controls the drive motor to operate accordingly.
[0060] In speed control mode, the vehicle controller sends a target speed command to the motor controller. The motor controller uses the actual speed of the drive motor as the controlled variable, adjusting the PWM output to control the current and voltage of the drive motor, ensuring that the actual speed of the drive motor follows the target speed sent by the vehicle controller. Current sensors collect real-time data on the bus current and three-phase AC current, voltage sensors collect real-time data on the power battery voltage, and temperature sensors collect real-time data on the IGBT module temperature. All of this sensor data serves as input parameters for the speed control algorithm, used to adjust the control output in real time, ensuring the stability and accuracy of speed control. Speed control mode is suitable for scenarios requiring precise control of motor speed, such as when the vehicle needs to maintain a stable driving speed under specific operating conditions.
[0061] In torque control mode, the vehicle controller sends a target torque command to the motor controller. The motor controller uses the output torque of the drive motor as the controlled variable and adjusts the amplitude and phase of the three-phase AC current to make the actual output torque of the drive motor follow the target torque sent by the vehicle controller. Torque control mode is the most commonly used operating mode in the drive system of new energy vehicles. The vehicle controller calculates the target torque based on the driver's accelerator pedal signal, brake pedal signal, and the vehicle's power demand, and sends it to the motor controller via the CAN network. The motor controller executes torque following control in real time to realize the vehicle's driving and braking energy recovery.
[0062] In voltage control mode, the vehicle controller sends a target voltage command to the motor controller. The motor controller uses the motor port voltage as the controlled variable and adjusts the PWM output to maintain the motor port voltage at the target level. Voltage control mode is suitable for scenarios requiring precise management of the motor-side voltage under specific vehicle operating conditions, such as situations where power balance needs to be achieved through voltage control in certain energy management strategies.
[0063] All three operating modes are selected and commanded by the vehicle controller based on the actual needs of the vehicle. The motor controller automatically switches to the corresponding mode according to the type of operating command received. During operation, if the vehicle controller issues a new operating mode command, the motor controller switches the operating mode according to the new command, realizing flexible switching between modes and meeting the diverse control needs of the vehicle under different operating conditions.
[0064] During operation, the motor controller continuously monitors the fault level in real time. If a fault level is detected to be above a preset threshold during operation, the motor controller immediately enters a fault procedure, blocks the PWM output, stops controlling the drive motor, and reports the fault information to the vehicle controller via the CAN network.
[0065] If the motor controller receives any of the following states during operation: a power-down request, a collision discharge request, or a battery relay disconnection signal from the vehicle controller, it will immediately enter the discharge process and perform a high-voltage release operation.
[0066] V. Fault Procedure.
[0067] The fault procedure is the safety protection state that the motor controller enters when it detects a serious fault.
[0068] If the motor controller detects a fault level that is not lower than the preset threshold level at any stage of the initialization process, low-voltage power-on process, high-voltage standby state, operation process, or discharge process, it will immediately enter the fault process.
[0069] After entering the fault process, the motor controller blocks the PWM output and stops actively controlling the drive motor. At the same time, it reports the current fault information, including fault codes and relevant operating parameters, to the vehicle controller in real time through the CAN network, so that the vehicle controller can make corresponding decisions for the vehicle system based on the fault status of the motor controller.
[0070] During the fault procedure, the motor controller continuously monitors changes in the fault level. If the fault level decreases below the preset threshold due to the elimination or mitigation of the fault cause, the motor controller exits the fault procedure and enters the corresponding response procedure based on the current instructions from the vehicle controller.
[0071] If the current command from the vehicle controller is low-voltage standby, the motor controller will re-enter the low-voltage power-on process; if the current command from the vehicle controller is high-voltage standby and the internal voltage is higher than the undervoltage threshold, the motor controller will re-enter the high-voltage standby state; if the current command from the vehicle controller is a running command, the motor controller will enter the corresponding running mode after the high-voltage condition is met.
[0072] The aforementioned fault degradation recovery mechanism enables the motor controller to automatically return to normal operating procedures without the need for manual intervention at the vehicle level.
[0073] During the fault procedure, if the motor controller receives any of the following states: power-down request, collision discharge request, or battery relay disconnection signal from the vehicle controller, it will immediately enter the discharge procedure and perform high-voltage release operation to ensure that the high-voltage system can be safely released even in a fault state.
[0074] VI. Dual-release process.
[0075] The discharge process is a crucial step in the motor controller to release the high-voltage energy stored in the internal high-voltage capacitor to below the safe voltage. Its reliable execution is directly related to the safety of the vehicle's high-voltage system.
[0076] The triggering conditions for the leakage process include: Upon receiving a power-down request from the vehicle controller, a collision discharge request, or a battery relay disconnect signal, the motor controller immediately enters the discharge process when any of the above triggering conditions are met, whether in low-voltage standby, operating, or fault states.
[0077] After entering the discharge process, the motor controller first performs active discharge.
[0078] Active discharge refers to the motor controller actively controlling its internal discharge circuit to release the electrical energy stored in the high-voltage capacitor in a controlled manner, with the goal of reducing the internal voltage below a safe voltage within a first time limit. In some implementations, the first time limit is 2 seconds, and the safe voltage is 55 volts. During active discharge, a voltage sensor monitors the internal voltage in real time, and the motor controller compares the detected internal voltage with the safe voltage threshold. If the internal voltage drops below the safe voltage within the first time limit, the active discharge is complete, the motor controller exits the active discharge state, and enters the subsequent sleep determination process.
[0079] If the active discharge fails to reduce the internal voltage below the safe voltage within the first time limit, the motor controller determines that the active discharge has timed out, reports the active discharge timeout fault to the vehicle controller, and automatically switches to the passive discharge mode.
[0080] The reporting of active discharge timeout faults is achieved through the CAN network. After receiving the fault information, the vehicle controller can take corresponding actions for the vehicle system. After switching to passive discharge, the motor controller no longer actively controls the discharge circuit, but relies on the natural discharge characteristics of the internal circuit to gradually consume the remaining energy in the high-voltage capacitor through passive components such as internal resistors. The goal is to reduce the internal voltage below the safe voltage within the second time limit.
[0081] In some implementations, the second time limit is 180 seconds. During passive discharge, the voltage sensor continuously monitors the internal voltage, and the motor controller simultaneously maintains CAN network communication with the vehicle controller to ensure that the vehicle system can monitor the discharge status of the motor controller in real time.
[0082] If passive discharge is completed within the second time limit and the internal voltage drops below the safe voltage, the motor controller exits the passive discharge state and enters the sleep judgment process. If passive discharge exceeds the second time limit and fails to reduce the internal voltage below the safe voltage, the motor controller reports a passive discharge timeout fault to the vehicle controller and continues to perform the discharge operation until the internal voltage drops below the safe voltage. The reporting of the passive discharge timeout fault is also achieved through the CAN network, allowing the vehicle controller to determine the current status of the high-voltage system and take appropriate measures.
[0083] The aforementioned dual discharge mechanism, which combines active and passive discharge, automatically switches to passive discharge after the active discharge timeout, ensuring that the internal high voltage can be eventually released below the safe voltage under various operating conditions. This overcomes the risk of high voltage residue that may occur when a single discharge mechanism malfunctions in the active discharge circuit.
[0084] During the discharge process, the motor controller simultaneously monitors the commands issued by the vehicle controller and the vehicle network status.
[0085] In some implementations, if a low-voltage standby request or a high-voltage standby request is received from the vehicle controller during the discharge process, and the current fault level is lower than a preset level threshold, and there is a key hardwire signal or network management message on the vehicle network, the motor controller stops the current discharge operation, responds to the vehicle controller's instruction, and enters the low-voltage standby state or high-voltage power-on process according to the instruction type.
[0086] This discharge interruption recovery logic enables the motor controller to respond to the vehicle controller's power-on request during the discharge process, achieving flexible state switching and overcoming the defect that the discharge process cannot be interrupted. The conditions for interrupting discharge are set with dual verification of fault level and network status, ensuring that discharge interruption and power-on are only allowed when the system status meets the safety conditions, preventing erroneous interruption of the discharge operation in fault conditions or network anomalies.
[0087] VII. Multi-condition hibernation process.
[0088] After the discharge process is completed, the motor controller enters the sleep state judgment stage.
[0089] This embodiment employs a multi-condition joint judgment mechanism, requiring the motor controller to simultaneously meet the following four conditions before it can enter sleep mode: First, the key signal is in the off state, that is, the hard-wired key signal of the whole vehicle is in the OFF position. Second, there were no network management messages on the vehicle's CAN network; Third, the drive motor speed is below the speed threshold; Fourth, the bus voltage is lower than the safe voltage.
[0090] The combined judgment of the above four conditions has clear security implications.
[0091] The key signal being off confirms that the driver has no intention to drive; the absence of network management messages confirms that other controllers in the vehicle have no communication needs; the drive motor speed being below the speed threshold confirms that the motor has completely stopped or is close to stopping, preventing it from entering a sleep state while there is still residual speed in the motor; the bus voltage being below the safe voltage confirms that the high-voltage system has completed discharge and is in a safe state.
[0092] Only when all four conditions are met simultaneously can the vehicle system be confirmed to be in a safe state to enter hibernation, thereby avoiding safety hazards caused by incomplete condition judgment leading to accidental entry into hibernation. In some implementations, the speed threshold is 100 revolutions per minute.
[0093] After entering sleep mode, the motor controller maintains low-power operation and continuously monitors the commands issued by the vehicle controller and the vehicle network status. In sleep mode, if a low-voltage standby request or a high-voltage standby request is received from the vehicle controller, and the fault level is lower than the preset level threshold, and there is a key hardwire signal or network management message on the vehicle network, the motor controller exits sleep mode and enters the corresponding response process according to the vehicle controller's instructions.
[0094] This hibernation interruption recovery mechanism ensures that the motor controller can still respond to the vehicle controller's restart request while in hibernation mode, thus guaranteeing the dynamic response capability of the entire vehicle system.
[0095] If there is no work requirement within the preset sleep time while in hibernation mode, the motor controller will enter deep sleep mode.
[0096] In some implementations, the preset sleep duration is 2050 milliseconds. This 2050-millisecond sleep duration provides sufficient response time for the vehicle controller, allowing it to enter deep sleep only after confirming there are no operational needs, thus reducing misjudgments caused by communication delays.
[0097] In deep sleep mode, the motor controller operates at minimum power consumption, retaining only the wake-up signal detection function. When the key hardwire signal is received in the ON or ACC position during deep sleep mode, or when a network management message appears on the vehicle's CAN network, the motor controller is woken up, exits deep sleep, re-enters the initialization process, and performs an initialization self-test.
[0098] 8. Real-time communication mechanism.
[0099] At any stage of the initialization process, low-voltage power-on process, high-voltage power-on process, operation process, fault process, and discharge process, the motor controller uploads controller status information and fault information to the vehicle controller in real time through the vehicle data transmission network, and sends the drive motor speed information to the instrument for display.
[0100] The controller status information includes operating parameters collected by current sensors, voltage sensors, and temperature sensors, specifically including data such as bus current, three-phase AC current, power battery voltage, 12V battery voltage, and IGBT module temperature.
[0101] After receiving the status and fault information uploaded by the motor controller, the vehicle controller can make corresponding decisions for the vehicle system based on the real-time status of the motor controller, including adjusting the vehicle power distribution strategy, issuing new operating instructions to the motor controller, or triggering vehicle-level safety protection measures.
[0102] Real-time bidirectional communication between the motor controller and the vehicle controller enables coordinated linkage between the motor controller, the vehicle controller, instruments, and other controllers, allowing the vehicle system to make corresponding decisions based on the real-time status of the motor controller, thereby improving the collaborative efficiency of vehicle control.
[0103] In another implementation, a scenario is described where the device is woken up only by a network management message (without a hardwired key signal).
[0104] In certain vehicle application scenarios, such as remote diagnostics, remote upgrades, or vehicle off-line inspections, other vehicle controllers may send network management messages via the CAN network to trigger the motor controller to wake up without driver intervention.
[0105] In this scenario, after detecting a network management message on the CAN network, the motor controller exits deep sleep or shutdown mode and enters the initialization process, performing an initialization self-test. Once the self-test is complete and the fault level is below a preset threshold, it enters the low-voltage power-on process, checking the zero-drift data of the drive motor. If the zero-drift detection result is satisfactory, the motor controller enters a low-voltage standby state, waiting for further instructions from the vehicle controller via the network. If the vehicle controller subsequently issues a high-voltage request instruction via the network, the motor controller continues to execute the high-voltage power-on process and enters a high-voltage standby state. This implementation method is identical to the implementation method using a hard-wired key signal for initialization self-test, zero-drift detection, and subsequent processes; the only difference lies in the source of the wake-up trigger signal, thus achieving comprehensive coverage of different vehicle application scenarios through a dual-path wake-up mechanism.
[0106] In another embodiment, the complete recovery process after a zero drift test fails is described.
[0107] After the motor controller completes its initialization self-test and the fault level is below the preset threshold, it enters the low-voltage power-on process and performs zero-drift detection. If the zero-drift detection result is unsatisfactory, the motor controller enters a fault procedure, blocks the PWM output, and reports the zero-drift detection fault information to the vehicle controller via the CAN network. Upon receiving the fault information, the vehicle controller can decide whether to continue waiting for fault recovery or take other measures based on the vehicle's status.
[0108] In the fault handling process, the motor controller continuously monitors changes in the fault level. If the zero-drift detection fault is identified as a recoverable fault by the system, and the fault level decreases below the preset threshold, the motor controller exits the fault handling process and re-enters the corresponding process according to the current instructions from the vehicle controller. If the current instruction from the vehicle controller is low-voltage standby, the motor controller re-enters the low-voltage power-on process and performs the zero-drift detection again. If the zero-drift detection result is satisfactory, the motor controller enters the low-voltage standby state and continues to execute the subsequent high-voltage power-on and operation processes. This complete recovery process demonstrates the specific execution logic of the fault degradation recovery mechanism in the scenario of a failed zero-drift detection, reflecting the self-healing capability of the motor controller.
[0109] In another implementation, a scenario is described where the vehicle controller issues a new operating mode command during operation.
[0110] When the motor controller is operating normally in a certain operating mode, if the vehicle controller sends a new operating mode command to the motor controller according to the change of the vehicle's operating conditions, the motor controller will switch the control strategy according to the operating mode corresponding to the new command after receiving the new command, and continue to control the drive motor to operate.
[0111] For example, when the motor controller is operating normally in torque control mode, if the vehicle controller issues a speed control command, the motor controller will switch from torque control mode to speed control mode, continuing to control the drive motor with the target speed as the controlled variable. During mode switching, the motor controller maintains real-time monitoring of fault levels and power-down trigger signals, ensuring timely response to faults and power-down requests even during mode switching. This flexible switching mechanism between the three operating modes allows the motor controller to continuously follow the control requirements of the vehicle controller in the dynamic operating conditions of the vehicle, meeting the diverse requirements of the vehicle for motor control under different operating conditions.
[0112] In another embodiment, the complete process of reconnecting high voltage after a discharge interruption is described.
[0113] When the motor controller performs active discharge during the discharge process, if it receives a high-voltage standby request from the vehicle controller, and the fault level is lower than the preset threshold, and there is a key hardwire signal or network management message on the vehicle network, the motor controller stops active discharge, responds to the high-voltage standby request from the vehicle controller, and enters the high-voltage power-on process. The motor controller pre-charges the internal high-voltage capacitor, and enters the high-voltage standby state after the internal voltage is higher than the undervoltage threshold.
[0114] The vehicle controller then issues an operating command to the motor controller based on the vehicle's requirements. The motor controller enters the corresponding operating mode according to the command type, resuming control of the drive motor. The above-described complete state transition process from discharge interruption to high-voltage standby and then to operation demonstrates the specific execution process of the discharge interruption recovery logic in actual working conditions, reflecting the flexibility of the motor controller in state switching under dynamic vehicle conditions.
[0115] In another implementation, the processing procedure under collision conditions is described.
[0116] When a collision occurs, the vehicle collision detection system sends a collision discharge request to the motor controller. Regardless of whether the motor controller is currently in a low-voltage standby state, running state, or fault state, it immediately responds to the collision discharge request, enters the discharge process, and performs active discharge to release the internal high voltage to below the safe voltage within the first time limit.
[0117] If active discharge is not completed within the first time limit, it automatically switches to passive discharge and reports an active discharge timeout fault, continuing to perform the discharge operation until the internal voltage drops below the safe voltage. The discharge process under collision conditions is executed in the same way as under normal power-off conditions, and the dual discharge mechanism also applies, ensuring that the high-voltage system can reliably release in emergency conditions such as collisions, reducing the risk of high-voltage electric shock.
[0118] In another embodiment, the process for handling passive discharge timeout conditions is described.
[0119] After the active discharge timeout, the motor controller switches to passive discharge. Passive discharge relies on the natural discharge characteristics of the internal circuitry to gradually dissipate the remaining energy in the high-voltage capacitor. During the second time limit, the voltage sensor continuously monitors the internal voltage, and the motor controller compares the detected internal voltage with the safe voltage threshold in real time. If the internal voltage has not dropped below the safe voltage by the end of the second time limit, the motor controller reports a passive discharge timeout fault to the vehicle controller. The fault information is transmitted to the vehicle controller via the CAN network, and the vehicle controller can then take further safety measures for the entire vehicle system.
[0120] After a fault is reported, the motor controller does not stop discharging but continues to perform passive discharge operations until the internal voltage eventually drops below the safe voltage. This continuous discharge mechanism ensures that even if the passive discharge times out, the high-voltage system can eventually be released to a safe state without interrupting the discharge operation due to a timeout fault report, thus fundamentally guaranteeing the safety of the high-voltage system.
[0121] In another embodiment, the recovery process after a fault occurs during high-voltage standby is described.
[0122] When the motor controller is in high-voltage standby mode, if it detects a fault level not lower than a preset threshold, it immediately enters a fault procedure, blocks the PWM output, and reports the fault information to the vehicle controller via the CAN network. During the fault procedure, the motor controller continuously monitors changes in the fault level. If the fault level decreases below the preset threshold, and the internal voltage sensor detects that the internal voltage is higher than the undervoltage threshold, the motor controller re-enters the high-voltage standby mode according to the current instructions from the vehicle controller, waiting for the vehicle controller to issue a running command before entering the corresponding operating mode.
[0123] This process demonstrates the complete state transition from a fault occurring in high-voltage standby to fault degradation and then back to high-voltage standby, reflecting the system fault tolerance capability brought about by the combination of a refined fault classification mechanism and a fault degradation recovery mechanism.
[0124] Compared with the prior art, the present invention has the following beneficial effects: 1. By introducing a zero-drift data detection step for the drive motor in the low-voltage power-on process, the zero-drift deviation abnormality can be identified and handled before the motor enters the running state. This fundamentally avoids the problem of the motor running in a zero-drift deviation state due to the lack of zero-drift detection in the existing technology, and effectively improves the motor running accuracy and control reliability.
[0125] 2. By adopting a refined fault level judgment mechanism to replace the simple threshold judgment with insufficient granularity in the existing technology, the system can adopt differentiated handling strategies for faults of different severity. While ensuring rapid isolation of severe faults, it allows the corresponding process to continue to be executed under minor fault conditions, which significantly improves the granularity of fault handling and the fault tolerance of the system under complex working conditions.
[0126] 3. By subdividing the operating modes into speed control mode, torque control mode and voltage control mode, the motor controller can flexibly switch the operating modes according to the actual needs of the vehicle controller. This overcomes the shortcomings of the existing technology, which has a single operating mode and cannot meet the diverse needs of vehicle control, and improves the adaptability and response flexibility of the motor control system.
[0127] 4. By establishing a dual discharge mechanism that combines active and passive discharge, and automatically switching to passive discharge and reporting the timeout fault when active discharge times out, the high voltage system can reliably discharge to below the safe voltage under various operating conditions, overcoming the shortcomings of the existing technology's single discharge mechanism and lack of timeout protection, which leads to the risk of high voltage residue.
[0128] 5. By requiring that four conditions be met simultaneously—key signal off, no network management message, drive motor speed below the speed threshold, and bus voltage below the safe voltage—a strict multi-condition joint sleep judgment mechanism is established. This eliminates the safety hazard of accidental sleep entry due to lax sleep conditions in existing technologies and ensures the accuracy of system state transitions.
[0129] 6. By adding interrupt recovery logic to the discharge process, the motor controller can respond to the vehicle controller's power-on request during the discharge process, realizing flexible interruption and state switching of the discharge process. This overcomes the shortcomings of the existing technology, such as the discharge process being uninterruptible and the system state switching being inflexible, and improves the dynamic response capability of the vehicle's high-voltage system.
[0130] Example 2 This embodiment discloses a motor controller control system based on dynamic switching of fault states.
[0131] A motor controller control system based on dynamic fault state switching includes: The self-test module is configured to perform an initialization self-test on the motor controller and obtain the self-test results. The zero-drift detection module is configured to: determine the fault level based on the self-test results; if the fault level is not lower than the preset level threshold, enter the fault mode; if the fault level is lower than the preset level threshold, perform detection on the zero-drift data of the drive motor to obtain the zero-drift detection result. The low-voltage standby module is configured to: enter low-voltage standby mode when the zero-drift test result is qualified; and enter fault mode when the zero-drift test result is unqualified. The fault mode bidirectional switching module is configured as follows: In fault mode: If the motor controller receives any of the following states from the vehicle controller: a power-down request, a collision discharge request, or a battery relay disconnect signal, it will enter the discharge process. If the fault level drops below the preset level threshold, the corresponding response process will be initiated according to the current instructions from the vehicle controller.
[0132] Also includes: The high-voltage standby module is configured to: receive a high-voltage request command from the vehicle controller, perform pre-charging on the internal voltage of the motor controller, and enter the high-voltage standby state after the internal voltage is higher than the undervoltage threshold. The motor operation module is configured to receive operating commands from the vehicle controller and control the motor operation according to the corresponding operating mode. The discharge module is configured to: receive a power-down trigger signal and execute a discharge process; during the discharge process, if a low-voltage standby request or a high-voltage standby request is received from the vehicle controller, and the fault level is lower than the preset level threshold, and there is a key hardwire signal or network management message on the network, then the discharge is stopped and the vehicle controller command is responded to.
[0133] Furthermore, it also includes: The low-voltage standby state transition module is configured such that, in the low-voltage standby state, if it receives any of the following states from the vehicle controller: power-down request, collision discharge request, battery relay disconnect signal, key signal off, or network management message disappearance, the motor controller will enter the discharge process.
[0134] The operation process conversion module is configured to control the motor operation according to the corresponding operating mode: If the motor controller receives any of the following states from the vehicle controller: a power-down request, a collision discharge request, or a battery relay disconnect signal, it will enter the discharge process. If the fault level is not lower than the preset level threshold during operation, the system will enter fault mode.
[0135] The discharge process conversion module is configured to: during the discharge process, if a low-voltage standby request or a high-voltage standby request is received from the vehicle controller, and the fault level is lower than the preset level threshold, and there is a key hardwire signal or network management message on the network, then the discharge is stopped and the vehicle controller command is responded to.
[0136] The hibernation module is configured to enter hibernation mode after executing the discharge process, provided that four conditions are met simultaneously: the key signal is off, there are no network management messages in the vehicle network, the drive motor speed is below the speed threshold, and the bus voltage is below the safe voltage.
[0137] The hibernation state transition module is configured to: in hibernation state, if it receives a low-voltage standby request or a high-voltage standby request from the vehicle controller, and the fault level is lower than the preset level threshold, and there is a key hardwire signal or network management message on the network, then it exits the hibernation state and responds to the vehicle controller's instructions. When in hibernation mode, if there is no work requirement, the system will continue to enter deep sleep after a preset hibernation duration.
[0138] It should be noted that each module in this embodiment corresponds one-to-one with each step in Embodiment 1, and their specific implementation processes are the same.
[0139] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0140] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A motor controller control method based on dynamic state switching, characterized in that, Includes the following steps: Perform an initialization self-test on the motor controller and obtain the self-test results; The fault level is determined based on the self-test results. If the fault level is not lower than the preset level threshold, the fault mode is entered. If the fault level is lower than the preset level threshold, the zero drift data of the drive motor is detected to obtain the zero drift detection result. If the zero-drift test result is qualified, it enters low-voltage standby mode; If the zero-drift test result is unqualified, enter fault mode; In failure mode: If the motor controller receives any of the following states from the vehicle controller: a power-down request, a collision discharge request, or a battery relay disconnect signal, it will enter the discharge process. If the fault level drops below the preset level threshold, the corresponding response process will be initiated according to the current instructions from the vehicle controller.
2. The motor controller control method based on dynamic state switching as described in claim 1, characterized in that, Also includes: Upon receiving a high-voltage request command from the vehicle controller, the motor controller performs pre-charging of its internal voltage and enters high-voltage standby mode once the internal voltage exceeds the undervoltage threshold. It receives operating commands from the vehicle controller and controls the motor to operate according to the corresponding operating mode. Receive the power-down trigger signal and execute the discharge process.
3. The motor controller control method based on dynamic state switching as described in claim 1, characterized in that, In low-voltage standby mode, if the motor controller receives any of the following statuses from the vehicle controller: power-down request, collision discharge request, battery relay disconnection signal, key signal off, or network management message disappearance, the motor controller will enter the discharge process.
4. The motor controller control method based on dynamic state switching as described in claim 2, characterized in that, During the process of controlling the motor operation according to the corresponding operating mode: If the motor controller receives any of the following states from the vehicle controller: a power-down request, a collision discharge request, or a battery relay disconnect signal, it will enter the discharge process. If the fault level is not lower than the preset level threshold during operation, the system will enter fault mode.
5. The motor controller control method based on dynamic state switching as described in claim 2, characterized in that, During the release process: The motor controller is controlled to actively discharge, releasing the internal voltage to below the safe voltage. If active discharge is not completed within the first time limit, switch to passive discharge and report an active discharge timeout fault, and continue to release the internal voltage to below the safe voltage. Passive discharge must release the internal voltage to below the safe voltage within the second time limit. If the discharge is not completed within the second time limit, a passive discharge timeout fault will be reported and the discharge will continue.
6. The motor controller control method based on dynamic state switching as described in claim 2, characterized in that, During the discharge process, if a low-voltage standby request or a high-voltage standby request is received from the vehicle controller, and the fault level is lower than the preset level threshold, and there is a key hardwire signal or network management message on the network, then the discharge is stopped and the vehicle controller command is responded to.
7. The motor controller control method based on dynamic state switching as described in claim 2, characterized in that, After executing the discharge procedure, the device enters a sleep state when four conditions are met simultaneously: the key signal is off, there are no network management messages in the vehicle network, the drive motor speed is below the speed threshold, and the bus voltage is below the safe voltage.
8. The motor controller control method based on dynamic state switching as described in claim 7, characterized in that, In the sleep state, if a low-voltage standby request or a high-voltage standby request is received from the vehicle controller, and the fault level is lower than the preset level threshold, and there is a key hardwire signal or network management message on the network, then the sleep state will be exited and the vehicle controller will respond to the command. When in hibernation mode, if there is no work requirement, the system will continue to enter deep sleep after a preset hibernation duration.
9. The motor controller control method based on dynamic state switching as described in claim 1, characterized in that, The motor controller uploads controller status information and fault information to the vehicle controller in real time, and sends the drive motor speed information to the instrument; the controller status information includes operating parameters collected by current sensors, voltage sensors and temperature sensors.
10. A motor controller control system based on dynamic state switching, characterized in that, include: The self-test module is configured to perform an initialization self-test on the motor controller and obtain the self-test results. The zero-drift detection module is configured to: determine the fault level based on the self-test results; if the fault level is not lower than the preset level threshold, enter the fault mode; if the fault level is lower than the preset level threshold, perform detection on the zero-drift data of the drive motor to obtain the zero-drift detection result. The low-voltage standby module is configured to enter low-voltage standby mode when the zero-drift detection result is qualified. If the zero-drift test result is unqualified, enter fault mode; The fault mode bidirectional switching module is configured as follows: In fault mode: If the motor controller receives any of the following states from the vehicle controller: a power-down request, a collision discharge request, or a battery relay disconnect signal, it will enter the discharge process. If the fault level drops below the preset level threshold, the corresponding response process will be initiated according to the current instructions from the vehicle controller.