Solenoid valve drainage control method and system capable of intelligently adjusting timing parameters

By constructing a multi-dimensional feature vector and adaptively adjusting the timing parameters of the solenoid valve, the imbalance problem of solenoid valve drainage control under different condensation loads and environmental conditions was solved, realizing the safe and efficient discharge of condensate and improving the robustness and energy efficiency of the system.

CN121900190APending Publication Date: 2026-04-21NIANCHENG PNEUMATIC TECH NANJING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NIANCHENG PNEUMATIC TECH NANJING CO LTD
Filing Date
2026-03-20
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, solenoid valve drainage control cannot adapt to different condensation loads and environmental conditions, resulting in uneven condensate production, which can easily lead to water hammer, corrosion, blockage, and compressed air loss. It also lacks self-learning capabilities and makes it difficult to achieve a balance between energy saving and reliability.

Method used

By constructing a multidimensional feature vector, calculating the condensate load index, adaptively adjusting the timing parameters of the electromagnetic drain valve, and combining this with a self-learning update strategy, precise control of condensate discharge is achieved.

Benefits of technology

It significantly improves the system's robustness under extreme operating conditions, reduces the failure rate, reduces compressed air loss, and achieves synergistic optimization of liquid level safety and energy saving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121900190A_ABST
    Figure CN121900190A_ABST
Patent Text Reader

Abstract

The invention discloses an electromagnetic valve drainage control method and system capable of intelligently adjusting timing parameters, and relates to the technical field of industrial automatic control, and the method comprises the steps: collecting multi-source signals such as the liquid level and temperature of a water storage cavity and the state of a compressor, and constructing a condensation working condition multi-dimensional feature vector after denoising, alignment and normalization processing; a dimensionless condensate water load index is calculated based on the feature vector, and then working condition grades are divided; selecting a timing initial parameter according to the working condition grade, and setting an adjustment constraint domain; a drainage response index is calculated after a drainage action is executed, and timing parameters are adaptively updated in a constraint domain by combining the deviation between the index and a target value; and meanwhile, an abnormal working condition cooperative control and strategy self-learning updating strategy is provided. According to the method, dynamic optimization of drainage timing parameters is achieved through condensation working condition accurate sensing, quantitative decision making and self-adaptive closed loop adjustment, liquid level safety and compressed air energy saving are both considered, and the reliability and the intelligent level of the system in a complex environment are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial automatic control technology, specifically relating to a method and system for controlling the drainage of an electromagnetic valve with intelligent adjustment of timing parameters. Background Technology

[0002] During the operation of a compressed air system, water vapor in the air is compressed and cooled to form a large amount of condensate, which usually contains oil and solid particles. If it is not discharged in time, it will cause problems such as reduced gas purity, pipeline corrosion, and damage to terminal equipment. Therefore, air compressors, air tanks, and other equipment are commonly equipped with electromagnetic drainage devices. In existing technologies, most methods use electronic timers to set the energizing duration and shut-off interval of the electromagnetic drainage valve to achieve intermittent condensate discharge.

[0003] However, the fixed-cycle control mode with a fixed valve opening duration exhibits progressive technical defects during long-term operation. Firstly, condensate generation is significantly affected by a combination of factors, including ambient humidity, intake air temperature, and compressor load rate, resulting in substantial differences across seasons and load conditions. A fixed ON / OFF cycle can lead to delayed drainage under high load and high humidity conditions, causing the liquid level to approach the safety limit and increasing the risk of water hammer and corrosion. Conversely, under low load and low humidity conditions, excessive discharge occurs, resulting in significant compressed air loss. Secondly, oil and solid particles in the condensate easily accumulate at the valve orifice and in the drainage channel, causing blockages. Existing timers lack means to sense drainage effectiveness; even when drainage is obstructed, they still execute ineffective actions based on the original parameters. Drainage failure cannot be actively identified and requires manual inspection.

[0004] Furthermore, condensate is prone to freezing and clogging pipes under low-temperature conditions. While existing technologies can prevent freezing by increasing drainage frequency and activating heating devices, they need to avoid increased gas consumption and valve fatigue caused by excessively short drainage intervals, and lack a refined collaborative control strategy based on actual load and drainage effect. Although some methods introduce level switches or temperature compensation logic, they still rely on empirical thresholds and fixed rules as the core basis, failing to uniformly model multi-source signals and lacking data-driven self-learning capabilities. They cannot autonomously optimize drainage strategies under complex operating conditions, making it difficult to achieve a balance between energy saving and reliability. Summary of the Invention

[0005] This invention aims to at least solve one of the technical problems existing in the prior art. To this end, a method and system for intelligently adjusting timing parameters of a solenoid valve for draining water is proposed. This method intelligently sets and optimizes the energizing duration and shut-off interval of the solenoid drain valve under different condensing loads and environmental conditions, thereby achieving safe and efficient discharge of condensate from the compressed air system. To achieve the above objective, this invention provides a method for intelligently adjusting timing parameters of a solenoid valve for draining water, comprising the following steps:

[0006] S1: Obtain condensation condition data of the water storage chamber, the condensation condition data including at least the water level signal of the water storage chamber, and construct a multi-dimensional feature vector characterizing the current condensation condition based on the condensation condition data;

[0007] S2: Calculate the condensate load index based on the multidimensional feature vector, and determine the current condensate operating condition level based on the condensate load index;

[0008] S3: Determine the initial timing parameters of the electromagnetic drain valve according to the condensation condition level, and set the adjustment constraint range of the initial timing parameters. The initial timing parameters include the energizing duration and the shut-off interval.

[0009] S4: Control the electromagnetic drain valve to perform the drain action and obtain the liquid level change data before and after the drain action to calculate the drain response index;

[0010] S5: Based on the deviation between the drainage response index and the target value, the timing initial parameters are adaptively updated within the adjustment constraint domain, and the updated timing initial parameters are used to execute the drainage control for the next cycle.

[0011] The construction of the multidimensional feature vector characterizing the current condensation condition includes:

[0012] S11: Continuously monitor and determine the threshold of the signal in the condensation condition data. When the signal change amplitude exceeds the preset multiple threshold or the sensor output value remains unchanged within a preset number of control cycles, mark the data at the corresponding time as an anomaly point and use at least one of the following methods: nearby time interpolation or historical trend extrapolation to complete the value of the anomaly point.

[0013] S12: Acquire asynchronous sampling data and their corresponding timestamps from the liquid level sensor, temperature sensor and compressor operating status acquisition module, and map the asynchronous sampling data to the sampling time of the preset control cycle through resampling and interpolation algorithms to generate a time-axis aligned multi-source signal sequence;

[0014] S13: Within a sliding time window covering multiple control cycles, calculate the median and upper and lower percentile ranges of the multi-source signal sequence respectively, and perform a linear mapping on the multi-source signal sequence with the median as the center and the percentile range as the scale parameter to obtain a normalized dimensionless signal sequence.

[0015] S14: Perform principal component analysis on the dimensionless signal sequence, extract principal component features whose cumulative energy percentage reaches a preset threshold, and generate the multidimensional feature vector with fixed dimensions.

[0016] The calculation of the condensate load index and determination of the current condensate operating condition level includes the following sub-steps:

[0017] S21: Within the sliding time window, calculate the short-term generation rate component and the long-term cumulative trend component of the liquid level change, and combine the compressor operating duty cycle to perform a weighted summation of the components to generate a comprehensive condensate generation index.

[0018] S22: Calculate the ratio of the comprehensive condensate generation index to the maximum safe condensate volume, and input the obtained ratio into a preset nonlinear mapping function for compression processing to obtain a dimensionless condensate load index;

[0019] S23: The condensate load index is compared with the classification threshold to determine the operating condition level; the classification threshold includes an upward threshold and a downward threshold to form a hysteresis interval, and the value of the classification threshold is offset and corrected according to the current ambient temperature.

[0020] The process of determining the initial timing parameters of the electromagnetic drain valve and setting the adjustment constraint domain of the initial timing parameters specifically includes:

[0021] S31: Using the parameter template library, perform matching and retrieval based on the current condensing condition level, compressed air equipment type, rated drainage capacity, and current working pressure, and select the corresponding basic parameter group;

[0022] S32: The recommended values ​​in the basic parameter group are determined as the timing initial parameters of the electromagnetic drain valve, and the timing initial parameters include at least the energizing duration and the shut-off interval;

[0023] S33: Based on the equipment model, the effective volume of the water storage chamber and the allowable duty cycle of the electromagnetic coil, set an adjustment constraint domain for the timing initial parameters. The adjustment constraint domain at least limits the minimum and maximum values ​​of the energizing duration and the shut-off interval, as well as the upper limit of the single adjustment step size.

[0024] The adaptive update of the drainage response index and the timing parameters specifically includes the following sub-steps:

[0025] S41: Calculate the ratio of the liquid level difference before and after a single drainage action to the corresponding energization duration to obtain the single drainage efficiency index. Then, normalize the single drainage efficiency index in combination with the current condensate load index to obtain the drainage response index.

[0026] S42: Calculate the deviation between the drainage response index and the target drainage response index, and calculate the gradient update amount of the energization duration and the gradient update amount of the shutdown interval according to the sign and magnitude of the deviation.

[0027] S43: Perform dead zone processing and forgetting factor adjustment on the gradient update amount: when the deviation falls within the preset dead zone range, the update amount is set to zero; otherwise, the gradient update amount is corrected by combining the historical deviation accumulation amount and the forgetting factor.

[0028] S44: The corrected gradient update amount is superimposed on the power-on duration and power-off interval of the previous cycle, and the superimposed parameters are saturated and pruned within the adjustment constraint domain to obtain the timing parameters for the next cycle.

[0029] The adaptive update of the timing parameters also includes a control strategy self-learning update step:

[0030] S51: Record the operation data and divide it into multiple operation segments according to time, and calculate the comprehensive evaluation index for each operation segment; the comprehensive evaluation index is calculated based on the average condensate load index, the cumulative duration of high liquid level, the estimated value of compressed air loss, and the number of drainage anomaly markers within the operation segment;

[0031] S52: Select the operating segments that meet the preset conditions for comprehensive evaluation indicators, and perform cluster analysis in the feature space composed of the multi-dimensional feature vector of condensing conditions and the condensate load index to generate multiple operating condition clusters;

[0032] S53: Extract the statistical features of the timing parameters within the multiple operating condition clusters as candidate parameters, compare them with the existing parameters in the parameter template library, and when the comprehensive evaluation index corresponding to the candidate parameter is better than the existing parameter, update the timing initial parameters and adjustment rules in the parameter template library using the smoothing coefficient.

[0033] The method for determining the preset nonlinear mapping function and the hierarchical threshold is as follows:

[0034] Based on the statistical distribution characteristics of the multidimensional feature vectors of historical condensing conditions under different equipment types and environmental conditions, the parameters and grading thresholds of the nonlinear mapping function are pre-set; and the parameters and grading thresholds of the nonlinear mapping function are periodically updated according to the statistical distribution characteristics of the multidimensional feature vectors of newly added condensing conditions.

[0035] The self-learning update step of the control strategy includes:

[0036] The statistical characteristics of the drainage response index are incorporated into the comprehensive evaluation index; cluster analysis is performed in the joint feature space formed by the condensate load index and the statistical characteristics of the drainage response index; and the statistical characteristics of the drainage response index are used as update constraints, and the smooth update of the parameter template library is triggered only when the statistical characteristics of the candidate parameter are better than the existing parameters.

[0037] A smart solenoid valve drainage control system with adjustable timing parameters includes:

[0038] The controller is internally configured with the following functional modules that work together:

[0039] The signal acquisition and feature construction module is used to acquire condensation condition data of the water storage chamber. The condensation condition data includes at least the liquid level signal of the water storage chamber, and a multi-dimensional feature vector characterizing the current condensation condition is constructed based on the condensation condition data.

[0040] The condensate load assessment and operating condition classification module is used to calculate the condensate load index based on the multidimensional feature vector, and determine the current condensate operating condition level based on the condensate load index.

[0041] The parameter template management and timing parameter constraint setting module is used to determine the initial timing parameters of the electromagnetic drain valve according to the condensation condition level, and to set the adjustment constraint domain of the initial timing parameters. The initial timing parameters include the energizing duration and the shut-off interval.

[0042] The timing parameter adaptive adjustment module is used to control the electromagnetic drain valve to perform the drain action and to obtain the liquid level change data before and after the drain action to calculate the drain response index.

[0043] The control strategy self-learning update module is used to adaptively update the timing initial parameters within the adjustment constraint domain based on the deviation between the drainage response index and the target value, and to execute the drainage control of the next cycle using the updated timing initial parameters.

[0044] The abnormal operating condition collaborative control module is used to detect abnormal drainage conditions based on the drainage response index and liquid level changes. When the drainage response index is continuously lower than the preset lower limit or the liquid level is still close to the upper limit of the allowable liquid level after multiple drainages, the self-cleaning drainage mode is triggered, and the duration of a single power-on is decomposed into multiple sets of short pulse power-on sequences. When the ambient temperature or medium temperature is detected to be lower than the antifreeze threshold, the shutdown interval is shortened and the antifreeze heating device is controlled to work.

[0045] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0046] Compared to existing technologies, this invention constructs a multi-dimensional feature vector through anomaly point completion, adaptive normalization, and feature dimensionality reduction, achieving precise mathematical perception of condensation conditions. It introduces a dimensionless condensate load index and drainage response index, using quantitative closed-loop feedback adjustment of drainage performance to achieve real-time dynamic correction of control parameters. This invention combines short-timescale online adaptive adjustment with long-timescale strategy self-learning updates, achieving decoupled collaborative control of fast and slow variables. By integrating a self-cleaning mode to address valve blockage risks and anti-freezing collaborative control to solve low-temperature pipeline freezing problems, it significantly improves the system's robustness under extreme conditions such as high humidity, high dust, and low temperature. It effectively solves the technical pain point of traditional drainage control where energy saving and safety are difficult to balance, significantly reducing compressed air loss and decreasing the incidence of equipment corrosion, water hammer, and other failures. Attached Figure Description

