A heavy truck pantograph lateral deviation active control method and system

By collecting and processing the image of heavy truck pantographs, combined with the 2DOF-PID automatic control model and DQN algorithm, the active control of the pantographs lateral offset is achieved, solving the problem of pantographs leaving the overhead line and improving transportation stability and safety.

CN118502484BActive Publication Date: 2025-05-13CRRC IND INST CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410442534.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-12
Publication Date
2025-05-13
Estimated Expiration
2044-04-12

AI Technical Summary

Technical Problem

In electrified road transport systems, the pantograph of heavy trucks is prone to break away from the overhead line due to lateral deviation, resulting in interruption of power transmission and increasing traffic safety hazards.

Method used

A heavy truck pantograph active control method and system is adopted to calculate the displacement of the arch net intersection point relative to the pantograph midpoint through image acquisition and processing, and actively control it using the 2DOF-PID automatic control model and DQN algorithm to keep the maximum offset of the arch net intersection point relative to the pantograph midpoint does not exceed half of the pantograph length.

Benefits of technology

Ensure the stability of the bow net flow, improve the stability and transportation distance of a single vehicle, and provide stable and reliable technical guarantees for long-distance transportation on electrified highways.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118502484B_ABST
    Figure CN118502484B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for actively controlling the lateral offset of a pantograph of a heavy truck, including: collecting image data of the lateral offset of the pantograph of the heavy truck, and segmenting the instance pixel coordinates of the pantograph and the contact wire; according to the segmented instance pixel coordinates of the pantograph and the contact wire, extracting the matrix Q of the midpoint pixel point set of the pantograph, and the matrix P of the pantograph-wire intersection point pixel point set of the pantograph and the contact wire; according to the positional relationship between P and Q in the image, calculating the pixel relative displacement d' of the pantograph-wire intersection point relative to the midpoint of the pantograph, and converting it into the actual relative displacement d; when d is greater than the offset threshold d th At this time, active control is performed on the lateral offset of the pantograph to ensure that the maximum offset of the pantograph-wire intersection point relative to the midpoint of the pantograph does not exceed half of the length of the pantograph. The active control is active path tracking control, modeled as a 2DOF-PID automatic control model, and the DQN algorithm is used to optimize the parameters of the PID controller. The present invention can ensure the stability of the current collection between the pantograph and the wire.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of pantograph-catenary current collection, and in particular to a method and system for actively controlling lateral deviation of a heavy truck pantograph. Background Art

[0002] like Figure 1 As shown, in the electrified road transport system, electricity is transmitted through overhead lines. Overhead lines are usually installed on electrical piles or pillars on both sides of the track and are connected to the power grid through high-voltage cables. In order to transmit electrical energy to vehicles traveling on the road, a mechanical device is required to transfer electricity from the overhead lines to the electric traction vehicles. The on-board pantograph acts as a bridge between the electric traction vehicle and the overhead lines. It usually consists of one or more contacts (also called pantograph heads) and a mechanical support system, and obtains electrical energy from the overhead lines through contact with the overhead lines.

[0003] However, unlike rail transit, vehicles on roads, especially heavy trucks, are not constrained by tracks and their directions are completely controlled by the driver. Once the pantograph is disconnected from the high-voltage cable, power will not be transmitted to the vehicle, causing the vehicle to lose power and easily cause traffic accidents. Even when the contact is disconnected from the overhead line, it may cause sparks or arc discharges, posing a safety threat to passengers and goods. Therefore, in the electrified road transportation system, in order to maintain stable contact between the pantograph and the contact line, the pantograph's lateral deviation active control function must be established to maintain continuous contact between the pantograph and the contact line to ensure that the pantograph and the catenary will not separate. Summary of the invention

[0004] The present invention provides a heavy truck pantograph lateral deviation active control method and system to solve the problems existing in the prior art. The technical solution provided by the present invention is as follows:

[0005] In one aspect, a method for actively controlling lateral deviation of a heavy truck pantograph is provided, the method comprising:

[0006] S1. Collect image data of the lateral displacement of the pantograph of a heavy truck and segment the pixel coordinates of the pantograph and the contact line instance;

[0007] S2, extracting the matrix Q of the pantograph midpoint pixel set and the matrix P of the pantograph-contact-line intersection pixel set according to the segmented pantograph and contact-line instance pixel coordinates;

