Motor position sensorless control method, device, equipment and medium

By performing harmonic compensation on the motor current signal and combining Kalman filter and LSTM network for rotor position estimation, the accuracy problem in sensorless control of brushless DC motors is solved, and efficient motor control in harsh environments is achieved.

CN121530265BActive Publication Date: 2026-03-31HANGZHOU KANGBEI MOTOR
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-19
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In existing brushless DC motor control, the sine wave control strategy requires sensors to sense the rotor position, resulting in short lifespan and increased cost and complexity. Precise control needs to be achieved without sensors.

Method used

By acquiring motor current signals and performing harmonic compensation, rotor position estimation is performed using a Kalman filter and a long short-term memory network (LSTM). The final predicted value is generated by weighted fusion, thus achieving sensorless control.

Benefits of technology

In the absence of sensors, accurate prediction of harmonic interference, parameter drift and drastic dynamic changes is achieved, improving the accuracy and robustness of motor control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121530265B_ABST
    Figure CN121530265B_ABST
Patent Text Reader

Abstract

The application provides a motor position sensorless control method, device, equipment and medium. The current signal of the motor is collected, the harmonics of the current signal are compensated, and the compensated current signal is generated. The pollution of the inherent spatial harmonic magnetic field in the motor to the current signal can be identified and compensated. The compensated current signal and the speed information of the motor are respectively input into a Kalman filter and a long short-term memory network to correspondingly generate a first rotor position estimation value and a second rotor position estimation value. Finally, the first rotor position estimation value and the second rotor position estimation value are weighted and fused, the advantages of the LSTM network and the Kalman filter are combined, the rotor position can be quickly and accurately predicted under the non-ideal actual working conditions of harmonic interference, parameter drift and severe dynamic change, and the accuracy of motor control is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of motor control technology, and in particular to a control method, device, equipment and medium for a motor without position sensors. Background Technology

[0002] Currently, in the control strategies of brushless DC motors, although the algorithmic complexity of the sine wave control strategy is higher than that of the square wave control strategy, the sine wave control strategy enables the brushless DC motor to achieve smoother torque output performance. In implementing the sine wave control strategy, related schemes typically install sensors coaxially connected to the motor to accurately sense the rotor position. However, these sensors have a short lifespan in harsh environments and also increase the cost and structural complexity of the brushless DC motor.

[0003] Therefore, a solution is needed to control the motor without sensors. Summary of the Invention

[0004] This application provides a sensorless control method, device, equipment, and medium for motors, which enables motor control without sensors.

[0005] The technical solution of this application is implemented as follows:

[0006] In a first aspect, this application provides a sensorless control method for a motor, the method comprising:

[0007] The motor current signal is collected, and the harmonics of the current signal are compensated to generate a compensated current signal.

[0008] The compensated current signal and the motor speed information are input into the Kalman filter to generate the first rotor position estimate.

[0009] The compensated current signal and the motor speed information are input into a pre-trained long short-term memory network to predict and output the second rotor position estimate.

[0010] The first rotor position estimate and the second rotor position estimate are weighted and fused to obtain the final predicted rotor position.

[0011] The motor is controlled based on the final predicted value of the rotor position.

[0012] Secondly, this application provides a sensorless motor control device, the device comprising:

[0013] The harmonic compensation module is used to acquire the motor's current signal, compensate for the harmonics of the current signal, and generate a compensated current signal.

[0014] The Kalman filter fusion module is used to input the compensated current signal and the motor speed information into the Kalman filter to generate the first rotor position estimate.

[0015] The LSTM network prediction module is used to input the compensated current signal and the motor speed information into the pre-trained long short-term memory network and predict and output the second rotor position estimate.

[0016] The dynamic weighted hybrid prediction module is used to weight and fuse the first rotor position estimate and the second rotor position estimate to obtain the final predicted rotor position.

[0017] The control module is used to control the motor based on the final predicted value of the rotor position.

[0018] Thirdly, this application provides a computing device, including a processor and a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the sensorless motor control method of this application.

[0019] Fourthly, this application provides a computer-readable storage medium storing at least one instruction, which is executed by a processor to implement the sensorless motor control method of this application.

[0020] This application provides a sensorless control method, device, equipment, and medium for a motor. By acquiring the motor's current signal and compensating for its harmonics, a compensated current signal is generated. This compensated signal can identify and compensate for the contamination of the current signal by the inherent spatial harmonic magnetic field within the motor, providing a more accurate data foundation for subsequent processing. The compensated current signal and the motor's speed information are input into a Kalman filter and a Long Short-Term Memory (LSTM) network, respectively. The Kalman filter has advantages in smoothing noise and predicting linear trends, outputting a smooth, low-noise first rotor position estimate. The LSTM network excels in handling nonlinear and time-series data, outputting a fast dynamic response second rotor position estimate. Finally, the first and second rotor position estimates are weighted and fused to obtain a final rotor position prediction. This combination of the advantages of the LSTM network and the Kalman filter enables rapid and accurate prediction of rotor position under non-ideal operating conditions, including harmonic interference, parameter drift, and drastic dynamic changes, even without sensors, thus improving the accuracy of motor control. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of the structure of the motor control system provided in an embodiment of this application.

[0022] Figure 2A flowchart of a sensorless control method for a motor provided in an embodiment of this application.

[0023] Figure 3 This is a flowchart illustrating the acquisition of motor current signals provided in an embodiment of this application.

[0024] Figure 4 This is a flowchart illustrating harmonic compensation for a current signal, provided as an embodiment of this application.

[0025] Figure 5 This is a flowchart illustrating rotor position estimation based on a long short-term memory network, provided as an embodiment of this application.

[0026] Figure 6 This is a schematic diagram of the structure of a sensorless motor control device provided in an embodiment of this application.

[0027] Figure 7 A schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation

[0028] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Throughout, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0029] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the word “comprising” as used in the specification of this application means the presence of features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or combinations thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, the term “connected” or “coupled” as used herein can include wireless connections or wireless coupling.

[0030] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0031] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0032] This application provides a schematic diagram of a motor control system. For example... Figure 1 As shown, the system includes an input area 10, a control processing area 11, and an output area 12. The input area 10 includes a temperature sensor 101, a current sensor 102, and a power supply 103. The control processing area 11 includes a controller internal module 111, a server 112, a terminal device 113, and a drive circuit 114. The output area 12 includes an inverter 121 and a motor 122. The controller internal module 111 includes a signal processing module 111a, a sensorless control algorithm module 111b, and a communication interface module 111c.

[0033] In input area 10, power supply 103 supplies power to motor 122, current sensor 102 collects the current signal of motor 122, and temperature sensor 101 monitors the stator temperature of motor 122 in real time. In control processing area 11, internal controller module 111 connects to server 112 or terminal device 113 via communication interface module 111c. Within controller module 111, signal processing module 111a receives analog signals output from temperature sensor 101 and current sensor 102, processes these signals, and inputs them to sensorless control algorithm module 111b. Sensorless control algorithm module 111b executes a control algorithm based on the processed signals to generate a PWM control signal, which is then isolated / amplified by a driver to generate a drive signal. In output area 12, the drive signal acts on inverter 121, enabling precise control of motor 122. Motor 122 responds to voltage or current excitation for further position estimation.

[0034] This application provides a sensorless motor control method, such as... Figure 2 As shown, the method may include the following steps:

[0035] Step 201: Acquire the current signal of the motor and compensate for the harmonics of the current signal to generate a compensated current signal.

