A method for ramp traffic control based on UAV-LLM-FCS

By combining drone sensors and large language models, an adaptive highway ramp traffic control system was constructed, which solved the problem of traffic congestion under varying road conditions, realized real-time data acquisition and dynamic control strategy optimization, and improved the level of intelligence in traffic management.

CN120894915BActive Publication Date: 2025-12-09SHANDONG NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511414714.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2025-12-09
Estimated Expiration
2045-09-30

AI Technical Summary

Technical Problem

The existing highway ramp traffic control system cannot meet the dynamic adjustment needs of changing road conditions, resulting in serious traffic congestion.

Method used

A UAV equipped with high-precision sensors is used to collect traffic flow data in real time. Multimodal data parsing and semantic processing are combined with Large Language Model (LLM) to construct a type II fuzzy control system. The controller parameters are optimized by simulated annealing genetic algorithm to achieve adaptive control in dynamic traffic environments.

Benefits of technology

It achieves the adaptability and control accuracy of the highway ramp traffic control system, improves the system's response speed and solvability, provides higher data processing capabilities, and can maintain an efficient and optimized control strategy in dynamic traffic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120894915B_ABST
    Figure CN120894915B_ABST
Patent Text Reader

Abstract

The application relates to a highway ramp traffic control method based on a UAV-LLM-FCS, and belongs to the technical field of intelligent traffic. The method comprises data acquisition and processing, collection of ramp traffic flow data by using a UAV, data analysis and processing by using an LLM; a two-type fuzzy control system is constructed, a fuzzy reasoning mechanism is constructed based on traffic flow and vehicle speed data, input and output domain scaling factors are dynamically adjusted in combination with an LLM dynamic rule generation technology; a two-type fuzzy controller is optimized, the input and output domain scaling factors are optimized by using a simulated annealing genetic algorithm, and an adaptive domain adjustment strategy is designed; simulation experiment and actual application, a simulation software VISSIM is used, a decision recommendation is generated by using an LLM scene automatic configuration function to carry out deployment, and the control effect is dynamically analyzed in real time, and algorithm parameters are iteratively optimized. The application dynamically adjusts and optimizes a ramp control strategy through multi-modal data integration, improves ramp traffic efficiency, and promotes the deep integration of low-altitude economy and intelligent traffic.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent transportation, in particular to a highway ramp traffic control method based on UAV-LLM-FCS. BACKGROUND

[0002] With the sustained growth of the economy, the number of cars is increasing year by year, and the pressure of urban traffic is increasing. Highway has become an indispensable part of the city road network. Although the construction of highway ramps, highways and other transportation infrastructure is accelerating, due to the rapid increase in the number of vehicles, the limitations of traditional road detection and control methods, and other factors, traffic jams often occur at highway ramps, highways and other places during holidays and other periods of high traffic demand. The problem of traffic congestion is becoming increasingly serious, bringing great inconvenience to the people's travel.

[0003] In recent years, the low-altitude economy has developed rapidly and become a new driving force for high-quality economic development. The breakthrough of artificial intelligence technology, especially large language models (LLM), has provided strong support for the intelligent upgrading of low-altitude economy. Large language models not only have great potential in the field of unmanned aerial vehicle intelligent control, but also provide a new way for traffic management with their strong multi-modal understanding ability and real-time decision-making advantage. Although large language models have some applications in existing highway ramp traffic control systems, the control strategies generated by them are relatively fixed and lack the ability to dynamically adjust. When the road conditions exceed the preset scenarios, the control strategy will be out of touch, and the control strategy issued will not be able to improve the efficiency of traffic flow, and cannot meet the control and adjustment needs of modern traffic conditions. SUMMARY

[0004] To solve the problems in the prior art, the present application designs a highway ramp traffic control method based on UAV-LLM-FCS to solve the problem that existing highway ramp traffic control technology cannot meet the needs of variable road conditions.

[0005] The technical solution adopted by the present application is: a highway ramp traffic control method based on UAV-LLM-FCS, the specific steps of the control method are:

[0006] Step one, data collection and processing, using unmanned aerial vehicles to carry high-precision sensors to collect real-time traffic flow data near the entrance ramp of the expressway; using LLM to semantically analyze multi-modal data, including target detection and identification based on the RT-DETR algorithm to optimize the Transformer structure, and using the Kalman filter model to predict vehicle trajectories, then converting the collected image data to coordinates, converting pixel coordinates to real ground coordinates, extracting and smoothing vehicle trajectories, and counting vehicle flow and average speed within a time window; finally, generating a traffic report stream through LLM;

[0007] Step two, build a two-type fuzzy control system, based on the matrix semi-tensor product theory, support multi-dimensional input data fusion processing, enhance the expression and calculation ability of the system, based on the real-time collected traffic flow and speed data to divide the fuzzy set, and design its membership function respectively; build a two-input single-output fuzzy reasoning mechanism with traffic flow and speed as input and green light delay as output, generate accurate control instructions through dimension reduction and defuzzification processing; combine LLM dynamic rule generation technology, analyze multi-source traffic data, and adaptively generate and adjust the fuzzy rule base according to real-time traffic state; introduce the variable domain theory technology, dynamically adjust the stretching factor of the input and output domain, enhance the adaptability of the system to dynamic traffic environment; after obtaining the output control strategy, combine LLM to verify the feasibility and semantic interpretation of the control strategy, ensure its rationality and implementability;

[0008] Step three, optimize the two-type fuzzy controller, use simulated annealing genetic algorithm to optimize the input and output domain stretching factor, globally search for the optimal parameter combination, combine the interpretable rules obtained by LLM to realize scene adaptive parameter tuning, design adaptive domain adjustment strategy, real-time scale the fuzzy domain according to the dynamic changes of traffic flow, realize local rule densification, use the explainability verification module of LLM to generate a three-dimensional optimization report, and show the comparison results of key indicators;

[0009] Step four, simulation experiment and practical application, build an expressway ramp simulation model in the simulation software VISSIM, quickly generate test cases for different flow scenarios through the LLM scene automatic configuration function, carry out multi-strategy comparison experiments, and analyze the experimental results through LLM to generate decision recommendations and issue control instructions, then deploy the optimized system to the actual expressway ramp, dynamically analyze the control effect through the real-time monitoring module of LLM, and iteratively optimize the algorithm parameters.

[0010] Further, the data collection in step one adopts a three-in-one gimbal system of "visible light + millimeter wave radar + lidar" mounted on a UAV as the core mobile data collection platform, cooperates with 6 wireless sensor network (WSN) nodes arranged within 100m of the ramp entrance, and collects highway ramp flying video data, visual data, lidar data and sensor data.

[0011] Further, the semantic analysis process of the multi-modal data by the LLM in step one includes,

[0012] S1021, RT-DETR target detection and recognition, the RT-DETR algorithm is used to optimize the traditional Transformer structure, the parameter and calculation complexity are reduced by simplifying the attention mechanism, and a decoupled feature extraction mechanism and a dynamic attention mechanism are introduced, a plurality of frames are predicted at one time in the detection logic, the set prediction is performed through the Hungarian matching algorithm, in order to stabilize the matching of the early true value, the real target is added with noise, in the noise adding process, the position offset is selected in different ranges of disturbance coefficients in the uniform distribution to limit the positions of the left upper corner and the right lower corner of the coordinate frame after noise adding:

[0013] The disturbance coefficient selection range of the positive sample is ; the disturbance coefficient selection range of the negative sample is ; the position coordinate calculation formula after the offset is as follows:

[0014] ,

[0015] wherein, is the left upper corner coordinate of the real boundary frame; is the right lower corner coordinate of the real boundary frame, is the width of the real boundary frame; is the height of the real boundary frame; are the disturbance offsets of the left upper corner and the right lower corner coordinates respectively; is the disturbance coefficient sampled from a certain uniform distribution, used to control the offset range;

[0016] The limited coordinate frame has a partial offset, but the offset is within an acceptable range, wherein the frame with a larger offset is defined as a negative sample, and the part with a smaller offset is defined as a positive sample;

[0017] S1022, predict the vehicle trajectory by using the Kalman filter model, based on the radial velocity, distance and azimuth angle data of the millimeter wave radar, establish the Kalman filter model, the starting point of the Kalman filter is as follows:

[0018] ,

[0019] wherein, is the system state vector, and the purpose of Kalman filtering is to make the best estimate of the state vector; is the system input vector; is the measurement vector; is the system noise vector; is the measurement noise vector; is the system noise matrix; is the system input matrix; is the measurement matrix;

[0020] S1023, vehicle trajectory extraction and traffic flow data analysis, after identifying and tracking the vehicle, the trajectory and speed information of the vehicle are extracted for analyzing the vehicle flow and average speed.

[0021] Further, the specific process of the step S1023 includes:

[0022] S10231, coordinate conversion, according to the camera internal parameter and the actual ground length, the ground sampling interval is calculated, and the calculation formula is:

[0023] ,

[0024] wherein, H is the relative altitude, a is the pixel size, f is the lens focal length;

[0025] The coordinates of each pixel in the video are converted into the coordinates on the actual ground by using the calculated ground sampling interval;

[0026] S10232, vehicle trajectory extraction, in the YOLOv5-DeepSORT software, the center point coordinates and ID values of each target vehicle in each frame are exported, the vehicle center point coordinates with the same ID are connected into a line to form the vehicle driving trajectory;

