Permanent magnet synchronous motor efficiency optimization control method and system

By combining the loss model method and deep reinforcement learning algorithm, the efficiency control of permanent magnet synchronous motor is optimized, and the problems of suboptimal efficiency and slow convergence speed in the existing methods are solved, and the global optimal efficiency and steady-state control of motor operation are achieved.

CN115149859BActive Publication Date: 2025-04-29XIANGTAN UNIV +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210542923.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-18
Publication Date
2025-04-29
Estimated Expiration
2042-05-18

AI Technical Summary

Technical Problem

The existing permanent magnet synchronous motor efficiency optimization control method has the problems of suboptimal efficiency control and slow convergence speed, making it difficult to achieve global optimal efficiency of motor operation.

Method used

Combining the loss model method and the deep reinforcement learning algorithm, the approximate optimal d-axis current is obtained as the initial value of deep reinforcement learning through the loss model method, and the optimal deep reinforcement learning model is constructed, the control parameter value that makes the motor run at the optimal efficiency is predicted, and the motor state is optimized through the reward function.

Benefits of technology

The global optimal control of motor efficiency is achieved, the algorithm convergence time is shortened, the impact of motor parameter changes on the results is avoided, the torque pulsation is reduced, and the steady-state efficiency of motor operation is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115149859B_ABST
    Figure CN115149859B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for optimizing the efficiency of a permanent magnet synchronous motor, the method comprising the following steps: step 1, using a loss model method to obtain an approximate optimal d-axis current of a permanent magnet synchronous motor; step 2, using an approximate optimal d-axis current as an initial value, optimizing the d-axis current using a deep reinforcement learning algorithm, and constructing an optimal deep reinforcement learning model; step 3, sending the currently collected permanent magnet synchronous motor state data to the optimal deep reinforcement learning model, predicting a control parameter value that enables the motor to operate at optimal efficiency based on the model; and controlling the permanent magnet synchronous motor according to the control parameter value. The present invention can perform real-time optimal control on the motor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of permanent magnet synchronous motor control, and relates to a composite permanent magnet synchronous motor efficiency optimization control method and system based on the combination of a loss model method and deep reinforcement learning. Background Art

[0002] Permanent magnet synchronous motors have the advantages of small size and high power density. They are widely used in many industries. How to further improve their operating efficiency is the persistent pursuit of scientific researchers. The efficiency optimization control technology of permanent magnet synchronous motors can be summarized into two categories: efficiency optimization control method based on loss model and efficiency optimization control method based on search technology.

[0003] The loss model method is the current mainstream method. It establishes the maximum efficiency function of the motor or the minimum loss function of the motor, derives the excitation current and excitation flux at the optimal efficiency, and controls them to achieve efficiency optimization. It can achieve the control target quickly and realize real-time control, but it ignores the influence of nonlinear factors such as saturation effect on parameter changes, and often does not consider the influence of the switching action of the driver on the motor efficiency. In particular, the parameters of the salient pole permanent magnet synchronous motor are not equal to the direct-axis parameters. It is more complicated to obtain the optimal direct-axis current initial value, and it is highly dependent on the motor parameters. These parameters change with the operating conditions of the motor, and the motor parameters need to be identified online. Therefore, it is difficult to implement. In practice, the model often needs to be simplified, and the approximate optimal solution obtained still deviates from the actual optimal value, and ultimately only suboptimal efficiency control can be achieved.

[0004] The search method can achieve the global optimum of system efficiency and is not affected by changes in motor parameters. However, the algorithm has a long convergence time and a slow convergence speed, which can easily cause pulsation of flux and torque. There is a contradiction between convergence speed and torque pulsation. At this time, if the control algorithm step size is not properly selected, the algorithm will converge too slowly or even not converge, resulting in a decrease in overall efficiency, which seriously affects the efficiency optimization control effect.

[0005] In view of the shortcomings of the existing technology, it is necessary to design a new permanent magnet synchronous motor efficiency optimization control method to further improve the operating efficiency of the permanent magnet synchronous motor. Summary of the invention

[0006] In view of the problems existing in the prior art, the present invention provides a permanent magnet synchronous motor efficiency optimization control method and system, which can further improve the operating efficiency of the permanent magnet synchronous motor.

[0007] The technical solution provided by the present invention is as follows:

[0008] On the one hand, a permanent magnet synchronous motor efficiency optimization control method is provided, comprising the following steps:

[0009] Step 1, using the loss model method to obtain the approximate optimal d-axis current of the permanent magnet synchronous motor;

[0010] Step 2: Taking the approximate optimal d-axis current as the initial value, the deep reinforcement learning (deep Q network, DQN) algorithm is used to optimize the d-axis current and build an optimal deep reinforcement learning model;

[0011] Step 3: Send the currently collected permanent magnet synchronous motor state data to the optimal deep reinforcement learning model, and predict the control parameter value (optimal d-axis current) that makes the motor run at the optimal efficiency based on the model; control the permanent magnet synchronous motor according to the control parameter value.

[0012] Furthermore, the step 1 comprises the following steps:

[0013] First, the motor losses are analyzed and evaluated, and a loss model of the permanent magnet synchronous motor is constructed;

[0014] The losses of permanent magnet synchronous motor include mechanical loss, copper loss and iron loss. Among them, mechanical loss changes continuously with the speed and working conditions and is uncontrollable. Therefore, the present invention only considers the electrical loss of the controllable part, including iron loss and copper loss. Combined with the d and q axis equivalent circuits of permanent magnet synchronous motor considering copper loss and iron loss, the dynamic voltage equation of permanent magnet synchronous motor can be written as:

[0015]

[0016]