[0036] This application embodiment acquires current signals through a data acquisition system, optionally, the current signals are three-phase current signals. The data acquisition system uses high-precision hardware (such as a TI TMS320F28379D digital signal processor and an ADS8588S Σ-Δ ADC) to synchronously acquire the three-phase current signals at a specific frequency. At the same time, the built-in temperature sensor 101 (e.g., a PT100 temperature sensor) monitors the stator temperature in real time, and the stator resistance value is corrected in real time by constructing a compensation model to ensure the accuracy of the parameters calculated by the subsequent model.

[0037] The three-phase current signal and stator resistance obtained by the above method are input into a pre-constructed harmonic model. The harmonic model accurately identifies and compensates for the pollution of the current signal by the inherent spatial harmonic magnetic field inside the motor 122, and the compensated current signal is obtained.

[0038] Step 202: Input the compensated current signal and the motor speed information into the Kalman filter to generate the first rotor position estimate.

[0039] The Kalman filter can fuse the compensated current signal with the speed information of motor 122 to achieve accurate estimation of rotor position, minimizing the error between the estimated rotor position and the actual value, thereby generating a preliminary, model-based first rotor position estimate.

[0040] Step 203: Input the compensated current signal and the motor speed information into the pre-trained long short-term memory network to predict and output the second rotor position estimate.

[0041] In this embodiment, a Long Short-Term Memory (LSTM) network is trained offline on a massive dataset containing various operating conditions, including steady state, load abrupt changes, speed step changes, and even fault simulations. This allows the network to learn a complex nonlinear mapping relationship from historical current signal sequences and speed sequences to future rotor positions. The pre-trained LSTM network can capture long-term dependencies that are difficult to describe using traditional mathematical models when processing time-series data. The current current signal of motor 122 is obtained, processed in steps 201 and 202, and then input into the pre-trained LSTM network along with the speed information of motor 122. This allows for the prediction of a second rotor position estimate based on the data.

[0042] Step 204: The first rotor position estimate and the second rotor position estimate are weighted and fused to obtain the final predicted rotor position.

[0043] The method in this embodiment does not simply switch between a Kalman filter and an LSTM network, but rather performs a weighted fusion. By using specific weighting coefficients, the outputs of the Kalman filter and the LSTM network are weighted and fused, combining the advantages of the LSTM network in handling nonlinear and time-series data with the advantages of the Kalman filter in smoothing noise and predicting linear trends. This method can still quickly and accurately predict rotor position even under drastic changes in motor load and speed, ensuring the system's robustness across the entire operating range.

[0044] Step 205: Control the motor based on the final predicted value of the rotor position.

[0045] In this embodiment, the current signal of motor 122 is acquired, and harmonics of the current signal are compensated to generate a compensated current signal. This compensated current signal can identify and compensate for the pollution of the current signal by the inherent spatial harmonic magnetic field inside motor 122, providing a more accurate data basis for subsequent processing. The compensated current signal and the speed information of motor 122 are input into a Kalman filter and a Long Short-Term Memory (LSTM) network, respectively. The Kalman filter has certain advantages in smoothing noise and predicting linear trends, and can output a smooth, low-noise first rotor position estimate. The LSTM network has advantages in processing nonlinear and time-series data, and can output a second rotor position estimate with fast dynamic response. Finally, the first and second rotor position estimates are weighted and fused to obtain a final rotor position prediction value. This combination of the advantages of LSTM network and Kalman filter enables fast and accurate prediction of rotor position under non-ideal actual operating conditions such as harmonic interference, parameter drift, and drastic dynamic changes without sensors, thereby improving the accuracy of motor control.

[0046] In an optional embodiment, Figure 3 A flowchart for acquiring the current signal of a motor is provided; such as Figure 3 As shown, the steps for acquiring the current signal of motor 122 include:

[0047] Step 301: Use a data acquisition device to synchronously acquire three-phase current signals at a sampling frequency of 20kHz.

[0048] The data acquisition device utilizes a TI TMS320F28379D dual-core DSC, configured with a 3-channel 16-bit Σ-Δ ADC. The ADC supports multiple trigger sources, including timers and ePWM (Enhanced Pulse Width Modulation), allowing for flexible selection of the appropriate trigger source based on application requirements. After determining to use ePWM as the trigger source, the frequency of the trigger signal can be precisely controlled by configuring relevant registers in the ePWM module, such as the TBPRD (Time Base Period Register) and CMPA / CMPB (Count Comparison Register). The selection of 20kHz as the sampling frequency is a commonly used sampling frequency based on a comprehensive consideration of multiple factors, including understanding the ADC module, selecting the trigger source, configuring the ADC, and calculating and verifying the sampling frequency. This sampling frequency meets application requirements, ensuring data accuracy and stability.

[0049] In addition, 20kHz satisfies Shannon's theorem (the highest speed of motor 122 corresponds to an electrical frequency of 1kHz, and the Nyquist frequency is 2kHz), and is also an integer multiple of the PWM switching frequency (20kHz), ensuring that the sampling points uniformly cover the switching cycle.

[0050] In this embodiment, a three-phase current signal is acquired using an LTS25-NP current sensor 102, and a pulse width modulation (PWM) carrier signal is simultaneously acquired to eliminate switching noise. The PWM principle is based on the linear relationship between pulse width and signal amplitude; by changing the pulse width (duty cycle), the amplitude of the output signal is precisely controlled. In applications such as motor control and power management, PWM signals are often used to regulate the speed of motor 122 and control the output voltage of power supply 103. However, PWM signals generate noise during switching, mainly due to the rapid switching of the switching devices.

[0051] In this embodiment, the PWM synchronous capture unit of the TMS320F28379D is used to trigger ADC sampling at the valley of the PWM waveform, avoiding transient interference from MOSFET switching, and synchronously acquiring the PWM carrier signal. Within one cycle of the PWM signal, the waveform of its carrier signal is accurately acquired. This method allows for accurate acquisition of the switching timing, duty cycle, and waveform characteristics of the PWM signal. This information can be used to analyze and eliminate switching noise. When using the LTS25-NP current sensor 102 to acquire three-phase current signals, the PWM carrier signal can be acquired synchronously, thereby achieving accurate monitoring and analysis of switching noise. By analyzing the waveform characteristics of the PWM carrier signal, the cause and propagation path of the switching noise can be determined. Furthermore, corresponding measures can be taken to eliminate or reduce noise, such as adjusting the PWM frequency, optimizing the dead time, and adding filters.

[0052] Step 302: Use the built-in PT100 temperature sensor to monitor the stator temperature in real time and establish a compensation model to correct the stator resistance value in real time.

[0053] The compensation model can be expressed as: R_s = R_0[1 + α(T-25)], α = 0.00393 / ℃. Here, R_s represents the compensated resistance value, which is the real-time value of the stator resistance after considering the temperature effect; R_0 represents the reference value of the stator resistance at 25℃, a known constant; T represents the stator temperature measured in real-time by the built-in PT100 temperature sensor 101, usually in ℃; α represents the temperature coefficient of resistance, used to describe the rate at which the resistance value changes with temperature. In this formula, the value of α is 0.00393 / ℃, meaning that for every 1℃ increase in temperature, the resistance value will increase by a factor of 0.00393.