[0008] S3. Calculate the pixel relative displacement d' of the pantograph intersection point relative to the pantograph midpoint according to the positional relationship between P and Q in the image, and convert it into the actual relative displacement d;

[0009] S4. When the d is greater than the offset threshold d thThe lateral offset of the pantograph is actively controlled so that the maximum offset of the intersection point of the pantograph and the pantograph midpoint does not exceed half of the pantograph length. The active control is active path tracking control, which is modeled as a 2DOF-PID automatic control model, and the DQN algorithm is used to optimize the parameters of the PID controller.

[0010] Optionally, the S2 specifically includes:

[0011] Extract the pixel coordinates of each point on the straight lines of the left and right ends of the pantograph contour from the segmented pantograph instance pixel coordinates;

[0012] Subtract the column coordinates of each point on the right-end contour edge straight line from the column coordinates of the corresponding point on the left-end contour edge straight line, divide the result by 2 and add the column coordinates of each point on the left-end contour edge straight line to obtain the column coordinates of the corresponding point on the pantograph midpoint straight line;

[0013] Subtract the row coordinates of each point on the right-end contour edge straight line from the row coordinates of the corresponding point on the left-end contour edge straight line, divide the result by 2 and add the row coordinates of each point on the left-end contour edge straight line to obtain the row coordinates of the corresponding point on the pantograph midpoint straight line;

[0014] The coordinates of each point on the pantograph midpoint straight line constitute the midpoint coordinate point set, denoted as q o ,q o The number of elements is the same as the number of points on the left and right edges of the contour, and then q o Centered on the left and right, q is uniformly expanded from the image o The pixel points with half the number of elements are used as the matrix Q of the pantograph midpoint pixel point set;

[0015] The intersection of the pantograph and the contact line is based on the common pixel point set segmented by the pantograph and the contact line. The size of the matrix Q of the pantograph midpoint pixel point set is used as a reference. The point set around the common pixel point is pruned in a determinant manner to obtain the matrix P of the pantograph-catenary intersection pixel point set. The extracted P matrix and Q matrix are square matrices of exactly the same size. Assume that P = [p1, p2, …p m ], Q=[q1,q2,…q m ], where i,m∈N + , and i≤m,p i =[p i1 ,p i2 ,…,p im ] T ,q i =[q i1 ,q i2 ,…,q im ] T , T represents transpose.

[0016] Optionally, the S3 specifically includes:

[0017] Determine the positional relationship between P and Q in the image, including three basic positional relationships: P is on the left side of Q, P is on the right side of Q, and P and Q overlap. The determination method is: if p m The column coordinate of is less than that of q1, which indicates that the intersection of the pantograph and the grid is on the left side of the pantograph midpoint; if q m If the column coordinate of is less than the column coordinate of p1, it indicates that the intersection of the pantograph and the network is on the right side of the midpoint of the pantograph; in other cases, it is considered that the intersection of the pantograph and the midpoint of the pantograph coincide.

[0018] Assuming that the column coordinate of p1 in the image is a, and the column coordinate of q1 in the image is b, the pixel relative displacement of the pantograph intersection point relative to the pantograph midpoint is d'=ab. If P is on the left side of Q, d'<0; if P is on the right side of Q, d'>0;

[0019] The camera internal and external calibration methods are used to convert pixel distance to actual distance, and the pixel relative displacement d' of the pantograph intersection point relative to the pantograph midpoint is converted into the actual relative displacement d.

[0020] Optionally, the midpoint of the pantograph is used as the calculation origin, and the offset threshold d in S4 is th The calculation formula is: th = abs(L 弓 ·C·10 3 / (2M 车 v 车 )), where L 弓 is the pantograph length, M 车 is the weight of the vehicle, v 车 is the speed of the vehicle, C is a constant related to the camera calibration parameters, M 车 v 车 represents the impulse of the vehicle, then the offset threshold d th It is related to the vehicle's impulse. The larger the impulse, the smaller the offset threshold. The smaller the impulse, the larger the offset threshold. The offset threshold d th Reflects the sensitivity of pantograph offset control.

[0021] Optionally, the model in S4 is a 2DOF-PID automatic control model, specifically including:

