A method for estimating torque of an alternating current motor and adaptive compensation of d-axis current based on BP neural network
Patent Information
- Application Number
- CN202611245633.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-09-29
AI Technical Summary
[0008]然而在虚拟电压注入以及极低速的工况下,想要计算出准确的转矩是极为困难的,该极端工况会导致观测坐标系与真实坐标系有一个随转矩变化的角度误差,导致真实的dq电流和观测的dq电流存在误差,无法通过传统的转矩计算公式计算出真实的转矩大小,因此想要设计自适应d轴电流补偿方案就显得极具挑战性
[0012]本发明还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使处理器执行上述的方法。
Smart Images

Figure CN122844701A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of AC motor drive technology, and more specifically, relates to an AC motor torque estimation and d-axis current adaptive compensation method based on BP neural network. Background Technology
[0002] Sensorless drive control of AC motors has become a major focus in the global electric drive field due to its low cost, high reliability, and good speed regulation performance. Current control strategies can be divided into two main categories: 1. Signal injection-based control strategies; 2. Motor model-based control strategies.
[0003] Control strategies based on signal injection rely on the anisotropy of the motor's structure. Currently, the main anisotropy methods can be broadly categorized as: high-frequency signal injection, low-frequency signal injection, zero-sequence signal injection, and pulse-width modulation (PWM) signal methods. However, due to advancements in industrial manufacturing, general-purpose AC motors exhibit relatively weak anisotropy, making it difficult to extract speed information using simple and efficient algorithms. Therefore, in recent years, research efforts on signal injection-based strategies in sensorless AC motor drives have somewhat diminished.
[0004] Control strategies based on motor models, which construct speed observers based on the mathematical models of AC motors, can be broadly categorized as follows: 1) All-order flux linkage observer (AFO); 2) Sliding mode observer (SMO); 3) Speed observer based on extended Kalman filter (EKF); and 4) Speed observer based on model reference adaptive system (MRAS). However, a major problem with motor model-based control strategies is that the observers cannot operate stably across the entire speed range, especially exhibiting system divergence at zero stator current frequency.
[0005] To address this issue, scholars both domestically and internationally have conducted extensive research. The core challenge of sensorless control based on AC motor mathematical models lies in the lack of observability and parameter sensitivity around low speeds and zero stator current frequencies. Regarding the instability of the four main types of observers in the low-speed domain (especially at zero stator frequency), research progress has primarily focused on three directions: stability improvement, deviation compensation, and novel hybrid architectures. Among these, several prominent methods include enhanced model observers with injected virtual signals, self-learning observers driven by intelligent algorithms, and hybrid / switching observer strategies. Furthermore, future research trends will no longer focus on finding a single perfect model, but rather on completely overcoming the limitations near zero frequency through multi-information fusion (e.g., model + signal injection) and multi-algorithm switching (e.g., linear + nonlinear hybrid).
[0006] Among these methods, the virtual voltage injection method is not only simple to implement, but also solves three major problems of the sensorless vector control system for AC motors at low speeds: unobservable speed, unstable pole distribution, and weak parameter robustness. It enables stable operation of AC motors in the full speed range of generator motor mode.
[0007] However, experiments revealed that while the virtual voltage injection method ensures low-speed stability of the sensorless AC motor system, it also introduces three major problems: speed estimation error, coordinate axis angle estimation error, and the increased d-axis current required for heavy-load control. Therefore, under this special condition of virtual voltage injection, to adapt to varying load conditions, the d-axis current must be set to the d-axis current corresponding to 100% of the motor / generator load. However, such a large d-axis current is unnecessary under no-load or light-load conditions; the excess power will be converted into heat loss, undoubtedly reducing efficiency and increasing no-load and light-load losses. Therefore, a method for adaptively compensating for the d-axis current based on the current torque magnitude needs to be designed.
[0008] However, it is extremely difficult to calculate the accurate torque under virtual voltage injection and extremely low speed conditions. This extreme condition will cause an angular error between the observed coordinate system and the real coordinate system that varies with the torque, resulting in an error between the actual dq current and the observed dq current. The actual torque cannot be calculated using the traditional torque calculation formula, so designing an adaptive d-axis current compensation scheme is extremely challenging. Summary of the Invention
[0009] In view of the above-mentioned defects or improvement needs of the existing technology, the present invention provides an AC motor torque estimation and d-axis current adaptive compensation method based on BP neural network. The purpose is to solve the technical problem of accurately calculating the torque magnitude and adaptively compensating the d-axis current according to the torque magnitude under virtual voltage injection and extremely low speed conditions.
[0010] To achieve the above objectives, this invention provides a method for AC motor torque estimation and d-axis current adaptive compensation based on a BP neural network, comprising the following steps: When the stator current frequency is greater than 0Hz, the current angle and active power angle in the dq coordinate system are used as inputs to the BP neural network. When the stator current frequency is 0Hz, the voltage angle, current angle, power angle, voltage angle, current angle, and power angle in the αβ coordinate system are used as inputs to the BP neural network, and the torque estimate is used as the output of the BP neural network to establish the BP neural network. A set of data is collected during motor operation based on the input of the BP neural network; the sample set is divided into a training set and a test set, each of which includes the input and output of the BP neural network model. The BP neural network is trained using the training set, and the performance of the trained BP neural network is evaluated using the test set. Update the weights and biases of the BP neural network based on the output error of the trained BP neural network, repeat the previous step until the performance of the trained BP neural network reaches its optimal level, and use the BP neural network with the optimal performance as the motor torque estimation model. The actual torque value of the motor is obtained by using a motor torque estimation model during motor operation; The d-axis current is compensated within different ranges of the actual torque value.
[0011] The present invention also provides an electronic device, comprising: a computer-readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is used to read executable instructions stored in the computer-readable storage medium and execute the above-described method.
[0012] The present invention also provides a computer-readable storage medium storing computer instructions for causing a processor to perform the above-described method.
[0013] The present invention also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the above-described method.
[0014] In summary, compared with existing technologies, the AC motor torque estimation and d-axis current adaptive compensation method based on BP neural network provided by this invention employs a torque estimation model based on BP neural network. This model uses the current angle and active power in the dq coordinate system as inputs when the stator current frequency is greater than 0 Hz, and adjusts the model when the stator current frequency is less than 0 Hz. The model takes the voltage angle, current angle, and power angle in the dq coordinate system, as well as the voltage angle, current angle, and power angle in the αβ coordinate system, as inputs and the torque estimate as the output. It utilizes systematically collected data covering multiple speeds, loads, and d-axis current conditions to train and optimize the network, thereby obtaining a high-precision motor torque estimation model. This effectively solves the technical problem of traditional torque calculation formulas failing and inaccurate torque acquisition due to angular errors between the observed and actual coordinate systems caused by torque variations under virtual voltage injection and extremely low-speed conditions. Furthermore, by performing piecewise adaptive compensation of the d-axis current within different ranges of the actual torque value, it addresses the problem in existing technologies where the d-axis current must be fixed to the rated current due to the inability to know the current torque magnitude, leading to excessive power loss and low system efficiency under no-load and light-load conditions. Simultaneously, the Adam optimizer and root mean square error loss function are combined to improve the convergence speed and stability of the network training, enabling the trained model to run on embedded platforms at 4GHz. The kHz switching frequency enables real-time online computation, which significantly reduces no-load and light-load losses and improves the overall operating efficiency of the system while ensuring stable operation across the entire speed range (including zero stator current frequency) and the full load range. It also has good engineering applicability and portability. Attached Figure Description
[0015] Figure 1 This is a schematic diagram showing the angular error relationship between the observed coordinate system and the actual coordinate system under virtual voltage injection; Figure 2 This is a schematic diagram of a BP neural network; Figure 3 Sensitivity analysis of variables above 0Hz; Figure 4 It is a sensitivity analysis of the 0Hz variable; Figure 5 This is a legend of network input variables; Figure 6 This is a data acquisition flowchart; Figure 7 This is the result of offline training at 0Hz; Figure 8 This is the result of offline training at 0.3Hz; Figure 9 It is a 2.2kW motor platform; Figure 10 It's a frequency converter; Figure 11 It is an instability caused by a sudden full load without virtual voltage injection; Figure 12 It is stable under sudden full load when there is virtual voltage injection; Figure 13 These are the results of 0.1Hz torque estimation and d-axis current compensation; Figure 14 These are the results of 0Hz torque estimation and d-axis current compensation; Figure 15 This is the vector control block diagram of the method. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0017] Under virtual voltage injection at extremely low speeds without a speed sensor, the d-axis current needs to increase with increasing torque. However, in actual operation, since the magnitude of the applied torque is unknown, the d-axis current must be set to the value required for a sudden full load, i.e., the rated current. This results in significant no-load losses for the motor under light load conditions, reducing efficiency. Under virtual voltage injection at extremely low speeds without a position sensor, the estimated dq-axis has an angular error that increases with increasing torque compared to the actual dq-axis, leading to inaccurate calculation of the actual dq-axis current. Traditional torque estimation methods are unusable. A novel torque estimation method is needed to calculate the torque magnitude and adaptively compensate the d-axis current based on the torque magnitude.
[0018] Figure 1 This diagram illustrates the angular error relationship between the observed and actual coordinate systems under virtual voltage injection, representing an electric load and a generator load, respectively. Due to the influence of virtual voltage injection, there is an angular error between the observed and actual coordinate systems that increases with decreasing speed and increasing torque. Under an electric load, the observed coordinate system leads the actual coordinate system, while under a generator load, the observed coordinate system lags behind the actual coordinate system. As shown in the diagram, the actual dq-axis current and the applied observed dq current command have the following projection relationship:
[0019] Due to the existence of angle errors caused by virtual voltage injection, traditional torque estimation algorithms fail, and new torque estimation algorithms need to be designed.
[0020]
[0021] This invention provides a method for AC motor torque estimation and d-axis current adaptive compensation based on a BP neural network, comprising the following steps: When the stator current frequency is greater than 0Hz, the current angle and active power angle in the dq coordinate system are used as inputs to the BP neural network. When the stator current frequency is 0Hz, the voltage angle, current angle, power angle, voltage angle, current angle, and power angle in the αβ coordinate system are used as inputs to the BP neural network, and the torque estimate is used as the output of the BP neural network to establish the BP neural network. A set of data is collected during motor operation based on the input of the BP neural network; the sample set is divided into a training set and a test set, each of which includes the input and output of the BP neural network model. The BP neural network is trained using the training set, and the performance of the trained BP neural network is evaluated using the test set. Update the weights and biases of the BP neural network based on the output error of the trained BP neural network, repeat the previous step until the performance of the trained BP neural network reaches its optimal level, and use the BP neural network with the optimal performance as the motor torque estimation model. The actual torque value of the motor is obtained by using a motor torque estimation model during motor operation; The d-axis current is compensated within different ranges of the actual torque value.
[0022] Furthermore, the process involves collecting several data points as a sample set during motor operation based on the input of the BP neural network: Step 1: Set the motor operating speed reference to a constant value and start the motor under no-load conditions, then proceed to Step 2; Based on the initial speed reference setting, gradually decrease the preset value with a preset step size until the final speed reference setting is 0p.u. Step 2: Apply a constant load torque under the speed reference set above, and proceed to Step 3; The load torque applied under each speed reference starts from 0 p.u. and gradually increases with a preset step size; The load torque is first increased in the form of electricity generation. When the load torque increases to -1.0 pu, the next applied load torque is increased again from no load in the form of electric motor, until the load torque increases to 1.0 pu; Step 3: Under the above-set speed reference and load torque conditions, increase the d-axis current reference sequentially; after completing the input data acquisition for all sizes of d-axis current references under the current speed-torque combination, execute Step 4; wherein, the initial value of the d-axis current reference under each condition is the minimum value that can ensure stable operation of the motor under the set speed reference and load torque, and then gradually increase the d-axis current reference value with a preset step size and the time interval of capturing the complete fundamental period of the AC variable in the αβ coordinate system as the increment unit until the rated current threshold is reached; Step 4: If the input data corresponding to the different d-axis current references under all load torque magnitudes at the current speed reference has been collected, proceed to Step 5; otherwise, return to Step 2. Step 5: If all input data under all speed reference values have been collected, proceed to Step 6; otherwise, return to Step 1. Step 6: Integrate the collected input data and affix sample labels, where the sample labels represent the actual load torque applied at this time.
[0023] Furthermore, the BP neural network is trained using the training set, with the loss function set as the root mean square error, and training is performed based on the principle of minimizing the loss function.
[0024] Where n represents the number of samples. This represents the estimated torque. This indicates the torque applied when this set of data is obtained during data acquisition.
[0025] Furthermore, the training process employs the Adam optimizer, whose mathematical expression is:
[0026] Where t represents the current iteration number. Represents the gradient. w For BP neural network parameters, The loss function represents the current iteration number. The gradient of this parameter, This represents the loss function for the previous iteration, i.e., the error of the network under the parameters in the previous iteration. and These are the estimates of the first and second moments of the gradient, respectively. This represents the first-order moment estimate after bias correction. This represents the second-order moment estimate after bias correction. This represents the updated parameters of the BP neural network at the current iteration number. The parameters of the BP neural network represent the previous iteration number. and The attenuation rate is estimated by moments. The initial learning rate, It is a constant.
[0027] Furthermore, compensation for the d-axis current is performed within different ranges of the actual torque value, including:
[0028] in This is the rated current.
[0029] This embodiment proposes a method for AC motor torque estimation and d-axis current adaptive compensation based on a BP neural network, which consists of five steps: strategy formulation, network input screening and data acquisition, network construction and training, d-axis current compensation strategy design, and online verification.
[0030] 1) Strategy Formulation First, the observed variables are analyzed under extremely low-speed conditions. Electric / generator loads are applied in 10% increments at the corresponding d-axis current, and the changing trends of the observed variables are observed. The observed variables include, but are not limited to, the dq-axis current. and dq axis voltage and αβ axis current and αβ axis voltage and At extremely low speeds, the variation trend of variables related to the q-axis current is very small, which is unfavorable for torque estimation and differentiation. Therefore, other observed variables are added, including but not limited to active power in the dq coordinate system. Reactive power in the dq coordinate system Voltage angle in dq coordinate system Current angle in dq coordinate system Power angle in dq coordinate system Voltage angle in αβ coordinate system Current angle in αβ coordinate system and the power angle in the αβ coordinate system The definitions of angle, active power, and reactive power are as follows: (1.1) (1.2) (1.3) (1.4) (1.5) (1.6) (1.7) (1.8) Under extremely low-speed operating conditions, the changing trends of all observed variables are very small, and neural networks can precisely solve this problem. Through multiple iterations and training, they can identify extremely minute changes. Considering the use of computing resources and the difficulty of online implementation, this embodiment chooses a BP neural network to solve this problem. A BP neural network is a simple feedforward neural network. This model abstracts the neural network of the human brain, constructs artificial neurons, and establishes connections between artificial neurons according to a certain topological structure to simulate a biological neural network. In the feedforward network, each neuron is divided into different groups according to the order in which they receive information; each group can be considered a neural layer. Neurons in each layer receive the output of neurons in the previous layer and output to neurons in the next layer. Information in the entire network propagates in one direction; there is no reverse information propagation. A feedforward neural network can be viewed as a function, achieving a complex mapping from the input space to the output space through multiple composites of simple nonlinear functions. This network structure is simple and easy to implement, making it very suitable for the operating conditions of this invention, which require complex operations to be performed in a DSP at a switching frequency of 4K. A schematic diagram of a BP neural network is shown below. Figure 2 As shown.
[0031] 2) Online input filtering and data collection The input to the neural network follows the principles of optimality and simplicity. Therefore, it is necessary to screen the input variables, selecting those that best reflect torque changes as network inputs to simplify calculations and save computational resources. Thus, sensitivity analysis was performed on all designed input variables, and the results are as follows: Figure 3 and Figure 4 As shown.
[0032] At 0Hz, because the voltage and current variables become direct currents, severe heat generation can cause the stator resistance to lose synchronism. Even under the same torque, the active power increases linearly with operating time, failing to effectively reflect the torque value. Therefore, at 0Hz, six angular variables from the dq and αβ coordinate systems are used as network inputs, discarding the active power. The final network input variables are as follows: Figure 5 As shown.
[0033] After determining the network input variables, it is necessary to collect these network variables. The network variable collection steps used in this solution are as follows: Figure 6As shown. When collecting training data, in addition to collecting data under different speeds and load torque conditions, it is also necessary to collect data under different d-axis current references to ensure the comprehensiveness of network learning. The relevant parameter settings are as follows: speed reference: 0~0.006pu, step size 0.002pu; load torque reference: 0~±1.0pu, step size 0.1pu; d-axis current reference: 0~1.0pu, step size 0.04pu. The sampling frequency of the training data is 2 kHz. The detailed data acquisition method designed in this embodiment is as follows: 1) Step 1: Set the motor operating speed reference to a constant value and start the motor under no-load conditions, then proceed to Step 2. The initial speed reference is set to 0.006 pu. Afterward, each time you return to Step 1, the set speed reference is decreased by 0.002 pu until the final speed reference is set to 0 p.u.
[0034] 2) Second step: Under the aforementioned speed reference, apply a constant load torque of a certain magnitude, and then proceed to the third step. The applied load torque at each speed reference starts from 0 p.u., and each time the process returns to the second step, the applied load torque increases by 0.1 p.u. Initially, the load torque increases in the form of electric generation. When the load torque increases to -1.0 p.u, the next applied load torque increases again from no-load to electric generation by 0.1 p.u, until the load torque increases to 1.0 p.u, thus covering all data from both electric and generator operating conditions.
[0035] 3) Third step: Under the above-set speed reference and load torque conditions, sequentially increase the d-axis current reference. After completing the input data acquisition for all d-axis current reference values under the current speed-torque combination, execute step 4. The initial d-axis current reference value for each condition is the minimum value that ensures stable motor operation under the set speed reference and load torque. Subsequently, the d-axis current reference value is gradually increased in steps of 0.02 pu, with the time interval of capturing the complete fundamental period of the AC variable in the αβ coordinate system as the increment unit, until the rated current threshold is reached.
[0036] 4) Fourth step: If the input variable data corresponding to different d-axis current references under all load torque magnitudes at the current speed reference are collected, proceed to the fifth step. Otherwise, return to the second step.
[0037] 5) Step 5: If all input variable data under all rotational speed reference values have been collected, proceed to Step 6. Otherwise, return to Step 1.
[0038] 6) Step 6: End data acquisition, perform data processing, integrate the acquired input data and affix sample labels (the actual load torque applied at this time).
[0039] 3) Network setup and network training The network training process requires dividing the dataset into training and validation sets. In this embodiment, 80% of the collected samples are randomly selected as the training set, and the remaining 20% is used as the validation set. The loss function for network training is set to root mean square error, and training is performed based on the principle of minimizing the loss function.
[0040] (1.9) In the formula, n represents the number of samples. This represents the estimated torque. This represents the torque applied when acquiring the data set during data collection. To optimize the training process, the Adam optimizer is chosen. It combines momentum and adaptive learning rate, dynamically adjusting the learning rate of each parameter to balance the first moment (mean) and second moment (variance) of the gradient, thereby improving convergence speed and stability. The mathematical expression of the optimizer is shown below: (1.10) In the formula, tt represents the current iteration number. Represents the gradient. w For BP neural network parameters, The loss function represents the current iteration number. The gradient of this parameter, This represents the loss function for the previous iteration, i.e., the error of the network under the parameters in the previous iteration. and These are the estimates of the first and second moments of the gradient, respectively. This represents the first-order moment estimate after bias correction. This represents the second-order moment estimate after bias correction. This represents the updated parameters of the BP neural network at the current iteration number. The parameters of the BP neural network represent the previous iteration number. and The attenuation rate is estimated by moments, typically taken as 0.9 or 0.999. The initial learning rate is set to 0.0001 in this embodiment. To prevent the denominator from being zero, it is usually taken as a numerical stability constant. The final total number of iterations was set to 3000. The training process of the neural network was implemented on the Python-based PyCharm platform using the Keras deep learning framework.
[0041] After comprehensively evaluating the data characteristics of different torques at the same speed and current, and the same torque at different currents at the same speed, a labeling method was designed. Above 0Hz, estimation is performed based on the actual applied torque value, i.e., -1 to 1 p.u., with a step size of 0.1 p.u. At 0Hz, a segmented estimation method is adopted: 70%~100% of the electric torque is calibrated as 0, 20%~60% as 1, 10%~30% as 2, 40%~80% as 3, and 90%~100% as 4. The offline training effect is shown in the figure below. Figure 7 , Figure 8 As shown.
[0042] In the graph, the blue line represents the labeled value, i.e., the actual torque value, and the green line represents the estimated torque value. The closer the green line is to the blue line, the more accurate the torque estimation. After offline estimation, the network weights and biases are obtained and used in online validation.
[0043] 4) d-axis current compensation strategy Offline training results exhibit significant fluctuations above 0Hz. If the estimated torque at the next time step falls within the previous range, it will lead to an underestimation of the torque and system instability. Although a low-pass filter can be used to reduce the fluctuation range of the final torque estimation result, an excessively small filter coefficient will affect the final dynamic response performance. Therefore, a segmented current compensation strategy is designed. In this embodiment, the corresponding rated current... It is rated 5A.
[0044] (1.11) Although this compensation strategy is not precise, it can ensure system stability and avoid control system instability. There will also be current oscillations and jitters at the boundary interval. Therefore, a hysteresis circuit was designed during online verification, and the boundary interval needs to be skipped as much as possible to ensure system stability.
[0045] 5) Online verification The experimental platform consists of two identical 2.2kW AC motors. One is used as the controlled motor for algorithm verification, while the other serves as the driving motor. Both motors are controlled by INVT GD350 2.2kW series frequency converters, using the DSP28075 control chip. The experimental platform is comprised of... Figure 9 10 displays Figure 9 The motor on the left is the controlled motor, and the motor on the right is the tractor motor.
[0046] First, the effectiveness of the virtual voltage injection needs to be verified. First, start the controlled motor and set its speed to 0.3Hz; then, suddenly increase the generator load by 100%. Figure 11The results without virtual voltage injection are shown; the motor becomes unstable and stops immediately. Figure 12 The results after adding a virtual voltage injection are shown. The system remains stable.
[0047] To verify the effectiveness of the above method, the following experiments were conducted. First, the motor was set to the target speed (range 0 to 0.3 Hz) and operated under no-load conditions. Then, a generating load was applied. To span the three defined current compensation intervals, the load was gradually increased in the order of -30%, -60%, and -100%. Therefore, the d-axis current should vary in steps of 3 A, 4 A, and 5 A, while the three-phase stator current increased accordingly. Afterward, the motor was unloaded back to no-load conditions, and then an electric load was applied. Again, the load was gradually increased in steps of 30%, 60%, 90%, and 100% to span the three compensation intervals. The experimental results are as follows: Figure 13 As shown.
[0048] Estimating torque at 0.1 Hz is more technically challenging than at higher frequencies; therefore, only the estimation and current compensation results at 0.1 Hz are presented here. Similarly, the effectiveness of the estimation and the current compensation strategy are verified at 0 Hz, as shown in the experimental results below. Figure 14 As shown in the figure, online validation results demonstrate the effectiveness of the method.
[0049] Figure 15 This is a vector control block diagram of an AC motor torque estimation and d-axis current adaptive compensation method based on a BP neural network.
[0050] Example 2 The present invention also relates to an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described above.
[0051] The electronic device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The memory can be used to store computer programs and / or modules. The processor performs various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory.
[0052] Example 3 The present invention also relates to a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.
[0053] Specifically, the memory may include high-speed random access memory, as well as non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart media cards (SMC), secure digital (SD) cards, flash cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.
[0054] Example 4 This invention provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of the method described in the above embodiments of this invention.
[0055] The technical features of the embodiments described above can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. It should be noted that the terms "in one embodiment," "for example," and "again" in this invention are intended to illustrate the invention and are not intended to limit the invention.
[0056] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. A method for torque estimation and adaptive d-axis current compensation of an AC motor based on a BP neural network, characterized in that, Includes the following steps: When the stator current frequency is greater than 0Hz, the current angle and active power angle in the dq coordinate system are used as inputs to the BP neural network. When the stator current frequency is 0Hz, the voltage angle, current angle, power angle, voltage angle, current angle, and power angle in the αβ coordinate system are used as inputs to the BP neural network, and the torque estimate is used as the output of the BP neural network to establish the BP neural network. A set of data is collected during the operation of the motor according to the input of the BP neural network. The sample set is divided into a training set and a test set, and the training set and the test set each include the input and output of the BP neural network model, respectively. The BP neural network is trained using the training set, and the performance of the trained BP neural network is evaluated using the test set. Update the weights and biases of the BP neural network based on the output error of the trained BP neural network, repeat the previous step until the performance of the trained BP neural network reaches its optimal level, and use the BP neural network with the optimal performance as the motor torque estimation model. The actual torque value of the motor is obtained by using a motor torque estimation model during motor operation; The d-axis current is compensated within different ranges of the actual torque value.
2. The AC motor torque estimation and d-axis current adaptive compensation method based on BP neural network as described in claim 1, characterized in that, The process involves collecting several data points as a sample set during motor operation, based on the input of a BP neural network. Step 1: Set the motor operating speed reference to a constant value and start the motor under no-load conditions, then proceed to Step 2; Based on the initial speed reference setting, gradually decrease the preset value with a preset step size until the final speed reference setting is 0p.u. Step 2: Apply a constant load torque under the speed reference set above, and proceed to Step 3; The load torque applied under each speed reference starts from 0 p.u. and gradually increases with a preset step size; The load torque is first increased in the form of electricity generation. When the load torque increases to -1.0 pu, the next applied load torque is increased again from no load in the form of electric motor, until the load torque increases to 1.0 pu; Step 3: Under the above-set speed reference and load torque conditions, increase the d-axis current reference sequentially; after completing the input data acquisition for all sizes of d-axis current references under the current speed-torque combination, execute Step 4; wherein, the initial value of the d-axis current reference under each condition is the minimum value that can ensure stable operation of the motor under the set speed reference and load torque, and then gradually increase the d-axis current reference value with a preset step size and the time interval of capturing the complete fundamental period of the AC variable in the αβ coordinate system as the increment unit until the rated current threshold is reached; Step 4: If the input data corresponding to the different d-axis current references under all load torque magnitudes at the current speed reference has been collected, proceed to Step 5; otherwise, return to Step 2. Step 5: If all input data under all speed reference values have been collected, proceed to Step 6; otherwise, return to Step 1. Step 6: Integrate the collected input data and affix sample labels, where the sample labels represent the actual load torque applied at this time.
3. The AC motor torque estimation and d-axis current adaptive compensation method based on BP neural network as described in claim 1, characterized in that, The backpropagation neural network is trained using a training set, with the loss function set as the root mean square error, and training is performed based on the principle of minimizing the loss function. Where n represents the number of samples. This represents the estimated torque. This indicates the torque applied when this set of data is obtained during data acquisition.
4. The AC motor torque estimation and d-axis current adaptive compensation method based on BP neural network as described in claim 3, characterized in that, The training process uses the Adam optimizer, whose mathematical expression is: Where t represents the current iteration number. Represents the gradient. w For BP neural network parameters, The loss function represents the current iteration number. The gradient of this parameter, This represents the loss function for the previous iteration, i.e., the error of the network under the parameters in the previous iteration. and These are the estimates of the first and second moments of the gradient, respectively. This represents the first-order moment estimate after bias correction. This represents the second-order moment estimate after bias correction. This represents the updated parameters of the BP neural network at the current iteration number. The parameters of the BP neural network represent the previous iteration number. and The attenuation rate is estimated by moments. The initial learning rate, It is a constant.
5. The AC motor torque estimation and d-axis current adaptive compensation method based on BP neural network as described in claim 3, characterized in that, Compensation for the d-axis current within different ranges of the actual torque value includes: in This is the rated current.
6. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the AC motor torque estimation and d-axis current adaptive compensation method based on BP neural network as described in any one of claims 1 to 5.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the AC motor torque estimation and d-axis current adaptive compensation method based on BP neural network as described in any one of claims 1 to 5.
8. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the steps of the AC motor torque estimation and d-axis current adaptive compensation method based on a BP neural network as described in any one of claims 1 to 5.