[0054] The working principle of the formula R_s = R_0[1+α(T-25)] is as follows: First, the stator temperature T is acquired in real time through the built-in PT100 temperature sensor 101; then, based on the temperature coefficient α of the resistance and the reference value R_0 of the stator resistance at 25℃, the resistance value R_s at temperature T is calculated. This process realizes real-time compensation for the change of stator resistance with temperature, thereby improving the accuracy and stability of the system.

[0055] In an optional embodiment, Figure 4 A flowchart for compensating for harmonics in a current signal is provided. For example... Figure 4 As shown, harmonic compensation is performed on the current signal to generate a compensated current signal, including:

[0056] Step 401: Obtain the amplitude and phase of the predetermined harmonic from the current signal using the Fast Fourier Transform (FFT) analysis method. The specific implementation is as follows:

[0057] First, a harmonic model of motor 122 is constructed through offline experimental analysis. This model can be expressed in Fourier series form:

[0058]

[0059] in, This represents the sum of harmonic components. Let n be the amplitude of the nth harmonic. The phase of the nth harmonic is determined by offline FFT analysis.

[0060] The harmonic model first receives the three-phase current signals (i_a, i_b, i_c) of motor 122 as input, while also considering the changes in stator resistance R_s and the influence of a specific harmonic order n. In this embodiment, the harmonic order n is selected as 6th. The core of the harmonic model lies in using the Fourier series expansion principle to represent the harmonic components in the three-phase current signal as the sum of a series of sine functions, each sine function corresponding to a specific harmonic order, amplitude, and phase.

[0061] Offline Fast Fourier Transform analysis can accurately obtain the amplitude and phase information of each harmonic component, which serves as the key input for subsequent decoupling algorithms. After the harmonic model is constructed, dynamic decoupling of the harmonic magnetic field can be achieved in the control algorithm, effectively reducing the interference of harmonics on rotor position estimation, thereby improving the accuracy and robustness of the sensorless control system.

[0062] Optionally, the FFT analysis can be performed as follows:

[0063] First, 2048 current signals were collected under full-load conditions, and the Blackman-Harris window function was applied, as follows:

[0064] When motor 122 or other equipment is operating at full load, a data acquisition device is used to acquire the current signal. 2048 data points are extracted from the continuous current signal to form a data sequence. This data sequence represents the current signal under full load conditions. A Blackman-Harris window function is applied to this data sequence. The purpose of the window function is to reduce spectral leakage caused by signal truncation and improve the accuracy of spectral analysis. The Blackman-Harris window is a commonly used window function; it has low sidelobes in the frequency domain, which helps reduce leakage effects.

[0065] The Blackman-Harris window function, with a main lobe width of 4.0Δf and side lobe attenuation of -92, is suitable for steady-state harmonic parameter extraction (high-precision offline analysis). The Blackman-Nuttall window function, with a main lobe width of 3.8Δf and side lobe attenuation of -98, is suitable for dynamic harmonic tracking (online real-time compensation). In this embodiment, the Blackman-Harris window function is chosen for offline FFT analysis primarily based on its spectral characteristics. This window function has low sidelobes in the frequency domain, which can effectively reduce spectral leakage and improve the accuracy of harmonic parameter extraction. Especially when performing high-precision offline analysis, the Blackman-Harris window function can ensure accurate harmonic amplitude and phase information, providing strong support for subsequent control algorithm design.

[0066] Then, the fixed-point Fast Fourier Transform (FFT) algorithm is used to process the data obtained by the Blackman-Harris window function in Q15 format, with a frequency resolution of Δf = 9.7656 Hz, as follows:

[0067] The FFT algorithm is used to perform spectral analysis on current data processed by a window function. The FFT algorithm is an efficient method for calculating the Discrete Fourier Transform (DFT), particularly suitable for large data sequences. In this process, a fixed-point FFT algorithm is employed. Fixed-point representation is a numerical representation method that uses a fixed number of bits to represent numbers, typically used in embedded systems or hardware implementations to improve computational efficiency and reduce resource consumption.

[0068] In this embodiment, the data is processed in Q15 format. Q15 format is a fixed-point number representation method, in which 15 bits are used to represent the fractional part and 1 bit is used for the sign bit. This enables high computational precision on fixed-point processors.

[0069] After processing with the FFT algorithm, the spectrum of the current signal can be obtained. The frequency resolution Δf refers to the smallest frequency interval that the FFT algorithm can distinguish, calculated as Δf = sampling frequency / number of data points. In this example, if the sampling frequency is 20000Hz, the frequency resolution is 9.7656Hz. Therefore, the FFT algorithm can distinguish two frequency components with a frequency interval of 9.7656Hz.

[0070] Finally, the parameters of the 6th harmonic were extracted, as follows:

[0071] Dynamic harmonic tracking is achieved using a sliding window FFT algorithm, with the window length set to 128 sampling points, an integer multiple of the fundamental period. After performing Clarke transform on the three-phase current signal acquired by the ADC, the improved Goertzel algorithm is applied to calculate the real part Re_6 and the imaginary part Im_6 of the 6th harmonic component.

[0072] Re_6 = ∑_{k=0}^{N-1} i_α[k]·cos(12πk / N) + i_β[k]·sin(12πk / N)

[0073] Im_6 = ∑_{k=0}^{N-1} i_β[k]·cos(12πk / N) - i_α[k]·sin(12πk / N)

[0074] Where i_α[k] and i_β[k] are the current values ​​at the k-th sampling point in the sliding window; N=128 is the calculation window length, and the Blackman-Nuttall window function is used to reduce spectral leakage and improve calculation accuracy; k represents the index of the sampling point. In the sliding window FFT algorithm, the window length is set to 128 sampling points, which are integer multiples of the fundamental period. Therefore, the value of k ranges from 0 to N-1, i.e., 0 to 127. At each sampling point k, the algorithm calculates the i_α[k] and i_β[k] components of the three-phase current signal after Clarke transform, and calculates the real part Re_6 and the imaginary part Im_6 of the 6th harmonic component according to the formula. The role of k is to traverse all sampling points during the calculation process to obtain the current data within the entire window, thereby performing the calculation of harmonic components.

[0075] After obtaining the real and imaginary parts, the amplitude K_6 and phase φ_6 of the 6th harmonic can be calculated. To further improve accuracy, this application also introduces a temperature-based amplitude correction model and a switching delay-based phase compensation model in its embodiments:

[0076] K_6 = (√(Re_6² + Im_6²) / N) × (1 + 0.002×(T-25)) × K_cal

[0077] φ_6= arctan2(Im_6, Re_6) - π / 6 - Δφ_comp

[0078] In the formula, N is the normalization factor; T is the real-time temperature value; K_cal=0.98 is the factory calibration coefficient; arctan2 is an arctangent function used to calculate the arctangent of the ratio of two numbers, and can determine the quadrant of the result based on the signs of the two numbers; Δφ_comp=2πf_sw×t_delay is the phase delay compensation amount introduced by the switching frequency, where f_sw=20kHz is the PWM switching frequency, and t_delay=1.2μs is the signal transmission delay. Regarding parameter updates, this process is synchronously triggered by the DSP's EPWM module to ensure strict timing alignment with current sampling; the update period can be set to 5ms.

[0079] Step 402: Based on amplitude and phase, a predetermined number of harmonics are filtered out from the current signal using a preset adaptive notch filter to generate a compensated current signal. The specific implementation method is as follows:

[0080] Based on the amplitude K_6 and phase φ_6 of the 6th harmonic obtained in step 401 above, a harmonic compensator is designed. Through this compensator design process, the final result is the parameters used to reduce or compensate for the error caused by harmonics. These parameters are specifically reflected in the configuration of the adaptive notch filter to ensure effective extraction of the 6th harmonic and reduction of error.

[0081] In terms of harmonic compensator design, a second-order IIR (Infinite Impulse Response) adaptive notch filter is adopted, with the transfer function as follows:

[0082]

[0083] in:

[0084] : Represents a discrete-time operator with a delay of one sampling period, i.e. .

[0085] : Represents the harmonic angular frequency, which is the angular frequency of the specific frequency that the harmonic compensator needs to compensate for.

[0086] T: represents the sampling period, which is the time interval between two adjacent sampling points in a discrete-time system.

[0087] This parameter represents the suppression bandwidth and is used to control the filter's bandwidth; the closer it is to 1, the narrower the bandwidth. (Optional) This means that the filter has a certain bandwidth and is used to suppress noise or interference near the harmonic frequency.

[0088] The entire transfer function H(z) represents an adaptive notch filter used to compensate for harmonics at a specific frequency. By adjusting... and The value of can be used to change the frequency response and bandwidth of the filter to adapt to different harmonic compensation requirements.

[0089] The adaptive notch filter dynamically adjusts its notch characteristics based on changes in harmonic angular frequency. This design ensures effective extraction of the 6th harmonic parameters even when the operating state of motor 122 fluctuates, improving the accuracy and stability of parameter extraction. This harmonic compensator further reduces errors caused by harmonics, providing a more accurate data foundation for the subsequent dynamic subspace prediction module.

[0090] Alternatively, the adaptive notch filter can be implemented as follows:

[0091] (1) Convert the transfer function into a difference equation and implement it on the DSP:

[0092]

[0093] In the formula, k is the discrete-time index, used to help describe the dynamic behavior of the system in the discrete-time domain. In a discrete-time system, the value of a signal or sequence is defined at a series of discrete time points, which are usually represented as integers k, k+1, k+2, ...; y(k) represents the system output at discrete time k, and x(k) represents the system input at discrete time k. y(k-1) and y(k-2) represent the system output at discrete times k-1 and k-2, respectively, and x(k-1) and x(k-2) represent the system input at discrete times k-1 and k-2, respectively.

[0094] (2) Establish Tracking mechanism Δ is the fundamental frequency, and Δ is the deviation, which can be estimated online using a sliding mode observer with an update period of 5ms.

[0095] Methods for implementing adaptive notch filters include digital filter discretization and dynamic frequency updating. Digital filter discretization refers to converting the transfer function into a difference equation, while dynamic frequency updating refers to establishing a tracking mechanism to dynamically adjust the harmonic angular frequency ω0 to adapt to changes in the operating state of motor 122. In this process, Δ represents a small frequency deviation, which is estimated through a sliding mode observer and used for updating. This dynamic frequency tracking ensures that the filter can accurately suppress the 6th harmonic component, achieving efficient filtering even during the 122 speed change of the motor.

[0096] This application embodiment effectively reduces the impact of harmonics on the system and improves the stability and reliability of the power system by detecting harmonic components in the power system in real time and using an adaptive notch filter to accurately compensate for them.

[0097] In an optional embodiment, the Kalman filter employs the Sage-Husa adaptive algorithm to adjust the covariance matrix online. In this embodiment, the compensated current signal and the rotational speed information of the motor 122 are input into the Kalman filter to generate a first rotor position estimate. The specific implementation is as follows:

[0098] Constructing a Kalman filter:

[0099] Equations of state:

[0100]

[0101] Observation equation:

[0102]

[0103] in, , , The sampling period.

[0104] Matrix B: Represents the control input u k For state x k+1 The impact of B-matrix. In control systems, B-matrix is ​​typically used to describe how control inputs are translated into changes in state.

[0105] Vector u k : Control input, which can be any external signal or action that affects the state of the system.

[0106] Vector w k Process noise refers to the uncertainty or error introduced during state transition.

[0107] Matrix C: Represents state x k For the observed output y k The visibility or impact of the observation. During the observation process, the C matrix defines how to obtain observations from the system state.

[0108] Vector y k Observational output is a measurement or representation of the system state.

[0109] vector v k Observation noise refers to the uncertainty or error introduced during the observation process.

[0110] Let θ represent the system state, where θ and ω are state variables, representing different characteristics of the system.

[0111] matrix The state transition matrix describes how the system state changes from x in the absence of control input and noise. k Transfer to x k+1 Among them, T s The sampling period represents the time interval for system state updates.

[0112] In this embodiment, the harmonic-compensated current signal (i'_α, i'_β) along with the control voltage (u_α, u_β) is input to a Kalman filter. The Kalman filter continuously updates the state estimate and its uncertainty using a recursive algorithm, effectively suppressing the effects of observation noise and process noise. The state transition matrix A and observation matrix C are designed based on the dynamic model of motor 122. The control input matrix B considers the influence of current on rotor acceleration. By adjusting the Kalman gain, optimal fusion of observed and predicted data is achieved, further improving the accuracy and robustness of position estimation.

[0113] Model the state space:

[0114] Extended state variables Where θ is the rotor position, ω is the electric angular velocity, and ε is the harmonic torque disturbance;

[0115] Improved state matrix: ;

[0116] The key difference between this embodiment and a traditional Kalman filter lies in the use of the Sage-Husa adaptive algorithm to adjust its process noise covariance matrix Q online. In a standard Kalman filter, the Q matrix is ​​typically preset empirically and remains constant. However, when the motor model has uncertainties or unmodeled dynamics (e.g., flux saturation, load torque fluctuations), a fixed Q matrix can lead to degraded filter performance or even divergence. The Sage-Husa algorithm utilizes the "innovative" sequence (i.e., the difference between measured and predicted values) generated during the filtering process. This allows for real-time evaluation of the accuracy of the current model's predictions, and adjustment of the Q matrix accordingly.

[0117] Specifically, the covariance matrix is ​​adjusted online: R=0.01 is updated using the Sage-Husa adaptive algorithm.

[0118] Sage-Husa adaptive algorithm implementation parameters:

[0119]

[0120] initial covariance ;

[0121] The covariance matrix Q is updated online using the Sage-Husa algorithm. The Sage-Husa algorithm updates Q by combining the current estimation error with the previous covariance matrix. In the update formula, β is the forgetting factor, typically taking a value between 0 and 1, used to control the weighting of old and new information. Optionally, β is set to 0.95. K k It is the Kalman gain matrix, ε k It is the estimation error, that is, the difference between the observed value and the predicted value.

