A torque compensation control method for a stirring motor of a kitchen waste treatment device

By extracting time-frequency domain features and performing unsupervised clustering in a food waste treatment device, a lightweight decision tree model is constructed, which solves the problems of response lag and energy consumption increase in the stirring motor control method when facing material changes, and achieves efficient and stable stirring control.

CN122345971APending Publication Date: 2026-07-07DONGGUAN GOLDENHOT PLASTIC & HARDWARE PROD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DONGGUAN GOLDENHOT PLASTIC & HARDWARE PROD CO LTD
Filing Date
2026-04-22
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

The existing control methods for the stirring motors in kitchen waste treatment equipment are difficult to adapt to the randomness and complex dynamic disturbances of material physical changes, resulting in weak generalization ability of parameter tuning results, slow response, increased energy consumption and mechanical structural impact, as well as problems of high computing power and high maintenance difficulty.

Method used

By acquiring the original signal and performing joint time-frequency domain feature extraction, an unsupervised clustering algorithm is used to classify the working conditions, and a lightweight decision tree model is constructed. A mapping relationship between a nine-dimensional low-order statistical feature vector and the optimal PID parameters is established, enabling rapid switching and smooth transition of dynamic PID parameters, thereby reducing algorithm complexity and computational resource consumption.

Benefits of technology

It enables rapid identification of operating conditions and improves the accuracy of torque compensation for the stirring motor and the robustness of the system under low-cost embedded resource conditions, reduces transient disturbances caused by control abrupt changes, and meets the real-time and stability requirements of household appliances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122345971A_ABST
    Figure CN122345971A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of kitchen garbage disposal equipment stirring motor torque compensation control method, to solve the problem of parameter adjustment lag and insufficient stability when coping with complex load change in traditional method. By high-frequency synchronization to obtain multi-source sensing signal, adaptive time window segmentation and feature cleaning are used, multi-dimensional statistical feature vector is extracted, and unsupervised clustering is used to determine the working condition category and generate the working condition-optimal PID parameter mapping table. Combined with lightweight decision tree, the working condition is quickly classified and the optimal parameters are matched, and the parameter soft switching mechanism is used to smooth the working condition transition, and the control effect is automatically optimized. This scheme significantly improves the load adaptability and operating stability of the stirring motor, reduces the difficulty of control parameter maintenance, and is suitable for garbage disposal equipment with dynamic and dramatic changes in load.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial process control and automated control technology for kitchen waste treatment equipment, and in particular to a torque compensation control method for a stirring motor in a kitchen waste treatment equipment. Background Technology

[0002] Currently, in food waste treatment equipment, especially in the field of torque compensation control for automated mixing motors, the mainstream control method widely adopts PID controllers based on single-variable feedback, and related parameters are set through manual experience or simple self-tuning strategies. In recent years, some high-end industrial equipment has introduced parameter adaptive algorithms, online identification models, or neural networks to dynamically adjust PID parameters. However, these methods usually rely on feedback information from a single path, such as speed error or output current feedback signals. Parameter updates are achieved through techniques such as least squares identification, pole placement, and model reference adaptation, or by relying on fixed disturbance tests and empirical rules for calibration. These methods generally lack a comprehensive and integrated analysis of the multi-dimensional load characteristics of the motor during the mixing process.

[0003] In existing technologies, a typical approach involves obtaining an empirical parameter library for different material operating conditions through offline calibration, and then using a feedback signal of the current operating condition (such as average current or speed instability) as a switching reference to achieve simple drifting or jumping between a limited set of parameters. This method is applicable to scenarios with mild load changes and fixed material properties, but it cannot well adapt to applications where the physical form of household kitchen waste changes randomly, drastically, and with complex dynamic disturbances. Some industry literature proposes methods such as multi-model switching, virtual disturbance injection, and integer parameter incremental stepping to improve adaptability or robustness, but these solutions often rely on high acquisition bandwidth, multi-signal synchronization, model reconstruction, or online optimization, which are difficult to meet the hardware resource and response speed requirements of low-cost, small-scale household kitchen waste disposal equipment.

[0004] The main problem with existing technology is that: First, most mainstream PID parameter tuning strategies are based solely on a single feedback signal from the stirring motor, neglecting the coordinated changes among multiple dimensions such as current, speed, and power. Due to the complexity of the stirring load, information from a single dimension cannot fully reflect different operating conditions such as material moisture, viscosity, and agglomeration, resulting in weak generalization ability of the parameter tuning results and making it difficult to extend to all dynamic scenarios in actual operation.

[0005] Secondly, when encountering sudden changes in material properties or strong nonlinear disturbances, on-demand switching methods relying solely on empirical parameter tables or offline calibration models typically exhibit lag in response, easily leading to torque compensation delays, increased energy consumption, and exacerbated mechanical structural impacts, failing to achieve the goals of high efficiency, energy saving, and equipment protection. Meanwhile, while intelligent algorithms such as online identification and deep learning adaptive methods theoretically offer superior parameter adaptability, they actually place high demands on embedded computing power and storage resources. Furthermore, the algorithm complexity and debugging / maintenance difficulties make them unsuitable for economical products such as those used in home applications.

[0006] Finally, most current solutions struggle to balance the speed and stability of dynamic system identification. On one hand, single-indicator-based operating condition criteria suffer from defects such as identification delays, parameter jitter, and switching stutters. On the other hand, while multi-model, neural network, or online optimization solutions have theoretical advantages, they face problems such as sample dependence, overfitting, weak interpretability, and high engineering implementation barriers in actual operation, which restricts their large-scale promotion and application.

[0007] Based on the above analysis, there is an urgent need for a control method that can integrate multi-dimensional load characteristics of the motor, quickly identify operating condition categories, and achieve dynamic PID parameter switching under low computing power conditions. This solution should possess the ability to perform adaptive tuning based on multi-source features without requiring model identification, neural network training, or external disturbance injection. It should be able to improve the torque compensation accuracy of the mixing motor and the overall robustness of the system under the limited embedded resources of household-grade kitchen waste treatment equipment. This would address the pain points of existing technologies, such as weak parameter generalization ability, limited real-time performance, and poor engineering adaptability, providing fundamental technical support for the realization of economical and efficient intelligent automated kitchen waste treatment equipment. Summary of the Invention

[0008] This application provides a torque compensation control method for the mixing motor of a kitchen waste treatment equipment, which aims to solve one of the problems or issues of the prior art mentioned in the background.

[0009] This application provides a method for torque compensation control of a mixing motor in a kitchen waste treatment device, specifically including: S1: Obtain the raw signal of the mixing motor of the kitchen waste treatment equipment during a continuous operating cycle, and extract the raw signal into a raw data window according to a preset time window length; S2: Perform time-frequency domain joint feature extraction processing on the original data window to calculate a nine-dimensional low-order statistical feature vector; S3: Based on the nine-dimensional low-order statistical feature vector accumulated during historical operation, an unsupervised clustering algorithm is used to divide the working condition categories and generate a working condition label mapping table corresponding to the cluster centers of each working condition category. S4: Based on the cluster centers and boundary distributions of each working condition category in the working condition label mapping table, construct a decision tree model and establish a mapping relationship between the nine-dimensional low-order statistical feature vector and the optimal PID parameter combination verified by offline calibration. S5: Input the nine-dimensional low-order statistical feature vector updated in real time into the decision tree model for inference calculation, and output the target working condition category and the corresponding target optimal PID parameter combination at the current moment; S6: Detect the cross-class transition trend of the nine-dimensional low-order statistical feature vector based on the target working condition category. If a transition trend is determined, the target optimal PID parameter combination corresponding to the next possible target working condition category will be smoothly transitioned to generate a dynamic PID parameter group to be executed. S7: Based on the dynamic PID parameter group to be executed, the torque compensation control loop of the stirring motor is adjusted in real time to output motor drive commands.

[0010] S8: Monitor the system response status after executing the motor drive command. If the control deviation is detected to exceed the preset tolerance range, record the abnormal log and re-trigger the extraction process of the nine-dimensional low-order statistical feature vector to complete the closed-loop feedback optimization.

[0011] The torque compensation control method for the mixing motor of a kitchen waste treatment equipment provided in this application has the following beneficial effects: (1) To address the technical shortcomings of existing kitchen waste treatment equipment, such as drastic fluctuations in motor load due to sudden changes in material state during drying and mixing, lag in response of traditional fixed-parameter PID control, and inaccurate torque compensation, this application proposes a novel PID parameter self-tuning path that abstracts dynamic load into an identifiable "time-sequence fingerprint," enabling rapid perception and accurate adaptation to complex operating conditions. Unlike mainstream methods that rely on model identification or deep learning frameworks, this scheme extracts 9-dimensional low-order time-frequency domain features within a 200ms time window based solely on the original signals of motor phase current, speed, and output power. It then uses unsupervised clustering to classify 5 typical load states and calibrates the corresponding optimal PID parameter groups offline, constructing a direct mapping relationship from load features to control parameters. Since no online training, gradient optimization, or additional sensor input is required, the entire inference process is completed by a lightweight decision tree, involving only integer comparisons and Boolean logic operations. This significantly reduces algorithm complexity and computational resource consumption, enabling the controller to run stably on a low-cost embedded MCU. This effectively overcomes the problems of poor real-time performance, high power consumption, and cumbersome debugging faced by traditional adaptive control strategies in actual deployment.

[0012] (2) Furthermore, this approach introduces a shallow decision tree based on cluster boundaries and a two-level caching mechanism, which significantly improves the smoothness of control switching and the dynamic response capability of the system. Traditional PID parameter switching often uses a hard lookup table method, which is prone to causing a step change in control quantity during operating condition transitions, resulting in mechanical shocks and energy consumption spikes. However, this scheme analyzes the transition patterns between various operating conditions in historical data, predicts the possible next state in the decision logic, and loads backup parameters into the auxiliary cache in advance. When the feature vector is detected to approach the inter-class boundary, a soft switching mechanism is activated to achieve a gradual transition of parameters, thereby greatly reducing the transient disturbances caused by control abrupt changes. At the same time, the depth of the decision tree is limited to within 4 layers to ensure that a single inference does not exceed tens of microseconds, meeting the requirements of high-frequency closed-loop control. This design completely avoids the high-cost computational steps in reinforcement learning, such as confidence assignment, manifold space mapping, and online optimization iteration. It features zero debugging cost and maintenance-free adaptability, making it particularly suitable for real-world working conditions in home environments with large power fluctuations, diverse usage habits, and frequent environmental interference. It effectively ensures stable stirring performance and energy efficiency of the equipment under different material compositions and moisture contents.

[0013] In summary, this solution constructs an adaptive PID control system that does not rely on complex algorithms or external hardware support through a simplified technical chain of "feature fingerprinting - clustering modeling - rule reasoning - cache preloading". While ensuring control accuracy and response speed, it greatly simplifies the engineering implementation difficulty and deployment threshold, and achieves an organic unity of robustness, real-time performance and economy, providing a replicable and scalable control paradigm for low-cost smart home appliances. Attached Figure Description

[0014] Figure 1 This is a main flowchart of a torque compensation control method for a mixing motor in a kitchen waste treatment device. Figure 2 This is a sub-flowchart of a torque compensation control method for a mixing motor in a kitchen waste treatment device; Figure 3 This is another sub-flowchart of a torque compensation control method for a mixing motor in a kitchen waste treatment device. Detailed Implementation

[0015] 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.

[0016] 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.

