Planetary reduction motor pid parameter adaptive setting method based on power fluctuation transient identification

By performing high sampling rate processing and improved Hilbert transform on the power supply bus voltage of the planetary geared motor, a phase change rate data stream is constructed. Combined with current response initial edge verification, early identification and accurate response to high-frequency small-amplitude transient disturbances are achieved. This solves the problems of PID parameter tuning delay and misjudgment in the existing technology, and improves the dynamic response and stability of the motor.

CN123074342APending Publication Date: 2026-11-10SHEN ZHEN SHI DAKE MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611384707.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-08
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing technologies struggle to identify power supply disturbances early and accurately when faced with high-frequency, small-amplitude transient disturbances, leading to delays and misjudgments in PID parameter tuning, which affects the dynamic response and stability of planetary geared motors.

Method used

By acquiring the power supply bus voltage of the planetary geared motor in real time with a high sampling rate, extracting the high-frequency ripple signal using a bandpass filter, performing improved Hilbert transform processing, demodulating to generate a continuous phase time series, constructing a phase change rate data stream, and using a dynamic sliding window for local normalization modeling, combined with current response initial edge verification, constructing a disturbance feature fingerprint, and realizing adaptive tuning of PID parameters.

Benefits of technology

It significantly improves the sensitivity and timeliness of disturbance detection, shortens response delay, enhances the reliability and adaptability of PID parameter tuning, ensures the dynamic following capability and anti-interference performance of the servo system, and is suitable for demanding application scenarios such as precision CNC machine tools and robot joint drives.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123074342A_ABST
    Figure CN123074342A_ABST
Patent Text Reader

Abstract

This invention relates to an adaptive PID parameter tuning method for planetary geared motors based on transient power fluctuation identification. The method acquires bus voltage in real time at a high sampling rate, extracts and demodulates the phase change characteristics of high-frequency ripple signals using digital bandpass filtering and Hilbert transform, and accurately identifies electrical disturbance events by combining dynamic sliding window analysis. A real disturbance trigger signal is generated through timing alignment and current response verification, and three-dimensional features of voltage, current, and angular velocity are fused in real time after the disturbance occurs to form a disturbance feature fingerprint. Subsequently, clustering matching is used to determine the disturbance type and generate corresponding PID parameter update instructions, realizing staged adaptive parameter injection and stability determination, ensuring the control system's efficient response to multi-source disturbances. This technology can improve the anti-disturbance capability and parameter self-adjustment accuracy of the motor control system, effectively ensuring the dynamic stability and energy efficiency of drive operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of electrical control and intelligent manufacturing automation technology, and in particular to an adaptive tuning method for PID parameters of planetary geared motors based on transient power fluctuation identification. Background Technology

[0002] Currently, planetary geared motors are widely used in intelligent manufacturing, automated equipment, and precision drives, where their operational stability and dynamic response capabilities have a crucial impact under extreme operating conditions. To overcome problems such as poor power grid quality, frequent power disturbances, and random changes in system load in industrial environments, mainstream technologies generally employ adaptive tuning methods based on PID (proportional-integral-derivative) parameters, combined with disturbance detection to achieve dynamic optimization of the motor controller. However, in existing adaptive PID tuning systems, disturbance detection and tuning triggering mechanisms are mostly based on fixed threshold judgments of voltage and current amplitudes, or utilize model prediction, neural network algorithms, and other algorithms to infer system disturbance trends and update tuning parameters online.

[0003] Current typical technical solutions mainly focus on the following dimensions: First, identifying grid disturbances or sudden load changes when the instantaneous amplitude of the bus voltage or current signal exceeds a set threshold, thereby initiating the adaptive PID parameter tuning process; second, employing Model Reference Adaptive (MRAC) or system identification methods based on recursive least squares to model the dynamic response data of the motor after the disturbance occurs online, and then adjusting the PID parameters; third, combining intelligent algorithms such as neural networks and fuzzy inference to train historical operating data into predictive models, and optimizing PID parameter switching through data classification or trend prediction. These solutions have achieved positive progress in control accuracy, fault tolerance, and a certain degree of robustness, and have been practically applied in some fields such as variable frequency speed control and servo drives.

[0004] Representative methods include amplitude comparison disturbance detection modules integrated into various industrial frequency converters, which can issue parameter adjustment commands after the amplitude crosses a threshold for significant grid fluctuations in high-voltage or high-power equipment. Based on sparse signal decomposition and harmonic analysis, some adaptive control devices can detect harmonic abrupt changes in voltage and current as disturbance sources. Optimized model identification rules are suitable for environments with weak system nonlinearity and time-varying parameters, and can improve the convergence speed of adaptive parameters in some scenarios. However, since the above methods mostly focus on abnormal fluctuations at the amplitude level or rely on large time-window data modeling, their sensitivity to high-frequency micro-amplitude disturbances and their extreme optimization effects on response speed are limited.

[0005] Existing technologies suffer from the following prominent problems: First, disturbance detection based on amplitude thresholds such as voltage and current inherently suffers from detection lag. When power supply disturbances occur in the form of high-frequency micro-amplitude disturbances or abrupt changes in phase structure, amplitude changes may be masked by noise or lag behind the actual disturbance source, leading to setting trigger delays and compromising system control performance during rapid disturbance propagation. Second, methods such as model identification and neural networks, which rely on long-time-window data statistics or training, have high requirements for real-time performance and actual execution resources. When faced with transient disturbances with an impact time of only milliseconds, they often cannot make effective adjustments in time, or even miss the golden setting opportunity. Third, amplitude-based and model-based methods often struggle to distinguish control requirements caused by different disturbance sources, posing a risk of false setting or parameter mismatch, which can easily lead to secondary impacts on the controlled object, increased overshoot, or deterioration of system stability. Furthermore, traditional methods only understand the physical nature of disturbances at the level of energy changes, neglecting the early impact of abrupt changes in the phase structure of power supply fluctuations on the motor control system, resulting in limited dynamic response optimization capabilities.

[0006] To address the aforementioned industry pain points, existing technologies urgently need a technical approach that can identify power supply disturbances earlier and more accurately, and achieve high-confidence, adaptively triggered PID parameter tuning. This is particularly crucial in high-frequency, small-amplitude transient disturbances and complex power grid environments, where it is essential to overcome tuning trigger delays and misjudgments, and improve the dynamic response performance and stability of motors in the early stages of disturbances. Driven by this technological need, an innovative transient-triggered PID tuning mechanism based on the phase jump characteristics of power supply ripple is proposed. This mechanism elevates the power supply disturbance from amplitude change to phase structure disruption, significantly enhancing the sensitivity and robustness of disturbance identification, and substantially shortening the response delay of the adaptive control strategy. This meets the urgent requirements of high-end manufacturing equipment and intelligent drive control scenarios for extreme dynamic performance and stability. Summary of the Invention

[0007] This application provides an adaptive tuning method for PID parameters of a planetary geared motor based on transient power fluctuation identification, aiming to solve one of the problems or issues of the prior art mentioned in the background.

[0008] The adaptive tuning method for PID parameters of a planetary geared motor based on transient power fluctuation identification provided in this application specifically includes: S1: The voltage of the power supply bus of the planetary gear motor is acquired in real time with a high sampling rate, and the inherent power ripple component in the preset frequency band is extracted through a bandpass filter to obtain a high-frequency ripple signal sequence. S2: Based on the high-frequency ripple signal sequence, perform improved Hilbert transform processing, demodulate to generate a continuous phase time series, and calculate the cumulative phase difference offset between adjacent sampling points to construct a phase change rate data stream; S3: Use a dynamic sliding window to perform local normalization modeling on the phase change rate data stream. If the preset phase jump judgment condition is met, generate a phase jump event identifier. S4: Perform timing alignment verification between the phase jump event identifier and the initial edge of the motor current response. If the absolute value of the current slope exceeds the preset current slope change threshold within a preset time window after the phase jump, then confirm the generation of a real disturbance source trigger signal. S5: Activate the disturbance fingerprint buffer in response to the trigger signal of the real disturbance source, and continuously capture the instantaneous frequency centroid shift of voltage ripple, the gradient of current harmonic distortion rate change and the differential peak value of encoder feedback angular velocity after the jump occurs, so as to obtain the disturbance feature fingerprint. S6: Input the disturbance feature fingerprint into the preset clustering center matching model obtained by offline training of historical high-quality tuning cases. If the matching condition is met, generate the PID parameter update instruction; otherwise, maintain the current control parameters.

[0009] S7: Execute a phased injection strategy based on the PID parameter update instruction. First, superimpose a preset compensation parameter group with a weight of 50%. After the motor speed error converges to within the threshold, switch to the target PID parameter group corresponding to the PID parameter update instruction.

[0010] The adaptive tuning method for PID parameters of planetary geared motors based on transient power fluctuation identification provided in this application has the following advantages: (1) This solution effectively overcomes the technical defects of existing technologies based on voltage threshold detection or spectral energy integration methods in high-frequency, low-amplitude disturbance scenarios by shifting the focus of power supply ripple signal analysis from the traditional amplitude domain to the phase domain. Traditional transient identification mechanisms usually rely on sudden changes in bus voltage amplitude or excessive total harmonic distortion rate as triggering conditions. However, in actual industrial environments, many key disturbances (such as rectifier bridge commutation failure, start-up and shutdown of nearby high-power equipment) often manifest as weak but rapid phase structure distortions, with insignificant voltage amplitude changes, resulting in delayed response or even failure to identify by conventional methods. This invention proposes to extract the instantaneous phase using an improved Hilbert transform under high sampling rate acquisition and to perform local normalization modeling of the cumulative offset of the phase difference between adjacent sampling points through a dynamic sliding window. This can keenly capture phase jump events caused by sudden changes in grid impedance, significantly improving the sensitivity and timeliness of disturbance detection. Experiments show that this mechanism can complete the initial judgment within hundreds of microseconds after the disturbance occurs, providing an early warning at least 0.3 to 0.5 seconds earlier than the traditional amplitude comparison method, thus gaining a valuable lead time window for subsequent control strategy adjustments.