[0122] In each iteration, the current covariance matrix Q is used first. k The Kalman filter prediction and update steps are performed on the observation noise covariance R to obtain a new state estimate and estimation error ε. k Then, update the covariance matrix Q using the formula described above. k+1 This is so that it can be used in the next iteration. In this way, when the model prediction error increases (ε... kAs the Q matrix increases, the elements of the Q matrix also increase accordingly. This indicates that the current model prediction is not accurate enough, thus increasing the weight of new measurements. This allows the filter to track the true state of the system more quickly and adapt better to changes in actual observation data. This adaptive capability significantly enhances the estimation accuracy and robustness of the Kalman filter under dynamic conditions.

[0123] Finally, the improved Kalman filter in this embodiment outputs a first rotor position estimate. and estimated rotational speed This signal is smooth, has low noise, and is very accurate under steady-state or slowly changing conditions.

[0124] In an optional embodiment, Figure 5 A flowchart for rotor position estimation based on a long short-term memory network is provided. Figure 5 As shown, the compensated current signal and the speed information of motor 122 are input into a pre-trained long short-term memory network to predict and output a second rotor position estimate, including:

[0125] Step 501: Train the long short-term memory network using historical current signals and historical rotation speed information.

[0126] The LSTM network in this embodiment is a deep network structure containing three hidden layers, each with 64 neurons. The input to the LSTM network is a time-series matrix, for example, a compensated current signal containing the past five sampling times. and speed information The output of the LSTM network is the rotor position estimate for the next time step. .

[0127] In this embodiment, historical current signals and historical speed information are used to create a training dataset for rigorous offline training of the LSTM network. The training dataset covers various operating states of the motor 122. For example, the training dataset includes:

[0128] 40% of the data is steady-state operating data, which includes constant speed (fluctuation range within ±2%) and constant torque (fluctuation range within ±5%) scenarios. These scenarios represent the steady state of the system during normal operation, enabling the model to learn the baseline behavior of the system.

[0129] 30% of the load mutation data includes step change (rapid change from 5-100% of rated torque) scenarios. These scenarios simulate the system's response when the load suddenly increases or decreases, which helps the model learn the dynamic characteristics of the system.

[0130] 20% of the speed step data includes ramp changes (ranging from 100 to 3000 rpm / s). These scenarios represent the system's behavior when the speed is rapidly adjusted, which helps the model learn the impact of speed changes on the system state.

[0131] 10% of the fault simulation data includes abnormal state scenarios such as phase loss and overcurrent. These scenarios simulate the behavior of the system when a fault occurs, which helps the model learn fault characteristics and improve the model's fault detection capability.

[0132] This dataset, which covers a variety of operating scenarios, ensures that the LSTM network can learn the complex dynamic behavior of motor 122 under various conditions, especially the nonlinear behavior that is difficult to describe precisely with mathematical models, enabling the model to learn the comprehensive characteristics of the system.

[0133] The loss function during training is:

[0134]

[0135] The first term is the mean square error of the rotor position, and the second term is the weighted regularization term. , where is the regularization coefficient, is used to prevent overfitting. By penalizing the network weights, it maintains a certain level of generalization ability.

[0136] The LSTM network is used to capture the dynamic changes in the position angle of motor 122 over continuous time steps. Due to its unique gating mechanism, the LSTM network can effectively handle long-term dependencies in time series data, making it suitable for predicting the future state of motor 122.

[0137] An LSTM network is trained using a training dataset to learn the relationship between current signals, rotational speed information, and rotor position. The output of the rotor position estimate is crucial for the real-time control of motor 122, as it provides an accurate estimate of the motor 122's future position, allowing for advance adjustments to the control strategy and improving control stability and response speed.

[0138] Step 502: Quantize the trained Long Short-Term Memory (LSTM) network to obtain the target LSM network.

[0139] In this embodiment, model quantization is required to deploy the trained LSTM model on a resource-constrained embedded DSP. Optionally, 8-bit fixed-point quantization is performed using the TensorFlow Lite toolchain to reduce storage and computational resource consumption. However, fixed-point quantization leads to accuracy loss. To compensate for this accuracy loss, a "dynamic range scaling + calibration layer" scheme is adopted. Specifically:

[0140] First, the weight matrix W is asymmetrically quantized: ;in, and These are the mean and standard deviation of the weight matrix W, respectively. This quantization method takes into account the distribution characteristics of the weights, which helps to reduce quantization error.

[0141] Secondly, a calibration layer is inserted to compensate for activation function errors: ;in, For the output of the calibration layer, These are the quantized activation values. This calibration method helps reduce the impact of quantization on model performance by adjusting the range and shape of the activation values.

[0142] This "dynamic range scaling + calibration layer" approach ensures that the quantized model significantly reduces storage and computational requirements while minimizing performance loss.

[0143] By using appropriate training data distribution and quantization error compensation algorithms, the LSTM network can maintain high prediction accuracy and robustness even after quantization.

[0144] Step 503: Input the compensated current signal and the motor speed information into the target long short-term memory network to predict and output the second rotor position estimate.

[0145] The final output is a second rotor position estimate. This signal is characterized by its fast dynamic response, insensitivity to model parameters, and particular strength in predicting dynamic processes.

[0146] In an optional embodiment, the first rotor position estimate and the second rotor position estimate are weighted and fused to obtain the final predicted rotor position, including:

[0147] The weighting coefficients are calculated based on the subspace corresponding to the current operating data of motor 122; the subspace is obtained by dividing the historical operating data of motor 122.

[0148] The first rotor position estimate and the second rotor position estimate are weighted and fused according to the weighting coefficients to obtain the final predicted rotor position.

[0149] Optionally, historical operating data includes speed and torque; the subspace is obtained by dividing the two-dimensional feature space composed of the two dimensions of speed and torque in the historical operating data through cluster analysis.

[0150] In this embodiment, the entire working space of motor 122 is determined based on historical operating data, defined by the speed ω-axis and torque T-axis. This working space is divided into multiple subspaces to achieve a fine depiction of the motor 122's operating state, thereby providing a more accurate information foundation for subsequent prediction and control. Within each subspace, a corresponding dynamic model is constructed using historical data and current observation data to predict the future state of motor 122. Optionally, in this embodiment, the entire working space is divided into a 10×10 subspace grid, forming 100 dynamic subspaces. , ,in, The subspace grid division is based on cluster analysis of a large amount of historical operating data. The k-means++ algorithm can be used to cluster the collected data points (speed, torque) covering all operating conditions of motor 122 into 100 clusters. The selection of 100 partitions is determined using the "elbow method," where the SSE descent inflection point occurs at partition 100, achieving a good balance between computational complexity (requiring the maintenance of 100 local models) and prediction accuracy. Compared to the global model, the 100-partition division reduces prediction error.

[0151] In this embodiment, a subspace database is provided, which stores each subspace. Specific parameters, such as the weights of the LSTM prediction model and the optimization parameters of the Kalman filter, are used. In real-time operation, the estimated rotational speed is calculated based on the real-time rotational speed output by the Kalman filter. and the torque estimate calculated from the q-axis current This allows us to determine the current subspace where motor 122 is located. When the rate of change of speed or torque exceeds the corresponding threshold (e.g., dω / dt>500rpm / s or dT / dt>5Nm / ms), the subspace database is updated, and the update cycle is adaptively adjusted (100ms-1s).

[0152] This application presents an innovative method for local linearization prediction by partitioning the power system's operating state into two-dimensional space based on speed and torque. Through real-time monitoring and analysis of the power system's operating status, speed and torque are used as key parameters to divide the power system's operating space into multiple local subspaces, and linearization prediction is performed within each subspace. This method can more accurately reflect the nonlinear characteristics of the power system, improving prediction accuracy and robustness.

[0153] After dividing the space into subspaces, it is determined which subspace the current running data falls into, and a weighting coefficient is calculated based on that subspace. Finally, the first rotor position estimate and the second rotor position estimate are weighted and fused according to the weighting coefficient to obtain the final predicted rotor position.

[0154] In the embodiments of this application, the Kalman filter prediction results Prediction results of LSTM prediction model Dynamic weights are allocated among the components to improve the stability and accuracy of the predictions. The weighting coefficients are... The value determines the final output estimate of the first rotor position. Second rotor position estimation value The level of trust. A value closer to 1 indicates that the system trusts the results of the Kalman filter more. A value close to 0 indicates that the system trusts the results of the LSTM network more.

[0155] In an optional embodiment, the weighting coefficient is calculated based on the subspace corresponding to the current operating data of motor 122, including:

[0156] Determine the subspace adjacent to the currently running data;

[0157] The weight coefficients are obtained by using bilinear interpolation, which is based on the distance between the current running data and the center point of the adjacent subspace.

[0158] In this embodiment of the application, the weighting coefficient The calculation can be based on the current working point. "Membership degree" in the subspace grid. An effective method is to use bilinear interpolation. Assume the current working point It fell into the center point of four subspaces , , as well as The enclosed area can then be determined according to... The relative distances to these four center points are used to interpolate and calculate .

[0159] Another alternative implementation is to use a sigmoid function that is related to the operating state of motor 122:

[0160]

[0161] in, It is the speed threshold. k It is the smoothing coefficient. This formula indicates that at low speeds (… ), The system is relatively large, biased towards the Kalman filter; at high speeds ( ), As the size decreases, the system becomes more biased towards LSTM networks. This is achieved by introducing a smoothing coefficient. k and speed threshold This makes the weight allocation smoother and avoids abrupt changes in the prediction results. Optionally, the rate of change of speed and torque can also be considered simultaneously.

[0162] Obtain the weighting coefficients Then, the position of the first rotor can be estimated based on the weighting coefficients. Second rotor position estimation value Perform a weighted summation:

[0163]

[0164] in, It is the final rotor position estimate output, which integrates the high accuracy of the Kalman filter in steady state and the fast response of the LSTM network in dynamic state, thus exhibiting optimal performance across the entire operating range.

[0165] This application innovatively integrates the adaptive weight allocation mechanism of Kalman filters and LSTM networks to construct a hybrid prediction architecture. Kalman filters excel at state estimation and prediction of linear systems, while LSTM networks possess powerful nonlinear modeling capabilities. By adaptively allocating the weights of both, their advantages can be fully utilized to achieve accurate prediction of power system states and fault early warning, thereby improving the safety and operational efficiency of the power system.

[0166] In an optional embodiment, motor 122 is controlled based on the final predicted rotor position, including:

[0167] Based on the final predicted rotor position and the estimated rotational speed, a control signal is generated.

[0168] The motor 122 is controlled according to the control signal.

[0169] In this embodiment, the final predicted rotor position and estimated rotational speed are sent to the main controller, replacing the signals from the physical encoder. Based on these two estimates and external speed or torque commands, the main controller executes its control algorithm (e.g., PI control, Park transform, and inverse Park transform) to calculate the required control voltages u_d and u_q. Then, it generates a PWM signal through a space vector pulse width modulation (SVPWM) unit to drive the inverter 121, thereby forming precise closed-loop control of the motor 122.

[0170] In this embodiment, the sensorless motor control method is implemented on a real-time operating system (such as TI-RTOS) and divided into tasks with different priorities to ensure real-time performance.

[0171] Highest priority: Pulse Width Modulation (PWM) interrupt service routine (e.g., every 100μs, or 10kHz), responsible for updating the PWM duty cycle.

[0172] Second highest priority: Kalman filtering task (e.g., every 200 μs, i.e., 5 kHz), performing harmonic decoupling and Kalman filter-based model estimation.

[0173] Medium priority: LSTM inference task (e.g., every 1ms, i.e. 1kHz), performing data-driven predictions based on LSTM prediction models.

[0174] Lower priority: Parameter learning and update tasks (e.g., every 10ms, or 100Hz), responsible for updating the subspace database, etc.

[0175] Lowest priority: System monitoring and fault diagnosis tasks (e.g., every 100ms, or 10Hz).

[0176] By rationally configuring task priorities and interrupt frequencies, the efficient operation of each task within the real-time operating system is ensured, while conflicts and delays between tasks are avoided, thereby improving the system's real-time performance and stability. Clear task division and collaborative work among tasks effectively enhance the overall system performance.

[0177] For example, in a typical control cycle, the process is as follows:

[0178] (1) ADC triggers to collect three-phase current signals and stator temperature.

[0179] (2) Perform parameter compensation, harmonic identification and compensation tasks to generate harmonic-compensated current signals (i'_α, i'_β).

[0180] (3) Run the Kalman filter, update its state, and output. and .

[0181] (4) Run the LSTM inference task based on the LSTM prediction model, and output the latest data sequence (current signal and speed information of motor 122). .

[0182] (5) Based on the current rotational speed and torque Determine the current subspace.

[0183] (6) Calculate the weighting coefficients .

[0184] (7) Perform fusion calculation to obtain .

[0185] (8) Use of the main controller and Calculate the new control voltage.

[0186] (9) The SVPWM unit generates a new PWM waveform and loads it onto the inverter 121 when the next PWM interrupt occurs.

[0187] (10) The system waits for the next sampling period and repeats the above steps.

[0188] Based on the above method, the following tests were conducted in the embodiments of this application:

[0189] The harmonic suppression effect of the current signal was tested, and the specific process is as follows:

[0190] A 6th harmonic current of a certain amplitude (5% of the fundamental frequency) is artificially injected into the motor control system, and the change in total harmonic distortion (THD) is observed using a DPO7254 oscilloscope. Optionally, the THD value can be calculated using the acquired signal data. The formula for calculating THD is typically as follows:

[0191] THD = (Sum of squares of the effective values ​​of all harmonics / Square of the effective value of the fundamental frequency)^0.5

[0192] The sum of squares of the effective values ​​of each harmonic refers to the sum of the squares of the effective values ​​of all harmonics from the 2nd to the 6th harmonic.

[0193] The improvement effect is calculated by first measuring and recording the initial THD value before harmonic compensation. Then, the THD value is measured again. By comparing the THD values ​​before and after harmonic compensation, the degree of improvement in harmonic distortion by the harmonic compensation algorithm can be quantified. Percentage improvement calculation:

[0194] Percentage Improvement = (Initial THD Value - Improved THD Value) / Initial THD Value × 100%

[0195] This percentage value can intuitively reflect the improvement effect of the harmonic compensation algorithm on the harmonic distortion problem.

[0196] By observing the THD changes displayed on an oscilloscope, the attenuation effect of the harmonic compensation algorithm on harmonic components can be visually evaluated. If the THD decreases significantly, it indicates that the harmonic compensation algorithm is effective and can significantly reduce the adverse effects of harmonics on the performance of the motor control system, thus evaluating the effectiveness of the harmonic compensation algorithm.

[0197] The system's dynamic response was tested, and the specific process is as follows:

[0198] The dynamic response speed of the motor control system is tested under different load and speed conditions. By suddenly changing the load or speed, the system's ability to quickly adjust its control strategy and maintain stable motor operation is observed. Dynamic response testing verifies the adaptability and robustness of the predictive control algorithm under complex operating conditions.

[0199] Specifically:

[0200] Adaptability Assessment: Adaptability refers to the ability of a motor control system to quickly and accurately adjust its control strategy to adapt to changes in load and speed. Through system dynamic response testing, key indicators such as response time, overshoot, and number of oscillations after sudden changes in load or speed can be observed. These indicators directly reflect the adaptability of the control system. If the control system can quickly stabilize the operation of motor 122 within a short time, and the overshoot and number of oscillations are relatively small, it indicates good adaptability.

[0201] Robustness Assessment: Robustness refers to the ability of the motor 122 control system to maintain stable operation when faced with various uncertainties and disturbances. In system dynamic response testing, various sudden changes in load and speed can be simulated to verify the robustness of the control system. If the control system can quickly adjust its strategy and maintain the stable operation of motor 122 under various sudden changes, it indicates strong robustness. Conversely, if the control system cannot maintain stable operation under certain sudden changes, or even leads to system collapse, it indicates weak robustness.

[0202] The following is an example of system dynamic response testing in this application embodiment:

[0203] The test scenario involves setting up the motor control system to operate under different load and speed conditions in a laboratory environment. For example, the initial conditions are set as 50% load and 1500 RPM.

[0204] The testing procedure is as follows: First, suddenly increase the load to 80% and record the response time, overshoot, and number of oscillations of the motor control system. Then, suddenly decrease the speed to 1000 RPM and record the response time, overshoot, and number of oscillations of the motor control system. Repeat the above steps, but each time the load and speed changes are larger, for example, increasing the load from 50% to 90% and decreasing the speed from 1500 RPM to 800 RPM.

[0205] Data was recorded and analyzed based on the above test scenarios and procedures, including response time, overshoot, and oscillation count. Response time refers to the time required for the system to stabilize from a change in load or speed to a stable operating state for motor 122. Overshoot refers to the amount by which the maximum instantaneous speed of motor 122 exceeds the set value before reaching a steady state. Oscillation count refers to the number of times the speed of motor 122 fluctuates beyond the set value before reaching a steady state.

[0206] Finally, an adaptability assessment and a robustness assessment are conducted:

[0207] In terms of adaptability assessment, if the motor control system can stabilize the motor 122 within 1 second after sudden changes in load and speed, with an overshoot of less than 5% and no more than 3 oscillations, it is considered to have good adaptability. If the response time exceeds 3 seconds, the overshoot exceeds 10%, and the number of oscillations exceeds 5, it is considered to have poor adaptability.

[0208] In terms of robustness assessment, if the control system can stabilize the motor 122 within 2 seconds under simulated load and speed change conditions, with overshoot less than 10% and oscillations not exceeding 5 times, then the robustness is considered good. If the motor control system cannot operate stably under certain sudden changes, such as experiencing continuous oscillations or system collapse, then the robustness is considered poor.

[0209] The accuracy of the location estimation is verified, and the specific process is as follows:

[0210] A high-precision encoder is used as a reference to compare the deviation between the final predicted rotor position output by the system and the rotor position information actually measured by the encoder. By statistically analyzing the magnitude and distribution of the deviation values, the accuracy of the position estimation can be evaluated. The accuracy of position estimation is crucial for improving the control precision and stability of the motor control system.

[0211] The specific process for evaluating system energy efficiency is as follows:

[0212] Under different operating conditions, the energy efficiency indicators of the motor control system, such as power factor and efficiency, are tested. By comparing and analyzing the changes in energy efficiency before and after adopting the sensorless motor control method in this application embodiment, the improvement effect of the predictive control algorithm on system energy efficiency can be evaluated. A high-efficiency motor control system can not only reduce energy consumption but also reduce harmonic pollution and improve the overall performance of the system.

[0213] The following is an example of system energy efficiency assessment provided in this application:

[0214] First, the motor control system is set to operate under different conditions, including different loads and speeds;

[0215] Then, before using the sensorless motor control method in this embodiment, the input power, output power, current and voltage data of motor 122 are recorded.

[0216] Then, calculate and record the power factor and efficiency under these operating conditions;

[0217] Finally, the above steps are repeated using the sensorless motor control method described in this application embodiment.

[0218] After the above steps, the changes in energy efficiency indicators are analyzed by comparing the data before and after applying the predictive control algorithm. The analysis focuses on three evaluation indicators: power factor (PF), efficiency (η), and harmonic pollution. Power factor (PF) measures the efficiency of motor 122 in using electrical energy; efficiency (η) is the ratio of motor 122's output power to its input power; and harmonic pollution is assessed using total harmonic distortion (THD).

[0219] Regarding the analysis of experimental results: the power factor and efficiency of motor 122 under different operating conditions were analyzed without the application of predictive control algorithm; the power factor and efficiency of motor 122 under the same operating conditions were analyzed after the application of predictive control algorithm; and the reduction of harmonic pollution was analyzed.

[0220] The analysis shows that the predictive control algorithm significantly improves the power factor and efficiency of the motor control system. Reduced harmonic pollution indicates smoother operation of motor 122 and reduced interference with the power grid.

[0221] Through the above tests, the sensorless motor control method in this application embodiment effectively improves the overall performance and energy efficiency of the system and has practical application value.

[0222] The accuracy of the predictions is verified, and the specific process is as follows:

[0223] Using a 23-bit photoelectric encoder (RCN-723) as a reference, the root mean square error (RMSE) was calculated:

[0224]

[0225] in, This refers to the actual location; To predict the location.

[0226] RCN-723 encoder calibration:

[0227] Traceability Certificate: National Institute of Metrology (NIM) No. GBW-2023-08756.

[0228] Calibration method: The laser interferometer (Agilent 5530) was used for 24-point circular calibration in a constant temperature environment (23±0.1℃).

[0229] Uncertainty: 0.0003 rad (k=2).

[0230] A high-precision photoelectric encoder is used as the reference benchmark for the actual position. By calculating the root mean square error between the predicted position and the actual position, the quality of the prediction accuracy can be quantitatively evaluated. Prediction accuracy is one of the important indicators for measuring the performance of a control system. High prediction accuracy means that the system can more accurately predict the future state of motor 122, thereby providing more precise control commands and improving the control performance and stability of the system. Experimental results show that the control system of this embodiment can achieve high prediction accuracy under different operating conditions, ensuring the accuracy and stability of control.

[0231] The above verification methods allow for a comprehensive evaluation of the system's performance. Experimental results demonstrate that the system exhibits excellent dynamic response speed, position estimation accuracy, and energy efficiency under various operating conditions, validating the effectiveness and practicality of the predictive control algorithm.

[0232] The method described in this application embodiment has been verified using a 500W permanent magnet synchronous motor platform. At a rated speed of 2500 rpm, torque ripple is reduced by 62%, and position tracking delay is less than 50 μs. The DSP's FLASH storage space must be ≥512KB, and RAM ≥256KB to meet the storage requirements of the LSTM model.

[0233] Based on the same principle as the method provided in the embodiments of this application, the embodiments of this application also provide a sensorless motor control device, such as... Figure 6 As shown, the device includes:

[0234] The harmonic compensation module 601 is used to acquire the current signal of the motor 122, compensate for the harmonics of the current signal, and generate a compensated current signal.

[0235] The Kalman filter fusion module 602 is used to input the compensated current signal and the speed information of the motor 122 into the Kalman filter to generate the first rotor position estimate.

[0236] The LSTM network prediction module 603 is used to input the compensated current signal and the speed information of the motor 122 into the pre-trained long short-term memory network and predict and output the second rotor position estimate.

[0237] The dynamic weighted hybrid prediction module 604 is used to perform weighted fusion of the first rotor position estimate and the second rotor position estimate to obtain the final predicted rotor position.

[0238] The control module 605 is used to control the motor 122 based on the final predicted value of the rotor position.

[0239] In this embodiment, the current signal of motor 122 is acquired, and the harmonics of the current signal are compensated to generate a compensated current signal. This compensated current signal can identify and compensate for the pollution of the current signal by the inherent spatial harmonic magnetic field inside motor 122, providing a more accurate data basis for subsequent processing. The compensated current signal and the speed information of motor 122 are respectively input into a Kalman filter and a Long Short-Term Memory (LSTM) network. The Kalman filter has certain advantages in smoothing noise and predicting linear trends, and can output a smooth, low-noise first rotor position estimate. The LSTM network has advantages in processing nonlinear and time-series data, and can output a second rotor position estimate with fast dynamic response. Finally, the first and second rotor position estimates are weighted and fused to obtain a final rotor position prediction value. This combination of the advantages of LSTM network and Kalman filter enables fast and accurate prediction of rotor position under non-ideal actual operating conditions such as harmonic interference, parameter drift, and drastic dynamic changes without sensors, thereby improving the accuracy of motor 122 control.

[0240] The sensorless motor control device provided in this application embodiment can achieve... Figures 1 to 5 The various processes implemented in the method embodiments shown will not be described again here to avoid repetition.

[0241] The sensorless motor control device of this application embodiment can execute the sensorless motor control method provided in this application embodiment. The implementation principle is similar. The actions performed by each module and unit in the sensorless motor control device in each embodiment of this application correspond to the steps in the sensorless motor control method in each embodiment of this application. For detailed functional descriptions of each module of the sensorless motor control device, please refer to the descriptions in the corresponding sensorless motor control methods shown above. They will not be repeated here.

[0242] Please refer to Figure 7 This illustration shows a schematic diagram of the structure of a computing device provided in an embodiment of this application. In some examples, the computing device 70 can be at least one of devices such as a smartphone, smartwatch, desktop computer, laptop, virtual reality terminal, augmented reality terminal, wireless terminal, and laptop computer. The computing device 70 has communication functions and can access wired or wireless networks. The computing device 70 can refer to one of multiple terminals, and those skilled in the art will understand that the number of such terminals can be more or less. In some examples, the computing device 70 can receive current signals based on the accessed wired or wireless network. It is understood that the computing device 70 undertakes the calculation and processing work of the technical solution of this application, and this application does not limit it in this regard.

[0243] like Figure 7As shown, the computing device in this application may include one or more of the following components: processor 710 and memory 720.

[0244] Optionally, the processor 710 connects various parts within the computing device using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 720, and by calling data stored in the memory 720. Optionally, the processor 710 can be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 710 can integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), Neural-network Processing Unit (NPU), and baseband chip. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required to be displayed on the touch screen; the NPU is used to implement Artificial Intelligence (AI) functions; and the baseband chip is used to handle wireless communication. It is understandable that the aforementioned baseband chip may not be integrated into the processor 710, but may be implemented using a separate chip.