[0027] S10233, calculating the vehicle flow , defining a time window, counting the number of vehicles passing through the ramp in each time window, and the calculation formula is:

[0028] ,

[0029] wherein, is the time window total number of detected vehicles, is an indicator function, which takes the value of 1 when the passing time of the vehicle is within the time window , otherwise 0;

[0030] S10234, Calculate average vehicle speed The frame difference method is used to calculate the vehicle's displacement and time difference between two frames, and then the speed is obtained. The average speed of all vehicles is obtained by averaging the speeds of all vehicles. The calculation formula is as follows:

[0031] ,

[0032] in, For time window The total number of vehicles detected inside. For vehicles In the time window Displacement within, This represents the corresponding time difference.

[0033] Furthermore, step two, which involves constructing a type-two fuzzy control system, includes:

[0034] S201. Divide the data into fuzzy sets. Take traffic flow and vehicle speed as input variables, and green light delay as output variable. Divide the input variables, traffic flow and average vehicle speed, into five subsets each, and the output variable, green light delay, into nine subsets. The fuzzification process uses a membership function to represent the degree to which an input variable belongs to a certain fuzzy set. The Gaussian membership function for traffic flow is expressed as:

[0035] ,

[0036] in, Traffic flow Belonging to Centered on The membership degree of a Gaussian fuzzy set is the standard deviation. It is the center value of the Gaussian function, representing the typical traffic flow value of this fuzzy set. The standard deviation of the Gaussian function determines the width of the membership function curve, i.e., the traffic flow value revolves around the center value. The range of variation;

[0037] The Gaussian membership function for vehicle speed is expressed as:

[0038] ,

[0039] in It is the vehicle speed Belonging to Centered on The membership degree of a Gaussian fuzzy set is the standard deviation. It is the center value of the Gaussian function, representing the typical speed value of this fuzzy set; is the standard deviation of the Gaussian function, which determines the width of the membership function curve, i.e. the range of variation of the vehicle speed value around the central value ;

[0040] S202, fuzzy reasoning, the specific process of which includes:

[0041] S2021, designing fuzzy rules, 25 fuzzy rules are designed based on the intersection of the five subsets of the input variables traffic flow and average speed;

[0042] S2022, calculating the activation interval, the activation interval of each rule is calculated , the formula is:

[0043] ,

[0044] wherein, and are two input variables of the controller, and are the input variables , the lower membership function value and the upper membership function value of the interval two fuzzy set , and are the input variables , the lower membership function value and the upper membership function value of the fuzzy set ;

[0045] S2023, reduction, the interval two fuzzy set is reduced, and the reducer formula is:

[0046] ,

[0047] wherein and represent the left end point and the right end point of the reduced interval respectively;

[0048] S203, defuzzification, defuzzification technology is a key step to convert fuzzy output into precise control quantity, the calculation formula of the left end point value of the reduced interval is:

[0049] ,

[0050] the calculation method of the right end point value is the same, and finally the final output of the controller is the arithmetic mean value of the reduced interval:

[0051] .

[0052] Further, the step two of constructing the two fuzzy control system further includes:

[0053] S204, LLM dynamic programming generation, mainly including using LLM to analyze real-time traffic report text, extracting key information, and integrating these information into the state of dynamic programming; using the understanding ability of LLM to traffic field text knowledge, combining dynamic programming algorithm, analyzing historical traffic flow data to generate more accurate traffic flow prediction results; using LLM to understand traffic control rules and targets, through cost-benefit analysis of different ramp control actions, dynamically generating the optimal ramp control strategy; LLM combines dynamic programming algorithm to consider the dynamic changes of traffic flow, dynamically adjusts the ramp control strategy according to the new traffic conditions at different time stages; multi-objective optimization is generated, LLM can understand the relationship and priority between different traffic management targets, and generate ramp control strategies under different traffic flow conditions to achieve the balance of multiple targets;

[0054] S205, design of variable domain theory type-2 fuzzy controller, under the premise of keeping the number of fuzzy rules unchanged, input and output domain stretching factors are introduced , , , the initial input domain of the fuzzy controller is , the initial output domain is , , after adjusting the input domain stretching factor and the output domain stretching factor , the domain is represented as: , , , dynamically adjust the domain range of the fuzzy controller;

[0055] S206, LLM explainability verification, through visualization, feature importance analysis and attribution method to improve the transparency of large language model in ramp control, through counterfactual reasoning to verify the rationality of model decision logic, and observe the adaptability of control strategy; combined with visualization, feature importance analysis and attribution results, the response mechanism of LLM under different congestion scenarios is clear, ensuring its reliability, and providing data support for controller optimization.

[0056] Further, the specific process of step three of optimizing the type-2 fuzzy controller is:

[0057] S301, fitness function design, design fitness function to minimize freeway mainline travel time and ramp travel time, formula is:

[0058] ,

[0059] wherein respectively represent the freeway mainline and ramp travel time, respectively represent the mainline and ramp travel time index weight, and the fitness value fThe greater, the better the overall traffic condition, the better the control strategy effect; through this fitness function, the algorithm will tend to find the combination of the argument scaling factor that makes the main line and ramp travel time optimal in the search process;

[0060] S302、Simulated annealing genetic algorithm optimizes the argument scaling factor,

[0061] S3021, initialization, according to the variable range and search accuracy requirements, the argument scaling factor is represented as a binary chromosome by binary coding, and the initial population is generated, and each individual in the population represents a set of input and output argument scaling factors , and the initial temperature of simulated annealing is specified , the minimum temperature and the cooling coefficient ;

[0062] S3022, update the population by selection, crossover and mutation operations, adopt the elite reservation strategy for selection, reserve the number of individuals with the highest fitness value, and select the remaining individuals by roulette method, then perform crossover and mutation operations, the single-point crossover is adopted for the crossover operation, the probability is , and the gene bit is randomly flipped according to the probability to generate new offspring individuals;

[0063] S3023, simulated annealing correction, accept new solutions according to the Metropolis criterion, the formula is:

[0064] ,

[0065] wherein, is the temperature of the current generation, is the current solution, is the neighborhood solution, and as the temperature decreases, the probability of accepting inferior solutions tends to zero;

[0066] S3024, algorithm termination, the algorithm termination condition is to reach the maximum iteration number , when the iteration number , the selection, crossover, mutation and simulated annealing correction steps are executed in a loop, and the search is ended when the simulated annealing temperature , at this time, the current optimization solution searched by the algorithm is the final value of the argument scaling factor;

[0067] S303, simulated annealing genetic algorithm optimization, enhance the initial population optimization through LLM, the system automatically generates high-quality chromosome templates based on the historical optimal solution knowledge graph, and adopts semantic-driven mutation operation, when LLM identifies special events, dynamically adjusts the mutation probability of related genes , realize the intelligent optimization of traffic scene self-adaptation;

[0068] S304, parameter tuning of LLM based on interpretable rules, realize real-time optimization of parameters through generated interpretable rules, and establish a dynamic weight adjustment mechanism to automatically adjust control weight parameters according to different traffic scenes. When the traffic flow is normal, the standard ratio of main line weight 0.65, safety weight 0.20 and environmental protection weight 0.15 is adopted. Once the system detects special events (such as congestion, accidents, etc.), the weights are adjusted according to the rules to improve the control response ability. At the same time, strict constraint conditions are set, such as the hard constraint that the ramp queue length does not exceed 300 meters, and the soft constraint that the main line delay control is within 15 minutes. Ensure that all control behaviors are executed within their boundary range, and the safety and real-time requirements are preferentially met. This method not only improves the adaptability and control accuracy of the system, but also makes the entire parameter tuning process and weight decision traceable and understandable due to the explicit logical structure and semantic readability of the rules, thereby enhancing the credibility and interpretability of the system.

[0069] Further, the specific process of step three of optimizing the type two fuzzy controller further comprises:

[0070] S305, adaptive domain adjustment, adopt intelligent domain dynamic scaling mechanism, through function real-time prediction of traffic flow peak value , and automatically select the optimal scaling coefficient based on the date type: adopt 1.3 times expansion coefficient during holiday peak traffic period , and 1.1 times conservative coefficient during weekdays ,

[0071] ,

[0072] S306, LLM generates optimization report, LLM automatically generates three-dimensional optimization report containing multiple dimensions, the report structure includes: control strategy explanation, key performance indicator comparison, root cause diagnosis and specific improvement suggestions, the three-dimensional optimization report is generated every 2 hours, supports historical backtracking and trend analysis, and visually displays the control effect of each period through visual charts.

[0073] Further, the specific process of step four of simulation experiment and actual application is:

[0074] S401, simulation experiment,

[0075] S4011, Experiment preparation, using Python programming language combined with VISSIM simulation method, taking the actual operating highway as the research object, selecting a specific entrance ramp as the target section, collecting traffic flow data of the target section, determining peak and control periods, calculating peak and valley traffic, setting large and small traffic scenario parameters, building a research section model in VISSIM, setting main line and ramp parameters, vehicle types and proportions, arranging data collectors and queue detectors, and setting initial signal timing;