[0011] (2) Furthermore, this scheme constructs a dual confirmation mechanism that integrates time-series verification and feature fingerprint matching, which significantly enhances the reliability and adaptability of PID parameter tuning and avoids frequent mis-tuning caused by fluctuations in a single index. When a phase jump event is initially identified, the system does not immediately start parameter reconfiguration, but introduces current response initial edge alignment verification: only when the current slope exceeds the preset current slope change threshold within the preset time window after the jump is it identified as an effective disturbance source, thereby excluding non-electrically coupled noise interference; then, a lightweight "disturbance fingerprint buffer" is activated, capturing the three-dimensional feature vector composed of voltage ripple spectrum centroid shift, current harmonic distortion gradient and angular velocity differential peak within 5ms, and matching it with the cluster center of historical high-quality tuning cases obtained from offline training. Only when the current disturbance fingerprint falls into the preset similarity interval is the phased parameter injection triggered - that is, first, the compensation group is superimposed with 50% weight, and then the full switch is performed after the speed error converges. This design not only significantly reduces the online computing burden and avoids the long-term data accumulation and real-time training overhead required for complex model identification or neural network inference, but also ensures the smoothness and stability of the control transition process, effectively preventing the risk of increased mechanical vibration or system instability caused by frequent or improper tuning.

[0012] The aforementioned mechanisms collectively construct a robust feedforward disturbance sensing and adaptive control closed-loop system that does not rely on prior system models or long learning cycles. Its core advantage lies in achieving a technological leap from "passive response" to "look-ahead adaptation," enabling precise pre-tuning of control parameters before disturbance energy is fully transmitted to the motor's mechanical end, significantly improving the servo system's dynamic tracking capability and anti-interference performance. It is particularly suitable for applications with stringent requirements for response speed and operational stability, such as precision CNC machine tools, robot joint drives, and high-speed packaging machinery. While ensuring control accuracy, it also considers algorithm real-time performance and engineering deployability, possessing good scalability and industrialization prospects. Attached Figure Description

[0013] Figure 1 This is the main flowchart of the adaptive tuning method for PID parameters of planetary geared motors based on transient power fluctuation identification; Figure 2 This is a sub-flowchart of the adaptive tuning method for PID parameters of planetary geared motors based on transient power fluctuation identification; Figure 3 This is another sub-flowchart of the adaptive tuning method for PID parameters of planetary geared motors based on transient power fluctuation identification. Detailed Implementation

[0014] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0015] The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0016] like Figure 1 As shown, this application provides an adaptive tuning method for PID parameters of a planetary geared motor based on transient power fluctuation identification, specifically including: S1: The voltage of the power supply bus of the planetary gear motor is acquired in real time with a high sampling rate, and the inherent power ripple component in the preset frequency band is extracted through a bandpass filter to obtain a high-frequency ripple signal sequence. S2: Based on the high-frequency ripple signal sequence, perform improved Hilbert transform processing, demodulate to generate a continuous phase time series, and calculate the cumulative phase difference offset between adjacent sampling points to construct a phase change rate data stream; S3: Use a dynamic sliding window to perform local normalization modeling on the phase change rate data stream. If the preset phase jump judgment condition is met, generate a phase jump event identifier. S4: Perform timing alignment verification between the phase jump event identifier and the initial edge of the motor current response. If the absolute value of the current slope exceeds the preset current slope change threshold within a preset time window after the phase jump, then confirm the generation of a real disturbance source trigger signal. S5: Activate the disturbance fingerprint buffer in response to the trigger signal of the real disturbance source, and continuously capture the instantaneous frequency centroid shift of voltage ripple, the gradient of current harmonic distortion rate change and the differential peak value of encoder feedback angular velocity after the jump occurs, so as to obtain the disturbance feature fingerprint. S6: Input the disturbance feature fingerprint into the preset clustering center matching model obtained by offline training of historical high-quality tuning cases. If the matching condition is met, generate the PID parameter update instruction; otherwise, maintain the current control parameters.

[0017] S7: Execute a phased injection strategy based on the PID parameter update instruction. First, superimpose a preset compensation parameter group with a weight of 50%. After the motor speed error converges to within the threshold, switch to the target PID parameter group corresponding to the PID parameter update instruction.

[0018] Step S1: The voltage of the planetary geared motor's power supply bus is acquired in real time at a high sampling rate, and the inherent power ripple component within a preset frequency band is extracted using a bandpass filter to obtain a high-frequency ripple signal sequence. In this embodiment, the preset frequency band is preferably 2–20kHz, but it can be adapted to meet actual needs. Specifically, this includes: S1.1: Perform high-frequency synchronous sampling processing on the analog signal of the power supply bus voltage of the planetary geared motor to generate a discretized original voltage time series data stream containing complete transient details.

[0019] The voltage analog signal connected to the power supply bus of the planetary geared motor contains a DC component, the power frequency fundamental wave, and superimposed high-frequency switching power supply ripple and transient disturbance noise.

[0020] Configure the sampling clock frequency of the high-precision analog-to-digital converter (ADC) in the range of 100kHz to 500kHz, ensuring that the sampling rate is at least 5 times the highest ripple frequency to be extracted, 20kHz, in order to satisfy the Nyquist sampling theorem and retain sufficient phase resolution margin.

[0021] The synchronous sampling trigger mechanism is activated, using the PWM carrier signal inside the motor driver or an external high-precision crystal oscillator as a global time base reference to eliminate timing jitter between multi-channel acquisitions and ensure strict alignment of voltage data with subsequent current and encoder data on a microsecond-level time scale.

[0022] Discretization and quantization processing is performed on the acquired continuous analog voltage signals to map the analog levels into 12-bit or 16-bit precision digital codes, generating a sequence of original voltage sampling points with defined timestamp intervals.

[0023] Buffer management is performed on the original sampling point sequence, and a circular queue structure is used to store the data of the most recent N sampling periods to ensure the continuity and real-time performance of the data stream and prevent data loss or overwriting due to data processing delays.

[0024] S1.2: Based on the discretized original voltage time series data stream, a digital bandpass filtering algorithm is performed to suppress the power frequency fundamental component and high-frequency quantization noise beyond the characteristic frequency band, thereby obtaining a preliminarily purified wideband voltage signal sequence.

[0025] Receive the discrete raw voltage time series data stream generated by S1.1, which contains a mixture of power frequency fundamental wave, high frequency ripple and quantization noise.

[0026] A digital bandpass filter transfer function based on an infinite impulse response (IIR) architecture is constructed. The lower cutoff frequency is set to 2kHz to filter out 50Hz / 60Hz power frequency and low-order harmonic interference, and the upper cutoff frequency is set to 20kHz to suppress high-frequency aliasing noise introduced by ADC sampling and high-frequency radiation interference from switching devices.

[0027] The system function of the analog prototype filter is mapped to the Z-domain using the bilinear transform method, which ensures the flatness of the amplitude-frequency response and the linearity of the phase-frequency response of the digital filter in the characteristic frequency band, and avoids phase distortion from affecting the phase demodulation accuracy of the subsequent Hilbert transform.

[0028] The discretized original voltage sequence is subjected to recursive difference equation operation. The filtered output value is calculated by combining the weighting coefficients of the current and historical sampling points, and the DC component and low-frequency drift trend are removed in real time.

[0029] The implementation process of the difference equation for a digital bandpass filter is represented by the following formula: Where y[n] is the filtered output voltage value at the nth sampling time, and x[nk] is the original input voltage value at the nkth sampling time. Forward coefficients, Here, M represents the feedback coefficient, and M and N represent the feedforward and feedback orders, respectively.

[0030] The filtered signal sequence is subjected to dynamic range normalization to eliminate the influence of amplitude dimensions caused by differences in power supply voltage levels.

[0031] S1.3: The bandwidth of the initially purified broadband voltage signal sequence is truncated and reconstructed using a preset 2 to 20 kHz transfer function to separate the inherent power ripple components generated by the switching power supply topology and grid harmonic coupling, and finally generate a high-frequency ripple signal sequence for phase demodulation.

[0032] The system receives a pre-purified broadband voltage signal sequence processed in step S1.2. This sequence has suppressed the power frequency fundamental wave and high-frequency quantization noise and serves as the input data source for spectrum truncation and reconstruction.

[0033] The preset digital filter transfer function model is invoked. This model is designed for the 2 to 20 kHz frequency band and aims to match the inherent ripple frequency characteristics generated by the switching power supply topology and grid harmonic coupling.

[0034] A wideband voltage signal sequence is input into a finite impulse response (FIR) filter structure, and frequency domain convolution is performed to precisely truncate the signal spectrum, filtering out low-frequency residual components below 2 kHz and high-frequency interference components above 20 kHz. The specific formula is as follows: Where H(z) is the filter system function, h(k) is the filter coefficient sequence, N is the filter order, and z is a complex variable, this formula defines the mapping relationship from the time domain to the frequency domain, ensuring that only the energy components within the target frequency band are retained.

[0035] The filtered frequency domain data is subjected to inverse Fourier transform or time domain reconstruction to restore it to the form of a time domain signal, eliminating phase distortion caused by spectrum truncation and ensuring waveform integrity.

