Motor control method and device, vehicle and storage medium

By constructing intelligent control models and energy consumption analysis models, the energy consumption of permanent magnet synchronous motors is optimized, solving the problem that energy consumption optimization was not considered in existing technologies, and improving the energy efficiency and performance of motors and vehicles.

CN121124656APending Publication Date: 2025-12-12CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511148609.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-15
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Existing technologies do not adequately consider the energy consumption optimization of permanent magnet synchronous motors, which affects the overall vehicle energy consumption analysis and performance.

Method used

By constructing an intelligent control model, utilizing a pre-defined agent model and a proximal optimization strategy, and combining it with an energy consumption analysis model, the energy consumption characteristics of the motor are optimized. This includes steps such as constructing a training dataset, training the agent model, establishing an energy consumption model, and knowledge distillation, thereby optimizing the energy efficiency of the motor.

Benefits of technology

The energy efficiency of the permanent magnet synchronous motor has been optimized, improving the overall vehicle performance and enabling more accurate mapping of actual driving conditions and effective energy management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121124656A_ABST
    Figure CN121124656A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of vehicles, in particular to a motor control method and device, a vehicle and a storage medium, and the method comprises the steps: obtaining the required torque, the rotating speed and the three-phase current of a target permanent magnet synchronous motor, obtaining the required current according to the required torque and the torque through a preset intelligent control model, and transmitting the required current to the target permanent magnet synchronous motor; the three-phase current is converted to obtain an actual current, the required current and the actual current are input to a preset PI controller to obtain a required voltage, the required voltage is converted, the converted required voltage is input to a target SVPWM to obtain a switching signal, the switching signal is input to a target power battery to obtain a target direct-current voltage, and the target direct-current voltage is output to the target power battery. And converting the target DC voltage into a three-phase AC voltage by using an inverter, and controlling the target permanent magnet synchronous motor based on the three-phase AC voltage. Therefore, the problem that energy consumption optimization of the motor is not considered in a control strategy of the permanent magnet synchronous motor in the prior art is solved, the energy consumption efficiency of the motor can be optimized, and the performance of the whole vehicle is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle technology, and in particular to a method, apparatus, vehicle, and storage medium for controlling an electric motor. Background Technology

[0002] For new energy vehicles, the drive motor is the core component of its power system, and its performance greatly affects the overall vehicle performance. Due to its high efficiency, low loss, small size, and simple structure, the permanent magnet synchronous motor has become a key component in modern automobiles, especially electric vehicles and hybrid vehicles. The energy consumption characteristics of the drive motor are a very important part of the overall vehicle energy consumption analysis, and its energy consumption analysis is of great significance.

[0003] In recent years, with the development of machine learning algorithms, learning-based methods have been increasingly widely used to solve various engineering problems. Reinforcement learning, as an important branch of machine learning, is a key research direction. In motor control, using reinforcement learning agents as controllers can adaptively adjust control parameters according to changes in the environment, thereby better adapting to different working conditions. Compared with traditional PI controllers, it has the advantages of being more flexible and accurate.

[0004] In related technologies, most research on permanent magnet synchronous motors focuses on the design and development of the motor's own characteristics, without considering the energy consumption analysis and optimization of permanent magnet synchronous motors. However, the power loss of permanent magnet synchronous motors is an important parameter for the performance of the motor and an important part of automotive energy consumption analysis. Summary of the Invention

[0005] This application provides a motor control method, device, vehicle, and storage medium to solve the problem that related technologies do not consider the energy consumption optimization of motors in the control strategies of permanent magnet synchronous motors. This application can optimize the energy consumption characteristics of motors and improve the energy efficiency and performance of the whole vehicle.

[0006] The first aspect of this application provides a method for controlling a motor, including the following steps: Obtain the required torque, speed, and three-phase current of the target permanent magnet synchronous motor; Using a preset intelligent control model, the first demand current and the second demand current are obtained based on the demand torque and the torque, and the three-phase current is transformed to obtain the first actual current and the second actual current. The first demand current, the second demand current, the first actual current and the second actual current are input to a preset PI controller to obtain a first demand voltage and a second demand voltage. The first demand voltage and the second demand voltage are converted to obtain a converted first demand voltage and a converted second demand voltage. The converted first demand voltage and the converted second demand voltage are input to the target SVPWM to obtain a switching signal. The switching signal is input to the target power battery to obtain the target DC voltage. The target DC voltage is converted into a three-phase AC voltage using an inverter, and the target permanent magnet synchronous motor is controlled based on the three-phase AC voltage.

[0007] Optionally, in some embodiments, before obtaining the first demand current and the second demand current based on the demand torque and the torque using the preset intelligent control model, the following steps are included: Determine the state space, action space, and reward function of the preset agent model, and initialize the network parameters of the preset agent model; Acquire training set data, and train the preset agent model based on the state space, the action space, and the reward function to obtain an initial agent model; The network parameters of the initial agent model are updated using a preset proximal optimization strategy until convergence is obtained to obtain the optimized intelligent control model. Verify the optimization performance of the optimized intelligent control model. If the verification passes, perform knowledge distillation on the optimized intelligent control model to obtain the preset intelligent control model.