[0017] like Figure 1 As shown, this application provides a method for torque compensation control of a mixing motor in a kitchen waste treatment device, specifically including: S1: Acquire the raw signal of the mixing motor of the food waste treatment equipment during a continuous operating cycle, and extract the raw signal into a raw data window containing the complete load disturbance cycle according to a preset time window length. The raw signal includes: real-time phase current waveform, encoder feedback speed sequence, and instantaneous value of the driver output power.

[0018] S2: Perform time-frequency domain joint feature extraction processing on the original data window to calculate a nine-dimensional low-order statistical feature vector. This nine-dimensional low-order statistical feature vector includes the current envelope entropy and peak-to-valley ratio, the rate of change of the slope of the speed sliding standard deviation, the power zero-crossing density, and the pulse width variation coefficient.

[0019] S3: Based on the nine-dimensional low-order statistical feature vector accumulated during historical operation, an unsupervised clustering algorithm is used to divide the operating conditions into categories, and a working condition label mapping table corresponding to the cluster centers of each operating condition category is generated. The operating condition categories include: high-moisture pasty viscous state, medium-dry loose granular state, locally agglomerated and stuck state, lightly loaded state in the later stage of dehydration, and cavity transition state.

[0020] S4: Based on the cluster centers and boundary distributions of each working condition category in the working condition label mapping table, construct a lightweight decision tree model with a single-dimensional feature threshold criterion as the basis for node splitting, and establish a mapping relationship between the nine-dimensional low-order statistical feature vector and the optimal PID parameter combination verified by offline calibration.

[0021] S5: Input the nine-dimensional low-order statistical feature vector updated in real time into the lightweight decision tree model for inference calculation, and output the target working condition category and the corresponding target optimal PID parameter combination at the current moment.

[0022] S6: Detect the cross-class transition trend of the nine-dimensional low-order statistical feature vector based on the target working condition category. If a transition trend is determined, trigger the parameter soft switching mechanism to smoothly transition the target optimal PID parameter combination corresponding to the next possible target working condition category preloaded in the auxiliary cache to the main cache to generate a dynamic PID parameter group to be executed.

[0023] S7: The dynamic PID parameter group to be executed is synchronously loaded into the underlying PID calculation module to adjust the torque compensation control loop of the stirring motor in real time to output motor drive commands that adapt to the current multi-dimensional load characteristics.

[0024] S8: Monitor the system response status after executing the motor drive command. If the control deviation is detected to exceed the preset tolerance range, record the abnormal log and re-trigger the extraction process of the nine-dimensional low-order statistical feature vector to complete the closed-loop feedback optimization.

[0025] Step S1: Obtain the real-time phase current waveform, encoder feedback speed sequence, and instantaneous output power value of the mixing motor of the food waste treatment equipment during a continuous operating cycle. Then, extract the raw signals into a raw data window containing the complete load disturbance cycle, according to a preset time window length. Specifically, this includes: S1.1: Acquire the real-time phase current waveform, encoder feedback speed sequence, and instantaneous output power value of the mixing motor of the kitchen waste treatment equipment during a continuous operating cycle, and perform high-frequency synchronous sampling processing on the original signals to generate a discrete multi-source sensor data stream with a unified timestamp reference.

[0026] In this sub-step, the execution targets are the three real-time raw signals of the mixing motor of the kitchen waste treatment equipment during continuous operation cycles, which are respectively from the phase current sensor, encoder and driver power output acquisition channel.

[0027] By uniformly triggering and controlling the phase current sensor, encoder, and power acquisition channel, a high-frequency sampling sequence is initiated, capturing discrete samples of the instantaneous current signal value, speed encoding value, and instantaneous power output in each sampling cycle.

[0028] A unified time reference is applied to the three sampling actions using a global clock source, and a timestamp embedding operation is performed between sampling triggering and data writing to give the three signal samples a consistent time sequence identifier.

[0029] Timing alignment is performed on the three-channel sampled data. The sampling point positions of different signals on the time axis are adjusted by interpolation or resampling methods to achieve synchronous registration across signal channels.

[0030] A fixed-format data packaging method is adopted to stitch the aligned current, speed and power samples into a multi-source sensor data stream structure according to the time series, and add type flag bits and channel numbers to meet the input specifications of subsequent sliding statistics and window truncation operations.

[0031] By using high-frequency synchronous sampling and time-series alignment processing, the dispersed multi-source raw signals are transformed into a discrete multi-source sensor data stream with a unified timestamp reference, thus providing an accurate parallel data foundation for subsequent disturbance intensity analysis and time window optimization.

[0032] For example, a certain model of kitchen waste processing equipment's mixing motor is equipped with a three-phase current sensor (sampling accuracy 0.01A), a photoelectric encoder (resolution 2048 pulses / revolution), and a drive output power monitoring module (sampling accuracy 0.5W). The high-frequency sampling frequency is set to 4000Hz, and the global clock source is a 1kHz timer multiplier output. During sampling, current, speed, and power data are acquired simultaneously in each sampling cycle, and the three data streams are embedded using a synchronization marker with a timestamp accuracy of 0.25ms. The original data after sampling is linearly interpolated and resampled to ensure that the three signals are perfectly aligned at 0.25ms intervals. Finally, the data is packaged in chronological order to form a multi-source sensor data stream. For example, in a certain sampling frame, the current value is 2.37A, the speed value is 1350rpm, and the power value is 120.5W. The corresponding timestamp for this frame is 125.5ms, and the interval between consecutive frames in the sequence is 0.25ms. The data stream has been verified to meet the input synchronization requirements for subsequent disturbance intensity calculation, ensuring the reliability of load characteristic capture under different material conditions.

[0033] S1.2: Perform sliding statistical variance analysis based on the discretized multi-source sensor data stream to calculate the real-time disturbance intensity index characterizing the severity of load fluctuations, and use the real-time disturbance intensity index as the basis for dynamically adjusting the length of the time window.

[0034] Based on the discretized multi-source sensor data stream with a unified timestamp reference generated in step S1.1, sliding window buffers are established for the current, speed, and power signals respectively. The window length is determined by the sampling frequency and the preliminary estimate of the expected disturbance period. Real-time variance calculation is performed on each signal. The squared differences of all sampled values ​​within the current window and the window mean are accumulated and divided by the number of effective samples to obtain the instantaneous variance value, completing the preliminary quantification of the single-channel load fluctuation amplitude. Normalization is performed on the three instantaneous variance values ​​to make them comparable and fused under the same dimension. The normalization reference is selected as the mean and standard deviation of each signal type in historical data to ensure that the scale differences of different signal characteristics can be eliminated. The normalized instantaneous variance values ​​are weighted and summed. The weight configuration is based on the sensitivity ranking of each signal to load disturbance in the offline calibration. Signals with higher sensitivity are given larger weights to generate the original value of comprehensive disturbance intensity. The raw value of the overall disturbance intensity is subjected to exponential smoothing filtering to reduce the impact of short-term impulse disturbances on the overall intensity index and maintain a sensitive response to continuous fluctuations, outputting a smoothed real-time disturbance intensity index. The real-time disturbance intensity index is calculated using the following formula: Where I represents the real-time disturbance intensity index, and M represents the total number of dimensions of the sensor signals participating in the fusion. Let be the fusion weight coefficient for the i-th sensing dimension. This represents the window sampling point value at the j-th sampling point of the current sliding window. All windows The mean, The number of samples in the window is denoted as . Through the above processing method, the discretized multi-source sensor data stream from the previous step is transformed into a unified-dimensional disturbance intensity index that can be used to determine the dynamic adjustment of the time window length, thereby achieving a precise quantitative characterization of the severity of load fluctuations.

[0035] For example, in a kitchen waste treatment device with a rated power of 300W, the sampling frequency is set to 2000Hz, and the initial sliding window length is set to 400 sampling points. The normalized baseline mean of the current signal is 1.8A, and the standard deviation is 0.4A; the mean of the speed signal is 1500rpm, and the standard deviation is 60rpm; the mean of the power signal is 260W, and the standard deviation is 15W. The weighting coefficients are 0.5 for current, 0.3 for speed, and 0.2 for power. Within a certain window, the variance of current is 0.16A², the variance of speed is 2500rpm², and the variance of power is 40W². After normalization and weighted summation, the original value of the comprehensive disturbance intensity is 0.375. After exponential smoothing filtering, the real-time disturbance intensity index is 0.34. This metric has been proven in historical operation to significantly improve the accuracy of time window length adjustment, preventing insufficient or redundant window lengths in subsequent feature extraction due to sudden lags or rapid changes in loose states, thereby greatly improving the accuracy and response speed of dynamic PID self-tuning.

[0036] S1.3: The preset basic time window length is adaptively corrected using the dynamic adjustment criteria to generate the optimal time window length parameter that adapts to the frequency of change of the current operating condition, ensuring that the captured signal segment can cover a complete load disturbance cycle.

[0037] S1.4: Perform rolling truncation processing on the discretized multi-source sensor data stream according to the optimal time window length parameter to generate a multi-channel raw data window set containing the complete load disturbance cycle, thereby eliminating feature truncation or redundancy problems caused by fixed window length.

[0038] S1.5: Perform outlier removal and baseline drift correction on the multi-channel raw data window set to output a cleaned and aligned standardized raw data window, which serves as the sole valid input for subsequent time-frequency domain joint feature extraction.

[0039] Step S2: Perform time-frequency domain joint feature extraction processing on the original data window to calculate a nine-dimensional low-order statistical feature vector containing current envelope entropy and peak-to-valley ratio, speed sliding standard deviation slope change rate, power zero-crossing density, and pulse width variation coefficient. Specifically, this includes: S2.1: Perform Hilbert transform on the real-time phase current waveform to obtain the instantaneous amplitude sequence, and calculate the Shannon entropy value based on the instantaneous amplitude sequence to obtain the current envelope entropy parameter. At the same time, extract the ratio of the difference between the maximum and minimum values ​​in the instantaneous amplitude sequence to obtain the current peak-to-valley ratio parameter, thereby completing the quantitative characterization of the time-domain fluctuation characteristics of the current signal.

[0040] A Hilbert transform operation is performed on the discretized sequence of real-time phase current waveforms from the multi-channel raw data window set to generate the corresponding instantaneous amplitude sequence as the basic input object for subsequent statistical calculations.

[0041] By calculating the natural logarithmic distribution of the instantaneous amplitude sequence point by point and combining it with probability density estimation, a normalized probability distribution vector of the current amplitude is constructed.

[0042] The Shannon entropy is calculated based on the normalized probability distribution vector, using the following formula: in, The instantaneous amplitude of the current signal falls within the i-th interval x i The probability within, H is the current envelope entropy parameter.

[0043] Perform global maximum and minimum value retrieval processing on the instantaneous amplitude sequence to obtain the amplitude peak and valley values.

[0044] The peak-to-valley ratio parameter is calculated by dividing the difference between the peak and trough values ​​by the trough value, as shown in the following formula: Among them, A max A represents the maximum instantaneous amplitude. min R is the instantaneous minimum amplitude, R is the peak-to-valley ratio parameter, and A is the valley value.

[0045] The envelope entropy parameter and the peak-to-valley ratio parameter are bound together and encapsulated into a time-domain fluctuation characteristic data unit.

[0046] By calculating the Shannon entropy and peak-to-valley ratio, the real-time phase current waveform from the previous step is transformed into quantitative current envelope entropy and peak-to-valley ratio indices, thereby achieving a precise quantitative characterization of the time-domain fluctuation characteristics of the stirring motor current signal.