[0036] The reconstructed time-domain signal is subjected to amplitude normalization to eliminate the influence of DC bias and generate a standardized high-frequency ripple signal sequence, which contains only transient ripple components caused by sudden changes in power supply impedance.

[0037] Step S2: Perform improved Hilbert transform processing based on the high-frequency ripple signal sequence to demodulate and generate a continuous phase time series, and calculate the cumulative phase difference offset between adjacent sampling points to construct a phase change rate data stream. Specifically, this includes: S2.1: Perform analytical signal construction processing on the high-frequency ripple signal sequence, and use the Hilbert transform algorithm to map the high-frequency ripple signal sequence in the real domain into an analytical signal vector in the complex domain, so as to obtain a complex analytical signal sequence containing instantaneous amplitude information and instantaneous phase information.

[0038] The system receives a high-frequency ripple signal sequence after bandpass filtering. This sequence is a discrete-time signal in the real number domain and serves as the input for constructing an analytic signal.

[0039] A Hilbert transform operation is performed on the high-frequency ripple signal sequence to construct orthogonal components and generate a complex domain analytic signal. A Fast Fourier Transform (FFT) algorithm is used to convert the time-domain signal to the frequency domain, retaining the positive frequency components and setting the negative frequency components to zero. Then, an inverse FFT is used to restore the signal to the time domain, obtaining the Hilbert transform result of the original signal, i.e., the orthogonal component sequence.

[0040] Using the original high-frequency ripple signal sequence as the real part and the calculated orthogonal component sequence as the imaginary part, vector synthesis is performed according to the definition of complex numbers. For any sampling time t, a complex analytic signal z(t) is constructed, whose mathematical expression is as follows: Where x(t) is the amplitude of the high-frequency ripple signal at time t, H[x(t)] is the Hilbert transform result of x(t), and j is the imaginary unit.

[0041] Through the aforementioned complex number construction process, a complex analytic signal sequence containing instantaneous amplitude and phase information is generated. This sequence forms a rotating vector in the complex plane, and the change in its phase angle directly reflects the transient structural characteristics of the power supply ripple, eliminating the noise sensitivity of traditional amplitude detection.

[0042] S2.2: Based on the complex analytic signal sequence, perform arctangent function demodulation operation, extract the ratio of the imaginary part to the real part in the complex analytic signal sequence and perform phase expansion correction to generate a continuous phase time sequence that eliminates phase ambiguity and changes continuously with time.

[0043] Receive the complex analytic signal sequence generated in step S2.1, which contains two orthogonal components, real and imaginary, as the input data source for phase demodulation.

[0044] For each sampling point in the complex analytic signal sequence, extract the real part and the imaginary part values ​​respectively, and construct a two-dimensional vector coordinate pair for arctangent operation.

[0045] The ratio of the extracted imaginary part to the real part is calculated using the four-quadrant arctangent function Atan2 to obtain the principal phase angle wrapped in the interval from negative π to positive π, and a discrete phase time series is initially established.

[0046] For the abrupt discontinuities in the principal phase angle sequence caused by crossing the ±π boundary, phase expansion correction processing is performed, and the absolute value of the phase difference between adjacent sampling points is detected to exceed the π threshold.

[0047] When the absolute value of the phase difference exceeds the π threshold, the direction of the jump is determined based on the phase change trend. If it is a positive jump, 2π is added; if it is a negative jump, 2π is subtracted to eliminate phase ambiguity.

[0048] By recursively accumulating correction values, discontinuous principal phase angles are reconstructed into continuous phase time series that monotonically increase or decrease with time, ensuring the physical continuity of the phase trajectory.

[0049] S2.3: Perform discrete difference calculation processing on the continuous phase time series, select the phase value of the current sampling time and the phase value of the previous sampling time to perform a subtraction operation, so as to obtain a single-step phase difference sequence that represents the instantaneous phase fluctuation amplitude between adjacent sampling points.

[0050] Receive the phase-time sequence generated by step S2.2, which is phase-unambiguous and changes continuously over time. This sequence serves as the input data source for discrete difference calculation.

[0051] Perform a time-series index traversal operation on the continuous phase time series, and select the phase value of the current sampling time t and the phase value of the previous sampling time t-1 to form a calculation pair.

[0052] The computation pair is subtracted using first-order backward differential processing to extract the instantaneous phase change between adjacent sampling points.

[0053] The single-step phase difference is calculated using the following formula: in, Let be the single-step phase difference at time t. Let be the continuous phase values ​​at time t. Let be the continuous phase value at time t-1.

[0054] The calculated single-step phase difference is numerically validated to remove abnormal extreme points caused by ADC quantization errors.

[0055] The verified single-step phase differences are arranged in order of timestamps to construct a single-step phase difference sequence that characterizes the instantaneous phase fluctuation amplitude between adjacent sampling points.

[0056] S2.4: Perform sliding cumulative integration operation based on the single-step phase difference sequence, and perform algebraic summation on each value in the single-step phase difference sequence within a preset time window to generate a phase difference cumulative offset sequence that reflects the phase drift trend.

[0057] The system receives the single-step phase difference sequence output from S2.3, which characterizes the instantaneous fluctuation amplitude of the phase between adjacent sampling points. A sliding accumulation integration window of length N is constructed, where N corresponds to the number of sampling points for 3 to 8 ripple cycles, to adapt to the dynamic response requirements under different load rates.

[0058] Perform time-series indexing on the single-step phase difference value at the current time t, extract a subset of continuous phase difference data from time t-N+1 to time t, and form a local phase drift observation vector.

[0059] Discrete summation is used to perform algebraic addition on all elements in the observation vector, eliminating phase jitter interference caused by high-frequency random noise and retaining the low-frequency trend component that reflects the sudden change in power supply impedance.

[0060] The cumulative phase difference offset is calculated using the following formula: Where ΔΦ(t) is the cumulative phase difference offset at time t. Let N be the single-step phase difference of the i-th sampling point, and N be the sliding window length.

[0061] The calculated cumulative offset is compared with the cumulative value at the previous moment. If the absolute value of the difference exceeds the preset micro-change threshold, it is marked as a potential phase drift event; otherwise, it is regarded as a steady-state fluctuation.

[0062] Slope monitoring is performed on the cumulative offset sequence, and the linear regression coefficient of the cumulative value within M consecutive periods is calculated to quantify the acceleration characteristics of phase drift and distinguish between transient disturbances and slow load changes.

[0063] The data structure containing the cumulative offset value, drift direction identifier, and acceleration coefficient is encapsulated into a phase change rate data stream unit, and a timestamp index is added for subsequent modules to call synchronously.

[0064] By using a sliding cumulative integration processing method, the single-step phase difference sequence of the previous step is transformed into a phase difference cumulative offset sequence that reflects the phase drift trend, thereby achieving enhanced detection of millisecond-level phase structure destruction events and significantly improving the signal-to-noise ratio of transient recognition.

[0065] For example, the sampling frequency is set to 100kHz, the ripple fundamental frequency is 10kHz, and the sliding window length N is set to 50 points (corresponding to 5 ripple cycles). When a transient power supply drop occurs, high-frequency noise with alternating positive and negative values ​​appears in the single-step phase difference sequence. After accumulation and integration, the random noise cancels each other out, while the unidirectional phase shift caused by impedance abrupt change is linearly amplified. If the cumulative shift is detected to increase sharply from 0rad to 0.5rad within 5ms, and the regression coefficient is greater than 0.1rad / ms, it is determined to be a valid precursor to a phase jump. This processing enables the system to accurately capture phase anomalies caused by weak disturbances with an amplitude of only 2% of the rated voltage, even in harsh power grid environments with a signal-to-noise ratio of less than 10dB, reducing the false trigger rate to below 0.1%.

[0066] S2.5: Perform time-series reassembly and formatting encapsulation processing on the phase difference cumulative offset sequence, arrange the discrete phase difference cumulative offset sequence according to the sampling timestamp and add a data stream identifier header to construct a phase change rate data stream for subsequent dynamic sliding window module to call.

[0067] like Figure 2 As shown, step S3: Local normalization modeling of the phase change rate data stream is performed using a dynamic sliding window. If the preset phase jump judgment condition is met, a phase jump event identifier is generated. Specifically, this includes: S3.1: A dynamic sliding window processing mechanism is constructed based on the phase change rate data stream. The window length parameter is adjusted online according to the real-time load rate of the planetary geared motor. The continuous phase change rate data stream is segmented into local phase difference sequence segments containing several ripple periods to obtain local phase difference sequence segments adapted to the current operating condition. In this embodiment, the number of ripple periods is three to eight, and of course, the ripple periods can be adaptively adjusted according to actual needs.

[0068] The system receives the phase change rate data stream output from S2.5, which contains a sequence of discrete phase difference cumulative offsets arranged by timestamps. It acquires the current real-time load rate parameter of the planetary geared motor, determined by the ratio of the q-axis current amplitude fed back from the motor current loop to the rated current. Based on the real-time load rate, it calculates the length parameter of a dynamic sliding window. A higher load rate results in a shorter window length to accommodate rapid response under high-frequency disturbances; a lower load rate results in a longer window length to enhance noise immunity under steady-state conditions. According to the calculated window length parameter, it extracts a data segment from the continuous phase change rate data stream, including the current moment and its preceding sampling points. This extracted data segment is mapped to a local phase difference sequence segment containing three to eight ripple periods. The local phase difference sequence segment undergoes boundary alignment to ensure that the window start point aligns with the zero-crossing point or peak point of the ripple signal, eliminating the spectral leakage effect caused by phase truncation. Through this processing, the continuous phase change rate data from the previous step is transformed into a local phase difference sequence segment adapted to the current operating condition, achieving the expected technical effect of dynamically and adaptively adjusting the sliding window length according to the load.