[0245] The memory 720 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 720 may include a non-transitory computer-readable storage medium. The memory 720 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 720 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the various method embodiments described above, etc.; the data storage area may store data created according to the use of the computing device, etc.

[0246] In addition, those skilled in the art will understand that the structure of the computing device shown in the above figures does not constitute a limitation on the computing device. The computing device may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the computing device may also include a display screen, camera assembly, microphone, speaker, radio frequency circuit, input unit, sensors (such as accelerometer, angular velocity sensor, light sensor, etc.), audio circuit, WiFi module, power supply, Bluetooth module, etc., which will not be described in detail here.

[0247] This application also provides a computer-readable storage medium storing at least one instruction, which is executed by a processor to implement the sensorless motor control method described in the above embodiments.

[0248] This application also provides a computer program product including computer instructions stored in a computer-readable storage medium; a processor of a computing device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computing device to perform the sensorless motor control method described in the above embodiments.

[0249] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this application can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium accessible to a general-purpose or special-purpose computer.

[0250] It should be noted that the technical solutions described in this application can be combined arbitrarily without conflict.

[0251] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A position sensorless control method of an electric motor, characterized by, The method comprises: Collecting a current signal of the motor and compensating harmonics of the current signal to generate a compensated current signal; Inputting the compensated current signal and speed information of the motor into a Kalman filter to generate a first rotor position estimation value; Inputting the compensated current signal and speed information of the motor into a pre-trained long short-term memory network to predict a second rotor position estimation value; Weightedly fusing the first rotor position estimation value and the second rotor position estimation value to obtain a final rotor position prediction value; Controlling the motor based on the final rotor position prediction value.

