Self-adaptive temperature control system of tea processing equipment based on fuzzy PID (Proportion Integration Differentiation)
By dynamically adjusting the PID parameters through a fuzzy PID control system, the problem of temperature control instability caused by changes in the physical properties of materials during tea processing was solved, achieving adaptive temperature control of the tea processing equipment and ensuring the stability and consistency of the control system.
Patent Information
- Application Number
- CN202610280970.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-09
- Publication Date
- 2026-05-15
AI Technical Summary
Existing industrial temperature control systems suffer from model mismatch and dynamic response defects when dealing with nonlinear time-varying objects, making it difficult to guarantee control consistency and stability across batches and under varying operating conditions. In particular, during tea processing, drastic changes in the physical properties of materials cause control parameters to deviate from the optimal solution, leading to severe overshoot.
An adaptive temperature control system based on fuzzy PID is adopted for tea processing equipment. Temperature, moisture content and color characteristics are obtained through the information sensing module. The sparrow search algorithm is used for online global optimization, the PID parameters are dynamically adjusted, and the fuzzy rule matrix is combined to perform smooth interpolation switching to generate an adaptive control signal to drive the actuator for process control.
It improves the temperature control response speed, ensures the physical adaptability of the temperature control system, solves the temperature control lag problem caused by time delay in tea processing, avoids temperature control instability in the later stage of drying, and ensures the stability and consistency of the control system.
Smart Images