[0069] For example, the sampling frequency is set to 100kHz and the ripple fundamental frequency to 10kHz. When the motor load rate is detected to be 30%, the calculated sliding window length is 8 ripple cycles, or 0.8ms, corresponding to 80 sampling points. The most recent 80 data points are extracted from the phase change rate data stream to form a local sequence. When the load rate rises to 80%, the window length is dynamically adjusted to 3 ripple cycles, or 0.3ms, corresponding to 30 sampling points. The system extracts the most recent 30 data points in real time. At the moment of load change, the window length smoothly transitions from 80 points to 30 points within 2ms. The output result is a local phase difference sequence segment containing 30 to 80 elements, which accurately reflects the phase fluctuation characteristics under the current load, significantly improving the sensitivity and robustness of transient identification.

[0070] S3.2: Perform local normalization modeling processing on the local phase difference sequence segment, and generate a phase difference sequence standard deviation value that characterizes the intensity of phase fluctuation based on the dispersion index of the data within the sliding statistical calculation window.

[0071] The system receives a local phase difference sequence segment after being dynamically segmented by a sliding window. This segment contains phase change rate data for 3 to 8 ripple cycles under the current operating condition. The local phase difference sequence segment is then de-meaned by calculating the arithmetic mean of the phase differences at all sampling points within the window and subtracting this mean from each item in the original sequence to eliminate interference from DC bias in the assessment of fluctuation levels.

[0072] Based on the mean-reduced phase difference sequence, the sample variance is calculated using the Bessel correction method, and the dispersion of phase fluctuations is determined by the following formula: Where N is the total number of sampling points within the sliding window. Let i be the phase difference value at the i-th sampling point. This represents the average phase difference within the window.

[0073] The square root operation is performed on the variance value to obtain the standard deviation value σ, which represents the severity of phase fluctuation. This index directly reflects the stability of the power supply ripple phase structure.

[0074] The calculated standard deviation value is compared with the historical steady-state benchmark value in real time. If the standard deviation is detected to show an exponential growth trend within three consecutive sampling periods, it is marked as an abnormal state of phase dispersion.

[0075] S3.3: Perform symbol flip frequency statistical operation based on the local phase difference sequence segment, detect the number of changes in the phase difference symbol between adjacent sampling points and normalize it to the flip rate per unit time, and generate the symbol flip frequency characterizing the phase oscillation instability.

[0076] The system receives a local phase difference sequence segment after local normalization modeling. This segment contains discrete phase change rate data for three to eight ripple cycles within a dynamic sliding window. Point-by-point symbol extraction is performed on this local phase difference sequence segment. By comparing the phase difference values ​​of adjacent sampling points with zero, a binary symbol state sequence composed of positive and negative logic levels is generated. Edge detection processing is performed based on this binary symbol state sequence to count the number of symbol state transitions from positive to negative or from negative to positive per unit time, obtaining the original symbol flip count. A time normalization factor is introduced, and the original symbol flip count is divided by the time span of the current dynamic sliding window to calculate the symbol flip rate per unit time. A moving average filter is used to smooth the symbol flip rate, suppressing spurious flip counts caused by high-frequency quantization noise, and generating a symbol flip frequency characterizing phase oscillation instability.

[0077] S3.4: Using a dynamic threshold that is adjusted online with the load rate as a decision criterion, a phase transition is determined based on the standard deviation of the phase difference sequence and the symbol flip frequency. When a preset phase transition determination condition is detected, a phase structure destruction event is determined to have occurred.

[0078] The system receives the standard deviation of the phase difference sequence generated by S3.2 and the sign reversal frequency generated by S3.3 to obtain the current real-time load rate data of the planetary geared motor. This data originates from the internal current loop feedback of the driver or the measurement value of the external torque sensor and is used to characterize the current mechanical stress state of the motor. Based on the real-time load rate data, a dynamic threshold is calculated by looking up a table or by linear interpolation. The higher the load rate, the lower the system's tolerance to phase disturbances, and the lower the dynamic threshold is accordingly, thereby enhancing the sensitivity under high load.

[0079] The preset phase jump judgment condition is as follows: the calculated dynamic threshold is decomposed into two independent criterion parameters: an upper standard deviation threshold and a lower symbol flip frequency threshold. A first-level logic comparison is performed to determine whether the standard deviation of the phase difference sequence at the current moment exceeds the upper standard deviation threshold. If it does not exceed the upper standard deviation threshold, it is determined to be steady-state noise fluctuation, the counter is reset, and the process returns to wait for the next sampling period. If the standard deviation exceeds the threshold, a second-level logic comparison is immediately performed to determine whether the symbol flip frequency at the current moment is higher than the lower symbol flip frequency threshold, thereby confirming the discontinuity and abrupt change characteristics of the phase oscillation. When both criteria are satisfied simultaneously, it is determined that the power supply ripple phase structure has been damaged, and a phase jump event identifier is generated.

[0080] If the standard deviation of the phase difference sequence at the current moment does not exceed the upper limit threshold, or the symbol flip frequency does not exceed the lower limit threshold (i.e., both criteria are not simultaneously met), then it is determined that no phase structure disruption event has occurred, and the steady-state determination result of the previous sampling period is maintained. The system will reset the phase jump detection counter and keep the phase jump event flag at a low level or in a no-event state, then return to wait for data input for the next sampling period to ensure the system's stability and low false alarm rate under undisturbed conditions.

[0081] S3.5: In response to the determination result of the phase structure destruction event, a high-level pulse signal is generated, and the high-level pulse signal is encapsulated as a phase jump event identifier with a timestamp.

[0082] The phase transition event identifier remains valid after generation until the timing alignment verification in step S4 is completed or the preset time window expires, at which point it is automatically reset to prevent the continued impact of false events.

[0083] like Figure 3 As shown, step S4: The phase jump event identifier is time-aligned with the initial edge of the motor current response. If the absolute value of the current slope exceeds a preset current slope change threshold within a preset time window after the phase jump, then the generation of a real disturbance source trigger signal is confirmed. Specifically, this includes: S4.1: Based on the timestamp of the phase jump event identifier, perform differential operation on the real-time angular velocity data stream fed back by the planetary gear motor encoder to obtain an angular acceleration sequence characterizing the dynamic response trend of the motor.

[0084] S4.2: Utilize the angular acceleration sequence in combination with the motor's moment of inertia parameters to perform torque back-calculation, thereby generating estimated torque waveform data that reflects the transient changes in electromagnetic torque.

[0085] Receive the angular acceleration sequence data stream output from step S4.1. This data stream contains discrete sampling points of the instantaneous angular acceleration of the planetary geared motor rotor after the phase jump event is triggered. Call the total rotational inertia parameter of the motor system pre-stored in the controller's non-volatile memory. This parameter value was obtained through offline identification experiments and covers the motor rotor's own inertia and the load-equivalent inertia referred to the motor shaft.

[0086] Based on the manifestation of Newton's second law in rotational motion, a linear mapping relationship between electromagnetic torque and angular acceleration is established. A point-by-point multiplication method is used to calculate the algebraic product between the angular acceleration value at each sampling moment in the angular acceleration sequence and the total moment of inertia parameter of the motor system.

[0087] In the calculation process, a viscous friction coefficient compensation term is introduced to eliminate the interference of mechanical damping on torque estimation. The following torque back-calculation formula is constructed: Where T is the estimated electromagnetic torque, J is the total moment of inertia of the motor system, α is the real-time angular acceleration, B is the viscous friction coefficient, and ω is the real-time angular velocity.

[0088] The calculated raw estimated torque waveform is subjected to low-pass filtering to remove high-frequency glitches amplified by encoder quantization noise and differential operations, while retaining the effective component that reflects the macroscopic change trend of electromagnetic torque.

[0089] The filtered torque data is reassembled according to the timestamp order to generate continuous and smooth estimated torque waveform data, which intuitively reflects the transient fluctuation amplitude of electromagnetic torque caused by power supply disturbance.

[0090] S4.3: Perform sliding differential processing on the estimated torque waveform data within a preset time window after the phase jump event is identified, in order to extract the absolute value of the current slope characteristic quantity that characterizes the severity of the current response.

[0091] Receive the estimated torque waveform data output from step S4.2, which reflects the transient change trend of the electromagnetic torque after the phase jump event. Set a preset time window, whose start time is strictly aligned with the timestamp of the phase jump event, and whose length covers the critical rise interval of the initial edge of the current response.

[0092] Perform discrete sliding difference operation on the estimated torque waveform data within the window, select the torque estimate of the current sampling point and subtract it from the torque estimate of the previous adjacent sampling point to construct a difference sequence characterizing the instantaneous rate of change of torque.

[0093] Dividing each value in the difference sequence by the sampling time interval achieves a dimensional conversion from torque difference to torque change rate, generating an instantaneous slope sequence that reflects the dynamic response speed of electromagnetic torque.

[0094] The instantaneous slope sequence is subjected to absolute value mapping to eliminate the influence of the difference between positive and negative directions on the disturbance intensity assessment, and the absolute value feature of the current slope that characterizes the severity of the current response is extracted.

[0095] S4.4: Compare the absolute value of the current slope characteristic quantity with the reference threshold dynamically calculated based on the current load rate. If it is determined that the sudden increase in the absolute value of the current slope exceeds the reference value, a disturbance confirmation flag is generated.

