Control method of highway tunnel ventilation system based on wind speed
By using data acquisition technology, intelligent algorithms and optimization control strategies in the highway tunnel ventilation system, dynamically adjusting the ventilation mode and equipment parameters, the problem of low ventilation efficiency in traditional systems is solved, and more efficient and energy-saving ventilation control is achieved.
Patent Information
- Application Number
- CN202411761821.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-21
AI Technical Summary
Traditional highway tunnel ventilation systems cannot flexibly adjust the ventilation mode according to real-time conditions, resulting in low ventilation efficiency, waste of energy consumption and inability to meet actual ventilation needs.
Advanced data acquisition technology, intelligent algorithms and optimized control strategies are adopted, including wind speed data collection, traffic flow detection, ventilation demand assessment, ventilation mode selection, PID controller adjustment and analog annealing algorithm optimization, to dynamically adjust the ventilation opening and fan speed.
It improves the control accuracy and efficiency of the ventilation system, reduces energy consumption, meets actual ventilation needs, and improves the scientific nature of the ventilation port layout and opening and closing time through intelligent optimization algorithms.
Smart Images

Figure CN119664413A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of tunnel ventilation control, and in particular relates to a control method for a highway tunnel ventilation system based on wind speed. Background Art
[0002] In highway tunnel ventilation systems, how to effectively control ventilation to ensure air quality and safety in the tunnel is an important issue. In the existing technology, fixed ventilation modes or simple control strategies are usually adopted, which cannot be flexibly adjusted according to actual conditions, resulting in problems such as low ventilation efficiency and energy waste.
[0003] Traditional ventilation systems often adopt fixed ventilation modes and cannot be flexibly adjusted according to real-time conditions. For example, regardless of the actual demand in the tunnel, the ventilation system operates in a constant manner, resulting in insufficient ventilation in some cases and excessive ventilation in other cases, resulting in energy waste. Traditional ventilation systems use simple control strategies, such as controlling the operation of ventilation equipment according to preset schedules or empirical values. This method cannot accurately respond to changes in the environment and traffic flow in the tunnel and cannot meet the actual ventilation needs. For the determination of vent layout and opening and closing time, traditional methods usually lack scientific optimization algorithms and mainly rely on experience or simple rules, resulting in low ventilation efficiency. Due to the inability to reasonably select ventilation modes and adjust fan operating parameters according to actual conditions, traditional ventilation systems often have high energy consumption and increase operating costs.
[0004] In summary, traditional solutions have obvious deficiencies in ventilation control accuracy, intelligent optimization and energy-saving effects, and cannot meet the requirements of modern highway tunnel ventilation systems. Summary of the invention
[0005] In view of the above deficiencies in the prior art, the purpose of the present invention is to solve the deficiencies in the prior art and improve the performance and efficiency of the ventilation system by adopting advanced data acquisition technology, intelligent algorithms and optimized control strategies.
[0006] In order to achieve the above objectives, the present invention adopts the following technical solutions:
[0007] A control method for a highway tunnel ventilation system based on wind speed comprises the following steps:
[0008] S1. Wind speed data collection and environmental parameter monitoring: sensors are placed at key locations in the tunnel to collect wind speed signals and environmental parameters;
[0009] S2. Traffic flow detection: use video equipment to obtain the video stream in the tunnel, use the OpenCV library to track the position and movement trajectory of vehicles in real time, train the SVM model based on the obtained real-time position and movement trajectory data of vehicles, and identify and count vehicles;
[0010] S3. Ventilation demand assessment, using the collected wind speed data and environmental parameters to define a comprehensive assessment function, and calculating the ventilation demand through the defined comprehensive assessment function;
[0011] S4. Ventilation mode selection: according to the ventilation demand assessment result obtained in step S3, set the wind speed threshold, monitor the real-time wind speed in the tunnel in real time, and select the ventilation mode according to the result of comparing the real-time wind speed value with the wind speed threshold;
[0012] S5. According to the ventilation mode selected in step S4, the PID controller is used to adjust the vent opening and the fan speed to ensure that the ventilation system can meet the actual ventilation needs;
[0013] S6. Optimize ventilation efficiency. Use CFD software to simulate the air flow in the tunnel, obtain the air flow velocity field and pressure field, and optimize the vent layout and opening and closing time through simulated annealing algorithm.
[0014] Furthermore, in step S2, the steps of using the OpenCV library to perform background subtraction and vehicle detection and tracking on the video stream include:
[0015] S211. Initialization, obtaining the first frame image from the video stream and using it as the initial background model;
[0016] S212. Continuous frame analysis: compare each remaining frame image in the video stream with the initial background model to obtain a foreground mask; the formula is:
[0017] F(t)=|I(t)-B(t-1)|;
[0018] F(t) represents the foreground mask at time t; B(t-1) is the background model of the previous frame, and I(t) is the current frame image; || represents the pixel-by-pixel absolute difference operation, which is used to highlight the difference between the current frame and the background model;
[0019] S213. Morphological operations, using dilation and erosion operations to improve the connectivity and shape of the foreground mask;
[0020] The purpose of the dilation operation is to increase the boundaries of foreground objects, fill small holes, and connect neighboring objects. The formula is expressed as:
[0021] F d (t) = f d (F(t),k e);
[0022] F(t) is the foreground mask at time t; F d (t) dilated foreground mask; f d is the dilation operation function; k e Structural elements, which define the scope and shape of the dilation operation;
[0023] The purpose of the erosion operation is to reduce the boundaries of foreground objects, remove small objects or noise, and disconnect neighboring objects; the formula is expressed as:
[0024] F e (t) = f e (F d (t),k e );
[0025] F e (t) Foreground mask after erosion; F d (t) is the dilated foreground mask; f e is the corrosion operation function;
[0026] S214. Contour detection, identifying vehicles by finding contours in the foreground mask. The contour detection algorithm starts from the eroded foreground mask and looks for connected white pixel areas. Each white pixel area is considered to be a contour and is recorded in the contour list. These contours represent the boundaries of the vehicles in the image. The formula is expressed as:
[0027] C = f c (F e (t));
[0028] F e (t) is the foreground mask after erosion; C is the list of detected contours, each contour is a group of pixels; f c is the contour detection function, f c The output is a list of contours, where each contour is a set of points that define the boundary of the object; in practical image processing applications, f c Returns two values, which are a list of contours and their hierarchy. The hierarchy represents the parent-child relationship between contours, which helps to distinguish inner contours from outer contours.
[0029] S215. Background model update: update the background model to adapt to scene changes. The formula is:
[0030] B(t)=α·B(t-1)+(1-α)·I(t);
[0031] B(t) is the background model of the current frame; α is the background update rate, which is a small positive number used to control the speed of background update.
[0032] Furthermore, in step S3, the steps of training the SVM model using the real-time position and motion trajectory data of the vehicle to identify and count the vehicle include:
[0033] S221. Extracting features that are helpful for SVM classification from the data after background subtraction and vehicle detection and tracking processing. These features may include the shape, size, color, texture, etc. of the vehicle;
[0034] S222. Label the corresponding vehicle category label for the feature data extracted in step S221,
[0035] S223. Use the extracted features and the corresponding vehicle category labels to train the SVM model, and the formula is expressed as:
[0036]
[0037] Where ω is the weight vector; b is the bias term; P is the regularization parameter; x i is the feature vector of the i-th sample; y i is the label of the i-th sample;
[0038] S224. Vehicle recognition: Use the trained SVM model to classify the foreground in each frame image and identify the vehicle. Input the foreground features in each frame image into the SVM model, and the model will output a predicted vehicle category label.
[0039] S225. Vehicle counting, vehicle counting method:
[0040] Assign a unique ID to each detected vehicle. When a new vehicle is detected, assign it a unique ID. This ID can be an integer to identify the uniqueness of each vehicle.
[0041] The tracking algorithm is used to determine the position change of the vehicle in the continuous frames, so as to realize the continuous tracking of the vehicle;
[0042] Vehicle count, calculated as:
[0043]
[0044] The formula is explained as follows: In the process of tracking vehicles, every time a new vehicle is detected, its ID is added to the count; by assigning an ID to each vehicle and accumulating these IDs, it is ensured that even if the position of the vehicle changes in consecutive frames, each vehicle is only counted once, thereby obtaining an accurate number of vehicles.
[0045] Furthermore, in step S3, the comprehensive evaluation function is defined as:
[0046] D=λ1·T+λ2·H+λ3·C+λ4·V+λ5·Q;
[0047] Among them, V is wind speed; T is temperature; H is humidity; C is CO2 concentration; Q is traffic flow, Q is the number of vehicles N passing through a specific location, and the number N is the traffic flow in the time window; λ1, λ2, λ3, λ4, λ5 are the weights of each factor, which are allocated according to the importance of each factor;
[0048] Furthermore, in step S3, the method for calculating the ventilation demand by the defined comprehensive evaluation function is: substituting the environmental parameter data collected in step S1 into the comprehensive evaluation function to calculate the ventilation demand, and the formula is expressed as:
[0049] D′=λ1·T0+λ2·H0+λ3·C0+λ4·V0+λ5·Q0;
[0050] Among them, D′ calculates the ventilation demand through the defined comprehensive evaluation function; V0 is the current wind speed; T0 is the current temperature; H0 is the current temperature; C0 is the current CO2 concentration; Q0 is the traffic flow, Q0 is the traffic flow in the current time window; the weight of each factor is allocated according to the importance of each factor.
[0051] Furthermore, in step S4, the method of selecting the ventilation mode according to the result of comparing the real-time wind speed value with the wind speed threshold is: if the real-time wind speed V s Greater than the wind speed threshold V th , that is, V s >V th , it is considered that natural ventilation is sufficient to meet the ventilation needs in the tunnel, and the natural ventilation mode is selected; if the real-time wind speed Vs is less than or equal to the wind speed threshold V th , that is, V s ≤V th , it is considered that natural ventilation is not enough to meet the ventilation needs in the tunnel, and mechanical ventilation mode or other auxiliary ventilation methods are selected to supplement ventilation.
[0052] Furthermore, the wind speed threshold is determined based on factors such as tunnel design requirements, geographical environment and climatic conditions.
[0053] Furthermore, the method of using the PID controller to adjust the vent opening is:
[0054] S511. The PID controller adjusts the vent opening according to the wind speed difference. The output of the PID controller is the adjustment amount of the vent opening, which is expressed as:
[0055]
[0056] ΔV=V s-V;
[0057] In the formula, K p is the proportionality coefficient; K i is the integral coefficient; K d is the differential coefficient; t represents the current time point; τ is the integral variable in the integral term, starting from 0 and integrating to the current time t;
[0058] K p ΔV is a proportional term; The cumulative effect of wind speed differences over time is considered;
[0059] Predict rapid changes in wind speed difference; ΔV is the wind speed difference; V s To set the wind speed, V s is determined based on the results of the ventilation demand assessment in step S4 and the specific design standards of the tunnel, V s Able to meet ventilation needs under the most adverse conditions.
[0060] S512. Apply the vent opening adjustment amount determined in step S511 to the vent, change the vent opening, and thus adjust the natural ventilation volume so that the air circulation in the tunnel achieves the expected effect.
[0061] Furthermore, the method of using the PID controller to adjust the fan speed is:
[0062] S521.PID controller adjusts the fan speed according to the difference between the ventilation demand and the actual ventilation volume. The adjustment amount of the vent opening is expressed as:
[0063]
[0064] ΔD=D′-D 实际 ;
[0065] K′ p is the proportional coefficient, which is used to make an immediate response adjustment to the error signal. When the error increases, the proportional coefficient will increase the adjustment amount of the controller output, so that the fan speed changes faster in the direction of reducing the error.
[0066] K′ i is the integral coefficient; K′ d is the differential coefficient, ΔD is the difference between the ventilation demand and the actual ventilation volume, D 实际 It is measured by sensors or measuring devices installed in the ventilation system; D is the ventilation demand calculated according to the evaluation function;
[0067] S522. Apply the fan speed adjustment determined in step S521 to the fan to increase or decrease the mechanical ventilation volume to meet the ventilation demand.
[0068] Furthermore, the step of optimizing the vent layout and opening and closing time by using a simulated annealing algorithm includes:
[0069] S61. Define the objective function. The objective function f is expressed as:
[0070] f = α∫ V ||V(x,y,z)|| 2 dV+β∫ V ||P(x,y,z)|| 2 dP+γg;
[0071] g=ΔD 2 +ω1(V e -V s ) 2 +ω2(V ex -V s ) 2 +ω3||δ|| 2 +ω4||v|| 2 +ω5||h|| 2 ;
[0072] h=(TT d ) 2 +(CC d ) 2 +(QQ d ) 2 ;
[0073] In the formula, V(x, y, z) is the air flow velocity field obtained by simulation calculation using CFD software; P(x, y, z) is the pressure field obtained by simulation calculation using CFD software; α, β and γ weight coefficients are used to balance the contribution of velocity field, pressure field and other factors; V e and V ex are the wind speeds at the inlet and outlet respectively; T, C and Q are the temperature, CO2 concentration and traffic flow respectively; ΔD is the difference between the ventilation demand and the actual ventilation; δ is the adjustment of the vent opening; v is the adjustment of the fan speed; T d ,C d and Q d are the expected temperature, CO2 concentration and traffic flow respectively; ω1 to ω5 are weight coefficients;
[0074] S62. Initialize parameters, set the initial temperature, cooling rate, number of iterations and other parameters; the initial temperature should be high enough to ensure a large search range in the early stage of the algorithm, and the cooling rate should be controlled between 0.8 and 0.99;
[0075] S63. randomly generate an initial solution, randomly generate a set of vent layout and opening and closing time combinations as the initial solution;
[0076] S64. Iterative optimization, for the current solution S i , generate a neighborhood solution S j The neighborhood solution is obtained by making small adjustments to the vent layout, opening and closing time, vent opening adjustment or fan speed adjustment; the change in the objective function value is calculated, Δf = f(S i )-f(S j ); if Δf<0, accept the neighborhood solution S j as the new current solution; otherwise, with probability p = e-Δf / T i Accept the neighborhood solution, where T i is the current temperature;
[0077] Lower the temperature, T i+1 =η T T i ;
[0078] Repeat the above steps until the number of iterations is reached or other termination conditions are met.
[0079] Output the optimal solution: After multiple iterations, the solution with the smallest objective function value is output as the optimal combination of vent layout and opening and closing time.
[0080] In summary, due to the adoption of the above technical solution, the beneficial technical effects of the invention are:
[0081] The definition and use of the comprehensive evaluation function fully considers factors such as wind speed, temperature, CO2 concentration and traffic flow, and can more accurately evaluate ventilation needs, thereby selecting the appropriate ventilation mode and adjusting the operating parameters of the ventilation equipment, thereby improving the accuracy of ventilation control.
[0082] The simulated annealing algorithm is used to optimize the layout and opening and closing time of the vents, avoiding the shortcomings of traditional methods that rely on experience or simple rules. The simulated annealing algorithm can find the optimal solution in the search space, improve ventilation efficiency, and make the operation of the ventilation system more intelligent and optimized.
[0083] The generation and iterative optimization process of neighborhood solutions can make small adjustments to the vent layout, opening and closing time, vent opening adjustment or fan speed adjustment, so as to gradually find the optimal combination. This intelligent optimization method can maximize ventilation efficiency while minimizing energy consumption and cost.
[0084] Select the appropriate ventilation mode based on the ventilation demand assessment results. When the real-time wind speed is greater than the wind speed threshold, select the natural ventilation mode to make full use of natural wind to meet the ventilation needs, reduce the use of mechanical ventilation, and thus reduce energy consumption.
[0085] The application of PID controller can adjust the opening of the vent according to the wind speed difference, and adjust the fan speed according to the difference between the ventilation demand and the actual ventilation volume, thus realizing the precise control of the ventilation system and avoiding energy waste. By reasonably adjusting the opening of the vent and the fan speed, the ventilation system can minimize energy consumption and enhance energy-saving effect while meeting the ventilation demand.
[0086] In summary, the present invention effectively solves the shortcomings of traditional ventilation systems in terms of ventilation control accuracy, intelligent optimization and energy-saving effects by adopting advanced data acquisition technology, intelligent algorithms and optimized control strategies, thereby improving the performance and efficiency of the ventilation system. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 A flow chart of a control method for a highway tunnel ventilation system based on wind speed;
[0088] Figure 2 A flowchart of a method for background subtraction and vehicle detection and tracking of a video stream using the OpenCV library;
[0089] Figure 3 A flow chart of a method for identifying and counting vehicles using real-time location and motion trajectory data of vehicles to train an SVM model;
[0090] Figure 4 A flow chart of a method for adjusting the opening of a vent using a PID controller;
[0091] Figure 5 A flow chart of a method for adjusting fan speed using a PID controller;
[0092] Figure 6 Flowchart of the method for optimizing vent layout and opening and closing time using simulated annealing algorithm. DETAILED DESCRIPTION
[0093] In order to make the purpose, technical solution and advantages of the invention more clear, the invention is further described in detail below in combination with the embodiments. It should be understood that the specific embodiments described here are only used to explain the invention and are not used to limit the invention.
[0094] like Figure 1 As shown, a control method for a highway tunnel ventilation system based on wind speed comprises the following steps:
[0095] S1. Wind speed data collection: wind speed sensors are placed at key locations in the tunnel. The signals output by the wind speed sensors are transmitted to the Modbus adapter via the CAN bus. The adapter converts the CAN bus data into Modbus TCP / IP data packets and transmits them to the central monitoring system via Ethernet.
[0096] Environmental parameter monitoring: Use temperature, humidity and CO2 concentration sensors to collect environmental parameters, and use the SQLAlchemyORM tool to map environmental parameters (such as temperature, humidity, CO2 concentration) into database models and store them in MongoDB;
[0097] S2. Traffic flow detection: use video equipment to obtain the video stream in the tunnel, use the OpenCV library to perform background subtraction and vehicle detection and tracking on the video stream, and track the position and movement trajectory of the vehicle in real time; use the real-time position and movement trajectory data of the vehicle to train the SVM (support vector machine) model, and use the trained SVM model to identify and count vehicles;
[0098] like Figure 2 As shown, in step S2, the method of using the OpenCV library to perform background subtraction and vehicle detection and tracking on the video stream includes:
[0099] S211. Initialization, obtaining the first frame image from the video stream and using it as the initial background model;
[0100] S212. Continuous frame analysis: compare each remaining frame image in the video stream with the initial background model to obtain a foreground mask; the formula is:
[0101] F(t)=|I(t)-B(t-1)|;
[0102] F(t) represents the foreground mask at time t; B(t-1) is the background model of the previous frame, and I(t) is the current frame image; || represents the pixel-by-pixel absolute difference operation, which is used to highlight the difference between the current frame and the background model;
[0103] S213. Morphological operations, using dilation and erosion operations to improve the connectivity and shape of the foreground mask;
[0104] The purpose of the dilation operation is to increase the boundaries of foreground objects, fill small holes, and connect neighboring objects. This is achieved by using a small matrix called a "structural element" or "kernel". The kernel of the dilation operation is usually a two-dimensional matrix, for example, a 3x3 rectangular or cross-shaped kernel; the dilation operation is performed by placing the center of the kernel on each pixel of the foreground mask and checking whether the kernel completely covers the foreground pixel. If so, the corresponding pixel at the center of the kernel is set as the foreground in the dilated mask; the formula is expressed as:
[0105] F d (t) = f d (F(t),k e );
[0106] F(t) is the foreground mask at time t; Fd (t) dilated foreground mask; f d is the dilation operation function; k e Structural elements, which define the scope and shape of the dilation operation;
[0107] The purpose of the erosion operation is to reduce the boundaries of foreground objects, remove small objects or noise, and disconnect neighboring objects; the erosion operation is performed by placing the center of the kernel on each pixel of the foreground mask and checking whether the kernel completely covers the foreground pixel; only when the kernel completely covers the foreground pixel, the corresponding pixel of the kernel center is kept as the foreground in the eroded mask; the formula is expressed as:
[0108] F e (t) = f e (F d (t),k e );
[0109] F e (t) Foreground mask after erosion; F d (t) is the dilated foreground mask; f e is the corrosion operation function;
[0110] S214. Contour detection, identifying vehicles by finding contours in the foreground mask. The contour detection algorithm starts from the eroded foreground mask and looks for connected white pixel areas. Each white pixel area is considered to be a contour and is recorded in the contour list. These contours represent the boundaries of the vehicles in the image. The formula is expressed as:
[0111] C = f c (F e (t));
[0112] F e (t) is the foreground mask after erosion; C is the list of detected contours, each contour is a group of pixels; f c is the contour detection function, f c The output is a list of contours, where each contour is a set of points that define the boundaries of the object. In practical image processing applications, f c Returns two values, which include a list of contours and their hierarchy. The hierarchy represents the parent-child relationship between contours and helps distinguish inner and outer contours.
[0113] S215. Background model update: update the background model to adapt to scene changes. The formula is:
[0114] B(t)=α·B(t-1)+(1-α)·I(t);
[0115] B(t) is the background model of the current frame; α is the background update rate, which is a small positive number (such as 0.01 or 0.05) used to control the speed of background update.
[0116] like Figure 3 As shown, in step S2, the method of using the real-time position and motion trajectory data of the vehicle to train the SVM model to identify and count the vehicle includes:
[0117] S221. Extracting features that are helpful for SVM classification from the data after background subtraction and vehicle detection and tracking processing. These features may include the shape, size, color, texture, etc. of the vehicle;
[0118] S222. Label the corresponding vehicle category label for the feature data extracted in step S221,
[0119] S223. Use the extracted features and the corresponding vehicle category labels to train the SVM model, and the formula is expressed as:
[0120]
[0121] Where ω is the weight vector; b is the bias term; P is the regularization parameter; x i is the feature vector of the i-th sample; y i is the label of the i-th sample;
[0122] S224. Vehicle recognition: Use the trained SVM model to classify the foreground in each frame image and identify the vehicle. Input the foreground features in each frame image into the SVM model, and the model will output a predicted vehicle category label.
[0123] The SVM model actually judges the input foreground features, classifies them into the corresponding vehicle categories based on the similarity or difference between the features and different vehicle categories, and outputs the corresponding labels. Specifically, the SVM model determines which vehicle category the foreground belongs to by calculating the relative position relationship between the input features and the decision boundary. If the input feature is on one side of the decision boundary, it is classified as the vehicle category corresponding to that side.
[0124] S225. Vehicle counting, vehicle counting method:
[0125] Assign a unique ID to each detected vehicle. When a new vehicle is detected, assign it a unique ID. This ID can be an integer to identify the uniqueness of each vehicle.
[0126] The tracking algorithm is used to determine the position change of the vehicle in the continuous frames, so as to realize the continuous tracking of the vehicle;
[0127] Vehicle count, calculated as:
[0128] The calculation formula is:
[0129]
[0130] The formula is explained as follows: In the process of tracking vehicles, every time a new vehicle is detected, its ID is added to the count; by assigning an ID to each vehicle and accumulating these IDs, it is ensured that even if the position of the vehicle changes in consecutive frames, each vehicle is only counted once, thereby obtaining an accurate number of vehicles.
[0131] S3. Ventilation demand assessment, using the collected wind speed data and environmental parameters to define a comprehensive assessment function, and calculating the ventilation demand through the defined comprehensive assessment function;
[0132] In step S3, the comprehensive evaluation function is defined as:
[0133] D=λ1·T+λ2·H+λ3·C+λ4·V+λ5·Q
[0134] Among them, V is wind speed; T is temperature; H is temperature; C is CO2 concentration; Q is traffic flow, Q is the number of vehicles N passing through a specific location, and the number N is the traffic flow within the time window; λ1, λ2, λ3, λ4, λ5 are the weights of each factor, which are allocated according to the importance of each factor.
[0135] The formula for calculating ventilation demand through the defined comprehensive evaluation function is expressed as:
[0136] D′=λ1·T0+λ2·H0+λ3·C0+λ4·V0+λ5·Q0;
[0137] Among them, D′ calculates the ventilation demand through the defined comprehensive evaluation function; V0 is the current wind speed; T0 is the current temperature; H0 is the current temperature; C0 is the current CO2 concentration; Q0 is the traffic flow, Q0 is the traffic flow in the current time window; the weight of each factor is allocated according to the importance of each factor.
[0138] S4. Ventilation mode selection: according to the ventilation demand assessment result obtained in step S3, set the wind speed threshold and monitor the real-time wind speed V in the tunnel in real time. s , the real-time wind speed V s With wind speed threshold V th Performing comparison and selecting a ventilation mode according to the comparison result;
[0139] In step S4, if the real-time wind speed V s Greater than the wind speed threshold V th , that is, V s >V th, it is considered that natural ventilation is sufficient to meet the ventilation needs in the tunnel, and the natural ventilation mode is selected; if the real-time wind speed V s Less than or equal to wind speed threshold V th , that is, V s ≤V th , it is considered that natural ventilation is insufficient to meet the ventilation needs in the tunnel, and mechanical ventilation mode or other auxiliary ventilation methods are selected to supplement ventilation;
[0140] The threshold is determined based on factors such as tunnel design requirements, geographical environment and climatic conditions.
[0141] S5. According to the ventilation mode selected in step S4, the PID controller is used to adjust the vent opening and the fan speed to ensure that the ventilation system can meet the actual ventilation needs;
[0142] like Figure 4 As shown, the method of using the PID controller to adjust the vent opening is:
[0143] S511. The PID controller adjusts the vent opening according to the wind speed difference. The output of the PID controller is the adjustment amount of the vent opening, which is expressed as:
[0144]
[0145] ΔV=V s -V;
[0146] In the formula, K p is the proportionality coefficient, used to quickly respond to changes in wind speed difference; K i K is the integral coefficient, which is used to accumulate past errors and help eliminate steady-state errors. d is the differential coefficient, which is used to predict the changing trend of wind speed and adjust the vent opening in advance; t represents the current time point; τ is the integral variable in the integral term, starting from 0 and integrating to the current time t;
[0147] K p ·ΔV is a proportional term, which directly adjusts the vent opening according to the current wind speed difference. The greater the wind speed difference, the greater the adjustment amount;
[0148] The cumulative effect of wind speed difference over time is taken into account, which helps to eliminate the steady-state error of the system;
[0149] Predict rapid changes in wind speed differences, provide advance control, and reduce system overshoot;
[0150] ΔV is the wind speed difference; V s To set the wind speed, V sis determined based on the results of the ventilation demand assessment in step S4 and the specific design standards of the tunnel, V s Able to meet ventilation needs under the most adverse conditions (e.g., when traffic volume is heaviest and pollutant concentration is highest).
[0151] S512. Apply the vent opening adjustment amount determined in step S511 to the vent, change the vent opening, and thus adjust the natural ventilation volume so that the air circulation in the tunnel achieves the expected effect.
[0152] like Figure 5 As shown, the method of using the PID controller to adjust the fan speed is:
[0153] S521.PID controller adjusts the fan speed according to the difference between the ventilation demand and the actual ventilation volume. The adjustment amount of the vent opening is expressed as:
[0154]
[0155] ΔD=D′-D 实际 ;
[0156] K′ p is the proportional coefficient, which is used to make an immediate response adjustment to the error signal. When the error increases, the proportional coefficient will increase the adjustment amount of the controller output, so that the fan speed changes faster in the direction of reducing the error.
[0157] K′ i is the integral coefficient, which is used to eliminate steady-state errors. The integral term integrates the error signal over time. As time goes by, the effect of the integral term gradually increases until the error is eliminated. This ensures that the system can reach a stable state after long-term operation without persistent errors.
[0158] K′ d is the differential coefficient, which is used to predict the changing trend of the error. The differential term will adjust the output of the controller according to the changing rate of the error signal. When the changing rate of the error signal increases, the differential term will increase the adjustment amount of the controller output, so that the fan speed can be adjusted in advance to avoid further increase of the error.
[0159] ΔD is the difference between the ventilation demand and the actual ventilation volume, D 实际 It is measured by sensors or measuring devices installed in the ventilation system; D′ is the ventilation demand calculated according to the evaluation function;
[0160] S522. Apply the fan speed adjustment determined in step S521 to the fan, thereby increasing or decreasing the mechanical ventilation volume to meet the ventilation demand.
[0161] S6. Optimize ventilation efficiency. Use CFD software to simulate the air flow in the tunnel, obtain the air flow velocity field and pressure field, and optimize the vent layout and opening and closing time through simulated annealing algorithm.
[0162] like Figure 6 As shown, the steps of optimizing the vent layout and opening and closing time by simulated annealing algorithm include:
[0163] S61. Define the objective function. The objective function f is expressed as:
[0164] f = α∫ V ||V(x,y,z)|| 2 dV+β∫ V ||P(x,y,z)|| 2 dP+γg;
[0165] g=ΔD 2 +ω1(V e -V s ) 2 +ω2(V ex -V s ) 2 +ω3||δ|| 2 +ω4||v|| 2 +ω5||h|| 2 ;
[0166] h=(TT d ) 2 +(CC d ) 2 +(QQ d ) 2 ;
[0167] In the formula, V(x, y, z) is the air flow velocity field obtained by simulation calculation using CFD software; P(x, y, z) is the pressure field obtained by simulation calculation using CFD software; α, β and γ weight coefficients are used to balance the contribution of velocity field, pressure field and other factors; V e and V ex are the wind speeds at the inlet and outlet respectively; T, C and Q are the temperature, CO2 concentration and traffic flow respectively; ΔD is the difference between the ventilation demand and the actual ventilation; δ is the adjustment of the vent opening; v is the adjustment of the fan speed; T d ,C d and Q d are the expected temperature, CO2 concentration and traffic flow respectively; ω1 to ω5 are weight coefficients;
[0168] S62. Initialize parameters, set the initial temperature, cooling rate, number of iterations and other parameters; the initial temperature should be high enough to ensure a large search range in the early stage of the algorithm, and the cooling rate should be controlled between 0.8 and 0.99;
[0169] S63. randomly generate an initial solution, randomly generate a set of vent layout and opening and closing time combinations as the initial solution;
[0170] S64. Iterative optimization, for the current solution S i , generate a neighborhood solution S j The neighborhood solution is obtained by making slight adjustments to the vent layout, opening and closing time, vent opening adjustment or fan speed adjustment; for example, if the current solution is a specific vent layout and opening and closing time combination, then the neighborhood solution can be obtained by slightly changing the opening and closing time of one or several vents, or fine-tuning the position of the vents; the generation of neighborhood solutions is usually random, but it will be limited to a certain range to ensure that the changes are small.
[0171] Calculate the change in the objective function value, Δf = f(S i )-f(S j ); if Δf<0, accept the neighborhood solution S j as the new current solution; otherwise, with probability p = e-Δf / T i Accept the neighborhood solution, where T i is the current temperature;
[0172] Lower the temperature, T i+1 =η T T i ;
[0173] Repeat the above steps until the number of iterations is reached or other termination conditions are met.
[0174] Output the optimal solution: After multiple iterations, the solution with the minimum objective function value is output as the optimal combination of vent layout and opening and closing time. This solution should maximize ventilation efficiency while minimizing energy consumption and cost.
[0175] The above description is a preferred embodiment of the invention and is not intended to limit the invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the invention should be included in the protection scope of the invention.
Claims
1. A control method for a highway tunnel ventilation system based on wind speed, characterized in that: The following steps are involved: A control method for a highway tunnel ventilation system based on wind speed comprises the following steps: S1. Wind speed data collection and environmental parameter monitoring: sensors are placed at key locations in the tunnel to collect wind speed signals and environmental parameters; S2. Traffic flow detection: use video equipment to obtain the video stream in the tunnel, use the OpenCV library to track the position and movement trajectory of vehicles in real time, train the SVM model based on the obtained real-time position and movement trajectory data of vehicles, and identify and count vehicles; S3. Ventilation demand assessment, using the collected wind speed data and environmental parameters to define a comprehensive assessment function, and calculating the ventilation demand through the defined comprehensive assessment function; S4. Ventilation mode selection: according to the ventilation demand assessment result obtained in step S3, set the wind speed threshold, monitor the real-time wind speed in the tunnel in real time, and select the ventilation mode according to the result of comparing the real-time wind speed value with the wind speed threshold; S5. According to the ventilation mode selected in step S4, use the PID controller to adjust the vent opening and adjust the fan speed; S6. Optimize ventilation efficiency. Use CFD software to simulate the air flow in the tunnel, obtain the air flow velocity field and pressure field, and optimize the vent layout and opening and closing time through simulated annealing algorithm.
2. A method for controlling a highway tunnel ventilation system based on wind speed according to claim 1, characterized in that: In step S2, the method of using the OpenCV library to track the position and motion trajectory of the vehicle in real time includes: S211. Initialization, obtaining the first frame image from the video stream and using it as the initial background model; S212. Continuous frame analysis: compare each remaining frame image in the video stream with the initial background model to obtain a foreground mask; the formula is: F(t)=|I(t)-B(t-1)|; F(t) represents the foreground mask at time t; B(t-1) is the background model of the previous frame, and I(t) is the current frame image; || represents the pixel-by-pixel absolute difference operation, which is used to highlight the difference between the current frame and the background model; S213. Morphological operations, using dilation and erosion operations to improve the connectivity and shape of the foreground mask; The purpose of the dilation operation is to increase the boundaries of foreground objects, fill small holes, and connect neighboring objects. The formula is expressed as: F d (t)=f d (F(t),k e ); F(t) is the foreground mask at time t; F d (t) dilated foreground mask; f d is the dilation operation function; k e Structural elements, which define the scope and shape of the dilation operation; The purpose of the erosion operation is to reduce the boundaries of foreground objects, remove small objects or noise, and disconnect neighboring objects; the formula is expressed as: F e (t)=f e (F d (t),k e ); F e (t) Foreground mask after erosion; F d (t) is the dilated foreground mask; f e is the corrosion operation function; S214. Contour detection, identifying vehicles by finding contours in the foreground mask. The contour detection algorithm starts from the eroded foreground mask and looks for connected white pixel areas. Each white pixel area is considered to be a contour and is recorded in the contour list. These contours represent the boundaries of the vehicles in the image. The formula is expressed as: C=f c (F e (t)); F e (t) is the foreground mask after erosion; C is the list of detected contours, each contour is a group of pixels; f c is the contour detection function, f c The output is a list of contours, where each contour is a set of points that define the boundary of the object; S215. Background model update: update the background model to adapt to scene changes. The formula is: B(t)=α·B(t-1)+(1-α)·I(t); B(t) is the background model of the current frame; α is the background update rate, which is a small positive number used to control the speed of background update.
3. The control method of a highway tunnel ventilation system based on wind speed according to claim 1, characterized in that: In step S2, the SVM model is trained to identify and count vehicles based on the real-time position and motion trajectory data of the vehicles; Specific methods include: S221. Extracting features that are helpful for SVM classification from the data after background subtraction and vehicle detection and tracking processing, the features that are helpful for SVM classification include shape, size, color and texture of the vehicle; S222. Label the corresponding vehicle category label for the feature data extracted in step S221; S223. Use the extracted features and the corresponding vehicle category labels to train the SVM model, and the formula is expressed as: Where ω is the weight vector; b is the bias term; P is the regularization parameter; x i is the feature vector of the i-th sample; y i is the label of the i-th sample; S224. Vehicle recognition: Use the trained SVM model to classify the foreground in each frame image and identify the vehicle. Input the foreground features in each frame image into the SVM model, and the model will output a predicted vehicle category label. S225. Vehicle counting, vehicle counting method: Assign a unique ID to each detected vehicle. When a new vehicle is detected, assign a unique ID to it. This ID is an integer used to identify the uniqueness of each vehicle. The tracking algorithm is used to determine the position change of the vehicle in the continuous frames, so as to realize the continuous tracking of the vehicle; Vehicle count, calculated as: The calculation formula is: The formula is explained as follows: In the process of tracking vehicles, every time a new vehicle is detected, its ID is added to the count; by assigning an ID to each vehicle and accumulating these IDs, it is ensured that even if the position of the vehicle changes in consecutive frames, each vehicle is only counted once, thereby obtaining an accurate number of vehicles.
4. The control method of a highway tunnel ventilation system based on wind speed according to claim 1, characterized in that: In step S3, the comprehensive evaluation function is defined as: D=λ1·T+λ2·H+λ3·C+λ4·V+λ5·Q Among them, V is wind speed; T is temperature; H is humidity; C is CO2 concentration; Q is traffic flow, Q is the number of vehicles N passing through a specific location, and the number N is the traffic flow within the time window; λ1, λ2, λ3, λ4, λ5 are the weights of each factor, which are allocated according to the importance of each factor.
5. The control method of a highway tunnel ventilation system based on wind speed according to claim 1, characterized in that: In step S3, the ventilation demand is calculated by a defined comprehensive evaluation function, which is expressed as: D′=λ1·T0+λ2·H0+λ3·C0+λ4·V0+λ5·Q0; Among them, D′ calculates the ventilation demand through the defined comprehensive evaluation function; V0 is the current wind speed; T0 is the current temperature; H0 is the current humidity; C0 is the current CO2 concentration; Q0 is the traffic flow, Q0 is the traffic flow in the current time window; λ1, λ2, λ3, λ4, λ5 are the weights of each factor, which are allocated according to the importance of each factor.
6. The control method of a highway tunnel ventilation system based on wind speed according to claim 1, characterized in that: In step S4, the method for selecting the ventilation mode is: if the real-time wind speed V s Greater than the wind speed threshold V th , that is, V s >V th , it is considered that natural ventilation is sufficient to meet the ventilation needs in the tunnel, and the natural ventilation mode is selected; if the real-time wind speed V s Less than or equal to wind speed threshold V th , that is, V s ≤V th , it is considered that natural ventilation is insufficient to meet the ventilation needs in the tunnel, and mechanical ventilation mode or other auxiliary ventilation methods are selected to supplement ventilation; Among them, the wind speed threshold V th It is determined based on the tunnel's design requirements, geographical environment and climatic conditions.
7. The control method of a highway tunnel ventilation system based on wind speed according to claim 1, characterized in that: In step S5, the method of using the PID controller to adjust the vent opening is: S511. The PID controller adjusts the vent opening according to the wind speed difference. The output of the PID controller is the adjustment amount of the vent opening, which is expressed as: ΔV=V s -V; In the formula, K p is the proportionality coefficient, used to quickly respond to changes in wind speed difference; K i K is the integral coefficient, which is used to accumulate past errors and help eliminate steady-state errors. d is the differential coefficient, which is used to predict the changing trend of wind speed and adjust the vent opening in advance; t represents the current time point; τ is the integral variable in the integral term, starting from 0 and integrating to the current time t; K p ·ΔV is a proportional term, which directly adjusts the vent opening according to the current wind speed difference. The greater the wind speed difference, the greater the adjustment amount; The cumulative effect of wind speed difference over time is taken into account, which helps to eliminate the steady-state error of the system; Predict rapid changes in wind speed differences, provide advance control, and reduce system overshoot; ΔV is the wind speed difference; V s To set the wind speed, V s is determined based on the results of the ventilation demand assessment in step S4 and the specific design standards of the tunnel, V s Able to meet ventilation needs under the most adverse conditions; S512. Apply the vent opening adjustment amount determined in step S511 to the vent to change the vent opening, thereby adjusting the natural ventilation volume.
8. The control method of a highway tunnel ventilation system based on wind speed according to claim 1, characterized in that: In step S5, the method of using the PID controller to adjust the fan speed is: S521.PID controller adjusts the fan speed according to the difference between the ventilation demand and the actual ventilation volume. The adjustment amount of the vent opening is expressed as: ΔD=D′-D 实际 ; K′ p is the proportionality coefficient, K′ i is the integration coefficient, K′ d is the differential coefficient, ΔD is the difference between the ventilation demand and the actual ventilation volume, D 实际 It is measured by sensors or measuring devices installed in the ventilation system; D′ is the ventilation demand calculated according to the evaluation function; S522. Apply the fan speed adjustment determined in step S521 to the fan, thereby increasing or decreasing the mechanical ventilation volume to meet the ventilation demand.
9. The control method of a highway tunnel ventilation system based on wind speed according to claim 1, characterized in that: The steps of optimizing the vent layout and opening and closing time by simulated annealing algorithm include: S61. Define the objective function. The objective function f is expressed as: f=α∫ V ||V(x,y,z)|| 2 dV+β∫ V ||P(x,y,z)|| 2 dP+γg; g=ΔD 2 +ω1(V e -V s ) 2 +ω2(V ex -V s ) 2 +ω3||δ|| 2 +ω4||v|| 2 +ω5||h|| 2 ; h=(T-T d ) 2 +(C-C d ) 2 +(Q-Q d ) 2 ; In the formula, V(x, y, z) is the air flow velocity field obtained by simulation and calculation using CFD software; P(x, y, z) is the pressure field obtained by simulation and calculation using CFD software; α, β and γ weight coefficients are used to balance the contribution of velocity field, pressure field and other factors; V e and V ex are the wind speeds at the inlet and outlet respectively; T, C and Q are the temperature, CO2 concentration and traffic flow respectively; ΔD is the difference between the ventilation demand and the actual ventilation; δ is the adjustment of the vent opening; v is the adjustment of the fan speed; T d ,C d and Q d are the expected temperature, CO2 concentration and traffic flow respectively; ω1 to ω5 are weight coefficients; S62. Initialize parameters, set initial temperature, cooling rate, and number of iterations; the initial temperature should be high enough, and the cooling rate should be controlled between 0.8 and 0.99; S63. randomly generate an initial solution, randomly generate a set of vent layout and opening and closing time combinations as the initial solution; S64. Iterative optimization, for the current solution S i , generate a neighborhood solution S j ,The neighborhood solution is obtained by making small adjustments to the vent layout, opening and closing time, the vent opening adjustment or the fan speed adjustment. The generation of the neighborhood solution is random; Calculate the change in the objective function value, Δf = f(S i )-f(S j ); if Δf<0, accept the neighborhood solution S j As the new current solution; otherwise, accept the neighborhood solution with probability p = e-Δf / Ti, where T i is the current temperature; Lower the temperature, T i+1 =η T T i ; Repeat the above steps until the number of iterations is reached or other termination conditions are met; Output the optimal solution: After multiple iterations, the solution with the smallest objective function value is output as the optimal combination of vent layout and opening and closing time.
Citation Information
Patent Citations
Tunnel ventilation control method utilizing natural wind
CN105888713A
Aerial photography road vehicle count method and device based on deep learning
CN108710875A
Intelligent control system for highway tunnel ventilation
CN113431619A
Self-adaptive flow compensation control method for tunnel ventilation system
CN118997821A
Method and system for inspecting and tracting vehicle based on machine vision
CN1897015A
Cited By
Tunnel fire smoke exhaust method and system
CN120487238A
Centralized dust control method and system for driving working face
CN121539331A