[0017] Among them, u d with u q are the armature voltages of the d and q axes respectively; i d with i q are d-axis and q-axis currents (armature currents) respectively; i wd with i wq is the active component of the d and q axis stator current; R s is the armature resistance; L d With L q are the armature inductances of the d and q axes respectively; ψ m is the magnetic flux of the rotor permanent magnet; ω r is the mechanical angular velocity of the rotor; n p is the number of motor pole pairs;

[0018] From the permanent magnet synchronous motor equivalent circuit loop voltage equation (KVL), we can get:

[0019]

[0020] Among them, i Feq is the d, q axis iron loss current component, R Feis the equivalent iron loss resistance;

[0021] Combined with the expressions of the d-axis and q-axis iron loss current components, the total loss of the permanent magnet synchronous motor can be obtained as:

[0022]

[0023] T e is the electromagnetic torque of the permanent magnet synchronous motor.

[0024] Then, the approximate optimal d-axis current is obtained based on the total loss model of the permanent magnet synchronous motor;

[0025] During steady-state operation, the motor speed and torque remain unchanged. From the total loss relationship, we can see that the motor loss is only related to i wd To minimize the total loss, we only need to satisfy:

[0026]

[0027] Available wd for:

[0028]

[0029] According to the node current equation (KCL) of the permanent magnet synchronous motor equivalent circuit, we can get:

[0030] i d =i wd +i Fed

[0031] The approximate optimal d-axis current is obtained as follows:

[0032]

[0033] During the operation of the motor, the parameters will continue to change. When the loss model method is used, the obtained d-axis current can only be an approximate optimal d-axis current due to the influence of the parameters. In order to achieve optimal control of the efficiency of the permanent magnet synchronous motor, the present invention continues to optimize the parameters through deep reinforcement learning to obtain the optimal parameters for motor control.

[0034] Furthermore, the step 2 comprises the following steps:

[0035] Step 2.1: Use the deep reinforcement learning algorithm as the agent of the permanent magnet synchronous motor to build a deep reinforcement learning model, including the value network Q with the same structure v and the target network Q T, state space S, action space A and reward function Reward, each state in the state space S is represented as a four-dimensional vector (T, v, acc, T1), where T, v, acc, T1 represent the electromagnetic torque, speed, acceleration and load torque of the permanent magnet synchronous motor respectively, and each action in the action space A is the d-axis current i d A value of ;

[0036] Step 2.2, using the current deep reinforcement learning model to optimize the suboptimal data, i.e., the approximately optimal d-axis current, to obtain the global optimal data pool;

[0037] Step 2.3, detect and remove abnormal data in the global optimal data pool;

[0038] Step 2.4: Use the sample data in the global optimal data pool after removing abnormal data to train the deep reinforcement learning model, and determine whether the termination condition is met. If so, terminate and obtain the optimal deep reinforcement learning model; otherwise, return to step 2.2.

[0039] Furthermore, the step 2.2 specifically includes the following steps:

[0040] Step 2.2.1: Build a data pool D with a capacity of C;

[0041] Step 2.2.2: Measure the current state s of the motor, including the electromagnetic torque, speed, acceleration and load torque of the permanent magnet synchronous motor; record the approximate optimal d-axis current as action a, execute action a, that is, control the permanent magnet synchronous motor according to the approximate optimal d-axis current, and the permanent magnet synchronous motor automatically updates (transfers) to the next state s' (this state is the suboptimal state of the permanent magnet synchronous motor), and calculate the reward value r of executing action a in the current state s through the reward function; store the current sample data (s, a, r, s') in the data pool D;

[0042] Step 2.2.3: Update the current state s to s' and input the current state s into the value network Q v In the example, we use the value network Q v The parameter θ is used to obtain the predicted Q value of each action in the state space under the current state s, and the ε-greedy strategy is used to select the most suitable action, which is recorded as a;

[0043] Step 2.2.4: Execute action a, that is, control the permanent magnet synchronous motor according to the approximate optimal d-axis current, and the permanent magnet synchronous motor automatically updates to the next state s'; calculate the reward value r of executing action a in the current state s through the reward function; store the current sample data (s, a, r, s') in the data pool D;

[0044] Step 2.2.5: Return to step 2.2.3 and repeat until the data pool D is full (the number of sample data in the data pool D reaches its capacity C), and the data pool D at this time is used as the global optimal data pool.

[0045] The permanent magnet synchronous motor state (including electromagnetic torque, speed, acceleration and load torque) obtained by the approximate optimal d-axis current obtained by the loss model method is a constant and a suboptimal state of the permanent magnet synchronous motor. In this scheme, the state space S (state value range) is designed, each state of which is a value of electromagnetic torque, speed, acceleration and load torque of the permanent magnet synchronous motor. The motor operation state is judged by state information and rewards, and the data is optimized by the deep reinforcement learning model, so that the motor control can be adjusted in time to obtain the global optimal data pool.

[0046] Furthermore, the reward function is designed as follows:

[0047] r(s,a)=α 1 Reward T(k+1)+α 2 Reward v(k+1)+α 3 Reward acc(k+1)+α 4 Reward T1(k+1)

[0048]

[0049]

[0050]

[0051]

[0052] Wherein, T(k), v(k), acc(k), T1(k) respectively represent the electromagnetic torque, speed, acceleration and load torque of the permanent magnet synchronous motor before executing action a; T(k+1), v(k+1), acc(k+1), T1(k+1) respectively represent the electromagnetic torque, speed, acceleration and load torque of the permanent magnet synchronous motor after executing action a; Re ward T(k+1), Re ward v(k+1), Re ward acc(k+1), Re ward T1(k+1) respectively represent the electromagnetic torque, speed, acceleration and load torque reward of action a; α 1 , α 2 , α 3 , α 4are weight parameters of the four reward factors, which can be determined based on experience; r(s,a) represents the reward value for executing action a in the current state s = {T(k), v(k), acc(k), T1(k)}.