[0022] Assume e d is the actual relative displacement d of the pantograph intersection point relative to the pantograph midpoint at the next moment t+1 , relative to the actual relative displacement d of the pantograph midpoint relative to the pantograph intersection at the current moment t The deviation, v 弓t is the current pantograph lateral speed, v 弓t+1is the pantograph lateral speed at the next moment, e v Yes 弓t+1 Relative v 弓t Deviation;

[0023] Then the PID control of position error: upos = K pd ·e d +K id ·∫e d dt+K dd ·dt / de d

[0024] Where upos is the control input generated by the position error; K pd is the proportionality coefficient of the position error; K id is the integral coefficient of position error; K dd is the differential coefficient of position error;

[0025] PID control of speed error: uspeed=Kpv·e v +K iv ·∫evdt+K dv ·dt / de v

[0026] Where uspeed is the control input generated by the speed error, Kpv is the proportional coefficient of the speed error; K iv is the integral coefficient of speed error; K dv is the differential coefficient of the velocity error;

[0027] The final control input u is the weighted sum of upos and uspeed: u = α·upos + (1-α)·uspeed; where α∈[0,1] is a weight factor used to balance the impact of position error and speed error on the control input.

[0028] Optionally, the DQN algorithm is used in S4 to optimize the parameters of the PID controller, specifically including:

[0029] Design a DQN network with the output layer and PID controller parameters: K pd , K id , K dd , Kpv, K iv , K dv , these 6 variables are matched;

[0030] The input layer receives the current state space S as input, and the state space is S = [d, v 弓 ];

[0031] Action space A = [K pd , K id , Kdd , Kpv, K iv , K dv ];

[0032] The reward function is defined according to the task goal of bow-net tracking and is designed to encourage the system to move along the desired path and penalize deviations and unstable behaviors;

[0033] Collect data using a random or preset initial PID parameter strategy and record the state, action, and corresponding reward at each time step;

[0034] Use the collected data to train the DQN network;

[0035] Update the weights of DQN through the gradient descent optimization algorithm to maximize the expected cumulative reward;

[0036] In each control cycle, the DQN network is used to predict the optimal PID parameters.

[0037] Apply the parameters of the DQN prediction output to the PID controller.

[0038] Optionally, the DQN network training specifically includes:

[0039] Use the DQN network to train a control strategy that can maximize long-term rewards. DQN uses deep neural networks to approximate the Q-value function and stabilizes the learning process through experience replay and target networks. During the training process, DQN will learn how to choose the best action based on the current state to minimize the path tracking error. During the DQN training process, a 2DOF-PID controller is introduced to assist path tracking. The 2DOF-PID controller is responsible for processing position errors and speed errors, and provides a set of basic control signals. These signals serve as the initial values ​​or constraints of the DQN actions to ensure the stability and rapid response of the system.

[0040] On the other hand, a heavy truck pantograph lateral deviation active control system is provided, the system comprising:

[0041] The acquisition and segmentation module is used to acquire the image data of the lateral displacement of the pantograph of the heavy truck and segment the pixel coordinates of the pantograph and the contact line instance;

[0042] An extraction module is used to extract the matrix Q of the pantograph midpoint pixel set and the matrix P of the pantograph-contact line pantograph-net intersection pixel set according to the segmented pantograph and contact line instance pixel coordinates;

[0043] A calculation module is used to calculate the pixel relative displacement d' of the pantograph intersection point relative to the pantograph midpoint according to the positional relationship between P and Q in the image, and convert it into the actual relative displacement d;

[0044] The active control module is used for when the d is greater than the offset threshold d th The lateral offset of the pantograph is actively controlled so that the maximum offset of the intersection point of the pantograph and the pantograph midpoint does not exceed half of the pantograph length. The active control is active path tracking control, which is modeled as a 2DOF-PID automatic control model, and the DQN algorithm is used to optimize the parameters of the PID controller.

[0045] On the other hand, an electronic device is provided, which includes a processor and a memory, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement the above-mentioned active control method for lateral deviation of a heavy truck pantograph.

[0046] On the other hand, a computer-readable storage medium is provided, in which instructions are stored, and the instructions are loaded and executed by a processor to implement the above-mentioned active control method for lateral deviation of a heavy truck pantograph.

[0047] Compared with the prior art, the above technical solution has at least the following beneficial effects:

[0048] The present invention can ensure the stability of the current collection of the bow-net, thereby improving the stability and transportation distance of the vehicle's single transportation, and providing a stable and reliable technical guarantee for the realization of the function of long-distance transportation on electrified roads. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0050] Figure 1 A schematic diagram of an electrified highway transportation system provided by an embodiment of the present invention;

[0051] Figure 2 A flow chart of a method for actively controlling lateral deviation of a heavy truck pantograph provided by an embodiment of the present invention;

[0052] Figure 3 A schematic diagram of a matrix Q for extracting a pantograph midpoint pixel set provided by an embodiment of the present invention;

[0053] Figure 4 A schematic diagram of a 2DOF-PID automatic control model provided in an embodiment of the present invention;

[0054] Figure 5 A flow chart of using a DQN algorithm to optimize parameters of a PID controller provided by an embodiment of the present invention;

[0055] Figure 6 A block diagram of a heavy truck pantograph lateral deviation active control system provided by an embodiment of the present invention;

[0056] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] like Figure 2 As shown, an embodiment of the present invention provides a method for actively controlling lateral deviation of a heavy truck pantograph, the method comprising:

[0059] S1. Collect image data of the lateral displacement of the pantograph of a heavy truck and segment the pixel coordinates of the pantograph and the contact line instance;

[0060] The embodiment of the present invention can use the existing image segmentation algorithm to segment the pixel coordinates of the pantograph and the contact line instance.

[0061] S2, extracting the matrix Q of the pantograph midpoint pixel set and the matrix P of the pantograph-contact-line intersection pixel set according to the segmented pantograph and contact-line instance pixel coordinates;

[0062] Optionally, the S2 specifically includes:

[0063] Extract the pixel coordinates of each point on the straight lines of the left and right ends of the pantograph contour from the segmented pantograph instance pixel coordinates;

[0064] For example, extract Figure 3 The pixel coordinates of points A and B on the straight lines of the contour edges of the left and right ends of the pantograph in the schematic diagram.

[0065] Subtract the column coordinates of each point on the right-end contour edge straight line from the column coordinates of the corresponding point on the left-end contour edge straight line, divide the result by 2 and add the column coordinates of each point on the left-end contour edge straight line to obtain the column coordinates of the corresponding point on the pantograph midpoint straight line;

[0066] for example Figure 3In the schematic diagram, the column coordinates of point B are subtracted from the column coordinates of point A, and the result is divided by 2 and added to the column coordinates of point A to obtain the column coordinates of point O on the straight line at the midpoint of the pantograph.

[0067] Subtract the row coordinates of each point on the right-end contour edge straight line from the row coordinates of the corresponding point on the left-end contour edge straight line, divide the result by 2 and add the row coordinates of each point on the left-end contour edge straight line to obtain the row coordinates of the corresponding point on the pantograph midpoint straight line;

[0068] for example Figure 3 In the schematic diagram, the row coordinate of point B is subtracted from the row coordinate of point A, and the result is divided by 2 and added to the row coordinate of point A to obtain the row coordinate of point O on the straight line at the midpoint of the pantograph.

[0069] The coordinates of each point on the pantograph midpoint straight line constitute the midpoint coordinate point set, denoted as q o ,q o The number of elements is the same as the number of points on the left and right edges of the contour, and then q o Centered on the left and right, q is uniformly expanded from the image o The pixel points with half the number of elements are used as the matrix Q of the pantograph midpoint pixel point set;

[0070] for example Figure 3 In the schematic diagram, the pantograph midpoint straight line is extended to the left and right to form a rectangular area, and the pixel points corresponding to the rectangular area are used as the matrix Q of the pantograph midpoint pixel point set.

[0071] The intersection of the pantograph and the contact line is based on the common pixel point set segmented by the pantograph and the contact line. The size of the matrix Q of the pantograph midpoint pixel point set is used as a reference. The point set around the common pixel point is pruned in a determinant manner to obtain the matrix P of the pantograph-catenary intersection pixel point set. The extracted P matrix and Q matrix are square matrices of exactly the same size. Assume that P = [p1, p2, …p m ], Q=[q1,q2,…q m ], where i,m∈N + , and i≤m,p i =[p i1 ,p i2 ,…,p im ] T ,q i =[q i1 ,q i2 ,…,q im ] T , T represents transpose.

