An electric vehicle charging method and system based on motor controller multiplexing
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SONKWO COM
- Filing Date
- 2026-07-08
- Publication Date
- 2026-08-07
AI Technical Summary
传统的电动汽车充电系统通常需要独立的充电设备和复杂的电路设计来实现充电功能,这不仅增加了车辆的硬件成本,还使得整个系统的体积和重量增大,影响了车辆的整体性能和续航里程
[0067]1.通过电机控制器的复用设计,实现了充电与驱动功能的切换,减少了车辆对独立充电设备的依赖,降低了硬件成本和系统复杂度,同时提高了整车的集成化程度和空间利用率,解决了传统电动汽车充电系统因独立充电设备导致的硬件冗余和成本增加的问题。
Smart Images

Figure CN122519040A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electric vehicle charging technology, and more specifically, to an electric vehicle charging method and system based on motor controller reuse. Background Technology
[0002] In the field of electric vehicles, with the continuous development of technology, vehicle charging efficiency and system integration have become important research directions. Traditional electric vehicle charging systems typically require independent charging equipment and complex circuit designs to achieve charging functionality. This not only increases the hardware cost of the vehicle but also increases the size and weight of the entire system, affecting the overall performance and driving range of the vehicle. Meanwhile, in existing technologies, the motor controller is mainly used to drive the vehicle, and its function is relatively singular, unable to be effectively reused in the charging process. This necessitates additional control logic and hardware support when the vehicle switches between charging and driving modes, further increasing the system's complexity and cost.
[0003] On the one hand, independent charging equipment and complex circuit design limit the development of vehicle lightweighting and miniaturization; on the other hand, the single function of the motor controller requires additional hardware and control logic support when the vehicle switches between charging and driving modes, increasing the complexity and cost of the system. Summary of the Invention
[0004] To address the problems mentioned in the background section, the technical solution of this invention is as follows:
[0005] A method for charging electric vehicles based on motor controller reuse, comprising:
[0006] S1. Detect and confirm that the external AC charging connector has established a physical connection with the three-phase bridge arm input terminal of the motor controller, and generate a charging connection signal based on this connection.
[0007] S2. In response to the charging connection signal, the vehicle controller controls the first relay group located between the motor controller and the motor winding to close to the external AC power supply side, so as to establish a charging current path from the external AC power supply to the motor controller.
[0008] S3. After the charging current path is established, the vehicle controller sends a high-voltage enable command to the battery management system. In response to the command, the battery management system controls the second relay group to perform pre-charging and high-voltage main circuit closing operations.
[0009] S4. The vehicle controller sends a rectification mode control command to the motor controller via the CAN bus, causing the motor controller to switch the operating mode of its internal power devices from inverter mode to controllable rectification mode.
[0010] S5. The battery management system determines the charging demand parameters of the battery pack and sends the charging demand parameters to the motor controller via the CAN bus. Based on the charging demand parameters, the motor controller generates a pulse width modulation signal to control the on / off state of the insulated gate bipolar transistors in its three-phase bridge arm, thereby rectifying the external AC power supply and adjusting the charging voltage and charging current of the battery pack through dual closed-loop control.
[0011] S6. When the charging process is completed or a stop command is received, the motor controller stops working, the second relay group and the first relay group are disconnected in sequence, and the working mode of the motor controller is reset to inverter mode.
[0012] Further, S1 includes:
[0013] S11. A micro switch is triggered by a mechanical locking device on the charging connector to generate a hard-wire signal indicating that a physical connection has been established.
[0014] S12. The vehicle controller continuously acquires the level status of the hard-wired signal through its discrete input port and performs filtering and de-jitter processing on the signal.
[0015] S13. The vehicle controller determines whether the processed hard-wired signal is a continuously valid level and the duration exceeds a first preset time threshold; if so, the vehicle controller generates a first-level valid charging connection signal.
[0016] S14. After generating the first-level valid charging connection signal, the vehicle controller identifies the charging equipment parameters by detecting the charging guidance signal status in the external AC charging connector connected to it, and generates a second-level valid charging connection signal containing the rated current information of the charging equipment, which serves as the final charging connection signal.
[0017] Further, S2 includes:
[0018] S21. After generating a valid charging connection signal, the vehicle controller reads the feedback contact status signal of each relay in the first relay group.
[0019] S22. The vehicle controller compares the feedback contact status signal with the preset safety state stored in the memory. The preset safety state is that the common terminal of all relays is not connected to the external AC power supply.
[0020] S23. If the comparison results are consistent, the vehicle controller generates a first relay group switching permission flag.
[0021] S24. According to the switching permission flag, the vehicle controller sends control signals to the drive circuits of the first relay, the second relay and the third relay in a preset sequence to close the control signal to the external AC power supply side, and reads the feedback contact status signal of each relay again.
[0022] S25. The vehicle controller verifies whether the feedback contact status signal is consistent with the command status of closing to the external AC power supply side. If all relay status verifications pass, the charging current path is determined to be successfully established.
[0023] Further, S3 includes:
[0024] S31. After receiving the high voltage enable command, the battery management system first performs a safety test on the total voltage of the battery pack, the voltage of each cell, and the insulation resistance. If the test results are all within the safe range, the pre-charge relay in the second relay group is closed.
[0025] S32. The battery management system monitors the rise rate and current value of the DC bus voltage in real time at a first sampling frequency through its built-in voltage acquisition circuit.
[0026] S33. The battery management system determines whether the DC bus voltage rises to a threshold voltage that is not lower than the preset percentage coefficient of the total battery pack voltage within the second preset time threshold.
[0027] S34. If the conditions are met, the battery management system will simultaneously send a drive signal to close the main positive relay and the main negative relay in the second relay group, and after confirming that the main relay is closed, disconnect the precharge relay.
[0028] S35. The battery management system continuously monitors the stability of the DC bus voltage after the main relay is closed. If the voltage fluctuation is less than the preset range within the third preset time threshold, it is determined that the high-voltage main circuit is successfully closed, and a high-voltage ready signal is sent to the vehicle controller via the CAN bus.
[0029] Further, S4 includes:
[0030] S41. After receiving the high voltage ready signal sent by the battery management system, the vehicle controller constructs a rectification mode switching command frame containing a mode switching request identifier and a target mode code.
[0031] S42. The vehicle controller periodically sends the rectification mode switching command frame to the motor controller via the CAN bus;
[0032] S43. After receiving the command frame, the motor controller performs verification and decoding. If the verification passes and the target mode is identified as rectification mode, its internal mode switching interrupt service routine is triggered.
[0033] S44. In the interrupt service routine, the motor controller modifies its core control mode variable from driving mode to charging control mode and loads the control parameter group associated with the charging control mode. The control parameter group includes at least current loop proportional-integral parameters, voltage loop proportional-integral parameters, pulse width modulation carrier frequency and modulation ratio limit parameters.
[0034] S45. After the motor controller completes parameter loading, it initializes its analog-to-digital conversion sampling channel, switches the sampling target from motor phase current to DC side voltage and DC side current, and reconfigures the trigger logic of its pulse width modulation output module to respond to the modulation wave generated by the charging control algorithm.
[0035] Further, S5 includes:
[0036] S51. The battery management system calculates the target charging voltage based on the current state of the battery pack. and target charging current ;
[0037] The S52 battery management system periodically transmits data via the CAN bus to the battery management system. and The charging parameter frame of the data is sent to the motor controller;
[0038] S53, The motor controller uses the target charging current. The inner loop is given a value based on the target charging voltage. Given a value for the outer loop, construct a dual closed-loop control structure that includes a current loop controller and a voltage loop controller;
[0039] S54. The current loop controller calculates the voltage command based on the difference between the current setpoint and the actual DC side current.
[0040] S55. The voltage loop controller corrects the voltage command based on the difference between the voltage setpoint and the actual DC side voltage, and generates a modulation wave signal for controlling the on / off state of the insulated gate bipolar transistor.
[0041] Furthermore, the generation of the modulation wave signal for controlling the on / off state of the insulated gate bipolar transistor in step S55 includes:
[0042] S551. The voltage loop controller outputs a corrected voltage command, which is represented as a d-axis voltage reference value and a q-axis voltage reference value in a synchronous rotating coordinate system.
[0043] S552. Based on the space vector pulse width modulation algorithm, the d-axis voltage reference value and the q-axis voltage reference value are converted into voltage components in a two-phase stationary coordinate system through inverse Parker transformation.
[0044] S553. Calculate the sector number of the reference voltage vector based on the voltage components in the two-phase stationary coordinate system.
[0045] S554. Based on the sector number and the DC bus voltage value, calculate the duration of action of two adjacent basic voltage vectors and the duration of action of the zero vector;
[0046] S555: Based on the calculated operating time, generate the switching timing logic for the six insulated gate bipolar transistors on the corresponding three-phase bridge arm, and then generate a pulse width modulation drive signal with a specific duty cycle.
[0047] Furthermore, it also includes a driving control method, which includes:
[0048] S7. The vehicle controller controls the first relay group to close to the three-phase winding side of the motor to establish a drive current path from the battery pack through the motor controller to the motor.
[0049] S8. The vehicle controller sends a high-voltage enable command to the battery management system, and the battery management system controls the second relay group to close.
[0050] S9. The vehicle controller sends an inverter mode control command to the motor controller via the CAN bus, causing the motor controller to switch to inverter operating mode.
[0051] S10: The vehicle controller sends a target torque command to the motor controller via the CAN bus according to the driver's needs. The motor controller then performs torque control to drive the vehicle.
[0052] Further, S7 includes:
[0053] S71. The vehicle controller determines whether the charging connection signal is invalid.
[0054] S72. The vehicle controller reads the current operating mode status of the motor controller through the CAN bus to determine whether it is not in charging control mode.
[0055] S73. The vehicle controller checks the vehicle's current gear signal, accelerator pedal signal, and brake pedal signal to determine whether the vehicle is in a drivable state.
[0056] S74. If all the judgment results from S71 to S73 are yes, the vehicle controller generates a driving route switching permission flag.
[0057] S75. The vehicle controller controls each relay in the first relay group to switch from its current state to the contact position of its connected motor winding according to the driving path switching permission flag.
[0058] An electric vehicle charging system based on motor controller reuse includes:
[0059] An external AC charging connector is used to connect to an external three-phase AC power source, and is equipped with a signal triggering device to generate a physical connection confirmation signal;
[0060] The path switching unit includes a first relay group, which consists of three single-pole double-throw relays. The common terminal of each relay is connected to the midpoint of a single-phase bridge arm of the motor controller, its first switching contact is connected to the corresponding phase winding of the motor, and its second switching contact is connected to the corresponding phase of the external AC charging connector.
[0061] The vehicle controller is communicatively connected to the signal triggering device, the control terminal of the first relay group, the battery management system, and the motor controller, and is used to execute the overall logic control, state judgment, and command transmission of the method.
[0062] The battery management system is connected to the vehicle controller and the motor controller via a CAN bus and is used to manage the battery pack status, control the closing and opening of the second relay group, and calculate charging demand parameters.
[0063] The multiplexed motor controller has its three-phase AC input terminals connected to the three common terminals of the first relay group, and its DC output terminal connected to the battery pack via a DC bus. The motor controller is equipped with reconfigurable control software that can switch between inverter mode and controlled rectification mode in response to commands from the vehicle controller. The multiplexed motor controller includes a current loop controller for implementing closed-loop regulation of charging current and a voltage loop controller for implementing closed-loop regulation of charging voltage.
[0064] The drive motor has its three-phase windings connected to the first switching contacts of the corresponding relays in the first relay group;
[0065] The second relay group, located between the battery pack and the DC bus, includes a pre-charge relay, a main positive relay, and a main negative relay, and is controlled by the battery management system.
[0066] The embodiments of the present invention have at least the following beneficial effects:
[0067] 1. By reusing the motor controller, the switching between charging and driving functions is realized, reducing the vehicle's dependence on independent charging equipment, lowering hardware costs and system complexity, while improving the integration level and space utilization of the whole vehicle. This solves the problems of hardware redundancy and increased costs caused by independent charging equipment in traditional electric vehicle charging systems.
[0068] 2. The dual closed-loop control technology is used to precisely regulate the charging process, which can dynamically adjust the charging voltage and current according to the actual needs of the battery pack, thereby improving charging efficiency and battery life. At the same time, it enhances the stability and safety of the charging process, solving the technical problems of low charging efficiency, affected battery life and unstable charging process in the existing technology.
[0069] 3. The coordinated control between the vehicle controller, battery management system, and motor controller enables intelligent management of the charging process, optimizes the establishment and disconnection of the charging path, reduces charging time, and avoids voltage surges and safety hazards during the charging process through precise control of pre-charging and high-voltage main circuit, thus solving the problems of long charging time, large voltage surges, and insufficient charging safety in existing technologies. Attached Figure Description
[0070] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated in the drawings by way of example and not limitation, wherein:
[0071] Figure 1 This is a schematic flowchart of an electric vehicle charging method based on motor controller reuse according to an embodiment of the present invention.
[0072] Figure 2 This is a schematic diagram of an electric vehicle charging system based on motor controller reuse, provided in an embodiment of the present invention. Detailed Implementation
[0073] The principles and spirit of the invention will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement the invention, and are not intended to limit the scope of the invention in any way.
[0074] The following is for reference. Figure 1 , Figure 1 This is a schematic flowchart illustrating an embodiment of the electric vehicle charging method based on motor controller reuse provided by the present invention. Figure 1 As shown, an electric vehicle charging method based on motor controller reuse includes:
[0075] S1. Detect and confirm that the external AC charging connector has established a physical connection with the three-phase bridge arm input terminal of the motor controller, and generate a charging connection signal based on this connection.
[0076] S2. In response to the charging connection signal, the vehicle controller controls the first relay group located between the motor controller and the motor winding to close to the external AC power supply side, so as to establish a charging current path from the external AC power supply to the motor controller.
[0077] S3. After the charging current path is established, the vehicle controller sends a high-voltage enable command to the battery management system. In response to the command, the battery management system controls the second relay group to perform pre-charging and high-voltage main circuit closing operations.
[0078] S4. The vehicle controller sends a rectification mode control command to the motor controller via the CAN bus, causing the motor controller to switch the operating mode of its internal power devices from inverter mode to controllable rectification mode.
[0079] S5. The battery management system determines the charging demand parameters of the battery pack and sends the charging demand parameters to the motor controller via the CAN bus. Based on the charging demand parameters, the motor controller generates a pulse width modulation signal to control the on / off state of the insulated gate bipolar transistors in its three-phase bridge arm, thereby rectifying the external AC power supply and adjusting the charging voltage and charging current of the battery pack through dual closed-loop control.
[0080] S6. When the charging process is completed or a stop command is received, the motor controller stops working, the second relay group and the first relay group are disconnected in sequence, and the working mode of the motor controller is reset to inverter mode.
[0081] like Figure 2 As shown, the system detects and confirms that a physical connection has been established between the external AC charging connector and the three-phase bridge arm input of the motor controller, and generates a charging connection signal based on this connection. The external AC charging connector is a device used to connect to an external three-phase AC power source, which is physically connected to the three-phase bridge arm input of the motor controller. The motor controller is a component in an electric vehicle used to control the operation of the motor, and its three-phase bridge arm input is the interface for receiving power input. The charging connection signal is a signal used to indicate whether the connection is successful.
[0082] The first relay group is used to switch the current path between charging mode and driving mode. The first relay group consists of three single-pole double-throw relays. The common terminal of each relay is connected to the midpoint of a single-phase bridge arm of the motor controller. Its first switching contact is connected to the corresponding phase winding of the motor, and its second switching contact is connected to the corresponding phase of the external AC charging connector.
[0083] The vehicle controller achieves precise control over the entire charging and driving process through communication connections with the signal triggering device, the control terminal of the first relay group, the battery management system, and the motor controller. The battery management system is responsible for managing the battery pack status, controlling the closing and opening of the second relay group, and calculating charging demand parameters. The second relay group, located between the battery pack and the DC bus, includes a pre-charge relay, a main positive relay, and a main negative relay. Controlled by the battery management system, it is used to realize the pre-charge of the high-voltage circuit and the closing operation of the main circuit.
[0084] The first relay group is used for AC side path switching, selecting the current path between charging mode and driving mode; the second relay group is responsible for DC side high voltage switching and pre-charge management, directly controlling the connection between the battery pack and the DC bus. The two relay groups are electrically isolated from each other, independently controlled by the vehicle controller and the battery management system respectively, and synchronized and coordinated via the CAN bus.
[0085] Further, S1 includes:
[0086] S11. A micro switch is triggered by a mechanical locking device on the charging connector to generate a hard-wire signal indicating that a physical connection has been established.
[0087] S12. The vehicle controller continuously acquires the level status of the hard-wired signal through its discrete input port and performs filtering and de-jitter processing on the signal.
[0088] S13. The vehicle controller determines whether the processed hard-wired signal is a continuously valid level and the duration exceeds a first preset time threshold; if so, the vehicle controller generates a first-level valid charging connection signal.
[0089] S14. After generating the first-level valid charging connection signal, the vehicle controller identifies the charging equipment parameters by detecting the charging guidance signal status in the external AC charging connector connected to it, and generates a second-level valid charging connection signal containing the rated current information of the charging equipment, which serves as the final charging connection signal.
[0090] The generation of the second-level effective charging connection signal is obtained by parsing the charging guidance signal (such as the CP signal). The parsing of the charging guidance signal adopts the signal protocols specified in the national standard documents GB / T18487.1-2015 and GB / T 20234.1-2015. The guidance circuit inside the charging connector conveys the rated power supply capacity of the charging equipment to the vehicle by generating a PWM (Pulse Width Modulation) signal with a specific duty cycle or analog voltage signals of different levels. The vehicle controller acquires this guidance signal in real time through its configured analog or high-frequency digital input channels. During parsing, the controller first determines the signal type: if it is a PWM signal, it accurately measures its duty cycle; if it is a DC voltage signal, it measures its steady-state voltage value. Subsequently, it decodes the signal according to the signal-current mapping relationship clearly specified in the standard. For example, when a PWM signal duty cycle of approximately 10% is detected, the rated current of the charging equipment can be identified as 10A; a duty cycle of approximately 20% corresponds to 16A; and a duty cycle of approximately 30% corresponds to 32A. If it is a voltage signal, then typical voltage levels such as 12V, 9V, and 6V correspond to different current levels.
[0091] A hard-wire signal is generated by triggering a microswitch through a mechanical locking device to characterize the establishment status of the physical connection. The vehicle controller acquires this signal through a discrete input port and performs filtering and debouncing processing to eliminate noise and interference in the signal. By determining the continuous effective level of the hard-wire signal, the vehicle controller can generate a first-level effective charging connection signal, and further combine it with the charging guidance signal status to generate the final charging connection signal.
[0092] The mechanical locking device is a mechanical component on the charging connector used to ensure a secure connection between the connector and the vehicle interface. When the connector is inserted into the vehicle interface and locked, a microswitch is triggered. The microswitch is a small mechanical or electronic switch used to generate a hard-wired signal. The hard-wired signal is typically a voltage or current signal used to directly indicate the state of the physical connection. The discrete input port of the vehicle controller is a dedicated interface for receiving this electrical signal. By acquiring the level of the hard-wired signal, it can be determined whether the connector is correctly inserted and locked.
[0093] The first preset time threshold is a set time parameter used to determine whether the hard-wired signal is continuously valid. For example, the signal needs to remain stable for a period of time, such as a few seconds, before it is considered valid to prevent false judgments caused by brief contact. The charging guidance signal status refers to the status of the signal lines within the charging connector, used to transmit parameter information of the charging equipment, such as rated current. This information is crucial for the vehicle controller to generate the final charging connection signal.
[0094] The level of the hard-wired signal can be controlled by setting a voltage source; for example, when a connector is inserted, a microswitch closes, transmitting a stable voltage signal to the vehicle controller. Filtering and debouncing can use a low-pass filter to remove high-frequency noise, or it can be implemented through software algorithms, such as digital filtering technology. The first preset time threshold can be adjusted according to the actual application scenario; for example, in a vehicle charging scenario, it can be set to 3-5 seconds to ensure signal stability and reliability.
[0095] When determining whether a hard-wired signal remains valid, the vehicle controller can use a timer to keep track of the signal. Once the signal remains stable for a set time threshold, a first-level valid charging connection signal is generated. Furthermore, the detection of the charging guidance signal status can be achieved by parsing the communication protocol within the charging connector. For example, by detecting changes in the voltage or current of the charging guidance signal, parameters such as the rated current of the charging device can be obtained and integrated into the final charging connection signal.
[0096] Further, S2 includes:
[0097] S21. After generating a valid charging connection signal, the vehicle controller reads the feedback contact status signal of each relay in the first relay group.
[0098] S22. The vehicle controller compares the feedback contact status signal with the preset safety state stored in the memory. The preset safety state is that the common terminal of all relays is not connected to the external AC power supply.
[0099] S23. If the comparison results are consistent, the vehicle controller generates a first relay group switching permission flag.
[0100] S24. According to the switching permission flag, the vehicle controller sends control signals to the drive circuits of the first relay, the second relay and the third relay in a preset sequence to close the control signal to the external AC power supply side, and reads the feedback contact status signal of each relay again.
[0101] S25. The vehicle controller verifies whether the feedback contact status signal is consistent with the command status of closing to the external AC power supply side. If all relay status verifications pass, the charging current path is determined to be successfully established.
[0102] The first relay group consists of three single-pole double-throw relays. The common terminal of each relay is connected to the midpoint of a single-phase bridge arm of the motor controller. The first switching contact is connected to the corresponding phase winding of the motor, and the second switching contact is connected to the corresponding phase of the external AC charging connector. The feedback contact status signal refers to the contact position status signal of the relay. By detecting these signals, the current connection status of the relay can be determined.
[0103] The preset safety state means that the common terminal of all relays is not connected to the external AC power supply, ensuring that the system is in a safe state before switching relay states. The switching permission flag is an internal flag generated by the vehicle controller to indicate whether relay state switching is permitted. The timing sequence refers to the order and time interval of relay switching; the vehicle controller sends control signals to the relays sequentially according to the preset timing sequence to ensure the relay switching process proceeds in an orderly manner. Relay state verification involves rereading the feedback contact status signal to determine whether the relay has correctly switched to the specified state, thereby ensuring the correct establishment of the charging current path.
[0104] Specifically, the preset timing is that the three single-pole double-throw relays in the first relay group close sequentially to the external AC power supply side. After generating the switching permission flag, the vehicle controller sends closing commands sequentially at intervals of 10ms to 50ms, following the order of relay one, relay two, and relay three. If the three-phase relays operate simultaneously, and the power supply phase is not ideally symmetrical or the line parameters are slightly different, it is very easy to cause a large instantaneous current surge, which can cause unnecessary electrical stress and potential damage to the relay contacts, connection terminals, and power devices at the front end of the motor controller.
[0105] Further, S3 includes:
[0106] S31. After receiving the high voltage enable command, the battery management system first performs a safety test on the total voltage of the battery pack, the voltage of each cell, and the insulation resistance. If the test results are all within the safe range, the pre-charge relay in the second relay group is closed.
[0107] S32. The battery management system monitors the rise rate and current value of the DC bus voltage in real time at a first sampling frequency through its built-in voltage acquisition circuit.
[0108] S33. The battery management system determines whether the DC bus voltage rises to a threshold voltage that is not lower than the preset percentage coefficient of the total battery pack voltage within the second preset time threshold.
[0109] S34. If the conditions are met, the battery management system will simultaneously send a drive signal to close the main positive relay and the main negative relay in the second relay group, and after confirming that the main relay is closed, disconnect the precharge relay.
[0110] S35. The battery management system continuously monitors the stability of the DC bus voltage after the main relay is closed. If the voltage fluctuation is less than the preset range within the third preset time threshold, it is determined that the high-voltage main circuit is successfully closed, and a high-voltage ready signal is sent to the vehicle controller via the CAN bus.
[0111] The high-voltage ready signal is sent by the battery management system to the vehicle controller after completing the high-voltage main circuit closure operation, indicating that the battery system is ready to enter the charging state. The rectification mode switching command frame is a data frame containing a mode switching request identifier and a target mode code, used to instruct the motor controller to switch operating modes.
[0112] CAN bus is a serial communication protocol widely used in automotive electronic systems for data transmission between control units. The verification and decoding process of the motor controller verifies and parses the received command frames to ensure data accuracy and integrity. The mode switching interrupt service routine is a software program within the motor controller that handles mode switching requests and performs related operations. Core control mode variables are a set of parameters within the motor controller used to define its operating mode; for example, these variables need to be modified when switching from driving mode to charging control mode. The control parameter set includes current loop proportional-integral parameters, voltage loop proportional-integral parameters, pulse width modulation carrier frequency, and modulation ratio limit parameters, etc.
[0113] When the vehicle controller constructs a rectification mode switching command frame, it encapsulates the mode switching request identifier and the target mode code into the data frame according to a preset communication protocol format. For example, the mode switching request identifier can be a specific binary code used to identify that the data frame is a mode switching request; the target mode code explicitly instructs the motor controller to switch to rectification mode.
[0114] After receiving a command frame, the motor controller verifies the received data using a built-in verification algorithm, such as CRC check, to ensure that no errors occurred during data transmission. If the verification passes, the motor controller further decodes the data frame, extracts the target mode code, and triggers the mode switching interrupt service routine.
[0115] In the interrupt service routine, the motor controller modifies the core control mode variables from the values corresponding to the driving mode to the values corresponding to the charging control mode, and loads the control parameter group associated with the charging control mode. For example, the current loop proportional-integral parameter is used to adjust the stability of the charging current, the voltage loop proportional-integral parameter is used to control the accuracy of the charging voltage, the pulse width modulation carrier frequency determines the switching frequency of the switching devices, and the modulation ratio limit parameter is used to prevent the switching devices from overloading.
[0116] Further, S4 includes:
[0117] S41. After receiving the high voltage ready signal sent by the battery management system, the vehicle controller constructs a rectification mode switching command frame containing a mode switching request identifier and a target mode code.
[0118] S42. The vehicle controller periodically sends the rectification mode switching command frame to the motor controller via the CAN bus;
[0119] S43. After receiving the command frame, the motor controller performs verification and decoding. If the verification passes and the target mode is identified as rectification mode, its internal mode switching interrupt service routine is triggered.
[0120] S44. In the interrupt service routine, the motor controller modifies its core control mode variable from driving mode to charging control mode and loads the control parameter group associated with the charging control mode. The control parameter group includes at least current loop proportional-integral parameters, voltage loop proportional-integral parameters, pulse width modulation carrier frequency and modulation ratio limit parameters.
[0121] S45. After the motor controller completes parameter loading, it initializes its analog-to-digital conversion sampling channel, switches the sampling target from motor phase current to DC side voltage and DC side current, and reconfigures the trigger logic of its pulse width modulation output module to respond to the modulation wave generated by the charging control algorithm.
[0122] Target charging voltage and target charging current The parameters calculated by the battery management system based on the current state of the battery pack, such as battery voltage, temperature, and SOC, guide the charging process. The current loop controller uses the target charging current as the inner loop setpoint, while the voltage loop controller uses the target charging voltage as the outer loop setpoint. The current loop controller calculates the voltage command based on the difference between the current setpoint and the actual DC-side current, while the voltage loop controller corrects the voltage command based on the difference between the voltage setpoint and the actual DC-side voltage. A PWM signal is a signal that controls the on / off state of power devices by changing the pulse width, used to regulate charging current and voltage. An insulated-gate bipolar transistor (IGBT) is a power semiconductor device used for electrical energy conversion and control.
[0123] By monitoring the battery temperature and SOC (State of Charge), the charging current is appropriately reduced when the battery temperature or SOC is high to protect the battery. Upon receiving charging parameters, the motor controller initializes a dual-loop control algorithm based on these parameters. The current loop controller uses a proportional-integral (PI) control algorithm to calculate the required voltage command based on the current error. The voltage loop controller also uses a PI control algorithm to correct the voltage command output from the current loop, ensuring that the actual output voltage matches the target voltage. During PWM signal generation, the motor controller calculates the switching timing of each insulated-gate bipolar transistor (IGBT) based on the corrected voltage command using a space vector pulse width modulation (SVPWM) algorithm. The SVPWM algorithm decomposes the target voltage vector into basic voltage vectors and calculates the duration of each vector, thereby generating a PWM signal with a specific duty cycle to achieve precise control of the charging current and voltage.
[0124] The corrected voltage command output by the voltage loop controller is calculated based on the difference between the target charging voltage and the actual DC-side voltage, and is used to guide the generation of the PWM signal. The SVPWM algorithm is a vector control-based modulation method that generates a PWM signal by decomposing the target voltage vector into basic voltage vectors and calculating the duration of these vectors in different sectors. The d-axis and q-axis voltage reference values are voltage components in a synchronous rotating coordinate system, used to represent the direction and magnitude of the target voltage vector. The inverse Parker transformation is a coordinate transformation method used to convert the voltage components in the synchronous rotating coordinate system to voltage components in a two-phase stationary coordinate system. The sector number refers to the region where the target voltage vector is located, used to determine the sequence of action of the basic voltage vectors. The DC bus voltage value is the actual voltage on the DC side of the motor controller, used to calculate the duty cycle of the PWM signal. The PWM drive signal is the finally generated control signal used to control the switching on and off of the insulated-gate bipolar transistor, thereby regulating the charging current and voltage.
[0125] In the SVPWM algorithm, the d-axis and q-axis voltage reference values are first converted into voltage components in a two-phase stationary coordinate system using an inverse Parker transformation. The sector number of the target voltage vector is determined based on these voltage components, with the sector number determined by the angular range of the voltage vector. Based on the sector number and the DC bus voltage value, the duration of action of adjacent basic voltage vectors and the zero vector is calculated; these time parameters determine the duty cycle of the PWM signal. Finally, a PWM drive signal is generated based on the calculated durations. Precise control of the on / off time of the insulated-gate bipolar transistor (IGBT) enables precise regulation of the charging current and voltage. This process not only improves charging efficiency but also reduces interference to the power grid by lowering harmonic content.
[0126] The proportional-integral (PI) parameters of the current loop are used in the control loop to regulate the charging current, determining the controller's immediate response to current errors, while the integral parameter is used to eliminate steady-state errors. The PPI parameters of the current loop are theoretically estimated based on the system model, such as determining the order of magnitude of the proportional coefficient based on the inductance value and sampling period, and finally determining the optimal value through online tuning or offline calibration in engineering experiments. In electric vehicle charging applications, the typical range for the proportional parameter of the current loop is likely between 0.1 and 5.0, and the typical range for the integral parameter is likely between 10 and 500. The PPI parameters of the voltage loop are used in the control loop to regulate the DC bus voltage, and must consider the capacity of the DC bus support capacitor, the equivalent impedance of the battery pack, and the slower response requirement of the voltage loop compared to the current loop. The proportional parameter of the voltage loop is usually smaller than that of the current loop, with a typical range of 0.01 to 0.5, and the typical range for the integral parameter is likely between 1 and 50.
[0127] The pulse width modulation (PWM) carrier frequency refers to the switching frequency at which the controller generates the PWM signal to drive the IGBT. A higher carrier frequency can result in a smoother output current waveform and faster control response, but it will lead to increased switching losses and heat generation in the IGBT. The setting of the PWM carrier frequency needs to strike a balance between current ripple, control performance and system efficiency, and heat dissipation. For on-board charging applications, a typical carrier frequency range is usually chosen from 5kHz to 20kHz.
[0128] The modulation ratio limit parameter is used to limit the amplitude of the PWM modulation wave to prevent it from entering the overmodulation region, thereby ensuring the linear controllability and waveform quality of the output voltage. Its maximum value is usually determined based on the ratio of the DC bus voltage to the AC input voltage, and is set within the range of 0.8 to 1.0 by the modulation ratio limit value.
[0129] S5 includes:
[0130] S51. The battery management system calculates the target charging voltage based on the current state of the battery pack. and target charging current ;
[0131] The S52 battery management system periodically transmits data via the CAN bus to the battery management system. and The charging parameter frame of the data is sent to the motor controller;
[0132] S53, The motor controller uses the target charging current. The inner loop is given a value based on the target charging voltage. Given a value for the outer loop, construct a dual closed-loop control structure that includes a current loop controller and a voltage loop controller;
[0133] S54. The current loop controller calculates the voltage command based on the difference between the current setpoint and the actual DC side current.
[0134] S55. The voltage loop controller corrects the voltage command based on the difference between the voltage setpoint and the actual DC side voltage, and generates a modulation wave signal for controlling the on / off state of the insulated gate bipolar transistor.
[0135] During charging, the battery management system dynamically calculates the target charging voltage and current based on the real-time status of the battery pack (such as voltage, temperature, and SOC). Initially, a constant current charging mode is used, with the target charging current as the inner loop reference to quickly increase the battery voltage. When the battery voltage approaches the target voltage, the system automatically switches to a constant voltage charging mode. In this mode, the outer loop voltage controller takes the lead, while the inner loop current controller dynamically limits the charging current based on the voltage loop output, achieving a smooth transition. The dual closed-loop controller ensures seamless transition between constant current and constant voltage modes through dynamic weight adjustment or state machine switching logic, guaranteeing charging efficiency while avoiding voltage overshoot or current surges, thus extending battery life.
[0136] Furthermore, the generation of the modulation wave signal for controlling the on / off state of the insulated gate bipolar transistor in step S55 includes:
[0137] S551. The voltage loop controller outputs a corrected voltage command, which is represented as a d-axis voltage reference value and a q-axis voltage reference value in a synchronous rotating coordinate system.
[0138] S552. Based on the space vector pulse width modulation algorithm, the d-axis voltage reference value and the q-axis voltage reference value are converted into voltage components in a two-phase stationary coordinate system through inverse Parker transformation.
[0139] S553. Calculate the sector number of the reference voltage vector based on the voltage components in the two-phase stationary coordinate system.
[0140] S554. Based on the sector number and the DC bus voltage value, calculate the duration of action of two adjacent basic voltage vectors and the duration of action of the zero vector;
[0141] S555: Based on the calculated operating time, generate the switching timing logic for the six insulated gate bipolar transistors on the corresponding three-phase bridge arm, and then generate a pulse width modulation drive signal with a specific duty cycle.
[0142] The driving control method is an alternative operating mode to the charging control method, used to achieve the normal driving function of the electric vehicle. In driving mode, the vehicle controller closes the first relay group to the three-phase winding side of the motor, establishing a drive current path from the battery pack through the motor controller to the motor. Simultaneously, the battery management system closes the second relay group, and the vehicle controller sends an inverter mode control command to the motor controller, switching it to inverter operating mode and executing torque control to drive the vehicle according to the driver's needs. This process ensures the vehicle's power output and energy management while driving.
[0143] Further, S7 includes:
[0144] S71. The vehicle controller determines whether the charging connection signal is invalid.
[0145] S72. The vehicle controller reads the current operating mode status of the motor controller through the CAN bus to determine whether it is not in charging control mode.
[0146] S73. The vehicle controller checks the vehicle's current gear signal, accelerator pedal signal, and brake pedal signal to determine whether the vehicle is in a drivable state.
[0147] S74. If all the judgment results from S71 to S73 are yes, the vehicle controller generates a driving route switching permission flag.
[0148] S75. The vehicle controller controls each relay in the first relay group to switch from its current state to the contact position of its connected motor winding according to the driving path switching permission flag.
[0149] The first relay group in vehicle control switches the current path, changing it from the external AC power supply in charging mode to the motor windings, thus establishing a drive current path from the battery pack to the motor. The validity of the charging connection signal is determined by detecting whether it is invalid, thus confirming whether the vehicle is in a non-charging state.
[0150] The current operating mode status of the motor controller is read via the CAN bus to determine if it is in non-charging control mode, ensuring the motor controller is ready to enter driving mode. The vehicle's gear position signal, accelerator pedal signal, and brake pedal signal are crucial for the vehicle controller to determine if the vehicle is in a drivable state; for example, whether the gear is in driving gear and whether the accelerator pedal is depressed. The driving path switching permission flag is an internal flag generated by the vehicle controller after confirming all conditions are met, used to trigger the switching action of the relay group. Through these judgment logics, the vehicle controller can ensure that the vehicle enters driving mode under safe and suitable conditions.
[0151] During implementation, the vehicle controller determines whether the charging connection signal is invalid by detecting the physical connection status of the charging connector or the duration of the charging signal. For example, if the charging connector is disconnected or the charging signal is interrupted for more than a preset time threshold, the charging connection signal is considered invalid. Regarding the motor controller's operating mode, the vehicle controller can determine whether it is in non-charging control mode by reading the value of its internal status register. When checking the vehicle gear position signal, the vehicle controller determines whether the gear is in a driving gear, such as D or R, and simultaneously detects the signals from the accelerator pedal and brake pedal to ensure the vehicle is drivable. For example, the voltage value of the accelerator pedal signal should be within a preset range, indicating that the driver intends to drive.
[0152] Furthermore, to prevent the system from mistakenly switching to driving mode when the charging gun is not fully unplugged or the signal is abnormal, the vehicle controller continuously monitors the level and duration of the charging connection signal before executing the path switching. If the signal is abnormal (such as level fluctuation or intermittent validity) but not completely invalid, it is considered an uncertain charging connection state. In this state, the vehicle controller prohibits the first relay group from switching to the motor winding side and sends a warning message to the instrument panel via the CAN bus. At the same time, the system activates a timeout protection mechanism: if the abnormal state continues for more than a set time (such as 5 seconds), it is forcibly determined as a charging connection failure and the charging termination process is executed, including disconnecting the second relay group, resetting the motor controller mode, and allowing driving path switching after confirming physical disconnection. In addition, the system can also combine the sensor signal of the charging gun locking mechanism for double confirmation to further eliminate the risk of misoperation.
[0153] Continue to refer to Figure 2 One embodiment of an electric vehicle charging system based on motor controller multiplexing includes:
[0154] An external AC charging connector is used to connect to an external three-phase AC power source, and is equipped with a signal triggering device to generate a physical connection confirmation signal;
[0155] The path switching unit includes a first relay group, which consists of three single-pole double-throw relays. The common terminal of each relay is connected to the midpoint of a single-phase bridge arm of the motor controller, its first switching contact is connected to the corresponding phase winding of the motor, and its second switching contact is connected to the corresponding phase of the external AC charging connector.
[0156] The vehicle controller is communicatively connected to the signal triggering device, the control terminal of the first relay group, the battery management system, and the motor controller, and is used to execute the overall logic control, state judgment, and command transmission of the method.
[0157] The battery management system is connected to the vehicle controller and the motor controller via a CAN bus and is used to manage the battery pack status, control the closing and opening of the second relay group, and calculate charging demand parameters.
[0158] The multiplexed motor controller has its three-phase AC input terminals connected to the three common terminals of the first relay group, and its DC output terminal connected to the battery pack via a DC bus. The motor controller is equipped with reconfigurable control software that can switch between inverter mode and controlled rectification mode in response to commands from the vehicle controller. The multiplexed motor controller includes a current loop controller for implementing closed-loop regulation of charging current and a voltage loop controller for implementing closed-loop regulation of charging voltage.
[0159] The drive motor has its three-phase windings connected to the first switching contacts of the corresponding relays in the first relay group;
[0160] The second relay group, located between the battery pack and the DC bus, includes a pre-charge relay, a main positive relay, and a main negative relay, and is controlled by the battery management system.
[0161] It is understandable that the modules described in this electric vehicle charging system based on motor controller reuse are similar to those in the reference. Figure 1 The steps described correspond to those in the electric vehicle charging method based on motor controller multiplexing. Therefore, the operations, features, and beneficial effects described above for the electric vehicle charging method based on motor controller multiplexing are also applicable to the electric vehicle charging system based on motor controller multiplexing and its constituent modules, and will not be repeated here.
[0162] The above description is merely an explanation of some preferred embodiments of the present invention and the technical principles employed. Those skilled in the art should understand that the scope of the invention as described in the embodiments of the present invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of the present invention.
Claims
1. An electric vehicle charging method based on multiplexing of motor controllers, characterized by, include: S1. Detect and confirm that the external AC charging connector has established a physical connection with the three-phase bridge arm input terminal of the motor controller, and generate a charging connection signal based on this connection. S2. In response to the charging connection signal, the vehicle controller controls the first relay group located between the motor controller and the motor winding to close to the external AC power supply side, so as to establish a charging current path from the external AC power supply to the motor controller. S3. After the charging current path is established, the vehicle controller sends a high-voltage enable command to the battery management system. In response to the command, the battery management system controls the second relay group to perform pre-charging and high-voltage main circuit closing operations. S4. The vehicle controller sends a rectification mode control command to the motor controller via the CAN bus, causing the motor controller to switch the operating mode of its internal power devices from inverter mode to controllable rectification mode. S5. The battery management system determines the charging demand parameters of the battery pack and sends the charging demand parameters to the motor controller via the CAN bus. Based on the charging demand parameters, the motor controller generates a pulse width modulation signal to control the on / off state of the insulated gate bipolar transistors in its three-phase bridge arm, thereby rectifying the external AC power supply and adjusting the charging voltage and charging current of the battery pack through dual closed-loop control. S6. When the charging process is completed or a stop command is received, the motor controller stops working, the second relay group and the first relay group are disconnected in sequence, and the working mode of the motor controller is reset to inverter mode.
2. The electric vehicle charging method based on motor controller reuse according to claim 1, characterized in that, S1 includes: S11. A micro switch is triggered by a mechanical locking device on the charging connector to generate a hard-wire signal indicating that a physical connection has been established. S12. The vehicle controller continuously acquires the level status of the hard-wired signal through its discrete input port and performs filtering and de-jitter processing on the signal. S13. The vehicle controller determines whether the processed hard-wired signal is a continuously valid level and the duration exceeds a first preset time threshold; if so, the vehicle controller generates a first-level valid charging connection signal. S14. After generating the first-level valid charging connection signal, the vehicle controller identifies the charging equipment parameters by detecting the charging guidance signal status in the external AC charging connector connected to it, and generates a second-level valid charging connection signal containing the rated current information of the charging equipment, which serves as the final charging connection signal.
3. The electric vehicle charging method based on motor controller reuse according to claim 1, characterized in that, S2 includes: S21. After generating a valid charging connection signal, the vehicle controller reads the feedback contact status signal of each relay in the first relay group. S22. The vehicle controller compares the feedback contact status signal with the preset safety state stored in the memory. The preset safety state is that the common terminal of all relays is not connected to the external AC power supply. S23. If the comparison results are consistent, the vehicle controller generates a first relay group switching permission flag. S24. According to the switching permission flag, the vehicle controller sends control signals to the drive circuits of the first relay, the second relay and the third relay in a preset sequence to close the control signal to the external AC power supply side, and reads the feedback contact status signal of each relay again. S25. The vehicle controller verifies whether the feedback contact status signal is consistent with the command status of "closed to the external AC power supply side". If all relay status verifications pass, the charging current path is determined to be successfully established.
4. The electric vehicle charging method based on motor controller reuse according to claim 1, characterized in that, S3 includes: S31. After receiving the high voltage enable command, the battery management system first performs a safety test on the total voltage of the battery pack, the voltage of each cell, and the insulation resistance. If the test results are all within the safe range, the pre-charge relay in the second relay group is closed. S32. The battery management system monitors the rise rate and current value of the DC bus voltage in real time at a first sampling frequency through its built-in voltage acquisition circuit. S33. The battery management system determines whether the DC bus voltage rises to a threshold voltage that is not lower than the preset percentage coefficient of the total battery pack voltage within the second preset time threshold. S34. If the conditions are met, the battery management system will simultaneously send a drive signal to close the main positive relay and the main negative relay in the second relay group, and after confirming that the main relay is closed, disconnect the precharge relay. S35. The battery management system continuously monitors the stability of the DC bus voltage after the main relay is closed. If the voltage fluctuation is less than the preset range within the third preset time threshold, it is determined that the high-voltage main circuit is successfully closed, and a high-voltage ready signal is sent to the vehicle controller via the CAN bus.
5. The electric vehicle charging method based on motor controller reuse according to claim 1, characterized in that, S4 includes: S41. After receiving the high voltage ready signal sent by the battery management system, the vehicle controller constructs a rectification mode switching command frame containing a mode switching request identifier and a target mode code. S42. The vehicle controller periodically sends the rectification mode switching command frame to the motor controller via the CAN bus; S43. After receiving the command frame, the motor controller performs verification and decoding. If the verification passes and the target mode is identified as rectification mode, its internal mode switching interrupt service routine is triggered. S44. In the interrupt service routine, the motor controller modifies its core control mode variable from driving mode to charging control mode and loads the control parameter group associated with the charging control mode. The control parameter group includes at least current loop proportional-integral parameters, voltage loop proportional-integral parameters, pulse width modulation carrier frequency and modulation ratio limit parameters. S45. After the motor controller completes parameter loading, it initializes its analog-to-digital conversion sampling channel, switches the sampling target from motor phase current to DC side voltage and DC side current, and reconfigures the trigger logic of its pulse width modulation output module to respond to the modulation wave generated by the charging control algorithm.
6. The electric vehicle charging method based on motor controller reuse according to claim 1, characterized in that, S5 includes: S51. The battery management system calculates the target charging voltage based on the current state of the battery pack. and target charging current ; The S52 battery management system periodically transmits data via the CAN bus to the battery management system. and The charging parameter frame of the data is sent to the motor controller; S53, The motor controller uses the target charging current. The inner loop is given a value based on the target charging voltage. Given a value for the outer loop, construct a dual closed-loop control structure that includes a current loop controller and a voltage loop controller; S54. The current loop controller calculates the voltage command based on the difference between the current setpoint and the actual DC side current. S55. The voltage loop controller corrects the voltage command based on the difference between the voltage setpoint and the actual DC side voltage, and generates a modulation wave signal for controlling the on / off state of the insulated gate bipolar transistor.
7. The electric vehicle charging method based on motor controller reuse according to claim 6, characterized in that, The modulation signal generated in S55 for controlling the on / off state of the insulated gate bipolar transistor includes: S551. The voltage loop controller outputs a corrected voltage command, which is represented as a d-axis voltage reference value and a q-axis voltage reference value in a synchronous rotating coordinate system. S552. Based on the space vector pulse width modulation algorithm, the d-axis voltage reference value and the q-axis voltage reference value are converted into voltage components in a two-phase stationary coordinate system through inverse Parker transformation. S553. Calculate the sector number of the reference voltage vector based on the voltage components in the two-phase stationary coordinate system. S554. Based on the sector number and the DC bus voltage value, calculate the duration of action of two adjacent basic voltage vectors and the duration of action of the zero vector; S555: Based on the calculated operating time, generate the switching timing logic for the six insulated gate bipolar transistors on the corresponding three-phase bridge arm, and then generate a pulse width modulation drive signal with a specific duty cycle.
8. The electric vehicle charging method based on motor controller reuse according to claim 1, characterized in that, Also includes: S7. The vehicle controller controls the first relay group to close to the three-phase winding side of the motor to establish a drive current path from the battery pack through the motor controller to the motor. S8. The vehicle controller sends a high-voltage enable command to the battery management system, and the battery management system controls the second relay group to close. S9. The vehicle controller sends an inverter mode control command to the motor controller via the CAN bus, causing the motor controller to switch to inverter operating mode. S10: The vehicle controller sends a target torque command to the motor controller via the CAN bus according to the driver's needs. The motor controller then performs torque control to drive the vehicle.
9. The electric vehicle charging method based on motor controller reuse according to claim 8, characterized in that, S7 includes: S71. The vehicle controller determines whether the charging connection signal is invalid. S72. The vehicle controller reads the current operating mode status of the motor controller through the CAN bus to determine whether it is not in charging control mode. S73. The vehicle controller checks the vehicle's current gear signal, accelerator pedal signal, and brake pedal signal to determine whether the vehicle is in a drivable state. S74. If all the judgment results from S71 to S73 are yes, the vehicle controller generates a driving route switching permission flag. S75. The vehicle controller controls each relay in the first relay group to switch from its current state to the contact position of its connected motor winding according to the driving path switching permission flag.
10. An electric vehicle charging system based on motor controller reuse, implementing the method as described in any one of claims 1-9, characterized in that, include: An external AC charging connector is used to connect to an external three-phase AC power source, and is equipped with a signal triggering device to generate a physical connection confirmation signal; The path switching unit includes a first relay group, which consists of three single-pole double-throw relays. The common terminal of each relay is connected to the midpoint of a single-phase bridge arm of the motor controller, its first switching contact is connected to the corresponding phase winding of the motor, and its second switching contact is connected to the corresponding phase of the external AC charging connector. The vehicle controller is communicatively connected to the signal triggering device, the control terminal of the first relay group, the battery management system, and the motor controller, and is used to execute the overall logic control, state judgment, and command transmission of the method. The battery management system is connected to the vehicle controller and the motor controller via a CAN bus and is used to manage the battery pack status, control the closing and opening of the second relay group, and calculate charging demand parameters. The multiplexed motor controller has its three-phase AC input terminals connected to the three common terminals of the first relay group, and its DC output terminal connected to the battery pack via a DC bus. The motor controller is equipped with reconfigurable control software that can switch between inverter mode and controlled rectification mode in response to commands from the vehicle controller. The multiplexed motor controller includes a current loop controller for implementing closed-loop regulation of charging current and a voltage loop controller for implementing closed-loop regulation of charging voltage. The drive motor has its three-phase windings connected to the first switching contacts of the corresponding relays in the first relay group; The second relay group, located between the battery pack and the DC bus, includes a pre-charge relay, a main positive relay, and a main negative relay, and is controlled by the battery management system.