Face recognition channel gate and control method of channel gate
Patent Information
- Application Number
- CN202610804328.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-05
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2046-06-05
AI Technical Summary
[0002]体育馆、会展中心作为大型公共活动场所,举办赛事、展会时存在人流集中、检票效率要求高、人流工况复杂多变的特点,电子门票检票通道闸机是实现人员有序通行的核心设备,传统的通道闸机多采用常规PID控制或简单的模糊PID控制方法驱动闸杆运动,常规PID控制的参数为固定值,难以适配高峰、平峰、突发人流等不同工况,闸杆运动易出现响应滞后、超调量大的问题,高峰时检票效率低,平峰时闸杆运动不平稳易产生机械磨损;传统模糊PID控制的参数整定依赖人工经验,模糊规则的自适应能力弱,无法根据人流的动态变化实时调整控制策略,面对突发人流时易出现闸机卡滞、人员滞留的情况;传统闸机仅根据门票核验结果执行闸杆的抬升/降落动作,未结合人流工况进行提前预测和控制,导致闸机控制的前瞻性不足,难以满足大型场馆的高检票效率需求
[0015]In the technical solution provided by this invention, the main control module parameters of the turnstile are initialized, the initial parameters of the PSO-FNN-fuzzy PID algorithm and the network parameters of the Attention-LSTM pedestrian flow prediction model are set, and the target position, target speed and control error threshold of the gate arm movement are preset; the pedestrian flow sensing module collects raw data of pedestrian flow conditions at the turnstile channel entrance, the electronic ticket verification module collects face images in real time for face recognition, and performs rapid face comparison with the ticket purchaser in the electronic ticket database to verify the electronic ticket information; the detection sensor group collects real-time motion status data of the gate arm and pedestrian passage status data within the channel; the main control module... The collected raw pedestrian flow data is normalized and preprocessed, then input into the Attention-LSTM pedestrian flow prediction model to predict the dynamic trend of pedestrian flow changes within a preset time period, and outputs the predicted pedestrian flow data. The main control module determines the control deviation and deviation rate of change of the gate arm movement based on the ticket verification result signal, the predicted pedestrian flow data, and the feedback signals from the detection sensor group. The control deviation is the difference between the target motion parameters and the real-time motion parameters of the gate arm, and the deviation rate of change is the real-time rate of change of the control deviation. The main control module inputs the control deviation and deviation rate of change into the PSO-FNN-PID controller, and outputs the motion execution module's... The control parameters are adjusted dynamically, including the proportional coefficient, integral time constant, and derivative time constant of the PID controller. The main control module generates control commands based on these adjusted parameters, and outputs drive current to the motion execution module via the drive module to control the gate arm. A sensor array collects feedback data on the gate arm's movement in real time. If the deviation between the feedback data and the target parameters exceeds the control error threshold, the control deviation is recalculated and the PID parameters are dynamically corrected. If the deviation is within the control error threshold, the gate control process for this ticket check is completed. This invention can adjust the gate control strategy in advance according to dynamic changes in passenger flow, significantly improving ticket checking efficiency. Through inertial factor self-regulation... The adaptive adjustment strategy optimizes the PSO algorithm, balancing global optimization and local convergence capabilities. By optimizing the connection weights of the fuzzy neural network using the PSO algorithm, the collaborative optimization of PID parameters and fuzzy rules is achieved, solving the problems of traditional fuzzy PID parameter tuning relying on experience and having weak adaptive capabilities. This results in faster convergence speed, lower overshoot, and smoother gate arm movement. The Attention-LSTM pedestrian flow prediction model can accurately predict future changes in pedestrian flow conditions, improving gate response speed during peak hours and reducing mechanical wear during off-peak hours. It adapts to complex pedestrian flow conditions, improving the operational stability of the gate and the user experience.
Smart Images