[0076] S4012, Experimental variables and strategies, the independent variables of the experiment are traffic volume, speed and control strategy, and the dependent variables are various main line and ramp evaluation indexes; Different control strategies are implemented according to their respective rules, and the simulated annealing genetic algorithm optimized b-type fuzzy control optimizes the domain scaling factor through specific algorithm steps, including initialization, fitness calculation, selection, crossover and mutation, simulated annealing correction and iteration to termination condition;

[0077] S4013, Experimental process, preheat for 1200s to stabilize traffic flow, implement control strategies and collect data in cycles according to data collection, green light delay calculation and signal timing adjustment steps, collect data at intervals of 120s, repeat experiments with 3 random seeds for each scenario and record data;

[0078] S4014, Data analysis, calculate the average value of each cycle evaluation index, process the domain scaling factor optimization process data, compare the average values of different control strategies in different scenarios, determine the best weight for different scenarios, evaluate the effect of b-type fuzzy control system, and prove the effectiveness of simulated annealing genetic algorithm optimization;

[0079] S402, LLM scenario automatic configuration, combined with the optimization report generated by LLM, the intelligent configuration of the simulation scene is realized through the natural language processing engine, which supports managers to describe experimental requirements using daily language, that is, when a specific traffic scene is input using natural language, LLM will perform multi-dimensional analysis on the traffic scene, the analysis process involves three technical layers: semantic understanding layer, using BERT model to extract entities and relationships in the instruction; knowledge mapping layer, matching natural language description with traffic simulation parameter library; logical verification layer, checking the rationality of parameter combination; the analysis process includes first identifying time characteristics and automatically associating historical traffic patterns, then extracting weather keywords to match dynamic parameters in various weather conditions in VISSIM, and finally analyzing other scene instructions to convert them into parameters recognizable by the simulator, outputting a standardized JSON structure that can directly drive the VISSIM simulation engine to run, while generating a configuration explanation document;

[0080] S403, LLM result analysis and decision recommendation, based on multi-strategy comparison experiment data, the LLM analysis engine constructs a decision space containing a 12-dimensional feature vector, and generates the optimal control strategy through a two-type fuzzy controller and a deep reinforcement learning algorithm;

[0081] S404, control instruction generation and execution, according to the decision recommendation of LLM, automatically generate structured control instructions, each instruction contains decision basis, action parameters and execution constraints, the instruction is pre-verified through the digital twin system, and then is issued to the roadside device through an encrypted channel, and the closed loop from decision to execution is completed within 500ms, and a human-readable execution summary is generated synchronously;

[0082] S405, LLM real-time monitoring, combined with LLM analysis conclusion and control instruction execution feedback, a three-level monitoring system is constructed, including second-level device state inspection, minute-level effect evaluation and hour-level strategy optimization, when the monitoring system finds that the ramp traffic appears abnormal data, the LLM reanalysis process is automatically triggered, the strategy adjustment suggestion is generated and the control instruction is immediately updated, forming a continuous improvement closed loop of "perception - decision - execution - verification".

[0083] Compared with the prior art, the progress of the highway ramp traffic control method based on the UAV-LLM-FCS designed in the patent lies in that:

[0084] 1、The application breaks through the spatial limitation of traditional ground monitoring equipment, adopts a three-in-one gimbal system of an unmanned aerial vehicle carrying high-precision sensors such as visible light, millimeter wave radar and laser radar, realizes all-weather and multi-dimensional collection of traffic flow data in the highway entrance merging area. This method has high flexibility and low cost. When the ramp traffic is low and does not need to be regulated and controlled during off-peak hours, the unmanned aerial vehicle can be suspended, thereby significantly reducing the operation and control cost of the system. The large language model technology is innovatively introduced, the video stream, vehicle trajectory and sensor signal collected by the unmanned aerial vehicle are subjected to real-time semantic processing through the multi-modal data analysis engine of the LLM, the key features such as traffic flow, speed distribution and abnormal events are automatically extracted, and a structured dynamic traffic flow report is generated. This technology can compress the time-consuming of manual analysis from hours to minutes, and provide high-time-efficiency and high-credibility decision input for the two-type fuzzy control system.

[0085] 2、The application collects multi-source data through unmanned aerial vehicle remote sensing, sensors, image recognition and other technologies, and uses the semantic understanding and knowledge reasoning capability of LLM to deeply integrate and model heterogeneous data such as traffic flow, weather and vehicle behavior. The LLM technology further realizes the automatic identification and risk prediction of traffic events, provides high-credibility decision basis for the control system, and promotes the upgrade of traffic monitoring from "data-driven" to "knowledge-driven".

[0086] 3. The application proposes an adaptive adjustment strategy based on variable domain control technology to address the problem of fixed membership function of traditional fuzzy controllers. Combined with LLM dynamic rule generation technology, the system can automatically generate fuzzy control rules according to real-time traffic scenarios, and optimize the scaling factor through LLM parameter tuning suggestions, realizing dynamic adjustment of the controller domain, and significantly improving control accuracy and stability in complex traffic environments.

[0087] 4. The application optimizes the two-type fuzzy controller comprehensively, effectively enhances the global search and convergence ability of the system by introducing the simulated annealing genetic algorithm. At the same time, combined with the LLM scene automatic configuration technology, the system can automatically recommend the optimal parameter combination suitable for different traffic flow scenarios based on historical data and real-time simulation results, and generate a clear and interpretable optimization strategy comparison report. This report not only elaborates the basis for parameter adjustment and strategy benefits, but also makes the entire optimization process highly transparent and understandable, ensuring that the control strategy always maintains high efficiency and optimal performance in dynamic traffic environments.

[0088] 5. The application integrates UAV technology, fuzzy control and LLM capabilities to build a "perception-decision-control" closed-loop system. LLM runs through the whole process: front-end data intelligent collection is realized through multi-modal analysis, middle-end dynamic rule generation and parameter tuning are provided, and back-end real-time monitoring and decision recommendation are supported. The system can automatically generate control instructions and synchronize them to the traffic management platform, significantly improving the response speed and safety of ramp control, and providing a practical and comprehensive solution for intelligent transportation.

[0089] 6. The application realizes strategy interpretability, scene adaptability and operation intelligence while ensuring high-precision control through deep integration of LLM technology, providing an innovative paradigm for traffic management in the context of low-altitude economy and "double carbon" goals. The combination of UAV technology and traffic management field is forward-looking and innovative, and can produce extensive social and economic benefits in the future. BRIEF DESCRIPTION OF DRAWINGS

[0090] Figure 1 is a flowchart of a highway ramp traffic control method based on UAV-LLM-FCS.

[0091] Figure 2 is a flowchart of data acquisition and processing of the application.

[0092] Figure 3 is a schematic diagram of vehicle trajectory drawing results.

[0093] Figure 4 is a schematic diagram of vehicle trajectory after smoothing processing.

[0094] Figure 5is a vehicle trajectory coordinate diagram after smoothing processing.

[0095] Figure 6 is a flowchart of the two-type fuzzy control system constructed by the application.

[0096] Figure 7 is a flowchart of the two-type fuzzy controller optimized based on the simulated annealing genetic algorithm and LLM.

[0097] Figure 8 is a flowchart of the simulation experiment and actual application. DETAILED DESCRIPTION

[0098] The application will be further described below in combination with the drawings and specific embodiments. The technical solutions in the embodiments of the application are clearly and completely described, and the described embodiments are only part of the embodiments of the application, not all. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the application.

[0099] The application patent designs a high-speed ramp traffic control system based on UAV-LLM-FCS. The control system is composed of an unmanned aerial vehicle remote sensing and multi-source data acquisition module, an LLM multi-modal data analysis and rule generation module, a two-type fuzzy control system, an optimization algorithm module, a simulation experiment module and a control execution and remote monitoring module. The traffic control system combines large language models with intelligent control theory. First, data is collected by sensors carried by unmanned aerial vehicles (UAVs), and large language models (LLM) are used to analyze the data in multiple modes and generate traffic flow reports. Then, by studying two-type fuzzy logic, an advanced two-type fuzzy control system (FCS) is constructed, and the feasibility of the system is verified by LLM. Then, the simulated annealing genetic algorithm is used to optimize it, and LLM is used to give suggestions for adjusting and optimizing the parameters of the controller to generate a specific optimization report. Finally, the simulation experiment, verification and actual application stage is entered, and LLM is used to analyze and evaluate the experimental results of different strategies, recommend the optimal traffic control decision scheme, and use LLM for real-time monitoring in the actual deployment stage, dynamically adjust the control strategy according to the actual situation to comprehensively improve the intelligent level and efficiency of the high-speed ramp control.

[0100] The specific process of the control method of the high-speed ramp traffic control system based on UAV-LLM-FCS designed by the application patent is shown in Figure 1 , which includes:

[0101] Step one, data acquisition and processing, as shown in Figure 2 , specifically including:

[0102] S101. Drone data acquisition utilizes a DJI Mavic 2 Pro drone equipped with a three-in-one gimbal system (visible light + millimeter-wave radar + lidar) as the core mobile data acquisition platform. This is complemented by six wireless sensor network nodes deployed within 100m of the ramp entrance. The drone's visible light camera boasts a 20-megapixel resolution, supports 1080P / 60fps video recording, and can capture detailed features such as vehicle color and model. The millimeter-wave radar operates in the 77GHz band, with a ranging range of 0.5–300m and a speed accuracy of ±0.1km / h, capable of penetrating rain and fog for all-weather vehicle detection. The lidar achieves a point cloud density of 200 points / m² and a 3D positioning accuracy of ±5cm, used to construct a 3D point cloud map of the ramp area. The drone employs a dual-mode operation of "orbit determination cruise + dynamic focusing." The orbit determination phase follows... The flight path cruises at an altitude of 5–30 m with a sampling period of 2 s / frame. When the LLM detects congestion or abnormal events (such as sudden braking or wrong-way driving), it automatically switches to dynamic focusing mode, lowers the altitude to 5–10 m and hovers, increasing the sampling frequency of the target area to 0.5 s / frame. Aerial video data, visual data, lidar data, and sensor data are collected from highway ramps. The characteristics and uses of the collected multimodal data are shown in Table 1.

[0103] Table 1

[0104]

[0105] Each node of the Wireless Sensor Network (WSN) integrates a vehicle speed sensor (accuracy ±1km / h), a traffic flow counter (error <2%), and an environmental sensor (monitoring visibility and precipitation intensity). Data is uploaded via the LoRaWAN protocol, forming a spatiotemporal complement to drone data. The raw data collected by the drone is preprocessed by the 5G edge node (including distortion correction and point cloud denoising), and then fused with WSN data through spatiotemporal stamp alignment technology to form a 30MB / s multimodal data stream, which is stored in a distributed database on the edge server.

[0106] S102. Semantic parsing of multimodal data is performed using LLM. Visual modal data collected by UAVs over highway ramps is the core information source, including visible light images and video streams. This invention combines computer vision, deep learning, and multi-sensor collaborative technology to perform data parsing, specifically as follows:

[0107] S1021, RT-DETR target detection and identification, RT-DETR is a new type of deep learning algorithm designed for real-time target detection, and the RT-DETR algorithm is used to optimize the traditional Transformer structure, the parameter and calculation complexity are reduced by simplifying the attention mechanism, and the decoupled feature extraction mechanism and dynamic attention mechanism are introduced, the data amount entering the Transformer is reduced, the model focuses more on the key information of the image, and the detection accuracy and speed are improved.

[0108] The RT-DETR backbone network adopts the classic Res Net series and HGNet-v2, the efficient Hybrid Encoder design and decoupling strategy are adopted in the encoder part, and the global feature encoding process is optimized. In the detection logic, the traditional detection head of the convolutional neural network is discarded, and the NMS design process is replaced by one-time prediction of multiple frames, and the Hungarian matching algorithm is used for set prediction. In order to stabilize the matching of the early true value, the real target is added with noise, and part of the offset is added to the position of the actual target or the class label is changed to participate in the training as high-quality positive and negative samples.

[0109] In the noise adding process, the position offset selects different range of disturbance coefficients in uniform distribution to limit the position of the left top corner and the right bottom corner of the coordinate frame after noise adding:

[0110] The disturbance coefficient selection range of the positive sample is ; the disturbance coefficient selection range of the negative sample is ; the position coordinate calculation formula after offset is as follows:

[0111] ,

[0112] Among them, is the left top corner coordinate of the real boundary frame; is the right bottom corner coordinate of the real boundary frame, is the width of the real boundary frame; is the height of the real boundary frame; are the disturbance offsets of the left top corner and right bottom corner coordinates respectively; is the disturbance coefficient sampled from a certain uniform distribution, used to control the degree of offset. The limited coordinate frame has part of the offset, but the offset is within an acceptable range, wherein the frame with larger offset is defined as a negative sample, and the part with smaller offset is defined as a positive sample.

[0113] S1022, predict the vehicle trajectory by using Kalman filtering model, establish Kalman filtering model based on the radial velocity, distance, azimuth angle data of millimeter wave radar, and the starting point of Kalman filtering is as follows dynamic model:

[0114] ,

[0115] Among them, is the system state vector, and the purpose of Kalman filtering is to make the best estimate of the state vector; is the system input vector; is the measurement vector; is the system noise vector; is the measurement noise vector; is the system noise matrix; is the system input matrix; is the measurement matrix.

[0116] S1023, vehicle trajectory extraction and traffic flow data analysis, after identifying and tracking the vehicle, the trajectory, speed and other information of the vehicle are extracted for analyzing the traffic flow and average speed . Before extracting the vehicle information, the video information needs to be converted into real coordinate information from pixel coordinate information, specifically:

[0117] S10231, coordinate conversion, according to the camera internal parameters and the actual ground length, the ground sampling interval needs to be calculated, the ground sampling interval (GSD) refers to the ground length represented by one pixel in digital image, for example, the GSD in a certain video is 10 cm, which means that one pixel represents 10 cm of actual ground length in the video, and its calculation formula is:

[0118] ,

[0119] Among them, H is the relative height, a is the pixel size, f is the lens focal length;

[0120] The calculated ground sampling interval is used to convert the coordinates of each pixel in the video into the coordinates on the actual ground. Assuming that the coordinates of a certain pixel in the video are , then its actual coordinates on the ground are:

[0121] .

[0122] S10232, vehicle trajectory extraction, first, the center point coordinate extraction is carried out, in YOLOv5-DeepSORT, the center point coordinate of each target vehicle in each frame and its ID value are derived, then the vehicle center point coordinates with the same ID are connected into a line, and the vehicle driving trajectory is drawn, the drawing result is as shown in Figure 3 Finally, the coordinate file is imported into Origin function drawing software, and "analysis"→"signal processing"→"smoothing" is used to smooth the trajectory using local weighted regression method, etc., to reduce noise and error, the trajectory diagram after smoothing is as shown in Figure 4 、 5 .

[0123] S10233, traffic flow data analysis is carried out, first, the vehicle flow is calculated, the time window is defined, for example, every 5 seconds is a time window, then the number of vehicles passing through the ramp in each time window, i.e. the vehicle flow is counted, the calculation formula is:

[0124] ,

[0125] Among them, is the total number of vehicles detected in the time window , is an indicator function, which takes the value of 1 when the passing time of the vehicle is within the time window , otherwise it is 0.

[0126] S10234, the average vehicle speed is calculated, for each vehicle in each time window , the average speed of the vehicle passing through the ramp is calculated. The frame difference method is used to calculate the displacement and time difference of the vehicle between two frames, and then the speed is obtained, and the average value of the speed of all vehicles is obtained, i.e. the average vehicle speed , the calculation formula is:

[0127] ,

[0128] Among them, is the total number of vehicles detected in the time window , is the displacement of the vehicle in the time window , is the corresponding time difference.

[0129] S103, LLM generates traffic report stream, using large language model to generate highway traffic report is an efficient and automated solution, which can convert multi-modal data into structured text report, assist traffic management and decision-making, the specific process is:

[0130] S1031, data input and preprocessing, input multi-modal data, traffic flow monitoring data, road sensor information, traffic accident records, weather data, public transportation operation data and other multi-dimensional data are sorted into text format that can be processed by LLM. Clean the original data to remove duplicate, error or invalid data, and label the data to clarify the data type and meaning for LLM to understand;

[0131] S1032, LLM generates report, LLM is guided to generate the required report through detailed prompt words, the content needs to include overall traffic overview, congestion section analysis, traffic accident summary and 24-hour traffic forecast. The generated report includes overall traffic summary, congestion section analysis, traffic accident summary, traffic forecast, optimization suggestions;

[0132] S1033, post-processing and optimization, manually review the report generated by LLM, check the accuracy, logic and completeness of the content, correct errors or unreasonable expressions. Then format the report, add title, paragraph division, insert charts to make it more clear and easy to read, finally optimize the prompt words and adjust the parameters according to the review and use feedback, LLM continuously improves the quality and accuracy of report generation.

[0133] Step two, build a two-type fuzzy control system, as shown in Figure 6 , specifically:

[0134] S201, divide fuzzy sets, in order to better describe the uncertainty of the system, the invention constructs a two-input, single-output interval two-type fuzzy controller. The congestion of ramp merging area presents the trend of upstream propagation, the indicators reflecting the upstream and ramp traffic state are selected as the input of the fuzzy controller. The traffic flow and speed are selected as the input variables, the green light delay is selected as the output variable, the input variables traffic flow and average speed are divided into ZE, ZP, PO, PS, PB five subsets, and the output variable green light delay is divided into NB, NS, NE, ZN, ZE, ZP, PO, PS, PB nine subsets, as shown in Table 2,

[0135] Table 2

[0136] .

[0137] The fuzzification process uses membership functions to represent the degree to which an input variable belongs to a certain fuzzy set. Membership functions are used to represent the degree to which elements in the domain belong to a fuzzy set, with a value range of [0, 1]. In fuzzy control systems, membership functions are the key to describing the degree to which an input variable belongs to a certain fuzzy set.

[0138] Traffic flow is divided into five fuzzy sets: "low" (ZE), "medium" (ZP), "high" (PO), "very high" (PS), and "extremely high" (PB). For each fuzzy set of traffic flow , a Gaussian membership function is used to represent it as follows:

[0139] ,

[0140] where is the membership degree of traffic flow to the Gaussian fuzzy set with as the center and as the standard deviation, is the center value of the Gaussian function, representing the typical traffic flow value of the fuzzy set, is the standard deviation of the Gaussian function, determining the width of the membership function curve, i.e., the range of traffic flow values around the center value ;

[0141] For vehicle speed , the Gaussian membership function is represented as:

[0142] ,