[0008] Optionally, in some embodiments, verifying the optimization performance of the optimized intelligent control model includes: The test motor is controlled based on the optimized intelligent control model, and the actual speed, power, and three-phase current signal of the test motor are obtained. The three-phase current signal of the test motor is transformed to obtain the actual current of the test motor. The working efficiency of the test motor is obtained by using a preset energy consumption analysis model based on the actual speed of the test motor, the power of the test motor, and the actual current input value of the test motor. It is then determined whether the working efficiency of the test motor is higher than that of the actual motor. If the working efficiency of the test motor is higher than that of the actual motor, then the verification is successful.

[0009] Optionally, in some embodiments, before obtaining the working efficiency of the test motor from a preset energy consumption analysis model based on the actual speed of the test motor, the power of the test motor, and the actual current input value of the test motor, the following steps are included: Establish a motor power loss model and a PWM inverter loss model, wherein the motor power loss model includes at least one of winding loss, core loss, load stray loss and mechanical loss, and the PWM inverter loss model includes at least one of conduction loss and switching loss; The preset energy consumption analysis model is obtained by integrating the motor power loss model and the PWM inverter loss model.

[0010] Optionally, in some embodiments, obtaining the training set data includes: Acquire speed, gradient, and voltage data of the test vehicle; The required torque, speed, and current of the test motor are calculated based on the speed data, slope data, and voltage data. The training set data is constructed based on the required torque, speed, and current of the test motor.

[0011] A second aspect of this application provides a control device for a motor, comprising: The acquisition module is used to acquire the required torque, speed, and three-phase current of the target permanent magnet synchronous motor; The first conversion module is used to use a preset intelligent control model to obtain the first demand current and the second demand current based on the demand torque and the torque, and to convert the three-phase current to obtain the first actual current and the second actual current. The second transformation module is used to input the first demand current, the second demand current, the first actual current and the second actual current to a preset PI controller to obtain a first demand voltage and a second demand voltage, and to convert the first demand voltage and the second demand voltage to obtain a converted first demand voltage and a converted second demand voltage. The control module is used to input the converted first demand voltage and the converted second demand voltage to the target SVPWM to obtain a switching signal, input the switching signal to the target power battery to obtain a target DC voltage, use an inverter to convert the target DC voltage into a three-phase AC voltage, and control the target permanent magnet synchronous motor based on the three-phase AC voltage.

[0012] Optionally, in some embodiments, before obtaining the first demand current and the second demand current based on the demand torque and the torque using the preset intelligent control model, the first conversion module includes: The determining unit is used to determine the state space, action space, and reward function of the preset agent model, and to initialize the network parameters of the preset agent model; The acquisition unit is used to acquire training set data and train the preset agent model based on the state space, the action space, and the reward function to obtain an initial agent model. A generation unit is used to update the network parameters of the initial agent model using a preset proximal optimization strategy until convergence is obtained to obtain the optimized intelligent control model. The verification unit is used to verify the optimization performance of the optimized intelligent control model. If the verification is successful, knowledge distillation is performed on the optimized intelligent control model to obtain the preset intelligent control model.

[0013] Optionally, in some embodiments, the verification unit includes: The first acquisition subunit is used to control the test motor based on the optimized intelligent control model, and acquire the actual speed of the test motor, the power of the test motor, and the three-phase current signal of the test motor. The test subunit is used to transform the three-phase current signal of the test motor to obtain the actual current of the test motor, and to obtain the working efficiency of the test motor by using a preset energy consumption analysis model of the actual speed of the test motor, the power of the test motor and the actual current input value of the test motor, and to determine whether the working efficiency of the test motor is higher than the working efficiency of the actual motor. The verification subunit is used to verify that the test motor's operating efficiency is higher than that of the actual motor.

[0014] Optionally, in some embodiments, before obtaining the working efficiency of the test motor from a preset energy consumption analysis model based on the actual speed of the test motor, the power of the test motor, and the actual current input value of the test motor, the test subunit includes: A sub-component is established to establish a motor power loss model and a PWM inverter loss model. The motor power loss model includes at least one of winding loss, core loss, load stray loss and mechanical loss. The PWM inverter loss model includes at least one of on-state loss and switching loss. An integration sub-component is used to integrate the motor power loss model and the PWM inverter loss model to obtain the preset energy consumption analysis model.

[0015] Optionally, in some embodiments, the acquisition unit includes: The second acquisition subunit is used to acquire the speed data, slope data, and voltage data of the test vehicle; The calculation subunit is used to calculate the required torque, speed, and current of the test motor based on the speed data, the slope data, and the voltage data. A sub-unit is constructed to build the training set data based on the required torque, speed, and current of the test motor.