[0053] Furthermore, in step 2.3, a density-based local anomaly factor method is used to detect and remove abnormal data in the global optimal data pool;

[0054] In actual engineering, motor systems sometimes produce data that is obviously inconsistent with common sense, which is called anomalies. For search methods based on deep reinforcement learning, whether the anomalies are transient or permanent, they will have a catastrophic impact on the results of data-driven methods. This is because abnormal data will bring "confusion" to data-driven methods, making it impossible to mine the real information inside the data;

[0055] This solution uses a density-based local anomaly factor method to detect and remove abnormal points. The density-based local anomaly factor method determines whether a point is an abnormal point by comparing the density of each point with its neighboring points. The lower the density of point p, the more likely it is to be identified as an abnormal point. As for density, it is calculated by the distance between points. The farther the distance, the lower the density, and the closer the distance, the higher the density. Because this method calculates the density through the kth neighborhood of the point, rather than a global calculation, it is named a "local" anomaly factor, and will not mistakenly judge normal points as abnormal points due to different data density dispersion. The specific steps are:

[0056] Step 2.3.1: For each data point p in the global optimal data pool, calculate the kth reachable distance of each point in its kth distance neighborhood:

[0057] k reach (o,p)=max(d k (o),d(o,p))

[0058] Among them, d k (o) is the kth distance of the neighboring point o, and d(o,p) is the distance from the neighboring point o to the point p;

[0059] Step 2.3.2: Calculate the kth local reachable density p for each data point p reach (p):

[0060]

[0061] N k (p) is the kth distance neighborhood of point p; |N k (p)| is N k (p) module;

[0062] Step 2.3.3: Calculate the kth local outlier factor for each data point:

[0063]

[0064] Step 2.3.4: Analyze the local outlier factor. If the local outlier factor is less than 1, it is not an outlier. If the local outlier factor is greater than 1, it is an outlier.

[0065] Step 2.3.5: Eliminate outliers.

[0066] The step 2.4 specifically includes the following steps:

[0067] Step 2.4.1: Initialize the number of iterations t = 1; randomly select n sample data from the global optimal data pool after removing abnormal data. If the reward values ​​r in the n sample data are all greater than the set threshold, then end. At this time, the value network Q v This is the optimal deep reinforcement learning model; otherwise, go to step 2.4.2;

[0068] Step 2.4.2: Take the randomly selected n sample data as the value network Q v and the target network Q T Input;