[0047] S2.2: Perform sliding window standard deviation operation on the encoder feedback speed sequence to generate a local discreteness sequence, and calculate the difference ratio of adjacent time steps based on the local discreteness sequence to obtain the speed sliding standard deviation slope change rate parameter, thereby completing the quantitative characterization of the dynamic response trend of the speed signal.

[0048] The encoder feedback speed sequence is input as data. The speed sequence is the measured speed of the stirring motor within the standardized raw data window output in step S1.5, which has the characteristics of uniform timestamp and fixed sampling interval.

[0049] The rotational speed sequence is segmented according to a preset sliding window length, and the standard deviation is calculated within each window. The local dispersion value is then calculated using the following formula: in, This represents the rotational speed sampled value at the i-th sampling point within the window. The mean within the window. For window length, This represents the local dispersion value within the sliding window w.

[0050] In a locally discrete sequence, the standard deviation of adjacent time steps is selected, and the difference ratio is calculated. The formula for the difference ratio is: By comparing the difference ratios of different windows, a complete sequence of the rate of change of the slope of the sliding standard deviation of rotational speed is generated.

[0051] Outlier detection is performed on the rate of change sequence to remove abrupt changes, and a bidirectional filter is used for smoothing to ensure the stability and repeatability of the output parameters.

[0052] The average or peak value of the processed rate of change sequence is taken as a single numerical parameter and defined as the rate of change parameter of the slope of the speed sliding standard deviation, forming an index that quantitatively characterizes the trend of the dynamic response of the speed.

[0053] Through the above chain of standard deviation calculation, differential ratio extraction, outlier detection and smoothing, the speed sequence of the previous step is transformed into stable and high-resolution dynamic response trend parameters, thereby achieving accurate quantification of the load fluctuation characteristics of the stirring motor.

[0054] S2.3: Perform zero-crossing detection processing on the instantaneous value of the driver output power to obtain the power zero-crossing density parameter by counting the number of symbol flips per unit time, and calculate the coefficient of variation of the effective pulse duration in the instantaneous value of the driver output power to obtain the power pulse width coefficient of variation parameter, thereby completing the quantitative characterization of the frequency domain distribution characteristics of the power signal.

[0055] S2.4: Based on the current envelope entropy parameter, current peak-to-valley ratio parameter, speed sliding standard deviation slope change rate parameter, power zero-crossing density parameter, and power pulse width variation coefficient parameter, perform vector splicing operation, and simultaneously include the remaining four derived statistics into the fusion range, finally generating a low-order statistical feature vector containing nine-dimensional components as direct input data for the operating condition classification model.

[0056] Based on the current envelope entropy parameter, current peak-to-valley ratio parameter, speed sliding standard deviation slope change rate parameter, power zero-crossing density parameter, and power pulse width variation coefficient parameter obtained through processing S2.1 to S2.3, a five-dimensional primary feature vector is constructed using a standardized numerical format. An element-level sequential arrangement operation is then performed under a unified timestamp reference to form an ordered feature group. The four derived statistics obtained from the previous stage calculation—including the root mean square value of the current signal, the peak factor of the speed signal, the average peak width of the power signal, and the skewness coefficient of the power signal—are normalized to eliminate dimensional differences. The normalized values ​​are then inserted sequentially into the end positions of the aforementioned five-dimensional primary feature vector according to fixed feature positions. A vector concatenation method is used to assemble the nine inserted normalized feature components into a low-order statistical feature vector of length nine in a predetermined order. During the generation process, an index mapping is established to clarify the physical meaning and source signal category of each feature component. A consistency verification process is performed on the concatenated nine-dimensional feature vector. By comparing the Euclidean norm of the feature vector with a preset norm threshold, it is determined whether there are abnormal amplitudes or quantization errors in the data. If the data passes the verification, it is encapsulated as an input data instance that can be directly called by the load condition classification model. Through the above vector concatenation and multi-source feature fusion processing, the distributed feature parameters of the previous step are transformed into a complete nine-dimensional low-order statistical feature vector, achieving the expected technical effect of unified expression of multi-dimensional load features and high-discrimination input.

[0057] like Figure 2 As shown, step S3: Based on the nine-dimensional low-order statistical feature vector accumulated during historical operation, an unsupervised clustering algorithm is used to divide the system into five operating condition categories: high-moisture pasty viscous state, medium-dry loose granular state, locally agglomerated and stuck state, lightly loaded state in the later stage of dehydration, and cavity transition state. A working condition label mapping table corresponding to the cluster centers of each operating condition category is then generated. Specifically, this includes: S3.1: Obtain the complete set of nine-dimensional low-order statistical feature vectors accumulated during historical operation, and perform outlier detection and data normalization processing on the set of nine-dimensional low-order statistical feature vectors to eliminate dimensional differences and remove abnormal data samples caused by instantaneous sensor failures, and generate a standardized feature training dataset as the input object of the unsupervised clustering algorithm.

[0058] The input object is the complete set of nine-dimensional low-order statistical feature vectors generated and accumulated in step S2. This complete set includes current envelope entropy, current peak-to-valley ratio, rate of change of speed sliding standard deviation slope, power zero-crossing density, power pulse width variation coefficient, and four derived statistics.

[0059] Outlier detection is performed on the entire set of nine-dimensional low-order statistical feature vectors. A method combining Euclidean distance and multidimensional box plots is adopted. First, the Euclidean distance of each feature vector relative to the geometric center of the entire set is calculated to generate a global distance sequence.

[0060] The interquartile range (IQR) is calculated based on the global distance sequence statistical distribution, and a multidimensional box-line criterion is constructed in each dimension. Samples that simultaneously meet the distance threshold and the multidimensional outlier threshold are identified as outliers and removed from the feature vector set.

[0061] After removing outliers, the nine-dimensional feature vector is normalized using the Z-score standardization strategy. The mean and standard deviation are calculated for each dimension, and the standardization is performed according to the following formula: in, These are the original eigenvalues. The mean of this dimension. The standard deviation of this dimension. This is the result of normalization.

[0062] After normalization, a dimensional consistency check is performed on all dimensions to ensure that the data distribution of each dimension is unbiased and uniformly covers the standardized interval [-3,3].

[0063] The standardized dataset is packaged in matrix form, with columns corresponding to nine-dimensional feature components and rows corresponding to time-series samples, serving as the input for the unsupervised clustering algorithm.

[0064] By using outlier detection and normalization, the feature extraction results from the previous step are transformed into a standardized feature training dataset that is free of anomalies and has consistent dimensions, thereby enhancing the reliability and comparability of the clustering input data.

[0065] For example, a kitchen waste treatment device collected 12,000 sets of nine-dimensional low-order statistical feature vectors during a five-day continuous drying and stirring process. The mean current envelope entropy was 2.85 with a standard deviation of 0.37, and the mean power zero-crossing density was 15.2 with a standard deviation of 3.1. When performing outlier detection, the Euclidean distance of each sample was calculated based on the geometric center coordinates of the entire set. The maximum distance was found to be 8.95. Using the IQR method, an outlier threshold of 6.2 was set, and 187 outlier samples were removed. The remaining 11,813 samples were normalized using the Z-score. For example, in the current envelope entropy dimension, a sample with an original value of 3.14 had a normalized value of 0.78 calculated as (3.14-2.87) / 0.37. After normalization, all dimensional distributions fall within the range of [-3,3], forming a standardized feature matrix of 11813×9. This matrix serves as the input for the subsequent K-means++ clustering algorithm, significantly improving the robustness and stability of the clustering model's input data.

[0066] S3.2: Based on the standardized feature training dataset, the initial cluster center positions are calculated using an improved K-means++ initialization strategy, and the intra-cluster squared error objective function is minimized through an iterative optimization process. The standardized feature training dataset is then automatically divided into five mutually exclusive feature clusters, corresponding to five working condition categories: high-humidity pasty viscous state, medium-dry loose granular state, locally agglomerated and stuck state, late-stage dehydration light-load state, and cavity transition state.

[0067] Based on a standardized feature training dataset, the nine-dimensional low-order statistical feature vectors of each sample are loaded and parsed, and an index table is built to access the data values ​​of each dimension one by one.

[0068] An improved K-means++ initialization strategy is adopted, which introduces feature dimension-weighted Euclidean distance calculation during the candidate center generation process to improve the distribution balance of the initial centers.

[0069] Based on the weight calculation, the cumulative squared distance from the sample to the selected center is evaluated, and the next center point is selected using the probability distribution function until a preset number of initial cluster center positions are generated.

[0070] Using the generated initial center positions as the starting point of the iterative optimization process, the objective function of minimizing the intra-cluster squared error is performed, where the objective function takes the form: in Let be the feature vector of the i-th sample. Let be the center vector of the k-th cluster. For the number of clusters, Let be the sample set of the k-th cluster.

[0071] During the iteration, the cluster labels are updated using the Euclidean distance matrix from all samples to each center, and the centroid position of each cluster is recalculated after each iteration until the magnitude of the change in the center position is lower than the preset convergence threshold.

[0072] Through iterative optimization, the standardized feature training dataset is automatically divided into five mutually exclusive feature clusters, and each feature cluster is assigned a unique working condition category label, including high-humidity pasty viscous state, medium-dry loose granular state, locally agglomerated stuck state, lightly loaded state in the later stage of dehydration, and cavity transition state.

[0073] By optimizing the initialization of unsupervised clustering and processing the convergence of the objective function, the standardized feature training dataset from the previous step is transformed into five clusters of working conditions with clear classification and stable statistical distribution, thereby realizing the classification of working condition classes for the multidimensional load characteristics of the stirring motor.

[0074] For example, during the operation cycle of a certain food waste treatment equipment, 20,000 nine-dimensional low-order statistical feature samples were collected. After standardization, the data range was between [-1.5, 1.5]. When using the improved K-means++ strategy, the minimum Euclidean distance between the initial center points reached 2.8, thereby avoiding the reduction in convergence speed caused by center clustering. Assuming the number of clusters K is 5, the initial value of the objective function J is 845.3. After 12 iterations, it decreased to 32.7, and the change in center position was less than the threshold of 0.003, achieving convergence. The final output of five cluster types includes: a high-moisture, pasty, viscous cluster with 4120 samples; a medium-dry, loose, granular cluster with 3860 samples; a locally agglomerated, stuck cluster with 2950 samples; a lightly loaded cluster in the later stage of dehydration with 4600 samples; and a cavity transition cluster with 3470 samples. The results showed significantly improved classification stability and cluster fit in subsequent working condition cluster center extraction and PID parameter mapping.

[0075] S3.3: Perform multidimensional centroid convergence calculation on the five feature clusters that have been divided, extract the geometric center coordinate vector of each feature cluster in nine-dimensional space, and define the geometric center coordinate vector as the cluster center feature vector of the corresponding working condition category to characterize the statistical average characteristics of the load fluctuation of the stirring motor under the working condition.

[0076] S3.4: Based on the feature vector of the cluster center of the working condition and the optimal PID parameter combination verified by offline calibration, establish a bidirectional association index, and encapsulate the unique identifier of each working condition category with the feature vector of the cluster center of the working condition and the corresponding optimal PID parameter combination in a structured manner to generate a basic mapping record unit containing the working condition definition and control parameters.

[0077] Based on the feature vectors of the cluster centers of the five working condition categories output by the S3.3 sub-step in the nine-dimensional feature space and the corresponding optimal PID parameter combinations obtained in the offline calibration stage, a unique identifier for each working condition category is defined as an index key to ensure the uniqueness and retrieval of the data structure.

