Motor position sensorless control method and device, equipment and medium
By acquiring motor current signals for harmonic compensation and combining weighted fusion of Kalman filters and long short-term memory networks, the rotor position estimation problem in sensorless control of brushless DC motors is solved, achieving high-precision motor control.
Patent Information
- Application Number
- CN202610065716.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-19
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2046-01-19
AI Technical Summary
In existing brushless DC motor control strategies, sensors have short lifespans and increase cost and complexity, requiring high-precision rotor position estimation in the absence of sensors.
By collecting motor current signals, performing harmonic compensation, and then inputting them into a Kalman filter and a long short-term memory network, combined with weighted fusion, the final predicted value of the rotor position is generated, thus achieving sensorless control.
In the absence of sensors, it achieves rapid and accurate prediction of harmonic interference, parameter drift and drastic dynamic changes, thereby improving the accuracy and robustness of motor control.
Smart Images

Figure CN121530265A_ABST
Abstract
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: In a first aspect, this application provides a sensorless control method for a motor, the method comprising: The motor current signal is collected, and the harmonics of the current signal are compensated to generate a compensated current signal. The compensated current signal and the motor speed information are input into the Kalman filter to generate the first rotor position estimate. 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. The first rotor position estimate and the second rotor position estimate are weighted and fused to obtain the final predicted rotor position. The motor is controlled based on the final predicted value of the rotor position.
[0006] Secondly, this application provides a sensorless motor control device, the device comprising: 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. 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. The LSTM network prediction module is configured to input the compensated current signal and the rotating speed information of the motor into a pre-trained long short-term memory network to predict a second rotor position estimation value; The dynamic weight hybrid prediction module is configured to perform weighted fusion on the first rotor position estimation value and the second rotor position estimation value to obtain a final rotor position prediction value. The control module is configured to control the motor based on the final rotor position prediction value.
[0007] In a third aspect, the present application provides a computing device, comprising a processor and a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the motor sensorless control method in the present application when executing the program.
[0008] In a fourth aspect, the present application provides a computer readable storage medium, which stores at least one instruction for being executed by a processor to implement the motor sensorless control method in the present application.
[0009] The present application provides a motor sensorless control method, device, equipment and medium, by collecting the current signal of the motor, and compensating the harmonic of the current signal, generating the compensated current signal, which can identify and compensate the pollution of the inherent spatial harmonic magnetic field in the motor to the current signal, and provide more accurate data basis for subsequent processing. The compensated current signal and the rotating speed information of the motor are respectively input into a Kalman filter and a long short-term memory network, wherein the Kalman filter has certain advantages in smoothing noise and predicting linear trend, and can output a smooth first rotor position estimation value with small noise; the long short-term memory network has advantages in processing nonlinear and time series data, and can output a second rotor position estimation value with fast dynamic response. Finally, the first rotor position estimation value and the second rotor position estimation value are weighted and fused to obtain a final rotor position prediction value, which combines the advantages of the LSTM network and the Kalman filter, and can quickly and accurately predict the rotor position under non-ideal actual working conditions such as harmonic interference, parameter drift and severe dynamic change without sensor, thereby improving the accuracy of motor control. BRIEF DESCRIPTION OF DRAWINGS
[0010] Figure 1 The motor control system structure diagram provided by the embodiment of the present application.
[0011] Figure 2 The motor sensorless control method flowchart provided by the embodiment of the present application.
[0012] Figure 3 The flowchart of collecting the current signal of the motor provided by the embodiment of the present application.
[0013] Figure 4 The flowchart for compensating for the harmonics of the current signal provided for the embodiments of the present application.
[0014] Figure 5 The flowchart for rotor position estimation based on a long short-term memory network provided for the embodiments of the present application.
[0015] Figure 6 The structural schematic diagram of the motor position sensorless control device provided for the embodiments of the present application.
[0016] Figure 7 The structural schematic diagram of the computing device provided for the embodiments of the present application. DETAILED DESCRIPTION
[0017] The technical solutions in the present application will be described in detail below with reference to the drawings in the present application. The same or similar reference signs represent the same or similar elements or elements with the same or similar functions throughout the present application. The embodiments described below with reference to the drawings are exemplary and are only used to explain the present application, but cannot be interpreted as a limitation on the present application.
[0018] Those skilled in the art can understand that the singular forms "a", "an" and "the" used herein include plural forms unless specifically stated otherwise. It should be further understood that the use of the phrase "comprises" in the specification of the present application means that a feature, integer, step, operation, element and / or component exists, 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 can be intermediate elements. In addition, "connected" or "coupled" used herein can include wireless connection or wireless coupling.
[0019] Those skilled in the art can understand that unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as that generally understood by those skilled in the art to which the present application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have meanings consistent with those in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as such.
[0020] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described again in some embodiments. The embodiments of the present application will be described below with reference to the drawings.
[0021] The embodiment of the present application provides a motor control system structural schematic diagram. As shown in the figure, Figure 1 The system comprises an input area 10, a control processing area 11 and an output area 12. The input area 10 comprises a temperature sensor 101, a current sensor 102 and a power supply 103; the control processing area 11 comprises a controller internal module 111, a server 112, a terminal device 113 and a driving circuit 114; and the output area 12 comprises an inverter 121 and a motor 122. The controller internal module 111 comprises a signal processing module 111a, a position sensorless control algorithm module 111b and a communication interface module 111c.
[0022] In the input area 10, the motor 122 is powered by the power supply 103, the current signal of the motor 122 is collected by the current sensor 102, and the stator temperature of the motor 122 is monitored in real time by the temperature sensor 101. In the control processing area 11, the controller internal module 111 is connected with the server 112 or the terminal device 113 through the communication interface module 111c. In the controller internal module 111, the signal processing module 111a receives the analog signals output by the temperature sensor 101 and the current sensor 102, processes the analog signals and inputs the processed analog signals into the position sensorless control algorithm module 111b. The position sensorless control algorithm module 111b executes a control algorithm based on the processed signals to generate a PWM control signal, and then generates a driving signal through the driver after the PWM control signal is isolated / amplified. In the output area 12, the driving signal acts on the inverter 121, and the motor 122 is accurately controlled through the inverter 121. The motor 122 responds to the voltage or current excitation to perform the next position estimation.
[0023] The embodiment of the present application provides a motor position sensorless control method, as shown in the figure, Figure 2 The method can comprise the following steps: Step 201, collecting the current signal of the motor, and compensating the harmonics of the current signal to generate a compensated current signal.
[0024] The embodiment of the present application acquires the current signal through a data acquisition system. Optionally, the current signal is a three-phase current signal. The data acquisition system adopts high-precision hardware (such as TI TMS320F28379D digital signal processor and ADS8588S Sigma-Delta type ADC) to synchronously collect the three-phase current signal at a specific frequency. Meanwhile, the built-in temperature sensor 101 (for example, PT100 temperature sensor) is used to monitor the stator temperature in real time, and the stator resistance value is corrected in real time through a compensation model, so as to ensure the parameter accuracy of subsequent model calculation.
[0025] The three-phase current signal obtained by the above method and the stator resistance are input into a pre-constructed harmonic model, and through the harmonic model, the pollution of the inherent spatial harmonic magnetic field inside the motor 122 to the current signal is accurately identified and compensated, to obtain a compensated current signal.
[0026] In step 202, the compensated current signal and the speed information of the motor are input into a Kalman filter to generate a first rotor position estimation value.
[0027] The Kalman filter can fuse the compensated current signal and the speed information of the motor 122 to realize accurate estimation of the rotor position, minimize the error between the rotor position estimation value and the actual value, and thus generate a preliminary model-based first rotor position estimation value.
[0028] In step 203, the compensated current signal and the speed information of the motor are input into a pre-trained long short-term memory network to predict a second rotor position estimation value.
[0029] In the embodiments of the present application, the long short-term memory (LSTM) network is trained offline on a large data set containing multiple working conditions such as steady state, load mutation, speed step, and even fault simulation, to learn the complex nonlinear mapping relationship from the historical current signal sequence, the speed sequence to the future rotor position. The pre-trained LSTM network can capture long-term dependencies that are difficult to describe by traditional mathematical models when processing time series data. After the current current signal of the motor 122 is obtained and processed by steps 201 and 202, the speed information of the motor 122 is input into the pre-trained LSTM network, a data-based second rotor position estimation value can be predicted.
[0030] In step 204, the first rotor position estimation value and the second rotor position estimation value are weighted and fused to obtain a final rotor position prediction value.
[0031] The method in the embodiments of the present application does not simply switch between the Kalman filter and the LSTM network, but performs weighted fusion. The output results of the Kalman filter and the LSTM network are weighted and fused by a specific weight coefficient, combining the advantages of the LSTM network in processing nonlinear and time series data and the advantages of the Kalman filter in smoothing noise and predicting linear trends. This method can still quickly and accurately predict the rotor position when the load and speed of the motor change dramatically, ensuring the robustness of the system in the full working condition range.
[0032] In step 205, the motor is controlled based on the final rotor position prediction value.
[0033] In the embodiments of the present application, the current signal of the motor 122 is collected, and the harmonics of the current signal are compensated to generate a compensated current signal, which can identify and compensate the pollution of the inherent spatial harmonic magnetic field inside the motor 122 to the current signal, and provide a more accurate data basis for subsequent processing. The compensated current signal and the speed information of the motor 122 are respectively input into a Kalman filter and a long short-term memory network, wherein the Kalman filter has certain advantages in smoothing noise and predicting linear trend, and can output a first rotor position estimation value which is smooth and has small noise; the long short-term memory network has advantages in processing nonlinear and time series data, and can output a second rotor position estimation value which has fast dynamic response. Finally, the first rotor position estimation value and the second rotor position estimation value are weighted and fused to obtain a final rotor position prediction value which combines the advantages of the LSTM network and the Kalman filter, and can quickly and accurately predict the rotor position under non-ideal actual working conditions such as harmonic interference, parameter drift and severe dynamic change without sensors, thereby improving the accuracy of motor control.
[0034] In an optional embodiment, Figure 3 A flowchart for collecting the current signal of the motor is provided; as Figure 3 shown, the step of collecting the current signal of the motor 122 includes: Step 301, using a data acquisition device to synchronously collect three-phase current signals at a sampling frequency of 20 kHz.
[0035] Among them, the data acquisition device uses TI TMS320F28379D dual-core DSC, configures 3-channel 16-bit Σ-Δ type ADC hardware device, and the ADC supports multiple trigger sources, including timers, ePWM (Enhanced Pulse Width Modulation), etc., which can flexibly select appropriate trigger sources according to application requirements. After determining to use ePWM as the trigger source, the frequency of the trigger signal can be accurately controlled by configuring the related registers of the ePWM module, such as TBPRD (time base period register) and CMPA / CMPB (counting comparison register). 20 kHz is used as the sampling frequency based on the understanding of the ADC module, the selection of the trigger source, the configuration of the ADC, and the calculation and verification of the sampling frequency. This sampling frequency can meet the application requirements and ensure the accuracy and stability of the data.
[0036] In addition, 20 kHz meets the Shannon theorem (the highest speed of the motor 122 corresponds to an electric frequency of 1 kHz, and the Nyquist frequency is 2 kHz), and is an integer multiple of the PWM switching frequency (20 kHz), ensuring that the sampling points uniformly cover the switching period.
[0037] In the embodiments of the present application, the three-phase current signals are acquired by the LTS25-NP current sensor 102, and the pulse width modulation (PWM) carrier signal is synchronously collected to eliminate switching noise. The working principle of PWM is based on the linear relationship between pulse width and signal amplitude, and the amplitude of the output signal is accurately controlled by changing the width (duty cycle) of the pulse. In motor control, power management and other applications, PWM signals are often used to regulate motor 122 speed, control power supply 103 output voltage, etc. However, the PWM signal will generate noise during switching, which is mainly caused by the fast switching of the switching device.
[0038] In the embodiments of the present application, the PWM synchronous capture unit of TMS320F28379D is used to trigger ADC sampling at the valley point of the PWM waveform, avoiding MOSFET switching transient interference, and synchronously collecting the PWM carrier signal. Within one period of the PWM signal, the waveform of its carrier signal is accurately collected. By this method, the switching time, duty cycle and waveform characteristics of the PWM signal can be accurately obtained. These information can be used for analysis and elimination of switching noise. When the three-phase current signals are acquired by the LTS25-NP current sensor 102, the PWM carrier signal can be synchronously collected, so as to realize accurate monitoring and analysis of the switching noise. By analyzing the waveform characteristics of the PWM carrier signal, the causes and propagation paths of the switching noise can be determined. Further, corresponding measures can be taken to eliminate or reduce the noise, such as adjusting the PWM frequency, optimizing the dead time, increasing the filter, etc.
[0039] Step 302, the built-in PT100 temperature sensor is used to monitor the stator temperature in real time, and a compensation model is established to correct the stator resistance value in real time.
[0040] The compensation model can be expressed as: R_s= R_0[1+α(T-25)], α=0.00393 / ℃. Where R_s represents the compensated resistance value, which is the real-time value of the stator resistance after considering the temperature influence; R_0 represents the reference value of the stator resistance at 25℃, which is a known constant; T represents the stator temperature measured by the built-in PT100 temperature sensor 101 in real time, usually in ℃; α represents the temperature coefficient of resistance, which is used to describe the ratio of resistance value change with temperature. In this formula, the value of α is 0.00393 / ℃, which means that the resistance value will increase by 0.00393 times for every 1℃ increase in temperature.
[0041] The working principle of the formula R_s = R_0[1 + a(T - 25)] is: first, the stator temperature T is obtained in real time through the built-in PT100 temperature sensor 101; then, the resistance value R_s at the temperature T is calculated according to the temperature coefficient a of the resistance and the reference value R_0 of the stator resistance at 25 DEG C. This process realizes real-time compensation of the stator resistance with temperature change, thereby improving the accuracy and stability of the system.
[0042] In an alternative embodiment, Figure 4 A flowchart for compensating harmonics of a current signal is provided. As Figure 4 shown, compensating harmonics of a current signal to generate a compensated current signal includes: Step 401, the amplitude and phase of a predetermined number of harmonics are obtained from the current signal by using fast Fourier transform analysis method. The specific implementation is as follows: First, the harmonic model of the motor 122 is constructed by offline experimental analysis, which can be expressed in the form of Fourier series:
[0043] Among them, denotes the sum of harmonic components, is the amplitude of the n-th harmonic, is the phase of the n-th harmonic, which is determined by offline FFT analysis.
[0044] The harmonic model first receives the three-phase current signal (i_a, i_b, i_c) of the motor 122 as input, while considering the change of the stator resistance R_s and the influence of the specific harmonic order n. In the embodiment of the application, the harmonic order n is selected as the 6th order. The core of the harmonic model is to use the principle of Fourier series expansion to express the harmonic components in the three-phase current signal as a sum of a series of sinusoidal functions, each sinusoidal function corresponding to a specific harmonic order, amplitude and phase.
[0045] Through offline fast Fourier transform analysis, the amplitude and phase information of each harmonic component can be accurately obtained, which is the key input of the subsequent decoupling algorithm. After the harmonic model is constructed, the dynamic decoupling of the harmonic magnetic field can be realized in the control algorithm, effectively weakening the interference of the harmonic to the rotor position estimation, thereby improving the accuracy and robustness of the position sensorless control system.
[0046] Optionally, the FFT analysis implementation method is: First, 2048-point current signals under full load conditions are collected, and the Blackman-Harris window function is applied, specifically as follows: In the case of full load operation of the motor 122 or other equipment, the current signal is obtained using a data acquisition device. 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 function of the window function is to reduce the spectral leakage caused by signal truncation and improve the accuracy of spectral analysis. Blackman-Harris window is a commonly used window function, which has low sidelobes in the frequency domain, which helps to reduce the leakage effect.
[0047] Blackman-Harris, main lobe width 4.0Δf, sidelobe attenuation -92, suitable for steady-state harmonic parameter extraction (high-precision offline analysis), Blackman-Nuttall main lobe width, 3.8Δf, sidelobe attenuation -98, suitable for dynamic harmonic tracking (online real-time compensation), in the embodiment of the application, Blackman-Harris window function is selected for offline FFT analysis, mainly based on its spectral characteristics. The window function has low sidelobes in the frequency domain, which can effectively reduce spectral leakage and improve the accuracy of harmonic parameter extraction. Especially in high-precision offline analysis, Blackman-Harris window function can ensure accurate harmonic amplitude and phase information, providing strong support for subsequent control algorithm design.
[0048] Then, using the fixed-point fast Fourier transform (FFT) algorithm, the data obtained by the Blackman-Harris window function is processed in Q15 format, and the frequency resolution Δf=9.7656Hz is set, as follows: The FFT algorithm is used to analyze the spectrum of the current data processed by the window function. FFT algorithm is a method of calculating discrete Fourier transform (DFT) with high efficiency, especially suitable for large data sequences. In this process, fixed-point FFT algorithm is used. Fixed-point is a numerical representation method that uses a fixed number of bits to represent numbers, commonly used in embedded systems or hardware implementations to improve computational efficiency and reduce resource consumption.
[0049] In the embodiment of the application, 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 decimal part and 1 bit is used for the sign bit. This can achieve high computational accuracy on fixed-point processors.
[0050] After processing by the FFT algorithm, the frequency spectrum of the current signal can be obtained. The frequency resolution Δf refers to the minimum frequency interval that can be distinguished by the FFT algorithm, and the calculation formula is Δf = sampling frequency / data point number. In this example, if the sampling frequency is 20000 Hz, the frequency resolution is 9.7656 Hz. Therefore, the FFT algorithm can distinguish two frequency components with a frequency interval of 9.7656 Hz.
[0051] Finally, the 6th harmonic parameters are extracted as follows: The sliding window FFT algorithm is used to realize dynamic harmonic tracking, and the window length is set to 128 sampling points which is an integer multiple of the fundamental period. After Clarke transformation of the three-phase current signal collected by the ADC, the improved Goertzel algorithm is used to calculate the real part Re_6 and the imaginary part Im_6 of the 6th harmonic component: Re_6 = ∑_{k=0}^{N-1} i_α[k]·cos(12πk / N) + i_β[k]·sin(12πk / N) Im_6 = ∑_{k=0}^{N-1} i_β[k]·cos(12πk / N) - i_α[k]·sin(12πk / N) Where i_α[k] and i_β[k] are the current values of the kth sampling point in the sliding window; N = 128 is the calculation window length, and the Blackman-Nuttall window is used to reduce spectral leakage and improve calculation accuracy; k represents the index of the sampling point, and in the sliding window FFT algorithm, the window length is set to 128 sampling points which is an integer multiple of the fundamental period, so 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 transformation, 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 in the calculation process to obtain the current data in the entire window, so as to calculate the harmonic component.
[0052] After obtaining the real part and the imaginary part, the amplitude K_6 and the phase φ_6 of the 6th harmonic can be calculated. In order to further improve the accuracy, a temperature-based amplitude correction model and a switch delay-based phase compensation model are introduced in the embodiments of the present application: K_6 = (√(Re_6² + Im_6²) / N) × (1 + 0.002×(T-25)) × K_cal φ_6= arctan2(Im_6, Re_6) - π / 6 - Δφ_comp In the formula, N is a normalization factor; T is the real-time temperature value; K_cal=0.98 is the factory calibration coefficient; arctan2 is an inverse tangent function used to calculate the inverse tangent value of the ratio of two numbers and can determine the quadrant of the result according to the signs of the two numbers; Δφ_comp=2πf_sw×t_delay is the phase delay compensation introduced by the switching frequency, where f_sw=20 kHz is the PWM switching frequency and t_delay=1.2 μs is the signal transmission delay. In terms of parameter updating, this process is triggered synchronously by the EPWM module of the DSP to ensure strict timing alignment with current sampling, and the update period can be set to 5 ms.
[0053] Step 402, based on the amplitude and phase, a predetermined number of harmonics are filtered from the current signal through a preset adaptive notch filter to generate a compensated current signal. The specific implementation is as follows: Based on the amplitude K_6 and phase φ_6 of the 6th harmonic obtained in step 401, a harmonic compensator is designed. Through this compensator design process, the final result is the parameters used to reduce or compensate the error caused by harmonics, which are specifically embodied in the configuration of the adaptive notch filter to ensure effective extraction of the 6th harmonic and error reduction.
[0054] In terms of harmonic compensator design, a second-order IIR (infinite impulse response) adaptive notch filter is used, and the transfer function is:
[0055] Where: : represents a discrete-time operator that delays one sampling period, i.e. .
[0056] : represents the harmonic angular frequency, which is the angular frequency of the specific frequency that the harmonic compensator needs to compensate.
[0057] T: represents the sampling period, which is the time interval between adjacent two sampling points in a discrete-time system.
[0058] : represents the parameter of the suppression bandwidth, which is used to control the bandwidth of the filter. The closer to 1, the narrower the bandwidth. Optionally , which means that the filter has a certain bandwidth to suppress noise or interference near the harmonic frequency.
[0059] The entire transfer function H(z) represents an adaptive notch filter used to compensate for harmonics of a specific frequency. By adjusting the values of and , the frequency response and bandwidth of the filter can be changed to adapt to different harmonic compensation needs.
[0060] The adaptive notch filter can dynamically adjust its notch characteristics according to the changes in the harmonic angular frequency. This design ensures that the 6th harmonic parameter can be effectively extracted even when the motor 122 operating state fluctuates, improving the accuracy and stability of parameter extraction. Through the harmonic compensator, the error caused by harmonics can be further reduced, providing more accurate data basis for the subsequent dynamic subspace prediction module.
[0061] Optionally, the adaptive notch filter implementation method is: (1) Convert the transfer function into a difference equation, implemented on the DSP:
[0062] In the formula, k is the discrete time index, which helps to describe the dynamic behavior of the system in the discrete time domain. In a discrete-time system, the values of signals or sequences are 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, x(k) represents the system input at discrete time k. y(k-1) and y(k-2) represent the system output at discrete time k-1 and k-2, respectively, and x(k-1) and x(k-2) represent the system input at discrete time k-1 and k-2, respectively.
[0063] (2) Establish a tracking mechanism, is the fundamental frequency, and Δ is the deviation, which can be estimated online by a sliding mode observer with an update period of 5ms.
[0064] The method of implementing the adaptive notch filter includes digital filter discretization and dynamic frequency update. Digital filter discretization refers to converting the transfer function into a difference equation, and dynamic frequency update refers to establishing a tracking mechanism to dynamically adjust the harmonic angular frequency ω0 to adapt to changes in the motor 122 operating state. In this process, Δ represents a small deviation in frequency, which is estimated by a sliding mode observer and used to update This dynamic frequency tracking ensures that the filter can accurately suppress the 6th harmonic component, even during the speed change of the motor 122.
[0065] The embodiments of the present application detect the harmonic components in the power system in real time, and use the adaptive notch filter to accurately compensate for them, effectively reducing the impact of harmonics on the system and improving the stability and reliability of the power system.
[0066] In an optional embodiment, the Kalman filter employs the Sage-Husa adaptive algorithm to adjust the covariance matrix online. In the embodiments of the present application, the compensated current signal and the speed information of the motor 122 are input into the Kalman filter to generate the first rotor position estimation value, and the specific implementation manner is as follows: Constructing the Kalman filter: State equation:
[0067] Observation equation:
[0068] wherein, , , is a sampling period.
[0069] Matrix B: represents the influence of control input u k on state x k+1 . In a control system, the B matrix is usually used to describe how to convert the control input into the change of state.
[0070] Vector u k : control input, which can be any external signal or action that affects the state of the system.
[0071] Vector w k : process noise, representing the uncertainty or error introduced in the state transition process.
[0072] Matrix C: represents the visibility or influence of state x k on observation output y k . In the observation process, the C matrix defines how to obtain the observation value from the system state.
[0073] Vector y k : observation output, which is a certain measurement or representation of the state of the system.
[0074] Vector v k : observation noise, representing the uncertainty or error introduced in the observation process.
[0075] is the system state, wherein θ and ω are state variables, respectively representing different characteristics of the system.
[0076] Matrix : state transition matrix, describing how the system state x k transitions to x k+1 without control input and noise. Wherein, T s is a sampling period, representing the time interval of system state update.
[0077] In the embodiments of the present application, the current signal (i'_α, i'_β) after harmonic compensation and the control voltage (u_α, u_β) are input into the Kalman filter. The Kalman filter continuously updates the state estimation value and its uncertainty through a recursive algorithm, effectively suppressing the influence of observation noise and process noise. The state transition matrix A and the observation matrix C are designed according to the dynamic model of the motor 122. The control input matrix B takes into account the influence of current on rotor acceleration. By adjusting the Kalman gain, the optimal fusion of observed data and predicted data is achieved, further improving the accuracy and robustness of position estimation.
[0078] Modeling the state space: Extended state variable , where θ is the rotor position, ω is the electrical angular velocity, and ε is the harmonic torque disturbance; Improved state matrix: ; The key difference from the traditional Kalman filter is that the Kalman filter in this embodiment uses the Sage-Husa adaptive algorithm to adjust its process noise covariance matrix Q online. In the standard Kalman filter, the Q matrix is usually pre-set according to experience and remains unchanged. However, when there are uncertainties or unmodeled dynamics in the motor model (e.g., flux saturation, load torque fluctuations), a fixed Q matrix will cause the filter performance to decline or even diverge. The Sage-Husa algorithm uses the "innovation" sequence (i.e., the difference between the measured value and the predicted value) to assess the accuracy of the current model prediction in real time and adjust the Q matrix accordingly.
[0079] Specifically, the covariance matrix is updated online: , R = 0.01 is updated by the Sage-Husa adaptive algorithm.
[0080] Sage-Husa adaptive algorithm implementation parameters:
[0081] Initial covariance ; The Sage-Husa algorithm is used to update the covariance matrix Q online. The Sage-Husa algorithm updates Q by combining the current estimation error and the previous covariance matrix. In the update formula, β is the forgetting factor, usually taking a value between 0 and 1, used to control the weight of new and old information. Optionally, β is set to 0.95. k K k is the Kalman gain matrix, and ε
[0082] In each iteration, the current covariance matrix Qk and observation noise covariance R to get new state estimation and estimation error ε k . Then, update the covariance matrix Q k+1 for use in the next iteration. In this way, when the model prediction error increases (ε k becomes larger), the elements of the Q matrix will also increase accordingly, indicating that the current model prediction is not accurate enough, thereby increasing the weight of the new measurement value, so that the filter can track the true state of the system more quickly, and better adapt to changes in the actual observation data, which significantly enhances the estimation accuracy and robustness of the Kalman filter under dynamic conditions.
[0083] Finally, the improved Kalman filter in the embodiments of the present application outputs a first rotor position estimation value and a rotor speed estimation value . This signal is smooth and has little noise, and is very accurate under steady or slowly changing conditions.
[0084] In an optional embodiment, Figure 5 a flowchart for rotor position estimation based on a long short-term memory network is provided. As Figure 5 shown, the compensated current signal and the rotor speed information of the motor 122 are input into the pre-trained long short-term memory network to predict and output a second rotor position estimation value, including: Step 501, training the long short-term memory network using historical current signals and historical rotor speed information.
[0085] The LSTM network in the embodiments of the present application is a deep network structure containing 3 hidden layers, each hidden layer having 64 neuron nodes. The input of the LSTM network is a time series matrix, for example, containing the compensated current signal and the rotor speed information of the past 5 sampling times. The output of the LSTM network is the rotor position estimation value at the next time.
[0086] In the embodiments of the present application, historical current signals and historical rotor speed information are used to make a training data set to strictly offline train the LSTM network. The training data set covers various operating states of the motor 122, for example, the training data set includes: 40% of steady-state operating data, which includes constant speed (fluctuation range within ±2%) and constant torque (fluctuation range within ±5%) scenarios, which represent the stable state of the system during normal operation, and can enable the model to learn the baseline behavior of the system; 30% of the load mutation data, containing step change (5-100% rated torque rapid change) scenarios, which simulate the system's response when the load suddenly increases or decreases, helping the model learn the dynamic characteristics of the system; 20% of the speed step data, containing ramp change (change range 100-3000 rpm / s) scenarios, which represent the behavior of the system when the speed is rapidly adjusted, helping the model learn the impact of speed change on the system state; 10% of the fault simulation data, containing abnormal state scenarios such as open-phase and overcurrent, which simulate the behavior of the system when a fault occurs, helping the model learn the fault characteristics and improve the fault detection ability of the model.
[0087] This data set covering a variety of operating scenarios ensures that the LSTM network can learn the complex dynamic behavior of the motor 122 in various situations, especially the nonlinear behavior that is difficult to accurately describe with mathematical models, enabling the model to learn the overall characteristics of the system.
[0088] The loss function during training is:
[0089] Where the first term is the mean square error of the rotor position, and the second term is the weight regularization term ( , regularization coefficient), used to prevent overfitting, by penalizing the network weights, to maintain a certain generalization ability.
[0090] The LSTM network is used to capture the dynamic changes in the position angle of the motor 122 at consecutive 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 the motor 122.
[0091] The LSTM network is trained on the training data set to learn the relationship between the current signal, speed information, and rotor position. The output of the rotor position estimate is crucial for real-time control of the motor 122, as it provides an accurate estimate of the future position of the motor 122, allowing for early adjustment of control strategies and improving control stability and response speed.
[0092] Step 502, quantize the trained long short-term memory network to obtain a target long short-term memory network.
[0093] In order to deploy the trained LSTM model to a resource-limited embedded DSP, model quantization is required in the embodiments of the present application. Optionally, 8-bit fixed-point quantization is performed using the TensorFlow Lite tool chain to reduce storage and computing resource consumption. However, fixed-point quantization will cause accuracy loss. In order to compensate for the accuracy loss caused by quantization, a "dynamic range scaling + calibration layer" scheme is used for compensation. Specifically as follows: First, the weight matrix W is asymmetrically quantized: ; wherein, and 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 errors.
[0094] Second, the calibration layer is inserted to compensate for the activation function error: ; wherein, is the output of the calibration layer, is the quantized activation value. This calibration method adjusts the range and shape of the activation value, which helps to reduce the impact of quantization on model performance.
[0095] This "dynamic range scaling + calibration layer" scheme ensures that the quantized model significantly reduces storage and computing requirements while minimizing performance loss.
[0096] With reasonable training data distribution and quantization error compensation algorithm, the LSTM network can still maintain high prediction accuracy and robustness after quantization.
[0097] Step 503, input the compensated current signal and the speed information of the motor into the target long short-term memory network to predict the output of the second rotor position estimation value.
[0098] Finally output a second rotor position estimation value This signal is characterized by fast dynamic response and is not sensitive to model parameters, and is particularly good at predicting dynamic processes.
[0099] In an optional embodiment, the first rotor position estimation value and the second rotor position estimation value are weighted and fused to obtain a rotor position final prediction value, including: According to the weight coefficient calculated according to the subspace corresponding to the current running data of the motor 122; the subspace is obtained according to the historical running data of the motor 122; According to the weight coefficient, the first rotor position estimation value and the second rotor position estimation value are weighted and fused to obtain a rotor position final prediction value.
[0100] 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.
[0101] 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.
[0102] 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).
[0103] 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.
[0104] After the subspaces are divided, it is determined which subspace the current running data falls into, and a weight coefficient is calculated according to the subspace. Finally, the first rotor position estimation value and the second rotor position estimation value are weighted and fused according to the weight coefficient to obtain a final rotor position prediction value.
[0105] In the embodiments of the present application, a dynamic weight distribution is performed between the prediction result of the Kalman filter and the prediction result of the LSTM prediction model to improve the stability and accuracy of the prediction. The value of the weight coefficient determines the degree of trust of the final output in the first rotor position estimation value and the second rotor position estimation value . Close to 1, indicating that the system trusts the result of the Kalman filter more; Close to 0, indicating that the system trusts the result of the LSTM network more.
[0106] In an optional embodiment, the weight coefficient is calculated according to the subspace corresponding to the current running data of the motor 122, comprising: determining the subspace adjacent to the current running data; using a bilinear interpolation method to perform interpolation calculation based on the distance between the current running data and the center points of the adjacent subspaces to obtain the weight coefficient.
[0107] In the embodiments of the present application, the calculation of the weight coefficient may be based on the "membership degree" of the current working point in the subspace grid. An effective method is to use bilinear interpolation. Assuming that the current working point falls into the area surrounded by four subspace center points , , and , the weight coefficient may be calculated by interpolation according to the relative distance between the four center points.
[0108] Another optional implementation is to use a sigmoid function related to the running state of the motor 122:
[0109] wherein is a speed threshold, k is a smoothing coefficient. The formula indicates that at low speed ( ), is larger, and the system is biased towards the Kalman filter; at high speed and in dynamic state ( ), The system is biased towards the LSTM network by introducing a smoothing coefficient k and a speed threshold to make the weight distribution smoother and avoid sudden changes in the prediction results. Optionally, the rate of change of speed and torque can also be considered simultaneously.
[0110] The weight coefficient is obtained and the second rotor position estimate is weighted and summed:
[0111] wherein is the final rotor position estimate, which integrates the high accuracy of the Kalman filter in the steady state and the fast response of the LSTM network in the dynamic state, thus exhibiting optimal performance in the full operating range.
[0112] The application embodiments innovatively integrate the weight adaptive allocation mechanism of the Kalman filter and the LSTM network, and construct a hybrid prediction architecture. The Kalman filter is good at processing state estimation and prediction of linear systems, while the LSTM network has strong nonlinear modeling capability. By adaptively allocating the weights of the two, the advantages of the two can be fully utilized to realize accurate prediction and fault warning of the power system state, and improve the safety and operating efficiency of the power system.
[0113] In an optional embodiment, the motor 122 is controlled based on the final rotor position prediction value, including: generating a control signal based on the final rotor position prediction value and the speed estimate value; controlling the motor 122 according to the control signal.
[0114] In the application embodiments, the final rotor position prediction value and the speed estimate value are sent to the main controller, replacing the signals of the physical encoder. The main controller executes its control algorithm (e.g., PI regulation, Park transformation, and inverse Park transformation) based on the two estimated values and external speed or torque instructions, calculates the required control voltage u_d, u_q, and generates a PWM signal through a space vector pulse width modulation (SVPWM) unit to drive the inverter 121, thus forming accurate closed-loop control of the motor 122.
[0115] In the application embodiments, the specific implementation of the motor position sensorless control method is running on a real-time operating system (such as TI-RTOS) and is divided into tasks with different priorities to ensure real-time performance: Highest priority: Pulse Width Modulation (PWM) interrupt service routine (e.g., every 100 μs, i.e., 10 kHz), responsible for updating PWM duty cycles.
[0116] Second highest priority: Kalman filter task (e.g., every 200 μs, i.e., 5 kHz), performing harmonic decoupling and Kalman filter-based model estimation.
[0117] Medium priority: LSTM inference task (e.g., every 1 ms, i.e., 1 kHz), performing data-driven prediction based on LSTM prediction model.
[0118] Lower priority: Parameter learning and update task (e.g., every 10 ms, i.e., 100 Hz), responsible for updating subspace database, etc.
[0119] Lowest priority: System monitoring and fault diagnosis task (e.g., every 100 ms, i.e., 10 Hz).
[0120] By reasonably configuring task priorities and interrupt frequencies, efficient operation of each task in the real-time operating system is ensured, while conflicts and delays between tasks are avoided, thereby improving the real-time performance and stability of the system. The task division is clear, and each task works collaboratively, effectively improving the overall performance of the system.
[0121] Exemplarily, in a typical control cycle, the process is as follows: (1) ADC triggers, collects three-phase current signals and stator temperature.
[0122] (2) Perform parameter compensation, harmonic identification and compensation tasks, generate harmonic-compensated current signals (i'_α, i'_β).
[0123] (3) Run Kalman filter, update its state, output and .
[0124] (4) Run LSTM inference task based on LSTM prediction model, based on the latest data sequence (current signal and motor 122 speed information), output .
[0125] (5) Determine the current subspace according to the current speed and torque .
[0126] (6) Calculate weight coefficient .
[0127] (7) Perform fusion calculation, get .
[0128] (8) The main controller uses and calculates a new control voltage.
[0129] (9) The SVPWM unit generates a new PWM waveform and loads it to the inverter 121 at the next PWM interrupt.
[0130] (10) The system waits for the next sampling period and executes the above steps in a loop.
[0131] Based on the above method, the following aspects are tested in the embodiments of the present application: The harmonic suppression effect on the current signal is tested, and the specific process is as follows: A certain amplitude (amplitude 5% fundamental) of 6th harmonic current is artificially injected in the motor control system, and the total harmonic distortion (THD) change is observed through the DPO7254 oscilloscope. Optionally, the THD value is calculated using the collected signal data. The THD calculation formula is usually: THD = (sum of squares of all harmonic effective values from 2nd to 6th harmonic / square of fundamental effective value) ^ 0.5 Wherein, the sum of squares of all harmonic effective values from 2nd to 6th harmonic is the sum of squares of all harmonic effective values from 2nd to 6th harmonic.
[0132] The improvement effect is calculated as follows: Before harmonic compensation, the initial value of THD is measured and recorded. Then, the THD value is measured again. By comparing the THD values before and after harmonic compensation, the improvement degree of harmonic compensation algorithm on harmonic distortion can be quantified. The improvement percentage is calculated as follows: Improvement percentage = (initial THD value - improved THD value) / initial THD value x 100% This percentage value can directly reflect the improvement effect of the harmonic compensation algorithm on the harmonic distortion problem.
[0133] By observing the THD change displayed on the oscilloscope, the weakening effect of the harmonic compensation algorithm on the harmonic component can be directly evaluated. If the THD is significantly reduced, it means that the harmonic compensation algorithm is effective and can significantly reduce the adverse effects of harmonics on the performance of the motor control system, and the effectiveness of the harmonic compensation algorithm can be evaluated.
[0134] The system dynamic response is tested, and the specific process is as follows: Under different load and speed conditions, the dynamic response speed of the motor control system is tested. By suddenly changing the load or speed, it is observed whether the motor control system can quickly adjust the control strategy to maintain stable operation of the motor. The system dynamic response test can verify the adaptability and robustness of the predictive control algorithm under complex working conditions.
[0135] Specifically: Adaptability evaluation: Adaptability refers to the ability of the motor control system to quickly and accurately adjust the control strategy in the face of load and speed changes to adapt to new working conditions. Through system dynamic response testing, the response time, overshoot, and oscillation times of the motor control system after a sudden change in load or speed can be observed. These indicators can directly reflect the strength of the adaptability of the control system. If the control system can quickly stabilize the motor 122 operation in a short time, and the overshoot and oscillation times are less, it indicates that the adaptability is good.
[0136] Robustness evaluation: Robustness refers to the ability of the motor control system to maintain stable operation in the face of various uncertainties and disturbances. In the system dynamic response test, various load and speed mutations can be simulated to test the robustness of the control system. If the control system can quickly adjust the strategy and maintain stable operation of the motor 122 under various mutation conditions, it indicates that the robustness is strong. Conversely, if the control system cannot maintain stable operation when facing some mutation conditions, or even leads to system collapse, it indicates that the robustness is weak.
[0137] The system dynamic response test example in the embodiments of the present application is as follows: The test scenario is: in a laboratory environment, set the motor control system to run under different load and speed conditions. For example, the initial condition is set to load 50% and speed 1500 RPM.
[0138] The test steps are: first, suddenly increase the load to 80%, record the response time, overshoot, and oscillation times of the motor control system. Then suddenly reduce the speed to 1000 RPM, record the response time, overshoot, and oscillation times of the motor control system. Repeat the above steps, but each time the load and speed amplitude is larger, for example, the load is increased from 50% to 90%, and the speed is reduced from 1500 RPM to 800 RPM.
[0139] Based on the above test scenario and test steps, data recording and analysis are carried out, including response time, overshoot, and oscillation times. Among them, the response time refers to the time required for the system to stabilize the motor 122 operation after a change in load or speed. The overshoot is the amount by which the maximum instantaneous speed of the motor 122 exceeds the set value before reaching a stable state. The oscillation times refer to the number of times the speed fluctuates beyond the set value before the motor 122 reaches a stable state.
[0140] Finally, adaptability evaluation and robustness evaluation are carried out: In terms of adaptability evaluation, if the motor control system can stabilize the motor 122 operation within 1 second after a sudden change in load and speed, the overshoot is less than 5%, and the oscillation times are not more than 3 times, it is considered that the adaptability is good. If the response time exceeds 3 seconds, the overshoot exceeds 10%, and the oscillation times exceed 5 times, it is considered that the adaptability is poor.
[0141] In terms of robustness evaluation, if the control system can stabilize the operation of the motor 122 within 2 seconds and the overshoot is less than 10% and the oscillation times are not more than 5 times under various load and speed mutation conditions, it is considered that the robustness is good. If the motor control system cannot operate stably under certain mutation conditions, for example, continuous oscillation or system collapse occurs, it is considered that the robustness is poor.
[0142] The accuracy of position estimation is verified, and the specific process is as follows: A high-precision encoder is used as a reference to compare the deviation between the final predicted value of the rotor position output by the system and the actual measured rotor position information of the encoder. By statistically analyzing the size and distribution of the deviation value, the accuracy of position estimation can be evaluated. The accuracy of position estimation is crucial for improving the control accuracy and stability of the motor control system.
[0143] The system energy efficiency is evaluated, and the specific process is as follows: Under different working conditions, the energy efficiency indicators of the motor control system, such as power factor and efficiency, are tested. By comparing and analyzing the energy efficiency changes before and after using the motor sensorless control method in the embodiments of the present application, the improvement effect of the predictive control algorithm on the system energy efficiency can be evaluated. A high-energy-efficiency motor control system not only reduces energy consumption but also reduces harmonic pollution and improves the overall performance of the system.
[0144] The system energy efficiency evaluation provided in the embodiments of the present application is as follows: First, set the motor control system to operate under different working conditions, including different loads and speeds; Then, before using the motor sensorless control method in the embodiments of the present application, record the input power, output power, current, and voltage data of the motor 122; Then, calculate and record the power factor and efficiency under these working conditions; Finally, apply the motor sensorless control method in the embodiments of the present application, and repeat the above steps.
[0145] After the above steps, by comparing the data before and after applying the predictive control algorithm, the changes in energy efficiency indicators are analyzed. The analysis is performed from three evaluation indicators: power factor (PF), efficiency (η), and harmonic pollution. Among them, the power factor (PF) is used to measure the efficiency of the motor 122 using electric energy; the efficiency (η) is the ratio of the output power of the motor 122 to the input power; and the harmonic pollution is evaluated by the total harmonic distortion (THD).
[0146] In terms of experimental result analysis: analyze the power factor and efficiency of motor 122 under different operating conditions without using the predictive control algorithm; analyze the power factor and efficiency of motor 122 under the same operating conditions after using the predictive control algorithm; analyze the reduction of harmonic pollution.
[0147] According to the analysis conclusion, the predictive control algorithm significantly improves the power factor and efficiency of the motor control system. The reduction of harmonic pollution indicates that the motor 122 operates more smoothly and reduces the interference to the power grid.
[0148] Through the above tests, the motor position sensorless control method in the embodiments of the present application effectively improves the overall performance and energy efficiency of the system, and has practical application value.
[0149] To verify the prediction accuracy, the specific process is as follows: A 23-bit photoelectric encoder (RCN-723) is used as a reference to calculate the root mean square error (RMSE):
[0150] wherein, is the actual position; is the predicted position.
[0151] RCN-723 encoder calibration: Traceability certificate: China Institute of Metrology (NIM) No. GBW-2023-08756.
[0152] Calibration method: 24-point circumferential calibration by laser interferometer (Agilent 5530) in a constant temperature (23±0.1℃) environment.
[0153] Uncertainty: 0.0003 rad (k=2).
[0154] Using a high-precision photoelectric encoder as a reference benchmark for the actual position, the root mean square error between the predicted position and the actual position can be calculated to quantitatively evaluate the pros and cons of the prediction accuracy. Prediction accuracy is one of the important indicators to measure the performance of the control system. High prediction accuracy means that the system can more accurately predict the future state of the motor 122, thereby providing more accurate control instructions and improving the control performance and stability of the system. The experimental results show that the control system of the embodiments of the present application can achieve high prediction accuracy under different operating conditions, ensuring the accuracy and stability of the control.
[0155] Through the above verification method, the performance of the system can be comprehensively evaluated. The experimental results show that the system exhibits good dynamic response speed, position estimation accuracy and energy efficiency indicators under different operating conditions, verifying the effectiveness and practicality of the predictive control algorithm.
[0156] The method in the embodiments of the present application has been verified through a 500W permanent magnet synchronous motor platform, and at a rated speed of 2500rpm, torque ripple is reduced by 62% and position tracking delay is less than 50μs. It is required to ensure that the FLASH storage space of the DSP is greater than or equal to 512KB and the RAM is greater than or equal to 256KB to meet the LSTM model storage requirement.
[0157] Based on the same principle as the method provided in the embodiments of the present application, the embodiments of the present application also provide a motor position sensorless control device, as shown in Figure 6 The device comprises: a harmonic compensation module 601, configured to collect a current signal of the motor 122, and compensate harmonics of the current signal to generate a compensated current signal; a Kalman filter fusion module 602, configured to input the compensated current signal and speed information of the motor 122 into a Kalman filter to generate a first rotor position estimation value; an LSTM network prediction module 603, configured to input the compensated current signal and speed information of the motor 122 into a pre-trained long short-term memory network to predict a second rotor position estimation value; a dynamic weight hybrid prediction module 604, configured to perform weighted fusion on the first rotor position estimation value and the second rotor position estimation value to obtain a final rotor position prediction value.
[0158] a control module 605, configured to control the motor 122 based on the final rotor position prediction value.
[0159] In the embodiments of the present application, the current signal of the motor 122 is collected, and the harmonics of the current signal are compensated to generate a compensated current signal, which can identify and compensate the pollution of the inherent spatial harmonic magnetic field inside the motor 122 to the current signal, and provide a more accurate data basis for subsequent processing. The compensated current signal and the speed information of the motor 122 are respectively input into a Kalman filter and a long short-term memory network, wherein the Kalman filter has certain advantages in smoothing noise and predicting linear trends, and can output a smooth first rotor position estimation value with small noise; the long short-term memory network has advantages in processing nonlinear and time series data, and can output a second rotor position estimation value with fast dynamic response. Finally, the first rotor position estimation value and the second rotor position estimation value are weighted and fused to obtain a final rotor position prediction value, which combines the advantages of the LSTM network and the Kalman filter, and can quickly and accurately predict the rotor position under non-ideal actual working conditions such as harmonic interference, parameter drift and severe dynamic change without a sensor, thereby improving the accuracy of the motor 122 control.
[0160] The motor position sensorless control device provided in the embodiments of the present application can achieve Figures 1 to 5The various processes implemented in the illustrated method embodiments are not repeated here to avoid redundancy.
[0161] The motor position sensorless control device of the embodiments of the present application can execute the motor position sensorless control method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module and unit in the motor position sensorless control device in each embodiment of the present application correspond to the steps in the motor position sensorless control method in each embodiment of the present application. For detailed descriptions of the functions of each module of the motor position sensorless control device, please refer to the descriptions of the corresponding motor position sensorless control method shown in the foregoing.
[0162] Please refer to Figure 7 , which shows a structural schematic diagram of a computing device provided by the embodiments of the present application. In some examples, the computing device 70 can be at least one of a smart phone, a smart watch, a desktop computer, a laptop computer, a virtual reality terminal, an augmented reality terminal, a wireless terminal, and a laptop computer. The computing device 70 has a communication function and can access a wired network or a wireless network. The computing device 70 can generally refer to one of a plurality of terminals, and those skilled in the art can know that the number of terminals can be more or less. In some examples, the computing device 70 can receive a current signal based on the accessed wired network or wireless network. It can be understood that the computing device 70 undertakes the calculation and processing work of the technical solutions of the present application, which are not limited by the present application.
[0163] As Figure 7 shown, the computing device in the present application can include one or more of the following components: a processor 710 and a memory 720.
[0164] Optionally, the processor 710 utilizes various interfaces and lines to connect various parts within the entire computing device, to perform various functions of the computing device and process data by running or executing instructions, programs, code sets or instruction sets stored in the memory 720, and calling data stored in the memory 720. Optionally, the processor 710 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 710 can be integrated with one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a neural-network processing unit (NPU), and a baseband chip. Among them, the CPU is mainly used to process operating systems, user interfaces, and application programs; the GPU is used to render and draw the content to be displayed on the touch display screen; the NPU is used to implement artificial intelligence (AI) functions; and the baseband chip is used to process wireless communication. It can be understood that the above baseband chip can also not be integrated into the processor 710, but be implemented by a separate chip.
[0165] The memory 720 can include a random access memory (RAM) and can also include a read-only memory (ROM). Optionally, the memory 720 includes a non-transitory computer-readable storage medium. The memory 720 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 720 can include a program storage area and a data storage area, wherein the program storage area can store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above various method embodiments, etc.; and the data storage area can store data created according to the use of the computing device, etc.
[0166] In addition, those skilled in the art can understand that the structure of the computing device shown in the above-mentioned drawings does not constitute a limitation on the computing device, and the computing device can include more or fewer components than the diagram, or combine certain components, or different component arrangements. For example, the computing device also includes a display screen, a camera assembly, a microphone, a speaker, a radio frequency circuit, an input unit, a sensor (such as an acceleration sensor, an angular velocity sensor, a light sensor, etc.), an audio circuit, a WiFi module, a power supply, a Bluetooth module, and the like, which will not be described here.
[0167] The application also provides a computer readable storage medium, which stores at least one instruction for being executed by a processor to implement the motor position sensorless control method according to the above various embodiments.
[0168] The application also provides a computer program product, which includes 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 the processor executes the computer instructions to enable the computing device to implement the motor position sensorless control method according to the above various embodiments.
[0169] Those skilled in the art should realize that in the above one or more examples, the functions described in the application can be implemented by hardware, software, firmware or any combination thereof. When implemented by software, the functions can be stored in a computer readable medium or transmitted as one or more instructions or codes on a computer readable medium. The computer readable medium includes computer storage medium and communication medium, wherein the communication medium includes any medium that facilitates the transfer of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0170] It should be noted that the technical solutions described in the application can be combined arbitrarily without conflict.
[0171] The above is merely a specific implementation of the application, but the protection scope of the application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the application, which should be covered within the protection scope of the application.
Claims
1. A sensorless control method for a motor, characterized in that, The method includes: The motor current signal is acquired, and the harmonics of the current signal are compensated to generate a compensated current signal. The compensated current signal and the motor speed information are input into a Kalman filter to generate a first rotor position estimate. The compensated current signal and the motor speed information are input into a pre-trained long short-term memory network to predict and output a second rotor position estimate. The first rotor position estimate and the second rotor position estimate are weighted and fused to obtain the final predicted rotor position. The motor is controlled based on the final predicted value of the rotor position.
2. The sensorless motor control method according to claim 1, characterized in that, The step of compensating for the harmonics of the current signal to generate a compensated current signal includes: The amplitude and phase of the predetermined harmonics are obtained from the current signal using the Fast Fourier Transform analysis method. Based on the amplitude and phase, the predetermined harmonics are filtered out from the current signal by a preset adaptive notch filter to generate the compensated current signal.
3. The sensorless motor control method according to claim 1, characterized in that, The Kalman filter employs the Sage-Husa adaptive algorithm to adjust the covariance matrix online.
4. The sensorless motor control method according to claim 1, characterized in that, The step of inputting the compensated current signal and the motor speed information into a pre-trained long short-term memory network to predict and output a second rotor position estimate includes: A long short-term memory network was trained using historical current signals and historical rotational speed information. The trained long short-term memory network is quantified to obtain the target long short-term memory network; The compensated current signal and the motor speed information are input into the target long short-term memory network to predict and output the second rotor position estimate.
5. The sensorless motor control method according to claim 1, characterized in that, The weighted fusion of the first rotor position estimate and the second rotor position estimate to obtain the final predicted rotor position includes: The weighting coefficients are calculated based on the subspace corresponding to the current operating data of the motor; the subspace is obtained by dividing the motor based on its historical operating data. 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 value of the rotor position.
6. The sensorless motor control method according to claim 5, characterized in that, The weighting coefficients calculated based on the subspace corresponding to the current operating data of the motor include: Determine the subspace adjacent to the currently running data; 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.
7. The sensorless motor control method according to claim 5 or 6, characterized in that, The historical operating data includes speed and torque; the subspace is obtained by dividing the two-dimensional feature space formed by the speed and torque dimensions in the historical operating data using a clustering analysis method.
8. A sensorless motor control device, characterized in that, The device includes: The harmonic compensation module is used to acquire the current signal of the motor, compensate for the harmonics of the current signal, and generate a compensated current signal. The Kalman filter fusion module is used to input the compensated current signal and the motor speed information into the Kalman filter to generate a first rotor position estimate. The LSTM network prediction module is used to input the compensated current signal and the motor speed information into a pre-trained long short-term memory network and predict and output a second rotor position estimate. 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. The control module is used to control the motor based on the final predicted value of the rotor position.
9. A computing device, characterized in that, It includes a processor and a memory, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, which is executed by a processor to implement the method as described in 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
Electric aircraft permanent magnet synchronous motor current sensor failure control method and system based on LSTM network
CN120301277A