[0069] For each sample data (s, a, r, s'), based on the state s, action a and value network Q v The parameter θ is used to obtain the corresponding predicted Q value, where the predicted Q value corresponding to the i-th sample data is recorded as Q predict(i) , where i = 1, 2, ···, n;

[0070] For each sample data (s, a, r, s'), based on the next state s' and the target network Q T The parameter θ T , obtain the Q value Q(s',a',θ corresponding to different actions a' in the state space under state s' T ) and take the maximum value And calculate the target Q value Q corresponding to the i-th sample data Target(i) :

[0071]

[0072] Among them, γ is the reward attenuation factor, which is a number between [0, 1]; r i is the reward value in the i-th sample data;

[0073] Step 2.4.3: Through Q predict(i) and Q Target(i) Calculate the loss function L:

[0074]

[0075] Step 2.4.4: Minimize the loss function L by the error backpropagation method, where the gradient descent method is used to train the network Q v Update the parameters θ;

[0076]

[0077] Among them, α is the learning law and is an empirical parameter;

[0078] Step 2.4.5: Determine whether t=K is satisfied. If so, update the target network Q. T The parameter θ T , let θ T =θ, and let t = 1; otherwise, let t = t + 1; where K is the target network parameter update period;

[0079] Step 2.4.6: Return to step 2.2.3.

[0080] Furthermore, in step 2.4.4, α is set to 0.01 so that the error value has a smaller impact on the new Q value while having a certain impact.

[0081] Furthermore, in step 2.4.5, the target network parameter update cycle K is set to 3 simulation cycles. Updating the target network parameters every 3 cycles can obtain a new target network in a timely manner, while avoiding not updating the target network for too long, causing the Q value to fall into a local optimum.

[0082] Furthermore, in step 3, the control parameter values ​​include an optimal d-axis current and an optimal q-axis current; first, the optimal d-axis current that enables the motor to operate at optimal efficiency is predicted based on the optimal deep reinforcement learning model; the permanent magnet synchronous motor is controlled according to the optimal d-axis current, and at the same time, the q-axis current of the permanent magnet synchronous motor is compensated according to the optimal d-axis current, so as to achieve optimal efficiency control of the permanent magnet synchronous motor in steady state.

[0083] During the optimization process of the motor, the change of the d-axis current will cause the speed and electromagnetic torque to fluctuate. In order to maintain the steady state of the permanent magnet synchronous motor control system, this scheme adjusts the d-axis current while compensating the q-axis current to maintain the constant torque;

[0084] The electromagnetic torque before d-axis current adjustment is:

[0085]

[0086] d-axis current change Δi d After that, the q-axis current is adjusted to i q *, the adjusted electromagnetic torque is:

[0087]

[0088] Assuming the electromagnetic torque before and after adjustment is equal, the optimal q-axis current can be obtained as:

[0089]

[0090] q-axis current change Δi q for:

[0091]

[0092] On the other hand, a permanent magnet synchronous motor efficiency optimization control system is provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and wherein when the computer program is executed by the processor, the processor implements the above-mentioned permanent magnet synchronous motor efficiency optimization control method.

[0093] Furthermore, the system also includes a data acquisition module for acquiring current state data of the permanent magnet synchronous motor, including current electromagnetic torque, rotation speed, acceleration and load torque of the permanent magnet synchronous motor, and sending the data to the processor.

[0094] The present invention combines the deep reinforcement learning algorithm with the loss model method for the first time, and proposes a new composite method to solve the problem of motor efficiency optimization. The method can inherit the advantages of both and overcome the defects of both. In the motor loss model, the driver and the permanent magnet synchronous motor are regarded as a whole, and a unified efficiency optimization model is established. However, due to the influence of parameters, the efficiency cannot reach the global optimum; the deep reinforcement learning method is to further optimize on the basis of the model method, which can achieve the global optimum of system efficiency and is not affected by the change of motor parameters, but the algorithm has a long convergence time and slow convergence speed, which is easy to cause the pulsation of magnetic flux and torque, and there is a contradiction between the convergence speed and the torque pulsation. At this time, if the control algorithm step size is improperly selected, the algorithm will converge too slowly or even not converge, resulting in a decrease in overall efficiency, which seriously affects the efficiency optimal control effect.

[0095] The present invention obtains the suboptimal efficiency d-axis current through the loss model method, and uses the current as the initial value of the deep reinforcement learning search, which can reduce the scope of data search, shorten the algorithm convergence time, and avoid the influence of motor parameter changes on the results. And the density-based local abnormal factor method is adopted, which can avoid the abnormal data from bringing "confusion" to the deep reinforcement learning method, making it impossible to mine the real information inside the data, thereby reducing the algorithm search accuracy. At the same time, because deep reinforcement learning will bring torque pulsation, the use of q-axis current compensation can reduce torque pulsation and timely make the q-axis current reach the optimal value. In addition, the electromagnetic torque, speed, acceleration and load torque obtained by the loss model method are fixed values, and the present invention combines deep reinforcement learning to set the state space as a four-dimensional vector B (T, v, acc, T1), which includes the current electromagnetic torque, speed, acceleration and load torque of the motor, and calculates the reward value in combination with the current state of the motor, so as to select the most suitable action and achieve the optimal control of the motor.

[0096] Beneficial effects:

[0097] The present invention proposes a method for optimizing the efficiency of a permanent magnet synchronous motor, which combines the advantages of the current efficiency optimization control method based on a loss model and the efficiency optimization control method based on a search technology, and overcomes the shortcomings of both. Through the motor loss model, the total loss of the motor can be intuitively obtained, the motor response speed can be accelerated, and it can be applied to various occasions. The introduction of deep reinforcement learning can enable the motor to obtain a global optimal solution when the parameters change, and realize real-time control of the motor operation. Combining the loss model method with deep reinforcement learning, it is possible to use the motor loss model method to establish a suboptimal data pool, and then globally optimize on the basis of the suboptimal, which greatly reduces the scope of data search, shortens the algorithm convergence time, and at the same time avoids the influence of motor parameter changes on the results, and can perform real-time optimal control of the motor. BRIEF DESCRIPTION OF THE DRAWINGS

[0098] Figure 1 Block diagram of vector control for efficiency optimization of permanent magnet synchronous motor.

[0099] Figure 2 is the d-axis equivalent circuit considering iron loss.

[0100] Figure 3 is the q-axis equivalent circuit considering iron loss.

[0101] Figure 4 Optimize the deep reinforcement learning framework for motor efficiency. When the motor receives an action from the agent, the motor model automatically updates to the next state based on the action and current state, and passes the state to the reward function determined by the target model to obtain the corresponding reward value, and puts the state vector and reward value into the data pool.

[0102] Figure 5It is the DQN algorithm framework. DETAILED DESCRIPTION

[0103] Reference Figure 1 The present invention proposes a permanent magnet synchronous motor efficiency optimization control method, comprising the following steps:

[0104] The present invention is further described in detail below with reference to the accompanying drawings and specific implementation modes.

[0105] Embodiment 1:

[0106] This embodiment provides a permanent magnet synchronous motor efficiency optimization control method, comprising the following steps:

[0107] Step 1, using the loss model method to obtain the approximate optimal d-axis current of the permanent magnet synchronous motor;

[0108] Step 2: Taking the approximate optimal d-axis current as the initial value, the deep reinforcement learning (deep Q network, DQN) algorithm is used to optimize the d-axis current and build an optimal deep reinforcement learning model;

[0109] Step 3: Send the currently collected permanent magnet synchronous motor state data to the optimal deep reinforcement learning model, and predict the control parameter value (optimal d-axis current) that makes the motor run at the optimal efficiency based on the model; control the permanent magnet synchronous motor according to the control parameter value.

[0110] The step 1 comprises the following steps:

[0111] First, the motor losses are analyzed and evaluated, and a loss model of the permanent magnet synchronous motor is constructed;

[0112] The losses of permanent magnet synchronous motors include copper loss, iron loss, stray loss and mechanical loss. Copper loss refers to the heat loss generated when current passes through the stator winding. Since a large number of coils are installed in the motor stator and the current passing through the coils is large during operation, copper loss is one of the main losses of the motor. Iron loss refers to the hysteresis and eddy current loss caused by the alternating flow of magnetic flux in the motor core. Its size depends on the core material itself and is related to the current frequency and speed. Mechanical loss and stray loss account for a small proportion of the total motor loss and are not easy to control and detect. Therefore, this solution only considers iron loss and copper loss. Combined with Figure 2 and Figure 3 Considering the d and q axis equivalent circuits of the permanent magnet synchronous motor with copper loss and iron loss, the dynamic voltage equation of the permanent magnet synchronous motor can be written as:

[0113]

[0114]

[0115] Among them, u d with uq are the armature voltages of the d and q axes respectively; i d with i q are d-axis and q-axis currents (armature currents) respectively; i wd with i wq is the active component of the d and q axis stator current; R s is the armature resistance; L d With L q are the armature inductances of the d and q axes respectively; ψ m is the magnetic flux of the rotor permanent magnet; ω r is the mechanical angular velocity of the rotor; n p is the number of motor pole pairs;

[0116] From the permanent magnet synchronous motor equivalent circuit loop voltage equation (KVL), we can get:

[0117]

[0118] Among them, i Feq is the d, q axis iron loss current component, R Fe is the equivalent iron loss resistance;

[0119] Combined with the expressions of the d-axis and q-axis iron loss current components, the total loss of the permanent magnet synchronous motor can be obtained as:

[0120]

[0121] T e is the electromagnetic torque of the permanent magnet synchronous motor.

[0122] Then, the approximate optimal d-axis current is obtained based on the total loss model of the permanent magnet synchronous motor;

[0123] During steady-state operation, the motor speed and torque remain unchanged. From the total loss relationship, we can see that the motor loss is only related to i wd To minimize the total loss, we only need to satisfy:

[0124]

[0125] Available wd for:

[0126]

[0127] According to the node current equation (KCL) of the permanent magnet synchronous motor equivalent circuit, we can get:

[0128] i d =i wd +i Fed

[0129] The approximate optimal d-axis current is obtained as follows:

[0130]

[0131] During the operation of the motor, the parameters will continue to change. When the loss model method is used, the obtained d-axis current can only be an approximate optimal d-axis current due to the influence of the parameters. In order to achieve optimal control of the efficiency of the permanent magnet synchronous motor, the present invention continues to optimize the parameters through deep reinforcement learning to obtain the optimal parameters for motor control.

[0132] Embodiment 2:

[0133] In this embodiment, based on embodiment 1, step 2 includes the following steps:

[0134] Step 2.1: Use the deep reinforcement learning algorithm as the agent of the permanent magnet synchronous motor to build a deep reinforcement learning model, including the value network Q with the same structure v and the target network Q T , state space S, action space A and reward function Reward, each state in the state space S is represented as a four-dimensional vector (T, v, acc, T1), where T, v, acc, T1 represent the electromagnetic torque, speed, acceleration and load torque of the permanent magnet synchronous motor respectively, and each action in the action space A is the d-axis current i d A value of ;

[0135] Step 2.2, using the current deep reinforcement learning model to optimize the suboptimal data, i.e., the approximately optimal d-axis current, to obtain the global optimal data pool;

[0136] Step 2.3, detect and remove abnormal data in the global optimal data pool;

[0137] Step 2.4: Use the sample data in the global optimal data pool after removing abnormal data to train the deep reinforcement learning model, and determine whether the termination condition is met. If so, terminate and obtain the optimal deep reinforcement learning model; otherwise, return to step 2.2.

[0138] Embodiment 3:

[0139] In this embodiment, based on the embodiment 2, the step 2.2 specifically includes the following steps:

[0140] Step 2.2.1: Build a data pool D with a capacity of C;

[0141] Step 2.2.2: Measure the current state s of the motor, including the electromagnetic torque, speed, acceleration and load torque of the permanent magnet synchronous motor; record the approximate optimal d-axis current as action a, execute action a, that is, control the permanent magnet synchronous motor according to the approximate optimal d-axis current, and the permanent magnet synchronous motor automatically updates (transfers) to the next state s' (this state is the suboptimal state of the permanent magnet synchronous motor), and calculate the reward value r of executing action a in the current state s through the reward function; store the current sample data (s, a, r, s') in the data pool D;

[0142] Step 2.2.3: Update the current state s to s' and input the current state s into the value network Q v In the example, we use the value network Q v The parameter θ is used to obtain the predicted Q value of each action in the state space under the current state s, and the ε-greedy strategy is used to select the most suitable action, which is recorded as a;

[0143] Step 2.2.4: Execute action a, that is, control the permanent magnet synchronous motor according to the approximate optimal d-axis current, and the permanent magnet synchronous motor automatically updates to the next state s'; calculate the reward value r of executing action a in the current state s through the reward function; store the current sample data (s, a, r, s') in the data pool D;