[0047] Figure 1 System structure block diagram;

[0048] Figure 2 This is the overall flowchart of the method;

[0049] Figure 3 Functional flowchart for signal acquisition and feature construction;

[0050] Figure 4 This is the logic diagram for adaptive adjustment and closed-loop control. Detailed Implementation

[0051] The technical solution of the present invention will now be described with reference to the accompanying drawings and embodiments. These embodiments are merely some examples of the present invention.

[0052] Example 1

[0053] Existing solenoid valve drainage control mainly relies on preset fixed timing cycles, which cannot dynamically adjust to changes in ambient temperature and humidity or compressor load. This rigid control mode easily leads to compressed air waste at low loads and untimely drainage or even excessive liquid levels at high loads. Furthermore, existing technology lacks effective sensing and collaborative processing methods for abnormal operating conditions such as valve blockage or low-temperature freezing, and it lacks the ability to self-learn and optimize based on historical data.

[0054] To address this technical problem, this invention proposes an intelligent adjustment method for the timing parameters of an electromagnetic valve for drainage. This method constructs a multi-dimensional feature vector by collecting multi-source signals of the water level in the storage chamber and the environment, uses a dimensionless condensate load index to achieve precise quantitative classification of the operating conditions, and adaptively iteratively updates the timing parameters of the electromagnetic drain valve within the safety constraint domain based on closed-loop feedback of the drainage response index, thereby achieving synergistic optimization of liquid level safety and compressed air energy saving.

[0055] like Figure 2As shown, the electromagnetic valve drainage control method with intelligent adjustment of timing parameters provided in this embodiment includes the following steps:

[0056] S1: Obtain condensation condition data of the water storage chamber, the condensation condition data including at least the water level signal of the water storage chamber, and construct a multi-dimensional feature vector characterizing the current condensation condition based on the condensation condition data;

[0057] S2: Calculate the condensate load index based on the multidimensional feature vector, and determine the current condensate operating condition level based on the condensate load index;

[0058] S3: Determine the initial timing parameters of the electromagnetic drain valve according to the condensation condition level, and set the adjustment constraint range of the initial timing parameters. The initial timing parameters include the energizing duration and the shut-off interval.

[0059] S4: Control the electromagnetic drain valve to perform the drain action and obtain the liquid level change data before and after the drain action to calculate the drain response index;

[0060] S5: Based on the deviation between the drainage response index and the target value, the timing initial parameters are adaptively updated within the adjustment constraint domain, and the updated timing initial parameters are used to execute the drainage control for the next cycle.

[0061] The construction of the multidimensional feature vector characterizing the current condensation condition includes:

[0062] S11: Acquisition and temporal alignment of multi-source heterogeneous data;

[0063] This step aims to map asynchronous sampling data and their corresponding timestamps from level sensors, temperature sensors, and compressor operating status data to the sampling time of a preset control cycle using timing alignment algorithms such as nearest neighbor resampling and interpolation estimation, generating a multi-source signal sequence with time axis alignment. Specifically, this step aligns multiple asynchronous signals to the same control cycle time axis, ensuring that a set of time-consistent operating condition data is obtained at the end of each control cycle. The system uses the internal clock of the microprocessor control unit as a unified time reference, with the power-on time as the zero point, and establishes a global time axis according to the control cycle. The control cycle is preferably 0.5 to 2 seconds, with a typical value of 1 second. This cycle is neither less than the minimum sampling interval of each sensor nor more than approximately one-fifth of the time scale of the main operating condition changes.

[0064] For liquid level signals that change rapidly and whose sampling frequency is typically higher than the control cycle, the controller uses a nearest neighbor resampling strategy at the end of each control cycle to select the most recent valid liquid level value from the vicinity of that cycle with a time difference not exceeding a preset proportion as the representative value for that cycle. This proportion is typically 30% to 50% of the control cycle. If no new value is sampled within the cycle, the liquid level value from the previous cycle is used as the interpolation result for the current cycle using a zero-order hold method. For temperature signals that change slowly and whose sampling cycle may be longer than the control cycle, the most recent valid temperature sample value is used at the end of each control cycle. If the interval between this sample and the current time exceeds several control cycles (3 to 5), the current temperature value is estimated based on the changing trend of the most recent valid samples through linear extrapolation or moving average interpolation. For compressor operating status signals whose changing frequency is much lower than the control cycle, the controller uses a nearest state hold strategy. At the end of each control cycle, the most recent state record, no later than the current time, is used as the interpolated state value for that cycle. If no status data is obtained within a preset number of cycles after system startup, the system is temporarily treated as the default shutdown state, and a status query is initiated proactively. Through the above resampling and interpolation estimation steps, the timing alignment of three heterogeneous signals—liquid level, temperature, and compressor status—on the unified control cycle time axis was achieved.

[0065] S12: Anomaly detection and data completion based on statistical characteristics;

[0066] like Figure 3 As shown, this step is based on the acquisition and time-aligned signal sequence generated from multi-source heterogeneous data. It monitors the continuity of the signal and performs threshold judgment. When a signal mutation amplitude exceeds a preset multiple threshold, or when the sensor output value remains unchanged for multiple consecutive preset control cycles, the data at the corresponding time is marked as an anomaly. The anomaly is then numerically completed using neighboring time interpolation and historical trend extrapolation based on the duration of the anomaly. Specifically, this includes the following steps:

[0067] S121: Sliding time window construction and statistical benchmark generation;

[0068] This step establishes a highly reliable time series statistical benchmark, providing a mathematical basis for subsequent anomaly detection and data repair. The controller maintains a FIFO sliding window of 20 control cycles. Based on the difference sequence of adjacent sampled values ​​within the window, the median of the difference is calculated to reflect the typical trend of the signal. Simultaneously, the median of the absolute deviation of the difference sequence is calculated to quantify the normal fluctuation range of the signal. Furthermore, the median of the absolute value of the difference is calculated as a statistical benchmark characterizing the typical amplitude fluctuation of the signal.

[0069] S122: Amplitude-based mutation detection based on dual statistical thresholds;

[0070] This step directly uses the statistical benchmark generated in the sliding time window construction and statistical benchmark generation steps to perform dual-threshold abrupt change detection based on relative deviation and absolute amplitude for the instantaneous changes in the signal between the current period and the previous period. First, the signal difference between the current control period and the previous period is calculated as the instantaneous change. If the deviation of this change from the median of the difference within the window exceeds three times the difference sequence, or if the absolute value of the change exceeds twice the median of the absolute values ​​of the differences, an amplitude anomaly is determined to exist in the current period. Temperature signals are also judged separately using the same logic; measurements determined to be anomalous are marked as invalid, triggering subsequent completion operations.

[0071] S123: Platform-based dead zone tolerance-based jamming anomaly detection;

[0072] After completing amplitude-type abrupt change detection, this step introduces jamming detection logic to identify abnormally stable values ​​in the sensor output. The specific operation is as follows: Calculate the absolute value of the difference between measured values ​​of adjacent control cycles, and simultaneously preset a minimum effective change threshold. This threshold is determined based on the sensor's noise floor and quantization error, and is used to filter out interference from noise and quantization error. If the absolute value of the difference is less than this threshold, it is determined that the measured value of the current cycle has no significant change relative to the previous cycle, and the counter for consecutive cycles with no significant change maintained by the system is incremented by 1. Conversely, the counter is reset to zero. For liquid level signals, the typical range of the jamming judgment threshold is 10–30 control cycles. When the counter reaches this threshold, it is determined that there is a risk of sensor jamming or blockage, and the measured data within this continuous period are uniformly marked as abnormal and awaiting completion. Temperature signals use independent and similar detection logic, and their jamming judgment threshold is significantly higher than that of liquid level signals, typically 3–10 times the liquid level jamming judgment threshold, corresponding to a duration of several minutes to tens of minutes.

[0073] S124: Hierarchical interpolation repair and trend extrapolation completion of outlier data;

[0074] For the abnormal sampling points marked in the previous steps, this step restores signal continuity through a classification completion strategy. Specifically, the controller searches bidirectionally along the time axis to determine the nearest normal measurement points at both ends of the abnormal segment as reference endpoints. For isolated or short-term anomalies with a continuous abnormal cycle of no more than 1 to 3, linear interpolation is used for repair. Using the line connecting the two reference endpoints as a reference, interpolation is calculated according to the time position to replace the abnormal value, achieving a smooth numerical transition. For long-term continuous anomalies with a continuous abnormal cycle of more than 1 to 3, trend model extrapolation completion is used. Five to ten normal historical samples before the starting point of the abnormal segment are selected, and a change trajectory model, i.e., a linear model, is fitted. Based on this model, the values ​​of each control cycle in the abnormal segment are predicted, completing the trend reconstruction of long-term missing data. In addition, if the continuous abnormal cycle exceeds a preset limit threshold, which is greater than the jamming judgment threshold, it indicates that the sensor may have a serious hardware failure or be jammed for a long time. The system will stop the numerical completion operation, trigger a fault alarm, and switch to the safety drainage mode to avoid false data interfering with the control logic.

[0075] S13: Within a sliding time window covering several control cycles, calculate the median and upper and lower percentile ranges of the multi-source signal sequences that have been time-aligned and completed with anomaly completion, and perform a linear mapping on the multi-source signal sequences with the median as the center and the percentile range as the scale parameter to obtain a normalized dimensionless signal sequence.

[0076] After completing the anomaly point completion and signal time alignment, this step performs adaptive normalization on the liquid level and temperature signals, mapping signals with different dimensions and fluctuation amplitudes to a unified numerical range, which facilitates comparable analysis across equipment and operating conditions.

[0077] The controller maintains a sliding normalization window in memory for both liquid level and temperature. The window length is 30 to 60 control cycles, with a typical value of 40. The windows are updated in a first-in, first-out (FIFO) manner, writing the latest data and discarding the oldest data in each new cycle. During system startup, if the cumulative sample size is less than 80% of the window length, the factory-calibrated reference ranges (10% to 80% of the effective height for liquid level and 5 to 40°C for temperature) are used as the initial normalization scale. Once the sample size meets the requirements, the system automatically switches to an adaptive mode based on real-time data.

[0078] During the stable operation phase, the controller calculates the median of the liquid level and temperature signals as the center value and extracts the difference between the upper and lower percentiles as the fluctuation range. For liquid level, a 10% to 90% percentile interval is preferred, while for temperature, a 10% to 90% or 25% to 75% percentile interval can be selected based on the gradual change characteristics. This covers most normal data and suppresses the influence of extreme values. When the calculated fluctuation range is lower than the preset minimum effective range (5% to 10% of the effective range for liquid level and 5% of the typical range for temperature), this minimum threshold is used instead to avoid amplifying noise in scenarios with small fluctuations. After obtaining the center value and fluctuation range, the controller performs dimensionless mapping of liquid level and temperature for each cycle in a linear manner. It first calculates the deviation from the relative median, then scales it by half the fluctuation range or the minimum threshold, ensuring that most normal deviations fall within the range of approximately -2 to +2. For temperature, this range can be relaxed to -2 to +3. Simultaneously, a boundary limit of -3 to +3 is set for the results, and values ​​exceeding this limit are truncated. The processed liquid level and temperature values ​​no longer carry physical units such as millimeters and degrees Celsius, but are uniformly represented as the degree of deviation from a typical level, having consistent engineering meaning across different equipment and operating conditions. The compressor status signal uses a discrete coding method to characterize the operating condition: 0 indicates shutdown, 1 indicates light load, 2 indicates normal load, and 3 indicates heavy load. Specifically, the controller obtains the current load status by collecting the real-time operating current of the compressor's main motor, and then performs hierarchical coding according to preset rules: a real-time current of 0 or below the standby current threshold is determined to be a shutdown condition, coded as 0; a load rate corresponding to the real-time current in a low range, i.e., below 30% of the rated power, is determined to be a light load condition, coded as 1; a load rate in the middle range, i.e., 30% to 80%, is determined to be a normal load condition, coded as 2; and a load rate in the high range, i.e., above 80%, is determined to be a heavy load condition, coded as 3.

[0079] S14: Perform principal component analysis on the dimensionless signal sequence, extract principal component features whose cumulative energy percentage reaches a preset threshold, and generate the multidimensional feature vector with fixed dimensions.

[0080] Principal component analysis (PCA) is performed on the normalized multidimensional signal to compress the original multidimensional features into a condensation condition multidimensional feature vector with fixed dimensions and an energy proportion reaching a preset threshold. This reduces the complexity of subsequent condensate load index calculations and enhances the sensitivity of the feature vector to the main changing patterns of condensation conditions. Based on this, this step employs a linear dimensionality reduction method based on a sliding time window, determining the output feature dimension through a preset cumulative energy proportion threshold.

[0081] Specifically, after time alignment and adaptive normalization, the controller constructs a 6-dimensional original feature vector at the end of each control cycle, which serves as the input for subsequent dimensionality reduction. These six components are: normalized liquid level deviation (the degree of deviation of the current liquid level from the typical center of this stage); normalized temperature deviation (the degree of deviation of the current temperature from the typical center); compressor operating status code (0 indicates shutdown, 1 indicates light load, 2 indicates normal load, and 3 indicates heavy load, which can be normalized to the highest level); short-term liquid level change rate (based on the net change and average rise / fall rate of the liquid level over the most recent control cycles); short-term liquid level fluctuation amplitude (the typical fluctuation range of the liquid level relative to the short-term average within the aforementioned window); and short-term temperature change rate (based on the net change and average change rate of the temperature calculated over the most recent 5 to 10 control cycles). These six scalars are combined in a fixed order to form the original feature vector. If necessary, drainage-related derived features can be extended based on this, but this scheme preferably uses a fixed 6-dimensional vector to balance complexity and real-time performance.