[0096] The system receives the absolute value of the current slope characteristic output from step S4.3. This characteristic characterizes the severity of the motor stator current response within a preset time window after a phase jump event. It acquires the current real-time load rate data of the planetary geared motor, which serves as the input variable for calculating the dynamic reference threshold, reflecting the motor's current mechanical operating condition. Based on the real-time load rate data, it calls a preset load-threshold mapping function to calculate the dynamic reference threshold. This mapping function establishes a nonlinear correspondence between the normal fluctuation range of the current response and the abnormal disturbance limit under different load levels. The dynamic reference threshold is calculated using the following formula: in, Let t be the dynamic reference threshold, L be the real-time load rate, K be the proportional coefficient, α be the load exponential factor, and C be the basic noise compensation constant. The calculated dynamic reference threshold is multiplied by a safety margin coefficient of 1.5 to generate the final trigger threshold value for decision-making, thus eliminating false judgments caused by normal load fluctuations. The absolute value of the current slope characteristic is compared with the final trigger threshold value to determine if the former is strictly greater than the latter. If the comparison result is true, the current current response is confirmed to be caused by a real external power supply disturbance, and a high-level disturbance confirmation flag is generated. If the comparison result is false, the current phase transition is determined to be a false signal or noise interference, the low-level state is maintained, and the event flag is discarded. Through the above dynamic threshold comparison processing method, the current slope characteristic extracted in the previous step is transformed into a disturbance confirmation logic signal with physical meaning, achieving high-confidence screening of transient disturbance sources and effectively suppressing the risk of PID parameter mistuning caused by load changes.

[0097] S4.5: In response to the valid state of the disturbance confirmation flag, output a high-level pulse signal to generate a real disturbance source trigger signal.

[0098] Step S5: Activate the disturbance fingerprint buffer in response to the trigger signal of the real disturbance source, and continuously capture the instantaneous spectral centroid shift of voltage ripple, the gradient of current harmonic distortion rate change, and the differential peak value of encoder feedback angular velocity within 5ms after the jump occurs, to obtain the disturbance feature fingerprint.

[0099] The disturbance fingerprint buffer refers to a 5ms high-speed data acquisition and storage space activated in response to a real disturbance source trigger signal. It is used to continuously capture the instantaneous spectral centroid shift of voltage ripple, the gradient of current harmonic distortion rate change, and the differential peak value of encoder feedback angular velocity after a transition occurs, forming multi-dimensional fingerprint data characterizing the disturbance source. The acquisition method is as follows: when a real disturbance source trigger signal and its corresponding high-precision timestamp are received, a full zeroing operation is performed on the storage units within the buffer, clearing the historical data remaining from the previous cycle; the total number of discrete sampling points within the 5ms window is calculated based on the sampling clock frequency, and the starting position of the circular buffer pointer is set; an absolute timing alignment mechanism based on the trigger signal timestamp is established to map subsequently acquired multi-source data such as voltage ripple, current harmonics, and encoder feedback onto a unified microsecond-level time axis, thereby generating the disturbance fingerprint buffer.

[0100] Step S5 specifically includes: S5.1: In response to the trigger signal of the real disturbance source, the disturbance fingerprint buffer is initialized and reset to clear historical residual data and establish a high-speed data acquisition time window with a length of 5ms, thereby generating a blank disturbance fingerprint buffer.

[0101] The system receives the actual disturbance source trigger signal and its corresponding high-precision timestamp from the S4.5 output, which serves as the start command for initializing the disturbance fingerprint buffer. A full zeroing operation is performed on the internal storage units of the buffer to clear residual voltage spectrum, current harmonics, and mechanical response historical data from the previous cycle, eliminating the risk of cross-cycle data contamination. Based on the sampling clock frequency of the planetary geared motor control system, the total number of discrete sampling points contained in the 5ms high-speed data acquisition window is calculated, and the starting position of the buffer's circular buffer pointer is set. An absolute timing alignment mechanism based on the trigger signal timestamp is established to map subsequently acquired electrical and mechanical multi-source data onto a unified microsecond-level time axis, ensuring strict synchronization of multi-dimensional features in the time domain. The temporary register for the three-dimensional feature vector is initialized, and memory space is pre-allocated for storing the instantaneous spectral centroid offset of voltage ripple, the gradient of current harmonic distortion rate change, and the differential peak value of the encoder feedback angular velocity.

[0102] S5.2: Based on the blank perturbation fingerprint buffer, perform fast Fourier transform processing on the high-frequency ripple signal sequence to track the changes in spectral energy distribution in real time and calculate the instantaneous spectral centroid offset, generating a voltage ripple instantaneous spectral centroid offset sequence that characterizes the perturbation characteristics on the power supply side.

[0103] The system receives the blank disturbance fingerprint buffer after initialization in S5.1 and the high-frequency ripple signal sequence generated in S1.3, and establishes a 5ms high-speed acquisition window with the trigger signal time of the real disturbance source as the zero point.

[0104] Windowing and truncation are performed on the high-frequency ripple signal sequence within the acquisition window. The Hanning window function is used to suppress spectral leakage, ensuring the continuity of the time-domain signal at the boundary and providing high-quality input data for subsequent frequency-domain transformation.

[0105] Performing a Fast Fourier Transform (FFT) operation on the windowed signal sequence maps the time-domain discrete signal to the frequency domain, generating a complex spectrum vector containing amplitude and phase spectrum information, revealing the energy distribution characteristics of the power supply ripple.

[0106] The power spectral density of each frequency component is calculated based on the complex spectral vector, and the frequency domain energy distribution matrix is ​​obtained by taking the modulus and squaring the operation, thereby quantifying the energy contribution of different frequency components during transient disturbances.

[0107] The instantaneous spectral centroid is calculated using power spectral density data, and the centroid frequency of the spectral energy distribution is determined using the following formula: Among them, f c Let P(f) be the centroid frequency of the instantaneous spectrum. i f is the power spectral density value at the i-th frequency point. i Here, N represents the corresponding frequency value, and N is the number of FFT points.

[0108] The calculated instantaneous spectral centroid frequency is compared with the steady-state reference spectral centroid frequency to obtain the spectral centroid offset. This offset characterizes the degree of ripple spectral distortion caused by sudden changes in power supply impedance.

[0109] The continuous spectral centroid offsets within a 5ms window are time-series arranged to generate a sequence of instantaneous spectral centroid offsets of voltage ripple, which serves as key dimension data characterizing the disturbance characteristics of the power supply side.

[0110] By using the frequency domain energy centroid tracking processing method described above, the high-frequency ripple time-domain signal from the previous step is transformed into a spectral centroid offset sequence that reflects the dynamic impedance change of the power supply, thereby achieving accurate quantification and extraction of the electrical characteristics of transient disturbance sources.

[0111] S5.3: Using the starting time of the instantaneous frequency spectrum centroid offset sequence of the voltage ripple as a synchronization reference, perform harmonic decomposition on the motor stator current sampling data to extract the gradient of the change of each harmonic amplitude over time and synthesize the total harmonic distortion rate change rate to generate a current harmonic distortion rate change gradient sequence that characterizes the electrical side response characteristics.

[0112] The system receives a high-frequency sampled data stream of the motor stator current within a 5ms time window, which is strictly synchronized with the start time of the voltage ripple spectrum centroid offset. A Fast Fourier Transform (FFT) is performed on the synchronized stator current sequence to map the time-domain current signal to the frequency domain, obtaining a discrete spectral distribution containing the fundamental and higher harmonic components. Based on the switching frequency characteristics of the planetary geared motor driver, the harmonic extraction frequency band is set to 2 to 50 times the fundamental frequency to cover the main switching harmonics and their sideband components. The normalized ratio of each harmonic amplitude to the fundamental amplitude is calculated to construct a real-time harmonic amplitude vector. A sliding difference method is used to differentiate the harmonic amplitude vector of consecutive sampling points, extracting the rate of change of each harmonic amplitude over time. A total harmonic distortion (THD) calculation formula is introduced to quantitatively evaluate the proportion of harmonic energy at the current and previous moments. Where THD is the total harmonic distortion rate, I n Let I1 be the effective value of the nth harmonic current, I1 be the effective value of the fundamental current, and N be the highest harmonic order. A subtraction operation is performed on the THD values ​​of two consecutive sampling periods to generate a scalar of the total harmonic distortion rate change. The amplitude change rates of each harmonic are vector-concatenated with the THD change rate to form a multidimensional feature sequence characterizing the dynamic characteristics of the electrical side response. Through the above harmonic decomposition and gradient extraction processing, the original current waveform is transformed into a gradient sequence of current harmonic distortion rate changes reflecting the impact intensity of power supply disturbances on the motor electrical system, achieving precise quantification of the disturbance energy injection rate.

[0113] S5.4: Based on the timestamp of the gradient sequence of the current harmonic distortion rate change, the photoelectric encoder feedback pulse is processed by differential and derivative to calculate the instantaneous acceleration peak of the rotor angular velocity and extract its maximum absolute value, thereby generating the encoder feedback angular velocity differential peak scalar characterizing the dynamic response of the mechanical side.

[0114] The photoelectric encoder feedback pulse refers to the original pulse count sequence output by the photoelectric encoder installed at the rotor shaft end of the planetary geared motor during rotation, used to characterize the discrete sampled values ​​of the rotor angular position. The current harmonic distortion rate variation gradient sequence output by S5.3 and its corresponding timestamp index are received as a synchronization reference signal for the dynamic response calculation on the mechanical side.