[0144] Step 2.2.5: Return to step 2.2.3 and repeat until the data pool D is full (the number of sample data in the data pool D reaches its capacity C), and the data pool D at this time is used as the global optimal data pool.

[0145] The state of the permanent magnet synchronous motor (including electromagnetic torque, speed, acceleration and load torque) obtained by the approximate optimal d-axis current obtained by the loss model method is a constant value and a suboptimal state of the permanent magnet synchronous motor; in this scheme, by designing the state space S (state value range), each state is a value of electromagnetic torque, speed, acceleration and load torque of the permanent magnet synchronous motor, and optimizing the data through the deep reinforcement learning model, a global optimal data pool can be obtained. The motor state obtained by the loss model method is used as the initial value of the deep reinforcement learning algorithm, which can reduce the number of trial and error in the motor search process, and globally optimize on the basis of the suboptimal, greatly reducing the training and learning time.

[0146] Embodiment 4:

[0147] In this embodiment, based on the embodiment 3, the value of C in step 2.2.1 is set to 200, that is, the data pool D can store 200 sample data.

[0148] Embodiment 5:

[0149] In this embodiment, based on Embodiment 3, the reward function is designed as follows:

[0150] r(s,a)=α 1 Reward T(k+1)+α 2 Reward v(k+1)+α 3 Reward acc(k+1)+α 4 Reward T1(k+1)

[0151]

[0152]

[0153]

[0154]