[0082] To identify the correlations of features within a certain time range and extract stable main change directions, this step introduces a sliding time window at the feature processing level. At the end of each control cycle, the controller extracts the raw feature vectors from the most recent few cycles from the historical records, ranging from 30 to 100 control cycles, with a typical value of 60. These vectors are arranged chronologically to construct a feature matrix, with each row corresponding to one control cycle and each column corresponding to one feature component. A first-in-first-out (FIFO) approach is used to maintain a constant window length. This feature matrix comprehensively reflects the correlations between recent operational features and their components, providing a data foundation for subsequent main direction extraction.

[0083] The dimensionality reduction model in this step is based on principal component analysis (PCA), which is built and solidified offline during equipment manufacturing or trial operation. During training, operational data of the same model of equipment under various condensing loads, ambient temperatures, and drainage conditions are collected to form a training set covering 2000 to 10000 control cycles. This training set is assembled into a feature matrix, and PCA is performed to obtain the principal directions sorted from highest to lowest explained variance. Principal components are selected based on the principle that the cumulative explained variance is not lower than a preset threshold, typically 90%. The final principal feature dimensions are usually 2 to 4, with 3 dimensions being preferred in this approach. After training, the corresponding linear transformation coefficients are solidified into a feature transformation matrix, and the training mean of each original feature is saved as a reference for online zero-mean normalization.

[0084] During the online operation phase, the controller converts the current original feature vector into a low-dimensional condensing condition multi-dimensional feature vector according to a fixed process in each control cycle. It calculates the 6-dimensional original feature vector for the current cycle based on rules, and performs a translation process using the feature mean saved during the training phase. Each component is subtracted from its corresponding training mean to ensure the current feature maintains a consistent reference benchmark with the training data. After the translation process, the feature vector is input into the dimensionality reduction module, which linearly combines the original features based on a pre-stored feature transformation matrix to obtain a low-dimensional output sorted by principal components. This scheme preferably selects the first three principal features to form the condensing condition multi-dimensional feature vector. From an engineering physics perspective, the first principal feature typically has a higher weighting for normalized liquid level deviation and short-term liquid level change rate, and can be considered a comprehensive indicator of the condensate accumulation level and upward trend. The second principal feature focuses more on normalized temperature deviation and compressor load status, reflecting the impact of the temperature environment and equipment load matching degree on the condensing condition. The third principal feature is more closely related to the short-term fluctuation amplitude of liquid level and the frequency of start-stop state changes, helping to identify unstable drainage strategies or abnormal switching of operating conditions. Through the above dimensionality reduction and main feature extraction, the feature dimension can be significantly compressed while ensuring information retention, providing a compact and physically meaningful input for subsequent condensate load index calculation and adaptive parameter tuning.

[0085] The calculation of the condensate load index and determination of the current condensate operating condition level includes the following sub-steps:

[0086] S21: Within the sliding time window, calculate the short-term generation rate component and the long-term cumulative trend component of the liquid level change, and combine the compressor operating duty cycle to perform a weighted summation of the components to generate a comprehensive condensate generation index.

[0087] Specifically, this step reuses a sliding time window of 60 control cycles to characterize the overall evolution trend of the condensation condition at the current stage. Based on this, the controller, using the level signal that has undergone anomaly handling, time alignment, and normalization, and combining the operating and shutdown markers derived from the compressor's operating status signal, decomposes the condensate generation behavior into short-term and long-term time scales for analysis. Specifically, the controller uses the current control cycle as a baseline and divides the main window into two types of sub-windows. The short-term sub-window extracts 5 to 15 control cycles from the end of the main window, typically 10 cycles, to capture the risk of a recent surge in condensate. The long-term sub-window directly uses the length of the main window, such as 60 cycles, to characterize the slow accumulation trend of the level. Both work together to cover both instantaneous and cumulative effects. Within each sub-window, the controller uses the on / off state of the electromagnetic drain valve to divide the process into shut-off and draining segments. Liquid level changes are only statistically analyzed during the natural accumulation phase when the valve is closed. Segments experiencing sudden drops in liquid level due to draining are eliminated or significantly downweighted to estimate the short-term and long-term average liquid level rise rates, serving as a measure of the natural condensate generation intensity. To reflect the impact of compressor load on condensate generation, the controller categorizes compressor status into two types: shutdown (coded 0) and operation (coded non-zero). The operating time percentage is calculated separately in the short-term and long-term sub-windows. If necessary, different weights can be assigned according to light load, normal load, and heavy load to generate effective working time or operating duty cycle indicators. Subsequently, two condensate generation components are constructed based on the average liquid level rise rate and operating duty cycle. In the short-term component, the liquid level rate weight is preferably 0.6 and the operating duty cycle weight is preferably 0.4, focusing more on recent changes in the liquid level. In the long-term component, the liquid level rate weight is preferably 0.4 and the operating duty cycle weight is preferably 0.6, focusing more on the cumulative effect under long-term high load. The values ​​of each component are preferably constrained to the range of 0 to 1, and are truncated by saturation limit when they exceed this range.

[0088] S22: Calculate the ratio of the comprehensive condensate generation index to the maximum safe condensate volume, and input the obtained ratio into a preset nonlinear mapping function for compression processing to obtain a dimensionless condensate load index;

[0089] After obtaining the short-term and long-term components, the controller constructs a unified dimensionless load index based on the physical parameters of the water storage chamber. The ratio of the generation rate component obtained from the comprehensive condensate generation index calculation step to the maximum safe condensate volume of the water storage chamber is calculated to obtain the normalized condensate generation intensity, where the maximum safe condensate volume is determined by the effective volume and the upper limit of the allowable liquid level. Subsequently, this generation intensity is input into a preset nonlinear mapping function, including an S-curve or a piecewise linear function. This function ensures that the output value changes gradually when the generation intensity is low, and the slope of the output value increases significantly when the generation intensity approaches the critical value corresponding to the upper limit of the liquid level. After this mapping process, a dimensionless condensate load index is finally obtained, primarily distributed between 0 and 1. This index can nonlinearly amplify the characteristics of high-risk operating conditions, improving the sensitivity of subsequent classification judgments.

[0090] S23: The condensate load index is compared with the classification threshold to determine the operating condition level; the classification threshold includes an upward threshold and a downward threshold to form a hysteresis interval, and the value of the classification threshold is offset and corrected according to the current ambient temperature.

[0091] Specifically, the controller uses the condensate load index as input to classify the current condensate drainage condition into three levels: low load, medium load, and high load. Through hysteresis-based grading thresholds and temperature-related threshold offsets, this step suppresses frequent fluctuations in operating conditions and avoids frequent switching of solenoid valve drainage timing parameters, while prioritizing drainage safety margins in low-temperature environments. During equipment factory calibration or on-site commissioning, based on the statistical distribution of the condensate load index in typical operating data, the condensate load index is limited to the range of 0 to 1, and basic boundary values ​​for low load, medium load, and high load are set all at once. Typical standards are: a condensate load index below approximately 0.3 to 0.4 is considered a low load condition; between approximately 0.3 to 0.4 and 0.6 to 0.7 is considered a medium load condition; and above approximately 0.6 to 0.7 is considered a high load condition. These basic grading thresholds are stored in the controller.

[0092] To reduce frequent escalation and scalding caused by small fluctuations in the condensate load index near the boundary point, a dual-threshold structure with hysteresis is set between adjacent operating conditions. Specifically, an upward and downward threshold is set between low and medium loads, and similarly between medium and high loads. The condensate load index only escalates when it consistently exceeds the upward threshold and degrades when it consistently falls below the downward threshold. Within the hysteresis range between the two thresholds, the original operating condition level is maintained. This dual-threshold combination, along with a continuous periodic determination, suppresses short-term fluctuations that cause operating condition instability. Considering that condensate is more prone to freezing and clogging pipes at low temperatures, this step adds temperature threshold correction logic above the basic classification threshold. The controller periodically acquires temperature signals from ambient or medium temperature sensors. When the temperature is higher than a preset temperature threshold (typically 5 degrees Celsius), the basic classification threshold is used. When the temperature is lower than or close to this threshold, a fixed offset is applied to the escalation and degrade thresholds for each operating condition according to the temperature range. The specific rule is that the lower the temperature, the lower the overall upgrade threshold and the slightly higher the downgrade threshold. This makes it easier to upgrade and more difficult to downgrade under low-temperature conditions. The relevant offset is implemented through a preset temperature and threshold correction table. The controller adds the correction to the basic classification threshold in each control cycle to obtain the actual classification threshold.

[0093] After obtaining a stable and temperature-corrected operating condition level, the controller sets and adjusts the solenoid valve drainage timing parameters according to different operating conditions. Under low-load conditions, a longer drainage cycle and shorter drainage time are used to reduce ineffective drainage. Under medium-load conditions, a medium drainage cycle and drainage time are used, with minor adjustments based on the changing trend of the condensate load index. Under high-load conditions or low-temperature combined with medium-high load conditions, the drainage cycle is shortened and the drainage time is appropriately extended, triggering an enhanced drainage mode if necessary to prevent excessive condensate accumulation or freezing. Through hysteresis grading and temperature correction mechanisms, along with corresponding adaptive control of drainage timing parameters, this step effectively balances the stability of operating condition classification and the drainage safety margin under low-temperature, high-risk conditions without increasing the complexity of on-site maintenance.

[0094] The process of determining the initial timing parameters of the electromagnetic drain valve and setting the adjustment constraint domain of the initial timing parameters specifically includes the following steps:

[0095] S31: Using the parameter template library, perform matching and retrieval based on the current condensing condition level, compressed air equipment type, rated drainage capacity, and current working pressure, and select the corresponding basic parameter group;

[0096] This step is used to quickly provide a set of timing initial parameters based on engineering experience for different combinations of compressed air equipment and operating conditions, while ensuring versatility. To this end, a parameter template library is pre-established in the controller's non-volatile memory. This parameter template library uses equipment and operating condition identification information such as compressed air equipment type, rated discharge capacity, and current operating pressure range as index keys to store one or more sets of basic parameters.

[0097] Specifically, during the equipment factory calibration or on-site commissioning phase, tests are conducted based on combinations of different compressor models, rated drainage capacities, and typical operating pressure ranges. The common range within this range is 0.6–1.0 MPa. Condensate generation and drainage tests are performed separately. For each combination, the required energization duration and shut-off interval of the electromagnetic drain valve under typical condensation conditions (light load, normal, heavy load, etc.) are recorded, ensuring the water level in the storage chamber remains below the allowable upper limit without excessive waste of compressed air. These parameters, optimized based on on-site experience, form a set of basic parameters, which are then written into the parameter template library. Each set of basic parameters includes at least the recommended energization duration and recommended shut-off interval for the corresponding operating condition level, as well as several reference information for subsequent constraint domain calculations.

[0098] During online operation, at the end of each control cycle, the controller retrieves the current condensing operating condition level and simultaneously reads the compressed air equipment type, rated drainage capacity, and current operating pressure range configured during equipment installation. This information is combined to form the search key in the parameter template library. When performing a matching search in the parameter template library, priority is given to entries with completely identical equipment type, rated drainage capacity, operating pressure range, and current operating condition level. If a perfect match exists, the corresponding basic parameter group is directly selected as the subsequent candidate parameter. If no perfect match exists, an approximate matching strategy is adopted according to a preset priority. Priority is given to selecting the pressure range entry closest to the current operating pressure within the same equipment type and rated drainage capacity range, or selecting a basic parameter group with an upper limit slightly higher than the current operating condition level within the same operating condition level, to ensure the selection result is biased towards the safety side. In extreme cases, if no matching entry exists in the template library, the controller reverts to the factory default basic parameter group or adopts a conservative safety parameter group, and records this match as a downgraded use via a flag for subsequent self-learning and completion of operating data.

[0099] S32: The recommended values ​​in the basic parameter group are determined as the timing initial parameters of the electromagnetic drain valve, and the timing initial parameters include at least the energizing duration and the shut-off interval;

[0100] This step converts the recommended values ​​in the basic parameter set into the timing initial parameters for the current control strategy. Specifically, for the selected basic parameter set, the controller reads the recommended energizing duration and recommended shut-off interval corresponding to the current condensing operating level, records them as the initial values ​​of the energizing duration and shut-off interval for the current control cycle, and uses them as the timing initial parameters for the electromagnetic drain valve.

[0101] During the basic parameter design phase, it is recommended that the energizing duration prioritize the response time of the solenoid valve coil and the valve body's mechanical structure to ensure that the valve core can fully open and form a sufficient flow cross-section during energization. Typically, under light load conditions, the value should be slightly higher than the minimum energizing time required for the valve to fully open; under heavy load conditions, it should be appropriately extended to increase the single-pass drainage volume. The recommended shut-off interval should be determined by considering factors such as the condensate load index, the effective volume of the storage chamber, and the upper limit of the allowable liquid level. Under light load conditions, the shut-off interval can be appropriately lengthened to reduce ineffective drainage; under heavy load conditions or high-load and low-temperature conditions, the shut-off interval should be shortened to increase the drainage frequency and prevent excessive accumulation or freezing and blockage of condensate in the storage chamber.

[0102] The timing initial parameters obtained in the above manner not only inherit the empirical rules accumulated in the template library over a long period of time, but also correspond to the current condensation condition level, providing a reasonable starting point for subsequent adaptive fine-tuning based on drainage response indicators, and avoiding large-scale searching of parameters starting from unreasonable initial values.

[0103] S33: Based on the equipment model, the effective volume of the water storage chamber and the allowable duty cycle of the electromagnetic coil, set an adjustment constraint domain for the timing initial parameters. The adjustment constraint domain at least limits the minimum and maximum values ​​of the energizing duration and the shut-off interval, as well as the upper limit of the single adjustment step size.

[0104] This step aims to provide a safety boundary for the online adaptive update of timing parameters, preventing the energization duration and shutdown interval from deviating from the equipment's allowable operating range during adjustment, or causing the risk of excessive or insufficient drainage. Therefore, after determining the initial timing parameters, the controller further sets an adjustment constraint domain for the initial timing parameters based on equipment constraints such as the equipment model, the effective volume of the water storage chamber, and the allowable duty cycle of the electromagnetic coil.