[0078] The unique identifier is structurally bound to the feature vector of the cluster center of the working condition. A key-value pair binding strategy is adopted to make the nine-dimensional feature vector a complete description of the load fluctuation statistical characteristics of the working condition category.

[0079] The unique identifier is structurally bound to three control parameters—target proportional gain coefficient, target integral time constant, and target derivative time constant—that have been verified through offline calibration, and this binding relationship is kept consistent with the aforementioned feature vectors to form a bidirectional association index.

[0080] A serialization encapsulation algorithm is adopted to combine the unique identifier, the feature vector of the working condition cluster center, and the optimal combination of PID parameters into a basic mapping record unit that can be directly called. During the encapsulation process, the data type of the parameter set is solidified and memory aligned to adapt to the fast retrieval logic of the embedded controller.

[0081] Consistency checks are performed on the encapsulated basic mapping record units. By comparing the correspondence between the index key and the feature vector and control parameters, redundant or erroneous records are eliminated to ensure the determinism and uniqueness of the mapping. Through the above-described structured association indexing process, the operating condition clustering results from the previous step are transformed into a set of basic record units that can be directly used for control command generation, achieving a fast and accurate mapping from operating condition categories to control parameters.

[0082] For example, in a commercial 30L capacity food waste treatment device, the unique identifier for the high-moisture, viscous, pasty state condition is C1. The parameter values ​​of each dimension of its cluster center feature vector are 0.45, 3.8, 2.1, 15, 0.32, 4.2, 3.1, 8, and 0.27, respectively. The corresponding optimal PID parameter combination, verified through offline calibration, is a proportional gain coefficient of 1.6, an integral time constant of 0.85 seconds, and a derivative time constant of 0.12 seconds. A bidirectional associative index is used to establish a mapping relationship between C1 (feature vector) and C1 (PID parameter combination), forming a basic mapping record unit. This unit is stored in the embedded MCU memory as a continuous structure with a fixed address offset, resulting in a retrieval latency of less than 0.5 milliseconds. When this record unit is applied, the real-time inference module directly retrieves the PID parameter combination through the C1 index and loads it into the controller register, significantly improving the torque compensation response time, significantly reducing the system steady-state deviation, and maintaining stable stirring efficiency and reduced energy consumption under this condition.

[0083] S3.5: Summarize all generated basic mapping record units, serialize and format them according to the logical order of working condition categories, and construct a working condition label mapping table with fast retrieval capabilities. This table serves as the sole authoritative data source for setting the node splitting threshold and binding the leaf node parameters in the subsequent lightweight decision tree model.

[0084] In this sub-step, the basic mapping record unit output from S3.4 is used as the sole input object. By performing ordered processing on the unique identifier, the feature vector of the working condition cluster center, and the corresponding optimal PID parameter combination within the record unit, a logically consistent sequence data structure is formed. Based on the numerical or lexicographical order of the working condition category identifier, a multi-field stable sorting operation is performed to ensure that all record units of the same category remain continuously arranged in the sequence and maintain the original relative positional relationship of their internal fields. The sorted sequence data structure is then formatted for storage using a predefined data table schema. The unique identifier field is mapped to the primary key column, the working condition cluster center feature vector field is mapped to a fixed-length nine-dimensional vector column, and the optimal PID parameter combination field is mapped to a named control parameter column, ensuring that each column is arranged in a compact byte layout in physical storage to shorten the retrieval path. For the formatted data table structure, an index file is constructed, and a fast location mechanism based on a hash table is generated. By converting the unique identifier into a hash index value, constant-time retrieval capability is achieved, and an auxiliary inverted index divided by feature dimensions is generated simultaneously to support low-dimensional feature value range queries. After the indexing mechanism is built, the data tables and index files are bound and stored in a designated non-volatile storage area. A segmented loading strategy and page caching management mechanism are adopted to ensure that node splitting threshold settings and leaf node parameter binding can be achieved with minimal CPU load and shortest I / O latency during the subsequent decision tree model construction. Through serialization, field mapping storage, and indexing mechanism construction, the basic mapping record units of the previous step are transformed into a work condition label mapping table with fast retrieval and authoritative data source attributes, achieving efficient support for the node threshold setting and PID parameter combination binding of the subsequent lightweight decision tree model.

[0085] For example, in the offline calibration dataset of a household kitchen waste treatment device, the number of basic mapping record units generated in stage S3.4 is 50. The category identifiers are as follows: high-moisture pasty viscous state (1), medium-dry loose granular state (2), locally agglomerated stuck state (3), late-dehydration lightly loaded state (4), and cavity transition state (5). A stable sorting is performed according to the numerical order of the category identifiers, placing the record unit with identifier 1 at the beginning of the sequence. Each mapping record unit contains a nine-dimensional cluster center feature vector and three parameters: proportional gain, integral time constant, and differential time constant. The proportional gain value is between 0.8 and 1.5, the integral time constant is between 0.1 and 0.3 seconds, and the differential time constant is between 0.005 and 0.02 seconds. When the sorted record units are mapped and stored in the named control parameter column, a 32-byte fixed-length floating-point storage is used for the nine-dimensional vector, and three columns of 8-byte floating-point storage are used for the PID parameters, ensuring a total row length of 128 bytes. When constructing a hash index, the identifier is used as the key, and the index value is calculated using a multiplicative hash algorithm with a multiplication factor of 31. For example, the index value of a record cell with an identifier of 3 is calculated using the formula: Where k is an integer value for the category identifier, the efficient positioning offset is calculated. Finally, it was verified that after loading the working condition label mapping table, the decision tree model can complete the retrieval and loading of PID parameter combinations for leaf nodes within 2 microseconds during a single inference process, significantly improving the response speed of dynamic PID parameter switching and ensuring the accuracy of working condition classification.

[0086] like Figure 3 As shown, step S4: Based on the cluster centers and boundary distributions of each work condition category in the work condition label mapping table, a lightweight decision tree model is constructed using a single-dimensional feature threshold criterion as the basis for node splitting. A mapping relationship is established between the nine-dimensional low-order statistical feature vector and the optimal PID parameter combination verified offline. Specifically, this includes: S4.1: Based on the cluster center feature vectors of the five types of working conditions in the working condition label mapping table, the boundary envelope calculation is performed on the distribution range of the nine-dimensional low-order statistical feature vectors of each type of high-moisture pasty viscous state, medium-dry loose granular state, locally agglomerated stuck state, light load state in the later stage of dehydration, and cavity transition state, so as to generate a set of working condition feature boundaries containing the maximum and minimum values ​​of each dimension feature.

[0087] Based on the completed working condition label mapping table in the input conditions, the cluster centers of the nine-dimensional low-order statistical feature vectors of the five working condition categories are extracted as the basis for calculation.

[0088] For each typical working condition, a dimension traversal operation is performed on the nine-dimensional low-order statistical feature vector to extract all sample values ​​of current envelope entropy, peak-to-valley ratio, speed sliding standard deviation slope change rate, power zero-crossing density, power pulse width variation coefficient, and the remaining four derived statistics.

[0089] For each dimension of feature sample values, a range scan is performed to calculate the maximum and minimum values ​​of that dimension of feature, and the results are bound to the corresponding working condition category identifier in the form of structured records.

[0090] Using the boundary envelope calculation method, a minimum outer cube model for each type of working condition is constructed in a nine-dimensional feature space, and the coordinates of each boundary are determined by the above maximum and minimum values.

[0091] Vertex alignment and boundary redundancy removal operations are performed on each cube model to eliminate redundant and overlapping boundary information in the same dimension between different working condition categories, forming a simplified set of working condition feature boundaries.

[0092] By using boundary envelope calculation and redundancy removal, the working condition label mapping table result from the previous step is transformed into a quantifiable set of working condition feature boundaries containing the maximum and minimum values ​​of each dimension, thereby achieving precise definition of the distribution range of different working condition categories.

[0093] For example, for the high-humidity, viscous, pasty working condition category, its nine-dimensional low-order statistical feature vector has sample values ​​ranging from 0.52 to 0.61 in the current envelope entropy dimension, from 1.25 to 1.48 in the peak-to-valley ratio dimension, and from 0.85 to 1.02 in the speed sliding standard deviation slope change rate dimension. The boundary envelope of this category in the three-dimensional feature subspace is constructed using the maximum and minimum values. The boundary envelope volume is calculated using the following formula: Here, V represents the boundary envelope volume of this three-dimensional subspace, and the product terms correspond to the span values ​​of the operating condition in the three dimensions of current envelope entropy, peak-to-valley ratio, and rate of change of the slope of the speed sliding standard deviation, respectively. The calculated V is used to measure the compactness of the boundaries of different categories. Using this method, the node splitting of the decision tree construction for high-humidity, viscous states and high-boundary compactness categories can be more accurate, enabling the subsequent decision tree model to achieve significantly improved operating condition discrimination performance and parameter mapping accuracy within a finite depth.

[0094] S4.2: Based on the overlapping or spaced regions of adjacent two working condition categories in the set of working condition feature boundaries, perform single-dimensional feature separation analysis to select the key discriminative feature dimensions that can maximize the distinction between different working condition categories and generate a list of key discriminative features.

[0095] In this specific embodiment, for any two adjacent working condition categories in the working condition feature boundary set, such as "high-humidity pasty viscous state" and "medium-dry loose granular state", each dimension of the nine-dimensional low-order statistical feature vector is traversed sequentially. In each dimension, the overlapping area and interval distance of the feature value distribution ranges of the two categories are calculated, and a quantified separation index is calculated based on this, for example, using the Jensen-Shannon divergence or overlap coefficient of the probability density distribution curves of the two categories in that dimension. Subsequently, according to a preset feature importance threshold, the separation indices calculated for all dimensions are sorted, and dimensions with separation indices significantly higher than the threshold are selected, generating a list of key discriminant feature dimensions arranged from high to low separation.

[0096] S4.3: Utilizing the numerical distribution characteristics of each key discriminant feature dimension in the key discriminant feature list, the optimal split point is determined by using a binary method or a maximum information gain strategy, in order to construct a single-dimensional feature threshold criterion for node splitting and generate an initial decision tree node rule base.

[0097] Based on the already selected list of key discriminant features, the numerical distribution range corresponding to each key discriminant feature dimension is used as the initial analysis object and loaded into the segmentation strategy processing module.

[0098] For each key discriminative feature dimension, a frequency histogram construction operation is performed, dividing the feature values ​​in the continuous domain into several subdivision intervals with a fixed resolution, and counting the occurrence frequency of samples of different working conditions in each interval to form a category spectrum matrix.

[0099] Based on the category spectrum matrix, cumulative frequency calculation is performed to detect the dominant interval of each working condition category in this feature dimension, and a distribution balance evaluation index is established to determine whether the binary method is suitable for threshold segmentation.

[0100] For the feature dimensions that meet the distribution balance assessment index, a dichotomy method is used to determine the split point. By calculating the difference in class purity within the left and right partitions, the position with the largest difference in class purity is selected as the optimal threshold. The difference in class purity can be calculated using the following formula: Among them, P left With P right These represent the proportions of the target operating condition categories in the left and right partitions, respectively.

[0101] For feature dimensions with uneven distribution or severe class overlap, a maximum information gain strategy is adopted. The optimal split point is determined by calculating the entropy change of the sample set before and after the split. The information gain can be calculated using the following formula: Where H(S) is the entropy of the dataset before splitting, and S v Let IG be the v-th subset after splitting, IG be the information gain, S be the set of parent node samples to be split, and H(S) be the subset of samples to be split. v S represents the sample set of the v-th child node after the split. v The entropy.