Figure CN122044256A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial real-time control software technology, specifically to an adaptive temperature control system for tea processing equipment based on fuzzy PID. Background Technology
[0002] In the field of industrial process control, precise control of thermodynamic systems with large time lags, strong nonlinearity, and time-varying parameters (such as material heat treatment, drying furnaces, and chemical reaction vessels) has always been a challenge for automation technology. These systems typically employ PID controllers or adaptive control strategies combined with intelligent optimization algorithms to maintain the stability of the controlled variable by adjusting the energy output of the actuators. Currently, improved PID control schemes based on intelligent algorithms have been widely adopted in industry. For example, swarm intelligence optimization strategies such as sparrow search and particle swarm optimization are used to tune the proportional, integral, and derivative parameters of the fuzzy PID controller online, attempting to solve the problems of low efficiency and high subjectivity in traditional manual tuning. These technologies typically establish closed-loop control systems based on single-variable error feedback, using the deviation and rate of change of the process variable as the core input, and searching for the optimal control law through algorithmic iteration to achieve rapid tracking of the setpoint.
[0003] However, existing control systems still suffer from severe model mismatch and dynamic response defects when dealing with nonlinear time-varying objects. Specifically, this manifests in several ways: many industrial heat treatment processes are essentially dynamic processes with drastic changes in the physical properties of materials. For example, during the drying process of porous media containing water, the equivalent heat capacity, thermal conductivity, and process gain of the controlled object experience significant nonlinear decay as internal moisture is lost. This means that the transfer function model of the controlled object drifts in real time. However, existing adaptive algorithms typically assume that the parameters of the controlled object are static or slowly time-varying, and the search boundaries and initialization conditions for PID parameter optimization are often fixed. This static optimization mechanism cannot match the dynamically drifting controlled object, causing the control parameters to deviate significantly from the optimal solution in the later stages of the process. Simultaneously, existing systems primarily rely on the single dimension of "temperature" for feedback control. When the material is in the critical phase transition zone between "high moisture content" and "low moisture content," the thermal inertia of the controlled object undergoes a qualitative change. In the low heat capacity stage, the material becomes extremely "thermally sensitive." At this point, due to the lack of real-time sensing of material properties, the control algorithm cannot predict sudden increases in the object's sensitivity. If the control gain from the high heat capacity stage is still used, the energy pulse output by the actuator can easily trigger severe overshoot in the system. In summary, existing temperature control systems suffer from a misalignment between "single temperature feedback and multi-dimensional physical state coupling." This makes it difficult for the control system to guarantee consistency and stability in production environments with varying batches and operating conditions. Therefore, a new type of process control system capable of sensing changes in material properties, adaptively adjusting the control domain boundary, and possessing physical constraint capabilities is urgently needed.
[0004] To address this, an adaptive temperature control system for tea processing equipment based on fuzzy PID is proposed. Summary of the Invention
[0005] The purpose of this invention is to provide an adaptive temperature control system for tea processing equipment based on fuzzy PID, which is used for adaptive temperature control of tea processing equipment.
[0006] To achieve the above objectives, the present invention provides the following technical solution: An adaptive temperature control system for tea processing equipment based on fuzzy PID control includes: The information sensing module acquires the temperature parameters, moisture content parameters, and color characteristics of the controlled object, and calculates the deviation signal, deviation change rate, and moisture content change rate based on the temperature parameters and moisture content parameters. The deduction constraint module calculates the model drift vector based on the moisture content parameter; it uses the model drift vector to dynamically scale the optimization domain space of the fuzzy controller quantization factor in the sparrow search algorithm; it uses the sparrow search algorithm to perform online global optimization of the PID control parameters; during the optimization iteration process, when a positive deviation signal is detected and the moisture content parameter is within the preset sensitivity range, if the color feature exceeds the safety constraint threshold, a penalty weight is superimposed on the objective function, and the baseline PID parameters are output. The driving inference module monitors abrupt changes in water content and identifies the switching moments between different dynamic characteristic stages. At the switching moment, the fuzzy inference engine is triggered to perform smooth interpolation switching between multiple sets of fuzzy rule matrices and outputs the PID parameter correction increment. The control synthesis module superimposes the baseline PID parameters and the PID parameter correction increments, combines them with the deviation signal and the rate of change of deviation, generates an adaptive control signal, and drives the actuator to perform process control.
[0007] Preferably, the data acquisition process of the information sensing module is as follows: the temperature parameter of the cavity is collected using a temperature sensor; the moisture content parameter is obtained in real time using an infrared sensor; the image of the controlled object is captured using an industrial camera and converted into a multi-dimensional feature space vector in real time to generate color feature quantity; the difference between the temperature parameter and the target temperature is calculated to obtain the deviation signal, and the deviation change rate is calculated based on the deviation signal. At the same time, the first-order time derivative of the moisture content parameter is performed to extract the moisture content change rate.
[0008] Preferably, the process of dynamically scaling the domain space of the fuzzy controller quantization factor in the sparrow search algorithm using the model drift vector is as follows: based on the pre-stored offline calibrated system dynamics model library, the water content parameter is used as an index to map out the model drift vector that characterizes the drift of the time constant of the controlled object as the physical properties change; when the model drift vector enters the drift interval, the initial search upper limit of the quantization factor is actively contracted according to the model drift vector, while keeping the initial search lower limit unchanged.
[0009] Preferably, the process of generating the baseline PID parameters includes: calculating the cumulative value of the product of the absolute value of the deviation signal and the time step within the sampling period as the absolute value integral of the deviation; calculating the cumulative value of the square of the control increment at adjacent sampling times as the control output fluctuation; constructing a fitness function with the absolute value integral of the deviation and the control output fluctuation as evaluation indicators; when the moisture content parameter is within a preset sensitivity range and the current deviation signal is greater than 0, activating the constraint penalty logic; if the color feature exceeds the safety constraint threshold, the sparrow search algorithm accumulates the nonlinear penalty score in the current fitness function and calculates the fitness score. The fitness scores of all individuals in the population are sorted, and individuals are assigned the roles of discoverer, joiner, and early warning agent according to preset allocation rules. The discoverer guides the search direction within the corrected optimization domain space, joiners move towards the discoverer, and when an early warning agent senses that its fitness score increase is greater than a preset increase threshold, it executes a jump command to escape the current coordinates and converge towards the fitness score safety zone. When the sparrow search algorithm reaches the preset iteration termination condition, the three-dimensional coordinates of the individual with the smallest fitness score are extracted, and the three-dimensional coordinates are determined as the tuning benchmark values of the quantization factor and the scaling factor to generate benchmark PID parameters.
[0010] Preferably, the process for identifying the switching time is as follows: establishing a dynamic sliding window for the water content change rate and storing the water content change rate data stream within a continuous sampling period; when the water content change rate data stream within the sliding window remains within a preset steady-state fluctuation range, the system is determined to be in the steady-state evolution stage; when a unidirectional shift is detected in the water content change rate data stream, and the change amplitude within the preset time window exceeds the phase transition abrupt change threshold, the controlled process enters the non-steady-state abrupt change stage from the steady-state evolution stage; capturing the numerical abrupt change point of the water content change rate data stream, and defining the numerical abrupt change point as the switching time.
[0011] Preferably, the process of generating the PID parameter correction increment is as follows: two complementary fuzzy rule sets are pre-stored, namely a damping rule matrix and a sensitivity rule matrix; the damping rule matrix is configured to offset the weighting ratio of the differential term of thermal inertia hysteresis, and the sensitivity rule matrix is configured to capture the step size distribution of the proportional and integral terms of temperature difference fluctuations; a weighted transition algorithm based on model drift vector is introduced, and within the transition period after the switching moment is identified, the fuzzy engine runs the two fuzzy rule sets simultaneously to generate two sets of primary correction vectors, adjusts the mixed weight coefficients of the two sets of primary correction vectors and performs weighted calculation to generate fuzzy decision quantities; the fuzzy decision quantities are mapped to the physical quantity space, and the PID parameter correction increment containing three dimensions of proportional, integral and differential is output.
[0012] Preferably, the process of generating the adaptive control signal is as follows: superimposing the reference PID parameters and the PID parameter correction increment to generate adaptive controller coefficients that take effect in real time; substituting the deviation signal, the deviation change rate and the adaptive controller coefficients into the digital PID control algorithm to perform logical operations, and mapping the calculated numerical results to the physical output limit of the actuator; using pulse width modulation technology to convert the numerical results into power drive pulse commands, and outputting them as adaptive control signals.
[0013] Preferably, the process of implementing process control by the drive actuator is as follows: the adaptive control signal is converted into a current signal via a digital-to-analog converter module and applied to the control terminal of the power regulator; the power regulator adjusts the heat release value per unit time by controlling the conduction angle of the thyristor and changing the effective voltage applied to both ends of the electric heating array in real time.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention actively shrinks the optimization domain of the ISSA algorithm by real-time monitoring of moisture content using near-infrared spectroscopy and mapping the model drift vector. This logical shift from "feedback correction" to "physical feedforward adaptation" effectively improves the temperature control response speed, overcomes the problem of drastic temperature fluctuations that easily occur at moisture abrupt change points, and ensures the physical adaptability of the temperature control system.
[0015] 2. This invention extracts the leaf edge carbonization component from visual features through deep decoupling of the information perception module and the inference constraint module, and introduces it as a nonlinear penalty weight into the ISSA algorithm. This coupling mechanism achieves strong coupling between biochemical damage risk and control parameters. This not only ensures the stability of temperature changes in the temperature control system, but also solves the problem of temperature control lag caused by time delay in the automatic control of tea processing.
[0016] 3. This invention uses a driving inference module to monitor abrupt changes in moisture content in real time, accurately capturing the moment of physical transition and triggering a smooth interpolation switch of the fuzzy rule matrix at that time. This control strategy, which shifts gears according to the phase change of the material, avoids the problem of temperature control instability caused by model mismatch in the later stages of drying in traditional temperature control. Attached Figure Description
[0017] Figure 1 This is a flowchart of an adaptive temperature control method for tea processing equipment based on fuzzy PID according to the present invention; Figure 2 This is a schematic diagram of the structure of an adaptive temperature control system for tea processing equipment based on fuzzy PID according to the present invention; Figure 3 This is a flowchart of the constraint derivation module of the present invention; Figure 4 This is a flowchart of the driving inference module of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Please see Figures 1 to 4 This invention provides an adaptive temperature control system for tea processing equipment based on fuzzy PID control, the technical solution of which is as follows: Example 1: Taking green tea processing as a specific scenario.
[0020] An adaptive temperature control system for tea processing equipment based on fuzzy PID control includes: The information sensing module acquires the temperature parameters, moisture content parameters, and color characteristics of the controlled object, and calculates the deviation signal, deviation change rate, and moisture content change rate based on the temperature parameters and moisture content parameters. The deduction constraint module calculates the model drift vector based on the moisture content parameter; it uses the model drift vector to dynamically scale the optimization domain space of the fuzzy controller quantization factor in the sparrow search algorithm; it uses the sparrow search algorithm to perform online global optimization of the PID control parameters; during the optimization iteration process, when a positive deviation signal is detected and the moisture content parameter is within the preset sensitivity range, if the color feature exceeds the safety constraint threshold, a penalty weight is superimposed on the objective function, and the baseline PID parameters are output. The driving inference module monitors abrupt changes in water content and identifies the switching moments between different dynamic characteristic stages. At the switching moment, the fuzzy inference engine is triggered to perform smooth interpolation switching between multiple sets of fuzzy rule matrices and outputs the PID parameter correction increment. The control synthesis module superimposes the baseline PID parameters and the PID parameter correction increments, combines them with the deviation signal and the rate of change of deviation, generates an adaptive control signal, and drives the actuator to perform process control.
[0021] Furthermore, the data acquisition process of the information sensing module is as follows: the temperature parameter of the cavity is collected using a temperature sensor; the moisture content parameter is obtained in real time using an infrared sensor; the image of the controlled object is captured using an industrial camera and converted into a multi-dimensional feature space vector in real time to generate color feature quantity; the difference between the temperature parameter and the target temperature is calculated to obtain the deviation signal, and the deviation change rate is calculated based on the deviation signal. At the same time, the first-order time derivative of the moisture content parameter is performed to extract the moisture content change rate.
[0022] Specifically, the process for acquiring the temperature parameters of the acquisition cavity is as follows: A PT100 high-precision resistance temperature detector (RTD) sensor is used to acquire the raw resistance signal at a sampling frequency of 10Hz. This signal is converted into a 4-20mA standard current signal by a transmitter and input to an analog-to-digital converter with a bit depth of 12 bits (value range 0-4095). The specific calculation logic for the temperature parameter is as follows: The reference digital value (preset to 819) corresponding to the lower limit of the current signal and the effective digital bit width (preset to 3276) corresponding to the effective current range (4-20mA) are identified. The real-time acquired digital value is subtracted from the reference digital value to obtain the net value. This net value is divided by the effective digital bit width to obtain the normalized result. The normalized result is multiplied by the upper limit of the temperature range (preset to 200°C) to generate the real-time temperature parameter value. If a current signal continuously below 4mA occurs, a sensor link failure alarm is triggered, and the heat source output is forcibly stopped. The preset values of the reference digital quantity and the effective digital bit width are physical constants determined by the hardware resolution of the analog-to-digital converter and the industrial standard current signal range.
[0023] The specific process for obtaining the real-time moisture content parameter is as follows: the reflectance of the material surface is converted into absorbance. The Lambert-Beer law calibration model adopts a calibration model based on the principle of linear superposition of absorbance. The basic formula of the model is that absorbance A is equal to the logarithm of the reciprocal of reflectance R at the wavelength. 1450nm is set as the characteristic wavelength for moisture absorption, and its absorbance is... ; Set 1300nm as the reference wavelength (not absorbed by water), its absorbance is Absorbance at characteristic wavelengths by water absorption. Subtract the absorbance at the reference wavelength to obtain The difference is multiplied by a proportionality coefficient and then added to an bias constant to obtain the final moisture content parameter. The proportionality coefficient and bias constant are determined through offline experiments targeting specific processing stages. Near-infrared absorbance data (independent variable) of samples with different moisture contents are collected simultaneously, along with the standard value of the actual moisture content measured by the drying method (dependent variable). The least squares method is used to minimize the sum of squared residuals between the "model predicted value" and the "actual experimental value," thereby determining the optimal proportionality coefficient and bias constant. (For example, for the green tea fixation stage, the preset proportionality coefficient is 32.5, and the bias constant is 5.2).
[0024] The specific generation process of the color feature quantity is as follows: A 1920×1080 pixel RGB image is acquired using an industrial camera and converted to grayscale. First, a 5×5 Gaussian filter is used to smooth and denoise the image. The Sobel operator is applied to calculate the horizontal and vertical gradients, and the total gradient magnitude is equal to the square root of the sum of the squares of the horizontal and vertical gradients. Pixels are traversed, and the gradient magnitude of each point is compared with its two adjacent pixels in the gradient direction. If it is not the maximum value, the grayscale of that pixel is set to zero, thus refining the blurred edges to a single pixel width. A high threshold of 150 is used to lock strong edges, and a low threshold of 50 is used as a reference for connecting weak edges. The tea leaf contour is completed through connectivity analysis, and the physical contour line of the tea leaf is extracted. Based on the extracted contour line, morphological erosion is used, with an erosion depth of 10% of the radius of the circumcircle of the extracted physical contour. The physical contour line is reduced according to the erosion depth, and the generated strip region can effectively capture key features such as the scorched edge and red discoloration of the tea leaf edge, generating a Region of Interest (ROI). The arithmetic mean of the L, a, and b components of all pixels within the ROI region is calculated to generate a real-time color mean vector (L, a, b components) of the material at the current moment. A preset standard reference vector (standard brightness, standard red-green value, standard yellow-blue value) is obtained statistically from the characteristic mean values of high-quality dry tea under standard light sources. In this embodiment, for green tea, the preset values are: standard brightness of 35.2 (reflecting the brightness of a dark green tone), standard red-green value of 12.8 (reflecting the negative range of emerald green), and standard yellow-blue value of 18.5 (reflecting the slightly yellow characteristic of dry tea). The Euclidean distance between this vector and the preset standard green reference vector is calculated. The specific calculation of the Euclidean distance involves calculating the square of the difference between the real-time brightness and the standard brightness, the square of the difference between the real-time red-green value and the standard red-green value, and the square of the difference between the real-time yellow-blue value and the standard yellow-blue value, then summing the three squares and taking the square root. Since the theoretical maximum value of Euclidean distance may exceed 100, to match the subsequent weighting coefficients, the calculated original offset is divided by a preset maximum allowable offset threshold (e.g., 50, the value is determined based on the geometric distance between high-quality green and reddish-brown / burnt black in CIELAB space), and the result is limited to the [0,1] interval. If the calculated value is greater than 1, it is forcibly assigned the value 1. A gray-level co-occurrence matrix is established, and the "contrast" feature of the matrix is calculated. This feature value is equal to the sum of the square of the gray-level difference between pixel pairs and the probability of occurrence of that pixel pair. Based on the gray-level co-occurrence matrix, the preset maximum threshold for texture contrast is 100 (this value corresponds to the empirical upper limit when obvious carbonized particles or severe wrinkles appear on the surface of tea leaves). The texture contrast is normalized, and the normalized texture mutation is equal to the contrast feature value extracted in real time divided by the preset maximum contrast threshold of 100. If the calculated value is greater than 1, it is truncated to 1.0. The color feature is equal to the offset multiplied by the weighting coefficient 0.6 plus the texture mutation multiplied by the weighting coefficient 0.4, finally generating a normalized value between 0 and 1.The weighting coefficients (0.6 vs. 0.4) are based on the priority ranking of temperature sensitivity between "biochemical quality loss" and "physical property changes" in tea processing. The weights were obtained through multiple process verifications: by sampling materials under different temperature control gradients during the withering process, the mapping relationship between color characteristic values and sensory evaluation scores was fitted using the least squares method.
[0025] The deviation signal is equal to the target temperature minus the real-time temperature parameter; the deviation change rate is equal to the deviation at the current moment minus the deviation at the previous moment, divided by the sampling period. The target temperature is set between 120℃ and 150℃ in the chamber temperature parameter during the fixation stage, aiming to use high instantaneous heat to inactivate polyphenol oxidase; it is set between 90℃ and 110℃ in the initial drying stage, focusing on efficient dehydration; and it is set between 70℃ and 80℃ in the final drying stage, at which point the target temperature needs to be strictly lowered to prevent the tea leaves from overheating and producing a burnt taste.
[0026] By employing Gaussian filtering, Sobel edge detection, and morphological processing, the digital extraction of biochemical features was achieved, transforming vague sensory experiences into computable feature vectors. This provides accurate benchmark data for model temperature prediction.
[0027] Furthermore, the process of dynamically scaling the domain space of the fuzzy controller quantization factor in the sparrow search algorithm using the model drift vector is as follows: based on the pre-stored offline calibrated system dynamics model library, the water content parameter is used as an index to map out the model drift vector that characterizes the drift of the controlled object's time constant as the physical properties change; when the model drift vector enters the drift interval, the initial search upper limit of the quantization factor is actively contracted according to the model drift vector, while keeping the initial search lower limit unchanged.
[0028] Specifically, the system dynamics model library is not a single model, but a set of piecewise linearized models for the changes in material physical properties (heat capacity, enthalpy of evaporation) with moisture content during tea processing. Identification experiments were conducted under constant wind speed and rotational speed, applying a step power input to the equipment and recording the response curves of temperature parameters at different moisture content steps. The gain, time constant, and pure lag time parameters for each stage were identified using the tangent method or area method. This system pre-stores three sets of representative dynamic parameter models: the high moisture content stage (moisture content parameter greater than 60%), where the material has sufficient moisture, large evaporation heat absorption, low system gain, and large lag. The preset parameters are: gain... =0.85, time constant =120s, pure time delay =15s. In the medium moisture content stage (moisture content parameter between 20% and 60%), the material's heat capacity decreases as moisture content decreases. Preset parameter: gain. =1.20, time constant =95s, pure time delay =10s. In the low moisture content stage (moisture content parameter less than 20%), the material heats up very easily, exhibiting the highest thermal sensitivity. Preset parameters: gain. =1.65, time constant =60s, pure time delay =5s. The system receives the real-time moisture content parameter transmitted back by the information sensing module. If the moisture content is within the interval boundary, a linear interpolation algorithm is used to calculate the real-time gain, real-time time constant, and real-time pure lag time. Taking the real-time gain as an example, the specific calculation process is as follows: calculate the difference between the gain at the upper limit of the current interval and the gain at the lower limit; calculate the difference between the internal moisture content parameter and the lower limit moisture content of the interval, divided by the interval span, where the interval span is the difference between the upper limit moisture content and the lower limit moisture content of the interval to which the current moisture content belongs. Multiply the difference by the divided value and add the gain at the lower limit of the interval to obtain the real-time gain. The real-time time constant and real-time pure lag time are calculated using the same calculation logic.
[0029] The specific mapping process of the model drift vector is as follows: Reference model parameters, including reference gain and reference time constant (using parameters from the high water content stage as the initial reference), are extracted from a preset system dynamics model library to the range of the current internal water content parameters. The model drift vector is a two-dimensional vector composed of gain drift coefficient and time constant drift coefficient. The real-time gain mapped from the model library at the current real-time water content is subtracted from the preset reference gain; the difference is the gain drift coefficient. The real-time time constant mapped from the current internal water content parameters is subtracted from the preset reference time constant; the difference is the time constant drift coefficient.
[0030] The specific process of actively shrinking the initial search upper and lower limits of the quantization factor based on the gradient of the model drift vector change is as follows: When the absolute value of the gain drift coefficient is greater than the preset drift threshold (e.g., 0.5), and the rate of change of the time constant drift coefficient is negative, the system determines that the controlled object has entered the drift interval. The upper and lower limits of the quantization factor search are initialized. The preset standard optimization domain space of the quantization factor is the interval [0.1, 2.0]. The search lower limit is maintained at a preset fixed value (0.1) to ensure the most basic control strength. The new search upper limit is equal to the default upper limit 2.0 multiplied by (1 minus the shrinkage correction coefficient). The shrinkage correction coefficient is equal to the product of the gain drift coefficient and the preset sensitivity adjustment weight (0.5). The drift threshold is derived from the statistical analysis of the gain drift coefficient. In tea processing, when the gain increases from the baseline value of 0.85 to above 1.35 (i.e., the gain drift coefficient is greater than 0.5), it means that the thermal efficiency and temperature rise rate of the system have increased by more than 50% from the initial state. The sensitivity adjustment weight is determined through offline stability experiments. Experiments show that when the weight is set to 0.5, the upper limit of the quantization factor can shrink linearly with the increase of the gain. This ensures that the control accuracy of the fuzzy controller can "cool down" synchronously as the material dries.
[0031] This application employs an improved sparrow search algorithm for global optimization of PID parameters. The basic sparrow search algorithm divides the population into discoverers, joiners, and early warning systems. Discoverers are responsible for finding food and providing search direction for the population; joiners follow discoverers to obtain food; and early warning systems update their positions when at the population edge or when threatened. By modifying the position update formula for discoverers, the fitness function of the sparrow search algorithm, and the search space of the sparrow search algorithm, an improved sparrow search algorithm is formed.
[0032] The system actively narrows the upper limit of parameter search within the preset sensitivity range, preemptively eliminating parameter regions prone to overshoot, and automatically "cools down" the system when the material dries, ensuring the smoothness of the transition period.
[0033] Furthermore, the generation process of the benchmark PID parameters includes: calculating the cumulative value of the product of the absolute value of the deviation signal and the time step within the sampling period as the absolute value integral of the deviation; calculating the cumulative value of the square of the control increment at adjacent sampling times as the control output fluctuation; constructing a fitness function with the absolute value integral of the deviation and the control output fluctuation as evaluation indicators; when the internal water content parameter is within the preset sensitivity range and the current deviation signal is greater than 0, activating the constraint penalty logic; if the color feature exceeds the safety constraint threshold, improving the sparrow search algorithm to accumulate nonlinear penalty scores in the current fitness function, and calculating the fitness score. The fitness scores of all individuals in the population are sorted, and individuals are assigned the roles of discoverer, joiner, and early warning agent according to a preset allocation rule. The discoverer guides the search direction in the corrected optimization domain space, joiners move towards the discoverer, and when the early warning agent senses that its fitness score increase is greater than a preset increase threshold, it executes a jump command to escape the current coordinates and converges to the fitness score safety area. When the improved sparrow search algorithm reaches the preset iteration termination condition, the three-dimensional coordinates of the individual with the smallest fitness score are extracted, and the three-dimensional coordinates are determined as the tuning benchmark values of the quantization factor and the scaling factor to generate the benchmark PID parameters.
[0034] The fitness function is constructed as follows: the absolute value of the deviation refers to the absolute magnitude of the difference between the actual temperature parameter of the cavity at the current moment and the target temperature; the control output fluctuation is the degree of change in the output command of the actuator (such as electric heating power) between two adjacent sampling moments. The current output power percentage of the controller is calculated, and the previous output power percentage is subtracted to obtain the output increment. This output increment is then squared to obtain the control output fluctuation. The fitness function uses the integral of the absolute value of the deviation as the evaluation criterion for temperature control accuracy, calculating the cumulative value of the product of the real-time absolute value of the deviation and the time step within the sampling period; it uses the control output fluctuation as the evaluation criterion for system stability, calculating the cumulative value of the squares of the control increments between adjacent sampling moments. The initial fitness score is calculated by multiplying the integral term of the absolute value of the deviation by a preset weight of 0.8 and summing it with the product of the control output fluctuation multiplied by a preset weight of 0.2. The weights are determined by pre-setting a set of step input response test tasks covering high, medium, and low moisture content. The deviation weight was set to increase from 0.5 in increments of 0.05 to 0.95, with the corresponding fluctuation weight decreasing synchronously. The settling time and power change rate were recorded for each weighting ratio. Using Pareto optimality theory, the intersection point with the lowest comprehensive evaluation index was found. Experimental data showed that when the deviation weight was 0.8 and the fluctuation weight was 0.2, the normalized weighted sum reached its minimum value.
[0035] The method for confirming the preset sensitivity range is as follows: The system uses the internal moisture content parameter during tea processing as the first judgment criterion. The system sets 20% as the critical threshold for moisture content in the preset sensitivity range. When the moisture content of the tea is at the critical threshold, as the water changes from free water to bound water, the heat capacity of the material decreases sharply, and the heat consumption for evaporation (latent heat of water evaporation) almost disappears. At the same time, the gradient of change of kinetic parameters is introduced as the second verification criterion. The system calculates the gain drift coefficient in real time. When the increment of this coefficient relative to the high moisture content benchmark stage exceeds the preset threshold (e.g., 0.5), and its gradient (i.e., the rate of change over time) remains positive, it is confirmed as the preset sensitivity range. The final logical steps for confirming the preset sensitivity range are: Level 1 judgment: real-time internal moisture content parameter is less than 20%; Level 2 verification: real-time time constant mapped from the model library is less than 60s; Level 3 verification: gain drift coefficient is greater than or equal to 0.5.
[0036] The specific implementation of the safety constraint threshold is as follows: At the end of the tea processing drying stage (within a preset sensitivity range), multiple controlled temperature gradient experiments (e.g., 100℃ to 150℃) are set up. The color components and texture characteristics of the tea are recorded simultaneously, and multiple tea evaluation experts perform sensory scoring on the samples' "burnt taste" and "browning," generating color feature quantities based on the color components and texture characteristics. Through statistical analysis of the characteristic distribution of qualified samples, an upper limit value covering more than 99% of the high-quality sample distribution range is selected, and a safety margin of 0.05 is added, ultimately determining 0.85 as the safety constraint threshold. This threshold serves as the criterion for the algorithm's penalty logic, achieving a precise conversion from the sensory quality red line to the mathematical search forbidden zone.
[0037] The improved sparrow search algorithm accumulates a nonlinear penalty score in the current fitness function as follows: When calculating the fitness score of an individual sparrow, the system introduces a nonlinear penalty constant of order of magnitude 10,000 as a constraint adjustment term. This nonlinear penalty score is determined based on the principle of "order of magnitude suppression" of fitness level differences. The penalty term must be significantly higher than all possible values of the basic fitness function to produce a forbidden zone effect. Under normal temperature control conditions, the normalized basic fitness score is usually between 0 and 500. To ensure that individuals with potential risks are absolutely marginalized in the population ranking, the penalty term is set to 20 to 50 times the maximum expected value of the basic score, i.e., 10,000. This ensures that even a pseudo-optimal solution with extremely fast response and high accuracy will immediately jump from the hundreds to the tens of thousands level once it touches the 0.85 safety threshold, thus securing its position at the bottom of the ranking of 50 individuals.
[0038] The specific allocation rule is as follows: Each generation, the system performs a "major reshuffle" of 50 individual sparrows. The allocation process does not fix the individual's identity; instead, it arranges them entirely based on their fitness scores at their current coordinates, from smallest to largest. Based on the ranking results, the population is dynamically divided according to the following preset proportions: The discoverers (top 20%), the 10 individuals with the lowest fitness scores, are responsible for finding the optimal quantification factor within the reshaped optimization domain space. Because of their lowest fitness scores, they represent the optimal search direction currently perceived by the population and are responsible for providing search guidance for the entire population.
[0039] The 40 remaining individuals (the bottom 80%), excluding the discoverer, will abandon their current search positions due to their higher fitness scores and poorer performance. They will move closer to the discoverer and conduct a more detailed local search around the discoverer in hopes of finding a better solution.
[0040] Warning individuals (randomly selected from 10% to 20%) are a special group that does not participate in the ranking of the previous two groups. Instead, they are randomly selected from the entire population (usually 5 to 10 individuals). They are responsible for monitoring the safety of the current area. Even if an individual is a discoverer, if it is selected as a warning individual, it must execute the warning logic. Its core is to sense whether its own fitness has mutated and forcefully trigger a jump command.
[0041] The specific iterative process for the discoverer, participant, and early warning participant is as follows: The discoverer's coordinate updates are strictly confined to the reshaped optimization domain space. In each iteration, the system generates an environmental risk operator. The environmental risk operator is a dynamic random variable generated in real time during algorithm iteration, strictly limited to the open interval [0,1], and follows a uniform distribution. It is generated as a 1×1 scalar value by a computer pseudo-random number generator. If... If the value is less than 0.8 (safety threshold), a search based on a normal distribution random operator is performed. This safety threshold is determined based on the control system's tolerance for uncertainties. The coordinate update logic is as follows: multiply the current position coordinates by a normal distribution random operator. After the operator performs the multiplication, the system immediately performs a boundary check. If the displacement caused by the operator causes the coordinates to exceed the corrected upper limit (1.2), the system forces a projection back to 1.2. This random operator is a sequence of random variables following a standard normal distribution N(0,1), obtained by generating a random number matrix that matches the parameter dimension (1×3), and its probability density function exhibits a bell-shaped curve.
[0042] The joiner continuously monitors the coordinates of the discoverer with the lowest fitness score. The logic for updating the joiner's new coordinates is as follows: determine the current coordinates of the discoverer with the lowest fitness score; calculate the linear distance between the joiner's current coordinates and the discoverer's coordinates to generate a position vector difference; multiply the absolute value of this position vector difference by a coefficient matrix to generate an offset term. This coefficient matrix consists of a randomly generated diagonal matrix where each element takes the value of 1 or -1. The joiner's new coordinates are obtained by adding the offset term to the current coordinates of the discoverer with the lowest fitness score.
[0043] The warning system has a preset increase threshold of 20%. The fitness score increase is the percentage increase in the warning system's current fitness score compared to the previous generation's score. After each iteration, if the fitness score increase exceeds the preset increase threshold, the system is considered "on the verge of danger." The warning system immediately executes a jump command, abandoning the current parameter coordinates that cause the risk. Its new coordinates are calculated as: the current optimal position of the population plus a random displacement increment. The optimal position of the population is the coordinates of the discoverer with the lowest fitness score that passes the safety check (color feature value < 0.85). The random displacement increment is obtained by multiplying a random proportional operator (a random number following a standard normal distribution) by the absolute value of the coordinate difference between the current position and the optimal position. The preset increase threshold is determined through offline simulation experiments and statistical probability distribution. Statistical analysis of the optimization trajectory under different working conditions shows that the upper limit of score fluctuation during normal iteration is 12%. To reserve sufficient safety response redundancy and effectively filter search noise, 20% is set as the warning criterion. The physical logic behind this threshold is that its value is much smaller than the fitness growth rate generated when the nonlinear penalty term is activated. This ensures that the algorithm can trigger a jump command a priori when it detects a sudden change in fitness caused by a drift in material thermal sensitivity or touching a physical red line. Experiments show that under this threshold setting, the system's success rate in eliminating abnormal parameter combinations is improved by approximately 35%, effectively achieving adaptive and robust parameter tuning during periods of drastic gain changes in the controlled object.
[0044] The preset termination condition adopts a composite criterion combining the maximum number of iterations limit and the fitness convergence threshold, specifically: The maximum number of iterations is 50, based on the search dimension (3D) of the fuzzy PID parameter space and the high convergence speed of the sparrow search algorithm. Experiments show that the ISSA algorithm typically reaches a stable period within 30-40 iterations for quantization factor tuning. Setting 50 iterations as a hard upper limit ensures that a complete parameter tuning is completed within the computation cycle of the embedded control chip.
[0045] The fitness bias convergence threshold is set to The fitness deviation convergence threshold must be set 2 to 3 orders of magnitude higher than the required control accuracy of the system to ensure that the extracted parameters have sufficient resolution. In this system, the effective range of the quantization factor is usually [0.1, 1.2]. To achieve a temperature control accuracy of 0.1, the numerical fluctuation reflected in the fitness function is usually on the order of magnitude. .
[0046] The specific implementation of determining the three-dimensional coordinates as the tuning reference values for the quantization factor and the scaling factor is as follows: the system extracts the discoverer coordinate vector that satisfies the iteration termination condition. ], the first dimension coordinate components The deviation quantization factor determined for the fuzzy controller The calibration reference value; the second dimension coordinate components Determined as the quantification factor for the rate of change of deviation The calibration reference value; the third-dimensional coordinate components Determined as the output scaling factor The setting reference value.
[0047] Ultimately, by setting the shortest trigger interval for optimization (such as 100 sampling cycles), it is ensured that the processor retains sufficient clock cycle margin to maintain deterministic response to real-time control commands after completing complex visual feature extraction.
[0048] As an enhancement to the deduction constraint module, the deduction constraint module also includes a second correction process of the universe of discourse based on the deviation distribution entropy: real-time statistical analysis of the statistical distribution characteristics of the temperature deviation signal within the preset sliding observation window, and calculation of the deviation distribution entropy; when the deviation distribution entropy exceeds the preset disorder threshold, based on scaling the domain space using the model drift vector, further asymmetric second contraction of the domain space is performed according to the magnitude of the deviation distribution entropy.
[0049] Random fluctuations in external airflow can cause temperature deviation signals to exhibit a non-normal distribution. The system establishes a deviation observation window with a length of fifty sampling periods in memory and evaluates it using deviation distribution entropy calculation logic. The frequency of different deviation value intervals within the window is statistically analyzed and used as probability distribution components. Each frequency component is multiplied by its corresponding base-2 logarithm and summed negatively to calculate the deviation distribution entropy. When the deviation distribution entropy exceeds a preset disturbance threshold (e.g., 0.65), the system is deemed to be affected by uncontrollable external noise. Based on the already scaled upper limit of the optimization domain of the quantization factor, the system introduces a quadratic contraction coefficient that is directly proportional to the entropy value. This coefficient only further compresses the upper limit of the output scaling factor, thus keeping the domain of the deviation input unchanged. This achieves defensive control with "wide-range perception and narrow-range execution," preventing the ISSA algorithm from outputting excessive baseline parameters during signal disturbance periods.
[0050] By using information entropy to quantify signal quality, the algorithm avoids making incorrect optimizations under noise interference, and significantly enhances the steady-state robustness of the system under complex operating conditions.
[0051] By improving the dynamic allocation mechanism (discoverer, joiner, and early warning) in the sparrow search algorithm, the convergence speed of global optimization and the ability to escape local optima are enhanced, thus meeting the needs of online real-time temperature control.
[0052] Furthermore, the process for identifying the switching moment is as follows: a dynamic sliding window for the water content change rate is established, and the water content change rate data stream within a continuous sampling period is stored; when the water content change rate data stream within the sliding window remains within a preset steady-state fluctuation range, the system is determined to be in the steady-state evolution stage; when a unidirectional shift in the water content change rate data stream is detected, and the change amplitude within the preset time window exceeds the phase transition abrupt change threshold, the controlled process enters the non-steady-state abrupt change stage from the steady-state evolution stage; the numerical abrupt change point of the water content change rate data stream is captured, and the numerical abrupt change point is defined as the switching moment.
[0053] Specifically, the dynamic sliding window is established as follows: a contiguous first-in-first-out (FIFO) storage space is allocated in the system memory, with a width set to 10 sampling periods. At each sampling moment, the system acquires the moisture content change rate component calculated after temperature and humidity compensation in real time, stores it at the end of the window, and overflows the old data at the beginning, thereby constructing a real-time numerical stream reflecting the material dehydration trend. The setting of the sliding window width is the result of a trade-off between improving the signal-to-noise ratio of the moisture content change rate signal and reducing the response delay of the control system.
[0054] The preset steady-state fluctuation range is determined by calculating the dispersion of the numerical flow of water cut change rate within the sliding window. The system calculates the standard deviation of 10 sampled data points within the current sliding window in real time. The preset steady-state fluctuation range is: [0, 0.05]. When the dispersion of the data stream within the window falls within this range, the material is determined to be in a constant-rate dehydration stage, and the system maintains its existing control gain. The basis for setting this range is that a 5% fluctuation threshold can effectively cover the normal linear measurement error of the sensor under high heat and high humidity conditions, while excluding small instantaneous changes caused by physical disturbances such as tea leaf tumbling.
[0055] The unidirectional shift refers to the data stream exhibiting strict monotonicity (monotonically increasing or decreasing) within a selected time window, rather than oscillating around the mean. The identification process for this unidirectional shift is achieved by performing real-time first-order difference operations on the water content change rate data stream within the preset time window. The system calculates the rate change at adjacent sampling times and extracts its algebraic sign; when more than 80% of the difference signs within the sequence show consistency, a unidirectional shift is determined to have occurred in the data stream.
[0056] The preset time window length is set to 3 sampling periods. When the moisture content change rate data stream within the sliding window first jumps out of the steady-state fluctuation range, the system does not immediately trigger a control mode switch, but continues monitoring within the subsequent preset time window. If the moisture content change rate data stream maintains a consistent unidirectional offset direction within the 3 sampling periods, and the cumulative change amplitude exceeds the phase transition abruptness threshold at the end of the window, then the current abrupt change is determined to be an essential characteristic change caused by a phase transition of the material. In the tea processing environment, instantaneous material agitation or sudden changes in hot air pressure may cause false "unidirectional offset" and "amplitude surge" in the moisture content change rate within 1-2 periods. By setting a continuous verification for 3 periods, it can be ensured that the captured data is the trend change of material moisture after crossing the critical point, rather than random interference.
[0057] The phase transition abrupt change threshold is set at 20%, which is determined based on the coupling analysis of the dehydration kinetics characteristics and the system signal-to-noise ratio during tea processing. According to the physical property evolution law of tea from free water evaporation to bound water migration, the characteristic change amplitude of its moisture content change rate inflection point is determined to be in the range of 15%-30%, which is to shield the random measurement noise (about 15%) within 3 times the standard deviation of the system. The preset phase transition abrupt change threshold is 20% of the average rate in the steady state stage.
[0058] The numerical mutation point is a critical state node determined by backtracking the starting position of the non-steady-state mutation stage. After completing the continuous verification, the system backtracks the historical data stream within the sliding window and defines the sampling moment when the moisture content change rate first deviates from the steady-state mean and the deviation exceeds twice the standard deviation as the numerical mutation point. Physically, this point corresponds to the location of the curvature surge of the tea moisture content change rate curve, i.e., the maximum point of the second derivative.
[0059] By utilizing a dynamic sliding window and a continuous verification algorithm targeting the rate of change in moisture content, instantaneous noise generated by tumbling and other factors is effectively filtered out, and the essential characteristic changes caused by material phase transitions are accurately identified. This provides a clear shift benchmark for the system, ensuring that the control law can be adjusted in a timely manner during non-steady-state abrupt changes.
[0060] Furthermore, the process of generating the PID parameter correction increment is as follows: two complementary fuzzy rule sets are pre-stored, namely a damping rule matrix and a sensitivity rule matrix; the damping rule matrix is configured to offset the weighting ratio of the differential term of thermal inertia hysteresis, and the sensitivity rule matrix is configured to capture the step size distribution of the proportional and integral terms of temperature difference fluctuations; a weighted transition algorithm based on model drift vector is introduced, and within the transition period after the switching moment is identified, the fuzzy engine runs the two fuzzy rule sets simultaneously to generate two sets of primary correction vectors, adjusts the mixed weight coefficients of the two sets of primary correction vectors and performs weighted calculation to generate fuzzy decision quantities; the fuzzy decision quantities are mapped to the physical quantity space, and the PID parameter correction increment containing three dimensions of proportional, integral and differential is output.
[0061] The damping rule matrix is a fuzzy inference logic set for thermal inertia compensation pre-stored in the system memory. Specifically, the implementation logic is as follows: this matrix strengthens the differential terms by configuring asymmetric scaling and differential gain weights. Sensitivity to the rate of change of deviation. When the system detects that the slope of the temperature rise exceeds a preset slope threshold (which is 1.2 times the steady-state temperature rise rate), the steady-state temperature rise rate essentially corresponds to the steady-state statistical value of the rate of change of deviation. After the system enters the temperature fluctuation range at each processing stage (such as the fixing stage), it records the absolute value of the rate of change of deviation in real time and performs moving average processing, using it as a benchmark for judging the current inertial state of the system. The preset temperature fluctuation range (i.e., the steady-state fluctuation interval) is set based on the temperature control accuracy requirements of the tea processing technology. In this embodiment, it is set to ±1% of the rated operating temperature. The damping rule matrix prioritizes the output of large-step differential correction quantities to generate predictive control forces opposite to the direction of thermal inertia. Compared with conventional fuzzy matrices, the high-damping matrix reduces the output gain of the proportional term by 30%–50% under the same input intensity, while increasing the output gain of the differential term by more than 60%.
[0062] The sensitivity rule matrix is a set of refined inference logic designed for high-thermal-sensitivity conditions in the later stages of drying. Specifically, the implementation logic involves configuring high-gain proportional terms within the matrix. and dynamic integral step size This enhances the system's ability to capture temperature difference signals. In terms of regular distribution, the high-sensitivity matrix increases the proportional term correction amplitude within small deviation ranges, ensuring the system can sense and correct minute temperature fluctuations caused by a decrease in internal moisture content. Compared to the high-damping matrix, the high-sensitivity matrix improves the output response frequency by more than 50% within a small error range (|e|<0.2℃).
[0063] Both the damping rule matrix and the sensitivity rule matrix are implemented based on an n×n (e.g., 7×7) discretized weight array. By correcting the control weights of each fuzzy subset according to the above gain distribution gradient and extreme point logic, the specific mapping matrix participating in the interpolation operation can be obtained.
[0064] The specific determination of the transition period is based on the constraints of the thermal hysteresis characteristics of the controlled object and the convergence constraints of the model drift vector. The lower limit of the transition period is set to three times the pure hysteresis time of the controlled object. The pure hysteresis time of the current device is obtained through step response identification to ensure that the transition period can fully cover the feedback loop of heat energy conduction from the actuator to the material surface, preventing phase lead failure caused by mode switching; the model drift vector composed of the gain drift coefficient and the time constant drift coefficient is monitored in real time, and the trajectory of its magnitude change is calculated. When the drift vector magnitude enters the preset convergence envelope (15% of the initial amplitude) and the duration exceeds 2 sampling periods, it is determined that the disturbance caused by the physical phase transition has been controlled.
[0065] The generation process of the two sets of primary correction vectors is as follows: After the fuzzy engine identifies the switching moment, it simultaneously starts the high-damped inference channel and the high-sensitivity inference channel. In the high-damped channel, the input signal is smoothed using a wide-based membership function, and combined with the damping rule matrix, the first set of primary correction vectors, which focuses on suppressing the thermal accumulation effect, is generated by calculating the centroid method. The specific calculation process of the centroid method is as follows: the integral sum of the products of the horizontal coordinate value and the corresponding vertical coordinate membership value of each point within the area enclosed by the output membership function curve obtained from the fuzzy inference and the horizontal axis is divided by the integral sum of the vertical coordinate membership values within the area. The resulting value is the accurate correction value output by this channel. In the high-sensitivity channel, the signal resolution is enhanced using a narrow-based membership function, and combined with the sensitivity rule matrix, the second set of primary correction vectors, which focuses on accurately eliminating steady-state temperature differences, is generated by calculating the centroid method. The wide-base membership function is defined as a bell-shaped or trapezoidal function with an overlap greater than 50% within the universe of discourse, aiming to increase control smoothness; the narrow-base membership function is defined as a triangular function with an overlap less than 30% and sharp vertices, aiming to improve adjustment resolution near the zero-point equilibrium position. Both the first and second sets of primary correction vectors are three-dimensional vectors, with their components corresponding to the fuzzy decision increments of the proportional, integral, and differential terms, respectively. In the inference rule of the high-damping channel, a higher differential term weight coefficient is preset to preferentially generate output that suppresses power fluctuations when the deviation rate of change increases; while in the high-sensitivity channel, a higher proportional term gain is preset in the small deviation region to improve the correction frequency for subtle temperature differences.
[0066] The mixed weighting coefficient The method for adjusting the synthesis ratio of the two sets of primary correction vectors during the transition period is as follows: After identifying the numerical mutation point, the system determines the ratio based on the magnitude of the real-time model drift vector. The size is determined by locking the initial weight value through a preset mapping function. Specifically, the preset mapping function is: when... ( When typically set to 0.15 to 0.25, at this time... Locked to a minimum value (e.g., 0.2), this range corresponds to the noise and normal minor environmental disturbances during the constant-rate dehydration phase of the system. When ( When typically set to 0.75 to 0.85, Follow The increase from 0.2 to 1.0 is linear and rapid, corresponding to the stage where the moisture content of tea leaves drops to near the critical point, and the thermal properties of the material begin to change trend. When hour, A forced lock to 1 indicates a sudden change in the material's moisture content change rate. During the transition period timing, the weighting coefficient... Nonlinear decay is performed over time step, with weighting coefficients. It equals the product of the initial weight value and the decay factor. The decay factor is an exponential function constructed using the natural constant e, with the independent variable being the ratio of the current transition time to the total preset period. The weight coefficient... This describes the proportion of high-damping logic in the total control output, while (1- This describes the proportion of high-sensitivity logic. The system multiplies the high-damped primary correction vector by... And multiply the high-sensitivity primary correction vector by (1- The sum of the two is used as the final fuzzy decision quantity.
[0067] The fuzzy decision quantity is specifically defined as a normalized correction vector output by the fuzzy inference engine, possessing proportional, integral, and differential attributes. The normalization process is as follows: for the proportional, integral, and differential output fuzzy sets generated by the fuzzy inference engine, their algebraic centers are calculated using the centroid method to obtain the original precise values of each component in the fuzzy universe of discourse; the preset normalization interval is [-1, 1]. The original precise values are divided by the upper limit of the amplitude of the corresponding component's fuzzy universe of discourse, thereby eliminating the influence of dimensions and generating normalized correction coefficients for each dimension; this vector includes proportional decision components, integral decision components, and differential decision components, corresponding to the control logic requirements of the controlled object in terms of instantaneous response, steady-state compensation, and trend suppression, respectively.
[0068] The specific implementation of the PID parameter correction increment is as follows: the system extracts decision components in the proportional, integral, and derivative directions from the fuzzy decision vector; each decision component is multiplied by the corresponding pre-stored reference step size, and then multiplied by the scale scaling factor generated online by the sparrow search algorithm, thereby mapping the dimensionless fuzzy inference result into a physically meaningful PID parameter correction increment. The reference step size is a preset static parameter of the system, mainly based on the resolution of the controlled object's actuator and the system's sampling period, and set according to the minimum adjustment gradient of the heating actuator (such as a solid-state relay or frequency converter). If the actuator's duty cycle resolution is 1%, the reference step size should match it to avoid generating invalid subtle commands. The proportional step size is set based on the maximum increment that does not produce oscillations under a typical temperature rise slope, the integral step size is set based on the expected time to eliminate steady-state errors, and the derivative step size is set based on the reciprocal of the system's pure time delay. The scale scaling factor is the coordinate of the discoverer with the minimum fitness score. Generated after smoothing evolution. To eliminate the step disturbance caused by random jumps in the position of the optimized individual to the underlying control loop, the system uses a first-order hysteresis operator (the smoothing coefficient is set between 0.85 and 0.98) to... The execution of temporal asymptotic evolution causes the currently effective scale factor to move towards the optimal solution obtained through continuous and controlled change. This ensures that the PID parameters remain physically continuous during hot updates.
[0069] As an enhancement to the driving inference module, the driving inference module also includes a color coupling differential compensation process: extracting the real-time red-green value components in the color feature quantity and calculating their evolution trajectory as the water content changes; when the offset slope of the red-green value components and the gradient of the water content change rate change are out of phase, when generating the PID parameter correction increment, a feedforward gain determined by the degree of color offset is superimposed on the differential term.
[0070] The system utilizes an information sensing module to acquire the first-order time derivatives of the red-green value components in real time. When the driving inference module detects that the switching moment has entered a preset sensitivity range, it compares the gradient of the water content change rate with the slope of the red-green value components in real time. If a decrease in the water content change rate is detected but an abnormal increase in the slope of the red-green value is detected (indicating a trend of biochemical damage caused by excessively rapid local temperature rise), the system calculates the critical distance between the current color feature quantity and the safety constraint threshold. Based on this distance, an additional feedforward compensation coefficient is superimposed on the differential term correction increment of the fuzzy inference output. This rapidly increases the proportion of the differential term in the adaptive controller coefficients, generating stronger predictive braking force in the logical operation.
[0071] By directly converting the biochemical quality characteristics at the visual level into compensation for differential control terms, the risk of focus edge and red-difference is contained in advance, and the pain point of quality loss caused by thermal inertia is solved from the biochemical feedback level.
[0072] By introducing two complementary rule matrices—one for high damping and one for high sensitivity—a weighted transition algorithm is used to achieve soft switching of the temperature control strategy, avoiding abrupt jumps in control commands. This achieves optimal matching of control performance throughout the entire process.
[0073] Furthermore, the process of generating the adaptive control signal is as follows: the reference PID parameters and the PID parameter correction increment are superimposed to generate adaptive controller coefficients that take effect in real time; the deviation signal, the deviation change rate and the adaptive controller coefficients are substituted into the digital PID control algorithm to perform logical operations, and the calculated numerical results are mapped to the physical output limit of the actuator; the numerical results are converted into power drive pulse commands and output as adaptive control signals.
[0074] Specifically, the adaptive controller coefficients are generated as follows: A baseline PID parameter vector and a PID parameter correction increment vector are simultaneously acquired. Using multiply-accumulate logic, the baseline PID parameters in the proportional, integral, and derivative dimensions are used as base values, and the corresponding PID parameter correction increment vectors are superimposed. The system injects the superimposed parameter set into the PID operation register, replacing the stale coefficients from the previous sampling period, thereby generating adaptive controller coefficients that take effect in real time.
[0075] The specific implementation of the logical operation is as follows: The system stores and retrieves temperature deviation signals from three consecutive sampling times in real time, which are defined as the current deviation, the first historical deviation, and the second historical deviation, respectively. The proportional, integral, and derivative terms in the real-time adaptive controller coefficients are used as gain weights, and multiplied by the first-order difference of the deviation, the current deviation value, and the second-order difference of the deviation, respectively. The first-order difference of the deviation is the difference between the current deviation and the first historical deviation; the second-order difference of the deviation is a linear combination of the current deviation, the first historical deviation, and the second historical deviation. Specifically, it is the current deviation minus twice the first historical deviation, plus the second historical deviation. The above three correction weights are algebraically added to synthesize the output increment for the current cycle. During algebraic addition, the algebraic sign of each product result is retained, and the positive or negative direction of the output increment is determined by vector superposition to represent the increase or decrease of the actuator power. The output increment is superimposed on the control quantity execution value of the previous moment to form the theoretical output value for the current moment. The output increment is superimposed on the historical output value of the previous sampling time to obtain the theoretical control value; then, by executing the anti-saturation limiting logic, the value is subject to boundary constraints, and finally the effective theoretical output value of the current time is formed.
[0076] The specific implementation of mapping the calculated numerical results to the physical output limit of the actuator is as follows: The system presets a mapping function between the theoretical computation space and the physical execution space. The theoretical output value generated by the logical operation is mapped to the corresponding output intensity percentage of the actuator according to a proportional relationship. To prevent instruction overshoot during the drastic temperature change phase, the system sets a physical output limit, which includes an upper saturation value and a lower dead zone value. When the mapped percentage value exceeds this limit, hard limiting is performed to forcibly lock the value within the boundary value, thereby playing a role in resisting integral saturation and preventing the actuator from being in a full-load overload state for a long time. The numerical result after limiting is converted into the control variable of the corresponding actuator drive circuit, which serves as the reference value for the subsequent pulse width modulation signal generation. The mapping function performs dimensional normalization processing according to the processor's timer resolution and the duty cycle adjustment range of the actuator. By obtaining the temperature rise curves under different power loads, the critical power point (preset to be 92% of the rated power) where the temperature rise rate changes from linear growth to nonlinear overheating is set as the upper saturation value. Based on the minimum sustaining current required for the system to overcome natural heat dissipation in a static environment, and combined with the shortest response pulse width of the actuator driver chip (e.g., 5ms), the calculated duty cycle value (e.g., 3.5%) is set as the lower limit dead zone value.
[0077] As an enhancement to the physical output confinement mapping, the physical output confinement mapping process also includes nonlinear thermal saturation correction: obtaining the real-time cumulative load intensity of the actuator and constructing a heat accumulation attenuation model; dynamically lowering the upper limit saturation value according to the degree of heat accumulation, and introducing a nonlinear smooth transition operator based on the cosine function when mapping the theoretical output value to the percentage of output intensity.
[0078] The system performs real-time time integration on the output intensity of the actuator to construct a cumulative load operator reflecting the heat storage state of the cavity. When the cumulative load operator exceeds a preset thermal balance threshold, the system actively and linearly reduces the upper saturation value from a preset 92% of the rated power to between 85% and 88%. When converting the theoretical output value generated by the logical operation into an output percentage, a purely linear proportional mapping is no longer used; instead, a nonlinear smooth transition operator (such as a cosine function-based transformation) is introduced. The ratio of the theoretical output value to the theoretical maximum range is used as the independent variable, and its corresponding cosine function value (mapped to the zero-to-one interval) is obtained as the final physical output intensity. This causes the rate of increase in output power to gradually slow down as the control quantity approaches the saturation region.
[0079] By dynamically correcting the physical boundaries and introducing nonlinear mapping operators, the energy pulse output of the actuator is made more delicate and smooth when it is close to full load, effectively curbing the steady-state oscillation and overshoot problems caused by thermal inertia accumulation from the physical execution end.
[0080] By transforming complex algorithmic logic into driving instructions that can be carried by actual actuators, the problem of runaway caused by integral saturation is solved, high-precision restoration of input is achieved, and the adaptive correction increment can be accurately applied to the heat treatment process.
[0081] Furthermore, the process of implementing process control by the drive actuator is as follows: the adaptive control signal is converted into a current signal via a digital-to-analog converter module and applied to the control terminal of the power regulator; the power regulator adjusts the heat release value per unit time by controlling the conduction angle of the thyristor and changing the effective voltage applied to both ends of the electric heating array in real time.
[0082] Specifically, the conversion process of the current signal is as follows: the adaptive control signal is a normalized value. The adaptive control signal is mapped to a 4-20mA standard current signal through digital-to-analog conversion, where 0% of the adaptive control signal corresponds to 4mA (heating stopped) and 100% corresponds to 20mA (full power heating).
[0083] The power regulator receives the aforementioned current signal. The trigger circuit inside the power regulator linearly maps the current magnitude to the phase shift angle of the thyristor. ( By precisely controlling the conduction time of the thyristor in each AC half-cycle, waveform cutting of the AC sine wave is achieved, thereby continuously adjusting the root-mean-square effective voltage output to the electric heating array. Considering the thermal inertia of the tea processing process, the adjustment response period of the actuator is set to 200ms-500ms, which is compatible with the single iteration step size of the improved sparrow search algorithm. Simultaneously, a first-order low-pass filter is installed at the input of the power regulator to smooth out the sudden changes in control quantity caused by the adaptive switching of PID parameters and prevent electromagnetic interference caused by frequent and large-amplitude switching of the thyristor.
[0084] By deeply matching the response frequency of the actuator with the cycle of the optimization algorithm, the overshoot in the heat exchange process is significantly reduced, ensuring the stability of temperature control and the safety of the electromagnetic environment.
[0085] By integrating multi-dimensional sensing of temperature, internal properties, and color, the system overcomes the perceptual misalignment inherent in traditional single-temperature feedback. Furthermore, it utilizes a model drift vector-based real-time boundary reshaping algorithm to predictively adjust control parameters in response to qualitative changes in physical properties. This solves the control instability problems caused by large hysteresis, strong nonlinearity, and real-time drift of physical property parameters in temperature control systems.
[0086] Example 2: This example uses green tea fixation as a specific scenario, illustrating the system's real-time monitoring of material status during the transition from green tea fixation to drying. The specific implementation is as follows: Infrared sensors monitor the material's state in real time. When the system detects that the tea's moisture content has steadily decreased from 65% at the initial stage of processing to 45%, it identifies that the material has entered the medium-moisture drying phase. Given that the moisture migration rate after heating in this stage is non-linearly coupled with the heat load, the system uses the current 45% moisture content as an index to automatically match the "medium moisture content stage" parameters from a pre-stored model library. At this point, the real-time gain mapping is 1.20, and the time constant mapping is 95s. The system calculates the gain drift coefficient (e.g., 1.20 - 0.85 = 0.35) and the time constant drift coefficient. Because the gain coefficient shows an increasing trend, the system determines that the thermal sensitivity has increased and proactively compresses the optimization upper limit of the quantization factor in the Sparrow Search algorithm from the default 2.0 to approximately 1.65 using a contraction correction coefficient (calculated based on the gain drift).
[0087] Example 3: This application example uses green tea fixation as a specific scenario, specifically the application at the end of the drying process when the moisture content of the tea leaves drops to 18%. The specific implementation is as follows: An industrial camera captured a slight browning at the edge of the tea leaves. Image processing calculated a color feature value of 0.88, exceeding the safety constraint threshold of 0.85. If, during the iteration of the Sparrow Search algorithm, its candidate parameter combination generates an optimization vector that would lead to a further increase in heating power, the ISSA algorithm will add an additional penalty term of 10,000 to its fitness function. Through this penalty mechanism, the algorithm will forcibly discard optimization paths that would cause temperature overshoot, thus ensuring temperature control accuracy while prioritizing the physical constraint of preventing biochemical deterioration of the tea leaf's color. Individuals randomly selected as "warning agents," sensing a surge in their fitness score due to the penalty (an increase far exceeding 20%), immediately execute a jump command, escaping the high-risk parameter area and converging towards a safer region.
[0088] Example 4: This application example uses the fixation process of green tea as a specific scenario, illustrating the transition from "constant-rate dehydration" to "slow-rate dehydration" in green tea processing. The specific implementation is as follows: The system establishes a sliding window with a width of 10 sampling periods (1 second) to monitor the moisture content change rate numerical stream in real time. When the moisture content change rate data stream shows a unidirectional downward trend (unidirectional offset) for three consecutive sampling periods, and the cumulative decrease reaches 22% (exceeding the 20% phase transition threshold), the system immediately triggers a backtracking algorithm, defining the point where the curvature of that curve first surges as the "switching moment." The system accurately captures the physical inflection point of the migration of moisture inside the tea leaves from free water to bound water, providing an accurate time reference for the subsequent "gear shift" of control modes.
[0089] Example 5: This example uses the green tea processing method as a specific scenario, and describes the specific use of the transition period after recognizing the aforementioned "switching moment". The specific implementation is as follows: The fuzzy inference engine simultaneously runs the "damping rule matrix" and the "sensitivity rule matrix." The system sets initial mixed weights based on the magnitude of the model drift vector. As the transition time progresses, the high-damping weights, representing inertia suppression, nonlinearly decrease from high to low, while the high-sensitivity weights, representing precise temperature control, gradually become dominant. The system weighted sums the initial correction vector generated by the high-damping weights and the vector generated by the high-sensitivity weights, ultimately outputting the PID parameter correction increments containing proportional, integral, and derivative dimensions. This achieves a smooth transition of the control strategy from "overshoot prevention" to "precise temperature control," avoiding control jumps caused by switching a single rule.
[0090] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. An adaptive temperature control system for tea processing equipment based on fuzzy PID, characterized in that, include: The information sensing module acquires the temperature parameters, moisture content parameters, and color characteristics of the controlled object, and calculates the deviation signal, deviation change rate, and moisture content change rate based on the temperature parameters and moisture content parameters. The deduction constraint module calculates the model drift vector based on the moisture content parameter; it uses the model drift vector to dynamically scale the optimization domain space of the fuzzy controller quantization factor in the sparrow search algorithm; it uses the sparrow search algorithm to perform online global optimization of the PID control parameters; during the optimization iteration process, when a positive deviation signal is detected and the moisture content parameter is within the preset sensitivity range, if the color feature exceeds the safety constraint threshold, a penalty weight is superimposed on the objective function, and the baseline PID parameters are output. The driving inference module monitors abrupt changes in water content and identifies the switching moments between different dynamic characteristic stages. At the switching moment, the fuzzy inference engine is triggered to perform smooth interpolation switching between multiple sets of fuzzy rule matrices and outputs the PID parameter correction increment. The control synthesis module superimposes the baseline PID parameters and the PID parameter correction increments, combines them with the deviation signal and the rate of change of deviation, generates an adaptive control signal, and drives the actuator to perform process control.
2. The adaptive temperature control system for tea processing equipment based on fuzzy PID according to claim 1, characterized in that, The data acquisition process of the information sensing module is as follows: temperature parameters of the cavity are collected using a temperature sensor; moisture content parameters are obtained in real time using an infrared sensor; images of the controlled object are captured using an industrial camera and converted into multi-dimensional feature space vectors in real time to generate color feature quantities; the difference between the temperature parameter and the target temperature is calculated to obtain a deviation signal, and the deviation change rate is calculated based on the deviation signal. At the same time, the first-order time derivative of the moisture content parameter is performed to extract the moisture content change rate.
3. The adaptive temperature control system for tea processing equipment based on fuzzy PID according to claim 1, characterized in that, The process of dynamically scaling the domain space of the fuzzy controller quantization factor in the sparrow search algorithm using the model drift vector is as follows: Based on the pre-stored offline calibrated system dynamics model library, the water content parameter is used as an index to map out the model drift vector that characterizes the drift of the time constant of the controlled object as the physical properties change; when the model drift vector enters the drift interval, the initial search upper limit of the quantization factor is actively contracted according to the model drift vector, while keeping the initial search lower limit unchanged.
4. The adaptive temperature control system for tea processing equipment based on fuzzy PID according to claim 1, characterized in that, The generation process of the baseline PID parameters includes: calculating the cumulative value of the product of the absolute value of the deviation signal and the time step within the sampling period as the absolute value integral of the deviation; calculating the cumulative value of the square of the control increment at adjacent sampling times as the control output fluctuation; constructing a fitness function with the absolute value integral of the deviation and the control output fluctuation as evaluation indicators; when the moisture content parameter is within a preset sensitivity range and the current deviation signal is greater than 0, activating the constraint penalty logic; if the color feature exceeds the safety constraint threshold, the sparrow search algorithm accumulates a nonlinear penalty score in the current fitness function and calculates the fitness score; for species... The fitness scores of all individuals in the swarm are sorted, and individuals are assigned the roles of discoverer, joiner, and alerter according to preset allocation rules. The discoverer guides the search direction within the corrected optimization domain space, joiners move closer to the discoverer, and when the alerter senses that its fitness score increase is greater than the preset increase threshold, it executes a jump command to escape the current coordinates and converge to the fitness score safe area. When the sparrow search algorithm reaches the preset iteration termination condition, the three-dimensional coordinates of the individual with the smallest fitness score are extracted, and the three-dimensional coordinates are determined as the tuning benchmark values of the quantization factor and the scaling factor to generate the benchmark PID parameters.
5. The adaptive temperature control system for tea processing equipment based on fuzzy PID according to claim 1, characterized in that, The process for identifying the switching moment is as follows: a dynamic sliding window for the water content change rate is established, and the water content change rate data stream within a continuous sampling period is stored; when the water content change rate data stream within the sliding window remains within a preset steady-state fluctuation range, the system is determined to be in the steady-state evolution stage; when a unidirectional shift in the water content change rate data stream is detected, and the change amplitude within the preset time window exceeds the phase transition abruptness threshold, the controlled process enters the unsteady-state abruptness stage from the steady-state evolution stage; the numerical abruptness point of the water content change rate data stream is captured, and the numerical abruptness point is defined as the switching moment.
6. The adaptive temperature control system for tea processing equipment based on fuzzy PID according to claim 1, characterized in that, The process of generating the PID parameter correction increment is as follows: two complementary fuzzy rule sets are pre-stored, namely a damping rule matrix and a sensitivity rule matrix; the damping rule matrix is configured to offset the weighting ratio of the differential term of thermal inertia hysteresis, and the sensitivity rule matrix is configured to capture the step size distribution of the proportional and integral terms of temperature difference fluctuations; a weighted transition algorithm based on model drift vector is introduced. During the transition period after the switching moment is identified, the fuzzy engine runs the two fuzzy rule sets simultaneously to generate two sets of primary correction vectors. The mixed weight coefficients of the two sets of primary correction vectors are adjusted and weighted calculations are performed to generate fuzzy decision quantities. The fuzzy decision quantity is mapped to the physical quantity space, and the output includes the PID parameter correction increment containing three dimensions: proportional, integral, and derivative.
7. The adaptive temperature control system for tea processing equipment based on fuzzy PID according to claim 1, characterized in that, The process of generating the adaptive control signal is as follows: superimposing the reference PID parameters and the PID parameter correction increment to generate adaptive controller coefficients that take effect in real time; substituting the deviation signal, the deviation change rate and the adaptive controller coefficients into the digital PID control algorithm to perform logical operations, and mapping the calculated numerical results to the physical output limit of the actuator; using pulse width modulation technology to convert the numerical results into power drive pulse commands, and outputting them as adaptive control signals.
8. The adaptive temperature control system for tea processing equipment based on fuzzy PID according to claim 1, characterized in that, The process of implementing process control of the drive actuator is as follows: the adaptive control signal is converted into a current signal via digital-to-analog conversion and applied to the control terminal of the power regulator; the power regulator controls the effective voltage applied to both ends of the electric heating array by controlling the conduction angle of the thyristor, thereby controlling the heat release value per unit time.