[0115] Based on the timestamp index, the original pulse count sequence of the photoelectric encoder within a 5ms time window after the phase jump event is read from the high-speed ring buffer. This sequence reflects the discrete sampled values ​​of the rotor position.

[0116] A first-order difference operation is performed on the original pulse counting sequence to calculate the pulse increment between adjacent sampling times. Combined with the encoder line count and deceleration ratio parameters, the pulse increment is converted into an instantaneous angular velocity scalar sequence.

[0117] The instantaneous angular velocity scalar sequence is subjected to second-order differential processing using central difference processing to eliminate quantization noise interference and improve the acceleration estimation accuracy, thereby generating a rotor angular acceleration time series.

[0118] The sliding extreme value detection process is used to traverse the rotor angular acceleration time series, and the angular acceleration point with the largest absolute value is searched within a preset 5ms time window. The value corresponding to the peak value is then extracted.

[0119] The peak value of the differential rotor angular velocity is calculated using the following formula: in, ω is the peak value of the differential angular velocity, T is the instantaneous angular velocity, Δt is the 5ms acquisition time window, and Δt is the sampling interval.

[0120] The extracted maximum absolute value of angular acceleration is encapsulated as a single-precision floating-point number, assigned a unique mechanical response feature identifier, and a differential peak scalar of encoder feedback angular velocity is generated.

[0121] By extracting high-frequency differential and extreme values ​​from encoder pulse signals, discrete mechanical position information is transformed into a quantitative index characterizing the transient impact intensity of inertial loads. This enables precise capture of mechanical vibrations caused by power supply disturbances, providing key mechanical side coupling features for the subsequent construction of three-dimensional disturbance fingerprints.

[0122] S5.5: Normalize and map the voltage ripple instantaneous spectrum centroid offset sequence, the current harmonic distortion rate change gradient sequence, and the encoder feedback angular velocity differential peak scalar and perform multi-dimensional vector splicing to generate a perturbation feature fingerprint for matching cluster centers and form a unique identifier.

[0123] The instantaneous spectral centroid offset sequence of voltage ripple, the gradient sequence of current harmonic distortion rate change, and the differential peak scalar of encoder feedback angular velocity are received as the raw input data for multidimensional feature fusion.

[0124] The dimensional consistency check is performed on the three-dimensional heterogeneous feature data to identify the differences in the numerical range and unit attributes of each physical quantity, and to establish the reference parameter space for normalization processing.

[0125] The instantaneous spectral centroid offset sequence of the voltage ripple is subjected to min-max normalization processing to compress its value to the [0,1] interval, resulting in a normalized spectral centroid offset sequence, thus eliminating the dominant influence of amplitude magnitude on the subsequent distance calculation.

[0126] By using the same normalization coefficient to synchronously scale the gradient sequence of current harmonic distortion rate variation, a normalized gradient sequence of harmonic distortion rate variation is obtained, ensuring that the electrical side response characteristics and the power supply side disturbance characteristics are comparable in vector space.

[0127] The differential peak scalar of the encoder feedback angular velocity is standardized by subtracting the mean from the historical operating conditions and dividing by the standard deviation to obtain the standardized differential peak scalar of the angular velocity, so as to highlight the dispersion of the dynamic response on the mechanical side rather than its absolute magnitude.

[0128] The normalized spectral centroid offset sequence, the normalized harmonic distortion rate variation gradient sequence, and the normalized angular velocity differential peak scalar are vector-stitched according to a preset electro-mechanical coupling order to construct an initial high-dimensional perturbation feature vector.

[0129] Principal component analysis is performed on the initial high-dimensional perturbation feature vector to reduce its dimensionality, generating a low-dimensional and decorrelated perturbation feature fingerprint that retains the orthogonal properties of the perturbation.

[0130] A unique timestamp and operating condition label are added to the generated perturbation feature fingerprint to form a structured unique identifier for subsequent clustering and matching modules to use.

[0131] By using normalization mapping and multidimensional vector splicing, the results of the previous step are transformed into standardized perturbation feature fingerprint data, achieving lossless fusion of electrical-mechanical coupling features and efficient characterization of the expected technical effect.

[0132] Step S6: Input the disturbance feature fingerprint into a preset clustering center matching model obtained through offline training of historical high-quality tuning cases. If the matching condition is met, a PID parameter update instruction is generated; otherwise, the current control parameters are maintained. Specifically, this includes: S6.1: Offline clustering analysis is performed on the instantaneous spectral centroid offset of voltage ripple, the gradient of current harmonic distortion rate change, and the differential peak value of encoder feedback angular velocity in historical high-quality setting cases to construct a preset clustering center matching model containing multiple standard disturbance mode centers.

[0133] Acquire a dataset of transient disturbance cases that have been manually verified and confirmed to have excellent control performance within the historical operating cycle, and extract the corresponding voltage ripple instantaneous spectrum centroid offset, current harmonic distortion rate change gradient, and encoder feedback angular velocity differential peak value as the original feature vector.

[0134] The original feature vector is subjected to Z-Score normalization preprocessing to eliminate numerical differences between different physical dimensions and construct a standard feature space with a mean of zero and a variance of one.

[0135] The K-Means clustering algorithm is used to iteratively divide the standardized multidimensional feature data. The number of cluster centers K is initialized to the total number of typical power supply disturbance modes. The optimal cluster boundary is determined by minimizing the intra-cluster sum of squares error function.

[0136] The typical power supply disturbance modes include grid voltage sags, transient overvoltages, harmonic distortion abrupt changes, and sudden load switching. The K value ranges from 4 to 8, specifically determined based on the total number of disturbance categories calibrated in the experiment. At least 200 high-quality historical tuning cases are used for cluster training, covering multiple operating conditions ranging from 20% to 100% of the motor's rated load. After cluster convergence, the clustering quality is verified by calculating the ratio of the average distance within a cluster to the minimum distance between clusters. A clustering result is considered valid when this ratio is less than 0.3.

[0137] In each iteration, the Euclidean distance from each sample point to each cluster center is calculated, the sample point is assigned to the nearest cluster, and the mean vector of all sample points in that cluster is recalculated as the new cluster center.

[0138] Repeat the allocation and update steps until the change in the cluster center position is less than the preset convergence threshold, forming several stable perturbation pattern clusters. Each cluster represents a power fluctuation scenario with similar electromechanical coupling characteristics.

[0139] Extract the coordinate vectors of the cluster centers that have finally converged, define them as the standard perturbation mode centers, and store the optimal PID parameter set optimized by the expert system under this mode to construct a preset cluster center matching model.

[0140] Through offline clustering analysis, discrete historical high-quality tuning cases are transformed into a structured set of standard disturbance pattern centers, realizing the abstraction and classification of complex power supply disturbance characteristics. This provides a highly robust reference benchmark for online real-time matching, significantly reducing the false trigger rate and improving tuning accuracy.

[0141] S6.2: Based on the preset cluster center matching model, receive the perturbation feature fingerprint output by the perturbation fingerprint buffer, and perform vector space mapping transformation processing on the perturbation feature fingerprint to generate a perturbation feature vector to be matched.

[0142] The system receives disturbance feature fingerprint data output from the disturbance fingerprint buffer. This data includes raw values ​​of three dimensions: instantaneous spectral centroid offset of voltage ripple, gradient of current harmonic distortion rate change, and peak value of encoder feedback angular velocity derivative.

[0143] Perform dimensional consistency checks on the original values ​​of each dimension in the perturbation feature fingerprint, identify the unit attributes and numerical magnitude differences of each physical quantity, and determine the feature components that need to be standardized.

[0144] The Z-Score normalization algorithm is used to perform a linear transformation on the feature data of each dimension, eliminating the weight bias caused by different physical units on the distance metric, and ensuring that each feature is comparable in the vector space.

[0145] Calculate the mean and standard deviation of each feature within a preset sliding window, which serve as the baseline statistics for standardization. The mean reflects the central tendency of the feature, and the standard deviation reflects the dispersion of the feature.

[0146] The feature values ​​of the i-th dimension are standardized using the following formula: in, Let be the original feature value of the i-th dimension. This is the mean of this dimension under historical normal operating conditions. The standard deviation of this dimension. These are the standardized feature values.

[0147] The standardized three-dimensional feature values ​​are arranged in a preset order to construct coordinate points in three-dimensional Euclidean space, forming a perturbation feature vector to be matched.

[0148] The perturbation feature vector to be matched is preprocessed with orthogonalization to remove possible linear correlations between features, thereby improving the computational efficiency and accuracy of subsequent clustering and matching.

[0149] By standardizing and orthogonalizing the Z-Score, the multidimensional heterogeneous perturbation fingerprint generated in the previous step is transformed into a uniform and decorrelated perturbation feature vector to be matched, thereby achieving a consistent mapping of the feature space and laying a data foundation for subsequent accurate clustering and matching based on distance metrics.

[0150] S6.3: Calculate the spatial distance between the perturbation feature vector to be matched and the center of each standard perturbation pattern in the preset clustering center matching model using Euclidean distance metric, so as to obtain the minimum neighborhood distance set.

[0151] Receive the feature vector of the disturbance to be matched generated by S6.2. This vector contains three dimensions of data: the centroid offset of the normalized voltage ripple spectrum, the gradient of the current harmonic distortion rate change, and the peak value of the encoder angular velocity derivative.

[0152] The system calls upon the K standard perturbation pattern center vectors stored in the preset cluster center matching model. Each center vector also has a three-dimensional feature structure, representing the typical perturbation pattern in historical high-quality tuning cases.