[0105] Specifically, regarding the energizing duration parameter, the controller reads the equipment model corresponding to the configured electromagnetic drain valve and obtains the minimum fully open time, the allowable continuous energizing time of the coil, and the recommended upper limit of the duty cycle for that valve model from the equipment parameter table. Combining this with the basic energizing duration recorded in the template library, the controller sets the minimum allowable energizing duration to a safety multiple not less than the minimum fully open time, with 1.1 to 1.3 times being a commonly used range, to avoid adaptive parameter adjustment shrinking the energizing time to the range where the valve is not fully open. The maximum allowable energizing duration is calculated based on the allowable duty cycle of the coil and the control cycle length, ensuring that the average coil heating does not exceed the design limit under continuous multi-cycle high-load drainage. Regarding the shut-off interval parameter, the controller comprehensively considers the effective volume of the water storage chamber, the maximum safe condensate volume, and the current condensate load index to provide the minimum and maximum allowable shut-off intervals. The minimum shut-off interval ensures that under extreme heavy-load conditions, excessively frequent drainage will not cause frequent pipeline impacts or excessive compressed air loss. The maximum shut-off interval ensures that, under light load or intermittent operating conditions, the water level in the water storage chamber will not exceed the allowable upper limit between two drainage intervals, even under the most unfavorable condensate generation conditions.

[0106] After determining the aforementioned upper and lower limits, this part of the technical solution also sets upper limits for the single adjustment step size for both the energizing duration and the shut-off interval. The upper limit for the single adjustment step size can be determined based on the recommended values ​​of the basic parameter set and the expected convergence time, controlling the adjustment amplitude in a single cycle to not exceed 10% to 20% of the current parameter value, in order to avoid large parameter oscillations caused by short-term fluctuations in the drainage response index. In subsequent processes, the controller calculates the gradient update amount based on the deviation between the drainage response index and the target value. Before this update amount is superimposed on the parameters of the previous cycle, it will be compared with the upper limit of the step size and subjected to saturation trimming to ensure that the amplitude and direction of parameter adjustment are always under control.

[0107] The above method creates an adjustment constraint domain that at least defines the minimum and maximum allowable values ​​for the energizing duration and shut-off interval, as well as the upper limit for the single adjustment step size. This constraint domain, along with the initial timing parameters, is stored in the controller's operating parameter area. During subsequent adaptive updates, all adjustments to the timing parameters are confined within this adjustment constraint domain, thereby achieving gradual convergence of the timing parameters towards a better control strategy while ensuring drainage safety and equipment reliability.

[0108] The calculated drainage response index and the timing parameters are adaptively updated, and the logical flow is as follows: Figure 4 As shown, the specific steps include the following:

[0109] S41: Calculate the ratio of the liquid level difference before and after a single drainage action to the corresponding energization duration to obtain the single drainage efficiency index. Then, normalize the single drainage efficiency index in combination with the current condensate load index to obtain the drainage response index.

[0110] This step quantifies the drainage effect of each electromagnetic drain valve energization as a dimensionless drainage response index, serving as feedback for subsequent adaptive adjustment of timing parameters. Specifically, before each solenoid valve switches from closed to open, the controller latches the pre-drainage liquid level for one control cycle before energization; after energization ends, the valve closes, and a delay of several seconds occurs, the post-drainage liquid level is collected. The pre-drainage and post-drainage liquid level values ​​can be averaged over a small number of nearby sampling points to reduce instantaneous fluctuations. The difference between the pre-drainage liquid level and the post-drainage liquid level is used as the drainage volume for this instance. If the difference is lower than the preset minimum effective change threshold or the post-drainage liquid level is not lower than the pre-drainage liquid level, the record is considered invalid or low-weighted and is not included or is weakly included in subsequent statistics.

[0111] After obtaining the effective drainage volume, the controller divides the drainage volume by the actual energization duration of the solenoid valve to obtain the single drainage efficiency. This efficiency represents the drainage capacity per unit energization time, and limits or reduces the weight of extreme values ​​that significantly exceed the reasonable range of the project.

[0112] To ensure comparability of drainage performance under different condensing load levels, this step utilizes the condensate load index of the control cycle preceding the drainage action. It then retrieves the target efficiency range under the current load condition from a pre-calibrated load level-target efficiency range lookup table. The actual single-time drainage efficiency relative to this target range is mapped to a dimensionless drainage response index within the range of 0 to 2. An index approximately equal to 1 indicates that the drainage service is basically matched to the load; a value significantly less than 1 indicates that the drainage is too strong with a large margin; and a value significantly greater than 1 indicates that the drainage is too weak with a risk of service lag.

[0113] Through the above processing, the liquid level difference, energization time, and current load level are integrated into a drainage response index with clear meaning and comparable across operating conditions, providing a unified quantitative basis for the adjustment direction and magnitude of timing parameters in the gradient update calculation step.

[0114] S42: Calculate the deviation between the drainage response index and the target drainage response index, and calculate the gradient update amount of the energization duration and the gradient update amount of the shutdown interval according to the sign and magnitude of the deviation.

[0115] This step converts the deviation between the drainage response index and the target value into a quantitative adjustment of the energization duration and shut-off interval of the electromagnetic drain valve, and uses a small-step gradient update method with directional constraints to make the timing parameters converge smoothly in multiple cycles of iteration.

[0116] Within the current control cycle, if drainage occurs, the controller directly adopts the drainage response index for this period; if no drainage occurs, the response index of the most recent effective drainage can be used, or it can be recorded as no update cycle. The target drainage response index is obtained by the controller from a table in the parameter template library based on the current operating condition level and condensate load index, and has been limited to a reasonable range during the calibration phase. The drainage response deviation is defined as the current drainage response index minus the target value. A positive deviation indicates weak drainage and a risk of liquid accumulation; a negative deviation indicates strong drainage and gas waste; a deviation close to zero indicates that the current timing parameters are basically matched and no significant adjustment is needed.

[0117] The controller calculates the adjustment intensity coefficient based on the absolute value of the deviation, normalizing the deviation amplitude to the range of 0 to 1, and dividing it into three levels: small deviation (fine-tuning only), medium deviation (moderate adjustment), and large deviation (limited adjustment), to balance response speed and stability. Then, combining the deviation sign and adjustment intensity, it calculates the update amounts for the energizing duration and shut-off interval. When the deviation is positive, it extends the energizing time and shortens the interval to enhance drainage; when the deviation is negative, it shortens the energizing time and extends the interval to weaken drainage. The update step size is set as a typical percentage range according to the operating condition level. For example, the energizing time is adjusted to a certain percentage of the current value in a single cycle, and the shut-off interval is adjusted to a certain percentage of the current value. An upper limit is set for each cycle adjustment, such as the energizing time not exceeding a certain number of seconds or a certain percentage, and the shut-off interval not exceeding a certain percentage. Any excess is truncated at the upper limit, thus avoiding sudden changes in timing parameters and ensuring that the drainage intensity is gradually adjusted within a safe and controllable range.

[0118] S43: Perform dead zone processing and forgetting factor adjustment on the gradient update amount: When the deviation falls within the preset dead zone range, the update amount is set to zero; otherwise, the gradient update amount is corrected by combining the historical deviation accumulation and the forgetting factor. This specifically includes the following steps:

[0119] S431: Determination of the dead zone threshold for drainage response deviation;

[0120] Within each control cycle, the controller first performs a dead-zone determination on the drainage response deviation, which is the difference between the current drainage response index and the target value. During the factory calibration phase, a deviation dead-zone threshold based on the factory calibration data is preset according to the operating condition level: ±0.08 to ±0.10 for light load, ±0.06 to ±0.08 for normal load, and ±0.04 to ±0.06 for heavy load. These thresholds are written into the control parameter table. During operation, when the absolute value of the deviation in this cycle is less than or equal to the corresponding dead-zone threshold, the drainage effect is within the allowable error range. In this cycle, no gradient update is used, the power-on duration and power-off interval remain unchanged, and only the deviation information is recorded. When the absolute value of the deviation is greater than the dead-zone threshold, the subsequent deviation accumulation and modulation process begins to avoid frequent parameter fine-tuning caused by small deviations.

[0121] S432: Two-way bias accumulation based on forgetting factor;

[0122] To distinguish between continuous unidirectional deviation and occasional deviation, the controller maintains two cumulative deviation values, one for positive and one for negative, which are initialized to 0 upon power-up or mode switching. When the deviation of a certain cycle exceeds the dead zone and is positive, i.e., in the direction of insufficient drainage, the deviation of this cycle is added to the positive cumulative value according to a certain proportion, while the negative cumulative value is decayed according to the forgetting factor; when the deviation is negative, i.e. in the direction of excessive drainage, the reverse processing is performed.

[0123] The cumulative amount update adopts a combination of historical retention and current increment: the cumulative amount of the previous period is retained according to the historical retention coefficient, which ranges from 0.6 to 0.9, and the current deviation is added according to the increment coefficient, which ranges from 0.1 to 0.4. This avoids drastic jumps caused by single-period deviations and gradually amplifies their impact when deviations continue in the same direction. When the deviation sign reverses or returns to the dead zone for several consecutive periods, the cumulative amount inconsistent with the current direction is accelerated to decay, and if necessary, it can be gradually decayed to near 0 to prevent old trends from interfering with new operating conditions for a long time.

[0124] S433: Load adaptive inertial adjustment and update quantity smoothing;

[0125] The controller uses the condensate load index to statistically analyze its variation over the most recent control cycles. Combining this with the historical retention coefficient (range 0.6–0.9) in the bidirectional deviation accumulation step based on the forgetting factor, when the load change is low, the historical retention coefficient is configured close to 0.9, typically set to 0.85. This makes the system rely more on the accumulated historical deviation, ensuring the stability of timing parameter changes. When the load change is high or increases significantly in a short period, the historical retention coefficient is configured close to 0.6, typically set to 0.65. This increases the weight of the current deviation in the accumulated value, enhancing the tracking and response capability to new operating conditions under sudden load changes.

[0126] After obtaining the effective cumulative deviation, the controller generates a smoothing modulation coefficient ranging from 0 to 1. When the cumulative deviation is small, the modulation coefficient is set to 0.2–0.4, with a typical value of 0.3. Only a portion of the original gradient update value from the gradient update calculation step is adopted, limiting the adjustment range of parameters within a single control cycle. When the cumulative deviation is large and the same trend persists across multiple control cycles, the modulation coefficient is set to 0.8–1.0, with a typical value of 0.9, ensuring that the timing parameters are adjusted primarily according to the original gradient update recommendations. Finally, the controller multiplies the gradient update values ​​in the power-on duration and power-off interval directions by the corresponding smoothing modulation coefficient to obtain the smoothed timing parameter update value for the current control cycle. This update value will be added to the current timing parameters in subsequent steps.

[0127] S44: The corrected gradient update amount is superimposed on the power-on duration and power-off interval of the previous cycle, and the superimposed parameters are saturated and pruned within the adjustment constraint domain to obtain the timing parameters for the next cycle.

[0128] This step uses the timing parameters that actually take effect in the previous control cycle as a benchmark, and superimposes the effective update quantities after dead-time and historical retention modulation to obtain a new set of candidate values ​​for energization duration and shutdown interval. Within the pre-set timing parameter constraint domain, saturation trimming and single-step size limiting are performed. Finally, the trimmed parameters are written into the timing control unit, ensuring that the energization duration and shutdown interval smoothly converge cycle by cycle within the physical safety boundary to the target range that meets the trade-off requirements of drainage safety and gas consumption. Specifically, it includes the following steps:

[0129] S441: Incremental generation and initialization strategy for candidate parameters;

[0130] In each control cycle, the controller reads the actual effective power-on duration and shutdown interval parameters from the previous control cycle. When the system is undergoing initial power-on, factory reset, or has no valid parameters from the previous cycle after a fault reset, a set of default initial timing parameters determined during factory calibration or commissioning is used as a benchmark. Taking a small to medium-sized compressor drainage system as a reference, the initial power-on duration can be set to 5 to 10 seconds, and the initial shutdown interval to 20 to 40 seconds. The specific settings can be differentiated based on the equipment's rated drainage capacity, operating pressure level, and typical operating conditions. Subsequently, the controller adds the effective update of the power-on duration and shutdown interval for the current cycle to the aforementioned benchmark parameters according to the additive superposition principle, obtaining new candidate values ​​for the power-on duration and shutdown interval. Specifically, this step preferably uses a linear superposition method of adding the previous cycle parameters to the current cycle increment, making the parameter change trajectory clear and traceable, rather than using direct overwriting or percentage scaling methods.

[0131] S442: Parameter saturation pruning based on physical constraint domain;

[0132] The timing initial parameters and adjustment constraint domain setting steps have pre-configured timing parameter constraint domains for each device based on factors such as equipment model, drain outlet diameter, rated working pressure, and allowable duty cycle of the electromagnetic coil. These constraints include at least the minimum and maximum values ​​for the energizing duration and the shut-off interval, as well as optional operating condition-related constraints. Taking a small rated drainage capacity electromagnetic drain valve suitable for 0.75 to 2.2 kW air compressors as a reference, the energizing duration constraint domain can be configured to 3 to 15 seconds, and the shut-off interval constraint domain to 20 to 120 seconds. For medium and large air compressor systems, the energizing duration constraint domain can be configured to 5 to 30 seconds, and the shut-off interval constraint domain to 10 to 90 seconds. Specific values ​​are determined based on prototype test results during factory calibration and are fixed in the parameter template. During online operation, the controller compares the newly obtained candidate energizing duration value with its corresponding minimum and maximum values. When the candidate value is less than the minimum, it is increased to the minimum; when the candidate value is greater than the maximum, it is compressed to the maximum. The shut-off interval parameter is also compared and adjusted with its constraint upper and lower limits in the same way. Through the above saturation trimming, it can be ensured that even if the adaptive adjustment proposes a more aggressive update suggestion, the final energization duration used for control will not be so short as to cause poor drainage or so long as to cause coil overheating or valve fatigue. The shut-off interval will not be so short as to cause frequent valve operation or so long as to cause excessive condensate accumulation during the drainage cycle. This provides a hard boundary guarantee for drainage safety and equipment reliability at the parameter level.