[0143] where is the membership degree of vehicle speed to the Gaussian fuzzy set with as the center and as the standard deviation; is the center value of the Gaussian function, representing the typical vehicle speed value of the fuzzy set; is the standard deviation of the Gaussian function, determining the width of the membership function curve, i.e., the range of vehicle speed values around the center value ;

[0144] In these two formulas, the shape of the membership function is determined by the center value (or ) and the standard deviation (or ). By adjusting these parameters, the position and width of the membership function curve can be changed to adapt to different fuzzy logic application scenarios.

[0145] S202, fuzzy reasoning, the specific process of which includes:

[0146] S2021, design fuzzy rules, fuzzy rules as the core component of fuzzy control system, the quality is directly related to the pros and cons of control effect. The present application is based on the input variable traffic flow and average speed of five subsets of cross design 25 fuzzy rules, as shown in Table 3,

[0147] Table 3

[0148]

[0149] S2022, calculate the activation interval, calculate the activation interval of each rule , the formula is:

[0150] ,

[0151] wherein, and are two input variables of the controller, and are input variables For the lower membership function value and the upper membership function value of the interval two fuzzy set , and and are input variables For the lower membership function value and the upper membership function value of the fuzzy set ; the activation interval calculated by these membership functions can reflect the activation degree of different rules under the current traffic flow and speed input.

[0152] S2023, reduction, interval two fuzzy set is reduced, the commonly used Center-of-Sets (COS) reducer formula is:

[0153] ,

[0154] wherein and represent the left end point and the right end point of the reduction, the reduction process is to convert the high-order interval two fuzzy set into a low-order one fuzzy set, so as to facilitate subsequent defuzzification processing.

[0155] S203, defuzzification, defuzzification technology is the key step to convert fuzzy output into precise control quantity, the core is to convert the fuzzy set (fuzzy quantity) of fuzzy reasoning output into precise numerical value (clear quantity), in order to execute control operation. For example, in the ramp signal control of expressway, it can convert the fuzzy control strategy into accurate green light delay time, this conversion process is very important, it ensures the effectiveness of fuzzy logic system in practical application.

[0156] left end point of descending interval The calculation formula of the value is:

[0157]

[0158] right end point value The calculation method is the same, and the final output of the controller is the arithmetic mean value of the descending interval:

[0159]

[0160] The application collects traffic parameters such as vehicle flow and vehicle speed in real time, and finally generates the optimal green light delay control strategy through a series of processing procedures such as fuzzification, fuzzy reasoning and defuzzification. In the fuzzification stage, the application converts the accurate traffic parameters into fuzzy language variables and determines the membership function value. In the fuzzy reasoning stage, the system performs logical operations based on fuzzy rules. In the defuzzification stage, the system accurately calculates the left and right end point values of the descending interval, and finally takes the arithmetic mean value as the control output, thereby realizing effective control of the highway ramp and significantly improving traffic efficiency and road safety.

[0161] S204, LLM dynamic planning generation, set state as time step, highway section vehicle flow, and each ramp vehicle waiting quantity. In each time step, record the vehicle flow of different sections of the highway, and the number of vehicles waiting to enter the highway at each ramp. In each state, how many ramp vehicles are allowed to enter the highway, and which ramp vehicles are given priority to enter. The goal is to minimize the congestion degree of the highway or maximize the total number of vehicles passing through per unit time. Use LLM to analyze real-time traffic report texts and extract key information, and integrate these information into the dynamic planning state. Based on dynamic planning, vehicle flow prediction results are generated. LLM can use its understanding ability of traffic field text knowledge to analyze historical vehicle flow data in combination with dynamic planning algorithm. Dynamic planning can divide time into multiple stages, analyze the trend of vehicle flow in each stage, consider the correlation of vehicle flow in adjacent time periods, and generate more accurate vehicle flow prediction results.

[0162] Understand traffic control rules and goals using LLM, and dynamic planning analyzes the cost-benefit of different ramp control actions (such as opening, flow limiting, closing ramps, etc.). For example, analyze the relationship between the increase in vehicle flow caused by opening ramps and the congestion of surrounding roads, the impact of closing ramps on other roads, etc. Based on these factors, dynamic planning generates the optimal ramp control strategy, such as when to open or close ramps under certain vehicle flow conditions.

[0163] ​​The traffic flow condition is dynamically changing, and the LLM can process traffic information in real time, such as sudden traffic accidents, road construction and other complex events, and generate adaptive control recommendations. On this basis, the controller combines the dynamic programming algorithm to dynamically adjust the ramp control strategy according to the analysis results provided by the LLM and the real-time traffic conditions at different time stages, so as to realize more accurate and efficient traffic control.

[0164] Generate multi-objective optimization. Traffic management often has multiple goals, such as reducing congestion, reducing exhaust emissions, improving safety, etc. LLM is used to understand the relationship and priority between these goals, and dynamic programming is used to consider these goals to generate ramp control strategies under different traffic conditions to achieve a balance of multiple goals.

[0165] S205, design of variable domain theory type 2 fuzzy controller. In the design of traditional fuzzy controller, the membership function is often fixed and unchangeable, which may cause a series of problems in actual application scenarios. Especially when facing complex and variable control systems, the fixed membership function may cause the control strategy to deviate from the actual situation, making it difficult to achieve the expected control effect. When the domain of the membership function does not match the input and output range of the actual system, the fuzzy controller is difficult to fully utilize its internal fuzzy rules, thereby affecting the accuracy and response speed of the control. Therefore, the invention introduces variable domain control technology, under the premise of keeping the number of fuzzy rules unchanged, by introducing input and output domain scaling factors , the fuzzy domain can be more flexible to match the system input, thereby realizing the "fine enhancement" of fuzzy rules in a local range, and significantly improving the control precision. Assuming the fuzzy controller, the stability and accuracy of the controller output are ensured.

[0166] Assuming the initial input domain of the fuzzy controller is , , the initial output domain is , after adjusting the input domain scaling factor and the output domain scaling factor , the domain is represented as: , , , the domain range of the fuzzy controller is dynamically adjusted by the scaling factor.

[0167] S206, LLM explainability verification, improve the transparency of large language models in ramp control through visualization, feature importance analysis and attribution methods, including visualizing the structure and weight transfer of the input layer (traffic flow, weather, etc.), hidden layer (feature transformation) and output layer (signal light decision); feature importance analysis quantifies the influence of key factors such as traffic flow and occupancy on decision-making; attribution methods trace back to how specific data (such as a surge in traffic at a certain time) triggers a specific control instruction to ensure that the basis for decision-making is traceable. Counterfactual reasoning verifies the rationality of model decision-making logic by simulating changes in traffic flow (such as an increase or decrease in traffic on a certain section), and observing the adaptability of control strategies. Combined with visualization, feature importance analysis and attribution results, the response mechanism of LLM in different congestion scenarios is clear, ensuring its reliability and providing data support for controller optimization (such as adjusting weights or correcting rules).

[0168] Step three, optimization of LLM-based two-type fuzzy controller using simulated annealing genetic algorithm. Simulated annealing genetic algorithm (SAGA) combines the global search ability of genetic algorithm (GA) and the local search ability of simulated annealing algorithm (SA). In this algorithm, global search is achieved by generating an initial population, and each individual in the population represents a set of input-output universe of discourse scaling factors . In the selection operation, the elitist strategy is adopted to retain individuals with high fitness, while the roulette wheel method is used to select other individuals for crossover and mutation operations to produce new offspring individuals, which helps to explore different regions in the solution space and avoid falling into local optima.

[0169] The simulated annealing part accepts inferior solutions with a certain probability according to the Metropolis criterion, and this probability gradually tends to zero as the algorithm progresses. During each generation evolution process, the newly generated offspring individuals have the opportunity to be accepted or rejected according to the specific fitness criteria. This mechanism allows the algorithm to move flexibly in the search space, thus jumping out of the local optimal solution and greatly increasing the possibility of finding the global optimal solution. As Figure 7 shown, specifically:

[0170] S301, fitness function design, design a fitness function to minimize the highway mainline travel time and ramp travel time, the formula is:

[0171] ,

[0172] wherein, represents the highway mainline travel time and ramp travel time, respectively, the mainline and ramp travel time index weight, the dynamic weight is adjusted by LLM according to the scene. The fitness value fThe greater, the better the overall traffic condition, the better the control strategy effect. Through the fitness function, the algorithm will tend to find the combination of the argument scaling factor that makes the main line and ramp travel time optimal in the search process.

[0173] S302、the simulated annealing genetic algorithm optimizes the argument scaling factor, and the specific steps include,

[0174] S3021, initialization, according to the variable range and search accuracy requirement, the argument scaling factor is represented by a binary code as a 32-bit binary chromosome, an initial population is generated, and each individual in the population represents a set of input and output argument scaling factors , the population size is 50, and the initial temperature of simulated annealing is specified =100, the minimum temperature =1 and the cooling coefficient =0.95;

[0175] S3022, selection, crossover and mutation operation updates the population, adopts the elite reservation strategy for selection, reserves a certain number of individuals with the highest fitness value, and selects the remaining individuals through roulette method, then performs crossover and mutation operation, the single-point crossover is adopted for the crossover operation, the probability is =0.7, and the mutation operation randomly flips the gene bit according to the probability =0.01 to generate new offspring individuals;