[0153] The Euclidean distance metric is used to calculate the spatial geometric distance between the feature vector of the perturbation to be matched and the center vector of each standard perturbation pattern, so as to quantify the similarity between the current perturbation and the known patterns.

[0154] The specific calculation process is based on the following formula: in, This represents the Euclidean distance between the vector to be matched and the k-th cluster center. This represents the i-th feature component of the vector to be matched. Let i represent the i-th feature component of the k-th cluster center, and let the summation range cover all three feature dimensions.

[0155] The calculated K distance values ​​are iterated and compared, and the distance value with the smallest value and its corresponding cluster center index are selected to form the minimum neighborhood distance set.

[0156] This set retains only one or a few historical model reference points that are closest to the current perturbation characteristics, excluding distant, unrelated perturbation models.

[0157] S6.4: Perform logical comparison and judgment processing based on the minimum spatial distance value in the minimum neighborhood distance set and the preset confidence threshold to determine whether the perturbation feature fingerprint satisfies the preset cluster center matching condition and generate a matching status identifier.

[0158] The system receives the minimum neighborhood distance set and a preset confidence threshold as input data for logical comparison. It extracts the minimum spatial distance value from the minimum neighborhood distance set, which represents the closest similarity deviation between the current perturbation feature fingerprint and the center of the historical standard perturbation pattern. The system then calls the dynamic confidence assessment module and reads the preset confidence threshold, which is calibrated offline based on the historical statistical distribution of motor operating conditions and is used to define the safe boundary for effective matching.

[0159] A distance-threshold comparison logic unit is constructed to compare the minimum spatial distance value with a preset confidence threshold. If the minimum spatial distance value is less than or equal to the preset confidence threshold, the current perturbation feature is determined to fall within the coverage of known high-quality tuning cases, and a successful match status is generated. If the minimum spatial distance value is greater than the preset confidence threshold, the current perturbation feature is determined to belong to an unknown or low-confidence perturbation type, and a failed match status is generated.

[0160] The generated matching status flag is encapsulated in Boolean logic and converted into a binary control signal. A high-level logic '1' is output when a match is successful, and a low-level logic '0' is output when a match fails. This binary control signal is mapped to the enable bit of the PID parameter update instruction, ensuring that the subsequent parameter update process is triggered only when the matching condition is met.

[0161] S6.5: When the matching status flag is true, trigger the control command generation mechanism to output the PID parameter update command to drive the subsequent phased injection strategy execution, or when the matching status flag is false, keep the current control parameters unchanged.

[0162] Step S7: Execute a phased injection strategy based on the PID parameter update instruction. First, a preset compensation parameter set is superimposed with a 50% weight. Once the motor speed error converges to within the threshold, the entire set is switched to the target PID parameter set corresponding to the PID parameter update instruction to complete the adaptive tuning control action. Specifically, this includes: The preset compensation parameter set refers to the set of target proportional gain components, target integral time components, and target derivative time components calculated based on the current power supply disturbance characteristics, carried by the PID parameter update instruction. It is used to replace the currently operating basic PID parameters to achieve adaptive tuning of the controller. It is obtained as follows: the clustering and matching module in the preceding steps obtains a set of optimized PID parameter values ​​based on the current power supply disturbance characteristics through table lookup or calculation, and encapsulates this set of parameters into the PID parameter update instruction; when executing the phased injection strategy, the proportional gain, integral time, and derivative time components are parsed from this instruction, thus forming the preset compensation parameter set.

[0163] S7.1: Parse and process the PID parameter update instruction to extract the proportional gain component, integral time component, and derivative time component from the preset compensation parameter set, and call the initial weight coefficient generator to output a half-weight factor of 50%, thereby constructing a primary fusion parameter set containing the half-weight factor and the preset compensation parameter set.

[0164] Receive the PID parameter update command output by the clustering matching module. This command carries the target proportional gain, target integral time, and target derivative time components calculated based on the current power supply disturbance characteristics.

[0165] The PID parameter update command is processed by protocol parsing, extracting the proportional gain component, integral time component, and derivative time component from the preset compensation parameter group, separating them from the command load, and converting them into floating-point control variables.

[0166] The initial weight coefficient generator is invoked, the half-injection strategy identifier configured by the system is read, and a fixed weight factor of 0.5 is output. This factor is used to limit the magnitude of the initial parameter adjustment to suppress control mutations.

[0167] The initial weight coefficient generator outputs a pre-configured half-weight factor in the phased injection strategy, which is fixed at 0.5 in this embodiment, as a damping coefficient for the initial parameter adjustment to suppress control abrupt changes. In an alternative embodiment, this weight factor can be adaptively adjusted based on the disturbance intensity classification or historical tuning effect statistics, with an adjustment range of 0.3 to 0.7.

[0168] A preliminary fusion parameter set is constructed by linearly weighting the extracted target parameter components with the currently running basic PID parameters. The calculation process follows the formula below: in, For primary fusion ratio gain, For the target proportional gain, Based on the proportional gain.

[0169] in, For the initial fusion integration time, For the target integration time, The time for basic integration.

[0170] in, For the initial fusion differential time, For the objective derivative time, It is the basic differential time.

[0171] The calculated primary fusion parameter set is encapsulated into a structured data object, containing half-weight factor identifiers and the values ​​of each component, which serves as the input benchmark for parameter injection in the next stage.

[0172] By using the weighted fusion processing method described above, the discrete target parameters generated in the previous step are transformed into a primary fusion parameter set with smooth transition characteristics, thereby achieving the expected technical effect of shock-free soft start in the PID parameter adjustment process.

[0173] S7.2: Based on the primary fusion parameter set, the parameters of the currently running basic PID controller are weighted and superimposed to generate an intermediate control parameter set with transition characteristics. The intermediate control parameter set is then loaded into the control register of the motor driver in real time, thereby completing the partial parameter injection action of the first stage.

[0174] Receive the primary fusion parameter set generated in step S7.1, which includes the proportional, integral, and derivative components from the half-weight factor and the preset compensation parameter set. Read the currently running basic PID controller parameters from the motor driver control register, and obtain the current proportional gain, integral time, and derivative time values ​​respectively.

[0175] A weighted superposition operation logic is constructed, which performs element-wise multiplication operations on half the weight factors in the primary fusion parameter set and each component of the preset compensation parameter set to generate a half-compensation increment vector.

[0176] The components of the intermediate state control parameter set are calculated using the following formula: in, These are intermediate state control parameters. Based on PID parameters, The weighting factor is half 0.5. These are the preset compensation parameters.

[0177] Perform data format conversion on the calculated intermediate state proportional gain, integral time, and derivative time, mapping them to a fixed-point or floating-point format that the motor driver firmware can recognize.

[0178] The formatted intermediate control parameter set is written into the volatile control register of the motor driver via a high-speed communication bus, overwriting the original basic PID parameter address space.

[0179] The driver's internal parameter verification mechanism is triggered to confirm that the new parameters have been fully loaded and there are no communication errors, thus completing the first phase of partial parameter injection.

[0180] By using a weighted superposition operation, the primary fusion parameter set from the previous step is transformed into an intermediate control parameter set with transition characteristics and loaded into a register, achieving the expected technical effect of smooth transition of control parameters and avoiding mechanical shocks caused by parameter mutations.

[0181] S7.3: The motor encoder feedback signal after the intermediate state control parameter group is injected is acquired and differentially processed in real time to calculate the instantaneous speed deviation value. The instantaneous speed deviation value of multiple consecutive sampling periods is smoothed by using moving average filtering to obtain the speed error convergence sequence for stability determination.

[0182] The real-time feedback data stream of the motor driver after obtaining the injected intermediate state control parameter group contains the original pulse count sequence output by the photoelectric encoder and the corresponding high-precision timestamp information.

[0183] Perform differential operations on the original pulse counting sequence to calculate the ratio of pulse increment to time interval within adjacent sampling periods, and solve for the instantaneous mechanical angular velocity value at each moment.

[0184] The calculated instantaneous mechanical angular velocity value is algebraically subtracted from the preset target reference speed to obtain a sequence of instantaneous speed deviation values ​​that characterize the degree of deviation from the current control state.

[0185] To address the high-frequency spikes in the instantaneous speed deviation value sequence caused by quantization noise or electromagnetic interference, a moving average filter window of length N is constructed, where N ranges from 5 to 10 control cycles.

[0186] Within a sliding window, the N consecutive instantaneous speed deviation values ​​are arithmetically summed, and the summation result is divided by the window length N to calculate the mean smoothed speed error at the current moment.

[0187] As the control cycle progresses, the sliding window moves forward in steps of 1, discarding the oldest deviation value and incorporating the latest deviation value, thus updating the smoothed speed error mean value in real time.

[0188] By using the above-mentioned moving average filtering method, the original instantaneous speed deviation value containing high-frequency noise is transformed into a speed error convergence sequence with a high signal-to-noise ratio, which realizes the accurate determination of the dynamic response stability of the motor and provides a reliable convergence basis for subsequent full parameter switching.

[0189] S7.4: Based on the speed error convergence sequence, execute threshold comparison logic to determine whether the maximum absolute value in the sequence is continuously lower than the preset dynamic convergence threshold. If the determination result is that the convergence condition is met, generate a full-scale switching enable signal; otherwise, maintain the intermediate state control parameter group and repeat the speed error convergence sequence monitoring process in the next control cycle.