[0016] A third aspect of this application provides a vehicle, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the motor control method as described in the above embodiments.

[0017] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the motor control method as described in the above embodiments.

[0018] Therefore, by acquiring the required torque, speed, and three-phase current of the target permanent magnet synchronous motor, and using a preset intelligent control model, the required current is obtained based on the required torque and speed. The three-phase current is then transformed to obtain the actual current. The required current and the actual current are input to a preset PI controller to obtain the required voltage. The required voltage is then converted and input to the target SVPWM to obtain a switching signal. The switching signal is then input to the target power battery to obtain the target DC voltage. An inverter is used to convert the target DC voltage into a three-phase AC voltage, and the target permanent magnet synchronous motor is controlled based on the three-phase AC voltage. This solves the problem that related technologies do not consider the energy consumption optimization of the motor in the control strategy of permanent magnet synchronous motors. This application can optimize the energy efficiency of the motor and improve the overall vehicle performance.

[0019] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0020] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart of a motor control method provided according to an embodiment of this application; Figure 2 This is a schematic diagram illustrating the principle of motor control according to an embodiment of this application; Figure 3 This is a schematic diagram illustrating the training process of a preset intelligent control model provided according to an embodiment of this application; Figure 4 This is a schematic diagram illustrating the training process of an initial agent model provided according to an embodiment of this application; Figure 5 This is a block diagram of a motor control device according to an embodiment of this application; Figure 6 This is a structural schematic diagram of a vehicle provided according to an embodiment of this application. Detailed Implementation

[0021] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0022] The following description, with reference to the accompanying drawings, outlines a motor control method, apparatus, vehicle, and storage medium according to embodiments of this application. Addressing the issue mentioned in the background art that related technologies do not consider energy consumption optimization in their control strategies for permanent magnet synchronous motors, this application provides a motor control method. In this method, the required torque, speed, and three-phase current of the target permanent magnet synchronous motor are obtained. Using a preset intelligent control model, the required current is obtained based on the required torque and the required speed. The three-phase current is then transformed to obtain the actual current. The required current and the actual current are input to a preset PI controller to obtain the required voltage. The required voltage is then converted and input to a target SVPWM to obtain a switching signal. The switching signal is input to a target power battery to obtain a target DC voltage. An inverter is used to convert the target DC voltage into a three-phase AC voltage, and the target permanent magnet synchronous motor is controlled based on the three-phase AC voltage. This solves the problem that related technologies do not consider energy consumption optimization in their control strategies for permanent magnet synchronous motors. This application can optimize the energy efficiency of the motor and improve the overall vehicle performance.

[0023] Specifically, Figure 1 This is a flowchart illustrating a motor control method provided in an embodiment of this application.

[0024] like Figure 1 As shown, the control method for this motor includes the following steps: In step S101, the required torque, speed and three-phase current of the target permanent magnet synchronous motor are obtained.

[0025] In step S102, using a preset intelligent control model, the first demand current and the second demand current are obtained based on the demand torque and torque, and the three-phase current is transformed to obtain the first actual current and the second actual current.

[0026] Specifically, in combination Figure 2 As shown, at a specific operating point of the motor, based on the required torque command Te' and the speed n, the required currents id' and iq' are calculated using a preset intelligent agent model. Based on the actual currents ia, ib, and ic, Clark transformation is performed to obtain id and iq.

[0027] Alternatively, in some embodiments, such as Figure 3As shown, before obtaining the first and second demand currents based on the demand torque and torque using a preset intelligent control model, the process includes: determining the state space, action space, and reward function of the preset intelligent agent model, and initializing the network parameters of the preset intelligent agent model; acquiring training set data, and training the preset intelligent agent model based on the state space, action space, and reward function to obtain an initial intelligent agent model; updating the network parameters of the initial intelligent agent model using a preset proximal optimization strategy until convergence to obtain an optimized intelligent control model; verifying the optimization performance of the optimized intelligent control model, and if the verification passes, performing knowledge distillation on the optimized intelligent control model to obtain the preset intelligent control model.

[0028] Furthermore, in some embodiments, acquiring training set data includes: acquiring speed data, gradient data, and voltage data of the test vehicle; calculating the required torque, speed, and current of the test motor based on the speed data, gradient data, and voltage data; and constructing training set data based on the required torque, speed, and current of the test motor.

[0029] Specifically, embodiments of this application can construct a training set of motor data based on vehicle driving conditions. Specifically, the vehicle's speed during actual driving is collected, a slope sensor is installed to obtain the vehicle's driving slope, and the operating voltage of the drive motor during the process. After data cleaning and filtering, a sufficiently valid sequence of the vehicle's speed, slope, and drive motor operating voltage at a certain moment within a certain period of time is obtained.