[0133] S443: Single-cycle step size limiting and dynamic adaptation to operating conditions;

[0134] While performing saturation trimming, this step also applies a single-cycle step size limit constraint to the difference between the timing parameter of the previous cycle and the candidate value after trimming, to prevent excessive jumps in parameters within a single control cycle. Specifically, when setting the constraint domain in the timing initial parameter and adjustment constraint domain setting step, an upper limit for the single adjustment step size of the power-on duration and shutdown interval is configured for each type of equipment and operating condition level. The maximum single-cycle change in the power-on duration can be limited to the range of 2 to 5 seconds, and the maximum single-cycle change in the shutdown interval can be limited to the range of 5 to 15 seconds. Under heavy load conditions, the upper limit of the step size can be appropriately relaxed, and under light load conditions, it can be appropriately tightened, to reflect the design principle of allowing parameters to approach the safe drainage range more quickly under high load and prioritizing the smooth change of parameters under low load. During online operation, after completing constraint domain pruning, the controller calculates the difference between the current candidate value and the actual effective parameter of the previous cycle. When the absolute value of this difference exceeds the corresponding step size limit, the effective parameter change range is limited to the previous cycle parameter plus the step size limit in the direction corresponding to the difference sign, instead of jumping to the candidate value all at once. In a specific scenario where the previous cycle's power-on duration was 8 seconds, the current cycle's candidate value was 14 seconds, and the single-step limit was 3 seconds, the actual effective power-on duration for this cycle was only adjusted to 11 seconds. The remaining adjustments will be gradually completed in subsequent cycles. This combination of saturation pruning and step size limiting constraints ensures that the overall evolution trend of the parameters is consistent with the adaptive algorithm output, while the specific change range of each cycle is strictly controlled, preventing sudden impacts on the solenoid valve drive circuit, valve body mechanical structure, and overall air circuit.

[0135] S444: Closed-loop verification write and timing activation logic;

[0136] After completing constraint domain trimming and step size limiting, the controller obtains the power-on duration and power-off interval after safety constraint processing for the current cycle, and confirms them as the timing parameters actually used in the next control cycle. At the end of the current control cycle calculation phase, the controller writes the power-on duration parameter to the corresponding power-on time register in the timing control module according to the pre-agreed register mapping relationship, and writes the power-off interval parameter to the corresponding interval time register. A readback verification is performed immediately after writing to confirm that the parameters are correctly stored. When a write failure or a significantly abnormal readback value is detected, the controller can trigger an alarm and revert to the known safe timing parameters of the previous cycle or the factory safe default parameters, thereby avoiding the risk of loss of control due to storage failure. To ensure the time consistency of control behavior, this step preferably adopts an effectiveness strategy of calculation in the current cycle and effectiveness in the next cycle. That is, the timing parameter calculation, trimming, and writing operations are completed within the current control cycle, and at the beginning of the next control cycle, the timing control module triggers the power-on and power-off actions of the electromagnetic drain valve according to the latest parameters. In scenarios requiring less frequent updates, several control cycles can also be grouped together, with the parameters written uniformly at the end of the group and effective in the next group cycle. By superimposing the effective update amount of the parameters from the previous cycle, and combining the closed-loop logic of constraint domain saturation pruning, single-step limiting, and write verification, it is ensured that all timing parameters are always limited within the predefined physical safety boundary and have basic fault tolerance. This allows the energizing duration and shut-off interval to converge towards the target range that meets the trade-off requirements of drainage safety and gas consumption in a gradual and small-amplitude manner over multiple cycles. Thus, without sacrificing equipment reliability, continuous and adaptive optimization of the solenoid valve drainage timing control strategy is achieved.

[0137] S45: Real-time monitoring and collaborative control of abnormal operating conditions;

[0138] This step is a parallel protection mechanism for conventional timing control. During the parameter writing and execution process in the adaptive update step of the timing parameters, the physical response status of the drainage system and environmental conditions are monitored in real time. When a risk of blockage or low-temperature freezing that cannot be addressed by conventional parameters is detected, the controller temporarily suspends the current timing parameters and triggers a high-priority collaborative control strategy to ensure equipment safety and basic drainage capacity. The specific implementation steps are as follows:

[0139] S451: Active sensing and self-cleaning of valve port blockage;

[0140] When the controller performs a drainage action, it continuously monitors the drainage response indicators and the trend of liquid level changes in the storage chamber. The system determines that there is a risk of valve blockage or impurity accumulation when it detects one of the following two situations: First, the drainage response indicator is below the preset lower limit for multiple consecutive control cycles, indicating an abnormal increase in flow resistance or a continuous decrease in single-drainage efficiency. Second, after performing multiple normal drainage actions, if the difference between the detected liquid level and the upper limit of the allowable liquid level is less than a preset threshold (i.e., it is in the high-level range), this preset threshold can be set, for example, to 10% of the upper limit of the allowable liquid level, corresponding to a liquid level at 90% or above the upper limit.

[0141] At this point, the controller immediately triggers the self-cleaning drainage mode, decomposing the single long energizing duration used in normal drainage into a high-frequency short-pulse energizing sequence. The typical duration of a single long energizing cycle is several seconds to tens of seconds, adjustable according to the rated on / off characteristics of the solenoid valve. An example parameter for the high-frequency short-pulse energizing sequence is 200ms energizing followed by 200ms de-energizing, executed continuously 10-20 times. The pulse duration and number of executions can be adaptively adjusted based on the degree of siltation at the valve orifice. After the self-cleaning sequence is completed, the system automatically returns to the normal control mode. If the drainage response indicators return to the normal range in the next cycle, cleaning is considered successful; if the abnormal state persists, the self-cleaning mode can be triggered repeatedly.

[0142] S452: Early warning and antifreeze coordination of low-temperature freezing risk;

[0143] The controller collects ambient and medium temperatures in real time via temperature sensors. When either temperature reading falls below a preset anti-freeze threshold, which can be set between 1°C and 5°C depending on the operating conditions (set to 2°C in this step), the system determines there is a risk of pipe or valve freezing and automatically enters the anti-freeze coordination mode. In this mode, the controller implements a dual protection strategy. First, it connects the power supply to an external anti-freeze heating device (a heating cable or heating rod) via a relay or solid-state switch to actively heat the valve body and connecting pipes. Second, it forcibly adjusts the shutdown interval in the timing parameters, limiting it to the maximum anti-freeze interval limit, shortening it to between 20 and 45 seconds (selected below 30 seconds in this step) to increase the frequency of drainage. High-frequency flow of compressed air and condensate removes the cold air, utilizing dynamic fluid shear force to prevent water from freezing in dead corners of the pipes. When the temperature rises above the safety threshold and maintains the preset hysteresis time, the controller automatically exits the anti-freeze coordination mode, the heating device is powered off, and the shutdown interval returns to the adaptive target value calculated in the timing parameter adaptive update step.

[0144] The adaptive update of the timing parameters also includes a control strategy self-learning update step:

[0145] S51: Record the operation data and divide it into multiple operation segments according to time, and calculate the comprehensive evaluation index for each operation segment; the comprehensive evaluation index is calculated based on the average condensate load index, the cumulative duration of high liquid level, the estimated value of compressed air loss, and the number of drainage anomaly markers within the operation segment;

[0146] The purpose of this step is to divide the long-term continuous historical control cycle data into several operational segments with clear boundaries, and to calculate a comparable comprehensive evaluation index for each segment to quantify its overall performance in terms of condensate discharge safety and compressed air energy efficiency. Specifically, this includes the following steps:

[0147] S511: Looping collection and storage of multi-dimensional historical operational data;

[0148] During the long-term online operation of this step, the controller continuously collects the system status according to the control cycle, and writes key parameters into the historical data storage area at the end of each cycle. These parameters include at least a timestamp or cycle number, a multi-dimensional feature vector of condensing conditions, specifically including core parameters such as ambient temperature, humidity, and compressor load rate, dimensionless condensate load index, the current effective power-on duration and power-off interval, drainage response indicators, the current water level signal in the storage chamber, and drainage anomaly marking information, where 0 represents normal, 1 represents self-cleaning mode, and 2 represents high level alarm.

[0149] The historical data storage area is preferably designed as a circular buffer. The data retention window is set through parameter configuration, typically 7 to 30 days or 20,000 to 50,000 control cycles. When the storage area is full, the oldest data is overwritten according to the first-in, first-out principle. After the system runs for the first time or is reset, if the length of historical data does not reach the preset minimum segment length, specifically no less than 30 minutes or a certain number of control cycles, evaluation results will not be generated temporarily; only data accumulation will be performed. Segment division and evaluation will be executed once the requirements are met.

[0150] S512: Adaptive partitioning of runtime segments based on state awareness;

[0151] During relatively idle periods in drainage control, the controller reads the most recent historical data from the historical data storage area in chronological order and divides it into several operating segments according to a uniform segment length. A fixed-duration segmentation method is adopted, with a standard segment length T_seg set. Its typical value is 60 minutes or corresponds to 500 to 1000 control cycles, and the specific value can be configured in the system parameters. During segmentation, starting from the earliest unprocessed record, segments are extracted one by one according to T_seg to form non-overlapping segments. If the last segment covers less than 50% of the standard segment length, it is temporarily stored as an incomplete segment and will be merged with new data in the next analysis before participating in the evaluation. If segmentation according to stable operating conditions is required, a stable operating condition segment segmentation rule can be added: when it is detected that the operating condition level has not changed within several consecutive control cycles, and the load index fluctuation does not exceed a preset threshold, the typical value of which is 0.05, this time period is considered a stable operating segment, and the rest of the process is the same as the fixed-duration segment.

[0152] S513: Statistical Quantification and Normalization of Multidimensional Evaluation Indicators;

[0153] For each segmented operation, the controller sequentially calculates multiple individual statistical indicators within the segment's coverage time range, reflecting the segment's average load level, safety margin, gas consumption level, and abnormal conditions. The average load level is obtained by calculating the arithmetic mean of the condensate load index across all control cycles within the segment, with a value between 0 and 1. The safety margin is achieved by comparing the liquid level signal with the upper limit of the allowable liquid level. The liquid level alarm threshold is set to 80% to 90% of the upper limit, preferably 85%. When the liquid level within the segment exceeds this threshold, the corresponding time is accumulated to obtain the cumulative duration of the high liquid level range. The gas consumption level is achieved through a simplified gas consumption estimation model. During factory calibration, a conversion factor between the energization duration and the air release volume is pre-determined. During online operation, the energization duration of each drainage action within the segment is converted and accumulated, then divided by the total segment duration to obtain the estimated gas consumption per unit time. Abnormal conditions are determined by counting the number of drainage abnormality markers within the segment, which can be counted separately by abnormality type or weighted and combined.

[0154] To facilitate weighted summarization of comprehensive scores, this step normalizes indicators of different dimensions. The cumulative time of high liquid level is mapped to a 0-1 range based on a standard that it does not exceed 5% of the segment duration; gas consumption per unit time is mapped to a 0-1 range based on the typical upper and lower limits of trial operation; and the number of anomalies is mapped to a 0-1 range based on a tolerance standard of no more than 1 to 2 times per segment. For safety-related indicators, 1 represents the best and 0 represents the worst, with any portion exceeding the upper limit truncated to 0. The average condensate load level can be normalized to the full range or a typical load range, with the typical load range being 0.3 to 0.8, used to characterize the representativeness of the segment load.

[0155] S514: Construction of comprehensive evaluation indicators that take into account both safety and energy conservation;

[0156] After obtaining the normalized indicators for each individual item, a comprehensive evaluation index is constructed for each operating segment. The controller sets weighting coefficients based on the application scenario, comprehensively considering the trade-off between safety and energy conservation. Typically, the cumulative time of high liquid level and the number of anomalies are each assigned a weight of approximately 0.3, gas consumption per unit time is assigned approximately 0.2, and the average load index is assigned approximately 0.1, with the sum of the weights being 1. The comprehensive score is calculated using a weighted summation method and then linearly mapped to a score range of 0 to 100. A higher value indicates a better overall performance in terms of safety and energy conservation for that segment. To avoid extremely low-load segments receiving excessively high scores due to extremely low gas consumption, a load weighting factor can be introduced into the comprehensive score. This factor is limited to the range of 0.9 to 1.1, giving slightly higher scores to segments with higher average loads but similar safety and gas consumption performance.

[0157] Ultimately, each operational segment is associated with a comprehensive evaluation score and several intermediate statistical characteristics. The controller stores the segment start and end times or numbers, comprehensive evaluation scores, average load index, cumulative time at high liquid level, gas consumption per unit time, number of anomalies, and timing parameters or operating condition distribution statistics within the segment in the segment evaluation storage area. In subsequent operational segment screening and operating condition cluster generation steps, a screening threshold is set based on the comprehensive evaluation score and the number of anomalies. Specifically, the standard is a score of not less than 80 points and no more than one anomaly. Candidate operational segments with superior safety, energy efficiency, and load representativeness are automatically selected from historical segments.

[0158] S52: Select the operating segments that meet the preset conditions for comprehensive evaluation indicators, and perform cluster analysis in the feature space composed of the multi-dimensional feature vector of condensing conditions and the condensate load index to generate several operating condition clusters.

[0159] The purpose of this step is to automatically select representative and preferred segments from the highly rated operating segments, cluster them according to the characteristics of condensing conditions, divide segments with similar condensing condition distribution and load levels into several operating condition clusters, and statistically obtain the timing initial parameter combination and adaptive adjustment parameter recommendation range under each operating condition within each operating condition cluster, forming candidate parameter templates classified by operating condition.

[0160] S521: Optimal segment selection based on adaptive percentile threshold;

