Parameter Identification Method for Synchronous Motor Based on Neural Network
20240429845 ยท 2024-12-26
Inventors
Cpc classification
H02P23/14
ELECTRICITY
International classification
H02P23/00
ELECTRICITY
H02P23/14
ELECTRICITY
Abstract
A parameter identification method for a synchronous motor based on a neural network is disclosed. A method for parameter identification of synchronous motors based on neural networks includes: S1) establishing and training a first neural network model to determine intermediate results of the parameters to be identified for the synchronous motor, S2) forming a second neural network model by adding a compensation module to the trained first neural network model, S3) training the second neural network model based on the intermediate results of the parameters to be identified, and determining the final results of the parameters to be identified using the trained second neural network model. Also disclosed is a device and a computer program product for parameter identification of synchronous motors based on neural networks.
Claims
1. A method for parameter identification of a synchronous motor based on a neural network, comprising: S1) establishing and training a first neural network model to determine intermediate results of parameters to be identified for the synchronous motor using the trained first neural network model; S2) forming a second neural network model by adding a compensation module to the trained first neural network model; and S3) training the second neural network model based on the intermediate results of the parameters to be identified to determine the final results of the parameters to be identified using the trained second neural network model.
2. The method according to claim 1, wherein the intermediate results comprise: a linear approximation value of a first parameter in the parameters to be identified; and a first estimated value of a second parameter in the parameters to be identified under the linear approximation of the first parameter.
3. The method according to claim 1, wherein the final results comprise: the linear approximation value of the first parameter in the parameters to be identified after being compensated for nonlinearity; and a second estimated value of the second parameter in the parameters to be identified after compensating for the nonlinearity of the linear approximation value of the first parameter.
4. The method according to claim 1, wherein the parameters to be identified for the synchronous motor include stator resistance, d-axis inductance, q-axis inductance, and permanent magnet flux of the synchronous motor.
5. The method according to claim 1, wherein step S1 comprises: establishing an input-output relationship for the first neural network model based on the static voltage state equations of the synchronous motor in the d-q coordinate system, wherein the inputs of the first neural network model comprise q-axis current, d-axis current, and synchronous motor electrical angular velocity, while the outputs of the first neural network model comprises q-axis voltage and d-axis voltage of the synchronous motor, the weights of the first neural network model are at least partially represented by the parameters to be identified.
6. The method according to claim 5, wherein step S1 comprises: obtaining known observation data of the synchronous motor, said known observation data includes d-axis current, q-axis current, d-axis voltage, q-axis voltage, and electrical angular velocity of the synchronous motor measured at different operating points; training the first neural network model using the known observation data, wherein adjusting the weights of the first neural network model until the loss function satisfies a first predetermined condition; and determining intermediate results of the synchronous motor's parameters to be identified based on the weights of the first neural network model when the loss function satisfies the first predetermined condition.
7. The method according to claim 6, wherein adjusting the weights of the first neural network model comprises: iteratively updating the weights of the first neural network model using a gradient descent algorithm.
8. The method according to claim 1, wherein step S2 comprises: establishing a third neural network model as the compensation module, with q-axis current and d-axis current as inputs to the third neural network model, and the nonlinear characteristic portion of the first parameter in the parameters to be identified as the output of the third neural network model.
9. The method according to claim 1, wherein step S2 comprises: adding the compensation module to the first neural network model as follows: sharing a part of the input layer of the first neural network model with the input layer of the compensation module, and connecting the output layer of the compensation module to the output layer of the first neural network model.
10. The method according to claim 1, wherein step S3 comprises: training the second neural network model using the known observation data, wherein adjusting the weights of the trained first neural network model and the weight of the compensation module until the loss function satisfies a second predetermined condition; and determining the final results of the parameters to be identified of the synchronous motor based on the weights of the first neural network model and the weight of the compensation module when the loss function satisfies the second predetermined condition.
11. The method according to claim 10, wherein while adjusting the weights of the trained first neural network model, the intermediate results of the first parameter in the parameters to be identified are kept unchanged, and the intermediate results of the second parameter in the parameters to be identified are changed.
12. The method according to claim 6, wherein the loss function is represented by the following formula:
13. The method according to claim 1, wherein the method further comprises: sending the final results of the parameters to be identified to the controller of the synchronous motor to control the operation of the synchronous motor based on the final results; and/or sending the weights of the trained second neural network model to the internal neural network of the controller of the synchronous motor, allowing the internal neural network to determine the online final results of the parameters to be identified based on the operation parameters of the synchronous motor in real time when applying the weights of the second neural network model, and controlling the operation of the synchronous motor based on the online final results.
14. A neural network-based synchronous motor parameter identification device, the device being configured to perform the method according to claim 1, the device comprises: a first identification module, configured to establish and train a first neural network model and determine intermediate results of the parameters to be identified for the synchronous motor using the trained first neural network model; a modification module, configured to form a second neural network model by adding a compensation module to the trained first neural network model; and a second identification module, configured to train the second neural network model based on the intermediate results of the parameters to be identified and determine the final results of the parameters to be identified using the trained second neural network model.
15. A computer program product, wherein the computer program product comprises a computer program configured to implement the method according to claim 1 when executed by a computer.
16. The method according to claim 7, wherein the gradient descent algorithm is a backpropagation algorithm.
Description
DESCRIPTION OF THE DRAWINGS
[0052] The present invention is described in greater detail with reference to the accompanying drawings to provide a better understanding of its principles, features, and advantages. The drawings include:
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059]
[0060]
[0061]
[0062]
[0063] SPECIFIC EMBODIMENTS
[0064] In order to provide a clearer understanding of the technical problem, technical solution, and beneficial technical effects of the present invention, the following description is given in further detail in conjunction with the accompanying drawings and multiple exemplary examples. It should be understood that the specific embodiments described herein are provided only for the purpose of explaining the invention and not limiting the scope of protection of the invention.
[0065]
[0066] In Step S1, a first neural network model is established and trained to determine the intermediate results of the parameters to be identified for the synchronous motor.
[0067] The synchronous motor, in the context of the present invention, may include synchronous reluctance motors, permanent magnet synchronous motors, induction motors, and other types of synchronous motors with parameter nonlinearity.
[0068] In the context of the present invention, the parameters to be identified for the synchronous motor may include, for example, the stator resistance R, the d-axis inductance L.sub.d, the q-axis inductance L.sub.q, and/or the permanent magnet flux linkage .sub.f. Among these parameters, the stator resistance R and the permanent magnet flux linkage .sub.f may be considered to be inherent parameters of the synchronous motor and therefore do not change with the control of the outside temperature. However, due to the unavoidable iron core saturation phenomenon and material factors, the d-axis inductance L.sub.d and q-axis inductance L.sub.q of the synchronous motor will vary with changes in current. Treating them as constants would inevitably affect the control precision and stability of the motor.
[0069] In the context of the present invention, the intermediate results of the parameters to be identified include, for example, the linear approximation values of the first parameter (e.g., d-axis inductance L.sub.d and q-axis inductance L.sub.q) to be identified. Furthermore, these intermediate results also include: the first estimated value of the second parameter (e.g., stator resistance R and permanent magnet flux linkage .sub.f) among the parameters to be identified, considering the linear approximation of the first parameter.
[0070] In this step, the input-output relationship of the first neural network model is established, for example, based on the synchronous motor's static voltage state equations in the d-q coordinate system. Taking the example of a permanent magnet synchronous motor, the static voltage state equations used are as follows:
[0071] Where U.sub.sd is the d-axis voltage of the synchronous motor, R is the stator resistance of the synchronous motor, .sub.1 is the electrical angular velocity of the synchronous motor, L.sub.q is the q-axis inductance of the synchronous motor, i.sub.sq is the q-axis current of the synchronous motor, |.sub.f| is the amplitude of the permanent magnet flux linkage of the synchronous motor, is the zero angle of the synchronous motor, and U.sub.sq is the q-axis voltage, i.sub.sd is the d-axis current of the synchronous motor, and L.sub.d is the d-axis inductance.
[0072] To establish a first neural network model, for instance, the q-axis current and d-axis current and the angular velocity of the synchronous motor are used as inputs of the first neural network model and the q-axis voltage and d-axis voltage as outputs of the first neural network model to characterize the modifiable weight of the first neural network model using R, L.sub.d, L.sub.q, and .sub.f as the parameters to be identified.
[0073] In Step S2, a second neural network model is formed by adding a compensation module to the trained first neural network model. To describe the nonlinearity of the parameters to be identified, for example, a third neural network model is established as the compensation module, using the q-axis current and d-axis current as inputs, and the nonlinear characteristic portions of the d-axis inductance and q-axis inductance to be identified as outputs.
[0074] In step S3, the second neural network model is trained based on intermediate results derived from the parameters to be identified. The final results of the parameters to be identified are determined using the trained second neural network model. In the context of the present invention, the term final results refers to the outcomes that can characterize the actual values or actual functional relationships of the parameters to be identified. For instance, the final results of the parameters to be identified may include the linear approximation values of the first parameter (e.g., d-axis inductance and q-axis inductance) after being compensated for nonlinearity. Furthermore, the final results also include: after compensating the linear approximation value of the first parameter for nonlinearity, the second estimated value of the second parameter (e.g., stator resistance R and permanent magnet flux linkage .sub.f) in the parameters to be identified no longer substantially or only slightly contains the nonlinear component contributions of the first parameter, compared to the previously determined first estimated value. By excluding this part, the second estimated value of the parameters approaches their true values more closely. In this step, for example, by using the second neural network model to update the intermediate results of the already determined parameters to be identified, the identification equations of each unknown parameter can be determined based on the updated results.
[0075]
[0076] In step S11, observation data is obtained. Taking a permanent magnet synchronous motor as an example, stable operation of the permanent magnet synchronous motor is controlled initially. Then, by changing the reference current, load torque, motor speed, and other conditions, N sets of different operating points are traversed in as wide a working range as possible, and the d-axis voltage U.sub.sd, q-axis voltage U.sub.sq, d-axis current i.sub.sd, q-axis current i.sub.sq, and electrical angular velocity .sub.1 of the motor are recorded at these operating points. Here, the value of N can be adjusted freely according to the time consumption and the desired model precision, usually within the range of 15 to 30.
[0077] In step S12, the d-axis current i.sub.sd, the q-axis current i.sub.sq, and the electrical angular velocity .sub.1 in a set of data are extracted from the observation data and input into the first neural network model through forward propagation.
[0078] In step S13, the output of the first neural network model is calculated based on the initial estimated values of the weights between each layer of neurons. Here, the initial estimated values of at least some of the weights of the first neural network model describe the values of the motor's parameters to be identified R, L.sub.d, L.sub.q, and .sub.f under the condition of neglecting the motor's nonlinear characteristics. These initial estimated values of the weights can be derived by engineering experts based on experience or can be any mathematically and physically meaningful values externally input at random.
[0079] In step S14, the output error is calculated. For example, the deviation between the d- axis voltage .Math..sub.sd output by the first neural network model and the d-axis voltage U.sub.sd extracted from the observation data in step S12 is calculated, and the deviation between the q-axis voltage .Math..sub.sq output by the first neural network model and the q-axis voltage U.sub.sq extracted from the observation data is also calculated.
[0080] In step S15, the connection weights are adjusted using a backpropagation algorithm based on the obtained errors. Here, the error update values are propagated layer by layer to reach the first layer through backpropagation, and all weights are updated together at the end of the backpropagation process. Depending on the required model precision and time consumption, the learning rate used in the backpropagation algorithm can be freely adjusted.
[0081] In step S16, it is checked whether the observation data used for training the model has been exhausted. For example, it checks if the number of traversed observation data is greater than or equal to N.
[0082] If not exhausted, the process returns from step S16 to step S12 to continue extracting the next training sample.
[0083] If exhausted, in step S17, the total loss function is calculated for all training samples (i.e., all observation data), and it is determined whether the output result of the loss function satisfies the first predetermined condition. For example, it checks whether the output result of the loss function is less than the first limit value.
[0084] If the output result of the loss function is greater than the first limit value, it indicates that the model's performance has not met the standard yet and needs to continue training. Therefore, it jumps back to step S12 from step S17 to start a new iteration loop.
[0085] If the output result of the loss function is less than the first limit value, it indicates that the model has already achieved satisfactory performance in the expected results. In this case, in step S18, the current weights of the first neural network model are output, and based on this, the linear approximation part of the parameters to be determined of the synchronous motor is determined. It is worth noting that since nonlinear factors of the synchronous motor are not considered at this stage, the parameters determined here are represented in constant form. For the first parameters that should be affected by nonlinear factors (such as d-axis and q-axis inductances), the results obtained at this stage can be seen as the average values of these parameters across all observation data, thus not being absolutely accurate. They will need to be corrected through subsequent nonlinear compensation processes. As for the second parameters that should be constant (such as stator resistance and permanent magnet flux linkage), the determined results at this stage also include a part of the nonlinear contribution from the first parameters.
[0086]
[0087] In step S2, the compensation module in the form of the third neural network model is added to the trained first neural network model, forming the second neural network model.
[0088] In step S31, a set of data consisting of d-axis current (i.sub.sd), q-axis current (i.sub.sq), and electrical angular velocity (.sub.1) is extracted from the acquired observation data and input into the second neural network model through forward propagation. For example, the d-axis current (i.sub.sd), q-axis current (i.sub.sq), and electrical angular velocity (.sub.1) are input into the trained first neural network model, and the d-axis current (i.sub.sd) and q-axis current (i.sub.sq) are also input into the compensation module.
[0089] In step S32, the output of the second neural network model is computed. For example, the corresponding voltages (.Math..sub.sd, .Math..sub.sq) are calculated based on the weight relationships between the neurons in each layer.
[0090] In step S33, the error between the output voltage of the second neural network model and the voltage in the observation data is computed.
[0091] In step S34, the weights of the trained first neural network model are adjusted based on this error using the backpropagation algorithm. The weights of the first neural network model still partly describe the motor parameters R, L.sub.d, L.sub.q, .sub.f. However, since the intermediate results L.sub.d0, L.sub.q0 for L.sub.d, L.sub.q have already represented the linear characteristic portions, they are no longer involved in further training. Nevertheless, the values of R and .sub.f mistakenly include a part of the nonlinear contribution from L.sub.d, L.sub.q, so they need to be compensated for. Thus, when adjusting the weights of the trained first neural network model, only R and .sub.f are changed.
[0092] In step S35, the network weights of the third neural network model (compensation module) are adjusted. Here, for example, the overall output error of the second neural network model is used to indirectly influence the output values of the third neural network model, thereby indirectly modifying the internal weights of the third neural network model.
[0093] In step S36, it is checked whether the observation data used for training the model has been exhausted.
[0094] If not exhausted, return from step S36 to step S31 to continue extracting the next training sample.
[0095] If exhausted, then in step S37, the total loss function is computed for all training samples (i.e., all observation data), and it is determined whether the output result of the loss function satisfies the second predetermined condition, i.e., whether it is less than the second limit value.
[0096] If the output result of the loss function is greater than the second limit value, then return from step S37 to step S31 to start a new iteration loop.
[0097] If the output result of the loss function is less than the second limit value, it indicates that the model has achieved satisfactory performance in the expected results. In this case, in step S38, the current weights of the second neural network model are output, and based on this, the final values of R and .sub.f in the parameters to be identified of the synchronous motor are determined. Furthermore, with the aid of the output of the third neural network model, the nonlinear characteristics portions L.sub.d0 and L.sub.q0 of the fitted L.sub.d and L.sub.q are obtained. By combining these with the linear characteristic portions L.sub.d0 and L.sub.q0 determined using the first neural network model, the functional relationship between L.sub.d, L.sub.q, and the current can be ultimately determined.
[0098]
[0099] As shown in
[0100] Specifically, the first identification module 10 is used, for example, to establish and train a first neural network model and utilize the trained model to determine intermediate results of the parameters to be identified of the synchronous motor.
[0101] The modification module 20 is used, for example, to form a second neural network model by adding a compensation module to the trained first neural network model.
[0102] The second identification module 20 is used, for example, to train the second neural network model based on the intermediate results of the parameters to be identified and utilize the trained second neural network model to determine the final results of the parameters to be identified.
[0103]
[0104] In order to comprehensively reflect the nonlinear characteristics of specific parameters (e.g., d-axis inductance and q-axis inductance) of the synchronous motor, it is necessary to cover the entire operating range of the synchronous motor with operation points as comprehensively as possible. Therefore, it can be seen from
[0105]
[0106] In an ideal situation, the d-axis magnetic flux should vary linearly with the corresponding current, forming a plane. However, as shown in
[0107]
[0108] The first neural network model 60 comprises a two-layer neuron structure and is fully connected in each layer. The input and output relationships are established using the following static voltage state equations in the d-q coordinate system by synchronous motors:
where U.sub.sd is the d-axis voltage of the synchronous motor, R is the stator resistance of the synchronous motor, .sub.1 is the electrical angular velocity of the synchronous motor, L.sub.q is the q-axis inductance of the synchronous motor, i.sub.sq is the q-axis current of the synchronous motor, |.sub.f| is the amplitude of the permanent magnet flux linkage of the synchronous motor, is the zero angle of the synchronous motor, U.sub.sq is the q-axis voltage, i.sub.sd is the d-axis current of the synchronous motor, and L.sub.d is the d-axis inductance of the synchronous motor.
[0109] To determine the linear characteristic portions of the parameters to be identified of the synchronous motor using the first neural network model 60, the q-axis current i.sub.sq, d-axis current i.sub.sd, and electrical angular velocity .sub.1 of the synchronous motor are used as inputs to the first neural network model 60, while the q-axis voltage U.sub.sq and d-axis voltage U.sub.sd are used as outputs of the first neural network model 60. Based on the mapping relationship defined by the static voltage state equations, the weights between the first input node and the two output nodes are Rand .sub.1, between the second input node and the two output nodes are .sub.1 and R, and between the third input node and the two output nodes are |.sub.f|sin and |.sub.f|cos . In the case where the zero angle of the motor is correctly calibrated, is 0. Here, R, L.sub.d, L.sub.q, and .sub.f are adjustable weights of the first neural network model 60, and their values can be iteratively updated in the backpropagation process.
[0110] For each given input, the first neural network model 60 outputs estimated values of q-axis voltage and d-axis voltage. A loss function may be constructed based on the difference between the measured voltage and the estimated values:
where N is the number of known observation data used, U.sub.sd is the d-axis voltage of the synchronous motor in the known observation data, .Math..sub.sd is the output d-axis voltage of the first neural network model 60, U.sub.sq is the q-axis voltage of the synchronous motor in the known observation data, and .Math..sub.sq is the output q-axis voltage of the first neural network model 60.
[0111] The weights of the network are modified at least partially using the backpropagation algorithm until the value of the loss function J satisfies the first predetermined condition. At this point, the intermediate results of the parameters to be identified R, L.sub.d, L.sub.q, and .sub.f can be determined based on the internal weights of the first neural network model 60.
[0112]
[0113] The compensation module 70 in the form of the third neural network model exemplarily comprises an input layer, an output layer, and at least one hidden layer. Depending on the desired precision and the amount of observation data, the number of hidden layers and the number of neurons contained can be adjusted. To fit the nonlinear characteristics of the q-axis inductance L.sub.q and the d-axis inductance L.sub.d, it is assumed that L.sub.q and L.sub.d are each composed of two parts, expressed as follows:
where L.sub.q and L.sub.d are respectively the q-axis inductance and the d-axis inductance, L.sub.d0 and L.sub.q0 represent the linear characteristic portion of the q-axis inductance and the d-axis inductance, and L.sub.d0 and L.sub.q0 represent the nonlinear characteristic portion of the q-axis inductance and the d-axis inductance. For example, L.sub.d0 and L.sub.q0 have been determined in the form of intermediate results using the first neural network model. Therefore, the purpose is to determine L.sub.d0 and L.sub.q0 using the nonlinear compensation module 70. As the magnetic circuit saturation of the synchronous motor is highly related to the d-axis and q-axis currents i.sub.sd and i.sub.sq, based on this understanding, a direct relationship between i.sub.sd, i.sub.sq, and L.sub.d0, L.sub.q0 is established in the compensation module. In other words, the q-axis current and d-axis current i.sub.sd, i.sub.sq are used as inputs to the third neural network model, and the nonlinear characteristic portions of the parameters to be identified L.sub.d0, L.sub.q0 are used as outputs of the third neural network model.
[0114]
[0115] Here, the compensation module 70 shown in
[0116] Overall, the inputs of the second neural network model 80 are still the q-axis current i.sub.sq, d-axis current i.sub.sd, and the synchronous motor's electrical angular velocity .sub.1. The outputs of the second neural network model 80 are still the q-axis voltage U.sub.sq and d-axis voltage U.sub.sd. However, due to the consideration of nonlinear factors, the input-output relationship of the second neural network model 80 is established based on the following static voltage state equations:
where U.sub.sd is the d-axis voltage of the synchronous motor, R is the stator resistance of the synchronous motor, .sub.1 is the electrical angular velocity of the synchronous motor, L.sub.q0 is the linear characteristic portion of the q-axis inductance of the synchronous motor, L.sub.q0 is the nonlinear characteristic portion of the q-axis inductance of the synchronous motor, i.sub.sq is the q-axis current of the synchronous motor, |.sub.f| is the amplitude of the permanent magnet flux linkage of the synchronous motor, is the zero angle of the synchronous motor, U.sub.sq is the q-axis voltage, i.sub.sd is the d-axis current, L.sub.d0 is the linear characteristic portion of the d-axis inductance, and L.sub.d0 is the nonlinear characteristic portion of the d-axis inductance.
[0117] During the training of the second neural network model 80, concerning the first neural network model 60, the adjustment is made starting from the weight values obtained at the end of training of the first neural network model 60. To facilitate compensation through the nonlinear characteristic portion, it is assumed that the linear characteristic portions L.sub.d0 and L.sub.q0 of the d-and q-axis inductances are fixed, so that the weights represented by these two characterizations do not participate in the second iteration training. Therefore, only the values of R and .sub.f are changed in the adjustment process.
[0118] Regarding the compensation module 70 (i.e., the third neural network model), the predetermined values of the internal weights of this network are changed to alter the output of L.sub.d0 and L.sub.q0.
[0119] This iterative process of updating weights continues until the following loss function converges:
where N is the number of known observation data used, U.sub.sd is the d-axis voltage of the synchronous motor in the known observation data, .Math..sub.sd is the output d-axis voltage from the second neural network model, U.sub.sq is the q-axis voltage of the synchronous motor in the known observation data, and .Math..sub.sq is the output q-axis voltage from the second neural network model.
[0120] When the training of the second neural network model 80 is completed, the final results for the parameters to be identified R and .sub.f can be determined based on the internal weights of the corresponding first neural network model 60. Additionally, at the completion of training, with the assistance of the compensation module 70, the nonlinear characteristic portions L.sub.d0 and L.sub.q0 of the fitted L.sub.d and L.sub.q, combined with the linear characteristic portions L.sub.d0 and L.sub.q0, can be used to determine the functional relationship between L.sub.d, L.sub.q, and the d-axis and q-axis currents.
[0121]
[0122] From
[0123] Although specific embodiments of the present invention have been described in detail here, they are provided solely for explanatory purposes and should not be construed as limiting the scope of the invention. Various substitutions, alterations, and modifications can be conceived without departing from the spirit and scope of the present invention.