Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 15, No. 2, 2025 132 SSA‐based TVOC Concentration Control Method for Storage Equipment Chenchen Liu*, Jun Li, Ye Yuan College of Mechanical Engineering, Sichuan University of Science & Engineering, Sichuan, China * Corresponding author Abstract: The collection and storage of hazardous waste (HW) represent a critical phase in the full-process management of HW, where the control of total volatile organic compound (TVOC) concentrations in storage equipment directly impacts environmental safety and personnel health. Traditional manual control of UV lamps relies on empirical judgment, often suffering from delayed response, high energy consumption, and poor stability. To enhance the safety management of HW storage equipment and achieve precise, efficient TVOC concentration control, this study proposes an intelligent control method based on a PID algorithm optimized by the Sparrow Search Algorithm (SSA). This approach dynamically adjusts UV lamp intensity in response to fluctuations in liquid waste volatilization, maintaining TVOC levels stably below the emission standard threshold of 500 ppb. Stability tests demonstrate that the SSA-optimized PID parameters exhibit rapid convergence, achieving parameter optimization for step and sinusoidal responses within 13 and 18 iterations, respectively. Experimental results on TVOC concentration control show that the proposed method stabilizes TVOC levels within the range of 216–228 ppb within 27 minutes, with minimal sensitivity to environmental variations. Keywords: PID; TVOC concentration control; SSA. 1. Introduction In hazardous waste storage equipment, liquid wastes such as waste engine oil and waste organic solvents generate TVOC (Total Volatile Organic Compounds). Excessive TVOC concentrations may lead to safety accidents and cause health issues, including allergic reactions, respiratory infections, headaches, eye irritation, and nausea.To assess indoor air quality, appropriate detection methods must be employed to measure TVOC concentrations. Traditional monitoring techniques include gas chromatography-mass spectrometry (GC-MS) and gas chromatography- fluorescence detection (GC-FD). With technological advancements, real-time TVOC gas sensors have been developed to enable prompt control measures[1].Currently, the primary methods for reducing TVOC levels are:Activated carbon adsorption: Due to its porous structure, activated carbon exhibits strong adsorption capacity, effectively trapping organic particles.UV photocatalytic degradation: Photocatalysis is an efficient method for decomposing TVOCs. Photocatalysts release negative ions, promoting chemical reactions that break down TVOCs, with ultraviolet (UV) radiation being the most effective excitation source[2]. This study proposes a combined approach where UV light activates a photocatalyst to decompose TVOCs, while activated carbon adsorption further reduces concentrations to meet national emission standards (below 500 ppb). However, current UV lamp control relies on manual intervention, often leading to delayed activation or insufficient intensity, resulting in TVOC exceedances.To optimize UV lamp control, this paper introduces a PID (Proportional-Integral-Derivative) algorithm that automatically adjusts UV lamp intensity via variable resistance. However, traditional PID tuning methods depend on empirical manual adjustments, which are inefficient and may not adapt to varying environmental conditions. Moreover, as the system operates over time, UV lamp performance degradation reduces decomposition efficiency, causing unstable TVOC control and necessitating frequent manual recalibration.To address these limitations, this study employs the SSA (Sparrow Search Algorithm) for automatic PID parameter tuning, enabling adaptive and automated UV lamp control[3]. The SSA algorithm was selected based on its optimization capability, convergence speed, global search performance, and computational efficiency, ensuring robust and stable TVOC concentration management under dynamic conditions. 2. Theoretical Basis 2.1. PID Control Theory The PID controller, as a classic closed-loop control strategy, holds significant application value in the field of industrial control. It operates by comparing the error between the system's actual signal and the predefined target signal, then adjusts the control output through proportional (P), integral (I), and derivative (D) actions to achieve precise control of the target process[4]. The PID control flowchart is illustrated in Fig .1. 133 Figure 1. PID control basic flow chart In PID control, the proportional term (P) establishes a linear relationship between the output and the instantaneous error, thereby improving the system's response speed to deviations. The integral term (I) adjusts the output based on the accumulated error, effectively eliminating the steady-state error of the system. The derivative term (D) predicts the trend of the error by considering its rate of change, helping to reduce overshoot in the system.The mathematical expression of the PID is shown in Eq. 1: 0 ( ) ( ) ( ) ( ) t p i d de t u t K e t K e t dt K dt    (1) where e(t) represents the error between the setpoint and the actual value, while pK , iK , and dK denote the proportional, integral, and derivative coefficients, respectively. 2.2. SSA theory The Sparrow Search Algorithm (SSA) is an intelligent optimization algorithm inspired by the foraging behavior of sparrow populations, proposed by Xue and Shen in 2020[5]. SSA includes three roles: finder, follower, and watcher to achieve different behavior patterns. In SSA, discoverers typically constitute 20% of the population, while followers account for 80%. The transition between these roles is dynamic, depending on whether a sparrow demonstrates enhanced food-finding ability. The algorithmic model of SSA is illustrated in Fig. 2. Figure 2. Sparrow search algorithm model In the SSA algorithm, the information exchange, cooperation, and individual exploration among sparrows are simulated, continuously updating their positions to ultimately find the globally optimal fitness value, thereby solving the optimization problem. Each sparrow's position in the population represents a solution, and the more food at a position, the better the solution, i.e., the higher the fitness. Since the discoverers search for food for the sparrow input + ‐ Proportional adjustment Differential adjustments Integral adjustment Measuring cell Actuator output The search is wide Good adaptability Finder (20%) Followers (80%) Poor fitness Vigilant Solution space Search extensively Search near the finder Dynamic swapping of identities 134 population and provide foraging directions for the followers, the discoverers have a larger foraging range. During the iterative process of the algorithm, the position update function for the discoverers is given by Eq. 2. , 21 max, , 2 , , t i jt i j t i j i X exp R ST iterX X Q L R ST                (2) Where t represents the current iteration count; itermax is the maximum iteration count; α is a random number within the range (0,1]; Q is a random number following a normal distribution; L is a 1×d matrix where every element is 1; R2(R2∈[0,1]) is the warning value; and ST(ST∈[0.5,1]) is the safety threshold. When R2<ST, it indicates that the nearby area is safe, and the discoverers will conduct an extensive search.When R2 ≥ ST, it means there are predators in the vicinity, making the area unsafe, and all sparrows must immediately fly to a safe position. The followers have weaker foraging abilities but constantly observe the discoverers. When a discoverer finds more food, the followers will leave their current positions and follow the discoverer to forage. The function for the follower position update is shown in Eq. 3. , 21 , 1 1 , / 2 t t worst i j t i j t t t P i j P X X Q exp i n iX X X X A L else                     , , (3) Where Xp represents the current global best position of the discoverer; Xworst denotes the current global worst position; A is a 1×d matrix where each element is either 1 or -1; When i (n/2), it indicates that the followers with poorer fitness values in the population will fail to obtain food and must fly to positions with more food. It is assumed that scouts account for 20% of the population in the model. When the scouts detect a predator, the sparrow population's alarm mechanism will be triggered, as shown in Eq. 4.   , 1 , , , , , t t t best i j best i g t t t i j i j worstt i j i g i w X X X f f X X X X K f f f f                     (4) Where Xbest represents the position with the most food in the population; β is a random movement control parameter with a variance of 1 and a mean of 0; K(K∈[-1,1]) is the step- size control coefficient, indicating the direction of the sparrow's movement; fi denotes the fitness value of the i-th sparrow individual; fw represents the current global minimum fitness value; fg is the current global maximum fitness value; and ε is a minimal constant to prevent division by zero in the formula. When fi fg, it means the current sparrow is at the edge of the population, making it more vulnerable to predator attacks, so it needs to fly toward the center of the population. When fi = fg, it indicates that the scout sparrow has detected danger and must move closer to other individuals to reduce the risk of predation. The basic workflow of the SSA algorithm is illustrated in Fig. 3-6. Figure 3. Basic flow chart of SSA algorithm The Sparrow Search Algorithm (SSA) exhibits strong optimization capabilities and fast convergence speed. By employing the SSA, the optimal parameters Kp, Ki, and Kd in PID control can be quickly determined, thereby enabling precise regulation of ultraviolet lamp intensity and activation time to maintain TVOC concentration below the standard limit. 3. Determination of the Function 3.1. Control the model transfer function Transfer function modeling is a critical step in control system design, as it accurately characterizes the dynamic relationship between system inputs and outputs. In the UV- based TVOC concentration control system, the TVOC sensor monitors the ambient concentration in real time and compares it with the target value to generate an error signal. The PID controller then calculates and outputs corresponding UV intensity adjustment commands based on this error, enabling dynamic regulation of TVOC concentration[6]. The UV lamp control model is illustrated in Fig. 4. 开始 初始化种群和参数 预警机制更新部分个 体位置 跟新发现者和追随者 个体位置 计算种群适应度函数 更新适应度值,获取 更优位置 是否满足优化终止条件 输出最优[K,α] 结束 N Y Begin Initialize populations and parameters Calculate the fitness function Update the location of finders and tracers The early warning mechanism updates the individual location Update fitness values for better locations Whether the optimization termination conditions are met The output is optimal [K,α] End 135 Figure 4. UV lamp control model The intensity and activation duration of UV light directly influence the degradation rate of TVOCs. Given the oscillatory and delayed dynamic characteristics observed in the UV control system, The second-order differential equations shown in Eq. 5 are established to establish the transfer function to describe the dynamic behavior of the system. 2 2 2 ( ) ( ) 2 ( ) ( ) d C t dC t T T C t K I t dt dt     (5) Here, K represents the system gain, reflecting the static influence of UV intensity on TVOC concentration; T is the time constant, determining the system's response speed; ξ is the damping ratio, governing the system's oscillatory properties; C denotes TVOC concentration; and I(t) represents UV lamp intensity. The Laplace transform is performed on the above differential equations to obtain the frequency-domain equation as shown in Eq. 6. 2 2 ( ) 2 ( ) ( ) ( )T s C s TsC s C s K I s    (6) The transfer function as shown in Eq. 7 is obtained. 2 2 ( ) ( ) ( ) 2 1 C s K G s I s T s Ts     (7) To determine the parameters of the transfer function (K, ξ, T), it is essential to understand the mechanisms of TVOC gas volatilization and UV lamp-induced degradation. In this study, experiments on TVOC volatilization and degradation were conducted in a closed environment of a storage device. The volatilization conditions included a temperature range of 23– 25°C and a volatilization area of approximately 0.24 m².The TVOC concentration released from waste liquids (waste organic solutions and waste lubricating oil) was measured over 300 minutes after the liquids were introduced into the waste tank. Data was collected at a frequency of 1 minute per sample. The fitted trend of TVOC gas concentration released from the waste liquids is shown in Fig. 5. Figure 5. Trend of volatile TVOC gas concentration in waste liquid As shown in Fig. 5, the TVOC concentration increased from 47 ppb to 882 ppb over 300 minutes, with the growth Expectations R(s ) + - error E(s ) C(s) Controller output F(s ) Environmental interference D(s ) - + 2 2 2 1 K s s   TVOC Concentration C(s ) Ultraviolet lamp system PID controller 0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 0 100 200 300 400 500 600 700 800 900 T V O C c o n c e n t r a t i o n ( p p b ) Time(min) 136 rate gradually slowing down. This phenomenon occurs because organic gases inherently have a saturated vapor pressure—the higher the gas concentration, the lower its saturated vapor pressure, making further volatilization more difficult. Three UV lamp intensity levels—20 W/m³, 30 W/m³, and 50 W/m³—were used to degrade TVOC with an initial concentration of 600 ppb (while waste liquid volatilization continued). The fitted TVOC concentration curves under these conditions are presented in Fig. 6. Figure 6. Effect of three intensities of UV lamp on TVOC degradation As illustrated in Fig. 6, UV lamps with intensities of 20 W/m³, 30 W/m³, and 50 W/m³ reduced the TVOC concentration from 600 ppb to 226 ppb, 221 ppb, and 186 ppb, respectively, over 300 minutes. Lower UV intensities resulted in slower concentration reduction rates, with all rates eventually approaching zero. This occurs because as the concentration decreases, fewer molecules remain available for decomposition, slowing the degradation rate. Simultaneously, the reduced saturated vapor pressure of the waste liquid gradually increases its volatilization rate, ultimately leading to concentration stabilization. Using the experimental data, the functional relationship between input and output signals was fitted through system identification methods, with continuous refinement of the transfer function parameters. The derived transfer function for the UV control system is as follows: 2 33 ( ) 17 28 1 G s s s    (8) 3.2. Optimal solution fitness function The selection of the fitness function is a critical step in intelligent algorithms, as it determines the direction of optimal solution search and evaluates the quality of solutions for a given problem. Based on fitness values, the algorithm prioritizes solutions and allocates exploration opportunities. When designing a fitness function, optimization objectives and system constraints must be clearly defined. For the UV lamp-based TVOC concentration control system, the objective function should holistically consider control accuracy, energy consumption, and system stability to maintain TVOC levels as close as possible to the setpoint with minimal energy expenditure. In this study, control accuracy is quantified by the deviation between the measured TVOC concentration and the target value, as expressed in Eq. 9. 2 1 0 ( ( ) ) T setJ C t C dt  (9) Where C(t) represents the real-time TVOC concentration measured by the sensor, Cset is the target concentration value, and T denotes the control duration. Energy consumption is quantified by the total power usage of the UV lamp, as expressed in Eq. 10. 2 0 ( ) T J P t dt  (10) P(t) represents the UV lamp's power consumption, which is typically proportional to its intensity I(t). System stability is evaluated based on the fluctuation of control signals, primarily to prevent excessive variations in UV lamp intensity that could compromise its lifespan, as shown in Eq. 11. 2 3 0 ( ) ( ) T dI t J dt dt   (11) A weighted sum of control accuracy, energy consumption, and system stability is discretized to derive Eq. 12. 2 2 1 2 3 1 1 1 ( ) ( 1) ( ( ) ) ( ) N N N set k k k I k I k J w C k C w P k w t               (12) 0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 150 200 250 300 350 400 450 500 550 600 650 T V O C c o n c e n t r a t i o n ( p p b ) Time(min) I1=20 W/m 3 I2=30 W/m 3 I3=50 W/m 3 137 where w₁, w₂, and w₃ are the weighting coefficients for control accuracy, energy consumption, and system stability, respectively; N is the number of time steps; and Δt is the time step size. 4. Experimental Results The SSA algorithm is employed to automatically optimize the PID control parameters for UV lamp intensity. In the SSA configuration, the population size is set to 50 sparrows, with a maximum iteration count of 100. The discoverers account for 20% of the total population, followers make up 80%, and scouts constitute 20% to prevent the system from converging to local optima. In this study, a unit step input signal is used to simulate scenarios where TVOC concentration rapidly increases from zero, thereby testing the PID controller's performance. The objective is to maintain TVOC concentration around 500 ppb while minimizing UV lamp energy consumption. The simulation results for the unit step response are presented in Fig. 7, 8. Figure 7. Convergence plot of unit step input signal response Figure 8. TVOC concentration control chart of unit step input signal As shown in Fig. 7, the fitness value progressively approaches the optimal solution with increasing iterations. When the iteration count reaches 13, the algorithm achieves the optimal fitness value of 534,341, and the fitness curve begins to converge, demonstrating the SSA algorithm's rapid convergence speed. The optimized PID control parameters obtained are Kp=0.36179,Ki=0.022452,Kd=0.39605. After applying these parameters to the PID-based concentration control system, the TVOC concentration control simulation results are illustrated in Fig. 8. When the concentration rapidly exceeds 500 ppb and continues to rise at a certain rate, it stabilizes within 40 minutes. The minor fluctuations in the actual concentration are attributed to the 1-minute sampling frequency and the inherent response delay of UV lamps in reducing the concentration. These results confirm the effectiveness of the SSA-optimized PID parameters in controlling TVOC concentration. 5. Summary This study addresses the TVOC concentration control problem in hazardous waste storage equipment by designing an SSA-optimized PID control system. Through theoretical analysis, algorithmic optimization, and experimental validation, the following conclusions are drawn.The SSA- optimized PID parameters demonstrate rapid convergence, completing step response parameter optimization within 13 iterations and sinusoidal response optimization within 18 138 iterations - showing significant efficiency improvement over traditional manual tuning. The optimized PID parameters enable TVOC concentration to stabilize at the target value of 500 ppb within 40 minutes, proving the UV lamp control system's strong adaptability to different control states. References [1] Palmisani J, Di Gilio A, Viana M, et al. Indoor air quality evaluation in oncology units at two European hospitals: Low- cost sensors for TVOCs, PM2.5 and CO2 real-time monitoring[J/OL]. Building and Environment, 2021, 205: 108237. https://doi.org/10.1016/j.buildenv.2021.108237 [2] Kang Y, Jo H H, Kim S. Effects of UV degradation on building materials with emphasis on microplastic generation potential[J/OL]. Journal of Hazardous Materials, 2025, 483: 136521. https://doi.org/10.1016/j.jhazmat.2024.136521 [3] Zhang Y, Wang X, Qian X, et al. Research on load frequency control of new power system based on improved sparrow search algorithm[J/OL]. Measurement: Sensors, 2024: 101432. https://doi.org/10.1016/j.measen.2024.101432 [4] Cantera-Cantera L A, Maya-Rodríguez M C, Palomino- Resendiz S I, et al. Level and flow systems identification of an industrial processes module by LSOD method for PID controllers design[J/OL]. Results in Engineering, 2025, 25: 104347. https://doi.org/10.1016/j.rineng.2025.104347 [5] Xue J, Shen B. A novel swarm intelligence optimization approach: sparrow search algorithm[J/OL]. Systems Science & Control Engineering, 2020, 8(1): 22-34. https://doi.org/10.1080/21642583.2019.1708830 [6] Parsa Z, Dhib R, Mehrvar M. Multi-Loop PID Controller Design for PVA Degradation in a Tubular UV/H2O2 Photoreactor[J/OL]. IFAC-PapersOnLine, 2024, 58(14): 736- 741. https://doi.org/10.1016/j.ifacol.2024.08.425