[0072] S3. Calculate the pixel relative displacement d' of the pantograph intersection point relative to the pantograph midpoint according to the positional relationship between P and Q in the image, and convert it into the actual relative displacement d;

[0073] Optionally, the S3 specifically includes:

[0074] Determine the positional relationship between P and Q in the image, including three basic positional relationships: P is on the left side of Q, P is on the right side of Q, and P and Q overlap. The determination method is: if p m The column coordinate of is less than that of q1, which indicates that the intersection of the pantograph and the grid is on the left side of the pantograph midpoint; if q m If the column coordinate of is less than the column coordinate of p1, it indicates that the intersection of the pantograph and the network is on the right side of the midpoint of the pantograph; in other cases, it is considered that the intersection of the pantograph and the midpoint of the pantograph coincide.

[0075] Assuming that the column coordinate of p1 in the image is a, and the column coordinate of q1 in the image is b, the pixel relative displacement of the pantograph intersection point relative to the pantograph midpoint is d'=ab. If P is on the left side of Q, d'<0; if P is on the right side of Q, d'>0;

[0076] The camera internal and external calibration methods are used to convert pixel distance to actual distance, and the pixel relative displacement d' of the pantograph intersection point relative to the pantograph midpoint is converted into the actual relative displacement d.

[0077] The specific conversion method is prior art and will not be described in detail here.

[0078] S4. When the d is greater than the offset threshold d th The lateral offset of the pantograph is actively controlled so that the maximum offset of the intersection point of the pantograph and the pantograph midpoint does not exceed half of the pantograph length. The active control is active path tracking control, which is modeled as a 2DOF-PID automatic control model, and the DQN algorithm is used to optimize the parameters of the PID controller.

[0079] Optionally, the midpoint of the pantograph is used as the calculation origin, and the offset threshold d in S4 is th The calculation formula is: th = abs(L 弓 ·C·10 3 / (2M 车 v 车 )), where L 弓 is the pantograph length, M 车 is the weight of the vehicle, v 车 is the speed of the vehicle, C is a constant related to the camera calibration parameters, M 车 v 车 represents the impulse of the vehicle, then the offset threshold d thIt is related to the vehicle's impulse. The larger the impulse, the smaller the offset threshold. The smaller the impulse, the larger the offset threshold. The offset threshold d th Reflects the sensitivity of pantograph offset control.

[0080] Alternatively, if Figure 4 As shown, the S4 is modeled as a 2DOF-PID automatic control model, specifically including:

[0081] Assume e d is the actual relative displacement d of the pantograph intersection point relative to the pantograph midpoint at the next moment t+1 , relative to the actual relative displacement d of the pantograph midpoint relative to the pantograph intersection at the current moment t The deviation, v 弓t is the current pantograph lateral speed, v 弓t+1 is the pantograph lateral speed at the next moment, e v Yes 弓t+1 Relative v 弓t Deviation;

[0082] Then the PID control of position error: upos = K pd ·e d +K id ·∫e d dt+K dd ·dt / de d

[0083] Where upos is the control input generated by the position error; K pd is the proportionality coefficient of the position error; K id is the integral coefficient of position error; K dd is the differential coefficient of position error;

[0084] PID control of speed error: uspeed=Kpv·e v +K iv ·∫e v dt+K dv ·dt / de v

[0085] Where uspeed is the control input generated by the speed error, Kpv is the proportional coefficient of the speed error; K iv is the integral coefficient of speed error; K dv is the differential coefficient of the velocity error;

[0086] The final control input u is the weighted sum of upos and uspeed: u = α·upos + (1-α)·uspeed; where α∈[0,1] is a weight factor used to balance the impact of position error and speed error on the control input.

[0087] Alternatively, if Figure 5 As shown, the DQN algorithm is used in S4 to optimize the parameters of the PID controller, specifically including:

[0088] Design a DQN network with the output layer and PID controller parameters: K pd , K id , K dd , Kpv, K iv , K dv , these 6 variables are matched;

[0089] The input layer receives the current state space S as input, and the state space is S = [d, v 弓 ];

[0090] Action space A = [K pd , K id , K dd , Kpv, K iv , K dv ];

[0091] The reward function is defined according to the task goal of bow-net tracking and is designed to encourage the system to move along the desired path and penalize deviations and unstable behaviors;

[0092] Collect data using a random or preset initial PID parameter strategy and store the state transition vector: state, action, and corresponding reward;