[0190] The system receives the speed error convergence sequence generated by S7.3, which contains instantaneous speed deviation values ​​for multiple consecutive sampling periods after being processed by moving average filtering. An extreme value retrieval operation is performed on the speed error convergence sequence, traversing all data points within a preset dynamic monitoring time window, and extracting the maximum peak value of the absolute speed deviation within that time window to form an extreme value index characterizing the current transient fluctuation amplitude. A convergence threshold dynamically calculated based on the motor's current load rate and historical disturbance characteristics is obtained. This threshold decreases non-linearly with increasing load to ensure control rigor under high load conditions. A comparison logic unit is constructed between the maximum absolute value and the dynamic convergence threshold. The extracted extreme value index is input to one end of the comparator in real time, and the dynamic convergence threshold is input to the other end. Continuous state determination is performed. If the extreme value index is strictly less than the dynamic convergence threshold for N consecutive control periods, it is determined that the motor speed has entered the stable convergence range. In response to a true determination result, a high-level full-scale switching enable signal is generated. This signal serves as the sole permission instruction to trigger the final parameter replacement in step S7.5. If the extreme value index exceeds the dynamic convergence threshold at any time, or if the duration of continuous condition satisfaction is less than the preset number of cycles, the convergence condition is deemed not met. The response is considered false; the full-scale switching enable signal remains in a low-level invalid state, and the current intermediate control parameter group is locked. The system is forced to re-acquire the speed error in the next control cycle and repeat the above monitoring process. Through the dual verification mechanism of extreme value tracking and dynamic threshold, the speed error convergence sequence is transformed into a full-scale switching enable signal with high confidence, achieving a smooth, shock-free switching of PID parameters from the transient state to the target state, eliminating the risk of secondary oscillations caused by parameter mutations.

[0191] S7.5: In response to the full-scale switching enable signal, the complete proportional gain component, complete integral time component, and complete derivative time component in the preset compensation parameter group directly replace the current intermediate control parameter group to generate the target PID parameter group corresponding to the PID parameter update instruction and update it to the motor driver, thereby completing the final closed-loop switching of the adaptive tuning control action.

[0192] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this invention.

[0193] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains. The terms “first,” “second,” “third,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the elements or objects preceding “comprising” or “including” encompass the elements or objects listed following “comprising” or “including” and their equivalents, and do not exclude other elements or objects. The “multiple” mentioned in the embodiments of this application refers to two or more. A and / or B indicate three possibilities: A; B; and A and B.

[0194] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for adaptive tuning of PID parameters of a planetary geared motor based on transient power fluctuation identification, characterized in that, include: S1: The voltage of the power supply bus of the planetary gear motor is acquired in real time with a high sampling rate, and the inherent power ripple component in the preset frequency band is extracted through a bandpass filter to obtain a high-frequency ripple signal sequence. S2: Based on the high-frequency ripple signal sequence, perform improved Hilbert transform processing, demodulate to generate a continuous phase time series, and calculate the cumulative phase difference offset between adjacent sampling points to construct a phase change rate data stream; S3: Use a dynamic sliding window to perform local normalization modeling on the phase change rate data stream. If the preset phase jump judgment condition is met, generate a phase jump event identifier. S4: Perform timing alignment verification between the phase jump event identifier and the initial edge of the motor current response. If the absolute value of the current slope exceeds the preset current slope change threshold within a preset time window after the phase jump, then confirm the generation of a real disturbance source trigger signal. S5: Activate the disturbance fingerprint buffer in response to the trigger signal of the real disturbance source, and continuously capture the instantaneous frequency centroid shift of voltage ripple, the gradient of current harmonic distortion rate change and the differential peak value of encoder feedback angular velocity after the jump occurs, so as to obtain the disturbance feature fingerprint. S6: Input the disturbance feature fingerprint into the preset clustering center matching model obtained by offline training of historical high-quality tuning cases. If the matching condition is met, generate the PID parameter update instruction; otherwise, maintain the current control parameters.

2. The adaptive tuning method for PID parameters of a planetary geared motor based on transient power fluctuation identification according to claim 1, characterized in that, Also includes: S7: Execute a phased injection strategy based on the PID parameter update instruction. First, superimpose a preset compensation parameter group with a weight of 50%. After the motor speed error converges to within the threshold, switch to the target PID parameter group corresponding to the PID parameter update instruction.

3. The adaptive tuning method for PID parameters of a planetary geared motor based on transient power fluctuation identification according to claim 1, characterized in that, Step S3 specifically includes: A dynamic sliding window processing mechanism is constructed based on the phase change rate data stream. The window length parameter is adjusted online according to the real-time load rate of the planetary gear motor. The continuous phase change rate data stream is cut into local phase difference sequence segments containing several ripple periods to obtain the local phase difference sequence segments. Local normalization modeling is performed on the local phase difference sequence segment, and the standard deviation of the phase difference sequence is generated based on the dispersion index of the data within the sliding statistical calculation window. Based on the local phase difference sequence segment, perform symbol flip frequency statistical operation, detect the number of changes in the phase difference symbol between adjacent sampling points and normalize it to the flip rate per unit time to generate symbol flip frequency; Using a dynamic threshold that is adjusted online with the load rate as a decision criterion, a phase transition is determined based on the standard deviation of the phase difference sequence and the symbol flip frequency. When a preset phase transition determination condition is detected, a phase structure destruction event is determined to have occurred. In response to the determination result of the phase structure destruction event, a high-level pulse signal is generated, and the high-level pulse signal is encapsulated as the phase transition event identifier with a timestamp.

4. The adaptive tuning method for PID parameters of a planetary geared motor based on transient power fluctuation identification according to claim 3, characterized in that, The preset phase jump determination conditions include: The standard deviation of the phase difference sequence within the dynamic sliding window exceeds the preset upper limit threshold for standard deviation, and the phase difference sign flip frequency exceeds the preset lower limit threshold for sign flip frequency.

5. The adaptive tuning method for PID parameters of a planetary geared motor based on transient power fluctuation identification according to claim 3, characterized in that, The number of ripple cycles is three to eight.

6. The adaptive tuning method for PID parameters of a planetary geared motor based on transient power fluctuation identification according to claim 1, characterized in that, Step S4 specifically includes: Based on the timestamp of the phase jump event identifier, the real-time angular velocity data stream fed back by the planetary gear motor encoder is processed by differentiation to obtain the angular acceleration sequence; The torque back-calculation is performed using the angular acceleration sequence combined with the motor's moment of inertia parameters to generate estimated torque waveform data; The estimated torque waveform data is subjected to sliding differential processing within a preset time window after the phase jump event is identified, and the absolute value of the current slope characteristic is extracted. The absolute value of the current slope is compared with a reference threshold dynamically calculated based on the current load rate. If the absolute value of the current slope suddenly increases beyond the reference value, a disturbance confirmation flag is generated. In response to the valid state of the disturbance confirmation flag, a high-level pulse signal is output to generate the actual disturbance source trigger signal.

7. The adaptive tuning method for PID parameters of a planetary geared motor based on transient power fluctuation identification according to claim 1, characterized in that, Step S5 specifically includes: In response to the trigger signal of the real disturbance source, the disturbance fingerprint buffer is initialized and reset to generate a blank disturbance fingerprint buffer. Based on the blank perturbation fingerprint buffer, a fast Fourier transform is performed on the high-frequency ripple signal sequence to generate a voltage ripple instantaneous spectrum centroid offset sequence. Using the starting moment of the instantaneous frequency spectrum centroid offset sequence of the voltage ripple as a synchronization reference, harmonic decomposition calculation is performed on the motor stator current sampling data to generate a current harmonic distortion rate change gradient sequence. Based on the timestamp of the gradient sequence of the current harmonic distortion rate change, the feedback pulse of the photoelectric encoder is processed by differential and derivative to generate the differential peak scalar of the encoder feedback angular velocity; The voltage ripple instantaneous spectrum centroid offset sequence, current harmonic distortion rate change gradient sequence, and encoder feedback angular velocity differential peak scalar are normalized, mapped, and multidimensional vector spliced ​​to form a unique identifier, thereby generating the disturbance feature fingerprint.

8. The adaptive tuning method for PID parameters of a planetary geared motor based on transient power fluctuation identification according to claim 7, characterized in that, The voltage ripple instantaneous spectrum centroid offset sequence, current harmonic distortion rate variation gradient sequence, and encoder feedback angular velocity differential peak scalar are normalized, mapped, and multidimensional vector concatenated to generate the disturbance feature fingerprint, including: The instantaneous spectral centroid offset sequence of the voltage ripple is subjected to minimum-maximum normalization processing to compress its value to the [0,1] interval, thus obtaining the normalized spectral centroid offset sequence. The current harmonic distortion rate variation gradient sequence is synchronously scaled using the same normalization coefficient to obtain the normalized harmonic distortion rate variation gradient sequence. The differential peak scalar of the encoder feedback angular velocity is standardized by subtracting the mean from the historical operating conditions and dividing by the standard deviation to obtain the standardized differential peak scalar of the angular velocity. The normalized spectral centroid offset sequence, the normalized harmonic distortion rate variation gradient sequence, and the normalized angular velocity differential peak scalar are vector-stitched according to a preset electro-mechanical coupling order to construct an initial high-dimensional perturbation feature vector. Principal component analysis is performed on the initial high-dimensional perturbation feature vector to reduce its dimensionality, generating a low-dimensional and decorrelated perturbation feature fingerprint.

9. The adaptive tuning method for PID parameters of a planetary geared motor based on transient power fluctuation identification according to claim 1, characterized in that, The preset frequency band is 2–20kHz.

10. The adaptive tuning method for PID parameters of a planetary geared motor based on transient power fluctuation identification according to claim 1, characterized in that, The preset time window is 200μs, and the preset current slope change threshold is 150% of the reference value.