2. The electric motor position sensorless control method of claim 1, wherein, The compensation of the harmonics of the current signal to generate the compensated current signal comprises: Using a fast Fourier transform analysis method to obtain amplitudes and phases of harmonics of a predetermined number from the current signal; Based on the amplitudes and phases, filtering the harmonics of the predetermined number from the current signal through a pre-set adaptive notch filter to generate the compensated current signal.

3. The electric motor position sensorless control method of claim 1, wherein, The Kalman filter uses a Sage-Husa adaptive algorithm to adjust a covariance matrix online.

4. The electric motor position sensorless control method of claim 1, wherein, The inputting of the compensated current signal and speed information of the motor into a pre-trained long short-term memory network to predict a second rotor position estimation value comprises: Training the long short-term memory network using historical current signals and historical speed information; Quantifying the trained long short-term memory network to obtain a target long short-term memory network; Inputting the compensated current signal and speed information of the motor into the target long short-term memory network to predict the second rotor position estimation value.

5. The electric motor position sensorless control method of claim 1, wherein, The weighted fusion of the first rotor position estimation value and the second rotor position estimation value to obtain a final rotor position prediction value comprises: Calculating a weight coefficient according to a subspace corresponding to current operation data of the motor; the subspace is obtained by clustering analysis of historical operation data of the motor; Weightedly fusing the first rotor position estimation value and the second rotor position estimation value according to the weight coefficient to obtain the final rotor position prediction value.