[0176] S3023, simulated annealing correction, according to the Metropolis criterion to accept new solution, the formula is:

[0177] ,

[0178] wherein, is the temperature of the current generation, is the current solution, is the neighborhood solution, and as the temperature decreases, the probability of accepting inferior solutions tends to zero;

[0179] S3024, algorithm termination, the algorithm termination condition is to reach the maximum iteration number , when the iteration number , the selection, crossover, mutation and simulated annealing correction steps are executed in a loop, and the search is ended when the simulated annealing temperature , at this time, the current optimization solution searched by the algorithm is the final value of the argument scaling factor;

[0180] S303, simulated annealing genetic algorithm optimization, through LLM enhanced initial population optimization, based on historical optimal solution knowledge graph automatically generates high-quality chromosome template, for example, early peak scene parameter combination: main line weight 0.72, ramp weight 0.28, expansion factor 1.15, make the algorithm convergence speed increase by 40%; At the same time, the mutation operation driven by semantics is adopted, when LLM identifies special events such as "heavy rain", the mutation probability of safety related genes is dynamically adjusted , realize the intelligent optimization of traffic scene self-adaptation.

[0181] S304, LLM parameter tuning based on interpretable rules, the interpretable rule generation module constructs a dynamic rule management system, and realizes multi-source rule fusion through LLM, as shown in Table 4:

[0182] Table 4

[0183] ,

[0184] The application realizes LLM parameter tuning through real-time optimization, establishes a dynamic weight adjustment mechanism, and automatically adjusts the control weight parameters according to different traffic scenes. For example, when the traffic flow is normal, the standard ratio of main line weight 0.65, safety weight 0.20 and environmental protection weight 0.15 is adopted, when heavy rain is detected, the safety weight is increased to 0.40, and the main line weight is correspondingly reduced to 0.50; When encountering emergency vehicle passing, the safety weight is further increased to 0.60, to ensure that the special vehicle has priority to pass. At the same time, strict constraint conditions are set, including hard constraint of ramp queue length not more than 300 meters, and soft constraint of priority satisfaction of main line delay control within 15 minutes.

[0185] S305, adaptive domain adjustment, an intelligent domain dynamic scaling mechanism is adopted, through function real-time prediction of traffic flow peak value , and based on the date type, the optimal scaling coefficient is automatically selected: 1.3 times expansion coefficient is adopted in holiday traffic peak period , and 1.1 times conservative coefficient is adopted in weekday period ,

[0186]

[0187] This elastic adjustment strategy makes the control system able to dynamically adapt to the traffic flow characteristics of different periods, which not only ensures the traffic capacity under the large flow of holidays, but also avoids the over allocation of resources in off-peak periods. The system continuously monitors the flow change, and updates the prediction value every 5 minutes, to ensure the timeliness of adjustment.

[0188] S306 and LLM generate optimization reports. LLM automatically generates a multi-dimensional, three-dimensional optimization report. The report structure includes: control strategy description, key performance indicator comparison, root cause diagnosis, and specific improvement suggestions. Optimization reports are generated every 2 hours, supporting historical review and trend analysis. Visual charts intuitively display the control effects at different time periods, providing decision support for managers. All report data comes from the real-time monitoring system and undergoes cross-validation by LLM to ensure accuracy and reliability.

[0189] In step three, the universe of discourse scaling factor obtained through simulated annealing genetic algorithm optimization is applied to the fuzzy controller, enabling intelligent adaptive adjustment based on LLM prediction. The control system then... The function predicts peak traffic flow in real time and dynamically selects the universe of discourse scaling factor (e.g., 1.3 times on holidays / 1.1 times on weekdays) to ensure the fuzzy controller always operates within the optimal universe of discourse range. With a fixed number of fuzzy rules, the input universe of discourse scaling factor adapts the system input to the fuzzy universe of discourse. Through the LLM-driven parameter tuning mechanism, this is equivalent to locally increasing the number of fuzzy rules, improving control accuracy by 41% (comparative experimental data). The output universe of discourse scaling factor, combined with real-time feedback from the 3D optimization report, ensures the stability of the controller output. For example, in highway ramp control, the system updates the prediction parameters every 5 minutes. Based on real-time collected traffic flow and speed data, the green light delay control quantity is obtained through fuzzification, fuzzy inference, and defuzzification processes.

[0190] The optimized domain scaling factor enables the control strategy to intelligently identify holiday / weekday patterns, better adapting to changing traffic environments. In recent 30 days of testing, it has effectively alleviated mainline congestion. Simultaneously, by balancing hard and soft constraints, it considers ramp performance, specifically reducing mainline travel time by 37%, reducing mainline delays by 52%, increasing upstream speeds on the mainline by 29%, and achieving a 98.7% success rate in controlling ramp queue lengths within the threshold. The system's automatically generated optimization report shows that compared to the unoptimized fuzzy control method, this method exhibits better control performance under different traffic flow scenarios: in high-flow scenarios, mainline travel time is reduced by 45% compared to timed control, 32% compared to Type I fuzzy control, and 21% compared to Type II fuzzy control; in low-flow scenarios, while maintaining control effectiveness, the system's stability index is improved by 28%, and its adaptability index by 34%. These improvements are visualized and validated through a 3D optimization report generated by LLM.

[0191] Step four, simulation experiments and practical applications, such as Figure 8 As shown, the specific process is as follows:

[0192] S401、Simulation experiment, the key point of active control of the on-ramp of the expressway is how to reasonably signal timing according to the road information. This needs to comprehensively consider the traffic flow, speed, occupancy rate and other data, as well as the traffic congestion, weather and other information of the Internet platform, to accurately judge the road congestion degree, so as to improve the main line traffic efficiency. At the same time, the queuing constraint of the ramp must be met to avoid congestion and accidents, and ensure smooth and safe traffic, in view of this problem, the best ramp control strategy is found from the aspects of main line performance and ramp performance.

[0193] S4011、Experiment preparation, a Python combined VISSIM simulation method is used, the Jinan ring expressway is taken as the research object, the on-ramp of the Xiaoxujia-Guodian direction is selected as the target section, the traffic flow data of the target section is collected, the peak period and control period are determined, the flow peak and valley are counted, the large and small flow scene parameters are set, the research section model is constructed in VISSIM, the main line and ramp parameters, vehicle types and proportion are set, the main line design speed is 100-120 km / h, four lanes in both directions, according to the actual vehicle composition, the vehicle input type is divided into passenger cars and trucks, the main line vehicle flow proportion is 80%, 20%, the ramp vehicle flow proportion is 70%, 30%, the data collector and queue detector are arranged, and the initial signal timing is set;

[0194] S4012、Experimental variables and strategies, the independent variables of the experiment are traffic flow, vehicle speed and control strategy (fixed time, one type of fuzzy, two types of fuzzy, two types of fuzzy control optimized by simulated annealing genetic algorithm), and the dependent variables are various main line and ramp evaluation indexes; different control strategies are implemented according to their respective rules, the two types of fuzzy control optimized by simulated annealing genetic algorithm optimizes the domain scaling factor through specific algorithm steps, including initialization, fitness calculation, selection, crossover and mutation, simulated annealing correction and iteration to termination condition;

[0195] S4013、Experimental process, preheat for 1200s to stabilize the traffic flow, implement the control strategy and collect data according to the data collection, green light delay calculation and signal timing adjustment steps, collect data with an interval of 120s, repeat the experiment with 3 random seeds for each scene and record the data;

[0196] S4014、Data analysis, calculate the average value of each cycle evaluation index, process the domain scaling factor optimization process data, compare the average values of the indexes of different control strategies under different scenes, determine the best weight of different scenes, evaluate the effect of the two types of fuzzy control system, and prove that the simulated annealing genetic algorithm optimization is effective.

[0197] S402, LLM scenario automatic configuration, combined with the optimization report generated by LLM, the intelligent configuration of the simulation scene is realized through the natural language processing engine, which supports the management personnel to describe the experimental demand using daily language, that is, when the specific traffic scene is input using natural language, LLM will perform multi-dimensional analysis on the traffic scene. For example, when the composite scene instruction "test the heavy rain scene on the first day of the National Day in the morning, including ETC failure rate 20%" is input, LLM will perform multi-dimensional analysis: first, identify the time feature "the first day of the National Day in the morning" to automatically associate the historical traffic pattern (traffic coefficient 1.4), then extract the weather keyword "heavy rain" to match the precipitation dynamics parameters in VISSIM (including visibility, road friction coefficient, etc.), and finally analyze "ETC failure rate 20%" to convert it into a device failure parameter recognizable by the simulator.

[0198] This process involves three key technology layers: A. Semantic understanding layer, using BERT model to extract entities and relationships in the instruction; B. Knowledge mapping layer, matching natural language description with traffic simulation parameter library; C. Logical verification layer, checking the rationality of parameter combination (such as not configuring dry road parameters on a rainy day). The output is a standardized JSON structure that can directly drive the VISSIM simulation engine, while generating a configuration explanation document: "This scene has been configured: holiday traffic enhancement mode (baseline traffic x 1.4), heavy rain weather dynamics model, ETC lane random failure rate 20%. The expected simulation time is 45 minutes, requiring 8GB of memory". This function shortens the complex scene construction time from 2 hours of traditional manual configuration to 5 minutes, and avoids human parameter setting errors;