[0155] Wherein, T(k), v(k), acc(k), T1(k) respectively represent the electromagnetic torque, speed, acceleration and load torque of the permanent magnet synchronous motor before executing action a; T(k+1), v(k+1), acc(k+1), T1(k+1) respectively represent the electromagnetic torque, speed, acceleration and load torque of the permanent magnet synchronous motor after executing action a; Reward T(k+1), Reward v(k+1), Reward acc(k+1), Reward T1(k+1) respectively represent the electromagnetic torque, speed, acceleration and load torque reward of action a; α 1 , α 2 , α 3 , α 4 are weight parameters of the four reward factors, which can be determined based on experience; r(s,a) represents the reward value for executing action a in the current state s = {T(k), v(k), acc(k), T1(k)}.

[0156] Embodiment 6:

[0157] In this embodiment, based on the embodiment 2, in step 2.3, a density-based local anomaly factor method is used to detect and remove abnormal data in the global optimal data pool;

[0158] In actual engineering, motor systems sometimes generate data that is obviously inconsistent with common sense, which is called anomalies. For search methods based on deep reinforcement learning, whether the anomalies are transient or permanent, they will have a catastrophic impact on the results of data-driven methods. This is because abnormal data will bring "confusion" to data-driven methods, making it impossible to mine the real information inside the data. By detecting and eliminating anomalies, the real information inside the data can be mined, making the motor run more smoothly.

[0159] This solution uses a density-based local anomaly factor method to detect and remove abnormal points. The density-based local anomaly factor method determines whether a point is an abnormal point by comparing the density of each point with its neighboring points. The lower the density of point p, the more likely it is to be identified as an abnormal point. As for density, it is calculated by the distance between points. The farther the distance, the lower the density, and the closer the distance, the higher the density. Because this method calculates the density through the kth neighborhood of the point, rather than a global calculation, it is named a "local" anomaly factor, and will not mistakenly judge normal points as abnormal points due to different data density dispersion. The specific steps are:

[0160] Step 2.3.1: For each data point p in the global optimal data pool, calculate the kth reachable distance of each point in its kth distance neighborhood:

[0161] k reach (o,p)=max(d k (o),d(o,p))

[0162] Among them, d k (o) is the kth distance of the neighboring point o, and d(o,p) is the distance from the neighboring point o to the point p;

[0163] Step 2.3.2: Calculate the kth local reachable density p for each data point p reach (p):

[0164]

[0165] N k (p) is the kth distance neighborhood of point p; |N k (p)| is N k (p) module;

[0166] Step 2.3.3: Calculate the kth local outlier factor for each data point:

[0167]

[0168] Step 2.3.4: Analyze the local outlier factor. If the local outlier factor is less than 1, it is not an outlier. If the local outlier factor is greater than 1, it is an outlier.

[0169] Step 2.3.5: Eliminate outliers.

[0170] Embodiment 6:

[0171] In this embodiment, based on embodiment 3, step 2.4 specifically includes the following steps:

[0172] Step 2.4.1: Initialize the number of iterations t = 1; randomly select n sample data from the global optimal data pool after removing abnormal data. If the reward values ​​r in the n sample data are all greater than the set threshold, then end. At this time, the value network Q v This is the optimal deep reinforcement learning model; otherwise, go to step 2.4.2;

[0173] Step 2.4.2: Take the randomly selected n sample data as the value network Q v and the target network Q T Input;