[0030] Then, the required torque, speed, and current of the motor are calculated, where... Tdemand = Ftotal / ω; Where Tdemand is the required torque, Ftotal is the total driving resistance of the vehicle, and ω is the wheel angular velocity.

[0031] F total=mgf+1 / 2*ρ*Cd*A*v^2+mgsin(θ); Where F_total is the total driving resistance of the vehicle, m is the vehicle mass (kg), g is the acceleration due to gravity, f is the rolling resistance coefficient, ρ is the air density, Cd is the air resistance coefficient, A is the projected area of ​​the vehicle, θ is the slope angle (obtained from the slope data), and v is the vehicle speed.

[0032] n = Pdemand * 60 / Tdemand; Where n is the rotational speed, Pdemand is the required power, and Pdemand = Ftotal * v.

[0033] Iq = Tdemand / k; Where Iq is the demand current q-axis current, k is the motor torque constant, the initial parameters of the motor, and the demand current d-axis current Id=0.

[0034] Construct a time-based set (Tdemand, n, Iq, Id) of the motor's required torque, speed, required q-axis current, and required d-axis current. t This constitutes the training dataset for motor control.

[0035] Therefore, this application embodiment constructs a training dataset for an intelligent model, taking into account the actual working conditions of the hybrid vehicle drive motor. In addition to the speed included in the general working conditions, the gradient is also taken into consideration. Based on the two-dimensional vehicle driving conditions, a dataset for motor control intelligent model is constructed, which can achieve a more accurate mapping of the actual driving conditions of the vehicle.

[0036] like Figure 4 As shown, after obtaining the training dataset, the near-end strategy is used to optimize the permanent magnet synchronous motor control model, and the training dataset is used to train the agent to obtain the preset agent model.