[0199] S403, LLM result analysis and decision recommendation, based on multi-strategy comparison experiment data, LLM analysis engine builds a decision space containing 12-dimensional feature vectors, generates the optimal control strategy through deep reinforcement learning algorithm, the system first identifies the key decision factors (such as main line traffic saturation 0.82, ramp queue length 280 meters), then matches the control rules in the knowledge base, and finally outputs the recommended scheme with confidence score: "recommend strategy C-7 (green light extension 12 seconds + ramp speed limit 40km / h), expected to reduce main line delay by 23%, confidence 91%". All recommended schemes are accompanied by explainability analysis, including rule trigger chain and expected effect simulation animation.

[0200] S404, control instruction generation and execution, according to the decision recommendation of LLM, automatically generate structured control instructions, each instruction contains: A. Decision basis (quoted analysis conclusion number); B. Action parameters (such as signal timing scheme S-203); C. Execution constraints (such as terminate when the queue is greater than 250 meters). After the instructions are pre-verified by the digital twin system, they are issued to the roadside equipment through an encrypted channel, and the closed loop from decision to execution is completed within 500ms. The system synchronously generates a human-readable execution summary: 08:15 Execute strategy C-7 (derived from analysis report R-42), which has avoided 3 conflict rules, and the expected effect lasts for 8 minutes.

[0201] S405, LLM real-time monitoring, combined with LLM analysis conclusion and control instruction execution feedback, to build a three-level monitoring system: A. Second-level device state inspection (PLC response delay monitoring); B. Minute-level effect evaluation (actual vs. expected index deviation analysis); C. Hour-level strategy optimization (retrain model based on new data). For example, when the monitoring finds that "Guo's ramp actual traffic volume is 15% lower than the predicted value", the system automatically triggers the LLM reanalysis process, generates strategy adjustment suggestions and immediately updates the control instructions, forming a continuous improvement closed loop of "perception-decision-execution-verification". All process data is stored in a spatiotemporal database, supporting state backtracking at any time within 72 hours.

[0202] The application provides a highway ramp traffic control method based on UAV-LLM-FCS, which is used for intelligent control of highway entrance ramp traffic by fusing large language model, UAV monitoring technology and type 2 fuzzy control system. The control technology accurately monitors and analyzes the traffic situation, optimizes the control strategy by intelligent algorithm, not only effectively improves the traffic efficiency of the highway ramp, but also improves the traffic efficiency of the whole road, improves the level of traffic intelligence and automation, and provides better travel service for the public. At the same time, its promotion will also drive the development of UAV manufacturing, intelligent control and other industries, promote the transformation and upgrading of traffic management, logistics distribution and other fields, help to build a collaborative development ecological system, and promote the intelligent and green development of urban traffic.

[0203] The above is only a preferred embodiment of the present application, and cannot limit the scope of the present application. Any simple equivalent changes and modifications made according to the claims and description of the present application are still within the scope of the present application.

Claims

1. A method for ramp metering based on UAV-LLM-FCS, characterized in that, The specific steps of the control method are: Step one, data collection and processing, using a UAV carrying high-precision sensors to collect real-time traffic flow data near the entrance ramp of the expressway; using LLM to semantically analyze multi-modal data, including target detection and identification based on the RT-DETR algorithm to optimize the Transformer structure, using the Kalman filter model to predict vehicle trajectories, and then converting the collected image data to coordinates, converting pixel coordinates to real ground coordinates, extracting and smoothing vehicle trajectories, and counting vehicle flow and average speed within a time window; finally, generating a traffic report stream through LLM; Step two, build a two-type fuzzy control system, based on the matrix semi-tensor product theory, support multi-dimensional input data fusion processing, enhance the expression and calculation ability of the system, based on the real-time collected traffic flow and speed data to divide the fuzzy set, and design its membership function respectively; build a two-input single-output fuzzy reasoning mechanism with traffic flow and speed as input and green light delay as output, generate accurate control instructions through dimension reduction and defuzzification processing; combined with LLM dynamic rule generation technology, analyze multi-source traffic data, and adaptively generate and adjust the fuzzy rule base according to real-time traffic state; introduce the variable domain theory technology, dynamically adjust the stretching factor of the input and output domain, enhance the adaptability of the system to dynamic traffic environment; after obtaining the output control strategy, combine LLM to verify the feasibility and semantic interpretation of the control strategy, ensure its rationality and implementability; Step three, optimize the two-type fuzzy controller, use simulated annealing genetic algorithm to optimize the input and output domain stretching factor, globally search for the optimal parameter combination, combine the interpretable rules obtained by LLM to design an adaptive domain adjustment strategy, real-time scale the fuzzy domain according to the dynamic changes of traffic flow, use the explainability verification module of LLM to generate an optimization report and show the comparison results of key indicators; Step four, simulation experiment and practical application, build an expressway ramp simulation model in the simulation software VISSIM, use the LLM scene automatic configuration function to quickly generate test cases for different flow scenarios, carry out multi-strategy comparison experiments, and use LLM to analyze the experimental results to generate decision recommendations and issue control instructions. Through the real-time monitoring module of LLM, dynamically analyze the control effect and iteratively optimize the algorithm parameters.

2. The method of claim 1, wherein the UAV-LLM-FCS based highway ramp metering method is characterized by, The data collection in step one uses a UAV carrying a "visible light + millimeter wave radar + laser radar" three-in-one gimbal system as the core mobile data collection platform, combined with 6 wireless sensor network nodes deployed within 100m of the ramp entrance, to collect highway ramp aerial video data, visual data, laser radar data and sensor data.

3. The method of claim 2, wherein the UAV-LLM-FCS based highway ramp metering method is characterized by, The process of using LLM to semantically analyze multi-modal data in step one includes, S1021, RT-DETR target detection and identification, the RT-DETR algorithm is used to optimize the traditional Transformer structure, the parameter and the calculation complexity are reduced by simplifying the attention mechanism, and the decoupled feature extraction mechanism and the dynamic attention mechanism are introduced, a plurality of frames are predicted at one time in the detection logic, and the set prediction is carried out through the Hungarian matching algorithm; in order to stabilize the matching of the early true value, the real target is added with noise, and in the noise adding process, the position offset is selected in different ranges of disturbance coefficients in the uniform distribution to limit the positions of the left top corner and the right bottom corner of the coordinate frame after noise adding: The disturbance coefficient of the positive sample is selected from the range of The disturbance coefficient of the negative sample is selected from the range of The formula for calculating the offset position coordinates is as follows: , wherein, is the top-left corner coordinate of the real bounding box; is the bottom-right corner coordinate of the real bounding box, is the width of the real bounding box; is the height of the real bounding box; are perturbation offsets for the top-left and bottom-right corner coordinates, respectively; is a perturbation coefficient sampled from a uniform distribution, used to control the degree of offset. The limited coordinate frame has a part of offset, wherein the frame with larger offset is defined as a negative sample, and the frame with smaller offset is defined as a positive sample; S1022, vehicle trajectory prediction using Kalman filter model, based on the radial velocity, distance and azimuth angle data of the millimeter wave radar, the Kalman filter model is established, and the starting point of the Kalman filter is as follows: , wherein, is the system state vector, the purpose of the Kalman filter is to make the best estimate of the state vector; is the system input vector; is the measurement vector; is the system noise vector; is the measurement noise vector; is the system noise matrix; is the system input matrix; is the measurement matrix; S1023, vehicle trajectory extraction and traffic flow data analysis, after the vehicle is identified and tracked, the trajectory and speed information of the vehicle are extracted for analyzing the vehicle flow and average speed.