[0174] For each sample data (s, a, r, s'), based on the state s, action a and value network Q v The parameter θ is used to obtain the corresponding predicted Q value, where the predicted Q value corresponding to the i-th sample data is recorded as Q predict(i) , where i = 1, 2, ···, n;

[0175] For each sample data (s, a, r, s'), based on the next state s' and the target network Q T The parameter θ T , obtain the Q value Q(s',a',θ corresponding to different actions a' in the state space under state s' T ) and take the maximum value And calculate the target Q value Q corresponding to the i-th sample data Target(i) :

[0176]

[0177] Among them, γ is the reward attenuation factor, which is a number between [0, 1]; r i is the reward value in the i-th sample data;

[0178] Step 2.4.3: Through Q predict(i) and Q Target(i) Calculate the loss function L:

[0179]

[0180] Step 2.4.4: Minimize the loss function L by the error backpropagation method, where the gradient descent method is used to train the network Q v Update the parameters θ;

[0181]

[0182] Among them, α is the learning law and is an empirical parameter;

[0183] Step 2.4.5: Determine whether t=K is satisfied. If so, update the target network Q.T The parameter θ T , let θ T =θ, and let t = 1; otherwise, let t = t + 1; where K is the target network parameter update period;

[0184] Step 2.4.6: Return to step 2.2.3.

[0185] Embodiment 7:

[0186] In this embodiment, based on the embodiment 6, in step 2.4.4, α is set to 0.01, so that the error value has a smaller impact on the new Q value, while having a certain impact.

[0187] Embodiment 8:

[0188] In this embodiment, based on Embodiment 6, in step 2.4.5, the target network parameter update period K is set to 3 simulation periods. Updating the target network parameters every 3 periods can obtain a new target network in a timely manner, while avoiding not updating the target network for too long, causing the Q value to fall into a local optimum.

[0189] Embodiment 9:

[0190] In this embodiment, based on Embodiment 2, in step 3, the control parameter values ​​include an optimal d-axis current and an optimal q-axis current; first, the currently acquired real-time data is sent to the optimal deep reinforcement learning model, and the optimal d-axis current that enables the motor to operate at the optimal efficiency is predicted based on the optimal deep reinforcement learning model; the permanent magnet synchronous motor is controlled according to the optimal d-axis current, and the q-axis current of the permanent magnet synchronous motor is compensated according to the optimal d-axis current, so as to achieve optimal efficiency control of the permanent magnet synchronous motor in steady state.

[0191] This solution is considered to be implemented in an actual motor, so it is necessary to ensure that the motor runs in a steady state to achieve optimal efficiency. During the optimization process of the motor, changes in the d-axis current will cause fluctuations in the speed and electromagnetic torque. In order to maintain the steady state of the permanent magnet synchronous motor control system, this solution adjusts the d-axis current while compensating the q-axis current to maintain constant torque;

[0192] The electromagnetic torque before d-axis current adjustment is:

[0193]

[0194] d-axis current change Δi d After that, the q-axis current is adjusted to i q * , the adjusted electromagnetic torque is:

[0195]

[0196] Assuming the electromagnetic torque before and after adjustment is equal, the optimal q-axis current can be obtained as:

[0197]

[0198] q-axis current change Δi q for:

[0199]

[0200] Embodiment 10:

[0201] This embodiment provides a permanent magnet synchronous motor efficiency optimization control system, including a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the computer program is executed by the processor, the processor implements the permanent magnet synchronous motor efficiency optimization control method described in the above embodiment.

[0202] Embodiment 11:

[0203] In this embodiment, based on embodiment 10, the system further includes a data acquisition module for acquiring current state data of the permanent magnet synchronous motor, including the current electromagnetic torque, rotation speed, acceleration and load torque of the permanent magnet synchronous motor, and sending the data to the processor.

[0204] The present invention combines the deep reinforcement learning algorithm with the loss model method for the first time, and proposes a new composite method to solve the problem of motor efficiency optimization. The method can inherit the advantages of both and overcome the defects of both. In the motor loss model, the driver and the permanent magnet synchronous motor are regarded as a whole, and a unified efficiency optimization model is established. However, due to the influence of parameters, the efficiency cannot reach the global optimum; the deep reinforcement learning method is to further optimize on the basis of the model method, which can achieve the global optimum of system efficiency and is not affected by the change of motor parameters, but the algorithm has a long convergence time and slow convergence speed, which is easy to cause the pulsation of magnetic flux and torque, and there is a contradiction between the convergence speed and the torque pulsation. At this time, if the control algorithm step size is improperly selected, the algorithm will converge too slowly or even not converge, resulting in a decrease in overall efficiency, which seriously affects the efficiency optimal control effect.

[0205] The present invention obtains the suboptimal efficiency d-axis current through the loss model method, and uses the current as the initial value of the deep reinforcement learning search, which can reduce the scope of data search, shorten the algorithm convergence time, and avoid the influence of motor parameter changes on the results. And the density-based local abnormal factor method is adopted, which can avoid the abnormal data from bringing "confusion" to the deep reinforcement learning method, making it impossible to mine the real information inside the data, thereby reducing the algorithm search accuracy. At the same time, because deep reinforcement learning will bring torque pulsation, the use of q-axis current compensation can reduce torque pulsation and timely make the q-axis current reach the optimal value. In addition, the electromagnetic torque, speed, acceleration and load torque obtained by the loss model method are fixed values, and the present invention combines deep reinforcement learning to set the state space as a four-dimensional vector B (T, v, acc, T1), which includes the current electromagnetic torque, speed, acceleration and load torque of the motor, and calculates the reward value in combination with the current state of the motor, so as to select the most suitable action and achieve the optimal control of the motor.

[0206] In summary, the present invention provides a method and system for optimizing the efficiency of a permanent magnet synchronous motor, which can achieve global optimal efficiency when the motor is running, and has the advantages of short search time, fast convergence speed, and can achieve real-time control of the motor operation and be applicable to various occasions, etc.; it can achieve energy saving and emission reduction, reduce losses and improve efficiency. The method and system proposed in the present invention are simple, easy to understand, easy to implement, and highly accurate, and are a feasible solution that can effectively improve the efficiency of a permanent magnet synchronous motor.

[0207] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A permanent magnet synchronous motor efficiency optimization control method, characterized in that: The following steps are involved: Step 1, using the loss model method to obtain the approximate optimal d-axis current of the permanent magnet synchronous motor; Step 2: Taking the approximate optimal d-axis current as the initial value, the deep reinforcement learning algorithm is used to optimize the d-axis current and construct the optimal deep reinforcement learning model; specifically: Step 2.1: Build a deep reinforcement learning model, including the value network Q with the same structure v and the target network Q T , state space S, action space A and reward function R ewar d, each state in the state space S is represented by a four-dimensional vector (T, v, acc, T1), where T, v, acc, T1 represent the electromagnetic torque, speed, acceleration and load torque of the permanent magnet synchronous motor respectively, and each action in the action space A is the d-axis current i d A value of ; Step 2.2, using the current deep reinforcement learning model to optimize the suboptimal data, i.e., the approximately optimal d-axis current, to obtain a global optimal data pool; Step 2.3, detect and remove abnormal data in the global optimal data pool; Step 2.4: Use the sample data in the global optimal data pool after removing abnormal data to train the deep reinforcement learning model, and determine whether the termination condition is met. If so, terminate and obtain the optimal deep reinforcement learning model; Otherwise, return to step 2.2; Step 3: Send the currently collected permanent magnet synchronous motor state data to the optimal deep reinforcement learning model, and predict the control parameter value that makes the motor run at the optimal efficiency based on the model; control the permanent magnet synchronous motor according to the control parameter value.

2. The method for optimizing the efficiency of a permanent magnet synchronous motor according to claim 1, characterized in that: The step 2.2 specifically includes the following steps: Step 2.2.1: Build a data pool D with a capacity of C; Step 2.2.2: Measure the current state s of the motor, including the electromagnetic torque, speed, acceleration and load torque of the permanent magnet synchronous motor; record the approximate optimal d-axis current as action a, execute action a, that is, control the permanent magnet synchronous motor according to the approximate optimal d-axis current, and the permanent magnet synchronous motor automatically updates to the next state s', and calculate the reward value r of executing action a in the current state s through the reward function; store the current sample data s, a, r, s in the data pool D; Step 2.2.3: Update the current state s to s' and input the current state s into the value network Q v In the example, we use the value network Q v The parameter θ is used to obtain the predicted Q value of each action in the state space under the current state s, and the ε-greedy strategy is used to select the most suitable action, which is recorded as a; Step 2.2.4: Execute action a, that is, control the permanent magnet synchronous motor according to the approximate optimal d-axis current, and the permanent magnet synchronous motor automatically updates to the next state s'; calculate the reward value r of executing action a in the current state s through the reward function; store the current sample data s, a, r, s in the data pool D; Step 2.2.5: Return to step 2.2.3 and repeat until the data pool D is full, and take the data pool D at this time as the global optimal data pool.

3. The method for optimizing the efficiency of a permanent magnet synchronous motor according to claim 2, characterized in that: The reward function is designed as follows: r(s,a)=α1·Reward T(k+1)+α2·Reward v(k+1)+α3·Reward acc(k+1)+α4·RewardT1(k+1) Among them, T(k), v(k), acc(k), T1(k) respectively represent the electromagnetic torque, speed, acceleration and load torque of the permanent magnet synchronous motor before executing action a; T(k+1), v(k+1), acc(k+1), T1(k+1) respectively represent the electromagnetic torque, speed, acceleration and load torque of the permanent magnet synchronous motor after executing action a; Reward T(k+1), Reward v(k+1), Reward acc(k+1), Reward T1(k+1) respectively represent the electromagnetic torque, speed, acceleration and load torque rewards of action a; α1, α2, α3, α4 are the weight parameters of the four reward factors; r(s,a) represents the current state s = the reward value for performing action a under {T(k), v(k), acc(k), T1(k)}.

4. The method for optimizing the efficiency of a permanent magnet synchronous motor according to claim 2, characterized in that: The step 2.4 specifically includes the following steps: Step 2.4.1: Initialize the number of iterations t = 1; randomly select n sample data from the global optimal data pool after removing abnormal data. If the reward values ​​r in the n sample data are all greater than the set threshold, then end. At this time, the value network Q v This is the optimal deep reinforcement learning model; otherwise, go to step 2.4.2; Step 2.4.2: Take the randomly selected n sample data as the value network Q v and the target network Q T Input; For each sample data s, a, r, s, based on the state s, action a and value network Q v The parameter θ is used to obtain the corresponding predicted Q value, where the predicted Q value corresponding to the i-th sample data is recorded as Q predict(i) , where i = 1, 2, ···, n; For each sample data s, a, r, s, based on the next state s' and the target network Q T The parameter θ T , obtain the Q value Q(s',a',θ corresponding to different actions a' in the state space under state s' T ) and take the maximum value And calculate the target Q value Q corresponding to the i-th sample data Target(i) : Among them, γ is the reward attenuation factor, which is a number between [0, 1]; r i is the reward value in the i-th sample data; Step 2.4.3: Through Q predict(i) and Q Target(i) Calculate the loss function L: Step 2.4.4: Minimize the loss function L by the error backpropagation method, where the gradient descent method is used to train the network Q v Update the parameters θ; Among them, α is the learning law; Step 2.4.5: Determine whether t=K is satisfied. If so, update the target network Q. T The parameter θ T , let θ T =θ, and let t = 1; otherwise, let t = t + 1; where K is the target network parameter update period; Step 2.4.6: Return to step 2.2.

3.

5. The method for optimizing the efficiency of a permanent magnet synchronous motor according to claim 4, characterized in that: In step 2.4.4, α is set to 0.

01.

6. The method for optimizing the efficiency of a permanent magnet synchronous motor according to claim 4, characterized in that: In step 2.4.5, the target network parameter update period K is set to 3 simulation periods.

7. The method for optimizing the efficiency of a permanent magnet synchronous motor according to claim 4, characterized in that: In step 3, the control parameter values ​​include the optimal d-axis current and the optimal q-axis current; first, based on the optimal deep reinforcement learning model, the optimal d-axis current that enables the motor to operate at the optimal efficiency is predicted; the permanent magnet synchronous motor is controlled according to the optimal d-axis current, and the q-axis current of the permanent magnet synchronous motor is compensated according to the optimal d-axis current to achieve the optimal efficiency control of the permanent magnet synchronous motor in the steady state, and the q-axis current compensation amount Δi q for: Among them, L d With L q are the armature inductances of the d and q axes respectively; ψ m is the magnetic flux of the rotor permanent magnet; i d To adjust the previous d-axis current, i q To adjust the previous q-axis current, Δi d is the change in d-axis current after adjustment.

8. A method for optimizing the efficiency of a permanent magnet synchronous motor, comprising a memory and a processor, wherein a computer program is stored in the memory, characterized in that: When the computer program is executed by the processor, the processor implements the permanent magnet synchronous motor efficiency optimization control method according to any one of claims 1 to 7.

9. The method for optimizing the efficiency of a permanent magnet synchronous motor according to claim 8, characterized in that: It also includes a data acquisition module for collecting current state data of the permanent magnet synchronous motor, including the current electromagnetic torque, rotation speed, acceleration and load torque of the permanent magnet synchronous motor, and sending the data to the processor.

Citation Information

Patent Citations

  • Permanent magnet synchronous motor efficiency optimization control method based on improved golden section method

    CN108880368A