[0102] The optimal segmentation results of the binary search method and the information gain strategy are stored in the node rule generation queue respectively, and rule metadata is generated using the feature dimension index, threshold value and selected strategy type as association keys.

[0103] The above rule metadata is formatted to form the initial decision tree node rule base, which serves as the sole input basis for the subsequent assembly of the lightweight decision tree model.

[0104] By using a binary search method or information gain processing, the key discriminative feature list from the previous step is transformed into a rule set with numerical threshold criteria, thereby realizing the construction of the initial node rule base and providing a precise splitting basis for the structured assembly of the decision tree.

[0105] For example, the numerical distribution range of the key discriminant feature "current envelope entropy" is 0.25 to 0.65. A frequency histogram is constructed with a resolution of 0.01. It is found that the difference in purity between the partition categories is greatest around the threshold of 0.43. The optimal split point ΔP = 0.48 is determined by the bisection method. For the key discriminant feature "speed sliding standard deviation slope change rate", the numerical distribution range is 1.2 to 2.0. There is obvious overlap in the category distribution. The maximum information gain strategy is adopted. The entropy before splitting is calculated as H(S) = 1.58. The weighted sum of the entropy after splitting is 1.12, and the information gain is IG = 0.46. The above thresholds and strategy types are written into the rule metadata. After formatting, the rule metadata includes feature index, current envelope entropy threshold of 0.43, strategy type bisection, speed slope change rate threshold of 1.68, and strategy type information gain, forming an initial decision tree node rule base that can be used for node splitting. When assembling a lightweight decision tree using this rule base, real-time feature vectors can be mapped to corresponding leaf nodes in milliseconds, enabling instant switching of PID parameters based on dynamic load identification.

[0106] S4.4: Based on the single-dimensional feature threshold criteria in the rule base of the initial decision tree node, hierarchical assembly and pruning optimization are performed according to the constraint that the tree depth does not exceed four layers, so as to construct a lightweight decision tree model with a complete topology and generate a logical judgment network with a complete path.

[0107] For the single-dimensional feature threshold criteria extracted from the rule base of the initial decision tree node, the set of working condition feature boundaries and the list of key discriminant features are loaded as input objects for node construction.

[0108] Each single-dimensional feature threshold criterion is assigned to different levels of the tree according to the priority sequence of its respective key discriminant feature dimension. The priority is determined by the ranking of the quantitative score values ​​of the discriminant dimension in the separation analysis.

[0109] The threshold criteria assigned to each level are assembled from top to bottom, and the criteria within the same level are divided into left and right child nodes according to mutual exclusion relationship to form a preliminary topology that meets the tree depth constraint.

[0110] In the initial topology, pruning optimization is performed on the parent node of each leaf node. The pruning criterion is that the number of leaf nodes matches the number of target working condition categories and that the accuracy of redundant paths is not improved in continuous test samples.

[0111] The pruned and optimized topology is updated synchronously with the original threshold criteria. The memory space of tree nodes is compressed by replacing the node references of redundant paths, so as to generate a logical judgment network with a complete transmission path.

[0112] Through the hierarchical assembly and pruning process described above, the single-dimensional feature threshold criterion of the previous step is transformed into a lightweight decision tree model that meets the embedded computing power constraints and has full path determination capabilities, thereby achieving rapid inference for working condition classification and PID parameter mapping.

[0113] For example, in the nine-dimensional low-order statistical feature vector of the food waste mixing motor, the separation score of the current envelope entropy is 4.8, the score of the rate of change of the slope of the sliding standard deviation of the speed is 4.5, and the score of the power zero-crossing density is 4.2. These scores are assigned to the first, second, and third layers of the tree according to priority. The threshold criteria for the first-layer nodes are: current envelope entropy < 0.43; for the second-layer nodes, the threshold is: rate of change of the slope of the sliding standard deviation of the speed > 1.8; and for the third-layer nodes, the threshold is: power zero-crossing density < 12. The initially assembled tree has a depth of three layers and six leaf nodes. The pruning criterion for the parent node is calculated using the formula based on the change in the accuracy of the decision path over 100 consecutive samples. in, and represents the accuracy of the i-th sample before and after pruning, respectively, where n is the total number of samples. Pruning is performed when the formula result is 0. After optimization, the number of leaf nodes is reduced to 5, memory usage is reduced to 72% of the original, and the average inference time is significantly improved. Millisecond-level condition determination and PID parameter mapping are achieved on the embedded MCU.

[0114] S4.5: Bind the optimal PID parameter combination verified by offline calibration to the leaf nodes of the lightweight decision tree model, establish an end-to-end mapping relationship from the input path of the nine-dimensional low-order statistical feature vector to the output result of the target optimal PID parameter combination, so as to generate the final executable parameter mapping decision tree.

[0115] The optimal PID parameter combination, verified offline, from the operating condition label mapping table is used as the binding object and input into the lightweight decision tree logic network that has completed topology optimization.

[0116] For each leaf node of the decision tree, parameter binding is performed. The unique operating condition category identifier corresponding to the leaf node is stored in a one-to-one correspondence with the target proportional gain coefficient, target integral time constant, and target derivative time constant in the operating condition label mapping table, ensuring that the association between the leaf node and the control parameters is unique and searchable.

[0117] The control parameter values ​​during the binding process are formatted and encoded, and mapped to the addressable register address of the embedded controller using an integer indexing method, thereby eliminating floating-point storage errors and shortening inference loading latency.

[0118] An end-to-end mapping path is constructed. After the nine-dimensional low-order statistical feature vector is progressively passed to the terminal leaf node through the node splitting criterion, the bound parameter combination is directly called as the logical output, realizing a closed-loop logic chain from feature input to control parameter output.

[0119] Consistency checks are performed on the output process of the end-to-end mapping path. During the inference phase, the parameter combination of the selected leaf node is verified to be completely consistent with the standard values ​​in the working condition label mapping table. If they are consistent, the output is allowed; otherwise, an error log is triggered to prevent parameter drift.

[0120] By binding and verification, the decision tree model structure from the previous step is transformed into an executable parameter mapping decision tree with the ability to identify operating conditions and output control parameters in real time, thereby achieving millisecond-level dynamic PID parameter switching and stable operation under low computing power conditions.

[0121] For example, in the drying and mixing stage of a household kitchen waste treatment device, the nine-dimensional low-order statistical feature vector is [0.42, 1.85, 0.33, 28, 0.57, 0.48, 0.39, 0.44, 0.51]. The operating condition category corresponding to the leaf node reached by the lightweight decision tree inference path is "local blockage and lag state". The optimal PID parameter combination bound to this category in the operating condition label mapping table is a proportional gain coefficient of 1.6, an integral time constant of 1 / 2 + 0.5 seconds, and a derivative time constant of 0.25 seconds. The binding process encodes the above three parameters into a register address index sequence [08H, 09H, 0AH], which is directly written to the corresponding register of the controller during the inference stage. The results show that under this working condition, the transient response time of the stirring motor is significantly shortened compared with that of the fixed PID parameters, the steady-state amplitude fluctuation is reduced, the mechanical impact intensity is significantly suppressed, and the total energy consumption of the system is significantly reduced compared with the initial stage. This verifies that the end-to-end mapping method of binding the leaf nodes of the decision tree to the optimal parameter combination has accurate adaptation and stable execution effect.

[0122] Step S5: Input the real-time updated nine-dimensional low-order statistical feature vector into the lightweight decision tree model for inference calculation, and output the target operating condition category and the corresponding optimal PID parameter combination for the current moment. Specifically, this includes: S5.1: Obtain the nine-dimensional low-order statistical feature vector updated in real time as the inference input data, and load the nine-dimensional low-order statistical feature vector into the root node of the lightweight decision tree model to start the working condition classification inference process based on the single-dimensional feature threshold criterion.

[0123] S5.2: Based on the node splitting rules preset within the lightweight decision tree model, the key dimensions such as current envelope entropy, speed sliding standard deviation slope change rate, and power zero crossover density in the input nine-dimensional low-order statistical feature vector are subjected to step-by-step Boolean logic comparison operations to generate an intermediate decision result sequence representing the transmission path of the feature vector in the tree structure.

[0124] The nine-dimensional low-order statistical feature vector passed from the previous step is loaded into the root node of the lightweight decision tree inference module, and the key discriminative feature dimension indices in the preset node splitting rule set are read sequentially. For the current envelope entropy dimension, the threshold comparison operator is called to perform a Boolean operation on the corresponding component in the feature vector and the threshold stored in the node rules to obtain a Boolean value indicating whether the current feature meets the splitting condition. This Boolean value is used as the branch selection basis for the current node, locking the entry index position of the next layer node, and the feature component corresponding to the speed sliding standard deviation slope change rate dimension is loaded into the comparison operator. For this speed feature component, a double-condition comparison of upper and lower bounds is performed based on the numerical range in the node rule base to generate a second Boolean value indicating whether it is within the current operating condition boundary. This Boolean value is combined with the previous branch judgment result to form a two-dimensional condition combination for the current path, which is used as the criterion input for the splitting of the next layer node. On the power zero crossover density dimension, the corresponding numerical value of the feature vector is extracted, and the threshold comparison operator is called through MAP mapping to output a third Boolean value. The three Boolean values ​​are sorted according to a predetermined path order and stored as an intermediate decision result sequence, ensuring that the path is complete and unambiguous during node traversal. By performing hierarchical Boolean comparison operations on three types of features—current, speed, and power—the continuous feature recognition actions are transformed into a path decision sequence that can be depth-traversed, achieving accurate path description of the nine-dimensional low-order statistical feature vector in the tree structure.

[0125] Through the above-mentioned three-dimensional hierarchical comparison and Boolean decision processing method, the feature vector of the previous step is transformed into an intermediate decision result sequence that represents its specific transmission path in the lightweight decision tree structure, thereby improving the path positioning accuracy and eliminating computational redundancy in the working condition category reasoning.

[0126] For example, considering a scenario where a food waste treatment device operates under high-moisture, viscous conditions, the current envelope entropy in the nine-dimensional low-order statistical feature vector is 0.37, the rate of change of the speed sliding standard deviation slope is 2.15, and the power zero-crossing density is 18. In the node rule base, the current envelope entropy threshold is set to 0.43, the upper and lower bound thresholds for the rate of change of speed are [1.80, 2.30], and the power zero-crossing density threshold is 20. The current envelope entropy comparison calculation is then performed. The boolean value is set to true. Enter the rotation speed node and perform upper and lower bound checks: Determine if the Boolean value is true. Enter the power node and perform a comparison: The Boolean value is determined to be true. The resulting intermediate decision sequence is [true, true, true], corresponding to the root node-left child node-left child node path of the decision tree. The operating condition category label bound to the leaf node of this path is high-humidity viscous pasty state, and the associated optimal PID parameter combination is proportional gain 1.25, integral time constant 0.85, and derivative time constant 0.15. The inference results have been verified to significantly improve the stability and control accuracy of the stirring motor torque compensation response under this operating condition.

[0127] S5.3: Based on the intermediate judgment result sequence, guide the nine-dimensional low-order statistical feature vector to perform a depth traversal in the lightweight decision tree model until the leaf node that meets the termination condition is reached, thereby determining the target working condition category label to which the current load state of the stirring motor belongs.