4. The method of claim 3, wherein the UAV-LLM-FCS based highway ramp metering method is characterized by, The specific process of step S1023 includes: S10231, coordinate conversion, according to the camera internal parameter and the actual ground length, the ground sampling interval is calculated, and the calculation formula is: , wherein, H is the relative altitude, a is the pixel size, f is the lens focal length; The coordinates of each pixel in the video are converted into the coordinates on the actual ground by using the calculated ground sampling interval; S10232, vehicle trajectory extraction, in YOLOv5-DeepSORT, the center point coordinates and ID values of each target vehicle in each frame are derived, the center point coordinates of the vehicles with the same ID are connected into a line to form the vehicle driving trajectory; S10233、Calculate the traffic flow , define the time window, count the number of vehicles passing through the ramp in each time window, and the calculation formula is: , wherein, is the time window the total number of detected vehicles, is an indicator function that takes the value 1 when a vehicle passes through the time window and 0 otherwise. ​ S10234、calculate average vehicle speed The frame difference method is used to calculate the displacement of the vehicle between two frames and the time difference, and then the speed is calculated. The average speed is obtained by averaging the speed of all vehicles. The calculation formula is: , wherein, is the time window is the total number of vehicles detected, is an indicator function that takes the value 1 when a vehicle passes through the time window and 0 otherwise. is the time window 5. The method of claim 4, wherein the UAV-LLM-FCS based highway ramp metering method is characterized by, The step of constructing the two-type fuzzy control system in step two includes: S201, division of fuzzy sets, taking the traffic flow and the vehicle speed as input variables, taking the green light delay as an output variable, dividing the input variables traffic flow and average speed into five subsets respectively, and dividing the output variable green light delay into nine subsets, The process of fuzzification uses the membership function to represent the degree to which the input variable belongs to a certain fuzzy set, and the Gaussian membership function of the traffic flow is represented as: , wherein, is the traffic flow belongs to the membership of the Gaussian fuzzy set with as the center, as the standard deviation, is the center value of the Gaussian function, representing the typical traffic flow value of the fuzzy set, is the standard deviation of the Gaussian function, determining the width of the membership function curve, i.e. the range of variation of the traffic flow value around the center value ; The Gaussian membership function of the vehicle speed is represented as: , wherein is the vehicle speed is a membership function belonging to a Gaussian fuzzy set with as the center value and as the standard deviation; is the center value of the Gaussian function, representing the typical vehicle speed value of the fuzzy set; is the standard deviation of the Gaussian function, determining the width of the membership function curve, i.e. the range of variation of the vehicle speed value around the center value ; S202, fuzzy reasoning, the specific process of the fuzzy reasoning includes: S2021, design of fuzzy rules, based on the intersection of the five subsets of the input variables traffic flow and average speed, 25 fuzzy rules are designed; S2022、calculate the activation degree interval, calculate the activation degree interval of each rule The formula is: , wherein, and are two input variables of the controller, and are input variables for the lower membership function value and the upper membership function value of the interval-valued fuzzy set and are input variables for the lower membership function value and the upper membership function value of the fuzzy set ;​ S2023, reduction, the interval two-type fuzzy set is reduced, and the reducer formula is: , wherein and respectively represent the left and right end points of the interval after the decrease. S203, Deblurring, the deblurring technique is the key step to convert the fuzzy output into the accurate control quantity, the calculation formula of the left end point value of the post-reduction interval is: , right endpoint value The calculation method is the same, and the final output of the controller is the arithmetic mean of the descending interval: 。 6. The method of claim 5, wherein the UAV-LLM-FCS based highway ramp metering method is characterized by, The step of constructing the two-type fuzzy control system in step two further includes: S204, LLM dynamic programming generation, mainly including using LLM to analyze real-time traffic report text, extracting key information, and integrating these information into the state of dynamic programming; using the understanding ability of LLM to traffic domain text knowledge, combining with dynamic programming algorithm, analyzing historical traffic flow data to generate more accurate traffic flow prediction results; using LLM to understand traffic control rules and targets, and through cost-benefit analysis of different ramp control actions, dynamically generating the optimal ramp control strategy; LLM combines dynamic programming algorithm to consider the dynamic changes of traffic flow, and dynamically adjusts the ramp control strategy according to the new traffic conditions at different time stages; multi-objective optimization is generated, LLM can understand the relationship and priority between different traffic management targets, and generate ramp control strategies under different traffic flow conditions to achieve the balance of multiple targets; S205, the variable domain theory type fuzzy controller design, in keeping the number of fuzzy rules unchanged premise, introduce the input output domain scale factor , assuming that the initial input domain of fuzzy controller is 、 , the initial output domain is , through the input domain scale factor And output domain scale factor Adjustment, domain representation is: 、 、 , dynamically adjust the domain range of fuzzy controller; S206, LLM explainability verification, through visualization, feature importance analysis and attribution method to improve the transparency of large language model in ramp control, through counterfactual reasoning to verify the rationality of model decision logic, and observe the adaptability of control strategy; combining visualization, feature importance analysis and attribution results, the response mechanism of LLM in different congestion scenarios is clear, and its reliability is ensured, and data support is provided for controller optimization.

7. The method of claim 6, wherein the method is based on a UAV-LLM-FCS. The specific process of the third step of optimizing the type-2 fuzzy controller is: S301, fitness function design, a fitness function is designed to minimize the highway main line travel time and ramp travel time, and the formula is: , wherein respectively represent the freeway mainline, ramp travel time, respectively represent the mainline, ramp travel time index weight, fitness value f The greater, the better the overall traffic conditions, the better the control strategy effect; through this fitness function, the algorithm will tend to find the combination of the argument stretching factor that makes the mainline and ramp travel time optimal in the search process; S302, the annealing genetic algorithm optimizes the domain scaling factor, S3021、Initialization, according to the variable range and search accuracy requirements, the argument scaling factor represented by binary encoding as a binary chromosome, generate an initial population, each individual in the population represents a set of input and output argument scaling factor , and the initial temperature of simulated annealing is specified , the minimum temperature and the cooling coefficient ; S3022, update the population by selection, crossover, and mutation operations, select the individuals with the highest fitness values by using the elitist strategy, select the remaining individuals by using the roulette method, and then perform the crossover and mutation operations, the single-point crossover is used in the crossover operation, the probability is , the mutation operation randomly flips the gene bits according to the probability to generate new offspring individuals; S3023, annealing correction, according to the Metropolis criterion to accept new solutions, and the formula is: , wherein, is the current temperature, is the current temperature, is the current solution, is the neighborhood solution, as the temperature decreases, the probability of accepting a poor solution tends to zero; S3024, the algorithm terminates, and the algorithm termination condition is that the maximum iteration number is reached When the iteration number , the selection, crossover, mutation and simulated annealing correction steps are executed in a loop, and the search ends when the simulated annealing temperature , at which time the current optimization solution searched by the algorithm is the final value of the domain scaling factor; S303, simulated annealing genetic algorithm optimization, through LLM enhanced initial population optimization, the system generates high-quality chromosome template based on historical optimal solution knowledge graph, and adopts semantic driven mutation operation, when LLM identifies special events, dynamically adjusts the mutation probability of related genes ; S304, LLM parameter tuning method based on interpretable rules, through the generated interpretable rules to realize real-time optimization of parameters, and establish a dynamic weight adjustment mechanism, which can automatically adjust the control weight parameters according to different traffic scenes: in normal traffic flow, each weight adopts the standard proportioning of the preset, once the system detects a special event, the weights are adjusted according to the rules, so as to improve the control response ability; at the same time, the system sets strict constraint conditions to ensure that all control behaviors are executed within the boundary range, and the safety and real-time requirements are given priority.

8. The method of claim 7, wherein the UAV-LLM-FCS based highway ramp metering method is characterized by, The specific process of the third step of optimizing the type-2 fuzzy controller further includes: S305, adaptive domain adjustment, using intelligent domain dynamic scaling mechanism, through Real-time prediction of traffic flow peak value , and automatically select the optimal scaling coefficient based on the date type: use 1.3 times expansion coefficient during holiday traffic peak period , and use 1.1 times conservative coefficient during weekdays , , S306, LLM generates an optimization report, LLM automatically generates an optimization report containing multiple dimensions, and the report structure includes: control strategy explanation, key performance indicator comparison, root cause diagnosis and specific improvement suggestions.

9. The method of claim 8, wherein the UAV-LLM-FCS based highway ramp metering method is characterized by, The specific process of the fourth step of simulation experiment and actual application is: S401, simulation experiment, S4011, Experiment preparation, adopt Python combined with VISSIM simulation method, take the entrance ramp of the highway in actual operation as the target section, collect traffic flow data of the target section, determine peak period and control period, count peak and valley values of traffic flow, set large and small traffic flow scene parameters, build research section model in VISSIM, set main line and ramp parameters, vehicle types and proportion, arrange data collectors and queue detectors, set initial timing of signal lights; S4012, Experimental variables and strategies, the independent variables of the experiment are traffic flow, vehicle speed and control strategy, and the dependent variables are various main line and ramp evaluation indexes; different control strategies are implemented according to their respective rules, and the type-2 fuzzy control optimized by simulated annealing genetic algorithm optimizes the domain scaling factor through the algorithm steps in step three, including initialization, calculation of fitness, selection, crossover and mutation, simulated annealing correction and iteration to termination condition; S4013, Experimental process, first preheat for 1200s to stabilize the traffic flow, then implement the control strategy and collect data according to the data collection, green light delay calculation and signal timing adjustment steps in a cycle; S4014, Data analysis, calculate the average value of each cycle evaluation index, process the data of the domain scaling factor optimization process, compare the average values of the indexes of different control strategies under different scenes, determine the best weight of different scenes, and evaluate the effect of the type-2 fuzzy control system; S402, LLM scene automatic configuration, combined with the optimization report generated by LLM, realize intelligent configuration of simulation scene through natural language processing engine, support management personnel to describe experimental requirements using daily language, LLM will perform multi-dimensional analysis on the experimental requirements described by the daily language, and output as a standardized JSON structure, directly drive VISSIM simulation engine to run, and generate configuration specification document at the same time; S403, LLM result analysis and decision recommendation, based on multi-strategy comparison experimental data, LLM analysis engine builds a decision space containing 12-dimensional feature vector, generates optimal control strategy through type-2 fuzzy controller and deep reinforcement learning algorithm; S404, Control instruction generation and execution, automatically generate structured control instructions according to the decision recommendation of LLM; S405, LLM real-time monitoring, combined with LLM analysis conclusion and control instruction execution feedback, build a three-level monitoring system, including second-level device state inspection, minute-level effect evaluation and hour-level strategy optimization, when the monitoring system finds that the ramp traffic appears abnormal data, automatically trigger LLM reanalysis process, generate strategy adjustment suggestion and immediately update control instruction, form the continuous improvement closed loop of "perception-decision-execution-verification".

Citation Information

Patent Citations

  • Layered fuzzy entrance ramp control method for relieving traffic jam

    CN116311985A

  • High-speed ramp traffic control method and device, terminal equipment and medium

    CN118172932A