[0037] 1. Define the state space s=(Te', n), where Te' is the motor's required torque and n is the motor's speed; define the action space a=(id', iq'), where id' and iq' are the required d-axis current and required q-axis current, respectively; define the reward function as a composite function of the required and actual values ​​of each parameter: r(i)=a*[-(1-Te / Te')]+b*(ni-n(i+1))+c*(id-id')+d*(iq-iq'), where Te is the actual torque, Te' is the required torque, ni is the motor speed in the current state, n(i+1) is the motor speed in the next state, and a, b, c, and d are all weighting coefficients and hyperparameters.

[0038] 2. Initialize the weight parameters of the policy network and the evaluation network. and The weights of their respective target networks, as well as other hyperparameters involved.

[0039] 3. Obtain a training set to train the proximal policy optimization model. Apply the initialized proximal policy optimization model to the permanent magnet synchronous motor model, interact with the environment, and obtain its state, action, reward, and next state, and set it as a set (st, at, Rt, st+1).

[0040] 4. Update the policy network parameters using a pre-defined near-end policy optimization, and introduce a function that measures the advantage of the state's additional reporting compared to the average case under the given action: ; in, The estimated initial state values, The first part represents the estimated final state value, and the middle part represents the cumulative reward observed during the process. As a reward factor, This is the discount factor.

[0041] ; in, Let be the objective function. For the expected operator, For the policy optimization function, Let be the policy evaluation function. This is a hyperparameter.

[0042] clip item: ; in, For strategy ratio, That is, the ratio of the probability of the updated policy to the probability of executing the previous policy. For the dominant function, For the clipping function, For hyperparameters, For the number of data points.

[0043] To accurately estimate the advantage, the evaluation function is set as follows: ; Gradient ascent is used to maximize the objective function and obtain new weight coefficients.

[0044] 5. Update the evaluation network policy parameters using the preset gradient descent method, with the following formula: ; in, This is the loss function.

[0045] 6. Repeat steps 3-5 until the policy converges to obtain the initial agent model.

[0046] Therefore, the embodiments of this application consider the impact of energy consumption while designing the motor control, and use near-end strategy optimization to implement it, designing a reward function based on the energy consumption impact term.

[0047] Optionally, in some embodiments, verifying the optimized performance of the intelligent control model includes: controlling a test motor based on the optimized intelligent control model, and acquiring the actual speed, power, and three-phase current signal of the test motor; transforming the three-phase current signal of the test motor to obtain the actual current of the test motor; obtaining the working efficiency of the test motor by using a preset energy consumption analysis model based on the input values ​​of the actual speed, power, and current of the test motor; determining whether the working efficiency of the test motor is higher than the working efficiency of the actual motor; if the working efficiency of the test motor is higher than the working efficiency of the actual motor, the verification is passed.

[0048] Furthermore, in some embodiments, before obtaining the working efficiency of the test motor from a preset energy consumption analysis model based on the actual speed of the test motor, the power of the test motor, and the actual current input value of the test motor, the following steps are taken: establishing a motor power loss model and a PWM inverter loss model, wherein the motor power loss model includes at least one of winding loss, core loss, load stray loss, and mechanical loss, and the PWM inverter loss model includes at least one of conduction loss and switching loss; integrating the motor power loss model and the PWM inverter loss model to obtain a preset energy consumption analysis model.

[0049] Specifically, the embodiments of this application require the establishment of a preset energy consumption analysis model to analyze the energy consumption of the permanent magnet synchronous motor.

[0050] The preset energy consumption analysis model can be a mathematical model, divided into a motor power loss model and a PWM inverter loss model. The motor power loss model obtains the permanent magnet synchronous motor parameters needed to calculate power loss, which are then calculated using formulas.

[0051] Winding loss: PCu=M*I^2*RDC; where M is the number of current phases; I is the actual operating current of the motor; and RDC is the DC resistance of each phase of the stator winding.

[0052] Core loss: PFe=Kh*f*(Bmax)^2+ Ke*f^2*(Bmax)^2; where Kh and Ke are the hysteresis coefficient and eddy current loss coefficient, respectively, f is the motor power frequency, and Bmax is the maximum magnetic flux density.

[0053] Load stray loss: Ps = (I / IN)^2 * pSn * PN; where IN is the rated current, I is the actual operating current of the motor, pSn is the ratio between stray loss and rated power under rated power operating conditions, and PN is the rated power of the motor.

[0054] Mechanical loss: Pfw=Cf*π*(ωm)^2*(R2)^4*(L2)*ρ; where Cf is the coefficient of friction; ωm is the angular velocity of rotation (rad / s); R2 is the rotor radius (cm); and ρ is the air density (kg / m3).

[0055] The total power loss of the motor is Pm = PCu + PFe + Ps + Pfw.

[0056] The losses of a PWM inverter are mainly power electronic device losses, including conduction losses and switching losses. The expression is: Pi = K1*I^2 + K2*I, where K1 and K2 are the cross-correlation coefficients determined by the switching devices, and I is the actual operating current of the motor.

[0057] By integrating the two loss models, a mathematical model for energy consumption analysis of permanent magnet synchronous motors is formed, with total power loss PL = Pm + Pi.

[0058] Specifically, the PMSM module generates the actual motor speed ωm and power Pm under the influence of the workload torque. The three-phase current signals ia, ib, and ic from the acquisition module are used as feedback signals for the motor model. The speed ωm, power Pm, and the actual currents id and iq on the rotating coordinate axes are input into a preset energy consumption analysis model to obtain the power loss value PL and the operating efficiency ηm. A preset permanent magnet synchronous motor simulation verification model is run to measure the operating efficiency of the permanent magnet synchronous motor. This efficiency is compared with the operating efficiency of a motor with the same power requirement. If the efficiency is lower than the actual motor operating efficiency, the intelligent model continues to be trained until the motor efficiency exceeds the actual motor efficiency, thus obtaining the optimized performance of the optimized intelligent control model.

[0059] Therefore, this application embodiment designs a hybrid vehicle drive motor control verification method, which adds an energy consumption model to the permanent magnet synchronous motor model to verify the effect of the trained intelligent model.

[0060] After successful verification, the optimized performance of the intelligent control model is subjected to knowledge distillation, which can then be used to deploy a pre-defined intelligent control model. Knowledge distillation includes the extraction and transfer of model knowledge, as well as the preservation of the transferred policy parameters and network structure.

[0061] The embodiments of this application can directly use the deterministic samples generated by the original policy network as hard-labeled data to train a small-scale network and complete policy extraction.

[0062] First, the policy network obtained in the first stage is used as the "teacher" network, and a small neural network is constructed as the "student" network, Net-Student. The number of input, output, and hidden layers, and the activation function are the same as Net-Teacher, but the number of neurons in each hidden layer is reduced, meaning Net-Student has fewer parameters. Next, policy decision sample data generated by Net-Teacher is collected, and the loss function representing the difference in outputs between the two policy networks is minimized, as shown in the following equation. This loss function is then used to train Net-Student.

[0063] ; in, Compression loss in student networks For Teacher Network ( For input samples The output, For student networks ( For input samples The output.

[0064] Therefore, this application proposes a method for deploying an intelligent model to a motor controller using knowledge distillation, which consists of two steps: extraction and transfer of model knowledge; and saving of policy parameters and network structure after transfer. The method utilizes knowledge distillation model compression to achieve the extraction and transfer of reinforcement learning models.

[0065] In step S103, the first demand current, the second demand current, the first actual current and the second actual current are input to a preset PI controller to obtain the first demand voltage and the second demand voltage. The first demand voltage and the second demand voltage are then converted to obtain the converted first demand voltage and the converted second demand voltage.

[0066] Specifically, in combination Figure 2 As shown, the first actual current id, the second actual current iq, the first demand current id' and the second demand current iq' are input to the preset PI controller to obtain the first demand voltage ud and the second demand voltage uq'. The demand voltage is then subjected to Park transformation to obtain the transformed first demand voltage uα' and the transformed second demand voltage uβ' under the fixed coordinate axis, which are used as the input of SVPWM.

[0067] In step S104, the converted first demand voltage and the converted second demand voltage are input to the target SVPWM to obtain a switching signal, the switching signal is input to the target power battery to obtain the target DC voltage, the inverter is used to convert the target DC voltage into a three-phase AC voltage, and the target permanent magnet synchronous motor is controlled based on the three-phase AC voltage.

[0068] Specifically, in combination Figure 2 As shown, the inverter converts the DC voltage of the power battery pack into the three-phase AC voltages ua, ub, and uc required to drive the motor, and ultimately controls the operation of the PMSM and outputs the actual torque Te.

[0069] Therefore, the embodiments of this application have the following beneficial effects: 1. This application proposes a method for constructing a training dataset for an intelligent control model. It considers the actual operating conditions of the hybrid vehicle's drive motor, taking into account not only speed but also slope, and constructs a dataset for the intelligent motor control model based on two-dimensional vehicle driving conditions. This allows for a more accurate mapping of the vehicle's actual driving conditions.

[0070] 2. This application proposes an intelligent control model for energy consumption optimization of permanent magnet synchronous motors that takes energy consumption into account. It is implemented using a near-end strategy optimization, and a reward function based on the energy consumption influence term is designed. The model is trained to convergence through interaction between the agent and the environment, and a trained intelligent control model that can be used for energy consumption optimization of permanent magnet synchronous motors is obtained.

[0071] 3. This application proposes a verification method for an intelligent control model of a permanent magnet synchronous motor (PMSM). Mathematical models are established based on two types of power losses in the PMSM. Using the required torque as input, the intelligent control model obtains the required current of the PMSM that better meets the required power demand, thereby reducing the losses of the PMSM. The proposed energy consumption optimization model is run to obtain the operating efficiency of the PMSM. This efficiency is compared with the operating efficiency of a motor with the same required power. If the efficiency is lower than the actual motor operating efficiency, the reinforcement learning controller is continuously trained until the motor efficiency exceeds the actual motor efficiency, thus obtaining the optimal energy consumption optimization model for the PMSM.

[0072] 4. This application proposes a method for deploying a reinforcement learning model to a permanent magnet synchronous motor controller using knowledge distillation. To meet the computing power requirements of the motor controller, the reinforcement learning model needs to be extracted. The method consists of two steps: extraction and transfer of model knowledge; and preservation of the transferred policy parameters and network structure. It borrows from the knowledge distillation model compression method to achieve the extraction and transfer of the reinforcement learning model. Afterward, the knowledge-distilled model can be deployed to the motor controller to meet the computing power requirements.

[0073] According to the motor control method proposed in this application, the required torque, speed, and three-phase current of the target permanent magnet synchronous motor are obtained. Using a preset intelligent control model, the required current is obtained based on the required torque and speed, and the three-phase current is transformed to obtain the actual current. The required current and the actual current are input to a preset PI controller to obtain the required voltage. The required voltage is then converted and input to the target SVPWM to obtain a switching signal. The switching signal is input to the target power battery to obtain the target DC voltage. An inverter is used to convert the target DC voltage into a three-phase AC voltage, and the target permanent magnet synchronous motor is controlled based on the three-phase AC voltage. This solves the problem that related technologies do not consider motor energy consumption optimization in the control strategy of permanent magnet synchronous motors. This application can optimize the energy efficiency of the motor and improve the overall vehicle performance.

[0074] Next, the control device for the motor according to the embodiments of this application is described with reference to the accompanying drawings.

[0075] Figure 5 This is a block diagram of a motor control device according to an embodiment of this application.

[0076] like Figure 5 As shown, the control device 10 of the motor includes: an acquisition module 100, a first conversion module 200, a second conversion module 300, and a control module 400.

[0077] The acquisition module 100 is used to acquire the required torque, speed and three-phase current of the target permanent magnet synchronous motor.

[0078] The first conversion module 200 is used to obtain the first demand current and the second demand current based on the demand torque and torque using a preset intelligent control model, and to convert the three-phase current to obtain the first actual current and the second actual current.

[0079] The second transformation module 300 is used to input the first demand current, the second demand current, the first actual current and the second actual current to a preset PI controller to obtain the first demand voltage and the second demand voltage, and to convert the first demand voltage and the second demand voltage to obtain the converted first demand voltage and the converted second demand voltage.

[0080] The control module 400 is used to input the converted first demand voltage and the converted second demand voltage to the target SVPWM to obtain a switching signal, input the switching signal to the target power battery to obtain the target DC voltage, use an inverter to convert the target DC voltage into a three-phase AC voltage, and control the target permanent magnet synchronous motor based on the three-phase AC voltage.

[0081] Optionally, in some embodiments, before obtaining the first demand current and the second demand current based on the demand torque and torque using a preset intelligent control model, the first transformation module 200 includes: a determination unit, an acquisition unit, a generation unit, and a verification unit.

[0082] The determining unit is used to determine the state space, action space, and reward function of the preset agent model, and to initialize the network parameters of the preset agent model.

[0083] The acquisition unit is used to acquire training set data and train the preset agent model based on the state space, action space, and reward function to obtain the initial agent model.

[0084] The generation unit is used to update the network parameters of the initial agent model using a preset proximal optimization strategy until convergence is obtained to obtain the optimized intelligent control model.

[0085] The verification unit is used to verify the optimization performance of the optimized intelligent control model. If the verification is successful, knowledge distillation is performed on the optimized intelligent control model to obtain the preset intelligent control model.

[0086] Optionally, in some embodiments, the verification unit includes: a first acquisition subunit, a test subunit, and a verification subunit.

[0087] The first acquisition subunit is used to control the test motor based on the optimized intelligent control model and acquire the actual speed, power, and three-phase current signal of the test motor.

[0088] The test subunit is used to transform the three-phase current signal of the test motor to obtain the actual current of the test motor, and to obtain the working efficiency of the test motor by using the actual speed, power and current input values ​​of the test motor as preset energy consumption analysis models, and to determine whether the working efficiency of the test motor is higher than that of the actual motor.

[0089] The verification subunit is used to verify that the test motor's operating efficiency is higher than that of the actual motor.

[0090] Optionally, in some embodiments, before obtaining the working efficiency of the test motor from a preset energy consumption analysis model based on the actual speed, power, and current input values ​​of the test motor, the test subunit includes: a creation sub-component and an integration sub-component.

[0091] The sub-component is used to establish a motor power loss model and a PWM inverter loss model. The motor power loss model includes at least one of winding loss, core loss, load stray loss and mechanical loss, and the PWM inverter loss model includes at least one of conduction loss and switching loss.

[0092] The integration sub-component is used to integrate the motor power loss model and the PWM inverter loss model to obtain a preset energy consumption analysis model.

[0093] Optionally, in some embodiments, the acquisition unit includes: a second acquisition subunit, a calculation subunit, and a construction subunit.

[0094] The second acquisition subunit is used to acquire the speed data, gradient data, and voltage data of the test vehicle.

[0095] The calculation subunit is used to calculate the required torque, speed, and current of the test motor based on speed data, slope data, and voltage data.

[0096] Construct sub-units to build training set data based on the required torque, speed, and current of the test motor.

[0097] It should be noted that the foregoing explanation of the motor control method embodiment also applies to the motor control device of this embodiment, and will not be repeated here.

[0098] The motor control device proposed in this application obtains the required torque, speed, and three-phase current of the target permanent magnet synchronous motor. Using a preset intelligent control model, it obtains the required current based on the required torque and speed, transforms the three-phase current to obtain the actual current, inputs the required current and the actual current to a preset PI controller to obtain the required voltage, converts the required voltage, inputs the converted required voltage to the target SVPWM to obtain a switching signal, inputs the switching signal to the target power battery to obtain the target DC voltage, uses an inverter to convert the target DC voltage into a three-phase AC voltage, and controls the target permanent magnet synchronous motor based on the three-phase AC voltage. This solves the problem that related technologies do not consider motor energy consumption optimization in the control strategy of permanent magnet synchronous motors. This application can optimize the energy efficiency of the motor and improve the overall vehicle performance.

[0099] Figure 6 A schematic diagram of the structure of a vehicle provided in an embodiment of this application. The vehicle may include: The memory 601, the processor 602, and the computer program stored on the memory 601 and capable of running on the processor 602.

[0100] When the processor 602 executes the program, it implements the motor control method provided in the above embodiments.

[0101] Furthermore, the vehicle also includes: Communication interface 603 is used for communication between memory 601 and processor 602.

[0102] The memory 601 is used to store computer programs that can run on the processor 602.

[0103] The memory 601 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.

[0104] If the memory 601, processor 602, and communication interface 603 are implemented independently, then the communication interface 603, memory 601, and processor 602 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0105] Optionally, in a specific implementation, if the memory 601, processor 602, and communication interface 603 are integrated on a single chip, then the memory 601, processor 602, and communication interface 603 can communicate with each other through an internal interface.

[0106] The processor 602 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of this application.

[0107] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described motor control method.

[0108] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0109] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0110] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0111] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (FPGAs), field-programmable gate arrays (FPGAs), etc.

[0112] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0113] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A method for controlling an electric motor, characterized in that, Includes the following steps: Obtain the required torque, speed, and three-phase current of the target permanent magnet synchronous motor; Using a preset intelligent control model, the first demand current and the second demand current are obtained based on the demand torque and the torque, and the three-phase current is transformed to obtain the first actual current and the second actual current. The first demand current, the second demand current, the first actual current and the second actual current are input to a preset PI controller to obtain a first demand voltage and a second demand voltage. The first demand voltage and the second demand voltage are converted to obtain a converted first demand voltage and a converted second demand voltage. The converted first demand voltage and the converted second demand voltage are input to the target SVPWM to obtain a switching signal. The switching signal is input to the target power battery to obtain the target DC voltage. The target DC voltage is converted into a three-phase AC voltage using an inverter, and the target permanent magnet synchronous motor is controlled based on the three-phase AC voltage.