[0128] The intermediate decision result sequence generated by S5.2 is used as the traversal guidance condition to perform deep path selection on the decision result of the root node of the lightweight decision tree model and maintain the state record throughout. For each intermediate decision result, the internal path indexer of the model is called to read the address of the next-level child node corresponding to the result, and the current nine-dimensional low-order statistical feature vector is passed to the child node to perform the node threshold determination operation. When the Boolean output of the threshold determination is true, the right branch is entered along the current path; when the corresponding Boolean output is false, the left branch is entered, and the node number and feature dimension identifier are recorded synchronously in the path stack. Combining the historical node information in the path stack with the current node determination value, the next level node rule call is triggered in sequence to realize the layer-by-layer transmission of the nine-dimensional low-order statistical feature vector in the tree structure and the cumulative update of feature dimension discrimination. For each step of feature dimension discrimination operation, a conditional branch priority strategy is adopted, prioritizing the dimension marked as the highest priority in the key discrimination feature list to ensure fast convergence to the target leaf node within the shallow depth tree structure. During the discrimination process, when a node is a leaf node and the termination condition flag is true, the traversal ends and the category identifier of that leaf node is output as the target operating condition category label to which the current load state of the mixing motor belongs. Through the above depth traversal and termination condition judgment processing method, the intermediate judgment result sequence of the previous step is transformed into a deterministic operating condition category label, realizing an efficient mapping from real-time feature vectors to operating condition recognition.

[0129] For example, in a 450W rated power food waste treatment device, the real-time collected nine-dimensional low-order statistical feature vector includes current envelope entropy (0.46), current peak-to-valley ratio (1.32), speed sliding standard deviation slope change rate (2.05), power zero-crossing density (58), power pulse width variation coefficient (0.21), and four other derived feature values. In the lightweight decision tree model, the root node threshold criterion is set to current envelope entropy < 0.43, which results in a false Boolean output and entry into the left branch; the second-level node threshold criterion is speed sliding standard deviation slope change rate > 1.8, which results in a true Boolean output and entry into the right branch; the third-level node criterion is power zero-crossing density > 50, which results in a true Boolean output, the path enters the right branch and reaches the leaf node, and the leaf node category identifier corresponds to "local blockage state". The node sequence {(current envelope entropy, left), (speed sliding standard deviation slope change rate, right), (power zero-crossing density, right)} is recorded in the path stack, and the final output operating condition category label is "local blockage state". This tag is used in subsequent steps to retrieve the corresponding optimal PID parameter combination that has been verified offline. The verification results show that under stuck conditions, the torque response time is significantly shortened, the speed deviation fluctuation is significantly reduced, and the system stability is greatly improved.

[0130] S5.4: Use the determined target operating condition category label to query the pre-stored operating condition label mapping table, retrieve the optimal PID parameter combination that is uniquely bound to the target operating condition category label and verified by offline calibration, so as to complete the mapping conversion from operating condition identification to control parameters.

[0131] The input data consists of the target operating condition category label determined by S5.3 and the operating condition label mapping table stored in the non-volatile storage unit inside the controller.

[0132] The target working condition category label is input as the retrieval key value into the mapping table index module, and key value location based on hash table is performed to obtain the cluster center record unit uniquely bound to the label.

[0133] Extract the optimal proportional gain coefficient, integral time constant, and derivative time constant triplet corresponding to the offline calibration verification of the cluster center record unit.

[0134] Perform a consistency check on the extracted PID parameter triplet, comparing its version number with the parameter version number supported by the current execution environment. If they match, proceed to the next processing step; otherwise, call the version conversion function to perform format mapping on the parameters.

[0135] The verified PID parameter triplet is converted into a unified register mapping format to ensure that the subsequent underlying driver interface can be loaded seamlessly.

[0136] Through the above steps, the target operating condition category identification results of the previous step are transformed into parameter combinations that can be directly applied to the PID controller, achieving a rapid mapping effect from operating condition identification to control parameters.

[0137] For example, in a commercial kitchen waste treatment device with a rated power of 750W, the target operating condition category label is determined to be "local caking and stagnation state" by S5.3. The mapping table index module uses this label as the search key to locate the cluster center record unit, where the offline-calibrated optimal PID parameter triplet is a proportional gain coefficient Kp=2.5, an integral time constant Ti=0.8 seconds, and a derivative time constant Td=0.15 seconds. After performing a consistency check, the triplet version number matches the supported version of the current control firmware, requiring no conversion processing. The register mapping format conversion module maps Kp, Ti, and Td to control register addresses 0x1A, 0x1B, and 0x1C respectively. In this embodiment, Kp, Ti, and Td are mapped to a register-recognizable fixed-point format using the following conversion formulas: Where Kp reg The value is stored in the register, Kp is the scaling gain coefficient, and the multiplier of 100 is used to amplify the floating-point value to a fixed-point integer format. Calculations show that Kp... reg =250; Ti reg =80; Td reg =15. After loading the PID parameters in this register format to the underlying arithmetic module via the control bus, the torque compensation response of the system under lag state is significantly improved, the mechanical shock amplitude is significantly reduced, and the energy consumption performance is improved.

[0138] S5.5: Output the retrieved target optimal PID parameter combination as the final inference result, and pass the target optimal PID parameter combination to the subsequent parameter soft switching mechanism module to drive the dynamic adjustment of the stirring motor torque compensation control loop.

[0139] Obtain the optimal PID parameter combination that is uniquely bound to the target operating condition category and verified offline, obtained from step S5.4, and load this parameter combination into the inference result buffer in the form of a structured array.

[0140] The optimal PID parameter combination in the buffer is subjected to a three-way separation process, in which the proportional gain coefficient, integral time constant, and derivative time constant are sequentially resolved into independent control variables.

[0141] The resolved proportional gain coefficients are mapped to the proportional channel of the parameter soft switching mechanism, the integral time constant is mapped to the integral channel, and the derivative time constant is mapped to the derivative channel to form a three-way parallel parameter transmission link.

[0142] During the mapping process, a binding table containing register address indexes and parameter values ​​is generated according to the interface specification of the soft switching mechanism to ensure that the addressing of the transmission link matches that of the next-level module.

[0143] The completed three-way parameter transmission link and binding table are transmitted to the input buffer of the parameter soft switching mechanism module to realize the real-time parameter delivery from working condition identification to dynamic adjustment.

[0144] Through the parameter transmission link and binding processing method described above, the category identification result of the previous step is transformed into an executable PID control variable, thereby realizing the dynamic adjustment of the torque compensation control loop of the stirring motor.

[0145] For example, on a 450W food waste treatment device, the target operating condition is detected as "local agglomeration and stagnation." The optimal PID parameter combination is found to be a proportional gain coefficient of 0.85, an integral time constant of 1.2 / 1 - 0.05 seconds, and a derivative time constant of 0.015 seconds. After performing ternary separation processing, the proportional gain coefficient is mapped to the proportional channel, the calculated integral time constant is mapped to the integral channel, and the derivative time constant is mapped to the derivative channel. The register address of the proportional gain coefficient in the binding table is 0x1A, the register address of the integral time constant is 0x1B, and the register address of the derivative time constant is 0x1C. After loading the binding table and parameter data into the soft switching mechanism input buffer, the mechanism can complete a smooth switch within 200ms, ultimately forming a new PID controller instance in the underlying driver module. In actual operation, the torque fluctuation amplitude is significantly reduced, the response time is greatly improved, and the stirring shaft speed is stabilized within the target value ±1 rpm range. Verification results show that the system's energy consumption is significantly reduced under stagnation conditions.

[0146] Step S6: Based on the target operating condition category, detect the cross-class transition trend of the nine-dimensional low-order statistical feature vector. If a transition trend is determined, trigger the parameter soft switching mechanism to smoothly transition the target optimal PID parameter combination corresponding to the next possible target operating condition category preloaded in the auxiliary cache to the main cache to generate a dynamic PID parameter group to be executed. Specifically, this includes: S6.1: Obtain the target operating condition category label at the current moment and the historical operating condition category label at the previous moment, and perform a logical XOR comparison process on the target operating condition category label and the historical operating condition category label to generate an operating condition transition trigger flag indicating whether the operating condition state has changed as an input condition for subsequent trend analysis.

[0147] S6.2: Based on the state when the working condition transition trigger flag is true, extract the real-time coordinates of the current nine-dimensional low-order statistical feature vector in the nine-dimensional space, and calculate the Euclidean distance sequence between the real-time coordinates and the feature vectors of the cluster centers of adjacent working conditions that are not in the current working condition category, so as to generate a working condition convergence quantification index that characterizes the possibility of the load evolving into other typical working conditions.

[0148] The working condition transition trigger flag obtained through S6.1 is set to true as the execution condition input. The coordinate data of the current nine-dimensional low-order statistical feature vector is loaded into the feature vector processing module, ensuring that the coordinate data is a standardized numerical sequence that has undergone normalization and outlier removal. Numerical pairing operations are performed sequentially on each component of the standardized nine-dimensional vector, mapping them to the axial positions of the nine-dimensional spatial coordinate system to form a real-time coordinate point data structure with a sequence index. The cluster center retrieval interface is called to exclude the cluster center feature vector corresponding to the current target working condition category from the working condition label mapping table, retaining the set of cluster center feature vectors of all adjacent non-current working condition categories as the reference sample set for distance calculation. For each cluster center feature vector in the reference sample set, Euclidean distance calculation is performed, and the distance calculation results are output in the order of the reference cluster center sequence to form an Euclidean distance sequence. Minimum and mean values ​​are then calculated to characterize the comprehensive degree of load movement to other working condition categories in the nine-dimensional space.

[0149] This comprehensive numerical value is encapsulated into a quantifiable indicator of working condition proximity, bound to a timestamp and corresponding working condition category label, serving as the sole input for subsequent threshold comparisons and trend judgments. Through Euclidean distance calculation based on multidimensional coordinate differences and cluster center references, the spatial proximity between the current feature vector and the potential target working condition category is quantified into an indicator suitable for threshold determination, achieving a closed-loop chain derivation from the working condition transition trigger flag to the quantifiable indicator of working condition proximity.

[0150] For example, when a commercial food waste treatment equipment is operating in the later stages of drying, the current nine-dimensional low-order statistical feature vector is [0.42, 1.85, 0.63, 0.48, 2.10, 0.91, 1.05, 0.37, 1.80]. The target operating condition category is the light-load state in the later stage of dehydration, and the corresponding cluster center vector is [0.40, 1.82, 0.60, 0.45, 2.05, 0.88, 1.02, 0.35, 1.78]. The operating condition label mapping table is used to retrieve adjacent cluster centers that are not in the current category, such as the vector for the cavity transition state [0.55, 1.95, 0.70, 0.50, 2.20, 0.95, 1.10, 0.40, 1.85]. The Euclidean distance is calculated for this reference center, and the result is 0.218. The distance sequence [0.218, 0.301, 0.280, 0.265] is repeatedly calculated for cluster centers other than the current category. The minimum value of 0.218 corresponds to the cavity transition state, and the mean is approximately 0.266. This mean is used as a quantitative indicator of operating condition convergence, bound to a timestamp and the current operating condition label, for use in the next threshold comparison. Verification results show that this indicator exhibits a continuous decreasing trend as the load changes from a light load state to a cavity state, indicating that the equipment can identify the operating condition transition trend in advance, thereby driving subsequent soft switching of PID parameters to achieve significantly improved response speed and stability.

[0151] S6.3: The operating condition approach quantification index is compared with the preset transition warning threshold. If the operating condition approach quantification index is determined to be less than the transition warning threshold, it is confirmed that there is a cross-class transition trend of feature vector. Based on this, the optimal PID parameter combination bound to the next possible operating condition category is retrieved from the operating condition label mapping table as a preloaded candidate PID parameter group as the target data source for soft switching.