[0161] The controller reads the comprehensive evaluation score and equivalent anomaly count calculated for each running segment. Segments with a comprehensive evaluation score not lower than the preferred threshold and an equivalent anomaly count not exceeding the upper limit are defined as preferred segments. The preferred threshold adopts a percentile adaptive setting. All segments within the current evaluation period are ranked, and the upper quartile (Q3) or the top 25% of the score distribution is taken as the threshold, which is not lower than a fixed lower limit, which is 80 to 85 points. If the number of historical segments is small, specifically less than 20, a fixed threshold is directly used, typically 85 points. The upper limit for the equivalent anomaly count is set to no more than once per segment to avoid frequently anomalous segments entering the learning samples. If the number of preferred segments meeting the conditions is less than a preset minimum (5), clustering and candidate parameter extraction are not performed in this period; only the existing parameter template library is retained.

[0162] S522: Construction and standardization of time-domain operating condition feature vectors;

[0163] For each preferred segment, the controller constructs a segment operating condition feature vector for cluster analysis based on the condensing condition multidimensional feature vector and the condensate load index sequence within the segment's coverage time range. Specifically, the mean and variance of the condensing condition multidimensional feature vector for all control cycles within the segment are calculated over time to obtain the typical level and fluctuation degree of each component. Referring to the condensate load level classification standard in the operating condition level determination step, which defines a load index of 0 to 0.3 as light load, 0.3 to 0.7 as normal load, and 0.7 to 1.0 as heavy load, the proportion of each level occupying cycles within the segment is statistically analyzed to obtain the light load proportion, normal load proportion, and heavy load proportion, and the average load index is calculated. If necessary, parameters that significantly affect drainage behavior, such as the segment's average ambient temperature and average operating pressure, can be used as additional feature components.

[0164] To eliminate differences in the dimensions and value ranges of different physical quantities, the controller standardizes each component of the operating condition feature vector by subtracting the mean and dividing by the standard deviation. This method maps each feature dimension to the range of approximately -1 to 1 based on the long-term historical data mean and standard deviation, or linearly maps it to the interval of 0 to 1 according to the preset minimum and maximum values, thus obtaining a standardized segment operating condition feature vector that can be directly used for distance calculation.

[0165] S523: Cluster analysis of preferred segments in joint feature space;

[0166] After obtaining the standardized operating condition feature vectors of all preferred segments, the controller uses the K-means clustering method based on Euclidean distance for unsupervised clustering, grouping segments with similar operating condition features into the same cluster and segments with significant differences into different clusters. The number of clusters K is automatically selected within a preset candidate interval, which is 3 to 8. For each candidate K, the cluster centers are iteratively updated using the K-means algorithm with multiple random initializations, and the average silhouette coefficient is calculated. The K with the largest silhouette coefficient is selected as the number of clusters K_opt for this clustering.

[0167] If the silhouette coefficients corresponding to all candidate K are below a preset lower limit (0.4), or if the number of preferred fragments is significantly insufficient (specifically, below twice K_min), the controller will temporarily treat all preferred fragments as a single operating condition cluster to avoid over-segmentation when the sample size is insufficient or the differences between operating conditions are not significant. After clustering, the number of fragments within each cluster is checked. For sparse clusters with a number below the minimum cluster size threshold (3), they are merged into the nearest neighbor operating condition cluster based on the Euclidean distance between cluster centers, ensuring that each final operating condition cluster has sufficient samples to support subsequent statistical analysis.

[0168] S524: Extraction and storage of candidate parameters based on statistical features of operating condition clusters;

[0169] After completing the division of operating condition clusters, the controller extracts candidate timing parameters and adaptive adjustment parameter sets for each cluster based on the historical records of the preferred segments within the cluster. Regarding initial timing parameters, high-evaluation segments with a comprehensive evaluation score no lower than the cluster average or ranking in the top 50% are selected as statistical samples. Within their coverage period, the actual power-on duration and power-off interval for each cycle are statistically analyzed under light load, normal, and heavy load conditions. The median, mean, and 25% to 75% quantile range are calculated for each operating condition level. Combining the initial timing parameters and the timing parameter constraint domain defined in the adjustment constraint domain setting step, the median is used as the recommended initial timing parameter for the corresponding load level of the operating condition cluster, and the 25% to 75% quantile range is used as the recommended range for allowable fine-tuning. This range can be constrained to ±10% of the median and not exceed the constraint domain.

[0170] Regarding adaptive adjustment parameters, the controller statistically analyzes the value distribution of key parameters such as gradient gain coefficient, drainage response index dead zone, and historical retention coefficient during the operation of high-evaluation segments within the cluster, and calculates the correlation coefficient between each parameter and the comprehensive evaluation score. When the absolute value of the correlation coefficient of a certain parameter is not lower than a preset threshold, the threshold standard is |r|≥0.6, the parameter is considered to have a significant impact on the cluster strategy performance under this working condition, and its 25% to 75% quantile range in high-evaluation segments is preferentially adopted as the recommended value range; for parameters with low correlation but requiring constraints, a recommended range is constructed with the overall median within the cluster as the center, ranging from ±10% to 20%, and limited within the given parameter safety range.

[0171] Finally, the controller generates standardized parameter template records according to the operating condition clusters. Each record includes at least the operating condition cluster identifier and a description of representative operating condition characteristics. The specific content includes the cluster center feature vector and load level ratio, the candidate timing initial parameter set divided by operating condition level, the recommended power-on duration and power-off interval and recommended range for each level, the candidate adaptive adjustment parameter set, the recommended range for gradient gain, response dead zone, historical retention coefficient, etc., and the typical comprehensive evaluation score range of the preferred segment of this cluster. The records are then written into the parameter template library or dedicated strategy library.

[0172] S53: Extract the statistical characteristics of the timing parameters within the several operating condition clusters as candidate parameters, compare them with the existing parameters in the parameter template library, and when the comprehensive evaluation index corresponding to the candidate parameter is better than the existing parameter, update the timing initial parameters and adjustment rules in the parameter template library using the smoothing coefficient.

[0173] The purpose of this step is to compare the candidate timing initial parameters and candidate adaptive adjustment parameters obtained from the statistics within the cluster with the existing parameters in the template library, taking the operating condition cluster as the unit. Under the premise of confirming that the comprehensive evaluation has been quantitatively improved and the safety has not deteriorated, the template parameters are gradually converged to the statistical characteristic values ​​of the candidate parameters by using a preset smoothing coefficient in small steps. With the help of version management and rollback control, the historical optimal operating experience is solidified into the template library in a steady state, avoiding the control risks caused by parameter mutations.

[0174] S531: Template matching retrieval based on multidimensional feature similarity;

[0175] For each operating condition cluster, the controller constructs retrieval features based on the representative operating condition feature vector of that cluster, specifically including the average and variance of the multi-dimensional feature components of the condensing condition, the time proportion of light / normal / heavy load levels, the average condensate load index, the average ambient temperature, and the equipment type, and searches for candidate template records in the parameter template library. Each template record must at least include an operating condition level label, an applicable load index range, an applicable temperature range, an equipment type marker, and representative operating condition features saved during creation.

[0176] Specifically, the controller calculates a comprehensive matching score between 0 and 1 for each candidate template record. The weighting is as follows: operating condition level consistency (approximately 40%), the proximity of the average load index to the center of the template load range (approximately 30%), the proximity of the average temperature to the center of the template temperature range (approximately 20%), and equipment type consistency (approximately 10%). The weighted sum of these four factors is the matching score. The template entry with the highest matching score is selected as the priority matching template for that operating condition cluster. If the highest matching score is still lower than a preset threshold (0.8), it is considered that there is no suitable template in the template library. The controller generates a new template record based on the candidate timing initial parameters and the system default timing parameters for that operating condition cluster. The initial ON / OFF timing configuration of the new template is then used as a compromise between the default timing parameters and the candidate timing parameters. This compromise value is obtained through arithmetic averaging, while retaining factory safety benchmarks and historical optimization experience.

[0177] S532: Value determination of parameter optimization under multidimensional constraints;

[0178] Once a certain operating condition cluster successfully matches an existing template record, the controller reads the representative values ​​of the candidate timing initial parameters and candidate adaptive adjustment parameters for that operating condition cluster and compares them item by item with the corresponding parameters in the template record. The candidate representative value is calculated based on the high-scoring segments within the cluster. Segments with comprehensive evaluation scores ranking in the top 50% of the cluster are selected, and the actual parameter values ​​within the segments are weighted according to the score size. When the distribution is relatively symmetrical, a weighted average is used; when there is a significant skewness, a weighted median is used to obtain robust candidate representative values.

[0179] Subsequently, the controller defines the segments whose parameters fall within the candidate recommendation interval and have a high overall evaluation as the candidate parameter sample set, and the segments within the same operating condition cluster that use the current template parameters or their predecessors but do not fully meet the candidate recommendation interval as the existing template sample set. The average overall evaluation score, the percentage of time the liquid level is close to the upper limit, and the number of drainage anomalies per unit time are then statistically analyzed for both types of sample sets. The candidate parameters are considered to have optimization value relative to the existing template parameters only if the following conditions are met simultaneously: ① the average overall evaluation of the candidate sample set is significantly better than that of the template sample set; ② the candidate sample set does not significantly deteriorate in terms of the percentage of time the liquid level is high and the number of anomalies, only a slight increase is allowed; ③ both types of sample sets meet the minimum sample size requirement, with no fewer than a few segments in each type. Otherwise, the template parameters remain unchanged, and only the results of this comparison are recorded.

[0180] S533: Progressive smooth update and security boundary verification;

[0181] After determining that the candidate parameters of a certain operating condition cluster have optimization value, the controller performs a progressive update with a smoothing coefficient on the matched template entries. Different smoothing coefficients are preset for different parameter types: for parameters that directly determine the ON / OFF timing, such as the initial value of the power-on duration and the initial value of the power-off interval, the smoothing coefficient is preferably set in the range of 0.05 to 0.15, with a typical value of 0.1, so that each update only approaches a small part of the current difference; for gradient gain adjustment parameters, the smoothing coefficient is preferably set in the range of 0.25 to 0.35, with a typical value of 0.3, to accelerate strategy convergence; for parameters such as the drainage response dead zone threshold and the historical deviation retention coefficient, the smoothing coefficient is preferably set in the range of 0.15 to 0.25, with a typical value of 0.2, to achieve a trade-off between overall stability and response speed.

[0182] Instead of directly replacing the template parameters with candidate representative values ​​during updates, the new value is updated by adding a smoothing coefficient to the old value multiplied by the difference between the candidate and old values, resulting in a gradual convergence effect through multiple iterations. To avoid excessively large single update magnitudes, a relative limit is set. When the absolute value of the current convergence step exceeds 20% of the absolute value of the original parameter, or exceeds the factory-calibrated upper limit of the single adjustment step, the change is truncated within that upper limit. After completing the smooth update, the updated parameters are compared with the timing parameter constraint domain defined in the timing initial parameters and adjustment constraint domain setting steps. If the power-on duration, power-off interval, etc., exceed their respective minimum or maximum allowable values, they are directly pruned back to the boundary values ​​to ensure that the template parameters always remain within the physical safety boundaries.

[0183] S534: Version management and exception rollback control strategies for strategy evolution;

[0184] To ensure traceability and fault tolerance during long-term self-learning, this step maintains a version number, a recent update timestamp, and a finite-length historical version queue for each template record in the template library. Before each template update, the controller pushes the current parameter set and corresponding comprehensive evaluation statistics into the historical version queue and generates a new version number. When newly generated runtime segments are subsequently categorized into the corresponding operating condition cluster and use the parameters of that version template, their comprehensive evaluation results are recorded along with the version number.

[0185] During the periodic evaluation phase, the controller compares the average comprehensive evaluation changes of the previous and current versions under the same operating condition cluster and similar time windows. If the current version's score shows a significant drop exceeding a preset threshold, and the parameter changes are substantial, it is determined to be an abnormal update. The system automatically reverts to the previous version's template parameters and marks the template as under observation, suspending further updates for a certain observation period. For template records that have not been used for a long time, an elimination or reuse strategy is implemented based on the last application time and the number of calls, controlling the size of the template library.

[0186] Through the above-mentioned template matching, quality judgment, smoothing coefficient update, version rollback and elimination management, this invention constructs a self-learning closed loop that classifies according to working conditions and slowly corrects template parameters, thereby reducing the frequency of drainage anomalies.

[0187] The method for determining the preset nonlinear mapping function and the hierarchical threshold is as follows:

[0188] Based on the statistical distribution characteristics of the multidimensional feature vectors of historical condensing conditions under different equipment types and environmental conditions, the parameters and grading thresholds of the nonlinear mapping function are pre-set; and the parameters and grading thresholds of the nonlinear mapping function are periodically updated according to the statistical distribution characteristics of the multidimensional feature vectors of newly added condensing conditions.

[0189] The dimensionless condensate load index takes the multi-dimensional feature vector of condensing conditions obtained by adaptive normalization, feature dimensionality reduction, and principal feature extraction as input. Based on the multi-dimensional feature vector of condensing conditions, a normalized ratio characterizing the intensity of condensing load is first calculated. Then, the normalized ratio is input into a monotonically increasing nonlinear mapping function to obtain a dimensionless condensate load index limited to a preset interval. The parameters of the nonlinear mapping function and the classification thresholds for light load, normal, and heavy load conditions are preset according to the long-term statistical distribution of the multi-dimensional feature vector of condensing conditions under different equipment types and different combinations of environmental conditions. During system operation, these thresholds are periodically updated based on the statistical distribution of newly added historical data. This allows condensate load index calculation and condition classification to be performed within a unified dimensionless index space under different equipment and environmental conditions, thereby achieving collaborative condition identification based on normalized dimensionality reduction features and load index classification rules. The steps include:

[0190] S61: Full-condition feature acquisition and statistical distribution modeling;