2. The method according to claim 1, characterized in that, Before using the preset intelligent control model to obtain the first demand current and the second demand current based on the demand torque and the torque, the process includes: Determine the state space, action space, and reward function of the preset agent model, and initialize the network parameters of the preset agent model; Acquire training set data, and train the preset agent model based on the state space, the action space, and the reward function to obtain an initial agent model; The network parameters of the initial agent model are updated using a preset proximal optimization strategy until convergence is obtained to obtain the optimized intelligent control model. Verify the optimization performance of the optimized intelligent control model. If the verification passes, perform knowledge distillation on the optimized intelligent control model to obtain the preset intelligent control model.

3. The method according to claim 2, characterized in that, Verifying the optimization performance of the optimized intelligent control model includes: The test motor is controlled based on the optimized intelligent control model, and the actual speed, power, and three-phase current signal of the test motor are obtained. The three-phase current signal of the test motor is transformed to obtain the actual current of the test motor. The working efficiency of the test motor is obtained by using a preset energy consumption analysis model based on the actual speed of the test motor, the power of the test motor, and the actual current input value of the test motor. It is then determined whether the working efficiency of the test motor is higher than that of the actual motor. If the working efficiency of the test motor is higher than that of the actual motor, then the verification is successful.

4. The method according to claim 3, characterized in that, Before obtaining the working efficiency of the test motor from a preset energy consumption analysis model based on the actual speed, power, and actual current input value of the test motor, the following steps are included: Establish a motor power loss model and a PWM inverter loss model, wherein the motor power loss model includes at least one of winding loss, core loss, load stray loss and mechanical loss, and the PWM inverter loss model includes at least one of conduction loss and switching loss; The preset energy consumption analysis model is obtained by integrating the motor power loss model and the PWM inverter loss model.