[0152] Obtain the comparison input set consisting of the operating condition approach quantification index and the preset transition warning threshold, and load the Euclidean distance calculation result and threshold constant corresponding to the current nine-dimensional low-order statistical feature vector.

[0153] Perform size comparison operations on each of the Euclidean distance sequences, call the numerical comparison function to generate a Boolean decision vector, and mark the feature vector states that meet the threshold conditions.

[0154] The Boolean decision vector is indexed and matched according to the working condition category dimension. The set of non-current working condition category indices with a similarity lower than the threshold is selected to form the next possible working condition candidate set.

[0155] The candidate set spatial coordinates are compared with the category identifiers in the working condition label mapping table to retrieve the candidate working condition category label corresponding to the minimum distance between the coordinates.

[0156] Locate the storage unit from the working condition label mapping table according to the unique index of the candidate working condition category label, read and decode the bound preloaded candidate PID parameter group, and assemble the proportional gain coefficient, integral time constant and derivative time constant into a soft switching target parameter group data structure.

[0157] By using the above processing method, the distance calculation output of the previous step is transformed into a target candidate PID parameter set that meets the soft switching conditions, so as to realize the early adaptation to dynamic load changes and smooth switching preparation.

[0158] For example, when the stirring motor is currently operating in a "medium-dry, loose, granular state," the Euclidean distance between the nine-dimensional feature vector and the cluster center of the "locally agglomerated and stuck state" is 1.45, and the distance between it and the cluster center of the "high-moisture, pasty, viscous state" is 2.36. The preset transition warning threshold is 1.50. This embodiment uses a comparison formula: in For Euclidean distance This is a threshold constant. When the calculated result is 1.45, it is less than the threshold of 1.50, indicating a potential cross-class transition trend. After comparing with the operating condition label mapping table, the next possible operating condition is confirmed as "local blockage and hysteresis state." The bound pre-loaded candidate PID parameter group is retrieved, with a proportional gain coefficient of 2.8, an integral time constant of 0.65 seconds, and a derivative time constant of 0.025 seconds, constituting a soft-switching target data source. After performing this step, the system can prepare control parameters matching the next operating condition in advance, significantly improving the response speed and stability during load changes.

[0159] S6.4: Perform linear interpolation fusion operation on the currently active PID parameter group stored in the main cache and the preloaded candidate PID parameter group stored in the secondary cache, and gradually adjust the values ​​of the proportional gain coefficient, integral time constant and derivative time constant according to the preset time slice weight coefficient to generate a smooth evolution dynamic PID parameter sequence including intermediate transition states.

[0160] S6.5: Write the latest frame of parameter data in the smooth evolution dynamic PID parameter sequence into the main buffer area to overwrite the original active PID parameter group, and output the updated parameter set as the dynamic PID parameter group to be executed to the underlying control interface, thereby completing the smooth parameter transition without impact and eliminating the step disturbance of control quantity caused by sudden load changes.

[0161] The latest frame of parameter data in the smoothly evolving dynamic PID parameter sequence is used as the execution object to determine the numerical state of three key control variables. The proportional gain coefficient, integral time constant, and derivative time constant are address-mapped according to register arrangement rules to generate a parameter index set matching the underlying control interface. This latest frame of data is structured and encapsulated and written to the main cache area. An atomic overwrite operation replaces the currently effective PID parameter group, ensuring that no partial updates or delayed loading occur during the data writing process. The cache management logic synchronously refreshes the version number of the main cache within the same control cycle after the write operation is completed, so that the downstream real-time control module can identify the effective priority of the new parameter group. The version number and the updated parameter set are passed as a composite output object to the underlying control interface, triggering the driver to perform torque compensation adjustment based on the latest operating parameters. Through this non-blocking parameter update mechanism, the dynamically interpolated parameter sequence output in the previous step is transformed into stable and complete execution parameter data, achieving the elimination of control quantity step disturbances under sudden load changes.

[0162] For example, in a scenario where the load on the stirring motor transitions from a loose, particulate state to a locally agglomerated, stuck state, the latest frame of the smoothly evolving dynamic PID parameter sequence contains a proportional gain coefficient Kp = 1.85, an integral time constant Ti = 0.42 seconds, and a derivative time constant Td = 0.08 seconds. Kp, Ti, and Td are mapped to the driver's internal register addresses 0x21, 0x22, and 0x23, respectively, generating an index set {0x21, 0x22, 0x23}. During write operations, a double-buffering mechanism ensures that the three registers are overwritten within a single control cycle, avoiding the mixing of old and new parameters in the control calculation. After the parameter update, the main cache version number is increased from 112 to 113, and the downstream control module directly loads the new parameter set the instant the version number changes. In this scenario, the underlying controller corrects the speed deviation based on the new parameter set and outputs modulated motor drive commands. Verification shows a significant reduction in torque fluctuation and mechanical shock is suppressed to within a safe threshold.

[0163] Step S7: Synchronously load the dynamic PID parameter group to be executed into the underlying PID calculation module to adjust the torque compensation control loop of the stirring motor in real time to output motor drive commands adapted to the current multi-dimensional load characteristics. Specifically, this includes: S7.1: Obtain the dynamic PID parameter set to be executed output by the previous level logic, parse the three key control variables contained therein, namely the target proportional gain coefficient, the target integral time constant, and the target derivative time constant, and map the three key control variables into a register address index sequence that can be recognized by the underlying motor driver, so as to complete the addressing preparation of the control parameters.

[0164] The dynamic PID parameter set to be executed, output by the previous stage's soft-switching mechanism, is used as input. This set includes three key control variables: proportional gain coefficient, integral time constant, and derivative time constant. All values ​​are offline calibrated and have undergone smooth evolution calculations. The dynamic PID parameter set is deconstructed, separating and extracting the three control variables and identifying them as P, I, and D parameter components to avoid assembly ambiguity in subsequent register mapping. Type matching and range validity checks are performed on each parameter component. Values ​​that do not conform to the acceptance range of the underlying driver are intercepted or have their boundaries corrected to prevent hardware execution anomalies. Based on the register mapping specification of the underlying motor driver, a parameter name-to-driver register address lookup table is used to map the proportional gain coefficient to a preset proportional register index, the integral time constant to a preset integral register index, and the derivative time constant to a preset derivative register index, forming a register address index sequence. This register address index sequence is sorted according to execution priority to ensure that the proportional, integral, and derivative parameters are loaded in a manner that balances the dynamic stability and initialization safety of the control loop. By forming a structured mapping set of parameter-address pairs using the aforementioned register address index sequence and parameter component values, the addressing of control parameters is prepared, providing a precise location basis for the non-disruptive hot update of the underlying PID calculation module. Through register mapping and parameter validity verification, the result of the previous step is transformed into hardware-recognizable and execution-safe register address index data, enabling the addressable and highly reliable loading of the dynamic PID control parameters to be executed in the driver.

[0165] For example, in a commercial food waste treatment device, the PID proportional gain coefficient is 1.25, the integral time constant is 0.48 seconds, and the derivative time constant is 0.06 seconds. In the device driver register specification, the proportional register address is 16H, the integral register address is 17H, and the derivative register address is 18H. The proportional gain coefficient value of 1.25 is validated and confirmed to be within the allowable range [0.1, 5.0], and directly mapped to register 16H; the integral time constant of 0.48 seconds is validated and confirmed to be within the allowable range [0.05, 1.0] seconds, and mapped to register 17H; the derivative time constant of 0.06 seconds is validated and confirmed to be within the allowable range [0.01, 0.2] seconds, and mapped to register 18H. A register address index sequence {16H, 17H, 18H} is formed, and loading preparation is performed in the order of proportional, integral, and derivative. In this embodiment, the following formula is used for proportional gain coefficient boundary checks: Where P is the proportional gain coefficient, the max function ensures that the value is not lower than the lower limit, and the min function ensures that the value is not higher than the upper limit. The value processed by the formula is mapped to register index 16H to achieve hardware compatibility and execution stability. In the device operation verification, the process of loading the register address index sequence takes less than 1ms and no abnormal driver response occurs, ensuring that the torque compensation control performance of the stirring motor under dynamic load is significantly improved.

[0166] S7.2: Based on the register address index sequence, atomically overwrite the current proportional gain coefficient, current integral time constant and current derivative time constant in the underlying PID calculation module. The double buffer mechanism ensures that the parameter group is updated without disturbance within a single control cycle, so as to generate a real-time updated PID controller instance with the ability to adapt to the latest operating conditions.

[0167] S7.3: Using the real-time updated PID controller example, the deviation signal between the real-time speed feedback signal from the encoder and the preset target speed command is processed by parallel proportional amplification, integral accumulation and derivative prediction to calculate the original value of the composite control quantity containing transient response component, steady-state error elimination component and overshoot suppression component, so as to construct a preliminary torque adjustment benchmark.

[0168] The input objects are the real-time updated PID controller instance that was atomically overwritten and generated in step S7.2, and the deviation signal consisting of the real-time speed feedback signal from the encoder and the preset target speed command value.

[0169] The deviation signal is input to the proportional gain channel in the real-time updated PID controller instance, and linear amplification is performed according to the current proportional gain coefficient to obtain the transient response component. The value of the proportional gain coefficient is determined based on the smooth interpolation fusion result of step S6.

[0170] The same deviation signal is input into the integration operation channel, and discrete-time integration accumulation is performed according to the current integration time constant. The accumulation and sum are used to eliminate steady-state error components. The integration time constant is set based on the parameter set matched by the latest operating condition identification tag.

[0171] The deviation signal is input into the differential operation channel, and differential prediction processing is performed according to the current differential time constant. The predicted component is used to suppress the future overshoot trend. The value of the differential time constant is also derived from the target dynamic PID parameter group.

[0172] The proportional gain processing result, integral accumulation processing result, and derivative prediction processing result are subjected to vector summation within the controller to form the original value of the composite control quantity. This composite control quantity includes transient response components, steady-state error elimination components, and overshoot suppression components.

[0173] The composite control quantity can be calculated using the following formula: Where u is the original value of the composite control quantity, and K p K is the proportional gain coefficient. i K is the integral gain coefficient. d Here, e(t) is the differential gain coefficient, e(t) is the deviation signal at the current moment, and Δt is the sampling period. This represents the original value of the composite control quantity at time t.

[0174] By using proportional amplification, integral accumulation, and derivative prediction processing, the PID parameter mapping result from the previous step is transformed into a composite control quantity raw value containing three response components, thereby realizing the basic quantitative input for regulating the torque of the stirring motor.

[0175] S7.4: The original value of the composite control quantity is subjected to amplitude limiting filtering and dead zone compensation correction processing to eliminate invalid high-frequency jitter components caused by sensor noise or mechanical backlash, and the corrected control quantity is converted into the expected torque command value corresponding to the motor phase current to generate the final motor drive command that meets the safe operating boundary of the power device.

[0176] S7.5: Based on the final motor drive command, the switching duty cycle signal of the three-phase bridge inverter circuit is generated by the space vector pulse width modulation algorithm, which drives the stator winding of the stirring motor to generate an electromagnetic torque that matches the current food waste load characteristics, so as to achieve precise closed-loop tracking and dynamic torque compensation control of the stirring shaft speed.