[0191] During the factory calibration and long-term online operation phases of the system, the controller continuously collects adaptive normalized inductance and multi-dimensional feature vectors of condensation conditions for various typical equipment types and environmental conditions. The equipment types include at least different water storage chamber volumes, typically 10L, 50L, and 100L, as well as air compressors of different displacement levels. The environmental conditions include at least three categories: ambient temperature, high humidity, and low temperature. Specifically, the ambient temperature for ambient temperature is set between 5℃ and 35℃; the relative humidity for high humidity is not lower than 85%; and the ambient temperature for low temperature is lower than 5℃.

[0192] In various combinations of equipment and environments, the controller collects condensation condition characteristics and auxiliary monitoring data at fixed intervals, with a sampling cycle not exceeding once every 5 minutes. During the factory calibration phase, the cumulative data collection time is no less than 72 hours. During the online operation phase, the sliding time window for statistical analysis is no less than 30 days, and statistical modeling is only initiated when the number of valid samples reaches 500 or more. Each valid sample is associated with the corresponding liquid level and drainage records, specifically including information such as drainage frequency, duration, back pressure, and a multi-dimensional feature vector of condensation conditions, forming a historical sample set tagged with operating conditions.

[0193] Based on the aforementioned sample set, the controller statistically analyzes the long-term distribution characteristics of multi-dimensional feature vectors for condensation conditions under different equipment and environmental combinations. This includes the mean, standard deviation, and correlation of each feature dimension, as well as the clustering regions of samples in the feature space under different liquid levels or drainage labels (light load, normal, heavy load, etc.). The K-means clustering algorithm is used to identify typical operating condition clustering regions. Regions with at least 60% of samples within a cluster are marked as typical operating condition regions for that combination, providing data for subsequent mapping function and grading threshold settings.

[0194] S62: Normalized ratio calculation and load index mapping construction;

[0195] In the step of determining the condensing condition level, the controller first calculates the normalized ratio representing the current condensing load intensity based on the normalized dimensionality-reduced feature vector. This ratio is obtained by normalizing the distance between the current feature vector and the feature centers of typical light-load and typical heavy-load conditions corresponding to the equipment and environment combination. The value range is limited to 0 to 1, where a value close to 0 represents a light-load condition and a value close to 1 represents a heavy-load condition.

[0196] After obtaining the normalized ratio, the controller configures a monotonically increasing nonlinear mapping function for various equipment and environmental combinations, mapping the ratio to a unified dimensionless condensate load index range. This function uses an S-shaped nonlinear curve, such as a sigmoid curve, with the output index range fixed at 0–1. Two core constraints are satisfied by adjusting the curve slope and center position. First, samples marked as normal operating conditions in historical data have load indices mostly distributed in the low to medium range of 0.2–0.6, with at least 80% of the samples having an index no higher than 0.6. Second, samples marked as high-risk operating conditions are characterized by liquid levels no less than 80% of the effective height of the storage chamber and a significant increase in drainage back pressure; their load indices are mostly distributed in the high range above 0.8, with at least 80% of the samples having an index no lower than 0.8.

[0197] The above constraints can cause the load index to increase significantly when the actual operating conditions are close to the upper limit of the water storage chamber or the high drainage pressure, effectively avoiding confusion between normal fluctuations and high load conditions in terms of indicators and improving the accuracy of operating condition identification.

[0198] S63: Determination of hierarchical thresholds based on historical statistical distribution;

[0199] After obtaining the dimensionless condensate load index for a unified range, the controller sets thresholds for light load, normal load, and heavy load based on the empirical distribution of the index under various equipment and environmental combinations. The thresholds are determined using a combination of fixed ranges and statistical distribution. Light load threshold... satisfy Based on historical data of lightly loaded samples with low liquid levels and normal drainage pressure, the index distribution was fine-tuned to be no less than [a certain value]. The light-load sample index value satisfies the condition that it is not greater than the light-load threshold. Heavy-load threshold. satisfy Referring to the empirical distribution of high-risk working condition sample indices, The index is set near the lower quartile of the high-risk sample index distribution, ensuring that at least 80% of the high-risk sample index values ​​meet the condition of not less than the overload threshold. The corresponding index range for normal operating conditions is... Ensure that the proportion of samples under normal operating conditions within this range is not less than .

[0200] In practical applications, setting , This allows the three levels to correspond to low, normal, and high statistical load levels, respectively. In the real-time load index determination logic, when the load index is not greater than the light load threshold, it is determined to be light load; when the load index is between... and When the load index is between the normal and the heavy load threshold, it is considered normal; when the load index is not less than the heavy load threshold, it is considered heavy load.

[0201] S64: Periodic smoothing update of parameters based on SPC analysis;

[0202] To avoid distortion of the mapping function and grading thresholds due to long-term operating condition changes, the controller employs a periodic update strategy, triggered when 1000 new valid samples are added. After the cycle ends, statistical process control analysis is performed on the load index distribution and its matching degree with actual liquid level and drainage records using newly added historical data. The system uses control charts to monitor the mean and standard deviation of the load index. A shift in the overall distribution of the feature vector is determined when any of the following conditions occur: 1) the mean index of the statistical points in the current cycle exceeds three times the standard deviation of the initial modeling mean; 2) more than nine consecutive statistical points fall on the same side of the initial mean, and the proportion of samples on that side is significantly higher than the historical baseline. Once a distribution shift is determined, the controller or the upper-level configuration tool will recalculate the mapping function parameters and grading thresholds, and update the parameter library using a weighted moving average smoothing strategy to avoid parameter abrupt changes affecting control stability. The mapping parameter update formula is as follows: ,in For the updated new mapping function parameters, The parameters of the old mapping function before the update. These are the theoretical values ​​of the mapping parameters recalculated based on the latest data. The smoothing coefficient for the mapping parameters is approximately 0.2; the threshold update formula is: ,in For the updated new classification threshold, The old grading threshold before the update. This is the theoretical threshold value recalculated based on the latest data. This is the threshold smoothing coefficient, with a value of 0.1. It is usually smaller than the smoothing coefficient of the mapping parameters, meaning that the threshold adjustment is more conservative and stable. After the new parameters are written, the controller will enter a 7-day trial operation period, during which the matching degree between the actual liquid level, load index and operating condition classification will be continuously monitored. If the matching degree is lower than the preset threshold, the system will automatically revert to the previous version of parameters, that is, restore the use of the old mapping function parameters and the old classification threshold, and issue a diagnostic prompt.

[0203] S65: Cross-device adaptation and cold start scenario exception handling;

[0204] The dimensionless condensate load index always uses the normalized and dimensionality-reduced feature vectors output from the multidimensional feature vector construction step as a unified input. Different equipment and operating conditions are adapted only through mapping parameters and threshold updates, achieving a unified expression of the index space across equipment and operating conditions. During factory calibration, representative equipment such as 10L and 100L water storage chambers are selected, and approximate condensate loads are applied under the same environment to verify that the relative deviation of the equipment index under the same load level is no more than 10%, which is used as the cross-equipment comparability acceptance standard.

[0205] When there is insufficient data in the initial stage of new equipment operation, the controller copies the closest modeled equipment parameters such as water storage chamber volume and discharge rate as the initial values, and makes fine adjustments within a range of ±10%; after 500 valid samples are obtained, dedicated statistical modeling and parameter updates are started.

[0206] If the sample size is insufficient for an extended period or the parameters are updated abnormally, specifically if the new parameters cause a significant discrepancy between the grading and the liquid level, the controller will activate default parameters: the mapping function will use a factory-preset S-curve, the exponent range will be fixed at 0–1, and the grading thresholds will be fixed at 0.3 and 0.7. Simultaneously, an alarm will be issued on the system interface or the host computer, prompting maintenance personnel to check the sensor and operating condition configuration. This redundancy mechanism ensures that the exponent and grading remain valid in boundary scenarios, without affecting the intelligent adjustment function of the timing parameters.

[0207] In summary, the dimensionless condensate load index enables a unified index system and adaptive collaborative operating condition identification for equipment. The index within the same numerical range is comparable across different devices, facilitating the unified design of control strategies. Furthermore, equipment can adjust its mapping curve and threshold based on its own operating condition distribution, ensuring that the classification reflects the actual load status.

[0208] The self-learning update step of the control strategy includes:

[0209] The statistical characteristics of the drainage response index are incorporated into the comprehensive evaluation index; cluster analysis is performed in the joint feature space formed by the condensate load index and the statistical characteristics of the drainage response index; and the statistical characteristics of the drainage response index are used as update constraints, triggering a smooth update of the parameter template library only when the statistical characteristics of the candidate parameter are better than the existing parameters. Specifically, this includes the following steps:

[0210] S71: Refinement of comprehensive evaluation by integrating statistical characteristics of drainage response indicators;

[0211] Based on the comprehensive evaluation index system of the operation segment comprehensive evaluation index calculation steps, this step further incorporates the statistical characteristics of the drainage response index R into the evaluation, and summarizes the original dimensions into four sub-scores to ensure that the evaluation results are consistent with the drainage control objectives.

[0212] The drainage response index R is a ratio indicator that measures the drainage effect of the current control cycle. It is calculated as the ratio of the actual drainage effect to the target drainage effect. The closer R is to 1.0, the higher the match between the actual effect and the target configuration. In this step, R=1.0 is set as the ideal center value, and 0.8 to 1.2 is the acceptable range for control effect. If R falls within this range, the drainage control is considered to meet expectations.

[0213] When conducting a comprehensive evaluation of operational segments, the controller first divides the continuous operational data into independent, non-overlapping segments with a preset length of 30–120 minutes, balancing data representativeness and computational efficiency. For each segment, evaluation indicators are calculated across four dimensions: condensate load and liquid level safety indicators, gas consumption and efficiency indicators, statistical characteristics of the drainage response indicator R, and the percentage of effective data. Among these, the condensate load and liquid level safety indicators include the average condensate load index within the segment and the time percentages of light, normal, and heavy load conditions, reflecting the load level and distribution characteristics. The liquid level safety indicator covers the cumulative time during which the water level in the storage chamber is not lower than 80% of the allowable upper limit; this time quantifies the safety margin and the number of drainage anomalies such as overflow alarms and drainage failure retry attempts. The gas consumption and efficiency indicators include two core parameters: compressed air loss per unit time and effective drainage volume per unit time. The former is estimated using the number of drainage cycles, single cycle duration, back pressure, and equipment characteristic curves, measured as standard state volumetric flow rate. The latter, while ensuring liquid level safety, can be used to differentiate between different operating conditions such as high gas consumption and low output. The statistical characteristics of the drainage response index R need to be extracted after the controller calculates R cycle by cycle. Specifically, this includes the target interval time percentage (the percentage of cycles in which R is in the 0.8–1.2 range), the deviation from the average (the average deviation when R exceeds the range), and the maximum consecutive deviation period (the longest period in which R continuously exceeds the range). This reflects the stability and convergence of the drainage effect. The effective data percentage index uses the effective data percentage of R to judge data reliability. If the percentage of missing R periods due to sensor failure or communication anomalies exceeds 10%, this segment will be marked as insufficient data and will not participate in subsequent analysis and scoring calculations to avoid interfering with the self-learning process. Based on these indicators, the raw data will be converted into four dimensionless sub-scores in the 0–1 range: condensate load matching sub-score, liquid level safety sub-score, gas consumption efficiency sub-score, and drainage response fit sub-score. The condensate load matching sub-score is calculated based on the average load index and the operating time percentage, reflecting the degree of matching between the actual condensate load and the system's expected performance. The liquid level safety sub-score is derived based on the cumulative time of high liquid level and the number of abnormal events, reflecting the liquid level safety margin and operational reliability. The gas consumption efficiency sub-score, with air loss as the core and combined with effective drainage volume correction, measures the gas consumption utilization efficiency under safety constraints. The drainage response fit sub-score, referencing the three statistical characteristics of R, evaluates the fit and stability of R within the 0.8–1.2 range.

[0214] When constructing sub-scores, the original indicators must first be normalized, mapping them to the 0-1 range. Then, indicators of the same dimension are integrated into a single sub-score according to preset rules. The comprehensive evaluation score is calculated by weighted summation, with the sum of the weights of the four sub-scores being 1. To match the control objectives, the preferred weight configuration is: drainage response fit sub-score 0.3, liquid level safety sub-score 0.3, gas consumption efficiency sub-score 0.2, and condensate load matching sub-score 0.2. This configuration makes maintaining R in the 0.8-1.2 range the core of the evaluation, while also considering liquid level safety and gas consumption energy saving. Combined with an effective data screening mechanism, this ensures that the evaluation results are highly consistent with the drainage control objectives.

[0215] S72: Clustering of preferred segments and extraction of candidate parameters in joint feature space;

[0216] The controller performs an initial screening of operating segments based on a comprehensive evaluation score, defining segments with scores not lower than a preset threshold of 0.7 as preferred operating segments. For each preferred operating segment, the controller extracts feature data in two dimensions. The condensate load dimension includes the average condensate load index within the segment, the time percentage of each level of light load, conventional load, and heavy load, and the average liquid level and drainage pressure characteristics under heavy load conditions. The drainage response dimension includes the average drainage response index R, the time percentage within the target range of 0.8 to 1.2, the average deviation from the target range, and the maximum number of consecutive deviation periods. The controller concatenates the above operating condition features and performance features in a preset order to construct a joint feature vector. This vector, after normalization to eliminate dimensional differences, is mapped to the joint feature space for cluster analysis. The clustering process uses weighted Euclidean distance as a similarity measure. To balance operating condition similarity and response performance similarity, a weight coefficient of 0.5 is assigned to each of the similar operating condition features and performance features. The number of clusters is automatically selected within a preset range of 3 to 8. Through clustering, each operating condition cluster represents a set of operations with similar drainage response characteristics under a specific condensation load mode. Within each operating condition cluster, the controller sorts segments based on their comprehensive scores, further selecting segments that simultaneously meet the following stringent response constraints as candidate samples: Stability constraint requires that the drainage response index R falls within the target range of 0.8 to 1.2 for at least 80% of the time, a preset lower limit. Accuracy constraint requires that the average deviation of R from the target range not exceed a preset proportion of 10% of the target range width, corresponding to an average absolute deviation not exceeding 0.04. Convergence constraint requires that the maximum number of control cycles continuously deviating from the target range not exceed a preset threshold of 2 to 3 cycles. Finally, the controller extracts the timing initial parameters and adaptive adjustment parameters used by the above candidate samples in actual operation to construct a candidate parameter set. The parameters in this set, verified by historical data, not only perform excellently in terms of liquid level safety and gas consumption balance but also possess the ability to maintain the drainage response index stably within the ideal range over a long period.