[0093] Use the collected data to train the DQN network;

[0094] Update the weights of DQN through the gradient descent optimization algorithm to maximize the expected cumulative reward;

[0095] In each control cycle, the DQN network is used to predict the optimal PID parameters.

[0096] Apply the parameters of the DQN prediction output to the PID controller.

[0097] Optionally, the DQN network training specifically includes:

[0098] Use the DQN network to train a control strategy that can maximize long-term rewards. DQN uses deep neural networks to approximate the Q-value function and stabilizes the learning process through experience replay and target networks. During the training process, DQN will learn how to choose the best action based on the current state to minimize the path tracking error. During the DQN training process, a 2DOF-PID controller is introduced to assist path tracking. The 2DOF-PID controller is responsible for processing position errors and speed errors, and provides a set of basic control signals. These signals serve as the initial values ​​or constraints of the DQN actions to ensure the stability and rapid response of the system.

[0099] The embodiments of the present invention train DQN to find the parameter combination that performs best in a specific task or environment. This method combines the stability of the PID controller with the adaptive optimization capability of the DQN.

[0100] During the actual task execution process, new data continues to be collected and used to update the DQN network online to improve the PID control parameters.

[0101] The embodiment of the present invention also needs to evaluate the performance of the PID controller optimized by DQN, that is, the relative displacement d of the bow and the offset threshold d th To judge, to compare indicators such as path tracking accuracy and system stability under different strategies, and according to the performance evaluation results, adjust the training parameters of DQN (such as learning rate, batch size, ε value in ε-greedy strategy, etc.) and other parameters of PID controller. In this way, DQN can learn the optimal parameter settings of PID controller under different environmental and task conditions, thereby improving the control performance of the system.

[0102] like Figure 6 As shown, an embodiment of the present invention further provides a heavy truck pantograph lateral deviation active control system, the system comprising:

[0103] The acquisition and segmentation module 610 is used to acquire image data of the lateral displacement of the pantograph of the heavy truck and segment the pixel coordinates of the pantograph and the contact line instance;

[0104] An extraction module 620 is used to extract a matrix Q of a pantograph midpoint pixel set and a matrix P of a pantograph-contact line pantograph-net intersection pixel set according to the segmented pantograph and contact line instance pixel coordinates;

[0105] A calculation module 630 is used to calculate the pixel relative displacement d' of the pantograph-catenary intersection point relative to the pantograph midpoint according to the positional relationship between P and Q in the image, and convert it into an actual relative displacement d;

[0106] The active control module 640 is used to control the output of the control module 640 when the output d is greater than the offset threshold d. thThe lateral offset of the pantograph is actively controlled so that the maximum offset of the intersection point of the pantograph and the pantograph midpoint does not exceed half of the pantograph length. The active control is active path tracking control, which is modeled as a 2DOF-PID automatic control model, and the DQN algorithm is used to optimize the parameters of the PID controller.

[0107] An active control system for lateral deviation of a heavy truck pantograph provided in an embodiment of the present invention has a functional structure corresponding to an active control method for lateral deviation of a heavy truck pantograph provided in an embodiment of the present invention, which will not be described in detail here.

[0108] Figure 7 It is a structural diagram of an electronic device 700 provided in an embodiment of the present invention. The electronic device 700 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 701 and one or more memories 702, wherein the memory 702 stores instructions, and the instructions are loaded and executed by the processor 701 to implement the steps of the above-mentioned heavy truck pantograph lateral deviation active control method.

