Method for state jumping of motor controller, vehicle and computer readable storage medium
By controlling the state transition of the motor controller during charging, the problem of energy waste is solved, and efficient use of energy and safe and rapid recovery are achieved.
Patent Information
- Application Number
- CN202410165803.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-05
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-02-05
AI Technical Summary
During the charging process of plug-in hybrid electric vehicles, the capacitor of the motor controller absorbs the charging power, resulting in energy waste. Furthermore, the rapid discharge of the capacitor after charging also wastes energy, affecting the vehicle's energy utilization efficiency and safety.
By controlling the motor controller to switch to the shutdown or initialization state during charging and to the high voltage state at the end of charging, the capacitor is ensured not to absorb electricity, and the capacitor is quickly discharged after charging ends, thus reducing energy waste.
It effectively reduces energy waste during the charging process, improves energy utilization efficiency, and ensures the safety of the charging process and the rapid restoration of vehicle power.
Smart Images

Figure CN117863903B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicles, and more specifically, to a state transition method for a motor controller, a vehicle, and a computer-readable storage medium in the field of vehicles. Background Technology
[0002] As global environmental problems become increasingly severe, emission reduction has become a crucial task for the automotive industry. Hybrid electric vehicles (HEVs), as a new type of vehicle, can reduce both fuel consumption and emissions; therefore, they are expected to remain a mainstream technology in the automotive industry for a considerable period.
[0003] Plug-in hybrid electric vehicles (PHEVs) are a type of new energy vehicle that falls between pure electric vehicles and gasoline-powered vehicles. They possess the engine, transmission, drivetrain, fuel system, and fuel tank of a traditional vehicle, as well as the battery, electric motor, and control circuitry of a pure electric vehicle. PHEVs also feature a larger battery capacity and a charging interface. They combine the advantages of pure electric vehicles (EVs) and hybrid electric vehicles (HEVs), enabling both pure electric, zero-emission driving and extended driving range through hybrid mode. Both pure electric vehicles (EVs) and plug-in hybrid electric vehicles (PHEVs) require charging. However, during charging, the large capacitor inside the motor controller is also pre-charged. After charging is complete, this large capacitor rapidly discharges the energy, resulting in wasted power. Therefore, reducing energy waste during charging is a crucial technical problem that needs to be solved. Summary of the Invention
[0004] This application provides a state transition method for a motor controller, a vehicle, and a computer-readable storage medium, which can reduce energy waste during the charging process.
[0005] In a first aspect, a method for switching states of a motor controller is provided, the method comprising: when charging of a vehicle is detected, controlling the motor controller to switch to a power-off state or an initialization state; and when charging of the vehicle is detected to be finished, controlling the motor controller to switch from the power-off state or the initialization state to a high-voltage state.
[0006] In the above technical solution, when the vehicle is charging, the motor controller is controlled to switch to a shutdown or initialization state. Upon detecting the end of charging, the motor controller switches to a high-voltage state, ensuring the vehicle remains in a shutdown or initialization state during charging. This prevents the capacitor in the motor controller from absorbing excess electricity during charging, thus reducing energy waste. When charging ends, the motor controller promptly switches to a high-voltage state, allowing the high voltage in the system circuit to be quickly discharged through the high-voltage motor controller, ensuring safety.
[0007] In conjunction with the first aspect, in some possible implementations, controlling the motor controller to switch to a power-off state or an initialization state when charging of the vehicle is detected includes: sending a charging signal to the motor controller when charging of the vehicle is detected, so that the motor controller controls the motor controller to switch to a power-off state or an initialization state based on the charging signal; controlling the motor controller to switch from the power-off state or the initialization state to a high-voltage state when charging of the vehicle is detected to be finished includes: sending a charging end signal to the motor controller when charging of the vehicle is detected to be finished, so that the motor controller controls the motor controller to switch from the power-off state or the initialization state to the high-voltage state based on the charging end signal.
[0008] In conjunction with the first aspect, in some possible implementations, the step of controlling the motor controller to switch to a power-off state or an initialization state when charging of the vehicle is detected includes: sending a power-off command or an initialization command to the motor controller when charging of the vehicle is detected, so that the motor controller controls the motor controller to switch to a power-off state based on the power-off command, or controls the motor controller to switch to an initialization state based on the initialization command; the step of controlling the motor controller to switch from the power-off state or the initialization state to a high-voltage state when charging of the vehicle is detected to be finished includes: sending a high-voltage command to the motor controller when charging of the vehicle is detected to be finished, so that the motor controller controls the motor controller to switch from the power-off state or the initialization state to the high-voltage state based on the high-voltage command.
[0009] In conjunction with the first aspect, in some possible implementations, the method further includes: when the motor controller is detected to have crashed, determining whether the motor controller can automatically restart within a first preset time period; if the motor controller can automatically restart within the first preset time period, then controlling the motor controller to switch from the off state to the high-voltage state after the motor controller automatically restarts; if the motor controller cannot automatically restart within the first preset time period, then controlling the vehicle to power off and then reconnect to the high voltage, so that the motor controller switches to the high-voltage state.
[0010] In conjunction with the first aspect, in some possible implementations, the method further includes: if the vehicle controller is detected to have restarted after a system crash, sending a high-voltage pre-charge command to the motor controller to cause the motor controller to switch from a high-voltage state to a high-voltage pre-charge state; wherein, the high-voltage state is the state to which the motor controller reverts from a torque state or a speed state after detecting an interruption in a torque command or speed command from the vehicle controller; when the motor controller is in the high-voltage pre-charge state, sending a high-voltage command to the motor controller to cause the motor controller to switch from the high-voltage pre-charge state to the high-voltage state; when the motor controller is in the high-voltage state, sending a torque command or a speed command to the motor controller to cause the motor controller to switch from the high-voltage state to the torque state or the speed state.
[0011] In conjunction with the first aspect, in some possible implementations, sending a high-voltage command to the motor controller when the motor controller is in the high-voltage pre-charge state includes: determining whether the state of the vehicle controller before the system crash and restart is a torque state or a speed state; if the state of the vehicle controller before the system crash is a torque state or a speed state, then sending a high-voltage command to the motor controller when the motor controller is in the high-voltage pre-charge state.
[0012] In conjunction with the first aspect, in some possible implementations, the step of sending a torque command or a speed command to the motor controller when the motor controller is in the high-voltage state, so as to cause the motor controller to switch from the high-voltage state to the torque state or the speed state, includes: if the vehicle controller was in the torque state before the system crashed, then when the motor controller is in the high-voltage state, sending a torque command to the motor controller to cause the motor controller to switch from the high-voltage state to the torque state; if the vehicle controller was in the speed state before the system crashed, then when the motor controller is in the high-voltage state, sending a speed command to the motor controller to cause the motor controller to switch from the high-voltage state to the speed state.
[0013] Secondly, a state transition method for a motor controller is provided, applied to a motor controller. The method includes: upon receiving a charging signal sent by a vehicle controller, controlling the motor controller to transition to a power-off state or an initialization state; wherein the charging signal is sent to the motor controller by the vehicle controller when it detects that the vehicle is being charged; and upon receiving a charging completion signal sent by the vehicle controller, controlling the motor controller to transition from the power-off state or the initialization state to a high-voltage state; wherein the charging completion signal is sent to the motor controller by the vehicle controller when it detects that the charging of the vehicle has ended.
[0014] Thirdly, a vehicle is provided, including a memory for storing executable program code; and a processor for calling and running the executable program code from the memory, such that the vehicle performs the method as described in the first aspect or any possible implementation of the first aspect, or the method as described in the second aspect.
[0015] Fourthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.
[0016] Fifthly, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof. Attached Figure Description
[0017] Figure 1 This is a schematic diagram illustrating the principle of vehicle charging according to an embodiment of this application;
[0018] Figure 2 This is a schematic flowchart of a state transition method for a motor controller provided in an embodiment of this application;
[0019] Figure 3 This is a schematic diagram of the state of a motor controller provided in an embodiment of this application;
[0020] Figure 4 This is a schematic diagram of the state of another motor controller provided in an embodiment of this application;
[0021] Figure 5 This is a schematic diagram illustrating the state transition of the motor controller after a vehicle controller crashes and restarts, provided in an embodiment of this application.
[0022] Figure 6This is a schematic flowchart of another motor controller state transition method provided in the embodiments of this application;
[0023] Figure 7 This is a schematic diagram of the structure of a state transition device for a motor controller provided in an embodiment of this application;
[0024] Figure 8 This is a schematic diagram of the structure of a vehicle provided in an embodiment of this application. Detailed Implementation
[0025] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0026] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0027] See Figure 1 , Figure 1 This is a schematic diagram illustrating the principle of vehicle charging.
[0028] For example, such as Figure 1 As shown, the vehicle includes: a charging port 101, a battery pack 102, a motor control unit (MCU) 103, and a motor (M) 104. The charging port 101 can be either a fast-charging port or a slow-charging port. During vehicle charging, the charging port 101 connects not only to the battery pack 102 but also to the MCU 103. Although the MCU 103 is a controller, it contains a capacitor. Once the internal capacitor is fully charged, the MCU stops absorbing power. The electricity absorbed by the capacitor in the MCU 103 is temporarily stored. Since capacitors are electronic products that store electricity quickly for short periods, this means slow discharge within the capacitor. Discharge may also occur through other components (such as the metal parts like the magnetic field windings inside the motor), resulting in wasted energy. When charging is complete, the capacitor in the MCU 103 quickly discharges all the electricity, again wasting energy. Therefore, reducing energy waste during charging is a crucial technical problem that needs to be solved.
[0029] Therefore, to solve the above-mentioned technical problems, this application provides a state transition method for a motor controller, applied to a vehicle, specifically a controller in the vehicle, which can be a vehicle controller. The vehicle is a rechargeable vehicle, such as a pure electric vehicle (EV) or a plug-in hybrid electric vehicle (PHEV).
[0030] Figure 2 This is a schematic flowchart of a state transition method for a motor controller provided in an embodiment of this application.
[0031] For example, such as Figure 2 As shown, the state transition method of the motor controller includes:
[0032] Step 201: When charging of the vehicle is detected, control the motor controller to switch to the power-off state or the initialization state.
[0033] Step 202: When the charging of the vehicle is detected to be finished, the motor controller is switched from the power-off state or the initialization state to the high-voltage state.
[0034] exist Figure 2 In the illustrated embodiment, when the vehicle is charging, the motor controller is controlled to switch to a power-off state or an initialization state. Upon detecting that charging has ended, the motor controller switches to a high-voltage state. This ensures that the vehicle remains in a power-off or initialization state during charging, preventing the capacitor in the motor controller from absorbing excess electricity during charging and thus reducing energy waste. When charging ends, the motor controller promptly switches to a high-voltage state, allowing the high voltage in the system circuit to be quickly discharged through the high-voltage motor controller, ensuring safety.
[0035] The following is about Figure 2 The specific implementation methods of each step in the illustrated embodiment are explained below:
[0036] In step 201, when the charging gun is inserted into the vehicle's charging port, the vehicle controller can detect the signal indicating that the vehicle is being charged. The vehicle controller then determines that the vehicle is currently being charged and controls the motor controller to switch to either a shutdown or initialization state. In other words, in this step, when the vehicle controller detects that the charging gun is plugged in, it controls the motor controller to switch to either a shutdown or initialization state.
[0037] In one possible implementation, the state diagram of the motor controller can be found in [reference needed]. Figure 3 ,like Figure 3 As shown, the motor controller states include: OFF state, initialization state, high voltage state, torque state, speed state, and other states. The following is a description of each of these states:
[0038] The power-off state means that the motor controller is in the power-off state. In this state, the motor controller is off and the motor controlled by the motor controller is also off.
[0039] The initialization state means the motor controller is in the initialization state, which is equivalent to the motor controller being powered on and able to receive commands from the Controller Area Network (CAN) bus. However, the current voltage is low, for example, 12V. Some large trucks are special cases, and their low voltage may be 48V.
[0040] "High-voltage state" means the motor controller is in a high-voltage state, indicating that the motor controller has completed high-voltage power-on. In the following text, "high-voltage state" and "high-voltage state" have the same meaning.
[0041] Torque state refers to the state in which the motor controller, under high voltage, can issue torque commands to control the motor's torque. Specifically, if the motor controller receives a torque control request command from the vehicle controller, it enters torque state. In torque state, the motor controller, based on the received torque control request command, sends torque commands to the motor to control the motor to output the specified torque, driving the vehicle. It also monitors the actual torque of the motor during operation and feeds back the information about the motor controller's torque state, such as the actual torque, to the vehicle controller.
[0042] Speed state refers to the state in which the motor controller can issue speed commands to control the motor's speed. Specifically, if the motor controller receives a speed control request command from the vehicle controller, it enters the speed state. In the speed state, the motor controller, based on the received speed control request command, sends speed commands to the motor to control the motor to output the specified speed, driving the vehicle, and monitors the actual speed of the motor during operation, feeding back information such as the actual speed and the motor controller's speed state status to the vehicle controller.
[0043] Other states refer to states other than power off, initialization, high voltage, torque, and speed, or can be understood as reserved state bits.
[0044] For example, the implementation of step 201 above may include: when charging of the vehicle is detected, sending a charging signal to the motor controller, so that the motor controller controls the motor controller to jump to the power-off state or the initialization state based on the charging signal.
[0045] In this embodiment, the following control logic can be added to the vehicle controller: when charging of the vehicle is detected, a charging signal is sent to the MCU. The following control logic can also be added to the MCU: upon receiving the charging signal from the vehicle controller, the MCU is controlled to jump to a power-off state or an initialization state.
[0046] Specifically, when the vehicle is charging, a charging signal is transmitted to the vehicle controller, which then sends this signal to the motor controller to notify it that the vehicle needs charging. That is, when the motor controller receives the charging signal, it confirms that the vehicle is charging and that a high-voltage circuit is being supplied externally. However, this high voltage is not used to drive the vehicle; it is used to charge the battery pack. Therefore, the motor controller's MCU can control itself not to receive this high voltage. When the MCU is in a power-off or initialization state, it will not receive this high voltage. Thus, in this embodiment, a charging signal can be sent to the MCU, causing it to switch to a power-off or initialization state based on the charging signal, thereby avoiding energy waste caused by the MCU's internal capacitors absorbing charging power during vehicle charging.
[0047] For example, the implementation of step 201 above may include: when charging of the vehicle is detected, sending a shutdown command or an initialization command to the motor controller, so that the motor controller controls the motor controller to jump to the shutdown state based on the shutdown command, or controls the motor controller to jump to the initialization state based on the initialization command.
[0048] In this embodiment, the following control logic can be added to the vehicle controller: when plugging in the vehicle for charging is detected, a shutdown command or an initialization command is sent to the motor controller.
[0049] Specifically, when the vehicle controller detects that the vehicle is being plugged in for charging, it sends a shutdown command or an initialization command to the motor controller. When the motor controller receives the shutdown command, it switches to the shutdown state. When the motor controller receives the initialization command, it switches to the initialization state.
[0050] In step 202, when a preset condition for stopping charging the vehicle is detected, it can be determined that charging the vehicle has ended. The preset condition for stopping charging can be set in advance according to actual needs. For example, it can be determined that the vehicle meets the preset condition for stopping charging when it is detected that the vehicle is fully charged. Alternatively, it can be determined that the vehicle meets the preset condition for stopping charging when the battery level is detected to be greater than a preset battery level threshold; this preset battery level threshold can be set in advance, for example, by the driver. Or, it can be determined that the vehicle meets the preset condition for stopping charging when the current time has reached a preset charging stop time.
[0051] When the charging of the vehicle is detected to be finished, the motor controller switches from the power-off state or initialization state to the high-voltage state. The purpose is to quickly discharge the high voltage on the system circuit through the MCU to ensure vehicle safety.
[0052] For example, the above step 202 is implemented by: when it is detected that the charging of the vehicle has ended, sending a charging end signal to the motor controller, so that the motor controller controls the motor controller to switch from the power off state or the initialization state to the high voltage state based on the charging end signal.
[0053] In this embodiment, the following control logic can be added to the vehicle controller: when the charging of the vehicle is detected to be finished, a charging end signal is sent to the MCU. The following control logic can also be added to the MCU: upon receiving the charging end signal from the vehicle controller, the MCU is controlled to switch from the power-off state or initialization state to the high-voltage state.
[0054] Specifically, when the vehicle is detected to have met the preset conditions for stopping charging, i.e., the vehicle is finished charging, the vehicle controller sends a charging end signal to the motor controller MCU to inform the MCU that "charging is finished". At this time, the MCU must quickly switch from the power-off state or initialization state to the "capacitor energized state" in the MCU, i.e., the high-voltage state, in order to quickly discharge the high voltage on the system circuit through the MCU.
[0055] For example, the above step 202 is implemented by: when it is detected that the charging of the vehicle has ended, sending a high voltage command to the motor controller, so that the motor controller controls the motor controller to jump from the power-off state or the initialization state to the high voltage state based on the high voltage command.
[0056] In this embodiment, the following control logic can be added to the vehicle controller: when the charging of the vehicle is detected to be finished, a high voltage command is sent to the MCU.
[0057] Specifically, when the vehicle controller detects that the vehicle meets the preset conditions for stopping charging, the vehicle controller sends a high-voltage command to the MCU. Upon receiving the high-voltage command, the MCU switches to the high-voltage state.
[0058] For example, when the vehicle controller detects plug-in charging, it sends an initialization command to the MCU. Upon receiving the initialization command, the MCU controls its state to transition to the initialization state. The key point of this step is that "after charging is complete, the MCU can quickly transition from the initialization state to the high-voltage state, so that it can begin discharging at a millisecond-level speed after charging." If the MCU then transitions from the power-off state to the high-voltage state after charging is complete, it will first transition from the power-off state to the initialization state, which would mean the transition time to the high-voltage state would not be in milliseconds, but could be 1 second or even 2 seconds. Therefore, in this embodiment, when the vehicle controller detects plug-in charging, it sends an initialization command to the MCU to control its state to transition to the initialization state. This facilitates quickly controlling the MCU to transition from the initialization state to the high-voltage state after charging is complete; that is, the MCU can immediately transition from the initialization state to the high-voltage state after charging is complete. Then, the high-voltage electricity on the system can be released through the MCU, thus saving unnecessary power waste during vehicle charging.
[0059] For example, if a motor controller crash is detected, it is determined whether the motor controller can automatically restart within a first preset time period. If the motor controller can automatically restart within the first preset time period, the motor controller is controlled to switch from the off state to the high voltage state after the motor controller restarts automatically. If the motor controller cannot automatically restart within the first preset time period, the entire vehicle is powered off and then powered on again to make the motor controller switch to the high voltage state.
[0060] Specifically, when the vehicle controller detects an abnormal interaction with the motor controller, it can determine that the motor controller has crashed. For example, if the vehicle controller sends a control command to the motor controller but does not receive a correct response, it can be determined that the interaction with the motor controller is abnormal, thus determining that the motor controller has crashed. When the motor controller crashes, it does not assume that it is no longer in a high-voltage state; instead, it essentially restarts, and then returns to the shutdown state. Even though the vehicle controller is still sending high-voltage commands to the motor controller due to the abnormal interaction between the vehicle controller and the motor controller, if it automatically restarts within a first preset time period, it can jump directly from the shutdown state after the crash to the initialization state based on the received high-voltage command, and then immediately jump to the high-voltage state. If the motor controller does not automatically restart within the first preset time period, the vehicle controller will power down the vehicle and then re-energize the high voltage state to allow the motor controller to jump to the high-voltage state. The first preset time period can be pre-defined, for example, it can be defined as the maximum time required for the motor controller to automatically restart after a crash.
[0061] For example, if a motor controller crash is detected, since the vehicle controller is still sending high-voltage commands, if the motor controller can automatically restart, it can jump directly from the shutdown state after the crash to the initialization state, and then to the high-voltage state, based on the high-voltage commands. If the vehicle controller does not detect the motor controller jumping to the high-voltage state after a first preset time, it can be determined that the motor controller cannot automatically restart after this crash. In this case, the vehicle controller will control the vehicle to power down and then re-apply high voltage to allow the motor controller to jump to the high-voltage state.
[0062] In this embodiment, a control strategy for restoring normal operation after a motor controller crash is provided. Corresponding control strategies are proposed for two scenarios: automatic restart after a motor controller crash and automatic restart after a crash. This aims to enable the motor controller to resume normal operation after a crash and reduce the impact of the motor controller crash on the vehicle.
[0063] Considering that the vehicle controller can also freeze, the most direct impact of which is the loss of vehicle power. Therefore, this embodiment proposes a corresponding control strategy for situations where the vehicle controller freezes, enabling the vehicle to resume function and power even after the vehicle controller has frozen.
[0064] See Figure 3 When the vehicle controller malfunctions, the motor controller is typically in torque or speed mode, both of which are connected to high voltage. This means that before malfunctioning, the vehicle controller was sending torque or speed commands to the motor controller. After malfunctioning, similar to a phone screen going black, the vehicle controller will likely restart itself. However, after restarting, it is essentially in a powered-off state, sending a power-off command to the motor controller, which then shuts down. The state transitions during the power-down process of the motor controller include: from torque / speed mode to high voltage mode, from high voltage mode to initialization mode, and from initialization mode back to power-off mode. The time taken for the power-down process is not fixed, but generally within 3 seconds. The state transitions during the power-on process after power-down include: from power-off mode to initialization mode (generally takes 3 seconds), from initialization mode to high voltage mode (generally takes 0.3 seconds), and from high voltage mode to torque / speed mode (generally takes 0.1 seconds). It is evident that the process of powering off and then back on the motor controller still takes some time, resulting in a longer time for the vehicle to regain power and a longer waiting time for the driver, thus affecting the driver's experience.
[0065] In this embodiment, to enable rapid power recovery even after the vehicle controller crashes and reduce the time required for power recovery, a pre-charging state is added to the motor controller's state. For example... Figure 4 As shown, the high-voltage state is actually divided into two stages: the first stage is "pre-charging", in which the capacitors, lamps and other components in the motor controller are fully charged; the second stage is "high voltage", which is the high voltage power-on after the pre-charging is completed. Figure 4 In this process, although it appears to be adding a pre-charge state (hereinafter also called high-voltage pre-charge state) to the status bits of the motor controller, it does not actually add a new, unknown state to the entire link. Instead, it divides the existing high-voltage state into two, and treats the first stage of the high-voltage state as a separate state.
[0066] High-voltage pre-charge state, meaning the motor controller is in a high-voltage pre-charge state, is a preparatory state before applying high voltage. In this state, components such as the DC capacitors and lamps within the motor controller are charged.
[0067] Before high-voltage power is applied, the capacitance of the capacitor inside the motor controller is zero. If high voltage is used to charge the motor controller directly at this point, it would be equivalent to a short circuit at the moment the circuit closes. Excessive current would damage components in the motor controller, battery, and other circuits. Therefore, to limit the current during high-voltage power-on and protect the motor controller and battery, the capacitor can be pre-charged until it is fully charged or reaches a preset charge threshold. This preset charge threshold is a critical value used to determine whether the pre-charging of the motor controller is complete, and it can be pre-set.
[0068] Figure 4 In this context, the motor controller's state also includes a discharge state. The discharge state is the state when the motor controller is applying high voltage. Specifically, if the motor controller receives a high-voltage reduction command (i.e., a discharge command) from the vehicle controller, it enters the discharge state.
[0069] For example, if the vehicle controller is detected to have restarted after a system crash, a high-voltage pre-charge command is sent to the motor controller to cause the motor controller to switch from a high-voltage state to a high-voltage pre-charge state. The high-voltage state is the state the motor controller returns to after detecting an interruption in the torque or speed command from the vehicle controller. When the motor controller is in the high-voltage pre-charge state, a high-voltage command is sent to the motor controller to cause it to switch from the high-voltage pre-charge state to the high-voltage state; when the motor controller is in the high-voltage state, a torque or speed command is sent to the motor controller to cause it to switch from the high-voltage state to the torque or speed state.
[0070] In this embodiment, the following control logic can be added to the vehicle controller: After detecting a system crash and restart, a high-voltage pre-charge command is sent to the motor controller; while the motor controller is in the high-voltage pre-charge state, a high-voltage command is sent to the motor controller; while the motor controller is in the high-voltage state, a torque command or speed command is sent to the motor controller, causing the motor controller to switch from the high-voltage state to the torque state or speed state. Furthermore, the following control logic is added to the motor controller: Upon receiving the high-voltage pre-charge command, the motor controller is controlled to switch to the high-voltage pre-charge state. And upon detecting an interruption of the torque command or speed command from the vehicle controller, the motor controller returns to the high-voltage state from the torque state or speed state.
[0071] When the motor controller is in torque or speed mode, if it does not receive torque or speed commands from the vehicle controller within a second preset time period, it indicates that the command from the vehicle controller has been interrupted, meaning the vehicle controller has crashed. At this point, the motor controller automatically switches back to high-voltage mode. The second preset time period can be pre-defined; for example, it can be defined as the cycle at which the vehicle controller sends commands to the motor controller during normal interaction between the vehicle controller and the motor controller. In other words, under normal circumstances, how often the vehicle controller should send torque or speed commands to the motor controller.
[0072] When the torque or speed command from the vehicle controller is interrupted, it indicates that the motor controller did not receive the torque or speed command from the vehicle controller when it should have received it. In this case, the motor controller should exit the high-voltage state and remain in the high-voltage state awaiting commands from the vehicle controller. The motor controller cannot remain in the torque or speed state waiting, because if it remains in this state and suddenly receives an unexpected torque or speed command, it will drive the vehicle, which would likely be blind and not normal control. Therefore, in this embodiment, the motor controller remains in the high-voltage state to avoid driving the vehicle due to unexpected torque or speed commands, improving the accuracy of vehicle control and ensuring vehicle safety to a certain extent.
[0073] When the motor controller is waiting in the high-voltage state, if the motor controller receives a high-voltage pre-charge command from the vehicle controller, the motor controller can quickly complete the pre-charge (within about 0.5 seconds) to switch from the high-voltage state to the high-voltage pre-charge state.
[0074] When the motor controller switches to the high-voltage pre-charge state, the vehicle controller sends a high-voltage command to the motor controller. Upon receiving the high-voltage command, the motor controller switches from the high-voltage pre-charge state to the high-voltage state. When the motor controller is in the high-voltage state, the vehicle controller sends a torque command or a speed command to the motor controller. Upon receiving the torque command or speed command, the motor controller controls the motor controller to switch from the high-voltage state to the torque state or speed state, so that the motor drives the vehicle to move in the torque state or speed state.
[0075] In this embodiment, after the vehicle controller restarts from a crash, it sends a high-voltage pre-charge command to the motor controller, causing the motor controller to switch to the high-voltage pre-charge state. This saves the time required for the motor controller to switch from the shutdown state to the initialization state, reducing the waiting time for the driver or passengers by approximately 3 seconds. Furthermore, the high-voltage pre-charge state is essentially a separate state from the high-voltage state, so it does not pose any unknown risks.
[0076] See Figure 5 After the vehicle controller crashes and restarts, the motor controller, under the control of the vehicle controller, jumps to the high-voltage pre-charge state, then jumps to the high-voltage state, and then jumps to the torque state. This process saves the time required for the motor controller to jump from the shutdown state to the initialization state, which is beneficial for the vehicle to quickly restore power. It should be noted that... Figure 5 In the example of the motor controller switching from a high-voltage state to a torque state, the vehicle controller can also control the motor controller to switch from a high-voltage state to a speed state in order to control the motor to drive the vehicle in the speed state.
[0077] For example, the above-mentioned sending of a high-voltage command to the motor controller when the motor controller is in a high-voltage pre-charge state includes: determining whether the state of the vehicle controller before the system crash is a torque state or a speed state; if the state of the vehicle controller before the system crash is a torque state or a speed state, then sending a high-voltage command to the motor controller when the motor controller is in a high-voltage pre-charge state.
[0078] The vehicle controller was functioning normally before the system crashed, and therefore can record its normal operating state. When the vehicle controller's state before the crash was in torque or speed mode, it indicates that the vehicle controller was sending torque or speed commands to the motor controller, meaning it was normally controlling the motor controller to drive the vehicle. Based on this, after restarting from a crash, if the vehicle controller determines that its state before the crash was in torque or speed mode, it sends a high-voltage command to the motor controller. This causes the motor controller to switch from high-voltage pre-charge mode to high-voltage mode, allowing it to quickly recover to high-voltage mode and thus quickly return to the state before the vehicle controller crashed, thereby restoring vehicle power as soon as possible.
[0079] For example, the above-mentioned sending a torque command or speed command to the motor controller when the motor controller is in a high-voltage state, so as to cause the motor controller to switch from the high-voltage state to the torque state or the speed state, includes: if the vehicle controller was in the torque state before the system crashed, then sending a torque command to the motor controller when the motor controller is in the high-voltage state, so as to cause the motor controller to switch from the high-voltage state to the torque state; if the vehicle controller was in the speed state before the system crashed, then sending a speed command to the motor controller when the motor controller is in the high-voltage state, so as to cause the motor controller to switch from the high-voltage state to the speed state.
[0080] As described above, if the vehicle controller was in a torque state before it crashed, it means that the vehicle controller was sending torque commands to the motor controller before the crash, further indicating that the motor controller was in a torque state before the vehicle controller crashed. Therefore, in this embodiment, after the vehicle controller restarts, when the motor controller returns to the high-voltage state, the vehicle controller sends a torque command to the motor controller to cause the motor controller to switch from the high-voltage state to the torque state. This allows the motor controller to return to its state before the vehicle controller crashed and restarted, i.e., the torque state, which helps to reduce the impact of the vehicle controller crash.
[0081] If the vehicle controller was in a speed-controlled state before it crashed, it means that the vehicle controller was sending speed commands to the motor controller before the crash, further indicating that the motor controller was in a speed-controlled state before the vehicle controller crashed. Therefore, in this embodiment, after the vehicle controller restarts, when the motor controller returns to a high-voltage state, the vehicle controller sends a speed command to the motor controller, causing the motor controller to switch from a high-voltage state to a speed-controlled state. This allows the motor controller to return to its state before the vehicle controller crashed and restarted, i.e., the speed-controlled state, which helps to reduce the impact of the vehicle controller crash.
[0082] In this embodiment, considering the severe impact a vehicle controller crash can have on the vehicle drive system, such as affecting the normal operation of the motor controller, a clever state transition is employed after the vehicle controller crashes and restarts to more quickly restore the motor controller to normal operation. This allows the vehicle drive system to rapidly resume normal operation, reducing the impact of the vehicle controller crash on vehicle functionality. Specifically, after the vehicle controller crashes, the motor controller does not receive torque or speed commands from the vehicle controller, so it automatically switches to a high-voltage state. While waiting in the high-voltage state, if the motor controller receives a high-voltage pre-charge command from the vehicle controller, it will quickly complete the pre-charge (within approximately 0.5 seconds). Simultaneously, the vehicle controller has time to check in parallel whether its state before the crash was torque or speed. If so, it sends a high-voltage command to the motor controller to switch it from the high-voltage pre-charge state to the high-voltage state. Then, the vehicle controller immediately sends a torque or speed command to the motor controller, allowing it to resume normal operation in the torque or speed state.
[0083] Figure 6 This is a schematic flowchart of a state transition method for a motor controller provided in an embodiment of this application. Figure 6 The state transition method of the motor controller can be applied to the motor controller in a vehicle.
[0084] For example, such as Figure 6 As shown, the state transition method of the above motor controller includes:
[0085] Step 601: Upon receiving a charging signal from the vehicle controller, control the motor controller to switch to the shutdown state or the initialization state; wherein, the charging signal is sent to the motor controller by the vehicle controller when it detects that the vehicle is being charged.
[0086] Step 602: Upon receiving a charging end signal from the vehicle controller, control the motor controller to switch from the power-off state or initialization state to the high-voltage state; wherein, the charging end signal is sent by the vehicle controller to the motor controller when it detects that the charging of the vehicle has ended.
[0087] It should be noted that the state transition method applied to the motor controller described above and the state transition method applied to the vehicle controller in the above embodiments belong to the same concept and can be implemented in conjunction with each other. Therefore, for details not disclosed in the embodiments of the state transition method applied to the motor controller, please refer to the state transition method of the motor controller applied to the vehicle controller described above in this application, which will not be repeated here.
[0088] Figure 7This is a schematic diagram of the state transition device of a motor controller provided in an embodiment of this application.
[0089] For example, such as Figure 7 As shown, the device includes: a first control module 701, used to control the motor controller to switch to a power-off state or an initialization state when charging of the vehicle is detected; and a second control module 702, used to control the motor controller to switch from the power-off state or the initialization state to a high-voltage state when charging of the vehicle is detected to be finished.
[0090] In one possible implementation, the first control module 701 is specifically used to: when charging of the vehicle is detected, send a charging signal to the motor controller, so that the motor controller controls the motor controller to switch to a power-off state or an initialization state based on the charging signal; the second control module 702 is specifically used to: when charging of the vehicle is detected to be finished, send a charging end signal to the motor controller, so that the motor controller controls the motor controller to switch from the power-off state or the initialization state to a high-voltage state based on the charging end signal.
[0091] In one possible implementation, the first control module 701 is specifically used to send a shutdown command or an initialization command to the motor controller when charging of the vehicle is detected, so that the motor controller controls the motor controller to jump to the shutdown state based on the shutdown command, or controls the motor controller to jump to the initialization state based on the initialization command; the second control module 702 is specifically used to send a high voltage command to the motor controller when charging of the vehicle is detected to be finished, so that the motor controller controls the motor controller to jump from the shutdown state or the initialization state to the high voltage state based on the high voltage command.
[0092] In one possible implementation, the above device further includes: a first crash control module, used to determine whether the motor controller can automatically restart within a first preset time period when the motor controller is detected to have crashed; if the motor controller can automatically restart within the first preset time period, then control the motor controller to switch from the power-off state to the high-voltage state after the motor controller automatically restarts; if the motor controller cannot automatically restart within the first preset time period, then control the vehicle to power off and then reconnect to the high voltage, so that the motor controller switches to the high-voltage state.
[0093] In one possible implementation, the above-mentioned device further includes: a second crash control module, configured to send a high-voltage pre-charge command to the motor controller if the vehicle controller is detected to restart after a crash, so that the motor controller jumps from a high-voltage state to a high-voltage pre-charge state; wherein, the high-voltage state is the state in which the motor controller retreats from a torque state or a speed state after detecting an interruption of a torque command or a speed command from the vehicle controller; when the motor controller is in the high-voltage pre-charge state, a high-voltage command is sent to the motor controller to jump from the high-voltage pre-charge state to the high-voltage state; when the motor controller is in the high-voltage state, a torque command or a speed command is sent to the motor controller to jump from the high-voltage state to the torque state or the speed state.
[0094] In one possible implementation, the second crash control module is specifically used to: determine whether the state of the vehicle controller before the crash restart is a torque state or a speed state; if the state of the vehicle controller before the crash is a torque state or a speed state, then when the motor controller is in the high-voltage pre-charge state, send a high-voltage command to the motor controller.
[0095] In one possible implementation, the second crash control module is specifically configured to: if the vehicle controller was in torque state before the crash, then when the motor controller is in high-voltage state, send a torque command to the motor controller to cause the motor controller to switch from high-voltage state to torque state; if the vehicle controller was in speed state before the crash, then when the motor controller is in high-voltage state, send a speed command to the motor controller to cause the motor controller to switch from high-voltage state to speed state.
[0096] It should be noted that the state transition device of the motor controller is only illustrated by the above-described division of functional modules when executing the state transition method of the motor controller. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the state transition device of the motor controller and the state transition method of the motor controller provided in the above embodiments belong to the same concept. Therefore, for details not disclosed in the device embodiments of this application, please refer to the above-described method embodiments of this application, which will not be repeated here.
[0097] Figure 8 This is a schematic diagram of the structure of a vehicle provided in an embodiment of this application.
[0098] For example, such as Figure 8As shown, the vehicle includes a memory 801 and a processor 802. The memory 801 stores executable program code, and the processor 802 is used to call and execute the executable program code to perform a state transition method for a motor controller.
[0099] Furthermore, embodiments of this application also protect an apparatus that may include a memory and a processor, wherein the memory stores executable program code, and the processor is used to call and execute the executable program code to perform a state transition method for a motor controller provided in embodiments of this application.
[0100] This embodiment can divide the device into functional modules based on the above method example. For example, each module can correspond to a separate function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0101] When the functional modules are divided according to their respective functions, the device may also include a first control module, a second control module, etc. It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional descriptions of the corresponding functional modules, and will not be repeated here.
[0102] It should be understood that the device provided in this embodiment is used to execute the above-described motor controller state transition method, and therefore can achieve the same effect as the above-described implementation method.
[0103] When using an integrated unit, the device may include a processing module and a storage module. When the device is applied to a vehicle, the processing module can be used to control and manage the vehicle's movements. The storage module can be used to support the vehicle in executing program code, etc.
[0104] The processing module may be a processor or a controller, which can implement or execute various exemplary logic blocks, modules, and circuits as disclosed in this application. The processor may also be a combination of computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and microprocessors, etc., and the storage module may be a memory.
[0105] In addition, the device provided in the embodiments of this application may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute a state transition method for a motor controller provided in the above embodiments.
[0106] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the above-described related method steps to implement the state transition method for a motor controller provided in the above embodiment.
[0107] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the state transition method for a motor controller provided in the above embodiment.
[0108] In this embodiment, the device, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0109] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0110] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0111] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method of state jumping for a motor controller, the method comprising: Applied to a vehicle controller, the method includes: When charging of the vehicle is detected, a charging signal is sent to the motor controller, so that the motor controller controls the motor controller to switch to the shutdown state or the initialization state based on the charging signal; When the charging of the vehicle is detected to be finished, a charging end signal is sent to the motor controller, so that the motor controller controls the motor controller to switch from the power-off state or initialization state to the high voltage state based on the charging end signal; If the motor controller is detected to have crashed, determine whether the motor controller can automatically restart within a first preset time period; If the motor controller can automatically restart within the first preset time period, then after the motor controller automatically restarts, control the motor controller to switch from the off state to the high voltage state; If the motor controller cannot automatically restart within the first preset time period, the vehicle will be powered off and then reconnected to the high voltage, so that the motor controller will switch to the high voltage state.
2. The state transition method for a motor controller according to claim 1, characterized in that, The step of controlling the motor controller to switch to a shutdown state or an initialization state when vehicle charging is detected includes: When charging of the vehicle is detected, a power-off command or an initialization command is sent to the motor controller, so that the motor controller controls the motor controller to jump to the power-off state based on the power-off command, or controls the motor controller to jump to the initialization state based on the initialization command; The step of controlling the motor controller to switch from the power-off state or initialization state to the high-voltage state when the charging of the vehicle is detected to be finished includes: When the charging of the vehicle is detected to be finished, a high-voltage command is sent to the motor controller, so that the motor controller controls the motor controller to switch from the shutdown state or the initialization state to the high-voltage state based on the high-voltage command.
3. The state transition method for a motor controller according to claim 1, characterized in that, The method further includes: If the vehicle controller is detected to restart after a system crash, a high-voltage pre-charge command is sent to the motor controller to cause the motor controller to switch from the high-voltage state to the high-voltage pre-charge state; wherein, the high-voltage state is the state that the motor controller returns to after detecting an interruption of the torque command or speed command from the vehicle controller; When the motor controller is in the high-voltage pre-charge state, a high-voltage command is sent to the motor controller to cause the motor controller to switch from the high-voltage pre-charge state to the high-voltage state; When the motor controller is in the high-voltage state, a torque command or speed command is sent to the motor controller so that the motor controller switches from the high-voltage state to the torque state or speed state.
4. The state transition method for a motor controller according to claim 3, characterized in that, When the motor controller is in the high-voltage pre-charge state, sending a high-voltage command to the motor controller includes: Determine whether the vehicle controller was in torque mode or speed mode before it crashed; If the vehicle controller was in torque mode or speed mode before it crashed, then a high-voltage command is sent to the motor controller when the motor controller is in the high-voltage pre-charge mode.
5. The state transition method for a motor controller according to claim 4, characterized in that, When the motor controller is in the high-voltage state, sending a torque command or a speed command to the motor controller to cause the motor controller to switch from the high-voltage state to the torque state or the speed state includes: If the vehicle controller was in torque state before the system crashed, then when the motor controller is in high voltage state, a torque command is sent to the motor controller to cause the motor controller to switch from high voltage state to torque state. If the vehicle controller was in a speed state before the system crashed, then when the motor controller is in the high-voltage state, a speed command is sent to the motor controller to cause the motor controller to switch from the high-voltage state to the speed state.
6. A method for state transition of a motor controller, characterized in that, Applied to a motor controller, the method includes: Upon receiving a charging signal from the vehicle controller, the motor controller is controlled to switch to a shutdown state or an initialization state based on the charging signal; wherein, the charging signal is sent to the motor controller by the vehicle controller when it detects that the vehicle is being charged; Upon receiving a charging completion signal from the vehicle controller, the motor controller is controlled to switch from the shutdown state or initialization state to the high-voltage state based on the charging completion signal; wherein, the charging completion signal is sent by the vehicle controller to the motor controller when it detects that the charging of the vehicle has ended; If the motor controller is detected to have crashed, determine whether the motor controller can automatically restart within a first preset time period; If the motor controller can automatically restart within the first preset time period, then after the motor controller automatically restarts, control the motor controller to switch from the off state to the high voltage state; If the motor controller cannot automatically restart within the first preset time period, the vehicle will be powered off and then reconnected to the high voltage, so that the motor controller will switch to the high voltage state.
7. A vehicle, characterized in that, The vehicles include: Memory, used to store executable program code; A processor for calling and running the executable program code from the memory, causing the vehicle to perform the method as described in any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Electric control method on blade electric vehicle and blade electric vehicle
CN107662500A
Motor control method and device and motor controller
CN114714922A