Figure CN122336879B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of turnstile control technology, specifically to a face recognition access gate and a control method for the access gate. Background Technology
[0002] Stadiums and convention centers, as large public venues, are characterized by concentrated crowds, high ticket checking efficiency requirements, and complex and variable crowd conditions when hosting events and exhibitions. Electronic ticket gate systems are the core equipment for ensuring orderly passage of people. Traditional gate systems often use conventional PID control or simple fuzzy PID control methods to drive the gate arm movement. Conventional PID control parameters are fixed values, making it difficult to adapt to different conditions such as peak hours, off-peak hours, and sudden surges in crowds. The gate arm movement is prone to problems such as response lag and large overshoot. Ticket checking efficiency is low during peak hours, and the gate arm movement is unstable during off-peak hours, which can easily cause mechanical wear. The parameter tuning of traditional fuzzy PID control relies on human experience, and the adaptive ability of fuzzy rules is weak. It cannot adjust the control strategy in real time according to the dynamic changes in crowd flow, which can easily lead to gate jamming and people being stranded when facing sudden surges in crowds. Traditional gate systems only execute the raising / lowering action of the gate arm based on the ticket verification result, without combining it with advance prediction and control of crowd flow conditions. This results in insufficient foresight of the gate control and makes it difficult to meet the high ticket checking efficiency requirements of large venues. Summary of the Invention
[0003] The purpose of this invention is to solve the above problems by designing a face recognition access gate and a control method for the access gate.
[0004] The first aspect of this invention provides a face recognition access control gate, comprising a gate body, an electronic ticket verification module, a people flow sensing module, a motion execution module, a main control module, and a drive module, wherein... The turnstile body includes a gate arm, a frame, a camera, and a detection sensor group. The camera is used to capture facial images, and the detection sensor group is used to detect the movement position and speed of the gate arm and the passage status of people in the channel. The electronic ticket verification module is used to collect facial images for facial recognition, quickly compare the faces with those of ticket purchasers in the electronic ticket database, verify the electronic ticket information, and output the verification result signal to the main control module. The pedestrian flow sensing module is used to collect information on pedestrian density, pedestrian movement speed and pedestrian queue length at the gate entrance, and output pedestrian flow status signals to the main control module. The motion execution module is used to drive the raising and lowering of the gate arm; The drive module is used to receive control commands from the main control module and output the appropriate drive current to the motion execution module. The main control module is electrically connected to the electronic ticket verification module, the people flow sensing module, the detection sensor group, and the drive module, respectively. It is used to output real-time control commands to the drive module based on the verification result signal, the people flow condition signal, and the feedback signal from the detection sensor group.
[0005] A second aspect of the present invention provides a control method for a face recognition access gate, the method comprising the following steps: Initialize the main control module parameters of the gate, set the initial parameters of the PSO-FNN-fuzzy PID algorithm and the network parameters of the Attention-LSTM pedestrian flow prediction model, and preset the target position, target speed and control error threshold of the gate arm movement; The pedestrian flow sensing module collects raw data on pedestrian flow conditions at the gate entrance, the electronic ticket verification module collects facial images in real time for facial recognition, and quickly compares the faces with those of ticket purchasers in the electronic ticket database to verify electronic ticket information. The detection sensor group collects real-time motion status data of the gate arm and pedestrian passage status data within the passage. The main control module performs normalization preprocessing on the collected raw data of pedestrian flow conditions, inputs it into the Attention-LSTM pedestrian flow prediction model, predicts the dynamic change trend of pedestrian flow within a preset time period, and outputs the predicted value of pedestrian flow conditions. The main control module determines the control deviation and deviation change rate of the gate arm movement based on the ticket verification result signal, the predicted value of the passenger flow, and the feedback signal of the detection sensor group. The control deviation is the difference between the target motion parameter and the real-time motion parameter of the gate arm, and the deviation change rate is the real-time change rate of the control deviation. The main control module inputs the control deviation and the rate of change of deviation to the PSO-FNN-PID controller, and outputs the control parameter correction amount of the motion execution module to dynamically adjust the proportional coefficient, integral time constant and derivative time constant of the PID controller. The main control module generates control commands based on the adjusted parameters, and outputs drive current to the motion execution module through the drive module to control the gate arm to complete the action; The sensor group collects feedback data on the movement of the gate arm in real time. If the deviation between the feedback data and the target parameter exceeds the control error threshold, the control deviation is recalculated and the PID parameters are dynamically corrected. If the deviation is within the control error threshold, the gate control process for this ticket check is completed.
[0006] Optionally, in the first implementation of the second aspect of the present invention, the main control module performs normalization preprocessing on the collected raw data of pedestrian flow conditions, inputs it into the Attention-LSTM pedestrian flow prediction model, predicts the dynamic change trend of pedestrian flow within a preset time period, and outputs the predicted value of pedestrian flow conditions, including: The collected raw data on pedestrian flow conditions is cleaned to remove outliers, missing values, and duplicates, resulting in standardized basic data on pedestrian flow conditions.
[0007] Normalization is performed on the normalized basic data of pedestrian flow conditions to obtain normalized standard pedestrian flow condition data; The normalized standard pedestrian flow condition data is reconstructed according to the time series. The continuous time series data is divided into multiple input samples and input into the Attention-LSTM pedestrian flow prediction model. Each input sample includes all pedestrian flow condition feature data within the corresponding time window. By using the input gate, forget gate, and output gate of the LSTM layer, the characteristics of pedestrian flow changes are extracted, and the hidden layer feature vector is generated. The hidden layer feature vector output by the LSTM layer is input into the Attention mechanism layer. The Attention mechanism layer calculates the weight of each feature dimension in the hidden layer and assigns different attention weights according to the importance of each feature dimension to the prediction of pedestrian flow. The weighted hidden layer feature vectors are weighted and summed to generate a fused feature vector. The fused feature vector is then input into a fully connected layer, where a linear transformation and feature integration are performed. The high-dimensional fused feature vector is then mapped to a preset dimension for predicting pedestrian flow conditions. The output layer parses the processing results of the fully connected layer and outputs the predicted results of the passenger flow conditions within a preset time period.
[0008] Optionally, in a second implementation of the second aspect of the present invention, the construction process of the PSO-FNN-PID controller includes: A 6-layer fuzzy neural network is constructed, with the control deviation and the rate of change of deviation as inputs and the PID parameter correction as outputs; An adaptive adjustment strategy based on inertia factor is adopted to improve the PSO algorithm. The fitness function of PSO is set with the goal of minimizing the control error of the fuzzy neural network, and the connection weights of each layer of the fuzzy neural network are optimized through the PSO algorithm. The optimized fuzzy neural network is combined with fuzzy PID to obtain the PSO-FNN-PID controller.
[0009] Optionally, in a third implementation of the second aspect of the present invention, the fuzzification layer of the fuzzy neural network adopts an S-shaped membership function, the fuzzy rule layer constructs 25 fuzzy inference rules, the normalization layer uses the ratio method to process the fuzzy rule output, and the defuzzification layer outputs the PID parameter correction amount.
[0010] Optionally, in the fourth implementation of the second aspect of the present invention, the two input variables, control deviation and deviation change rate, of the fuzzy neural network are passed into the fuzzification layer. The fuzzification layer uses an S-shaped membership function to fuzzify the two input variables respectively, converting continuous input variable values into fuzzy quantities. At the same time, each input variable is divided into five fuzzy states: negative large, negative small, zero, positive small, and positive large, to obtain the membership value of each input variable corresponding to each fuzzy state. The membership values of the two input variables are passed into the fuzzy rule layer. Based on the setting that each of the two input variables contains five fuzzy states, the fuzzy rule layer constructs 25 fuzzy inference rules by 5x5. Each rule corresponds to a combination of fuzzy states of the input variables and the corresponding output logic. The membership values of the input variables are matched one by one with the 25 fuzzy inference rules to obtain the trigger strength corresponding to each fuzzy inference rule. The trigger strength is passed to the normalization layer. First, the sum of all trigger strengths is calculated. Then, the ratio of the trigger strength of each fuzzy inference rule to the sum is calculated to complete the normalization operation and obtain the normalized output value of each fuzzy inference rule. The normalized output values of all fuzzy inference rules are fed into the defuzzification layer for integration and calculation, and converted into numerical quantities. Finally, the proportional coefficient correction, integral time constant correction, and differential time constant correction are output.
[0011] Optionally, in the fifth implementation of the second aspect of the present invention, the step of improving the PSO algorithm by adopting an adaptive adjustment strategy of inertia factor, setting the fitness function of PSO with the goal of minimizing the control error of the fuzzy neural network, and optimizing the connection weights of each layer of the fuzzy neural network through the PSO algorithm includes: Initialize the particle swarm size, maximum number of iterations, initial position and initial velocity of each particle, individual optimal position of each particle, and global optimal position of the entire particle swarm for the improved PSO algorithm. A fitness function for the PSO algorithm with the goal of minimizing the control error of the fuzzy neural network is constructed. The connection weights mapped to the current position of each particle in the particle swarm are substituted into the fuzzy neural network to calculate the current fitness value of each particle. Compare the current fitness value of each particle with the fitness value corresponding to the best position of the historical individual. If the current fitness value is better, update the best position of the current particle to the current position. If it is not better, keep the original best position unchanged. Compare the current fitness value of all particles with the fitness value corresponding to the historical global best position of the particle swarm. If a particle has a better current fitness value, update the global best position of the particle swarm to the current position of that particle. If it is not better, keep the original global best position unchanged. If the current iteration count reaches the maximum iteration count, the iteration is terminated, the global optimal position of the particle swarm is obtained, the optimal solution of the connection weights of each layer of the fuzzy neural network is obtained, and the value is assigned to the fuzzy neural network.
[0012] Optionally, in a sixth implementation of the second aspect of the present invention, the dynamic adjustment of the proportional coefficient, integral time constant, and derivative time constant of the PID includes: When the predicted value of the pedestrian flow is the peak pedestrian flow, increase the proportional coefficient and decrease the integral time constant; When the predicted value of the passenger flow is the off-peak passenger flow, adjust the PID parameters to make the gate arm move smoothly and reduce the overshoot. When personnel are detected remaining in the passage, the differential time constant is increased, the gate arm lowering action is stopped, and the gate arm is raised to a safe position.
[0013] A third aspect of the present invention provides a control device for a face recognition access gate, the control device comprising a memory and at least one processor, the memory storing instructions; the at least one processor invokes the instructions in the memory to cause the control device to perform various steps of the control method for the access gate as described in any of the preceding claims.
[0014] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the steps of the control method for a turnstile as described in any of the preceding claims.
[0015] In the technical solution provided by this invention, the main control module parameters of the turnstile are initialized, the initial parameters of the PSO-FNN-fuzzy PID algorithm and the network parameters of the Attention-LSTM pedestrian flow prediction model are set, and the target position, target speed and control error threshold of the gate arm movement are preset; the pedestrian flow sensing module collects raw data of pedestrian flow conditions at the turnstile channel entrance, the electronic ticket verification module collects face images in real time for face recognition, and performs rapid face comparison with the ticket purchaser in the electronic ticket database to verify the electronic ticket information; the detection sensor group collects real-time motion status data of the gate arm and pedestrian passage status data within the channel; the main control module... The collected raw pedestrian flow data is normalized and preprocessed, then input into the Attention-LSTM pedestrian flow prediction model to predict the dynamic trend of pedestrian flow changes within a preset time period, and outputs the predicted pedestrian flow data. The main control module determines the control deviation and deviation rate of change of the gate arm movement based on the ticket verification result signal, the predicted pedestrian flow data, and the feedback signals from the detection sensor group. The control deviation is the difference between the target motion parameters and the real-time motion parameters of the gate arm, and the deviation rate of change is the real-time rate of change of the control deviation. The main control module inputs the control deviation and deviation rate of change into the PSO-FNN-PID controller, and outputs the motion execution module's... The control parameters are adjusted dynamically, including the proportional coefficient, integral time constant, and derivative time constant of the PID controller. The main control module generates control commands based on these adjusted parameters, and outputs drive current to the motion execution module via the drive module to control the gate arm. A sensor array collects feedback data on the gate arm's movement in real time. If the deviation between the feedback data and the target parameters exceeds the control error threshold, the control deviation is recalculated and the PID parameters are dynamically corrected. If the deviation is within the control error threshold, the gate control process for this ticket check is completed. This invention can adjust the gate control strategy in advance according to dynamic changes in passenger flow, significantly improving ticket checking efficiency. Through inertial factor self-regulation... The adaptive adjustment strategy optimizes the PSO algorithm, balancing global optimization and local convergence capabilities. By optimizing the connection weights of the fuzzy neural network using the PSO algorithm, the collaborative optimization of PID parameters and fuzzy rules is achieved, solving the problems of traditional fuzzy PID parameter tuning relying on experience and having weak adaptive capabilities. This results in faster convergence speed, lower overshoot, and smoother gate arm movement. The Attention-LSTM pedestrian flow prediction model can accurately predict future changes in pedestrian flow conditions, improving gate response speed during peak hours and reducing mechanical wear during off-peak hours. It adapts to complex pedestrian flow conditions, improving the operational stability of the gate and the user experience. Attached Figure Description
[0016] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention.
[0017] Figure 1 This is a schematic diagram of the first embodiment of the control method for a turnstile provided in this invention; Figure 2 A schematic diagram of a second embodiment of the control method for a turnstile provided in this invention; Figure 3 This is a schematic diagram of the control equipment for a turnstile provided in an embodiment of the present invention. Detailed Implementation
[0018] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0019] For ease of understanding, the specific process of an embodiment of the present invention is described below. A face recognition access gate includes a gate body, an electronic ticket verification module, a people flow sensing module, a motion execution module, a main control module, and a drive module, wherein... The turnstile body includes a gate arm, a frame, a camera, and a detection sensor group. The camera is used to capture facial images, and the detection sensor group is used to detect the movement position and speed of the gate arm and the passage status of people in the channel. The electronic ticket verification module is used to collect facial images for facial recognition, quickly compare the faces with those of ticket purchasers in the electronic ticket database, verify the electronic ticket information, and output the verification result signal to the main control module. The pedestrian flow sensing module is used to collect information on pedestrian density, pedestrian movement speed and pedestrian queue length at the gate entrance, and output pedestrian flow status signals to the main control module. The motion execution module is used to drive the raising and lowering of the gate arm; The drive module is used to receive control commands from the main control module and output the appropriate drive current to the motion execution module. The main control module is electrically connected to the electronic ticket verification module, the people flow sensing module, the detection sensor group, and the drive module, respectively. It is used to output real-time control commands to the drive module based on the verification result signal, the people flow condition signal, and the feedback signal from the detection sensor group.
[0020] In this embodiment, cameras or infrared sensors are used to count the number of people per unit area, or the current population density value is obtained based on the queue length and average spacing.
[0021] Please see Figure 1 A schematic diagram of the first embodiment of the control method for a turnstile provided in this invention. The method specifically includes the following steps: Step 101: Initialize the main control module parameters of the gate, set the initial parameters of the PSO-FNN-fuzzy PID algorithm and the network parameters of the Attention-LSTM pedestrian flow prediction model, and preset the target position, target speed and control error threshold of the gate arm movement; Step 102: The pedestrian flow sensing module collects raw data on pedestrian flow conditions at the gate entrance; the electronic ticket verification module collects facial images in real time for facial recognition and quickly compares them with the faces of ticket purchasers in the electronic ticket database to verify electronic ticket information; and the detection sensor group collects real-time motion status data of the gate arm and pedestrian passage status data within the passage. In this embodiment, audience facial images are captured in real time, and a liveness detection algorithm is used to eliminate forgery attacks such as photos and videos, ensuring the biometric authenticity of the collected data. The captured facial images are input into a lightweight MobileFaceNet model, which extracts multi-scale facial features through a feature pyramid network. An attention mechanism is used to enhance adaptability to occlusions such as masks and glasses. The faces are then compared with pre-stored ticket purchaser information in the electronic ticket database to verify the electronic ticket information. Step 103: The main control module performs normalization preprocessing on the collected raw data of pedestrian flow conditions, inputs it into the Attention-LSTM pedestrian flow prediction model, predicts the dynamic change trend of pedestrian flow within a preset time period, and outputs the predicted value of pedestrian flow conditions. In this embodiment, the collected raw data on pedestrian flow conditions is cleaned to remove outliers, missing values, and duplicate values, resulting in normalized basic data on pedestrian flow conditions. Normalization is performed on the normalized basic pedestrian flow data to obtain normalized standard pedestrian flow data. This normalized standard pedestrian flow data is then reconstructed according to a time series, dividing the continuous time series data into multiple input samples, which are then input into the Attention-LSTM pedestrian flow prediction model. Each input sample includes all pedestrian flow feature data within the corresponding time window. Pedestrian flow change features are extracted through the input gate, forget gate, and output gate of the LSTM layer, generating hidden layer feature vectors. These hidden layer feature vectors are then input into the Attention mechanism layer, which calculates weights for each feature dimension in the hidden layer, assigning different attention weights based on the importance of each feature dimension to pedestrian flow prediction. The weighted hidden layer feature vectors are then weighted and summed to generate a fused feature vector, which is input into a fully connected layer. This fused feature vector undergoes linear transformation and feature integration, mapping the high-dimensional fused feature vector to a preset pedestrian flow prediction dimension. Finally, the output layer parses the processing results of the fully connected layer and outputs the pedestrian flow prediction results for a preset future time period.
[0022] The key parameters of the Attention-LSTM crowd prediction model and the PSO-FNN-fuzzy PID controller can be configured as follows. The input features of the Attention-LSTM crowd prediction model include crowd density, average moving speed, queue length, number of people passing through per unit time, number of people remaining at the turnstile, and time stamp features. The time window length is set to 10 to 30 sampling periods, preferably 20 sampling periods, and the sampling interval is 1 to 5 seconds, preferably 2 seconds. The model includes an input layer, two LSTM layers, an Attention layer, a fully connected layer, and an output layer. The first LSTM layer has 64 hidden units, and the second LSTM layer has 32 hidden units. The activation function of the LSTM layers is the tanh function, the gating unit is the sigmoid function, and the dropout coefficient is set to 0.2 to suppress overfitting. The Attention layer is used to weight the hidden state sequence output by the second LSTM layer. The attention weights are obtained by normalization using the softmax function, and their calculation formula is: αt = softmax(vT·tanh(Wht+b)) Where ht is the hidden state at time t, W, v, and b are trainable parameters, and αt is the attention weight at the corresponding time. The weighted sum is used to obtain the fused feature vector, which is then input into the fully connected layer. The number of neurons in the fully connected layer is set to 16, and the number of neurons in the output layer is determined according to the prediction target, preferably outputting predicted values for pedestrian density, pedestrian speed, and queue length within the next 10, 20, or 30 seconds. The model is trained using the Adam optimizer with a learning rate of 0.001, a batch size of 32, and 100 to 300 training epochs. The loss function is mean squared error (MSE), and training is stopped early when the validation set loss does not decrease for 20 consecutive epochs.
[0023] The PSO algorithm is used to optimize fuzzy neural networks and PID control parameters. The particle swarm size is set to 20-50, preferably 30; the maximum number of iterations is set to 100-200, preferably 150; the inertia weight w decreases linearly from 0.9 to 0.4; both the individual learning factor c1 and the swarm learning factor c2 are set to 2.0; and the particle velocity is limited to 10%-20% of the parameter search range. The particle position vector includes the initial PID parameters Kp, Ti, and Td, as well as the membership function center, width, and output layer connection weights of the fuzzy neural network. The fitness function comprehensively considers the gate position error, velocity error, overshoot, settling time, and safety penalty term, and can be expressed as: J=a1∫|e(t)|dt+a2∫e²(t)dt+a3σ+a4Ts+a5S, Where e(t) is the control error, σ is the overshoot, Ts is the settling time, S is the penalty for personnel being stranded or trapped, and a1 to a5 are weighting coefficients, preferably 0.25, 0.25, 0.2, 0.2, and 0.1 respectively. After the PSO iteration is completed, the parameters corresponding to the globally optimal particle are used as the initial parameters of the FNN-fuzzy PID controller.
[0024] The inputs to the fuzzy neural network are the control deviation *e* and the rate of change of deviation *ec*, and the outputs are the PID parameter corrections ΔKp, ΔTi, and ΔTd. The input variables are divided into seven fuzzy language levels: NB, NM, NS, ZO, PS, PM, and PB, representing negative large, negative medium, negative small, zero, positive small, positive medium, and positive large, respectively. The membership function is a Gaussian function with a normalized universe of discourse of [-1, 1]. The output variables also use the same seven language levels. The fuzzy rule table can be set according to the following principles: when *e* is large and *ec* increases in the same direction, increase *Kp*, decrease *Ti*, and increase *Td* to improve the response speed and suppress error expansion; when *e* is small and *ec* is close to zero, appropriately decrease *Kp*, increase *Ti*, and decrease *Td* to ensure smooth gate positioning; when *ec* changes rapidly in the opposite direction, increase *Td* to suppress overshoot. In the specific rule table, the fuzzy rule for ΔKp can be set as follows: when e changes from NB to PB and ec changes from NB to PB, the output is arranged in the following order: "PB, PB, PM, PM, PS, ZO, ZO; PB, PM, PM, PS, PS, ZO, NS; PM, PM, PS, PS, ZO, NS, NS; PM, PS, PS, ZO, NS, NS, NM; PS, PS, ZO, NS, NS, NM, NM; PS, ZO, NS, NM, NM, NM, NB; ZO, ZO, NM, NM, NM, NB, NB". The rule for ΔTi is set opposite to that for ΔKp to avoid integral saturation; ΔTd takes PM or PB when the absolute value of ec is large, and takes ZO or NS when ec is close to zero. Based on the above rules, the controller can dynamically adjust the PID parameters according to the pedestrian flow prediction results and the real-time feedback from the gate, so that the gate can respond quickly during peak pedestrian flow, operate smoothly during off-peak pedestrian flow, and prioritize the execution of safety protection actions when people are stuck or there is abnormal passage.
[0025] Step 104: The main control module determines the control deviation and deviation change rate of the gate arm movement based on the ticket verification result signal, the predicted value of the passenger flow, and the feedback signal of the detection sensor group. The control deviation is the difference between the target motion parameter of the gate arm and the real-time motion parameter, and the deviation change rate is the real-time change rate of the control deviation. Step 105: The main control module inputs the control deviation and the rate of change of deviation to the PSO-FNN-PID controller, outputs the control parameter correction amount of the motion execution module, and dynamically adjusts the proportional coefficient, integral time constant and derivative time constant of the PID controller. In this embodiment, when the predicted pedestrian flow is peak pedestrian flow, the proportional coefficient is increased and the integral time constant is decreased; when the predicted pedestrian flow is off-peak pedestrian flow, the PID parameters are adjusted to make the gate arm move smoothly and reduce the overshoot; when it is detected that there are people lingering in the channel, the derivative time constant is increased, the gate arm lowering action is stopped and the gate arm is raised to a safe position.
[0026] Step 106: The main control module generates control commands based on the adjusted parameters, and outputs drive current to the motion execution module through the drive module to control the gate arm to complete the action; Step 107: The sensor group collects feedback data of the gate arm movement in real time. If the deviation between the feedback data and the target parameter exceeds the control error threshold, the control deviation is recalculated and the PID parameters are dynamically corrected. If the deviation is within the control error threshold, the gate control process for this ticket checking is completed.
[0027] This embodiment compares and tests the control performance of the facial recognition access control gate. The test objects include access control gates using traditional fixed-parameter PID control and those using the Attention-LSTM pedestrian flow prediction model combined with the PSO-FNN-fuzzy PID controller described in this application. Both sets of gates use identical gate arms, drive motors, cameras, facial recognition modules, and detection sensor groups, and are installed in ticket checking channels of the same width. The test environment is set as a simulated ticket checking scenario at the entrance of a stadium, exhibition hall, or scenic area, constructing three pedestrian flow conditions: low-peak, off-peak, and peak. The low-peak condition is 10-20 people per minute, the off-peak condition is 20-40 people per minute, and the peak condition is 40-70 people per minute. Each condition is tested continuously for 30 minutes, repeated 5 times, and the average value is taken as the experimental result.
[0028] During the experiment, the traffic efficiency indicators included the number of people passing through per unit time, the average passage time per person, and the change in queue length; the mechanical wear-related indicators included the number of gate start-stop cycles, the peak impact of gate movement, the fluctuation amplitude of motor drive current, and the gate overshoot in position; the operational stability indicators included the gate position control error, speed fluctuation rate, number of abnormal stops, and safety protection response time. The sensor array collected real-time data on gate angle, angular velocity, motor current, and the status of people remaining in the passageway. The main control module recorded the complete control process for each ticket check, from successful ticket verification to the gate fully opening, personnel passage, and gate reset.
[0029] Under peak operating conditions, the average single-person passage time of a traditional fixed PID control gate is 1.82s, while the average single-person passage time of the gate proposed in this application is 1.43s, a reduction of approximately 21.4%. The number of people passing through the traditional fixed PID control gate per unit time is approximately 33 people / min, while the number of people passing through the gate proposed in this application is increased to approximately 42 people / min, resulting in an improvement in passage efficiency of approximately 27.3%. This is because the Attention-LSTM model can predict short-term changes in pedestrian flow based on pedestrian density, movement speed, and queue length, adjusting the control strategy in advance before the peak arrives, making the gate arm lifting response more timely and reducing waiting time caused by control lag.
[0030] Under off-peak conditions, the average overshoot of the gate arm in the traditional fixed PID control method is 4.8°, while the average overshoot of the gate arm in the control method of this application is 2.1°, a reduction of approximately 56.3%. The average steady-state error of the gate arm position in the traditional fixed PID control method is 1.6°, while the average steady-state error of the control method of this application is 0.7°, a reduction of approximately 56.2%. Under low-peak conditions, the controller of this application reduces unnecessary proportional gain and appropriately increases the integral time constant, making the gate arm movement smoother. The peak motor drive current is reduced from 2.8A in the traditional control method to 2.2A, a reduction of approximately 21.4%, thereby reducing the instantaneous impact on the drive motor and the gate arm transmission mechanism.
[0031] In terms of mechanical wear verification, 10,000 consecutive opening and closing cycles of the gate arm were used as the durability comparison test cycle. Under the traditional fixed PID control method, the average angular velocity fluctuation rate during the gate arm's start-stop process was 18.5%, and the peak-to-valley fluctuation amplitude of the motor current was 1.3A. Under the control method of this application, the average angular velocity fluctuation rate was reduced to 9.7%, and the peak-to-valley fluctuation amplitude of the motor current was reduced to 0.72A. Since the PSO-FNN-fuzzy PID controller can correct the proportional coefficient, integral time constant, and derivative time constant in real time according to the control deviation and the rate of change of deviation, it avoids frequent sudden start-stop of the gate arm. Therefore, the impact load on the transmission mechanism is smaller, which is beneficial to reducing mechanical wear and extending service life.
[0032] Regarding safety and stability verification, when the detection sensor group detects personnel lingering or not having fully passed through the passage, the average protection response time of the traditional fixed PID control method is 0.36s, while the average protection response time of the control method in this application is 0.18s, a reduction of approximately 50%. Upon detecting a lingering state, this application increases the differential time constant and immediately stops the gate lowering action, while simultaneously controlling the gate to rise to a safe position to prevent the gate from continuing to fall and causing a pinching risk. During the test, the traditional fixed PID control method experienced 12 abnormal pauses under peak operating conditions, while the control method in this application experienced only 4 abnormal pauses, a reduction of approximately 66.7%.
[0033] The Attention-LSTM model is used to predict short-term pedestrian flow, and the PSO-FNN-fuzzy PID controller is used to optimize the gate arm motion parameters in real time. Compared with traditional fixed-parameter PID gates, it can significantly shorten the passage time for a single person and increase the number of people passing through per unit time under peak conditions; reduce gate arm overshoot, position error and current fluctuation under low-peak and off-peak conditions; and shorten the safety protection response time under abnormal passage conditions.
[0034] Please see Figure 2 A schematic diagram of a second embodiment of the control method for a turnstile provided in this invention is shown. The method includes: Step 201: Construct a 6-layer fuzzy neural network with the control deviation and the rate of change of deviation as inputs and the PID parameter correction as output; In this embodiment, the fuzzification layer of the fuzzy neural network adopts an S-shaped membership function, the fuzzy rule layer constructs 25 fuzzy inference rules, the normalization layer uses the ratio method to process the fuzzy rule output, and the defuzzification layer outputs the PID parameter correction amount.
[0035] In this embodiment, the two input variables, control deviation and deviation change rate, of the fuzzy neural network are fed into the fuzzification layer. The fuzzification layer uses an S-shaped membership function to fuzzify the two input variables, converting continuous input variable values into fuzzy quantities. Simultaneously, each input variable is divided into five fuzzy states: negative large, negative small, zero, positive small, and positive large, obtaining the membership value for each input variable corresponding to each fuzzy state. The membership values of the two input variables are then fed into the fuzzy rule layer. Based on the setting that each of the two input variables contains five fuzzy states, the fuzzy rule layer constructs 25 fuzzy inference rules (5 x 5), with each rule corresponding to a set of inputs. The combination of fuzzy states of variables and the corresponding output logic match the membership values of input variables with 25 fuzzy inference rules one by one to obtain the trigger strength corresponding to each fuzzy inference rule. The trigger strength is passed to the normalization layer, first calculating the sum of all trigger strengths, and then calculating the ratio of the trigger strength of each fuzzy inference rule to the sum to complete the normalization operation and obtain the normalized output value of each fuzzy inference rule. The normalized output values of all fuzzy inference rules are passed to the defuzzification layer for integration and calculation, and converted into numerical quantities. Finally, the proportional coefficient correction, integral time constant correction, and differential time constant correction are output.
[0036] Step 202: Improve the PSO algorithm by adopting an adaptive adjustment strategy of inertia factor. Set the fitness function of PSO with the goal of minimizing the control error of the fuzzy neural network, and optimize the connection weights of each layer of the fuzzy neural network through the PSO algorithm. In this embodiment, the particle swarm size, maximum number of iterations, initial position and initial velocity of each particle, individual optimal position of each particle, and global optimal position of the entire particle swarm are initialized in the improved PSO algorithm. A fitness function for the PSO algorithm with the goal of minimizing the control error of the fuzzy neural network is constructed. The connection weights mapped to the current position of each particle in the particle swarm are substituted into the fuzzy neural network to calculate the current fitness value of each particle. The current fitness value of each particle is compared with the fitness value corresponding to the historical individual optimal position. If the current fitness value is better, the current individual optimal position of the particle is updated to the current position; otherwise, the original individual optimal position remains unchanged. The current fitness values of all particles are compared with the fitness values corresponding to the historical global optimal positions of the particle swarm. If a particle has a better current fitness value, the global optimal position of the particle swarm is updated to the current position of that particle; otherwise, the original global optimal position remains unchanged. If the current number of iterations reaches the maximum number of iterations, the iteration is terminated, the global optimal position of the particle swarm and the optimal solution of the connection weights of each layer of the fuzzy neural network are obtained, and these are assigned to the fuzzy neural network.
[0037] Step 203: Combine the optimized fuzzy neural network with the fuzzy PID controller to obtain the PSO-FNN-PID controller.
[0038] Figure 3 This is a schematic diagram of the structure of a control device for a face recognition access gate according to an embodiment of the present invention. The control device 300 of the access gate can vary considerably due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 310 (e.g., one or more processors) and a memory 320, and one or more storage media 330 (e.g., one or more mass storage devices) for storing application programs 333 or data 332. The memory 320 and storage media 330 can be temporary or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the control device 300 of the access gate. Furthermore, the processor 310 may be configured to communicate with the storage media 330 and execute the series of instruction operations in the storage media 330 on the control device 300 of the access gate to implement the method provided in the above embodiment.
[0039] The control device 300 of the turnstile may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input / output interfaces 360, and / or one or more operating systems 331, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 3 The control device structure of the gate shown does not constitute a limitation on the computer equipment provided by the present invention. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0040] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the various steps of the control method for the access gate provided in the above embodiments.
[0041] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described equipment or apparatus / unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0042] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0043] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A control method for a face recognition access gate, characterized in that, The method includes the following steps: Initialize the main control module parameters of the gate, set the initial parameters of the PSO-FNN-fuzzy PID algorithm and the network parameters of the Attention-LSTM pedestrian flow prediction model, and preset the target position, target speed and control error threshold of the gate arm movement; The pedestrian flow sensing module collects raw data on pedestrian flow conditions at the gate entrance, the electronic ticket verification module collects facial images in real time for facial recognition, and quickly compares the faces with those of ticket purchasers in the electronic ticket database to verify electronic ticket information. The detection sensor group collects real-time motion status data of the gate arm and pedestrian passage status data within the passage. The main control module performs normalization preprocessing on the collected raw data of pedestrian flow conditions, inputs it into the Attention-LSTM pedestrian flow prediction model, predicts the dynamic change trend of pedestrian flow within a preset time period, and outputs the predicted value of pedestrian flow conditions. The main control module determines the control deviation and deviation change rate of the gate arm movement based on the ticket verification result signal, the predicted value of the passenger flow, and the feedback signal of the detection sensor group. The control deviation is the difference between the target motion parameter and the real-time motion parameter of the gate arm, and the deviation change rate is the real-time change rate of the control deviation. The main control module inputs the control deviation and the rate of change of deviation to the PSO-FNN-PID controller, and outputs the control parameter correction amount of the motion execution module to dynamically adjust the proportional coefficient, integral time constant and derivative time constant of the PID controller. The main control module generates control commands based on the adjusted parameters, and outputs drive current to the motion execution module through the drive module to control the gate arm to complete the action; The sensor group collects feedback data on the movement of the gate arm in real time. If the deviation between the feedback data and the target parameter exceeds the control error threshold, the control deviation is recalculated and the PID parameters are dynamically corrected. If the deviation is within the control error threshold, the gate control process for this ticket check is completed.
2. The control method for a face recognition access gate as described in claim 1, characterized in that, The main control module performs normalized preprocessing on the collected raw data of pedestrian flow conditions, inputs it into the Attention-LSTM pedestrian flow prediction model, predicts the dynamic change trend of pedestrian flow within a preset time period, and outputs predicted pedestrian flow conditions, including: The collected raw data on pedestrian flow conditions is cleaned to remove outliers, missing values, and duplicate values, resulting in standardized basic data on pedestrian flow conditions. Normalization is performed on the normalized basic data of pedestrian flow conditions to obtain normalized standard pedestrian flow condition data; The normalized standard pedestrian flow condition data is reconstructed according to the time series. The continuous time series data is divided into multiple input samples and input into the Attention-LSTM pedestrian flow prediction model. Each input sample includes all pedestrian flow condition feature data within the corresponding time window. By using the input gate, forget gate, and output gate of the LSTM layer, the characteristics of pedestrian flow changes are extracted, and the hidden layer feature vector is generated. The hidden layer feature vector output by the LSTM layer is input into the Attention mechanism layer. The Attention mechanism layer calculates the weight of each feature dimension in the hidden layer and assigns different attention weights according to the importance of each feature dimension to the prediction of pedestrian flow. The weighted hidden layer feature vectors are weighted and summed to generate a fused feature vector. The fused feature vector is then input into a fully connected layer, where a linear transformation and feature integration are performed. The high-dimensional fused feature vector is then mapped to a preset dimension for predicting pedestrian flow conditions. The output layer parses the processing results of the fully connected layer and outputs the predicted results of the passenger flow conditions within a preset time period.
3. The control method for a face recognition access gate as described in claim 1, characterized in that, The construction process of the PSO-FNN-PID controller includes: A 6-layer fuzzy neural network is constructed, with the control deviation and the rate of change of deviation as inputs and the PID parameter correction as outputs; An adaptive adjustment strategy based on inertia factor is adopted to improve the PSO algorithm. The fitness function of PSO is set with the goal of minimizing the control error of the fuzzy neural network, and the connection weights of each layer of the fuzzy neural network are optimized through the PSO algorithm. The optimized fuzzy neural network is combined with fuzzy PID to obtain the PSO-FNN-PID controller.
4. The control method for a face recognition access gate as described in claim 3, characterized in that, The fuzzification layer of the fuzzy neural network adopts an sigmoid membership function, the fuzzy rule layer constructs 25 fuzzy inference rules, the normalization layer uses the ratio method to process the fuzzy rule output, and the defuzzification layer outputs the PID parameter correction amount.
5. The control method for a face recognition access gate as described in claim 4, characterized in that, The two input variables, control deviation and deviation change rate, of the fuzzy neural network are fed into the fuzzification layer. The fuzzification layer uses the S-shaped membership function to fuzzify the two input variables respectively, converting the continuous input variable values into fuzzy quantities. At the same time, each input variable is divided into five fuzzy states: negative large, negative small, zero, positive small, and positive large, so as to obtain the membership value of each input variable corresponding to each fuzzy state. The membership values of the two input variables are passed into the fuzzy rule layer. Based on the setting that each of the two input variables contains five fuzzy states, the fuzzy rule layer constructs 25 fuzzy inference rules by 5x5. Each rule corresponds to a combination of fuzzy states of the input variables and the corresponding output logic. The membership values of the input variables are matched one by one with the 25 fuzzy inference rules to obtain the trigger strength corresponding to each fuzzy inference rule. The trigger strength is passed to the normalization layer. First, the sum of all trigger strengths is calculated. Then, the ratio of the trigger strength of each fuzzy inference rule to the sum is calculated to complete the normalization operation and obtain the normalized output value of each fuzzy inference rule. The normalized output values of all fuzzy inference rules are fed into the defuzzification layer for integration and calculation, and converted into numerical quantities. Finally, the proportional coefficient correction, integral time constant correction, and differential time constant correction are output.
6. The control method for a face recognition access gate as described in claim 3, characterized in that, The improved PSO algorithm employs an adaptive adjustment strategy based on the inertia factor. This involves setting the fitness function of the PSO algorithm with the goal of minimizing the control error of the fuzzy neural network, and optimizing the connection weights of each layer of the fuzzy neural network using the PSO algorithm. This includes: Initialize the particle swarm size, maximum number of iterations, initial position and initial velocity of each particle, individual optimal position of each particle, and global optimal position of the entire particle swarm for the improved PSO algorithm. A fitness function for the PSO algorithm with the goal of minimizing the control error of the fuzzy neural network is constructed. The connection weights mapped to the current position of each particle in the particle swarm are substituted into the fuzzy neural network to calculate the current fitness value of each particle. Compare the current fitness value of each particle with the fitness value corresponding to the best position of the historical individual. If the current fitness value is better, update the best position of the current particle to the current position. If it is not better, keep the original best position unchanged. Compare the current fitness value of all particles with the fitness value corresponding to the historical global best position of the particle swarm. If a particle has a better current fitness value, update the global best position of the particle swarm to the current position of that particle. If it is not better, keep the original global best position unchanged. If the current iteration count reaches the maximum iteration count, the iteration is terminated, the global optimal position of the particle swarm is obtained, the optimal solution of the connection weights of each layer of the fuzzy neural network is obtained, and the value is assigned to the fuzzy neural network.
7. The control method for a face recognition access gate as described in claim 1, characterized in that, The dynamic adjustment of the proportional coefficient, integral time constant, and derivative time constant of the PID includes: When the predicted value of the pedestrian flow is the peak pedestrian flow, increase the proportional coefficient and decrease the integral time constant; When the predicted value of the passenger flow is the off-peak passenger flow, adjust the PID parameters to make the gate arm move smoothly and reduce the overshoot. When personnel are detected remaining in the passage, the differential time constant is increased, the gate arm lowering action is stopped, and the gate arm is raised to a safe position.
8. A face recognition access gate, employing the control method described in any one of claims 1-7, characterized in that, It includes the gate body, electronic ticket verification module, people flow sensing module, motion execution module, main control module, and drive module, among which, The turnstile body includes a gate arm, a frame, a camera, and a detection sensor group. The camera is used to capture facial images, and the detection sensor group is used to detect the movement position and speed of the gate arm and the passage status of people in the channel. The electronic ticket verification module is used to collect facial images for facial recognition, quickly compare the faces with those of ticket purchasers in the electronic ticket database, verify the electronic ticket information, and output the verification result signal to the main control module. The pedestrian flow sensing module is used to collect information on pedestrian density, pedestrian movement speed and pedestrian queue length at the gate entrance, and output pedestrian flow status signals to the main control module. The motion execution module is used to drive the raising and lowering of the gate arm; The drive module is used to receive control commands from the main control module and output the appropriate drive current to the motion execution module. The main control module is electrically connected to the electronic ticket verification module, the people flow sensing module, the detection sensor group, and the drive module, respectively. It is used to output real-time control commands to the drive module based on the verification result signal, the people flow condition signal, and the feedback signal from the detection sensor group.
9. A control device for a face recognition access gate, characterized in that, The control device of the turnstile includes a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the control device of the turnstile to perform the various steps of the control method of the turnstile as described in any one of claims 1-7.
10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the various steps of the control method for the access gate as described in any one of claims 1-7.
Citation Information
Patent Citations
Gate based on face recognition, control method thereof and gate verification system
CN111260798A
Scenic spot ticket checking and selling system and method based on face recognition
CN111696241A