5. The method according to claim 2, characterized in that, The acquisition of training set data includes: Acquire speed, gradient, and voltage data of the test vehicle; The required torque, speed, and current of the test motor are calculated based on the speed data, slope data, and voltage data. The training set data is constructed based on the required torque, speed, and current of the test motor.

6. A control device for an electric motor, characterized in that, include: The acquisition module is used to acquire the required torque, speed, and three-phase current of the target permanent magnet synchronous motor; The first conversion module is used to use a preset intelligent control model to obtain the first demand current and the second demand current based on the demand torque and the torque, and to convert the three-phase current to obtain the first actual current and the second actual current. The second transformation module is used to input the first demand current, the second demand current, the first actual current and the second actual current to a preset PI controller to obtain a first demand voltage and a second demand voltage, and to convert the first demand voltage and the second demand voltage to obtain a converted first demand voltage and a converted second demand voltage. The control module is used to input the converted first demand voltage and the converted second demand voltage to the target SVPWM to obtain a switching signal, input the switching signal to the target power battery to obtain a target DC voltage, use an inverter to convert the target DC voltage into a three-phase AC voltage, and control the target permanent magnet synchronous motor based on the three-phase AC voltage.

7. The apparatus according to claim 6, characterized in that, Before obtaining the first demand current and the second demand current based on the demand torque and the torque using the preset intelligent control model, the first conversion module includes: The determining unit is used to determine the state space, action space, and reward function of the preset agent model, and to initialize the network parameters of the preset agent model; The acquisition unit is used to acquire training set data and train the preset agent model based on the state space, the action space, and the reward function to obtain an initial agent model. A generation unit is used to update the network parameters of the initial agent model using a preset proximal optimization strategy until convergence is obtained to obtain the optimized intelligent control model. The verification unit is used to verify the optimization performance of the optimized intelligent control model. If the verification is successful, knowledge distillation is performed on the optimized intelligent control model to obtain the preset intelligent control model.

8. The apparatus according to claim 7, characterized in that, The verification unit includes: The first acquisition subunit is used to control the test motor based on the optimized intelligent control model, and acquire the actual speed of the test motor, the power of the test motor, and the three-phase current signal of the test motor. The test subunit is used to transform the three-phase current signal of the test motor to obtain the actual current of the test motor, and to obtain the working efficiency of the test motor by using a preset energy consumption analysis model of the actual speed of the test motor, the power of the test motor and the actual current input value of the test motor, and to determine whether the working efficiency of the test motor is higher than the working efficiency of the actual motor. The verification subunit is used to verify that the test motor's operating efficiency is higher than that of the actual motor.

9. A vehicle, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the motor control method as described in any one of claims 1-5.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the motor control method as described in any one of claims 1-5.