[0109] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions, which can be executed by a processor in a terminal to complete the above-mentioned heavy truck pantograph lateral deviation active control method. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0110] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0111] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for actively controlling the lateral deviation of a heavy truck pantograph, characterized in that: The method comprises: S1. Collect image data of the lateral displacement of the pantograph of a heavy truck and segment the pixel coordinates of the pantograph and the contact line instance; S2. Extracting the matrix Q of the pantograph midpoint pixel set and the matrix P of the pantograph-contact-line intersection pixel set according to the segmented pantograph and contact-line instance pixel coordinates; S3. Calculate the pixel relative displacement d' of the pantograph intersection point relative to the pantograph midpoint according to the positional relationship between P and Q in the image, and convert it into the actual relative displacement d; S4. When the d is greater than the offset threshold d th When the pantograph is in the state of being moved, the lateral deviation of the pantograph is actively controlled so that the maximum deviation of the intersection point of the pantograph and the pantograph midpoint does not exceed half of the pantograph length. The active control is active path tracking control, which is modeled as a 2DOF-PID automatic control model, and the DQN algorithm is used to optimize the parameters of the PID controller. Taking the pantograph midpoint as the calculation origin, the offset threshold d in S4 is th The calculation formula is: th = abs(L 弓 ·C·10 3 / (2M 车 v 车 )), where L 弓 is the pantograph length, M 车 is the weight of the vehicle, v 车 is the speed of the vehicle, C is a constant related to the camera calibration parameters, M 车 v 车 represents the impulse of the vehicle, then the offset threshold d th It is related to the vehicle's impulse. The larger the impulse, the smaller the offset threshold. The smaller the impulse, the larger the offset threshold. The offset threshold d th Reflects the sensitivity of pantograph offset control.

2. The method according to claim 1, characterized in that: The S2 specifically includes: Extract the pixel coordinates of each point on the straight lines of the left and right ends of the pantograph contour from the segmented pantograph instance pixel coordinates; Subtract the column coordinates of each point on the right-end contour edge straight line from the column coordinates of the corresponding point on the left-end contour edge straight line, divide the result by 2 and add the column coordinates of each point on the left-end contour edge straight line to obtain the column coordinates of the corresponding point on the pantograph midpoint straight line; Subtract the row coordinates of each point on the right-end contour edge straight line from the row coordinates of the corresponding point on the left-end contour edge straight line, divide the result by 2 and add the row coordinates of each point on the left-end contour edge straight line to obtain the row coordinates of the corresponding point on the pantograph midpoint straight line; The coordinates of each point on the pantograph midpoint straight line constitute the midpoint coordinate point set, denoted as q o ,q o The number of elements is the same as the number of points on the left and right edges of the contour, and then q o Centered on the left and right, q is uniformly expanded from the image o The pixel points with half the number of elements are used as the matrix Q of the pantograph midpoint pixel point set; The intersection of the pantograph and the contact line is based on the common pixel point set segmented by the pantograph and the contact line. The size of the matrix Q of the pantograph midpoint pixel point set is used as a reference. The point set around the common pixel point is pruned in a determinant manner to obtain the matrix P of the pantograph-catenary intersection pixel point set. The extracted P matrix and Q matrix are square matrices of exactly the same size. Assume that P = [p1, p2, …p m ], Q=[q1,q2,…q m ], where i,m∈N + , and i≤m,p i =[p i1 ,p i2 ,…,p im ] T ,q i =[q i1 ,q i2 ,…,q im ] T , T represents transpose.

3. The method according to claim 2, characterized in that The S3 specifically includes: Determine the positional relationship between P and Q in the image, including three basic positional relationships: P is on the left side of Q, P is on the right side of Q, and P and Q overlap. The determination method is: if p m The column coordinate of is less than that of q1, which indicates that the intersection of the pantograph and the grid is on the left side of the pantograph midpoint; if q m If the column coordinate of is less than the column coordinate of p1, it indicates that the intersection of the pantograph and the network is on the right side of the midpoint of the pantograph; in other cases, it is considered that the intersection of the pantograph and the midpoint of the pantograph coincide. Assuming that the column coordinate of p1 in the image is a, and the column coordinate of q1 in the image is b, the pixel relative displacement of the pantograph intersection point relative to the pantograph midpoint is d'=ab. If P is on the left side of Q, d'<0; if P is on the right side of Q, d'>0; The camera internal and external calibration methods are used to convert the pixel distance to the actual distance, and the pixel relative displacement d' of the pantograph intersection point relative to the pantograph midpoint is converted into the actual relative displacement d.