[0217] S73: Smooth update of parameter template library under drainage response index constraints;

[0218] To avoid deteriorating drainage response due to relying solely on single indicators such as gas consumption for updates, this step sets the statistical characteristics of drainage response indicators within the operating segment as one of the necessary conditions for triggering template parameter updates. The controller selects typical candidate parameter groups within the operating condition cluster and compares them with the statistical results of historical segments running under the same operating condition cluster using template parameters. The system checks at least two dimensions of indicators. For safety and gas consumption, the high liquid level time percentage for the segment corresponding to the candidate parameters should not be higher than that for the segment corresponding to the template parameters, and the reduction should be no less than 10%. Compressed air loss per unit time should be reduced compared to the template parameters, and the reduction should be no less than 5%. For drainage response indicators, with a unified target range of 0.8 to 1.2, the time percentage within the target range for the segment corresponding to the candidate parameters should be higher than that for the segment corresponding to the template parameters, and the increase should be no less than 10 percentage points. The average deviation from the target range should be reduced compared to the template parameter segment, and the reduction should be no less than 20%.

[0219] The controller determines that a candidate parameter is superior to the existing template parameter in a comprehensive sense only when its overall performance across the three dimensions of safety, gas consumption, and drainage response is not inferior to that of the template parameter, and at least reaches the preset improvement threshold in the drainage response dimension. This triggers a smooth update of the template parameter. The update process uses linear interpolation with a smoothing coefficient ranging from 0.1 to 0.3 as the weight. The new timing initial parameter is set as the weighted average of the original timing initial parameter and the candidate timing initial parameter, with weights of 1 minus the smoothing coefficient and the smoothing coefficient, respectively. The new adaptive adjustment parameter is calculated according to the same rules. This writing method effectively avoids the adverse effects of parameter mutations on the stability of online control.

[0220] If a candidate parameter may slightly improve some gas consumption indicators, but causes the drainage response indicator R to deviate from the target range of 0.8 to 1.2 for a long period of time, the controller will directly reject the candidate parameter and not include it in the template update path.

[0221] Example 2

[0222] like Figure 1 As shown, this embodiment provides a solenoid valve drainage control system with intelligent adjustment of timing parameters, including:

[0223] The signal acquisition and feature construction module is used to acquire condensation condition data of the water storage chamber. The condensation condition data includes at least the liquid level signal of the water storage chamber, and a multi-dimensional feature vector characterizing the current condensation condition is constructed based on the condensation condition data.

[0224] The condensate load assessment and operating condition classification module is used to calculate the condensate load index based on the multidimensional feature vector, and determine the current condensate operating condition level based on the condensate load index.

[0225] The parameter template management and timing parameter constraint setting module is used to determine the initial timing parameters of the electromagnetic drain valve according to the condensation condition level, and to set the adjustment constraint domain of the initial timing parameters. The initial timing parameters include the energizing duration and the shut-off interval.

[0226] The timing parameter adaptive adjustment module is used to control the electromagnetic drain valve to perform the drain action and to obtain the liquid level change data before and after the drain action to calculate the drain response index.

[0227] The control strategy self-learning update module is used to adaptively update the timing initial parameters within the adjustment constraint domain based on the deviation between the drainage response index and the target value, and to execute the drainage control of the next cycle using the updated timing initial parameters.

[0228] The abnormal operating condition collaborative control module is used to detect abnormal drainage conditions based on the drainage response index and liquid level changes. When the drainage response index is continuously lower than the preset lower limit or the liquid level is still close to the upper limit of the allowable liquid level after multiple drainages, the self-cleaning drainage mode is triggered, and the duration of a single power-on is decomposed into multiple sets of short pulse power-on sequences. When the ambient temperature or medium temperature is detected to be lower than the antifreeze threshold, the shutdown interval is shortened and the antifreeze heating device is controlled to work.

[0229] This invention proposes an intelligent electromagnetic valve drainage control system with adjustable timing parameters. It aims to address the technical problems in existing electromagnetic drainage valve control technologies, such as reliance on fixed timing cycles, lack of operational condition sensing capabilities, and inability to perform strategy self-learning. These shortcomings make it difficult to balance liquid level safety and compressed air energy conservation under varying load conditions. By constructing a multi-dimensional feature vector for condensation conditions and introducing a dimensionless condensate load index and drainage response index, this invention achieves online adaptive closed-loop adjustment of timing parameters. Furthermore, by combining abnormal collaborative control and strategy self-learning, it significantly improves the system's environmental adaptability and operational reliability.

[0230] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0231] The preset parameters or preset thresholds mentioned above are all set by those skilled in the art based on actual conditions or obtained through large-scale data simulation.

[0232] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.

Claims

1. A method for controlling the drainage of a solenoid valve with intelligent adjustment of timing parameters, characterized in that, include: S1: Obtain condensation condition data of the water storage chamber, the condensation condition data including at least the water level signal of the water storage chamber, and construct a multi-dimensional feature vector characterizing the current condensation condition based on the condensation condition data; S2: Calculate the condensate load index based on the multidimensional feature vector, and determine the current condensate operating condition level based on the condensate load index; S3: Determine the initial timing parameters of the electromagnetic drain valve according to the condensation condition level, and set the adjustment constraint range of the initial timing parameters. The initial timing parameters include the energizing duration and the shut-off interval. S4: Control the electromagnetic drain valve to perform the drain action and obtain the liquid level change data before and after the drain action to calculate the drain response index; S5: Based on the deviation between the drainage response index and the target value, the timing initial parameters are adaptively updated within the adjustment constraint domain, and the updated timing initial parameters are used to execute the drainage control for the next cycle.

2. The method for controlling drainage of a solenoid valve with intelligent adjustment of timing parameters according to claim 1, characterized in that, The construction of the multidimensional feature vector characterizing the current condensation condition includes: S11: Continuously monitor and determine the threshold of the signal in the condensation condition data. When the signal change amplitude exceeds the preset multiple threshold or the sensor output value remains unchanged within a preset number of control cycles, mark the data at the corresponding time as an anomaly point and use at least one of the following methods: nearby time interpolation or historical trend extrapolation to complete the value of the anomaly point. S12: Acquire asynchronous sampling data and their corresponding timestamps from the liquid level sensor, temperature sensor and compressor operating status acquisition module, and map the asynchronous sampling data to the sampling time of the preset control cycle through resampling and interpolation algorithms to generate a time-axis aligned multi-source signal sequence; S13: Within a sliding time window covering multiple control cycles, calculate the median and upper and lower percentile ranges of the multi-source signal sequence respectively, and perform a linear mapping on the multi-source signal sequence with the median as the center and the percentile range as the scale parameter to obtain a normalized dimensionless signal sequence. S14: Perform principal component analysis on the dimensionless signal sequence, extract principal component features whose cumulative energy ratio reaches a preset threshold, and generate a multidimensional feature vector.

3. The method for controlling the drainage of a solenoid valve with intelligent adjustment of timing parameters according to claim 2, characterized in that, The calculation of the condensate load index and determination of the current condensate operating condition level includes: S21: Within the sliding time window, calculate the short-term generation rate component and the long-term cumulative trend component of the liquid level change, and combine the compressor operating duty cycle to perform a weighted summation of the components to generate a comprehensive condensate generation index. S22: Calculate the ratio of the comprehensive condensate generation index to the maximum safe condensate volume, and input the obtained ratio into a preset nonlinear mapping function for compression processing to obtain a dimensionless condensate load index; S23: The condensate load index is compared with the grading threshold to determine the condensation condition level; the grading threshold includes an upward threshold and a downward threshold to form a hysteresis interval, and the value of the grading threshold is offset and corrected according to the current ambient temperature.

4. The method for controlling the drainage of a solenoid valve with intelligent adjustment of timing parameters according to claim 3, characterized in that, The process of determining the initial timing parameters of the electromagnetic drain valve and setting the adjustment constraint domain of the initial timing parameters includes: S31: Using the parameter template library, perform matching and retrieval based on the current condensing condition level, compressed air equipment type, rated drainage capacity, and current working pressure, and select the corresponding basic parameter group; S32: The recommended values ​​in the basic parameter group are determined as the timing initial parameters of the electromagnetic drain valve, and the timing initial parameters include at least the energizing duration and the shut-off interval; S33: Based on the equipment model, the effective volume of the water storage chamber and the allowable duty cycle of the electromagnetic coil, set an adjustment constraint domain for the timing initial parameters. The adjustment constraint domain at least limits the minimum and maximum values ​​of the energizing duration and the shut-off interval, as well as the upper limit of the single adjustment step size.

5. The method for controlling the drainage of a solenoid valve with intelligent adjustment of timing parameters according to claim 4, characterized in that, The adaptive updating of the calculated drainage response index and the timing parameters includes: S41: Calculate the ratio of the liquid level difference before and after a single drainage action to the corresponding energization duration to obtain the single drainage efficiency index. Then, normalize the single drainage efficiency index in combination with the current condensate load index to obtain the drainage response index. S42: Calculate the deviation between the drainage response index and the target drainage response index, and calculate the gradient update amount of the energization duration and the gradient update amount of the shutdown interval according to the sign and magnitude of the deviation. S43: Perform dead zone processing and forgetting factor adjustment on the gradient update amount: when the deviation falls within the preset dead zone range, the update amount is set to zero; otherwise, the gradient update amount is corrected by combining the historical deviation accumulation amount and the forgetting factor. S44: The corrected gradient update amount is superimposed on the power-on duration and power-off interval of the previous cycle, and the superimposed parameters are saturated and pruned within the adjustment constraint domain to obtain the timing parameters for the next cycle.

6. The method for controlling the drainage of a solenoid valve with intelligent adjustment of timing parameters according to claim 5, characterized in that, The adaptive update of the timing parameters also includes a control strategy self-learning update step: S51: Record the operation data and divide it into multiple operation segments according to time, and calculate the comprehensive evaluation index for each operation segment; the comprehensive evaluation index is calculated based on the average condensate load index, the cumulative duration of high liquid level, the estimated value of compressed air loss, and the number of drainage anomaly markers within the operation segment; S52: Select the operating segments that meet the preset conditions for comprehensive evaluation indicators, and perform cluster analysis in the feature space composed of the multi-dimensional feature vector of condensing conditions and the condensate load index to generate multiple operating condition clusters; S53: Extract the statistical features of the timing parameters within the multiple operating condition clusters as candidate parameters, compare them with the existing parameters in the parameter template library, and when the comprehensive evaluation index corresponding to the candidate parameter is better than the existing parameter, update the timing initial parameters and adjustment rules in the parameter template library using the smoothing coefficient.

7. The method for controlling the drainage of a solenoid valve with intelligent adjustment of timing parameters according to claim 6, characterized in that, The method for determining the preset nonlinear mapping function and the hierarchical threshold is as follows: Based on the statistical distribution characteristics of the multidimensional feature vectors of historical condensing conditions under different equipment types and environmental conditions, the parameters and grading thresholds of the nonlinear mapping function are pre-set; and the parameters and grading thresholds of the nonlinear mapping function are periodically updated according to the statistical distribution characteristics of the multidimensional feature vectors of newly added condensing conditions.

8. The method for controlling the drainage of a solenoid valve with intelligent adjustment of timing parameters according to claim 7, characterized in that, The self-learning update step of the control strategy includes: The statistical characteristics of the drainage response index are incorporated into the comprehensive evaluation index; cluster analysis is performed in the joint feature space formed by the condensate load index and the statistical characteristics of the drainage response index; and the statistical characteristics of the drainage response index are used as update constraints, and the smooth update of the parameter template library is triggered only when the statistical characteristics of the candidate parameter are better than the existing parameters.

9. A solenoid valve drainage control system with intelligent adjustment of timing parameters, used to execute the solenoid valve drainage control method with intelligent adjustment of timing parameters as described in any one of claims 1-8, comprising: The controller is internally configured with the following functional modules that work together: The signal acquisition and feature construction module is used to acquire condensation condition data of the water storage chamber. The condensation condition data includes at least the liquid level signal of the water storage chamber, and a multi-dimensional feature vector characterizing the current condensation condition is constructed based on the condensation condition data. The condensate load assessment and operating condition classification module is used to calculate the condensate load index based on the multidimensional feature vector, and determine the current condensate operating condition level based on the condensate load index. The parameter template management and timing parameter constraint setting module is used to determine the initial timing parameters of the electromagnetic drain valve according to the condensation condition level, and to set the adjustment constraint domain of the initial timing parameters. The initial timing parameters include the energizing duration and the shut-off interval. The timing parameter adaptive adjustment module is used to control the electromagnetic drain valve to perform the drain action and to obtain the liquid level change data before and after the drain action to calculate the drain response index. The control strategy self-learning update module is used to adaptively update the timing initial parameters within the adjustment constraint domain based on the deviation between the drainage response index and the target value, and to execute the drainage control of the next cycle using the updated timing initial parameters. The abnormal operating condition collaborative control module is used to detect abnormal drainage conditions based on the drainage response index and liquid level changes. When the drainage response index is continuously lower than the preset lower limit or the liquid level is still at the upper limit of the allowable liquid level after multiple drainages, the self-cleaning drainage mode is triggered, and the duration of a single power-on is decomposed into multiple short pulse power-on sequences. When the ambient temperature or medium temperature is detected to be lower than the antifreeze threshold, the shutdown interval is shortened and the antifreeze heating device is controlled to work.