[0177] Using the final motor drive command value output from the preceding sub-step S7.4 as input, the desired torque command value is loaded into the torque-current mapping interface of the Space Vector Pulse Width Modulation (SVPWM) generation module to establish a direct correlation between the target torque and the phase current amplitude. The desired torque command is then subjected to inverse processing of the three-phase motor mathematical model to calculate the equivalent components of the target three-phase voltage vector in the two-phase stationary coordinate system (α-β). The phase voltage values ​​are then converted into orthogonal coordinate components according to the Clarke transform formula. The following transformation formula is used: as well as Among them, V A V B V CThese represent the three-phase voltage command values, with α and β being two-phase quadrature components. Based on the α and β components, the amplitude and phase of the target space voltage vector are constructed. Sector determination logic is used to determine the SVPWM sector number where the current reference vector resides, and vector decomposition calculations are performed to obtain three sets of switching times: T1, T2, and zero vector duration T0. The above switching time sequence is periodically normalized and converted into the duty cycle percentage of the corresponding bridge arm, ensuring that the total duty cycle matches the PWM cycle. The normalized duty cycle command is written into the PWM register of the three-phase bridge inverter according to the bridge arm mapping relationship, triggering a hardware synchronization update event so that the power devices load the new switching strategy within the same PWM cycle. By driving the inverter's three-phase output terminals to generate voltage vectors with corresponding amplitude and phase, this acts on the stator windings of the stirring motor, forming an electromagnetic torque highly matched to the current food waste load characteristics, achieving precise closed-loop tracking and dynamic torque compensation control of the stirring shaft speed.

[0178] Through the chained processing method of spatial vector transformation, sector determination, switching time calculation and duty cycle register loading, the final motor drive command generated in the previous step is transformed into a high-efficiency three-phase PWM switching signal, realizing the precise drive and stable torque output of the stirring motor under dynamic load.

[0179] For example, in a household kitchen waste treatment device, the target torque command value is set to 2.5 N·m, and the target phase voltage values ​​are obtained by reverse calculation as V. A =220 V、V B =215 V、V C =210 V, obtained by Clarke transform. α =127.8V, V β =74.2 V, the target vector is located in sector 3. Calculate the switching times T1=1.2 ms, T2=0.9 ms, T0=0.9 ms, and normalize them to the duty cycle D within the PWM period of 2 ms. A =0.6、D B =0.45, D C =0.35, and written to the inverter control board via the register. Actual measurements showed that under this operating condition, the stirring motor speed remained stable at the set 1500 rpm, and the torque fluctuation did not exceed 0.05 N·m, verifying the effectiveness of this sub-step in significantly improving torque control accuracy and system response speed under load variations.

[0180] Step S8: Monitor the system response status after executing the motor drive command. If a control deviation exceeds the preset tolerance range, record the anomaly log and re-trigger the extraction process of the nine-dimensional low-order statistical feature vector to complete the closed-loop feedback optimization. Specifically, this includes: S8.1: Obtain the actual speed sequence of the stirring motor and the target speed setpoint after the motor drive command is output by the underlying PID calculation module, and perform differential calculation on the actual speed sequence and the target speed setpoint to generate a real-time control deviation signal that characterizes the control accuracy at the current moment.

[0181] S8.2: Based on the real-time control deviation signal, the sliding window root mean square algorithm is used to perform statistical feature calculation on the deviation data within a preset time period to generate a comprehensive control deviation quantification value that reflects the system fluctuation amplitude.

[0182] S8.3: Compare the quantized value of the comprehensive control deviation with the preset tolerance threshold stored in the controller memory. If the quantized value of the comprehensive control deviation exceeds the preset tolerance threshold, a control abnormality trigger flag is generated; otherwise, the current dynamic PID parameter group to be executed remains unchanged.

[0183] S8.4: In response to the generated control anomaly trigger flag, the non-volatile storage interface is called to package the anomaly data, which includes the current integrated control deviation quantization value, the corresponding nine-dimensional low-order statistical feature vector, and the target operating condition category, and write it to the anomaly log storage area to generate historical anomaly log records that can be used for subsequent offline analysis.

[0184] S8.5: Based on the historical abnormal log records that have been written, a forced reset command is sent to the data acquisition module to re-trigger the extraction process of the nine-dimensional low-order statistical feature vector, so that the system skips the regular sampling interval and immediately enters the new raw data window interception stage to complete the closed-loop feedback optimization.

[0185] 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.

[0186] 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.

[0187] 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 torque compensation control of a mixing motor in a kitchen waste treatment device, characterized in that, Specifically, it includes: S1: Obtain the raw signal of the mixing motor of the kitchen waste treatment equipment during a continuous operating cycle, and extract the raw signal into a raw data window according to a preset time window length; S2: Perform time-frequency domain joint feature extraction processing on the original data window to calculate a nine-dimensional low-order statistical feature vector; S3: Based on the nine-dimensional low-order statistical feature vector accumulated during historical operation, an unsupervised clustering algorithm is used to divide the working condition categories and generate a working condition label mapping table corresponding to the cluster centers of each working condition category. S4: Based on the cluster centers and boundary distributions of each working condition category in the working condition label mapping table, construct a decision tree model with a single-dimensional feature threshold criterion as the basis for node splitting, and establish a mapping relationship between the nine-dimensional low-order statistical feature vector and the optimal PID parameter combination verified by offline calibration. S5: Input the nine-dimensional low-order statistical feature vector updated in real time into the decision tree model for inference calculation, and output the target working condition category and the corresponding target optimal PID parameter combination at the current moment; S6: Detect the cross-class transition trend of the nine-dimensional low-order statistical feature vector based on the target working condition category. If a transition trend is determined, the target optimal PID parameter combination corresponding to the next possible target working condition category will be smoothly transitioned to generate a dynamic PID parameter group to be executed. S7: Based on the dynamic PID parameter group to be executed, the torque compensation control loop of the stirring motor is adjusted in real time to output motor drive commands.

2. The method for torque compensation control of a mixing motor in a kitchen waste treatment device according to claim 1, characterized in that, After step S7, the following is included: S8: Monitor the system response status after executing the motor drive command. If the control deviation is detected to exceed the preset tolerance range, record the abnormal log and re-trigger the extraction process of the nine-dimensional low-order statistical feature vector to complete the closed-loop feedback optimization.

3. The method for torque compensation control of the mixing motor in a kitchen waste treatment device according to claim 1, characterized in that, Step S3 specifically includes: Obtain the complete set of nine-dimensional low-order statistical feature vectors accumulated during historical operation, and perform outlier detection and data normalization on the set of nine-dimensional low-order statistical feature vectors to generate a standardized feature training dataset. Based on the standardized feature training dataset, the standardized feature training dataset is divided into several mutually exclusive feature clusters. Multidimensional centroid convergence calculation is performed on the feature clusters respectively, and the geometric center coordinate vector of each feature cluster in nine-dimensional space is extracted. The geometric center coordinate vector is defined as the cluster center feature vector of the corresponding working condition category. A bidirectional association index is established based on the feature vector of the cluster center of the working condition and the optimal PID parameter combination verified by offline calibration. The unique identifier of each working condition category, the feature vector of the cluster center of the working condition, and the corresponding optimal PID parameter combination are structurally encapsulated to generate a basic mapping record unit containing the working condition definition and control parameters. The basic mapping record units are aggregated and serialized and formatted according to the logical order of the working condition categories to construct the working condition label mapping table.

4. The method for torque compensation control of the mixing motor in a kitchen waste treatment device according to claim 3, characterized in that, The operating conditions include: high-moisture pasty viscous state, medium-dry loose granular state, locally clumped and stuck state, light-load state in the later stage of dehydration, and cavity transition state.

5. The method for torque compensation control of the mixing motor in a kitchen waste treatment equipment according to claim 4, characterized in that, The standardized feature training dataset is divided into several mutually exclusive feature clusters, including: Based on the standardized feature training dataset, the initial cluster center positions are calculated using an improved K-means++ initialization strategy. The intra-cluster squared error objective function is minimized through an iterative optimization process, and the standardized feature training dataset is automatically divided into five mutually exclusive feature clusters, corresponding to the five working condition categories: high-humidity pasty viscous state, medium-dry loose granular state, locally agglomerated and stuck state, lightly loaded state in the later stage of dehydration, and cavity transition state.

6. The method for torque compensation control of the mixing motor in a kitchen waste treatment equipment according to claim 4, characterized in that, Step S4 specifically includes: Based on the cluster center feature vector of the working condition, the boundary envelope calculation is performed on the distribution range of the nine-dimensional low-order statistical feature vectors of each of the following states: high-moisture pasty viscous state, medium-dry loose granular state, locally agglomerated stuck state, light-load state in the later stage of dehydration, and cavity transition state. This generates a set of working condition feature boundaries containing the maximum and minimum values ​​of each dimension of features. Based on the overlapping or interval regions of two adjacent working condition categories in the working condition feature boundary set on each dimension of the nine-dimensional low-order statistical feature vector, perform single-dimensional feature separation analysis to screen out the key discriminative feature dimensions that can maximize the distinction between different working condition categories and generate a list of key discriminative features. By utilizing the numerical distribution characteristics of each key discriminant feature dimension in the key discriminant feature list, the optimal split point is determined using a binary method or a maximum information gain strategy. A single-dimensional feature threshold criterion for node splitting is constructed, and an initial decision tree node rule base is generated. Based on the single-dimensional feature threshold criteria in the rule base of the initial decision tree node, the decision tree model is constructed by hierarchical assembly and pruning optimization according to preset constraints. The optimal PID parameter combination verified offline is bound to the leaf node of the decision tree model, establishing an end-to-end mapping relationship from the input path of the nine-dimensional low-order statistical feature vector to the output result of the target optimal PID parameter combination.

7. The method for torque compensation control of a mixing motor in a kitchen waste treatment device according to claim 6, characterized in that, The constraint condition is that the tree depth does not exceed four levels.

8. The method for torque compensation control of the mixing motor in a kitchen waste treatment equipment according to claim 4, characterized in that, Step S6 includes: Obtain the target operating condition category label at the current moment and the historical operating condition category label at the previous moment, and perform a logical XOR comparison process on the target operating condition category label and the historical operating condition category label to generate an operating condition transition trigger flag indicating whether the operating condition state has changed. Based on the state when the working condition transition trigger flag is true, extract the real-time coordinates of the current nine-dimensional low-order statistical feature vector in the nine-dimensional space, and calculate the Euclidean distance sequence between the real-time coordinates and the feature vectors of the cluster centers of adjacent working conditions that are not in the current working condition category, and generate a working condition convergence quantification index. If the operating condition approach quantification index is less than the preset transition warning threshold, it is confirmed that there is a cross-class transition trend of feature vector, and the optimal PID parameter combination bound to the next possible operating condition category is retrieved from the operating condition label mapping table as a preloaded candidate PID parameter group. Linear interpolation fusion is performed on the currently active PID parameter group stored in the main cache and the preloaded candidate PID parameter group stored in the secondary cache. The values ​​of the proportional gain coefficient, integral time constant and derivative time constant are gradually adjusted according to the preset time slice weight coefficient to generate a smooth evolution dynamic PID parameter sequence. Write the latest frame of parameter data in the smooth evolution dynamic PID parameter sequence into the main cache area to overwrite the original active PID parameter group, and use the updated parameter set as the dynamic PID parameter group to be executed.

9. The method for torque compensation control of a mixing motor in a kitchen waste treatment device according to claim 1, characterized in that, The original signal includes: real-time phase current waveform, encoder feedback speed sequence, and instantaneous value of driver output power.

10. A method for torque compensation control of a mixing motor in a kitchen waste treatment device according to claim 1, characterized in that, The nine-dimensional low-order statistical feature vector includes: current envelope entropy and peak-to-valley ratio, speed sliding standard deviation slope change rate, power zero-crossing density and pulse width variation coefficient.