6. The electric motor position sensorless control method of claim 5, wherein, The calculation of the weight coefficient according to the subspace corresponding to the current operation data of the motor comprises: Determining a subspace adjacent to the current operation data; Using a bilinear interpolation method to perform interpolation calculation based on distances between the current operation data and center points of adjacent subspaces to obtain the weight coefficient.

7. The motor position sensorless control method according to claim 5 or 6, characterized by, The historical operation data comprises speed and torque; the subspace is obtained by clustering analysis of a two-dimensional feature space formed by the speed and the torque in the historical operation data.

8. A position sensorless control apparatus for an electric motor, characterized by comprising: The device comprises: A harmonic compensation module for collecting a current signal of the motor and compensating harmonics of the current signal to generate a compensated current signal; A Kalman filter fusion module for inputting the compensated current signal and speed information of the motor into a Kalman filter to generate a first rotor position estimation value; An LSTM network prediction module for inputting the compensated current signal and speed information of the motor into a pre-trained long short-term memory network to predict a second rotor position estimation value; a dynamic weight hybrid prediction module configured to fuse the first rotor position estimation value and the second rotor position estimation value by weighting to obtain a final rotor position prediction value; a control module configured to control the motor based on the final rotor position prediction value.

9. A computing device, comprising: A computer program product comprising a processor and a memory, and a computer program stored on the memory and loadable on the processor, the processor implementing the method of any one of claims 1-7 when executing the program.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores at least one instruction for being executed by the processor to implement the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Position sensorless control method and device and storage medium

    CN113364359A

  • Gyroscope-based brushless motor attitude detection and balance control method and system

    CN120110250A