High-precision humidity signal control method based on temperature and humidity transmitter, medium and equipment
By using a backpropagation neural network optimized with empirical mode decomposition and sparrow search algorithm, the problem of inaccurate humidity measurement in refrigeration environments is solved, achieving high-precision humidity signal control and improved reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN HENGGE TECH CO LTD
- Filing Date
- 2026-03-10
- Publication Date
- 2026-05-29
AI Technical Summary
In a cooling environment, humidity sensors are susceptible to temperature cross-effects, leading to inaccurate measurements. Furthermore, random noise and nonlinear interference cause inaccurate humidity control.
A backpropagation neural network optimized by empirical mode decomposition denoising and sparrow search algorithm is used to decompose the humidity signal into intrinsic mode functions with different frequency characteristics, remove high-frequency noise interference, and establish a nonlinear temperature and humidity relationship model. A control strategy is generated by real-time comparison of dynamic compensation signal with preset threshold.
It improves humidity measurement accuracy and control reliability, achieves millisecond-level response adjustment in cooling environments, and reduces the range of environmental parameter fluctuations.
Smart Images

Figure CN122111128A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of refrigeration technology, and in particular to a high-precision humidity signal control method, medium and equipment based on a temperature and humidity transmitter. Background Technology
[0002] In refrigeration environments such as cold chain logistics and central air conditioning systems, accurate humidity measurement and control impact energy consumption and operating costs. However, due to large temperature fluctuations in refrigeration environments, humidity sensors are susceptible to temperature cross-influence, leading to inaccurate humidity measurements. Furthermore, random noise and nonlinear interference introduced by compressor start-up and shutdown, fan vibration, etc., in the refrigeration environment also contribute to inaccurate humidity measurements. Consequently, humidity control within the environment becomes inaccurate. Summary of the Invention
[0003] The purpose of this invention is to provide a high-precision humidity signal control method, medium, and device based on a temperature and humidity transmitter, which aims to improve the accuracy and reliability of humidity measurement in a cooling environment.
[0004] To achieve the above objectives, a first aspect of this disclosure provides a high-precision humidity signal control method based on a temperature and humidity transmitter, comprising: The raw humidity signal and raw temperature signal collected by the temperature and humidity sensor are acquired, and empirical mode decomposition denoising processing is performed to obtain the denoised temperature and humidity signal. The empirical mode decomposition denoising processing decomposes the nonlinear raw humidity signal and raw temperature signal into intrinsic mode functions with different frequency characteristics to obtain the denoised temperature and humidity signal. The denoised temperature and humidity signal is input into the target backpropagation neural network to obtain the compensated temperature and humidity signal output by the target backpropagation neural network after temperature compensation. The target backpropagation neural network is obtained by optimizing the backpropagation neural network using the sparrow search algorithm. Based on the compensated temperature and humidity signal and the preset temperature and humidity threshold, a control strategy for the temperature and humidity transmitter is determined, and the temperature and humidity transmitter is controlled according to the control strategy.
[0005] A second aspect of this disclosure provides a high-precision humidity signal control device based on a temperature and humidity transmitter, the device comprising: The acquisition and denoising module is configured to acquire the raw humidity signal and raw temperature signal collected by the temperature and humidity sensor, perform empirical mode decomposition denoising processing to obtain the denoised temperature and humidity signal. The empirical mode decomposition denoising processing decomposes the nonlinear raw humidity signal and raw temperature signal into intrinsic mode functions with different frequency characteristics to obtain the denoised temperature and humidity signal. The input module is configured to input the denoised temperature and humidity signal into the target backpropagation neural network to obtain the compensated temperature and humidity signal output by the target backpropagation neural network after temperature compensation, wherein the target backpropagation neural network is obtained by optimizing the backpropagation neural network using the sparrow search algorithm; The control module is configured to determine a control strategy for the temperature and humidity transmitter based on the compensated temperature and humidity signal and a preset temperature and humidity threshold, and to control the temperature and humidity transmitter according to the control strategy.
[0006] A third aspect of this disclosure provides an electronic device, comprising: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the method of any one of the first aspects.
[0007] A fourth aspect of this disclosure provides a computer-readable storage medium storing program code that is executed by a processor to implement the steps of the method described in any of the first aspects.
[0008] This invention provides a high-precision humidity signal control method, medium, and device based on a temperature and humidity transmitter. Compared with the prior art, it has the following advantages: Empirical Mode Decomposition (EMD) is employed to perform nonlinear denoising on the original temperature and humidity signals. By adaptively decomposing the complex signal into intrinsic mode functions (EMFs) with different frequency characteristics, high-frequency noise interference and low-frequency drift components are effectively removed, improving the signal-to-noise ratio (SNR) while fully preserving the time-frequency characteristics of dynamic temperature and humidity changes. Secondly, a backpropagation neural network optimized using the Sparrow Search algorithm is introduced. Global optimization capabilities determine the optimal topology and weight parameters of the neural network, improving the training efficiency of the temperature compensation model. Finally, based on real-time comparison of the dynamic compensation signal and preset thresholds, differentiated control strategies can be quickly generated, achieving millisecond-level response adjustment of the temperature and humidity transmitter and reducing the range of environmental parameter fluctuations. This improves the accuracy and reliability of humidity control in refrigeration environments.
[0009] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0010] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the following detailed description to explain the present disclosure, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart illustrating a high-precision humidity signal control method based on a temperature and humidity transmitter, as shown in the embodiment of the instruction manual.
[0011] Figure 2 A block diagram of a high-precision humidity signal control device based on a temperature and humidity transmitter is shown in the embodiment of the specification.
[0012] Figure 3 This is a block diagram of another high-precision humidity signal control device based on a temperature and humidity transmitter, as shown in the embodiment of the specification. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0014] Before introducing the high-precision humidity signal control method based on a temperature and humidity transmitter provided in this disclosure, let's first introduce the technical solutions used in relevant scenarios and their existing technical shortcomings. In relevant scenarios, denoising algorithms are used to process signal interference in refrigeration environments. For example, a back propagation (BP) neural network is used for humidity compensation, and then a dual-threshold hysteresis mechanism is used to achieve humidity control. However, due to the insufficient adaptability of wavelet transform denoising with fixed basis functions, the BP neural network is prone to getting trapped in local optima when performing humidity compensation, and cannot achieve accurate global humidity control.
[0015] This disclosure provides a high-precision humidity signal control method based on a temperature and humidity transmitter. Figure 1 This is a flowchart illustrating a high-precision humidity signal control method based on a temperature and humidity transmitter, according to one embodiment. The method includes: In step S11, the original humidity signal and original temperature signal collected by the temperature and humidity sensor are acquired, and empirical mode decomposition denoising processing is performed to obtain the denoised temperature and humidity signal. The empirical mode decomposition denoising processing decomposes the nonlinear original humidity signal and original temperature signal into intrinsic mode functions with different frequency characteristics to obtain the denoised temperature and humidity signal. In this embodiment, local maxima and minima of the signal are identified, and cubic spline curves are used to connect the extreme points to form upper and lower envelopes. The mean of the upper and lower envelopes is taken as the instantaneous equilibrium position. The mean is subtracted from the original signal; if the IMF condition is met, it is taken as the first component; otherwise, the above steps are repeated until the condition is met. The extracted IMFs are subtracted from the original signal, and the residual is repeatedly decomposed until the residual is a monotonic signal. Finally, the original signal is decomposed into multiple IMFs and a residual. After removing high-frequency noise IMFs, the signal is reconstructed to obtain the denoised temperature and humidity signal.
[0016] For example, suppose the original humidity signal includes 50Hz power frequency noise (high frequency) and 0.1Hz environmental fluctuations (low frequency). After EMD decomposition, the high-frequency noise may be concentrated in the first two IMFs, while the low-frequency environmental fluctuations are distributed in subsequent IMFs and the residual. By removing the first two IMFs and reconstructing the remaining components, the power frequency noise can be effectively removed, the trend of environmental humidity changes can be preserved, the signal smoothness can be improved by 40%, and the signal-to-noise ratio can be improved by 25dB.
[0017] In step S12, the denoised temperature and humidity signal is input into the target backpropagation neural network to obtain the compensated temperature and humidity signal output by the target backpropagation neural network after temperature compensation. The target backpropagation neural network is obtained by optimizing the backpropagation neural network using the sparrow search algorithm. In this embodiment, an optimization algorithm simulating the foraging behavior of sparrow flocks is used through a multi-layer feedforward network that adjusts weights via error backpropagation. Global search is achieved through the division of roles among discoverers, followers, and vigilants, eliminating the cross-sensitivity effect of temperature on humidity measurement and improving measurement accuracy.
[0018] In this embodiment, a set of BPNN weights and thresholds are randomly generated as individual sparrows. The compensation error (e.g., mean squared error) is used as the fitness function to evaluate the compensation effect of each individual. The discoverer's position follows the Levi flight path to explore new areas, guiding the population closer to the optimal solution. Followers adjust their positions based on the discoverer's position, accelerating the local search. When danger is detected, the watchdog randomly jumps to a safe position to avoid getting trapped in local optima. The above steps are repeated until a termination condition (e.g., maximum number of iterations or error threshold) is met, and the optimal BPNN parameters are output. Ultimately, the optimized BPNN can accurately establish a nonlinear temperature and humidity relationship model, achieving high-precision temperature compensation.
[0019] In step S13, a control strategy for the temperature and humidity transmitter is determined based on the compensated temperature and humidity signal and the preset temperature and humidity threshold, and the temperature and humidity transmitter is controlled according to the control strategy.
[0020] In this embodiment, the compensated temperature and humidity signals are compared with preset thresholds in real time. If the signal exceeds the upper threshold, cooling or dehumidification is triggered; if it falls below the lower threshold, heating or humidification is triggered. Control signals (such as digital or analog signals) are output according to the strategy to drive the actuators. Environmental parameters are continuously monitored to form a closed-loop control, ensuring that the temperature and humidity remain stable within the target range. Precise control of environmental parameters is achieved by dynamically adjusting the actuators, avoiding overshoot or oscillation.
[0021] In one possible implementation, this disclosure provides pseudocode for the above technical solutions: Pseudocode for real-time performance monitoring: void realtime_Performance_Monitoring(float* processed_signal) { / / Calculate real-time signal-to-noise ratio float current_snr = calculate_RealTime_SNR(processed_signal); / / Calculate signal distortion float distortion = calculate_Signal_Distortion(processed_signal); / / Adaptive parameter adjustment if (current_snr < SNR_THRESHOLD_LOW) { increase_Denoise_Strength(); } else if (distortion > DISTORTION_THRESHOLD_HIGH) { decrease_Denoise_Strength(); } / / Temperature compensation model update if (environment_Temperature_Changed()) { update_Compensation_Model(); } } The above technical solution employs empirical mode decomposition (EMD) to perform nonlinear denoising on the original temperature and humidity signals. By adaptively decomposing the complex signal into intrinsic mode functions (EMFs) with different frequency characteristics, it effectively removes high-frequency noise interference and low-frequency drift components, improving the signal-to-noise ratio while fully preserving the time-frequency characteristics of dynamic temperature and humidity changes. Secondly, a backpropagation neural network optimized by the sparrow search algorithm is introduced. Through global optimization capabilities, the optimal topology and weight parameters of the neural network are determined, improving the training efficiency of the temperature compensation model. Finally, based on real-time comparison of the dynamic compensation signal and a preset threshold, differentiated control strategies can be quickly generated, achieving millisecond-level response adjustment of the temperature and humidity transmitter and reducing the range of environmental parameter fluctuations. This improves the accuracy and reliability of humidity control in refrigeration environments.
[0022] In one possible implementation, step S11, which involves acquiring the raw humidity signal and raw temperature signal from the temperature and humidity sensor, performing empirical mode decomposition (EMD) denoising processing to obtain the denoised temperature and humidity signal, includes: In step S111, the original humidity signal and original temperature signal collected by the temperature and humidity sensor at the same acquisition time are obtained, and the original humidity signal and original temperature signal arranged in time sequence are determined. In this embodiment, the raw humidity and temperature signals are aligned by timestamps using synchronously acquired temperature and humidity sensor data to form a time series. This step ensures that subsequent analysis is based on temperature and humidity data from the same moment, avoiding errors caused by time misalignment. The time series arrangement is the foundation of EMD decomposition, requiring consistent data continuity and sampling rate to accurately capture dynamic changes in the signal.
[0023] For example, suppose the sensor collects data once per second. At 10:00:00, the humidity is 45%RH and the temperature is 25℃; at 10:00:01, the humidity is 46%RH and the temperature is 25.1℃. Arranging these two sets of data in chronological order creates the sequences [45%RH, 25℃] and [46%RH, 25.1℃], forming a time series.
[0024] In step S112, the following steps are executed cyclically: In step S1121, based on the original humidity signal and the original temperature signal arranged in time series, the local humidity maximum and local humidity minimum corresponding to the original humidity signal are determined, and the local temperature maximum and local temperature minimum corresponding to the original temperature signal are determined. In this embodiment of the disclosure, for each data point in the time series, its neighborhood window (e.g., three points before and after) is scanned to determine local maxima (greater than the neighborhood point) and minima (less than the neighborhood point). Humidity and temperature signals need to be processed separately because their fluctuation characteristics may differ. This step extracts the extreme value features of the signal, providing key points for constructing the envelope.
[0025] In step S1122, a humidity envelope is determined based on the local humidity maximum and the local humidity minimum, and a temperature envelope is determined based on the local temperature maximum and the local temperature minimum. In this embodiment, a cubic spline interpolation method is used to connect local maxima to form an upper envelope and connect local minima to form a lower envelope. Humidity and temperature signals generate independent envelopes to preserve their respective fluctuation characteristics. The smoothness of the envelope affects the decomposition quality of the IMF, and overfitting or underfitting must be avoided.
[0026] For example, the humidity maxima (1,46) and (3,47) form an upper envelope y=0.05x+45.95 after interpolation; the humidity minima (2,44) and (4,43) form a lower envelope y=-0.5x+47. The temperature maxima (1,25.1) and (3,25.2) generate an upper envelope y=0.05x+25.05, and the temperature minima (2,24.9) and (4,24.8) generate a lower envelope y=-0.05x+25.
[0027] In step S1123, a target temperature and humidity envelope is determined based on the humidity envelope and the temperature envelope, and candidate temperature intrinsic mode functions and candidate humidity intrinsic mode functions are determined based on the target temperature and humidity envelope. In this embodiment, the target envelope is the mean (or weighted mean) of the humidity and temperature envelopes, used to calculate the candidate IMF. The candidate IMF is obtained by the difference between the original signal and the target envelope, and must satisfy the IMF definition conditions (e.g., the difference between the number of extrema and the number of zero crossings ≤ 1). This step separates the high-frequency components of the signal.
[0028] For example, the target humidity envelope = (upper envelope + lower envelope) / 2 = (46 + 44) / 2 = 45%RH, and the candidate humidity IMF = original signal (46) - target envelope (45) = 1%RH; the target temperature envelope = (25.1 + 24.9) / 2 = 25℃, and the candidate temperature IMF = 25.1 - 25 = 0.1℃.
[0029] In step S1124, based on the candidate temperature intrinsic mode function, the candidate humidity intrinsic mode function, and the original humidity signal and original temperature signal arranged in time series, a new humidity signal and a new temperature signal are determined, and the local humidity maximum and local humidity minimum corresponding to the new humidity signal are determined, and the local temperature maximum and local temperature minimum corresponding to the new temperature signal are determined, until the preset conditions are met, and the residual temperature signal and residual humidity signal are obtained. In this embodiment, a new signal is obtained by subtracting the candidate IMF from the original signal. Steps S1121-S1123 are repeated until the residual signal is a monotonic function or satisfies a preset number of iterations. Each iteration extracts one IMF component, and the residual signal reflects the signal trend. This process recursively decomposes the multi-scale features of the signal.
[0030] For example, the initial humidity signal [46,44,47,43] is subtracted from the first IMF [1,-1,1,-1] to obtain the new signal [45,45,46,44]. The extremum detection, envelope construction and IMF extraction are repeated for the new signal until the residual signal is [44.5,44.5,44.5,44.5] (satisfying the monotonicity condition), and the decomposition ends.
[0031] In step S113, the denoised temperature and humidity signals are obtained based on the residual temperature signal, the residual humidity signal, the candidate temperature eigenmode function and the candidate humidity eigenmode function determined in each round.
[0032] In this embodiment, all candidate IMF components are added to the residual signal to reconstruct the denoised signal. EMD achieves denoising by separating high-frequency noise (IMF) and low-frequency trends (residual signal), without requiring a preset basis function, and adapts to the characteristics of non-stationary signals. The denoising effect depends on the IMF screening threshold and the degree of residual signal preservation.
[0033] For example, suppose the decomposition yields two humidity IMFs (IMF1=[1,-1,1,-1], IMF2=[0.5,-0.5,0.5,-0.5]) and a residual signal [44.5,44.5,44.5,44.5]. The denoised signal = IMF1 + IMF2 + residual = [46,44,46,44] (the original signal is [46,44,47,43]), successfully suppressing the abnormal fluctuation at point 3 (47→46).
[0034] In one possible implementation, step S113, obtaining the denoised temperature and humidity signal based on the residual temperature signal, the residual humidity signal, the candidate temperature eigenmode function and the candidate humidity eigenmode function determined in each round, includes: In step S1131, the candidate humidity intrinsic mode functions are classified according to multiple humidity intrinsic mode function thresholds to obtain the candidate humidity intrinsic mode function corresponding to each humidity category; and the candidate temperature intrinsic mode functions are classified according to multiple temperature intrinsic mode function thresholds to obtain the candidate temperature intrinsic mode function corresponding to each temperature category. In this embodiment, multiple thresholds (such as a first threshold τ1, a second threshold τ2, and a third threshold τ3, where τ1 < τ2 < τ3) are introduced in a preset manner, or multiple thresholds are set according to the IMF components, to classify candidate IMF components according to their energy or frequency characteristics. For example, the standard deviation or center frequency of each IMF is calculated. If the standard deviation < τ1, it is classified as high-frequency noise; if τ1 ≤ standard deviation < τ2, it is classified as intermediate; and if the standard deviation ≥ τ2, it is classified as low-frequency characteristic. The classification is based on the fact that noise is usually concentrated in the high-frequency band, while the effective signal is distributed in the low-frequency band, and the intermediate class needs to balance denoising and preservation.
[0035] Setting multiple thresholds based on IMF components may include calculating the energy (or variance) of high-frequency IMF components (such as IMF1-IMF3), taking their average value as the first threshold τ1, and calculating the energy E of mid-frequency IMFs (such as IMF4).IMF4 Estimate the residual noise energy E noise (e.g., extrapolating energy from adjacent high-frequency IMFs). Set the second threshold as... , where α is the adjustment coefficient (e.g., 0.8-1.0); calculate the mean amplitude μ and standard deviation σ of the low-frequency IMF (e.g., IMF5-IMF6). Set the third threshold as τ3=μ+kσ, where k is a small value (e.g., 2-3).
[0036] For example, suppose the humidity IMF1 standard deviation is 0.2 (τ1=0.1, τ2=0.5), which is classified as high-frequency noise; the IMF2 standard deviation is 0.6, which is classified as intermediate; and the IMF3 standard deviation is 1.2, which is classified as low-frequency characteristics. In the temperature IMF, the IMF1 standard deviation is 0.15 (τ1=0.1, τ2=0.4), which is classified as high-frequency; the IMF2 standard deviation is 0.5, which is classified as intermediate; and the IMF3 standard deviation is 0.8, which is classified as low-frequency.
[0037] In step S1132, the candidate humidity intrinsic mode functions in each humidity category are denoised according to the denoising strategy corresponding to each humidity category, and the candidate temperature intrinsic mode functions in each temperature category are denoised according to the denoising strategy corresponding to each temperature category. In this embodiment of the disclosure, a differentiated denoising strategy is adopted for different categories of IMFs: High-frequency noise (first threshold): Directly removed or suppressed using wavelet thresholding, as the noise energy is low and has no physical meaning. Intermediate noise (second threshold): A soft threshold is used to retain some high-frequency components to avoid signal distortion. For example, if the amplitude of signal xi in IMF2 is greater than the second threshold, the difference between the amplitude of signal xi and the second threshold is calculated, and this difference is assigned as the amplitude of signal xi; if the amplitude of signal ai in IMF2 is less than or equal to the second threshold, the amplitude of signal ai is set to zero. Low-frequency features (third threshold): Completely preserved or slightly smoothed, as they contain the main signal features. The strategy selection is based on the energy distribution of noise and signal. High-frequency noise with a high proportion requires strict denoising, while low-frequency noise should be preferentially preserved.
[0038] For example, the high-frequency humidity IMF1 is completely eliminated using a hard threshold (set to 0); the intermediate IMF2 uses a soft threshold (threshold = 0.3), setting coefficients with amplitudes < 0.3 to zero; the low-frequency IMF3 retains its original value. For temperature, the high-frequency temperature IMF1 is eliminated, the intermediate IMF2 retains coefficients with amplitudes > 0.2, and the low-frequency temperature IMF3 is retained. After denoising, the humidity IMF combination is [0, IMF2', IMF3], and the temperature IMF combination is [0, IMF2'', IMF3''].
[0039] In step S1133, a denoised temperature signal is obtained based on the residual temperature signal and the denoised candidate temperature eigenmode function, and a denoised humidity signal is obtained based on the residual humidity signal and the denoised candidate humidity eigenmode function. Among the multiple intrinsic mode function thresholds, the denoising strategy corresponding to the first threshold is used to suppress high-frequency noise, the denoising strategy corresponding to the second threshold is used to balance noise suppression and signal preservation, and the denoising strategy corresponding to the third threshold is used to preserve the main signal features. The first threshold is less than the second threshold, and the second threshold is less than the third threshold.
[0040] In this embodiment, the denoised IMF component is added to the residual signal to reconstruct the denoised signal. The residual signal represents the low-frequency trend of the signal, and the IMF component reflects multi-scale fluctuation characteristics. The superposition of the two can restore the complete structure of the original signal. The formulas are: denoised humidity signal = residual humidity signal + Σ(denoised humidity IMF); denoised temperature signal = residual temperature signal + Σ(denoised temperature IMF). This ensures that the denoised signal suppresses noise while retaining the main features and trends.
[0041] For example, assuming the residual humidity signal is [44.5,44.5,44.5,44.5], and the denoised humidity IMF is [0,0.3,-0.2,0.1] (a combination of IMF2' and IMF3), then the denoised humidity signal = [44.5+0,44.5+0.3,44.5-0.2,44.5+0.1] = [44.5,44.8,44.3,44.6]. The residual temperature signal is [24.8,24.8,24.8,24.8], and the denoised temperature IMF is [0,0.2,-0.1,0.05], then the denoised temperature signal = [24.8,25.0,24.7,24.85], effectively suppressing high-frequency jitter in the original signal.
[0042] In one possible implementation, step S1122, determining the humidity envelope based on the local humidity maximum and the local humidity minimum, includes: For each of the local humidity maxima, a target humidity maxima and a target humidity minima are respectively used as the target humidity maxima and the target humidity minima. The following steps are performed iteratively: based on the local humidity maxima and the local humidity minima, the maximum difference, the square of the maximum difference, and the cube of the maximum difference are determined between the target humidity maxima and the adjacent previous local humidity maxima, and the minimum difference, the square of the minimum difference, and the cube of the minimum difference are determined between the target humidity minima and the adjacent previous local humidity minima. In this embodiment of the disclosure, for each local humidity maximum point, the difference (Δx) between it and the previous maximum point is calculated, and the square of the difference (Δx) is calculated. 2 ) and cube (Δx) 3 Similarly, local minima are handled. The difference reflects the magnitude of change between extreme points, and higher-order terms (square, cube) are used to capture nonlinear trends.
[0043] Based on the maximum difference, the square of the maximum difference, and the cube of the maximum difference corresponding to the maximum point of the target humidity, a cubic polynomial corresponding to the maximum value is constructed; and based on the minimum difference, the square of the minimum difference, and the cube of the minimum difference corresponding to the minimum point of the target humidity, a cubic polynomial corresponding to the minimum value is constructed. In this embodiment of the disclosure, taking the maximum point as an example, a cubic polynomial f(x) = aΔx is constructed. 3 +bΔx 2 +cΔx+d, where the coefficients a, b, c, d must satisfy the continuity condition (the first and second derivatives of adjacent polynomials are equal) and the boundary condition (such as the slope of the first polynomial being 0 at the starting point). The minimum point is similarly constructed by constructing the polynomial g(x).
[0044] Based on the continuity and boundary conditions of the cubic polynomial corresponding to the maximum value, determine the coefficients of each term in the cubic polynomial corresponding to the maximum value, and based on the coefficients of each term, determine the interpolated humidity maximum value between the target humidity maximum point and the adjacent previous local humidity maximum value. Based on the continuity and boundary conditions of the cubic polynomial corresponding to the minimum value, determine the coefficients of each term in the cubic polynomial corresponding to the minimum value, and based on the coefficients of each term, determine the interpolated humidity minimum value between the target humidity minimum point and the adjacent previous local humidity minimum value. In this embodiment of the disclosure, the coefficients are determined by solving a system of linear equations (consisting of continuity conditions and boundary conditions), and then substituted into a polynomial to calculate the interpolation points between adjacent extreme points.
[0045] By sequentially connecting the local humidity maxima and the interpolated humidity maxima according to the time series, the upper humidity envelope is determined; and by sequentially connecting the local humidity minima and the interpolated humidity minima according to the time series, the lower humidity envelope is determined. Calculate the mean values of the upper and lower humidity envelopes at the corresponding time points to obtain the mean humidity envelope, which includes the mean humidity envelope.
[0046] In this embodiment of the disclosure, an upper envelope is formed by connecting all local maxima and interpolated maxima, and a lower envelope is formed by connecting the minimums and interpolated minimums. The mean envelope is obtained by taking the average of the two.
[0047] In one possible implementation, step S1122, determining the temperature envelope based on the local temperature maximum and the local temperature minimum, includes: For each of the local temperature maxima, a target temperature maxima and a target temperature minima are respectively used as the target temperature maxima and the target temperature minima. The following steps are performed iteratively: based on the local temperature maxima and the local temperature minima, the maximum difference, the square of the maximum difference, and the cube of the maximum difference are determined between the target temperature maxima and the adjacent previous local temperature maxima, and the minimum difference, the square of the minimum difference, and the cube of the minimum difference are determined between the target temperature minima and the adjacent previous local temperature minima. In this embodiment, each local temperature maximum is targeted, and the difference, square, and cube of the difference between it and the previous maximum are calculated. Minimum values are processed similarly. The difference reflects the magnitude of the temperature change, and higher-order terms (square and cube) are used to capture nonlinear trends. For example, if the temperature rises from 20°C to 25°C, the difference is 5, the square is 25, and the cube is 125; these values will serve as input parameters for a cubic polynomial.
[0048] Based on the maximum difference, the square of the maximum difference, and the cube of the maximum difference corresponding to the maximum point of the target temperature, a cubic polynomial corresponding to the maximum value is constructed; and based on the minimum difference, the square of the minimum difference, and the cube of the minimum difference corresponding to the minimum point of the target temperature, a cubic polynomial corresponding to the minimum value is constructed. In this embodiment of the disclosure, taking the maximum point as an example, a polynomial F(x) = AΔT is constructed. 3 +BΔT 2 +CΔT+D, where the coefficients A, B, C, and D must satisfy the continuity condition (the first and second derivatives of adjacent polynomials are equal) and the boundary condition (such as the slope of the first polynomial being zero at the starting point). Similarly, a polynomial G(x) is constructed for the minimum points. The coefficients are determined by solving a system of linear equations to ensure a smooth transition of the polynomial between extreme points.
[0049] Based on the continuity and boundary conditions of the cubic polynomial corresponding to the maximum value, determine the coefficients of each term in the cubic polynomial corresponding to the maximum value, and based on the coefficients of each term, determine the interpolated temperature maximum value between the target temperature maximum point and the adjacent previous local temperature maximum value. In this embodiment, a system of equations is established using continuity and boundary conditions, and the coefficients are solved. Substituting these coefficients into a polynomial, interpolation points between adjacent extreme points are calculated, resulting in a denser sequence of temperature maxima / minimum values.
[0050] Based on the continuity and boundary conditions of the cubic polynomial corresponding to the minimum value, determine the coefficients of each term in the cubic polynomial corresponding to the minimum value, and based on the coefficients of each term, determine the interpolated temperature minimum value between the target temperature minimum point and the adjacent previous local temperature minimum value. By sequentially connecting the local temperature maxima and the interpolated temperature maxima according to the time series, the upper temperature envelope is determined; and by sequentially connecting the local temperature minimums and the interpolated temperature minimums according to the time series, the lower temperature envelope is determined. Calculate the mean of the upper temperature envelope and the lower temperature envelope at the corresponding time point to obtain the mean temperature envelope, which includes the mean temperature envelope.
[0051] In this embodiment, an upper envelope is formed by connecting all local maxima and interpolated maxima, and a lower envelope is formed by connecting the minimums and interpolated minimums. The average of the two at corresponding time points is taken to obtain the temperature mean envelope, which reflects the long-term trend of the signal.
[0052] In one possible implementation, step S1123, determining the target temperature and humidity envelope based on the humidity envelope and the temperature envelope, includes: Based on the temperature mean envelope and the saturation humidity function in the temperature envelope, the upper limit and lower limit of saturation humidity corresponding to each acquisition time are determined. The saturation humidity function is determined by the influence of temperature on saturated water vapor pressure, with humidity changes lagging behind temperature changes. In this embodiment, based on the temperature mean envelope Tmean(t), the saturated vapor pressure at each sampling time t is calculated using the saturated humidity function es(T), and then converted into an upper limit Hmax(t) and a lower limit Hmin(t) for saturated humidity. Since humidity lags behind temperature, the limits need to be adjusted in conjunction with historical temperature data to ensure coverage of the delayed effect of humidity changes. For example, if the temperature reaches its peak at t=2 seconds, the humidity peak may occur at t=2.5 seconds. Therefore, the saturated humidity limit at t=2.5 seconds needs to be calculated using the temperature at t=2 seconds, after a lag of 0.5 seconds.
[0053] The saturation humidity function es(T) can be expressed as: ;
[0054] Where K is the preset gain coefficient, and τ is the time constant reflecting the system's inertia. Let be the lag time, and s be the time point. After discretization, we can obtain:
[0055] Where, H(t) is the saturation humidity limit at time point t, and H(t - 1) is the saturation humidity limit at time point t - 1, where t - 1 is the previous sampling time point of t. is the temperature lag at the time point , and △t is the time difference between time point t and time point t - 1.
[0056] According to the corresponding upper limit value of saturation humidity, correct the local temperature maximum value corresponding to the acquisition moment in the humidity envelope line to obtain the corrected local temperature maximum value corresponding to the acquisition moment, and replace the original local temperature maximum value in the humidity envelope line with the corrected local temperature maximum value to obtain the target humidity upper envelope line in the target temperature-humidity envelope line; In the embodiment of the present disclosure, compare the local maximum value Hlocal_max(t) in the humidity envelope line with the upper limit of saturation humidity Hmax(t): if Hlocal_max(t) > Hmax(t), then correct it to Hmax(t); otherwise, retain the original value. Replace the original value with the corrected maximum value Hlocal_max′(t) to form the target humidity upper envelope line. This step ensures that the humidity does not exceed the maximum possible value at the current temperature.
[0057] According to the corresponding lower limit value of saturation humidity, correct the local temperature minimum value corresponding to the acquisition moment in the humidity envelope line to obtain the corrected local temperature minimum value corresponding to the acquisition moment, and replace the original local temperature minimum value in the humidity envelope line with the corrected local temperature minimum value to obtain the target humidity lower envelope line in the target temperature-humidity envelope line.
[0058] In the embodiment of the present disclosure, compare the local minimum value Hlocal_min(t) with the lower limit of saturation humidity Hmin(t): if Hlocal_min(t) < Hmin(t), then correct it to Hmin(t); otherwise, retain the original value. Replace the original value with the corrected minimum value Hlocal_min′(t) to form the target humidity lower envelope line. This step prevents the humidity from being lower than the minimum possible value at the current temperature (such as supersaturation or negative humidity).
[0059] In a possible implementation manner, the embodiment of the present disclosure provides the pseudocode for implementing the above technical solution: The pseudocode for EMD decomposition can be: IMF_Components* EMD_Decomposition(float* signal, int length) { IMF_Components* imfs = create_IMF_List(); float* residue = malloc(length * sizeof(float)); memcpy(residue, signal, length * sizeof(float)); while (!is_Residue(residue, length)) { float* imf = extract_IMF(residue, length); add_IMF_Component(imfs, imf); / / Update residuals for (int i = 0; i < length; i++) { residue[i] -= imf[i]; } } add_Residue(imfs, residue); return imfs; } The pseudocode for a single IMF extraction process can be: float* extract_IMF(float* signal, int length) { float* h = malloc(length * sizeof(float)); memcpy(h, signal, length * sizeof(float)); do { / / Finding extreme points ExtremumPoints* extremes = find_Extrema(h, length); / / Fitting upper and lower envelopes float* upper_env = cubic_Spline_Interp(extremes->max_points); float* lower_env = cubic_Spline_Interp(extremes->min_points); / / Calculate the mean curve float* mean_env = malloc(length * sizeof(float)); for (int i = 0; i < length; i++) { mean_env[i] = (upper_env[i] + lower_env[i]) / 2.0f; } / / Extract detail components float* prev_h = h; h = malloc(length * sizeof(float)); for (int i = 0; i < length; i++) { h[i] = prev_h[i] - mean_env[i]; } free(prev_h); free(upper_env); free(lower_env); free(mean_env); } while (!is_IMF_Condition_Satisfied(h, length)); return h; } Component feature analysis and threshold processing, including: IMF component classification and processing strategies. The pseudocode for IMF component feature analysis can be: typedef struct { int imf_order; float energy; float zero_crossing_rate; float correlation? float frequency_band; } IMF_Feature; void analyze_IMF_Components(IMF_Components* imfs) { for (int i = 0; i < imfs->count; i++) { IMF_Feature feature = extract_IMF_Feature(imfs->components[i],i); / / Determine the processing strategy based on features Denoise_Strategy strategy = select_Denoise_Strategy(feature); / / Apply the appropriate threshold processing apply_Threshold_Denoise(imfs->components[i], strategy); } } The pseudocode for threshold strategy selection can be: Denoise_Strategy select_Denoise_Strategy(IMF_Feature feature) { Denoise_Strategy strategy; if (feature.imf_order <= 1) { / / IMF1: High-frequency noise component strategy.type = HARD_THRESHOLD; strategy.threshold = calculate_Universal_Threshold(feature.energy); strategy.param_k = 0.3f; / / Smaller threshold coefficient } else if (feature.imf_order <= 3) { / / IMF2-3: Mixed signal components strategy.type = SOFT_THRESHOLD; strategy.threshold = calculate_SURE_Threshold(feature.energy); strategy.param_k = 0.5f; / / Medium threshold coefficient } else { / / IMF4+: Dominant signal component strategy.type = MILD_THRESHOLD; strategy.threshold = calculate_Energy_Based_Threshold(feature.energy); strategy.param_k = 0.7f; / / Larger threshold coefficient } return strategy; } In one possible implementation, the target backpropagation neural network is trained as follows: In step S21, the positions of a group of sparrows are initialized, where the position of each sparrow represents a set of connection weights and thresholds in the initial backpropagation neural network; In this embodiment, the position of each sparrow represents a set of initial weights and thresholds for the BPNN. The sparrow population is initialized by randomly generating multi-dimensional vectors (dimension equal to the total number of network parameters) to ensure the parameters are within a reasonable range (e.g., [-1, 1]). The diversity of initial positions helps the algorithm perform a global search and avoids premature convergence. For example, if the BPNN has 3 layers (4 neurons in the input layer, 5 neurons in the hidden layer, and 1 neuron in the output layer), then the number of weights is 4×5 + 5×1 = 25, the number of thresholds is 5 + 1 = 6, the total number of parameters is 31, and the position of each sparrow is a 31-dimensional vector.
[0060] In step S22, the connection weights and thresholds represented by each sparrow in the backpropagation neural network are concatenated to obtain the vector to be optimized. In the vector to be optimized, each set of connection weights and biases is used as a dimension to characterize a grid parameter to be optimized. In this embodiment of the disclosure, the weights and thresholds of each sparrow are concatenated into a vector according to the network structure. For example, the weight matrix W from the input layer to the hidden layer. 12 Flattening (4×5) into a 20-dimensional vector, the hidden layer threshold b2 (5-dimensional) is directly concatenated to form a 25-dimensional sub-vector; similarly, the output layer parameters are processed to finally obtain a 31-dimensional vector to be optimized. In this way, discrete parameters can be unified into points in continuous space.
[0061] In step S23, training samples from the training set are input into each group of networks of the backpropagation neural network to determine the output and error based on the connection weights and thresholds of the network, and to obtain the fitness value corresponding to this backpropagation. In this embodiment, training samples are input into a BPNN, and the output ypred is calculated during forward propagation. This output is then compared with the true label ytrue to calculate the error. The smaller the error, the higher the fitness value (if fitness is defined as the reciprocal of the error, then a larger value indicates better performance). This allows for the evaluation of the current position of the sparrow.
[0062] In step S24, according to the pre-set rules for discoverers, joiners, and watchers, the positions of all sparrows are updated with the goal of moving the positions of sparrows with larger fitness values closer to the positions of sparrows with smaller fitness values, thereby updating the corresponding connection weights and thresholds. In this embodiment, the discoverer (a sparrow with high fitness) moves toward the food source (globally optimal), the joiner (a sparrow with low fitness) follows the discoverer, and the watcher moves randomly or moves toward a safe area.
[0063] In step S25, the following steps are performed repeatedly: from inputting training samples from the training set into each group of networks corresponding to the backpropagation neural network, to updating the corresponding connection weights and thresholds, until the iterative update condition is met; In this embodiment, the iterative update condition can be, for example, reaching the maximum number of iterations or the fitness value converging. In each iteration, the sparrow's position is continuously optimized, and the weights and thresholds of the BPNN gradually approach the optimal solution.
[0064] In step S26, the connection weights and thresholds corresponding to the minimum fitness value are determined as the target connection weights and target thresholds of the backpropagation neural network, thus obtaining the target backpropagation neural network.
[0065] In this embodiment, 1. Determine the search space: Concatenate all connection weights and biases (thresholds) of a BP network into a long vector. Each dimension of this vector represents a parameter to be optimized. The space of the high-dimensional vector can serve as the search space for the sparrow population.
[0066] 2. Define the fitness function: The fitness function is used to evaluate the performance of a single network parameter (i.e., a set of network parameters). It can be the mean squared error (MSE) or mean absolute error (MAE) of the BP neural network on the training set.
[0067] 3. ISSA Optimization Phase: Initialization: A group of sparrows is initialized using an improved strategy (such as chaotic mapping), with each sparrow representing a set of random network weights and thresholds.
[0068] Iterative Optimization: Forward Propagation: Training data is input into the BP network represented by each sparrow, and the output and error (fitness value) are calculated. The ISSA algorithm updates the positions of all sparrows according to the rules of discoverer, joiner, and watcher (i.e., updates all weights and threshold vectors). Sparrows with poor fitness (large error) will learn from sparrows with good fitness (small error). This process is repeated until the maximum number of iterations is reached or the error meets the requirements.
[0069] Outputting the optimal solution: After iteration, the ISSA algorithm outputs the optimal sparrow position, which is the globally optimal or near-globally optimal initial weights and thresholds of the BP network. Based on the provided pseudocode of the ISSA-BP neural network implementation, the BP network can include an input layer, hidden layers, and an output layer. The input layer can include four nodes, used to input the denoised humidity, temperature, temperature change rate, and time factor, respectively. The hidden layer can be a single hidden layer, with the number of nodes defined by `NeuralNetwork.hidden_size`, connected to the input layer via weights `weights_ih` and biases `bias_h`. The output layer can have a single output node, used to output the compensated humidity value.
[0070] 4. Backpropagation (BP) Neural Network Training and Prediction Phase: The optimal initial parameters found by ISSA are assigned to the BP neural network. Standard BP training (i.e., error backpropagation) is performed on the network using the training set data. Due to the excellent starting point, the BP algorithm quickly converges to a high-quality solution. Finally, the trained model is used for final prediction on the test set. The final prediction yields the compensated temperature and humidity, and the temperature and humidity transmitter is controlled to output temperature and humidity based on the compensated values.
[0071] In one possible implementation, this disclosure provides pseudocode for the above technical solutions: Pseudocode for the ISSA-BP neural network implementation: typedef struct { int input_size; int hidden_size; int output_size; float* weights_ih; / / Input weights to the hidden layer float* weights_ho; / / Weights hidden in the output layer float* bias_h; float* bias_o; NeuralNetwork; float ISSA_BP_Compensate(float rh_denoised, float temperature, floatdelta_t) { / / Input layer: Denoising humidity, temperature, temperature change rate, time factor float inputs[4] = { rh_denoised, temperature, delta_t, get_Time_Factor() }; / / ISSA Optimization Weights NeuralNetwork nn = optimize_Weights_ISSA(inputs); / / Forward propagation of BP neural network float* hidden_outputs = malloc(nn.hidden_size * sizeof(float)); for (int i = 0; i < nn.hidden_size; i++) { float sum = nn.bias_h[i]; for (int j = 0; j < nn.input_size; j++) { sum += inputs[j] * nn.weights_ih[j * nn.hidden_size + i]; } hidden_outputs[i] = sigmoid_Activation(sum); } / / Output layer computation float output = nn.bias_o[0]; for (int i = 0; i < nn.hidden_size; i++) { output += hidden_outputs[i] * nn.weights_ho[i]; } free(hidden_outputs); return output; / / Compensated humidity value } Pseudocode for the optimized sparrow search algorithm: NeuralNetwork optimize_Weights_ISSA(float* inputs) { NeuralNetwork best_nn; float best_fitness = FLT_MAX; / / Sparrow population initialization SparrowPopulation* population = init_Sparrow_Population(POPULATION_SIZE); for (int iteration = 0; iteration < MAX_ITERATIONS; iteration++){ / / Discoverer-Follower Update update_Discoverers(population); update_Followers(population); / / Vigilant updates randomly update_Scouters(population); / / Adaptive weight adjustment adaptive_Weight_Adjustment(population, iteration); / / Assess fitness for (int i = 0; i < POPULATION_SIZE; i++) { float fitness = evaluate_Fitness(population->sparrows[i],inputs); if (fitness < best_fitness) { best_fitness = fitness; best_nn = population->sparrows[i].nn; } This disclosure also provides a high-precision humidity signal control device based on a temperature and humidity transmitter. See [link to relevant documentation]. Figure 2 As shown, the device includes: The acquisition and denoising module 210 is configured to acquire the original humidity signal and the original temperature signal collected by the temperature and humidity sensor, perform empirical mode decomposition denoising processing to obtain the denoised temperature and humidity signal, wherein the empirical mode decomposition denoising processing decomposes the nonlinear original humidity signal and the original temperature signal into eigenmode functions with different frequency characteristics to obtain the denoised temperature and humidity signal. The input module 220 is configured to input the denoised temperature and humidity signal into the target backpropagation neural network to obtain the compensated temperature and humidity signal output by the target backpropagation neural network after temperature compensation, wherein the target backpropagation neural network is obtained by optimizing the backpropagation neural network using a sparrow search algorithm; The control module 230 is configured to determine a control strategy for the temperature and humidity transmitter based on the compensated temperature and humidity signal and a preset temperature and humidity threshold, and to control the temperature and humidity transmitter according to the control strategy.
[0072] In one possible implementation, the acquisition and denoising module 210 is configured as follows: Acquire the raw humidity signal and raw temperature signal collected by the temperature and humidity sensor at the same acquisition time, and determine the raw humidity signal and raw temperature signal arranged in time sequence. The following steps are executed repeatedly: Based on the original humidity signal and the original temperature signal arranged in time series, determine the local humidity maximum and local humidity minimum corresponding to the original humidity signal, and determine the local temperature maximum and local temperature minimum corresponding to the original temperature signal; A humidity envelope is determined based on the local humidity maximum and the local humidity minimum, and a temperature envelope is determined based on the local temperature maximum and the local temperature minimum. Based on the humidity envelope and the temperature envelope, a target temperature and humidity envelope is determined, and candidate temperature intrinsic mode functions and candidate humidity intrinsic mode functions are determined based on the target temperature and humidity envelope. Based on the candidate temperature intrinsic mode function, the candidate humidity intrinsic mode function, and the original humidity signal and original temperature signal arranged in time series, a new humidity signal and a new temperature signal are determined, and the local humidity maximum and local humidity minimum corresponding to the new humidity signal are determined, and the local temperature maximum and local temperature minimum corresponding to the new temperature signal are determined, until the preset conditions are met, and the residual temperature signal and residual humidity signal are obtained. Based on the residual temperature signal, the residual humidity signal, the candidate temperature eigenmode function and the candidate humidity eigenmode function determined in each round, the denoised temperature and humidity signals are obtained.
[0073] In one possible implementation, the acquisition and denoising module 210 is configured as follows: Based on multiple humidity intrinsic mode function thresholds, the candidate humidity intrinsic mode functions are classified to obtain the candidate humidity intrinsic mode function corresponding to each humidity category; and based on multiple temperature intrinsic mode function thresholds, the candidate temperature intrinsic mode functions are classified to obtain the candidate temperature intrinsic mode function corresponding to each temperature category. According to the denoising strategy corresponding to each humidity category, the candidate humidity intrinsic mode function in each humidity category is denoised, and according to the denoising strategy corresponding to each temperature category, the candidate temperature intrinsic mode function in each temperature category is denoised. Based on the residual temperature signal and the denoised candidate temperature eigenmode function, a denoised temperature signal is obtained; and based on the residual humidity signal and the denoised candidate humidity eigenmode function, a denoised humidity signal is obtained. Among the multiple intrinsic mode function thresholds, the denoising strategy corresponding to the first threshold is used to suppress high-frequency noise, the denoising strategy corresponding to the second threshold is used to balance noise suppression and signal preservation, and the denoising strategy corresponding to the third threshold is used to preserve the main signal features. The first threshold is less than the second threshold, and the second threshold is less than the third threshold.
[0074] In one possible implementation, the acquisition and denoising module 210 is configured as follows: For each of the local humidity maxima, a target humidity maxima and a target humidity minima are respectively used as the target humidity maxima and the target humidity minima. The following steps are performed iteratively: based on the local humidity maxima and the local humidity minima, the maximum difference, the square of the maximum difference, and the cube of the maximum difference are determined between the target humidity maxima and the adjacent previous local humidity maxima, and the minimum difference, the square of the minimum difference, and the cube of the minimum difference are determined between the target humidity minima and the adjacent previous local humidity minima. Based on the maximum difference, the square of the maximum difference, and the cube of the maximum difference corresponding to the maximum point of the target humidity, a cubic polynomial corresponding to the maximum value is constructed; and based on the minimum difference, the square of the minimum difference, and the cube of the minimum difference corresponding to the minimum point of the target humidity, a cubic polynomial corresponding to the minimum value is constructed. Based on the continuity and boundary conditions of the cubic polynomial corresponding to the maximum value, determine the coefficients of each term in the cubic polynomial corresponding to the maximum value, and based on the coefficients of each term, determine the interpolated humidity maximum value between the target humidity maximum point and the adjacent previous local humidity maximum value. Based on the continuity and boundary conditions of the cubic polynomial corresponding to the minimum value, determine the coefficients of each term in the cubic polynomial corresponding to the minimum value, and based on the coefficients of each term, determine the interpolated humidity minimum value between the target humidity minimum point and the adjacent previous local humidity minimum value. By sequentially connecting the local humidity maxima and the interpolated humidity maxima according to the time series, the upper humidity envelope is determined; and by sequentially connecting the local humidity minima and the interpolated humidity minima according to the time series, the lower humidity envelope is determined. Calculate the mean values of the upper and lower humidity envelopes at the corresponding time points to obtain the mean humidity envelope, which includes the mean humidity envelope.
[0075] In one possible implementation, the acquisition and denoising module 210 is configured as follows: For each of the local temperature maxima, a target temperature maxima and a target temperature minima are respectively used as the target temperature maxima and the target temperature minima. The following steps are performed iteratively: based on the local temperature maxima and the local temperature minima, the maximum difference, the square of the maximum difference, and the cube of the maximum difference are determined between the target temperature maxima and the adjacent previous local temperature maxima, and the minimum difference, the square of the minimum difference, and the cube of the minimum difference are determined between the target temperature minima and the adjacent previous local temperature minima. Based on the maximum difference, the square of the maximum difference, and the cube of the maximum difference corresponding to the maximum point of the target temperature, a cubic polynomial corresponding to the maximum value is constructed; and based on the minimum difference, the square of the minimum difference, and the cube of the minimum difference corresponding to the minimum point of the target temperature, a cubic polynomial corresponding to the minimum value is constructed. Based on the continuity and boundary conditions of the cubic polynomial corresponding to the maximum value, determine the coefficients of each term in the cubic polynomial corresponding to the maximum value, and based on the coefficients of each term, determine the interpolated temperature maximum value between the target temperature maximum point and the adjacent previous local temperature maximum value. Based on the continuity and boundary conditions of the cubic polynomial corresponding to the minimum value, determine the coefficients of each term in the cubic polynomial corresponding to the minimum value, and based on the coefficients of each term, determine the interpolated temperature minimum value between the target temperature minimum point and the adjacent previous local temperature minimum value. By sequentially connecting the local temperature maxima and the interpolated temperature maxima according to the time series, the upper temperature envelope is determined; and by sequentially connecting the local temperature minimums and the interpolated temperature minimums according to the time series, the lower temperature envelope is determined. Calculate the mean of the upper temperature envelope and the lower temperature envelope at the corresponding time point to obtain the mean temperature envelope, which includes the mean temperature envelope.
[0076] In one possible implementation, determining the target temperature and humidity envelope based on the humidity envelope and the temperature envelope includes: Based on the temperature mean envelope and the saturation humidity function in the temperature envelope, the upper limit and lower limit of saturation humidity corresponding to each acquisition time are determined. The saturation humidity function is determined by the influence of temperature on saturated water vapor pressure, with humidity changes lagging behind temperature changes. Based on the corresponding upper limit value of saturated humidity, the local temperature maximum value in the humidity envelope corresponding to the acquisition time is corrected to obtain the corrected local temperature maximum value corresponding to the acquisition time. The original local temperature maximum value in the humidity envelope is replaced with the corrected local temperature maximum value to obtain the target humidity upper envelope in the target temperature and humidity envelope. Based on the corresponding lower limit of saturated humidity, the local temperature minimum value in the humidity envelope corresponding to the acquisition time is corrected to obtain the corrected local temperature minimum value corresponding to the acquisition time. The original local temperature minimum value in the humidity envelope is replaced with the corrected local temperature minimum value to obtain the target humidity lower envelope in the target temperature and humidity envelope.
[0077] In one possible implementation, the device includes a pre-training module configured to train the target backpropagation neural network in the following manner: Initialize the positions of a group of sparrows, where the position of each sparrow represents a set of connection weights and thresholds in the initial backpropagation neural network; The connection weights and thresholds represented by each sparrow in the backpropagation neural network are concatenated to obtain the vector to be optimized. Each set of connection weights and biases in the vector to be optimized is used as a dimension to characterize a grid parameter to be optimized. The training samples in the training set are input into each group of networks of the backpropagation neural network to determine the output and error based on the connection weights and thresholds of the network, and to obtain the fitness value corresponding to this backpropagation. Based on the pre-set rules for discoverers, joiners, and watchdogs, the positions of all sparrows are updated with the goal of moving the positions of sparrows with larger fitness values closer to the positions of sparrows with smaller fitness values, thereby updating the corresponding connection weights and thresholds. The process of iteratively executing the steps of inputting training samples from the training set into each group of corresponding networks of the backpropagation neural network, up to updating the corresponding connection weights and thresholds, continues until the iterative update condition is met. The connection weights and thresholds corresponding to the minimum fitness value are determined as the target connection weights and target thresholds of the backpropagation neural network, thus obtaining the target backpropagation neural network.
[0078] Specific limitations regarding the high-precision humidity signal control device based on temperature and humidity transmitters can be found in the limitations of the high-precision humidity signal control method based on temperature and humidity transmitters mentioned above, and will not be repeated here. Each module in the aforementioned high-precision humidity signal control device based on temperature and humidity transmitters can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0079] This disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described in the foregoing embodiments.
[0080] This disclosure also provides an electronic device, including: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of any of the methods described in the foregoing embodiments.
[0081] Figure 3 The high-precision humidity signal control device 100 based on a temperature and humidity transmitter, as shown, includes a processor 1001 and a memory 1003. The processor 1001 and the memory 1003 are connected, for example, via a bus 1002. Optionally, the high-precision humidity signal control device 100 based on a temperature and humidity transmitter may further include a communication component, which can be used for data interaction between the device 100 and other devices, such as sending or receiving data. It should be noted that in actual scheduling, the communication component is not limited to one, and the structure of this high-precision humidity signal control device 100 based on a temperature and humidity transmitter does not constitute a limitation on the embodiments of this application.
[0082] Processor 1001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 1001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0083] Bus 1002 may include a pathway for transmitting information between the aforementioned components. Bus 1002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 1002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0084] The memory 1003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing program code and capable of being read by a computer, without limitation herein.
[0085] The memory 1003 is used to store program code for executing the embodiments of this disclosure, and its execution is controlled by the processor 1001. The processor 1001 is used to execute the program code stored in the memory 1003 to implement the steps shown in the aforementioned embodiments of the high-precision humidity signal control method based on a temperature and humidity transmitter.
[0086] This disclosure also provides a computer-readable storage medium storing program code. When the program code is executed by a processor, it can implement the steps and corresponding content of the aforementioned embodiment of the high-precision humidity signal control method based on a temperature and humidity transmitter.
[0087] The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings. However, the present disclosure is not limited to the specific details of the above embodiments. Within the scope of the technical concept of the present disclosure, various changes, modifications, substitutions and variations can be made to these embodiments, and all such changes, modifications, substitutions and variations fall within the protection scope of the present disclosure.
[0088] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction, and such combinations should also be considered as part of this disclosure. To avoid unnecessary repetition, this disclosure will not further describe the various possible combinations. The technical scope of this application is not limited to the contents of the specification, but must be determined according to the scope of the claims.
Claims
1. A high-precision humidity signal control method based on a temperature and humidity transmitter, characterized in that, The method includes: The raw humidity signal and raw temperature signal collected by the temperature and humidity sensor are acquired, and empirical mode decomposition denoising processing is performed to obtain the denoised temperature and humidity signal. The empirical mode decomposition denoising processing decomposes the nonlinear raw humidity signal and raw temperature signal into intrinsic mode functions with different frequency characteristics to obtain the denoised temperature and humidity signal. The denoised temperature and humidity signal is input into the target backpropagation neural network to obtain the compensated temperature and humidity signal output by the target backpropagation neural network after temperature compensation. The target backpropagation neural network is obtained by optimizing the backpropagation neural network using the sparrow search algorithm. Based on the compensated temperature and humidity signal and the preset temperature and humidity threshold, a control strategy for the temperature and humidity transmitter is determined, and the temperature and humidity transmitter is controlled according to the control strategy.
2. The method according to claim 1, characterized in that, The process of acquiring the raw humidity signal and raw temperature signal from the temperature and humidity sensor, performing empirical mode decomposition (EMD) denoising processing, and obtaining the denoised temperature and humidity signal includes: Acquire the raw humidity signal and raw temperature signal collected by the temperature and humidity sensor at the same acquisition time, and determine the raw humidity signal and raw temperature signal arranged in time sequence. The following steps are executed repeatedly: Based on the original humidity signal and the original temperature signal arranged in time series, determine the local humidity maximum and local humidity minimum corresponding to the original humidity signal, and determine the local temperature maximum and local temperature minimum corresponding to the original temperature signal; A humidity envelope is determined based on the local humidity maximum and the local humidity minimum, and a temperature envelope is determined based on the local temperature maximum and the local temperature minimum. Based on the humidity envelope and the temperature envelope, a target temperature and humidity envelope is determined, and candidate temperature intrinsic mode functions and candidate humidity intrinsic mode functions are determined based on the target temperature and humidity envelope. Based on the candidate temperature intrinsic mode function, the candidate humidity intrinsic mode function, and the original humidity signal and original temperature signal arranged in time series, a new humidity signal and a new temperature signal are determined, and the local humidity maximum and local humidity minimum corresponding to the new humidity signal are determined, and the local temperature maximum and local temperature minimum corresponding to the new temperature signal are determined, until the preset conditions are met, and the residual temperature signal and residual humidity signal are obtained. Based on the residual temperature signal, the residual humidity signal, the candidate temperature eigenmode function and the candidate humidity eigenmode function determined in each round, the denoised temperature and humidity signals are obtained.
3. The method according to claim 2, characterized in that, The step of obtaining the denoised temperature and humidity signal based on the residual temperature signal, the residual humidity signal, the candidate temperature eigenmode function and the candidate humidity eigenmode function determined in each round, includes: Based on multiple humidity intrinsic mode function thresholds, the candidate humidity intrinsic mode functions are classified to obtain the candidate humidity intrinsic mode function corresponding to each humidity category; and based on multiple temperature intrinsic mode function thresholds, the candidate temperature intrinsic mode functions are classified to obtain the candidate temperature intrinsic mode function corresponding to each temperature category. According to the denoising strategy corresponding to each humidity category, the candidate humidity intrinsic mode function in each humidity category is denoised, and according to the denoising strategy corresponding to each temperature category, the candidate temperature intrinsic mode function in each temperature category is denoised. Based on the residual temperature signal and the denoised candidate temperature eigenmode function, a denoised temperature signal is obtained; and based on the residual humidity signal and the denoised candidate humidity eigenmode function, a denoised humidity signal is obtained. Among the multiple intrinsic mode function thresholds, the denoising strategy corresponding to the first threshold is used to suppress high-frequency noise, the denoising strategy corresponding to the second threshold is used to balance noise suppression and signal preservation, and the denoising strategy corresponding to the third threshold is used to preserve the main signal features. The first threshold is less than the second threshold, and the second threshold is less than the third threshold.
4. The method according to claim 2, characterized in that, The step of determining the humidity envelope based on the local humidity maximum and the local humidity minimum includes: For each of the local humidity maxima, a target humidity maxima and a target humidity minima are respectively used as the target humidity maxima and the target humidity minima. The following steps are performed iteratively: based on the local humidity maxima and the local humidity minima, the maximum difference, the square of the maximum difference, and the cube of the maximum difference are determined between the target humidity maxima and the adjacent previous local humidity maxima, and the minimum difference, the square of the minimum difference, and the cube of the minimum difference are determined between the target humidity minima and the adjacent previous local humidity minima. Based on the maximum difference, the square of the maximum difference, and the cube of the maximum difference corresponding to the maximum point of the target humidity, a cubic polynomial corresponding to the maximum value is constructed; and based on the minimum difference, the square of the minimum difference, and the cube of the minimum difference corresponding to the minimum point of the target humidity, a cubic polynomial corresponding to the minimum value is constructed. Based on the continuity and boundary conditions of the cubic polynomial corresponding to the maximum value, determine the coefficients of each term in the cubic polynomial corresponding to the maximum value, and based on the coefficients of each term, determine the interpolated humidity maximum value between the target humidity maximum point and the adjacent previous local humidity maximum value. Based on the continuity and boundary conditions of the cubic polynomial corresponding to the minimum value, determine the coefficients of each term in the cubic polynomial corresponding to the minimum value, and based on the coefficients of each term, determine the interpolated humidity minimum value between the target humidity minimum point and the adjacent previous local humidity minimum value. By sequentially connecting the local humidity maxima and the interpolated humidity maxima according to the time series, the upper humidity envelope is determined; and by sequentially connecting the local humidity minima and the interpolated humidity minima according to the time series, the lower humidity envelope is determined. Calculate the mean values of the upper and lower humidity envelopes at the corresponding time points to obtain the mean humidity envelope, which includes the mean humidity envelope.
5. The method according to claim 2, characterized in that, Determining the temperature envelope based on the local temperature maximum and the local temperature minimum includes: For each of the local temperature maxima, a target temperature maxima and a target temperature minima are respectively used as the target temperature maxima and the target temperature minima. The following steps are performed iteratively: based on the local temperature maxima and the local temperature minima, the maximum difference, the square of the maximum difference, and the cube of the maximum difference are determined between the target temperature maxima and the adjacent previous local temperature maxima, and the minimum difference, the square of the minimum difference, and the cube of the minimum difference are determined between the target temperature minima and the adjacent previous local temperature minima. Based on the maximum difference, the square of the maximum difference, and the cube of the maximum difference corresponding to the maximum point of the target temperature, a cubic polynomial corresponding to the maximum value is constructed; and based on the minimum difference, the square of the minimum difference, and the cube of the minimum difference corresponding to the minimum point of the target temperature, a cubic polynomial corresponding to the minimum value is constructed. Based on the continuity and boundary conditions of the cubic polynomial corresponding to the maximum value, determine the coefficients of each term in the cubic polynomial corresponding to the maximum value, and based on the coefficients of each term, determine the interpolated temperature maximum value between the target temperature maximum point and the adjacent previous local temperature maximum value. Based on the continuity and boundary conditions of the cubic polynomial corresponding to the minimum value, determine the coefficients of each term in the cubic polynomial corresponding to the minimum value, and based on the coefficients of each term, determine the interpolated temperature minimum value between the target temperature minimum point and the adjacent previous local temperature minimum value. By sequentially connecting the local temperature maxima and the interpolated temperature maxima according to the time series, the upper temperature envelope is determined; and by sequentially connecting the local temperature minimums and the interpolated temperature minimums according to the time series, the lower temperature envelope is determined. Calculate the mean of the upper temperature envelope and the lower temperature envelope at the corresponding time point to obtain the mean temperature envelope, which includes the mean temperature envelope.
6. The method according to claim 2, characterized in that, Determining the target temperature and humidity envelope based on the humidity envelope and the temperature envelope includes: Based on the temperature mean envelope and the saturation humidity function in the temperature envelope, the upper limit and lower limit of saturation humidity corresponding to each acquisition time are determined. The saturation humidity function is determined by the influence of temperature on saturated water vapor pressure, with humidity changes lagging behind temperature changes. Based on the corresponding upper limit value of saturated humidity, the local temperature maximum value in the humidity envelope corresponding to the acquisition time is corrected to obtain the corrected local temperature maximum value corresponding to the acquisition time. The original local temperature maximum value in the humidity envelope is replaced with the corrected local temperature maximum value to obtain the target humidity upper envelope in the target temperature and humidity envelope. Based on the corresponding lower limit of saturated humidity, the local temperature minimum value in the humidity envelope corresponding to the acquisition time is corrected to obtain the corrected local temperature minimum value corresponding to the acquisition time. The original local temperature minimum value in the humidity envelope is replaced with the corrected local temperature minimum value to obtain the target humidity lower envelope in the target temperature and humidity envelope.
7. The method according to any one of claims 1-6, characterized in that, The target backpropagation neural network is trained in the following manner: Initialize the positions of a group of sparrows, where the position of each sparrow represents a set of connection weights and thresholds in the initial backpropagation neural network; The connection weights and thresholds represented by each sparrow in the backpropagation neural network are concatenated to obtain the vector to be optimized. Each set of connection weights and biases in the vector to be optimized is used as a dimension to characterize a grid parameter to be optimized. The training samples in the training set are input into each group of networks of the backpropagation neural network to determine the output and error based on the connection weights and thresholds of the network, and to obtain the fitness value corresponding to this backpropagation. Based on the pre-set rules for discoverers, joiners, and watchdogs, the positions of all sparrows are updated with the goal of moving the positions of sparrows with larger fitness values closer to the positions of sparrows with smaller fitness values, thereby updating the corresponding connection weights and thresholds. The process of iteratively executing the steps of inputting training samples from the training set into each group of corresponding networks of the backpropagation neural network, up to updating the corresponding connection weights and thresholds, continues until the iterative update condition is met. The connection weights and thresholds corresponding to the minimum fitness value are determined as the target connection weights and target thresholds of the backpropagation neural network, thus obtaining the target backpropagation neural network.
8. A high-precision humidity signal control device based on a temperature and humidity transmitter, characterized in that, The device includes: The acquisition and denoising module is configured to acquire the raw humidity signal and raw temperature signal collected by the temperature and humidity sensor, perform empirical mode decomposition denoising processing to obtain the denoised temperature and humidity signal. The empirical mode decomposition denoising processing decomposes the nonlinear raw humidity signal and raw temperature signal into intrinsic mode functions with different frequency characteristics to obtain the denoised temperature and humidity signal. The input module is configured to input the denoised temperature and humidity signal into the target backpropagation neural network to obtain the compensated temperature and humidity signal output by the target backpropagation neural network after temperature compensation, wherein the target backpropagation neural network is obtained by optimizing the backpropagation neural network using the sparrow search algorithm; The control module is configured to determine a control strategy for the temperature and humidity transmitter based on the compensated temperature and humidity signal and a preset temperature and humidity threshold, and to control the temperature and humidity transmitter according to the control strategy.
9. An electronic device, characterized in that, include: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code that is executed by a processor to implement the steps of the method according to any one of claims 1-7.