4. The method according to claim 1, characterized in that: The S4 is modeled as a 2DOF-PID automatic control model, specifically including: Assume e d is the actual relative displacement d of the pantograph intersection point relative to the pantograph midpoint at the next moment t+1 , relative to the actual relative displacement d of the pantograph midpoint relative to the pantograph intersection at the current moment t The deviation, is the current pantograph traverse speed, is the pantograph lateral speed at the next moment, e v yes relatively Deviation; Then the PID control of position error: upos = K pd ·e d +K id ·∫e d dt+K dd ·dt / de d Where upos is the control input generated by the position error; K pd is the proportionality coefficient of the position error; K id is the integral coefficient of position error; K dd is the differential coefficient of position error; PID control of speed error: uspeed=Kpv·e v +K iv ·∫e v dt+K dv ·dt / de v Where uspeed is the control input generated by the speed error, Kpv is the proportional coefficient of the speed error; K iv is the integral coefficient of speed error; K dv is the differential coefficient of the velocity error; The final control input u is the weighted sum of upos and uspeed: u = α·upos + (1-α)·uspeed; where α∈[0,1] is a weight factor used to balance the impact of position error and speed error on the control input.

5. The method according to claim 4, characterized in that In S4, the DQN algorithm is used to optimize the parameters of the PID controller, specifically including: Design a DQN network with the output layer and PID controller parameters: K pd , K id , K dd , Kpv, K iv , K dv , these 6 variables are matched; The input layer receives the current state space S as input, and the state space is S = [d, v 弓 ]; Action space A = [K pd , K id , K dd , Kpv, K iv , K dv ]; The reward function is defined based on the task goal of bow-net tracking and is designed to encourage the system to move along the desired path and penalize deviations and unstable behaviors; Collect data using a random or preset initial PID parameter strategy and record the state, action, and corresponding reward at each time step; Use the collected data to train the DQN network; Update the weights of DQN through the gradient descent optimization algorithm to maximize the expected cumulative reward; In each control cycle, the DQN network is used to predict the optimal PID parameters. Apply the parameters of the DQN prediction output to the PID controller.

6. The method according to claim 5, characterized in that The DQN network training specifically includes: Use the DQN network to train a control strategy that can maximize long-term rewards. DQN uses deep neural networks to approximate the Q-value function and stabilizes the learning process through experience replay and target networks. During the training process, DQN will learn how to choose the best action based on the current state to minimize the path tracking error. During the DQN training process, a 2DOF-PID controller is introduced to assist path tracking. The 2DOF-PID controller is responsible for processing position errors and speed errors, and provides a set of basic control signals. These signals serve as the initial values ​​or constraints of the DQN actions to ensure the stability and rapid response of the system.

7. An active control system for lateral deviation of a heavy truck pantograph, characterized in that: The system comprises: The acquisition and segmentation module is used to acquire the image data of the lateral displacement of the pantograph of the heavy truck and segment the pixel coordinates of the pantograph and the contact line instance; An extraction module is used to extract the matrix Q of the pantograph midpoint pixel set and the matrix P of the pantograph-contact line pantograph-net intersection pixel set according to the segmented pantograph and contact line instance pixel coordinates; A calculation module is used to calculate the pixel relative displacement d' of the pantograph intersection point relative to the pantograph midpoint according to the positional relationship between P and Q in the image, and convert it into the actual relative displacement d; The active control module is used for when the d is greater than the offset threshold d th When the pantograph is in the state of being moved, the lateral deviation of the pantograph is actively controlled so that the maximum deviation of the intersection point of the pantograph and the pantograph midpoint does not exceed half of the pantograph length. The active control is active path tracking control, which is modeled as a 2DOF-PID automatic control model, and the DQN algorithm is used to optimize the parameters of the PID controller. Taking the pantograph midpoint as the calculation origin, the offset threshold d in the active control module th The calculation formula is: th = abs(L 弓 ·C·10 3 / (2M 车 v 车 )), where L 弓 is the pantograph length, M 车 is the weight of the vehicle, v 车 is the speed of the vehicle, C is a constant related to the camera calibration parameters, M 车 v 车 represents the impulse of the vehicle, then the offset threshold d th It is related to the vehicle's impulse. The larger the impulse, the smaller the offset threshold. The smaller the impulse, the larger the offset threshold. The offset threshold d th Reflects the sensitivity of pantograph offset control.

8. An electronic device, comprising a processor and a memory, wherein instructions are stored in the memory, wherein: The instructions are loaded and executed by the processor to implement the method for active control of lateral deviation of a heavy truck pantograph as described in any one of claims 1-6.

9. A computer-readable storage medium, wherein instructions are stored in the storage medium, characterized in that: The instructions are loaded and executed by the processor to implement the active control method for lateral deviation of a heavy truck pantograph as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Intelligent pantograph motion control method, device, system, equipment and medium

    CN117360240A