A method and system for train trajectory optimization based on gradient traction and speed curve reconnection.
By using a train trajectory optimization method based on track gradient segments, and leveraging three-dimensional continuous motion and traction chasing or coasting return mechanisms, the problems of computational complexity and target conflict in existing technologies are solved, achieving efficient, stable, and energy-saving optimization of train operation trajectories.
Patent Information
- Application Number
- CN202611585180.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-14
- Publication Date
- 2026-11-10
AI Technical Summary
Existing train trajectory optimization methods require re-searching or solving when faced with changes in track gradient, speed limit distribution, or planned running time. This is computationally complex and makes it difficult to effectively utilize the natural structural boundaries formed by track gradient segments. The traction control expression capability is limited, local speed adjustments can easily affect subsequent running time and energy consumption, and conflicts can easily occur between different optimization objectives. Furthermore, reinforcement learning training signals are incomplete.
Using the track gradient segment as the decision unit, the traction switching position and ratio are determined through three-dimensional continuous motion. Combined with train dynamics constraints, the speed is advanced meter by meter. When there is a local deviation from the track, traction catch-up or coasting back is performed. A reward mechanism is constructed to coordinate energy consumption, punctuality and stability. The PPO continuous motion reinforcement learning optimization strategy is adopted.
It reduces the complexity of reinforcement learning decision-making, improves the ability to express traction control within slope sections, suppresses the propagation of local adjustments to subsequent lines, coordinates energy saving, punctuality and smoothness, and improves the precision and stability of trajectory optimization.
Smart Images

Figure CN123067178A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent control and train operation optimization technology for rail transit, and specifically relates to a train trajectory optimization method and system based on slope traction and speed curve reconnection. Background Technology
[0002] Train operation between stations needs to simultaneously meet constraints such as track speed limits, gradient conditions, traction and braking capabilities, planned travel time, and operational stability. Existing train trajectory optimization methods mainly include analytical optimization methods, dynamic programming, genetic algorithms, model predictive control, and reinforcement learning methods. Traditional analytical methods and intelligent optimization algorithms typically require setting optimization variables and control rules based on specific track and train parameters. When track gradient, speed limit distribution, or planned travel time changes, the search or solution needs to be repeated. Model predictive control, on the other hand, requires continuous rolling optimization during operation, making the computation process relatively complex.
[0003] Existing technologies employ train dynamics models to construct the operating environment and utilize reinforcement learning methods to obtain continuous traction control strategies. The Proximal Policy Optimization (PPO) algorithm can output train control parameters through a continuous action policy network. However, this approach still suffers from the following shortcomings: First, existing methods often organize reinforcement learning decisions according to fixed time or spatial steps, which can easily lead to long action sequences on longer tracks, failing to fully utilize the natural structural boundaries formed by track gradient segments. Second, some continuous control methods primarily output a single traction or braking ratio, limiting their ability to describe traction changes at different locations within a single gradient segment, making it difficult to simultaneously determine the traction switching position and the different traction ratios before and after the switch using a single structured action. Third, after the strategy makes local speed adjustments to the current segment, the new speed trajectory may deviate from the original reference energy-saving speed curve. If this deviation continues to propagate directly along subsequent tracks, it will further affect subsequent running time. Regarding energy consumption evaluation, existing methods lack a way to reconnect the adjusted trajectory to the reference speed curve based on the actual dynamic process; fourth, train trajectory optimization involves indicators such as traction energy consumption, planned running time, and running stability. Strengthening one indicator alone can easily cause conflicts between different optimization objectives, especially in cases where extending running time is traded for lower energy consumption or increasing traction energy consumption is traded for punctuality; fifth, before the train reaches the end of the line, the subsequent part of the current candidate trajectory has not been fully affected by the strategy action. At this time, directly calculating the time and energy consumption evaluation based on the entire trajectory is somewhat incomplete, and using the same evaluation intensity at different locations will affect the effectiveness of reinforcement learning training signals.
[0004] Therefore, a train trajectory optimization method is needed that can reduce the complexity of reinforcement learning decision-making by segmenting the track gradient, improve the expressive ability of traction control within the gradient segment, and limit the continuous propagation of local speed adjustments to subsequent tracks. At the same time, it should be able to coordinate traction energy consumption, punctuality, and running smoothness under the constraints of train dynamics and speed boundaries, and achieve stable optimization of gradient control parameters by using PPO continuous action reinforcement learning.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] To address or at least alleviate one or more of the above problems, a train trajectory optimization method and system based on gradient traction and speed curve reconnection is provided. The method uses track gradient segments as reinforcement learning decision units, simultaneously determining the traction switching position, the traction ratio before switching, and the traction ratio after switching within the gradient segment through three-dimensional continuous motion, and advancing the speed meter by meter in conjunction with train dynamics constraints. When a local trajectory deviates from the reference energy-saving speed curve, subsequent trajectory reconnection is achieved smoothly through traction catching-up or coasting. Simultaneously, a reward mechanism is constructed considering operating energy consumption, planned operating time error, and speed change stability, and a PPO continuous motion reinforcement learning algorithm is used for strategy training, thereby improving the precision, stability, and energy-saving and punctuality coordination capabilities of train trajectory optimization.
[0007] To achieve the above objectives, according to a first aspect of the present invention, a train trajectory optimization method based on the connection between gradient traction and speed curves is provided, comprising the following steps:
[0008] S1. Obtain the line gradient segment, speed limit segment, train dynamics parameters and planned running time, and establish line attributes for each location.
[0009] S2. Generate a reference energy-saving speed curve, a shortest operating time curve, and a speed boundary that meet the planned operating time constraints;
[0010] S3. The line section between adjacent gradient boundaries is taken as the current decision gradient section. The gradient section status is constructed according to the train operation status and the length and gradient of the gradient section ahead. The three-dimensional continuous action is input into the continuous action strategy network to obtain the three-dimensional continuous action, which is used to determine the traction switching position in the current gradient section, the first traction ratio before the traction switching position, and the second traction ratio after the traction switching position.
[0011] S4. Within the current slope, perform train dynamics recursion position by position according to the preset spatial step size. Select the first traction ratio or the second traction ratio according to the relationship between the current position and the traction switching position. Combine the maximum available traction acceleration, the additional effect of the line gradient and the basic running resistance to recursively deduce the speed at the next position and update the running time and traction energy consumption. Correct the candidate speed according to the shortest running time curve and the speed boundary.
[0012] S5. Starting from the end of the current slope, compare the candidate speed with the reference energy-saving speed curve position by position. If there is a deviation, perform reference speed curve reconnection so that the candidate speed trajectory is reconnected with the reference energy-saving speed curve.
[0013] S6. Based on the running time, traction energy consumption, and stability index of the candidate speed trajectory after reconnection, form punctuality evaluation and energy consumption evaluation. After energy saving and punctuality gating and combined with position reliability weight, obtain a comprehensive reward. Update the continuous action strategy network using the continuous action strategy optimization algorithm, return to step S3 until the end of the line is reached and output the optimized train running trajectory.
[0014] Furthermore, a reference energy-saving speed curve, a shortest operating time curve, and speed boundaries that satisfy the planned operating time constraints are generated, including:
[0015] Based on the upper limit of train traction capacity and the maximum braking capacity, forward and reverse recursion are performed respectively, and the shortest running time curve that meets the train traction capacity, terminal braking requirements and line speed limit is generated by combining the position-by-position with the line speed limit.
[0016] The portion of the shortest running time curve that is higher than the candidate cruise speed is restricted to the candidate cruise speed, thus obtaining a cruise speed candidate curve and calculating its running time. The candidate cruise speed is then adjusted through a binary search so that the running time of the cruise speed candidate curve approaches the planned running time.
[0017] Multiple candidate speed ratios and multiple coasting entry positions are set. A corresponding candidate reference curve is generated for each candidate speed ratio. After the coasting entry position, the actual traction control acceleration is set to zero. The coasting speed is obtained by recursion according to the train dynamics relationship. When the coasting speed reaches the speed corresponding to the position of the candidate reference curve, the remaining curve is restored to the candidate reference curve. When the coasting speed drops to zero before the end point, the coasting entry position is moved and the recursion is restarted.
[0018] For each candidate speed ratio and each coasting entry position, the running time error and traction energy consumption are calculated respectively. First, the candidate trajectory whose running time error meets the preset conditions is selected. Then, the candidate trajectory with the lowest traction energy consumption is selected from the selection results as the reference energy-saving speed curve.
[0019] For each of the selected candidate trajectories, the maximum and minimum velocity values are taken at each position. The results are then interpolated, and the interpolation results are cropped using the shortest running time curve to obtain the velocity boundary.
[0020] Furthermore, the input continuous action strategy network yields three-dimensional continuous actions, which are used to determine the traction switching position within the current slope segment, the first traction ratio before the traction switching position, and the second traction ratio after the traction switching position, including:
[0021] The three action components output by the continuous action strategy network are each restricted to a preset value range [0,1].
[0022] The traction switching position is determined based on the product of the first motion component and the current slope length, and the traction switching position is located between the start and end positions of the current slope.
[0023] The second action component is determined as the first traction ratio before the traction switching position, and the third action component is determined as the second traction ratio after the traction switching position.
[0024] When advancing position by position within the current slope, if the current position is not later than the traction switching position, the first traction ratio is multiplied by the maximum available traction acceleration at the current position to obtain the actual traction control acceleration; if the current position is later than the traction switching position, the second traction ratio is multiplied by the maximum available traction acceleration at the current position to obtain the actual traction control acceleration.
[0025] Furthermore, the slope status is constructed based on the train's operating status and the length and gradient of the preceding slope, including:
[0026] When the train enters the current gradient, it acquires the current gradient travel time, planned travel time error, current cumulative traction energy consumption, remaining reference energy consumption, current train position, current speed, handover speed of the next gradient, and traction information required to maintain the current speed.
[0027] Obtain the length and slope information of multiple slope segments ahead of the current slope segment;
[0028] The acquired information and line status information are normalized and concatenated to form the state vector corresponding to the current slope segment. The state vector is then input into the continuous action strategy network.
[0029] Furthermore, within the current slope section, train dynamics are recursively calculated position by position according to a preset spatial step size, including:
[0030] The maximum available traction acceleration at the current position is determined based on the train speed at the previous position. When the train speed at the previous position is zero, the upper limit of the train traction capacity is taken as the maximum available traction acceleration. When the train speed at the previous position is greater than zero, the smaller value between the upper limit of the train traction capacity and the traction power constraint acceleration is taken as the maximum available traction acceleration.
[0031] The actual traction control acceleration is determined based on the relationship between the current position and the traction switching position, and the additional acceleration due to the track gradient and the basic running resistance acceleration at the current position are calculated.
[0032] The gradient acceleration of the line is weighted according to the coverage length of the train in the adjacent gradient segment, and the gradient value corresponding to the next gradient segment is used after the train has fully entered the next gradient segment.
[0033] The net acceleration of the train is obtained by subtracting the additional acceleration due to the track gradient and the basic running resistance acceleration from the actual traction control acceleration. The next position speed is then calculated based on the current position speed, the net acceleration of the train, and the preset spatial step size, while simultaneously accumulating the running time and positive traction energy consumption.
[0034] Further, the candidate speed is corrected based on the shortest running time curve and the speed boundary, including:
[0035] The candidate velocity at the current position is compared with the shortest running time curve and the velocity value at the corresponding position of the velocity boundary;
[0036] When the candidate speed exceeds the achievable speed of the shortest running time curve at the corresponding position, the candidate speed is corrected to the achievable speed, and the corresponding actual traction control quantity is calculated back based on the train dynamics relationship.
[0037] When the upper and lower boundaries of the velocity boundary coincide at the current position, and the boundary velocity at this position shows an upward trend relative to the previous position, the maximum available traction acceleration is used for acceleration.
[0038] When the train enters the preset cruise or coasting zone and the speed boundary does not form a rigid coincident constraint, the actual traction control quantity is set to zero, so that the train enters the coasting state.
[0039] When the corrected train speed is lower than the preset low-speed threshold, protective traction control is applied to remove the train from the low-speed operating area.
[0040] Further, performing a reference speed curve reconnection, so that the candidate speed trajectory is reconnected to the reference energy-saving speed curve, includes:
[0041] Starting from the end of the current slope segment, compare the candidate speed with the reference speed of the reference energy-saving speed curve at the corresponding position;
[0042] When the candidate speed is lower than the reference speed, the maximum available traction acceleration at the current position is used for traction and catching up. When the candidate speed at the next position calculated according to the train dynamics relationship is not lower than the reference speed at the next position, the candidate speed at the next position is corrected to the reference speed at the next position.
[0043] When the candidate speed is not lower than the reference speed, the actual traction control acceleration is set to zero, so that the train coasts under the action of the gradient and the basic running resistance until the candidate speed drops to the reference speed at the corresponding position.
[0044] When the candidate speed is equal to the reference speed, the reconnection is determined to be complete and the reconnection is terminated. Subsequent sections that are not affected by the current slope segment action continue to use the reference energy-saving speed curve.
[0045] The reconnection is terminated when the train reaches the end of the line before the candidate speed and reference speed become equal again.
[0046] Furthermore, punctuality and energy consumption assessments are generated, and a comprehensive reward is obtained by combining energy-saving and punctuality gating with location reliability weights, including:
[0047] A punctuality evaluation is formed based on the absolute error between the total running time of the candidate speed trajectory after reconnection and the planned running time. When the absolute error does not exceed a preset time error threshold, the punctuality evaluation is positive and decreases as the absolute error increases. When the absolute error exceeds the preset time error threshold, the punctuality evaluation is negative and decreases as the absolute error increases.
[0048] An energy consumption evaluation is formed based on the difference between the cumulative positive traction energy consumption of the candidate speed trajectory after reconnection and the total traction energy consumption corresponding to the reference energy-saving speed curve. When the traction energy consumption of the candidate trajectory is not lower than the reference traction energy consumption, a negative evaluation is given. When the traction energy consumption of the candidate trajectory is lower than the reference traction energy consumption, a positive evaluation is given based on the energy saving and the upper limit of the evaluation is limited.
[0049] When the traction energy consumption of the candidate trajectory is not lower than the reference traction energy consumption and the punctuality evaluation is positive, the punctuality evaluation is set to zero; when the traction energy consumption of the candidate trajectory is lower than the reference traction energy consumption and the punctuality evaluation is not positive, the energy consumption evaluation is set to zero; and the gated punctuality evaluation and energy consumption evaluation are constructed into a joint evaluation item.
[0050] A stability penalty term is formed based on the speed change stability index of the candidate speed trajectory after reconnection, and a position confidence weight is determined based on the current position of the train. The sum of the stability penalty term and the joint evaluation term is weighted by the position confidence weight to obtain a comprehensive reward for strategy update.
[0051] Furthermore, the continuous action policy network is updated using a continuous action policy optimization algorithm, including:
[0052] Write the current slope state, the three-dimensional continuous action, the log probability of the action, the state value, the comprehensive reward, the termination flag, and the current candidate velocity trajectory into the trajectory cache, and use the state of the next slope as the input for subsequent strategy decisions;
[0053] When the number of samples in the trajectory cache reaches the preset update condition, the discount reward is calculated backward from the end of the trajectory, and the advantage value is calculated based on the discount reward and the state value saved at the time of sampling.
[0054] The policy probability ratio is constructed based on the ratio of the log probability of the current policy network to that of the old policy network at the time of sampling for the same sampling action. An optimization objective is constructed using the pruning term, the value function error term, and the policy distribution entropy regularization term of the policy probability ratio, and the continuous action policy network and value network are updated.
[0055] The updated policy network parameters are synchronized to the old policy network so that the updated policy parameters are used for trajectory sampling in the next stage.
[0056] When the train reaches the end of the line, the termination flag is set to true and the current training round ends, causing the discounted reward for the current line task to be truncated at the end.
[0057] To achieve the above objectives, according to a second aspect of the present invention, a train trajectory optimization system based on gradient traction control is provided, comprising:
[0058] The track and train data processing module is used to obtain track gradient segments, speed limit segments, total track length, train dynamic parameters and planned running time, and to establish track attributes at each location.
[0059] The reference trajectory generation module is used to generate a reference energy-saving speed curve, a shortest running time curve, and a speed boundary that meet the planned running time constraints.
[0060] The slope state construction and action output module is used to construct the slope state based on the line section between adjacent slope boundaries as the current decision slope, and the length and slope of the slope ahead according to the train operation status and the length and slope of the slope ahead. The module inputs the continuous action strategy network to obtain three-dimensional continuous actions, which are used to determine the traction switching position in the current slope, the first traction ratio before the traction switching position, and the second traction ratio after the traction switching position.
[0061] The dynamic propulsion and boundary correction module is used to perform train dynamics recursion position by position within the current slope according to a preset spatial step size, select the first traction ratio or the second traction ratio according to the relationship between the current position and the traction switching position, and recursively deduce the speed at the next position and update the running time and traction energy consumption by combining the maximum available traction acceleration, the additional effect of the track gradient and the basic running resistance, and correct the candidate speed according to the shortest running time curve and the speed boundary.
[0062] The reference speed curve reconnection module is used to compare the candidate speed with the reference energy-saving speed curve position by position, starting from the end of the current slope. When there is a deviation, the reference speed curve reconnection is performed to reconnect the candidate speed trajectory with the reference energy-saving speed curve.
[0063] The comprehensive evaluation and strategy update module is used to calculate the total running time, cumulative positive traction energy consumption, and speed change stability index based on the candidate speed trajectory after reconnection, forming punctuality evaluation and energy consumption evaluation. After energy saving and punctuality gating and combining position reliability weight, a comprehensive reward is obtained. The continuous action strategy optimization algorithm is used to update the continuous action strategy network, and the module returns to the slope state construction and action output module to execute the next slope until the train reaches the end of the line, and outputs the optimized train running trajectory.
[0064] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art.
[0065] This invention uses the slope segments formed by adjacent slope boundaries as strategy decision units. Compared with position-by-position action decision-making, it effectively reduces the number of decision-making processes and the length of action sequences during long-distance operation, while preserving the control differences between different slope segments, thus reducing the decision complexity of long-distance trajectory optimization.
[0066] This invention employs continuous traction control for slope sections. By simultaneously determining the traction switching position, the traction ratio before switching, and the traction ratio after switching through three continuous motion components, a single slope section decision can represent different combinations of traction timing and traction intensity, thereby improving the expressive power of traction control within the slope section.
[0067] This invention performs train dynamics recursion within the slope section according to spatial step length, and comprehensively considers traction capacity, power constraints, basic running resistance, track gradient, and train length influence when the train crosses the slope section boundary. At the same time, it uses the shortest running time curve, speed boundary, and low-speed protection conditions to correct the candidate speed and traction control quantity, thereby improving the physical feasibility of the candidate running trajectory.
[0068] This invention employs a reference speed curve reconnection mechanism, which performs traction chasing when the candidate speed is lower than the reference speed and coasting reconnection when the candidate speed is not lower than the reference speed. This allows the locally adjusted trajectory to reconnect to the reference energy-saving speed curve under the condition of satisfying dynamic constraints, thereby suppressing the continuous propagation of local trajectory adjustments to subsequent lines.
[0069] This invention restricts control methods that significantly increase traction energy consumption in exchange for punctuality or significantly extend running time in exchange for energy saving through an energy-saving and punctuality gating mechanism. It also introduces a position reliability weight that changes with the train's running position, so that the complete running trajectory has a greater impact on strategy updates, thus coordinating the optimization relationship between energy saving, punctuality and smoothness.
[0070] This invention employs a PPO (Probability-Based Action) continuous action strategy to optimize slope control parameters. It limits the magnitude of a single strategy update by pruning the probability ratio between the old and new strategies, and combines value function estimation and entropy regularization to maintain action exploration capabilities, thereby improving the stability of the continuous traction strategy update process.
[0071] The specific embodiments of the present invention will now be described in further detail with reference to the accompanying drawings. Attached Figure Description
[0072] The accompanying drawings, as part of this invention, are provided to further illustrate the invention. The illustrative embodiments and descriptions of the invention are used to explain the invention, but do not constitute an undue limitation thereof. Clearly, the drawings described below are merely some embodiments; those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0073] Figure 1 This is a flowchart illustrating the train trajectory optimization method based on slope traction and speed curve reconnection in this specific embodiment.
[0074] Figure 2 This is a schematic diagram illustrating the process of searching for a reference energy-saving speed curve and constructing a speed boundary in this specific embodiment.
[0075] Figure 3 This is a schematic diagram of the process for generating continuous traction parameters for a slope segment in this specific embodiment.
[0076] Figure 4This is a schematic diagram of the process for reconnecting the reference speed curve in this specific embodiment.
[0077] Figure 5 This is a schematic diagram comparing the train speed and trajectory in this specific embodiment.
[0078] Figure 6 This is a schematic diagram comparing the energy consumption of the optimized train trajectory and the reference trajectory in this specific implementation.
[0079] Figure 7 This is a schematic diagram illustrating the time error variation in optimizing the train trajectory in this specific embodiment.
[0080] Figure 8 This is a schematic diagram of the reward monitoring results of the continuous action PPO training process in this specific embodiment.
[0081] Figure 9 This is a schematic diagram of the energy consumption monitoring results of the continuous action PPO training process in this specific embodiment.
[0082] Figure 10 This is a schematic diagram of the time monitoring results of the continuous action PPO training process in this specific embodiment.
[0083] Figure 11 This is a schematic diagram of the train trajectory optimization system based on slope traction control in this specific embodiment. Detailed Implementation
[0084] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments will be clearly and completely described below with reference to the accompanying drawings. The following embodiments are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0085] In the following description, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0086] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of the present invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0087] Please see Figure 1 This invention provides a train trajectory optimization method based on the connection between gradient traction and speed curves, comprising the following steps:
[0088] S1. Obtain the line gradient segment, speed limit segment, train dynamics parameters and planned running time, and establish line attributes for each location.
[0089] S2. Generate a reference energy-saving speed curve, a shortest operating time curve, and a speed boundary that meet the planned operating time constraints;
[0090] S3. The line section between adjacent gradient boundaries is taken as the current decision gradient section. The gradient section status is constructed according to the train operation status and the length and gradient of the gradient section ahead. The three-dimensional continuous action is input into the continuous action strategy network to obtain the three-dimensional continuous action, which is used to determine the traction switching position in the current gradient section, the first traction ratio before the traction switching position, and the second traction ratio after the traction switching position.
[0091] S4. Within the current slope, perform train dynamics recursion position by position according to the preset spatial step size. Select the first traction ratio or the second traction ratio according to the relationship between the current position and the traction switching position. Combine the maximum available traction acceleration, the additional effect of the line gradient and the basic running resistance to recursively deduce the speed at the next position and update the running time and traction energy consumption. Correct the candidate speed according to the shortest running time curve and the speed boundary.
[0092] S5. Starting from the end of the current slope, compare the candidate speed with the reference energy-saving speed curve position by position. If there is a deviation, perform reference speed curve reconnection so that the candidate speed trajectory is reconnected with the reference energy-saving speed curve.
[0093] S6. Based on the running time, traction energy consumption, and stability index of the candidate speed trajectory after reconnection, form punctuality evaluation and energy consumption evaluation. After energy saving and punctuality gating and combined with position reliability weight, obtain a comprehensive reward. Update the continuous action strategy network using the continuous action strategy optimization algorithm, return to step S3 until the end of the line is reached and output the optimized train running trajectory.
[0094] Step 1: Input parameters and preprocess, and establish position-by-position line attributes.
[0095] Read the route, train parameters, and planned running time.
[0096] Read the line gradient boundaries and corresponding gradient values, speed limit boundaries and corresponding speed limit values, obtain the train mass, length, traction power, traction and braking capacity, mass correction coefficient, basic resistance parameters, and the planned running time of the current task, and unify the dimensions of line position, speed, time, and dynamic parameters.
[0097] Expand the line segment attributes.
[0098] The offline planning module expands the gradient and speed limit of each segment into meter-by-meter attributes. Let the boundary of each segment be... , No. The attribute value of the segment is Then the position The current segmentation attribute is:
[0099] (1a)
[0100] (1b)
[0101] in, These represent the starting coordinates of each segment of the line, in meters (m). Indicates the first The coordinates of the termination position of the first line segment, which is also the coordinates of the first... +1 starting boundary position of line segment, This represents the line segment number, which is a positive integer. Indicates the first The route attribute values corresponding to each route segment, when the gradient information is expanded... Indicates the first The gradient value of the section of track; when speed limit information is displayed. Indicates the first Speed limit for this section of the line. Indicates the train's current position The corresponding positional line attribute value
[0102] Speed limit changed from km / h to m / s:
[0103] (2)
[0104] in, Indicates position The converted line speed limit value, Indicates the current number The termination position of each line segment.
[0105] The remaining distance to the end of the current segment is:
[0106] (3)
[0107] in, Indicates the current position The remaining distance to the end of the current route segment. Indicates the train's current location.
[0108] The next segment attribute value is:
[0109] (4)
[0110] in, Indicates the current position The line attribute values corresponding to subsequent adjacent line segments. Indicates the first The line attribute values corresponding to each line segment.
[0111] The above expansion results are used for forward and backward recursion of the shortest running time curve, and for slope length and slope observation in environmental conditions.
[0112] Calculate the length of the slope segment and the average speed of each segment.
[0113] The slope length between adjacent segment boundaries is:
[0114] (5)
[0115] in, Indicates the first The length of each line segment.
[0116] If the first The runtime of segment allocation is Then the average velocity of this segment for:
[0117] (6)
[0118] The offline runtime allocation process sorts the segmented average speeds from largest to smallest, and groups segments with the same average speed or a difference less than a preset precision into the same speed group. Let the segment with the same average speed or a difference less than a preset precision be... Each velocity group contains a segment set. Then the total length of the velocity group for:
[0119] (7)
[0120] When allocating surplus time to the current highest average speed group At that time, the first Time allocated to the segment for:
[0121] (8)
[0122] In one implementation, the reference trajectory is generated by cruise-lazy search, and the above-mentioned segmented time allocation relationship serves as a general calculation relationship in the construction of the route reference trajectory.
[0123] Step 2: Generate the shortest running time curve, the reference energy-saving speed curve, and the feasible speed boundary.
[0124] Step 2.1: Construct the shortest running time curve based on forward and reverse dynamics recursion.
[0125] The speed is calculated by forward recursion from the starting point to the end point based on the maximum available traction capacity, and by reverse recursion from the end point to the starting point based on the maximum braking capacity. The shortest running time curve is formed by combining the speed limit of the line at each position. Then, the reference energy-saving speed curve is searched with the planned running time as a constraint, and the corresponding upper and lower speed boundaries are constructed.
[0126] Load the current task reference curve and velocity boundary.
[0127] The shortest running time curve, reference energy-saving speed curve, upper speed boundary, and lower speed boundary are loaded into the current train operating environment, and the speed trajectory to be optimized is initialized with the reference energy-saving speed curve, providing physical priors and evaluation benchmarks for subsequent slope-level continuous motion control.
[0128] Forward recursion of the shortest running time curve.
[0129] Let the forward recursion speed be... The current speed limit is The maximum traction capacity at the current position. for:
[0130] (9)
[0131] in, Indicates the first The maximum allowable traction force of the train at each sampling point on the line. Indicates the train's maximum traction force. Indicates the train's rated traction power. This represents the train mass correction factor. Indicates train mass. Indicates the first -1 forward recursion speed at line sampling points.
[0132] Positive net acceleration for:
[0133] (10)
[0134] in, Indicates the first The slope resistance acceleration generated by the slope at each sampling point on the line, Indicates the first The resistance acceleration corresponding to the basic train running resistance at each sampling point on the line.
[0135] Forward reachability for:
[0136] (11)
[0137] in, Indicates the first The train speed is obtained by forward recursion at -1 line sampling points.
[0138] When the forward speed reaches the speed limit, the position is recorded as the traction-cruise transition position, and the same recursion is continued in subsequent speed-limited sections.
[0139] The reverse recursion of the shortest running time curve.
[0140] Let the reverse recursion speed be... The maximum braking acceleration is The coefficients of the quadratic equation used to solve for the velocity at the previous position are:
[0141] (12)
[0142] (13)
[0143] (14)
[0144] in, The coefficients of the quadratic term in the reverse velocity recursion quadratic equation are... The coefficients of the first term in the quadratic equation for reverse velocity recursion are... This is the constant term in the reverse velocity recursion quadratic equation. This is the coefficient of the quadratic term of the basic train running resistance. This is the coefficient of the first-order term of the train's basic operating resistance. This is the coefficient of the basic operating resistance constant term of the train.
[0145] The reverse reachable speed is:
[0146] (15)
[0147] in, Indicates the first The achievable speed is obtained by recursion from reverse braking at -1 line sampling points. This represents the line speed limit value at the i-1th line sampling point.
[0148] The combined shortest running time curve of forward and reverse reachable velocities:
[0149] (16)
[0150] in, This represents the speed corresponding to the shortest running time curve at the i-th line sampling point.
[0151] Calculation of segmented running times for the shortest running time curve.
[0152] In the speed-limited sections, the segment running time is:
[0153] (17)
[0154] in, Indicates the first The shortest running time corresponding to each line segment. Indicates the first -1 The shortest running time curve speed at each line sampling point.
[0155] The shortest running time for the entire line is:
[0156] (18)
[0157] in, This indicates the shortest travel time for the train under the current track conditions. This represents the total number of segments in the line. This indicates the segment number of the line.
[0158] Step 2.2: Determine the reference energy-saving speed curve based on cruise speed and coasting position.
[0159] Let the candidate cruise speed be The candidate curve after reducing the shortest running time curve to the cruising speed is:
[0160] (19)
[0161] in, Indicates the first Candidate reference speeds at each line sampling point after the cruise speed limit. This indicates the preset candidate cruise speed.
[0162] Its running time is:
[0163] (20)
[0164] in, Indicates based on candidate reference velocity curve The total train travel time was calculated. This represents the total number of discrete sampling points on the line. Indicates the first -1 candidate reference speed at line sampling points Indicates the line sampling point number, This indicates the planned train travel time.
[0165] Adjust using binary search :when Reduce cruising speed when Increase the cruise speed as needed until the cruise curve's operating time approaches the planned operating time.
[0166] The upper limit of the speed ratio is:
[0167] (twenty one)
[0168] in, This represents the maximum value of the candidate velocity ratio.
[0169] Candidate coasting speed curves are generated.
[0170] For candidate velocity ratio First, it is formed:
[0171] (twenty two)
[0172] in, Indicates the speed ratio after adjustment. Candidate reference speeds at each line sampling point This represents the candidate velocity scaling factor.
[0173] Let the coasting entry position be... The traction acceleration is zero in the coasting region:
[0174] (23a)
[0175] (23b)
[0176] in, Indicates the first Traction control input at each line sampling point Indicates the position where the coasting begins.
[0177] Net acceleration in the coasting region for:
[0178] (twenty four)
[0179] coasting speed for:
[0180] (25)
[0181] in, Indicates the first -1 line sampling point coasting speed.
[0182] If the coasting speed reaches the speed corresponding to the candidate reference curve, the remaining curve after coasting is restored to the candidate reference curve; if the coasting speed drops to zero before the end point, the coasting entry position is moved and the search is restarted.
[0183] Evaluation of candidate coasting speed curves.
[0184] Candidate ratio and inertial entry position Jointly determine candidate curves Its operating time and energy consumption are:
[0185] (26)
[0186] (27)
[0187] in, Indicates the ratio of candidate velocities and inertial entry position The total running time corresponding to the determined candidate velocity curve. Indicates the ratio of candidate velocities and inertial entry position The determined candidate speed curve corresponds to the cumulative positive traction energy consumption. This represents the corresponding candidate velocity curve.
[0188] Time error for:
[0189] (28)
[0190] The offline planning process first searches within the candidate ratio and coasting position range to ensure that the time error meets the preset conditions. Then, it selects the candidate curve with lower energy consumption as the reference energy-saving speed curve from the candidate curves that meet the conditions.
[0191] Speed ratio search that satisfies on-time constraints.
[0192] Let the set of candidate velocity proportions be... For each ratio, calculate:
[0193] (29)
[0194] in, For the first Each candidate velocity ratio corresponds to the running time error of the candidate trajectory. Indicates the first One candidate velocity ratio coefficient, They represent the first to the second. Candidate velocity scaling factor.
[0195] when:
[0196] (30)
[0197] Then narrow the upper bound of the candidate proportion; when:
[0198] (31)
[0199] Then, the search moves to a larger candidate proportion. Finally, the largest candidate proportion that satisfies the 1-second time error condition is obtained.
[0200] Step 2.3: Construct a reference energy-saving speed boundary and calculate traction energy consumption.
[0201] For multiple candidate coasting curves, the maximum and minimum values are taken point by point:
[0202] (32)
[0203] (33)
[0204] in, For the first The upper boundary of the velocity at each line sampling point For the first The lower boundary of the velocity at each line sampling point. To adopt the first The candidate coasting speed curve generated by the candidate speed ratio is in the... Speed values at each line sampling point Indicates the candidate trajectory number.
[0205] For discrete points between the coasting entry position and the entry velocity, interpolation is performed using candidate entry point data to obtain a smooth boundary curve. Even after interpolation, the velocity boundary still needs to undergo shortest runtime curve trimming.
[0206] (34)
[0207] (35)
[0208] Cruise traction energy consumption calculation.
[0209] When the speed remains constant at adjacent positions and traction continues as required by resistance, cruise traction energy consumption for:
[0210] (36)
[0211] in, This is an indicator that takes 1 if the condition is met and 0 otherwise. For the first The traction control input during the cruise phase at each sampling point on the line. The traction energy consumption for the entire curve is still calculated according to the formula. calculate, This indicates the total positive traction energy consumption of the entire line. Indicates the first The single-step traction energy consumption generated by each sampling interval.
[0212] Step 2.4: Form offline energy-saving targets and invert reference control actions.
[0213] Let the cruising speed be The maximum speed limit is The energy consumption per unit position corresponding to the maximum traction energy consumption and cruise energy consumption are respectively:
[0214] (37)
[0215] (38)
[0216] in, This represents the train's traction acceleration under maximum traction conditions. This represents the traction acceleration required to maintain the train's current speed during cruise. This represents the traction energy consumption per unit position under maximum traction conditions. This indicates the traction energy consumption per unit location during cruise.
[0217] The speed limit related items are:
[0218] (39)
[0219] in, This indicates speed limit-related evaluation items, used to assess the degree of matching between the candidate cruising speed and the maximum speed limit of the route. This indicates the maximum permissible speed limit for the entire route.
[0220] The traction cost item is:
[0221] (40)
[0222] in, This is a cost evaluation item for traction.
[0223] The cruising range item is:
[0224] (41)
[0225] in, This indicates the cruise range evaluation item. This represents the minimum cruise traction energy consumption that satisfies the runtime constraint. This indicates the cruise traction energy consumption corresponding to the fastest operating trajectory.
[0226] The offline heuristic energy-saving goal is:
[0227] (42)
[0228] in, This represents an offline heuristic energy-saving evaluation index used to evaluate the energy-saving performance of candidate reference speed curves. This represents the minimum cruise traction energy consumption that satisfies the runtime constraint. This represents the rate-limit constraint evaluation item. This metric is used to form offline reference targets and environment demonstration metrics, and does not directly replace the final reward based on reference energy consumption in the training environment.
[0229] The reference speed curve corresponds to the inversion of control actions.
[0230] The required output acceleration is obtained from the reference velocity curve. :
[0231] (43)
[0232] Natural acceleration for:
[0233] (44)
[0234] Required traction acceleration for:
[0235] (45)
[0236] If the required traction is positive, the normalized traction action is calculated based on the maximum traction capacity:
[0237] (46)
[0238] in, To control the execution actions in the model; =0 indicates no traction; =1 indicates that the maximum traction capacity is used; For the first At each sampling point on the line, the theoretical traction control quantity required to achieve the reference speed curve is determined. For the first The maximum permissible traction force of trains at each sampling point along the line.
[0239] If the required traction is negative, the normalized braking action is calculated based on the maximum braking capacity:
[0240] (47)
[0241] in, This indicates the braking force value corresponding to the train's maximum braking force.
[0242] Step 3: Construct the slope segment's operating state and define the slope segment's continuous actions.
[0243] Step 3.1: Construct the decision state of the current slope segment and the slope segment ahead.
[0244] The track section between adjacent gradient boundaries is designated as the current decision gradient segment. When the train enters the current gradient segment, it acquires the current segment's running time, planned running time error, current cumulative energy consumption, remaining reference energy consumption, current position, current speed, handover speed to the next gradient segment, and traction information required to maintain the current speed. Furthermore, it acquires the length and gradient information of multiple preceding gradient segments. These operating states and track states are normalized to form a state vector corresponding to the current gradient segment, which is then input into the continuous action strategy network. By simultaneously incorporating current train operating information and track characteristics of preceding gradient segments, the strategy can determine the traction control method for the current gradient segment based on the train's current operating state and changes in the preceding track.
[0245] Step 3.2: Define and output the continuous traction parameters for the slope segment.
[0246] The continuous motion strategy outputs three-dimensional continuous motion based on the slope segment operation status constructed in step 3.1, with each motion component limited to a preset value range. Specifically, the first motion component determines the traction switching position within the current slope segment and maps it to the actual spatial position based on the starting and ending positions of the current slope segment and its length; the second motion component determines the first traction ratio before the traction switching position; and the third motion component determines the second traction ratio after the traction switching position. Thus, the single-time strategy output is converted into continuous traction control parameters for the slope segment, including the traction switching position, the traction ratio before the switch, and the traction ratio after the switch, providing control input for subsequent position-by-position dynamic calculations within the slope segment.
[0247] Mapping relationship of continuous actions on slope sections.
[0248] The starting point of the current slope is The destination is Strategy output action All three components are in Within the range. The action is converted to:
[0249] (48)
[0250] in, This indicates the traction control switching position within the current slope section. This represents the first action component output by the continuous action strategy. This indicates the current termination position of the slope segment.
[0251] when When using the traction ratio before switching ;when When using the traction ratio after switching The corresponding traction term can be represented as:
[0252] (49)
[0253] in, Indicates the first Maximum permissible traction acceleration at each sampling point on the line.
[0254] The actions are executed after being corrected for the physical boundaries of the environment. The action output is limited to the range of 0 to 1, and the environment can also cover the actual traction items based on speed boundary overlap, cruise position, and low-speed protection conditions.
[0255] Step 4: Perform train dynamics meter by meter, and correct physical boundaries and reconnect to the reference speed curve.
[0256] Step 4.1: Perform train dynamics propulsion meter by meter within the current slope section.
[0257] Within the current gradient, train dynamics calculations are performed position by position according to a preset spatial step size. For each spatial position, the maximum available traction capacity is determined based on the current train speed. Then, based on the relationship between the current position and the traction switching position, the corresponding pre-switching traction ratio or post-switching traction ratio is selected to obtain the current actual traction acceleration. Taking into account the additional effect of the track gradient, the basic train running resistance, and traction power limitations, the net train acceleration corresponding to the current position is calculated, and the train speed at the next position is recursively deduced based on the spatial domain dynamics relationship. Simultaneously, the running time and positive traction energy consumption between adjacent positions are calculated, and the speed, time, energy consumption, and traction control sequence are updated sequentially until the dynamic propulsion of the current gradient is completed.
[0258] Step 4.2: Perform physical boundary judgment and correction.
[0259] The candidate speed is compared with the speed values at the corresponding positions of the shortest running time curve, the upper speed boundary, and the lower speed boundary. Combined with the current running position, speed change trend, and low speed protection conditions, it is determined whether the current candidate running state meets the preset running constraints. If the corresponding constraints are not met, the candidate speed or the actual traction control quantity is corrected.
[0260] Speed and traction boundary correction rules.
[0261] The candidate speed is compared with the speed values at the corresponding positions of the shortest running time curve, the upper speed boundary, and the lower speed boundary. Combined with the current running position, speed change trend, and low-speed protection conditions, it is determined whether the current candidate running state meets the preset running constraints. If the corresponding constraints are not met, the candidate speed or actual traction control quantity is corrected. When the upper and lower speed boundaries of the current position coincide, and the boundary speed shows an upward trend relative to the previous position, the maximum available traction capacity is used to increase the speed, allowing the train to continue running according to the rigid speed boundary. When the train enters the preset cruise or coasting zone, and the upper and lower speed boundaries do not form a rigid coincidence constraint, the traction output can be reduced or a zero traction mode can be used to allow the train to enter a coasting state. When the candidate speed is lower than the preset low-speed threshold and meets the low-speed protection trigger conditions, protective traction control is executed to increase the actual traction output, allowing the train to leave the low-speed running area and preventing the subsequent running time and trajectory evaluation from becoming ineffective due to excessively low speed.
[0262] Processing of meter-by-meter running results that satisfy constraints.
[0263] When physical boundary correction is not triggered, the speed, time, traction energy consumption and action results calculated jointly by the continuous action of the slope section and train dynamics are retained, and no additional correction is made to the current dynamics calculation results.
[0264] Step 4.3: Perform reference speed curve reconnection.
[0265] After the current slope segment's actions are completed, starting from the end of the current slope segment, the candidate speed trajectory is compared position by position with the reference speed at the corresponding position on the reference energy-saving speed curve. When there is a deviation between the candidate speed and the reference speed, the reference speed curve reconnection process is initiated to limit the continued impact of the local control of the current slope segment on the subsequent operating trajectory.
[0266] Reference speed curve reconnection termination condition.
[0267] During the reconnection process, candidate velocities are compared position by position. Compared with reference speed When the two are equal, that is, when the candidate speed trajectory intersects the reference energy-saving speed curve again, the reconnection is determined to be complete and the current reconnection process is terminated; subsequent sections not affected by the current slope segment action continue to use the reference energy-saving speed curve.
[0268] If the candidate trajectory reaches the end of the line before re-intersecting, the reconnection is terminated directly. Otherwise, traction reconnection or coasting reconnection continues based on the relationship between the candidate speed and the reference speed.
[0269] Traction chasing and inertial return.
[0270] Let the current position be Candidate speed is The reference speed at this position, based on the energy-saving speed curve, is... The maximum available traction acceleration at the current position is .
[0271] when If the candidate speed is lower than the reference speed, the maximum available traction acceleration should be used. To achieve traction and catch-up, the next position is calculated based on the train's spatial domain dynamics. Candidate speed If the calculation yields Then the velocity at the next position is corrected to It is believed that the candidate velocity trajectory has been reconnected to the reference energy-saving velocity curve.
[0272] when When the candidate speed is not lower than the reference speed, the traction acceleration is set to zero.
[0273] This allows the train to coast under the combined effects of gradient and basic running resistance, and is calculated according to the spatial domain dynamics relationship. .like If the speed drops to the corresponding reference speed, the reconnection is complete; otherwise, continue to the next position to perform a coasting reconnection.
[0274] During the reconnection process, the running time and traction energy consumption are updated synchronously, and the minimum running time curve, speed boundary and low speed protection constraints are continued to be met until the candidate speed trajectory intersects the reference energy-saving speed curve again or the line end point is reached.
[0275] No. Maximum available traction acceleration at each location It is determined by the upper limit of the train's traction capacity and the power constraint under the current speed conditions, and the smaller of the two values is taken.
[0276] (50)
[0277] In the current slope section, continuous action will convert the traction ratio to... The train's net acceleration is:
[0278] No. The net acceleration of the train at each position is obtained by subtracting the gradient-induced acceleration and the basic running resistance acceleration from the actual traction control acceleration.
[0279] Within the current slope, the traction ratio output by the continuous action strategy is combined with the maximum available traction acceleration at the current position to obtain the first... The actual traction control acceleration performed at each sampling point Based on this, the gradient-induced acceleration, which takes into account the influence of train length, is deducted. and basic running resistance acceleration , obtained the Net acceleration of trains at each sampling point .
[0280] (51a)
[0281] (51b)
[0282] The train's velocity after passing a certain position step is calculated using kinematic relationships in the form of displacement:
[0283] (52)
[0284] in, This indicates the distance between two adjacent line sampling points.
[0285] Calculation of local section running time and traction energy consumption.
[0286] Current slope section or any local section The runtime is:
[0287] (53)
[0288] in, This represents the starting position of the current calculated line segment. This indicates the end position of the current calculated line segment.
[0289] Traction energy consumption in local sections for:
[0290] (54)
[0291] The required traction acceleration for:
[0292] (55)
[0293] in, This indicates the sampling point. To the sampling point The target speed change is the traction control acceleration required after taking into account the additional effect of the gradient and the basic running resistance.
[0294] For the required controlled acceleration Traction and braking capabilities are constrained. When it exceeds the maximum available traction acceleration at the current position... At that time, take When it is below the maximum braking acceleration At that time, take Thus, control acceleration that satisfies vehicle dynamics constraints is obtained. .
[0295] (56)
[0296] in, This is the actual control acceleration after traction and braking capacity limitations.
[0297] The process of advancing the slope meter by meter, correcting the boundary, and reconnecting the trajectory.
[0298] Within the current slope, train dynamics are recursively calculated position by position according to a preset spatial step size. First, the maximum available traction acceleration at the current position is determined based on the train speed at the previous position. When the speed at the previous position is zero, the upper limit of train traction capacity is used. When the speed at the previous position is greater than zero, both the upper limit of train traction capacity and traction power constraints are considered, and the smaller of the two is taken as the maximum available traction acceleration at the current position. This characterizes the traction characteristics of the train under constant traction at low speeds and power constraints at high speeds.
[0299] Subsequently, the environment compares the current position with the switching position obtained from the motion mapping. If the current position is before the traction switching position, a first traction ratio is used; if the current position exceeds the traction switching position, a second traction ratio is used. The corresponding traction ratio is combined with the maximum available traction acceleration at the current position to obtain the actual traction control acceleration. Thus, continuous traction control with different traction intensities before and after the switching can be formed within the same slope segment.
[0300] After obtaining the actual traction control acceleration, the impact of track gradient and basic running resistance on train operation is further calculated. Considering the train's actual length, when the train crosses the boundary of an adjacent gradient segment, the gradient-related effect is weighted according to the coverage length of the car body in the preceding and following segments; after the train has fully entered the next gradient segment, the complete gradient value corresponding to that segment is used. Simultaneously, the basic running resistance acceleration is calculated based on the train speed. The net train acceleration is obtained by subtracting the gradient-related acceleration and the basic running resistance acceleration from the actual traction control acceleration, and the next position velocity is recursively derived based on spatial domain dynamics relationships, while simultaneously accumulating running time and positive traction energy consumption.
[0301] After completing the speed recursion at the current position, physical boundary judgment and correction are performed on the candidate speeds. When a candidate speed exceeds the achievable speed of the shortest running time curve at the corresponding position, it is restricted to the achievable speed at that position, and the corresponding traction control quantity is calculated back based on the dynamic relationship. When the upper and lower speed boundaries coincide and the boundary speeds show an upward trend, the maximum available traction acceleration is used for acceleration. When the preset coasting conditions are met and there are no rigid speed boundary constraints, the traction control quantity is set to zero, allowing the train to enter a coasting state. If the corrected train speed is lower than the preset low-speed threshold, low-speed protection control is activated, and protective traction is applied to allow the train to leave the low-speed operating area, after which normal traction control is restored.
[0302] After the traction action on the current slope is completed, the candidate speed trajectory is compared with the reference energy-saving speed curve starting from the end of the slope. When the candidate speed is lower than the reference speed, the maximum available traction acceleration is used for traction reconnection, and the speed at the next position is limited to not exceeding the corresponding reference speed. When the candidate speed is higher than or equal to the reference speed, the traction control variable is set to zero, and the train is gradually decelerated under the additional effects of the gradient and the basic running resistance using a coasting mode. During the reconnection process, the above dynamic recursion and physical boundary correction are continued, and the time, speed, and traction energy consumption are updated position by position.
[0303] When the candidate speed trajectory intersects the reference energy-saving speed curve again, the reconnection is considered complete, and the current reconnection process is terminated. Subsequent sections unaffected by the current slope action continue to use the reference energy-saving speed curve. If the line terminus has been reached before the reintersection, the reconnection is terminated directly. This ensures that the local speed deviation caused by a single slope action only propagates within the necessary subsequent sections, and its actual impact range is determined by the train's dynamic state and the intersection of the candidate trajectory and the reference trajectory.
[0304] After completing the dynamic propulsion, physical boundary correction, and trajectory reconnection for each slope segment, the system generates the state information and current evaluation results required for decision-making on the next slope segment. These evaluation results include at least the current candidate speed curve, cumulative positive traction energy consumption, deviation between actual and planned operating time, speed change stability indicators, and corresponding energy-saving, punctuality, and stability evaluations, which are used for subsequent slope segment decisions and PPO strategy updates.
[0305] Step 5: During construction, a comprehensive evaluation of stability is conducted, and the PPO strategy is optimized.
[0306] Step 5.1: Comprehensive evaluation of stability and gating rewards during construction.
[0307] Based on the candidate speed curve after completing the local trajectory update and reference speed curve reconnection, the total train running time, cumulative positive traction energy consumption, and speed change stability index are calculated. Specifically, a punctuality evaluation is formed based on the deviation between the total running time of the candidate trajectory and the planned running time; an energy consumption evaluation is formed based on the difference between the cumulative traction energy consumption of the candidate trajectory and the corresponding energy consumption of the reference energy-saving speed curve; and a stability evaluation is formed based on the degree of speed change.
[0308] Calculation of running time and traction energy consumption.
[0309] When adjacent sampling points have different velocities, the single-step running time is calculated based on the velocity change and net acceleration; when adjacent sampling points have the same velocities, the single-step running time is calculated based on the ratio of the unit spatial step size to the current velocity. ,Right now:
[0310] (57)
[0311] Traction energy consumption only includes the energy consumed during positive traction; braking or negative traction processes are not included in positive traction energy consumption. The actual traction control acceleration at each sampling location is Then the single-step forward traction energy consumption for:
[0312] (58)
[0313] Total running time of the current candidate velocity curve Total traction energy consumption They are respectively:
[0314] (59)
[0315] (60)
[0316] in, Indicates the first The running time of each line sampling interval To indicate the first The positive traction energy consumption generated by the sampling interval of each line.
[0317] Stability index and location credibility weight.
[0318] stationarity indicators We obtain the following by accumulating the absolute values of the second-order differences of the squared velocity:
[0319] (61)
[0320] To reduce the impact of incompletely determined portions of the total time and energy consumption assessment before the train reaches its destination on the current strategy update, a position reliability weight that changes with the train's running position is introduced. :
[0321] (62)
[0322] in, Indicates the total length of the line.
[0323] This weight is used to reduce the impact of evaluating the energy consumption and time of the entire trajectory before the train has reached its destination, and to ensure that the complete running result at the destination receives the full reward weight.
[0324] Rewards for punctuality.
[0325] The planned running time is The total running time of the current candidate velocity curve is Based on the absolute error of both This serves as a basis for evaluating punctuality. When the time error does not exceed 12 seconds, the punctuality reward decreases as the error increases; when it exceeds 12 seconds, it becomes a penalty.
[0326] (63)
[0327] in, To indicate the first The quasi-evaluation value corresponding to each candidate velocity trajectory.
[0328] When the time error does not exceed 12 seconds, the punctuality bonus gradually decreases as the error increases; when the time error exceeds 12 seconds, it turns into a negative evaluation, thus distinguishing between candidate trajectories that meet the basic punctuality requirements and those that deviate significantly from the planned running time.
[0329] Energy-consuming reward.
[0330] The total traction energy consumption based on the energy-saving speed curve is Based on the total positive traction energy consumption of the candidate trajectory Total traction energy consumption compared to the reference energy-saving speed curve The difference constructs the reward for the mouse. :
[0331] (64)
[0332] When the energy consumption of a candidate trajectory is higher than or equal to the reference energy consumption, the behavior of increasing energy consumption is negatively evaluated; when the energy consumption of a candidate trajectory is lower than the reference energy consumption, a positive evaluation is given based on the energy saved, and the upper limit of the reward is limited.
[0333] Time-based gating comprehensive reward.
[0334] To avoid strategies that solely rely on increasing traction energy consumption to achieve punctuality, or on reducing operating speed and extending operating time to gain energy savings, rewards are given based on punctuality performance. And the reward for the energy mouse Gating is performed on the relationship.
[0335] when And when the punctuality reward is positive, the corresponding positive punctuality reward is set to zero; when However, if the punctuality reward is not positive, the corresponding positive energy consumption reward is set to zero. After gating, when both punctuality and energy efficiency are improved, the square root of their product is used to form a joint positive benefit; when both are negative, a joint negative evaluation is formed; when one is gated to zero and the other is negative, only the negative term is retained.
[0336] Let the above gating coupling term be For, then comprehensive reward for:
[0337] (65)
[0338] in, Used to penalize candidate trajectories with unstable velocity changes. The evaluation credibility is adjusted for different operating positions. This allows train running time, traction energy consumption, and stability to be considered together in the strategy evaluation, and avoids situations where significant delays are traded for energy savings or significant increases in energy consumption are traded for punctuality, thus resulting in higher positive rewards for control outcomes.
[0339] Location credibility-weighted time-gated rewards.
[0340] On-time performance and energy consumption are calculated based on the running time and traction energy consumption of candidate trajectories, and gating is applied by considering the relationship between these two factors. When a candidate trajectory achieves better on-time performance due to increased traction energy consumption, the positive on-time reward is limited; when a candidate trajectory gains energy savings by extending its running time, the positive energy-saving reward is limited; when both on-time performance and energy efficiency improve simultaneously, a comprehensive evaluation is performed. Furthermore, speed change smoothness is incorporated into the reward calculation, and corresponding evaluation weights are set based on the train's location to differentiate the reward intensity between the intermediate and final stages, ultimately forming a comprehensive reward for PPO strategy updates.
[0341] Step 5.2: Collect trajectory samples and perform PPO policy update.
[0342] After completing the comprehensive reward calculation in step 5.1, the state, action, and operational evaluation results corresponding to the current slope segment are written into the trajectory cache. When the cumulative number of samples in the trajectory cache reaches the preset update condition, the discounted reward and advantage value are calculated using the cached samples, and the policy network and value network are updated using the Proximal Policy Optimization (PPO) algorithm; if the update condition is not met, the state construction and policy decision for the next slope segment continue to be executed.
[0343] Trajectory Sample Collection and Storage
[0344] Write the current state, action, action log probability, state value, comprehensive reward, termination flag, and candidate velocity curve into the trajectory cache, and use the state of the next slope as the input for subsequent strategy decisions.
[0345] Let the current slope decision state be The old policy network used for sampling is based on... Output the mean of the three-dimensional continuous motion, and construct a multivariate Gaussian distribution based on the current motion standard deviation. Sample motions from this distribution. The three motion components obtained from the sampling correspond to the traction switching position on the slope, the traction ratio before switching, and the traction ratio after switching, respectively, and are limited to the range of [0,1] before being input into the train operating environment.
[0346] After the current slope section is completed, the status will be changed. ,action Logarithmic probability of actions State value Comprehensive rewards and the end mark The data is written to the trajectory buffer, and the state of the next slope segment is used as input for subsequent policy decisions. This process ensures that the policy probability ratio can be calculated using the old policy probability corresponding to the sampled action when the PPO is updated.
[0347] Discount returns and advantages calculation.
[0348] When the cumulative number of samples reaches the preset PPO update step count, the discount reward is calculated backward from the end of the trajectory. Let the reward discount factor be... ,but:
[0349] (66)
[0350] in, No. The discount return corresponding to each decision moment Indicates the first +1 decision point corresponds to the future cumulative discount return. Show the first The instant reward received at each decision moment.
[0351] When the end flag of the current training round is encountered, subsequent rewards are set to zero to prevent the rewards of the current line of tasks from being passed on to the next training round.
[0352] Based on discount rewards Value of the state saved at the time of sampling Calculate the advantage value:
[0353] (67)
[0354] Before updating the strategy, the discount return and advantage value can be standardized to reduce the impact of differences in sample scale between different batches on the network parameter update.
[0355] PPO strategy network and value network updates.
[0356] Calculate the policy probability ratio using the probabilities of the current policy and the old policy for the same sampling action. :
[0357] (68)
[0358] Based on this, a PPO optimization objective is constructed that includes a policy pruning term, a value function error term, and an entropy regularization term:
[0359] (69)
[0360] in, The probability ratio is the cutoff factor. The entropy is the policy distribution. Probability ratio pruning is used to limit the magnitude of a single policy update, value function error is used to improve the accuracy of state value estimation, and entropy regularization is used to maintain the action exploration capability during training. After the update is completed, the current policy parameters are synchronized to the old policy network used for sampling.
[0361] Each PPO update performs a preset number of iterative optimizations on the current trajectory sample. During each iteration, the log probability, state value, and policy distribution entropy of the current policy with respect to the sampled actions are recalculated, and the policy network and value network are updated according to formula (69). After the current batch update is completed, the current policy network parameters are synchronized to the old policy network so that the updated policy parameters are used for the next stage of trajectory sampling.
[0362] Determining the end point of the route and the termination of the training round.
[0363] After saving the current slope sample or updating the PPO strategy, determine whether the current position has reached the total line length LL. When the train reaches the end of the line, set the termination flag to true and end the current training round, truncating the discounted reward of the current line task at the end point. When the train has not yet reached the end point, use the state of the next slope as the new strategy input, and return to construct the decision state of the current slope and the next slope. Continue to execute the state construction of the next slope, traction control, meter-by-meter dynamic propulsion, reference speed curve reconnection, and comprehensive evaluation until the train reaches the end of the line.
[0364] Step 5.3: Set PPO training parameters and key technical parameters.
[0365] The current total number of training episodes is 6000, and PPO is updated using the cumulative trajectory each time. The actor learning rate is initially set to 0.0002, and the critic learning rate is initially set to 0.0006.
[0366] Table 1: Model parameter settings in this embodiment
[0367]
[0368] Step 6: Output the optimized train trajectory and training monitoring results.
[0369] Generate and output optimized train trajectory and evaluation results.
[0370] After completing the continuous motion PPO strategy training, the trained strategy network is used to generate the traction switching position, the traction ratio before switching, and the traction ratio after switching in sequence according to the operating status of each slope. Combined with train dynamics propulsion, physical boundary correction, and reference speed curve reconnection, a complete optimized train running trajectory is obtained.
[0371] The output results include the optimized speed curve, traction switching positions for each slope, traction ratios before and after switching, traction control sequence, actual running time, planned running time error, cumulative positive traction energy consumption, and speed change stability index. During training, training data such as comprehensive rewards, punctuality evaluation, energy consumption evaluation, and motion exploration intensity can also be saved for analysis of strategy convergence and trajectory optimization effects.
[0372] Please see Figure 5 This implementation first generates the shortest running time curve based on the line gradient, speed limit conditions, and train dynamics constraints, and then further constructs a reference energy-saving speed curve and speed boundary that meet the planned running time requirements. The optimized actual running speed trajectory is always within the upper and lower speed boundaries and does not exceed the line speed limit constraints, indicating that the constructed speed boundary can effectively limit the trajectory optimization search space, while ensuring that the optimized trajectory meets the train dynamics feasibility requirements.
[0373] Please see Figure 6 As the train travels further, the cumulative traction energy consumption of both tracks gradually increases. However, the energy consumption growth trend of the optimized track is more gradual and remains within the energy consumption constraint range. This indicates that by optimizing the traction control parameters for slope sections, the present invention can adjust the traction output intensity according to different track gradient conditions, reduce energy consumption during unnecessary traction processes, and achieve energy-saving operation of the train.
[0374] Please see Figure 7 The velocity curve reconnection method proposed in this invention converges after a certain training round. The subsequent running state is adjusted according to the velocity deviation between the candidate trajectory and the reference velocity curve, so that the running time error converges and is kept within a small range, and the final arrival time converges to the planned time. This shows that the velocity curve reconnection mechanism can effectively reduce the impact of local control actions on the overall running process and improve trajectory continuity and running stability.
[0375] Please see Figure 8 As the number of training rounds increases, the strategy network continuously optimizes the traction control parameters of the slope section, and the reward value shows an overall upward trend and gradually stabilizes. This indicates that the continuous action strategy optimization method adopted in this invention can effectively learn control strategies that meet the requirements of energy saving, punctuality and smooth operation, and has good convergence performance.
[0376] Please see Figure 9 As the training process progresses, the policy network continuously adjusts the traction control parameters, and the actual operating energy consumption gradually decreases and eventually stabilizes near the target energy consumption range. This indicates that the method of the present invention can continuously optimize the traction control strategy through the reward feedback mechanism, thereby reducing operating energy consumption.
[0377] Please see Figure 10 As the strategy network is continuously updated, the traction switching position and traction control coefficient are gradually optimized, and the actual running time gradually approaches the planned running time and eventually remains stable. This shows that the method of the present invention can meet the train punctuality constraints while reducing traction energy consumption.
[0378] Based on the same inventive concept, the present invention also provides a train trajectory optimization system based on slope traction and speed curve reconnection, comprising:
[0379] The track and train data processing module is used to obtain track gradient segments, speed limit segments, total track length, train dynamic parameters and planned running time, and to establish track attributes at each location.
[0380] The reference trajectory generation module is used to generate a reference energy-saving speed curve, a shortest running time curve, and a speed boundary that meet the planned running time constraints.
[0381] The slope state construction and action output module is used to construct the slope state based on the line section between adjacent slope boundaries as the current decision slope, and the length and slope of the slope ahead according to the train operation status and the length and slope of the slope ahead. The module inputs the continuous action strategy network to obtain three-dimensional continuous actions, which are used to determine the traction switching position in the current slope, the first traction ratio before the traction switching position, and the second traction ratio after the traction switching position.
[0382] The dynamic propulsion and boundary correction module is used to perform train dynamics recursion position by position within the current slope according to a preset spatial step size, select the first traction ratio or the second traction ratio according to the relationship between the current position and the traction switching position, and recursively deduce the speed at the next position and update the running time and traction energy consumption by combining the maximum available traction acceleration, the additional effect of the track gradient and the basic running resistance, and correct the candidate speed according to the shortest running time curve and the speed boundary.
[0383] The reference speed curve reconnection module is used to compare the candidate speed with the reference energy-saving speed curve position by position, starting from the end of the current slope. When there is a deviation, the reference speed curve reconnection is performed to reconnect the candidate speed trajectory with the reference energy-saving speed curve.
[0384] The comprehensive evaluation and strategy update module is used to calculate the total running time, cumulative positive traction energy consumption, and speed change stability index based on the candidate speed trajectory after reconnection, forming punctuality evaluation and energy consumption evaluation. After energy saving and punctuality gating and combining position reliability weight, a comprehensive reward is obtained. The continuous action strategy optimization algorithm is used to update the continuous action strategy network, and the module returns to the slope state construction and action output module to execute the next slope until the train reaches the end of the line, and outputs the optimized train running trajectory.
[0385] Based on the same inventive concept, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the train trajectory optimization method based on slope traction control as described above.
[0386] The program product of the present invention for implementing the above-described method may employ a portable compact disk read-only memory and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In the present invention, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0387] It should be noted that a computer-readable storage medium may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0388] Unless otherwise defined, the technical or scientific terms used in this invention shall have the general meaning understood by one of ordinary skill in the art to which this invention pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these” used in this invention do not indicate quantitative limitations and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this invention are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to these processes, methods, products, or devices. Words such as “connected,” “linked,” and “coupled” used in this invention are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. “A plurality” used in this invention refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. Normally, the character " / " indicates that the objects before and after it are in an "or" relationship. In this invention, the terms "first," "second," "third," etc., are used only to distinguish similar objects and do not represent a specific order of objects.
[0389] Obviously, the accompanying drawings are merely some examples or embodiments of the present invention. Those skilled in the art can apply the present invention to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, certain design, manufacturing, or production modifications made according to the technical content disclosed in the present invention are merely conventional technical means and should not be considered as insufficient disclosure of the present invention.
[0390] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-described technical content to create equivalent embodiments without departing from the scope of the present invention. The implementation schemes in the above embodiments can also be further combined or replaced. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A train trajectory optimization method based on slope traction and speed curve reconnection, characterized in that, Includes the following steps: S1. Obtain the line gradient segment, speed limit segment, train dynamics parameters and planned running time, and establish line attributes for each location. S2. Generate a reference energy-saving speed curve, a shortest operating time curve, and a speed boundary that meet the planned operating time constraints; S3. The line section between adjacent gradient boundaries is taken as the current decision gradient section. The gradient section status is constructed according to the train operation status and the length and gradient of the gradient section ahead. The three-dimensional continuous action is input into the continuous action strategy network to obtain the three-dimensional continuous action, which is used to determine the traction switching position in the current gradient section, the first traction ratio before the traction switching position, and the second traction ratio after the traction switching position. S4. Within the current slope, perform train dynamics recursion position by position according to the preset spatial step size. Select the first traction ratio or the second traction ratio according to the relationship between the current position and the traction switching position. Combine the maximum available traction acceleration, the additional effect of the line gradient and the basic running resistance to recursively deduce the speed at the next position and update the running time and traction energy consumption. Correct the candidate speed according to the shortest running time curve and the speed boundary. S5. Starting from the end of the current slope, compare the candidate speed with the reference energy-saving speed curve position by position. If there is a deviation, perform reference speed curve reconnection so that the candidate speed trajectory is reconnected with the reference energy-saving speed curve. S6. Based on the running time, traction energy consumption, and stability index of the candidate speed trajectory after reconnection, form punctuality evaluation and energy consumption evaluation. After energy saving and punctuality gating and combined with position reliability weight, obtain a comprehensive reward. Update the continuous action strategy network using the continuous action strategy optimization algorithm, return to step S3 until the end of the line is reached and output the optimized train running trajectory.
2. The method according to claim 1, characterized in that, Generate a reference energy-saving speed curve, a minimum operating time curve, and speed boundaries that satisfy the planned operating time constraints, including: Based on the upper limit of train traction capacity and the maximum braking capacity, forward and reverse recursion are performed respectively, and the shortest running time curve that meets the train traction capacity, terminal braking requirements and line speed limit is generated by combining the position-by-position with the line speed limit. The portion of the shortest running time curve that is higher than the candidate cruise speed is restricted to the candidate cruise speed, thus obtaining a cruise speed candidate curve and calculating its running time. The candidate cruise speed is then adjusted through a binary search so that the running time of the cruise speed candidate curve approaches the planned running time. Multiple candidate speed ratios and multiple coasting entry positions are set. A corresponding candidate reference curve is generated for each candidate speed ratio. After the coasting entry position, the actual traction control acceleration is set to zero. The coasting speed is obtained by recursion according to the train dynamics relationship. When the coasting speed reaches the speed corresponding to the position of the candidate reference curve, the remaining curve is restored to the candidate reference curve. When the coasting speed drops to zero before the end point, the coasting entry position is moved and the recursion is restarted. For each candidate speed ratio and each coasting entry position, the running time error and traction energy consumption are calculated respectively. First, the candidate trajectory whose running time error meets the preset conditions is selected. Then, the candidate trajectory with the lowest traction energy consumption is selected from the selection results as the reference energy-saving speed curve. For each of the selected candidate trajectories, the maximum and minimum velocity values are taken at each position. The results are then interpolated, and the interpolation results are cropped using the shortest running time curve to obtain the velocity boundary.
3. The method according to claim 1, characterized in that, The input continuous action strategy network yields three-dimensional continuous actions, which are used to determine the traction switching position within the current slope segment, the first traction ratio before the traction switching position, and the second traction ratio after the traction switching position, including: The three action components output by the continuous action strategy network are each restricted to a preset value range [0,1]. The traction switching position is determined based on the product of the first motion component and the current slope length, and the traction switching position is located between the start and end positions of the current slope. The second action component is determined as the first traction ratio before the traction switching position, and the third action component is determined as the second traction ratio after the traction switching position. When advancing position by position within the current slope, if the current position is not later than the traction switching position, the first traction ratio is multiplied by the maximum available traction acceleration at the current position to obtain the actual traction control acceleration; if the current position is later than the traction switching position, the second traction ratio is multiplied by the maximum available traction acceleration at the current position to obtain the actual traction control acceleration.
4. The method according to claim 1, characterized in that, The slope condition is constructed based on the train's operating status and the length and gradient of the preceding slope, including: When the train enters the current gradient, it acquires the current gradient travel time, planned travel time error, current cumulative traction energy consumption, remaining reference energy consumption, current train position, current speed, handover speed of the next gradient, and traction information required to maintain the current speed. Obtain the length and slope information of multiple slope segments ahead of the current slope segment; The acquired information and line status information are normalized and concatenated to form the state vector corresponding to the current slope segment. The state vector is then input into the continuous action strategy network.
5. The method according to claim 1, characterized in that, Within the current slope section, train dynamics are recursively calculated position by position according to a preset spatial step size, including: The maximum available traction acceleration at the current position is determined based on the train speed at the previous position. When the train speed at the previous position is zero, the upper limit of the train traction capacity is taken as the maximum available traction acceleration. When the train speed at the previous position is greater than zero, the smaller value between the upper limit of the train traction capacity and the traction power constraint acceleration is taken as the maximum available traction acceleration. The actual traction control acceleration is determined based on the relationship between the current position and the traction switching position, and the additional acceleration due to the track gradient and the basic running resistance acceleration at the current position are calculated. The gradient acceleration of the line is weighted according to the coverage length of the train in the adjacent gradient segment, and the gradient value corresponding to the next gradient segment is used after the train has fully entered the next gradient segment. The net acceleration of the train is obtained by subtracting the additional acceleration due to the track gradient and the basic running resistance acceleration from the actual traction control acceleration. The next position speed is then calculated based on the current position speed, the net acceleration of the train, and the preset spatial step size, while simultaneously accumulating the running time and positive traction energy consumption.
6. The method according to claim 5, characterized in that, Based on the shortest running time curve and the speed boundary, the candidate speed is corrected, including: The candidate velocity at the current position is compared with the shortest running time curve and the velocity value at the corresponding position of the velocity boundary; When the candidate speed exceeds the achievable speed of the shortest running time curve at the corresponding position, the candidate speed is corrected to the achievable speed, and the corresponding actual traction control quantity is calculated back based on the train dynamics relationship. When the upper and lower boundaries of the velocity boundary coincide at the current position, and the boundary velocity at this position shows an upward trend relative to the previous position, the maximum available traction acceleration is used for acceleration. When the train enters the preset cruise or coasting zone and the speed boundary does not form a rigid coincident constraint, the actual traction control quantity is set to zero, so that the train enters the coasting state. When the corrected train speed is lower than the preset low-speed threshold, protective traction control is applied to remove the train from the low-speed operating area.
7. The method according to claim 1, characterized in that, Performing a reference speed curve reconnection, so that the candidate speed trajectory is reconnected to the reference energy-saving speed curve, includes: Starting from the end of the current slope segment, compare the candidate speed with the reference speed of the reference energy-saving speed curve at the corresponding position; When the candidate speed is lower than the reference speed, the maximum available traction acceleration at the current position is used for traction and catching up. When the candidate speed at the next position calculated according to the train dynamics relationship is not lower than the reference speed at the next position, the candidate speed at the next position is corrected to the reference speed at the next position. When the candidate speed is not lower than the reference speed, the actual traction control acceleration is set to zero, so that the train coasts under the action of the gradient and the basic running resistance until the candidate speed drops to the reference speed at the corresponding position. When the candidate speed is equal to the reference speed, the reconnection is determined to be complete and the reconnection is terminated. Subsequent sections that are not affected by the current slope segment action continue to use the reference energy-saving speed curve. The reconnection is terminated when the train reaches the end of the line before the candidate speed and reference speed become equal again.
8. The method according to claim 1, characterized in that, A punctuality evaluation and energy consumption evaluation are generated, and a comprehensive reward is obtained by applying energy-saving and punctuality gating combined with location reliability weighting, including: A punctuality evaluation is formed based on the absolute error between the total running time of the candidate speed trajectory after reconnection and the planned running time. When the absolute error does not exceed a preset time error threshold, the punctuality evaluation is positive and decreases as the absolute error increases. When the absolute error exceeds the preset time error threshold, the punctuality evaluation is negative and decreases as the absolute error increases. An energy consumption evaluation is formed based on the difference between the cumulative positive traction energy consumption of the candidate speed trajectory after reconnection and the total traction energy consumption corresponding to the reference energy-saving speed curve. When the traction energy consumption of the candidate trajectory is not lower than the reference traction energy consumption, a negative evaluation is given. When the traction energy consumption of the candidate trajectory is lower than the reference traction energy consumption, a positive evaluation is given based on the energy saving and the upper limit of the evaluation is limited. When the traction energy consumption of the candidate trajectory is not lower than the reference traction energy consumption and the punctuality evaluation is positive, the punctuality evaluation is set to zero; when the traction energy consumption of the candidate trajectory is lower than the reference traction energy consumption and the punctuality evaluation is not positive, the energy consumption evaluation is set to zero; and the gated punctuality evaluation and energy consumption evaluation are constructed into a joint evaluation item. A stability penalty term is formed based on the speed change stability index of the candidate speed trajectory after reconnection, and a position confidence weight is determined based on the current position of the train. The sum of the stability penalty term and the joint evaluation term is weighted by the position confidence weight to obtain a comprehensive reward for strategy update.
9. The method according to claim 1, characterized in that, The continuous action policy network is updated using a continuous action policy optimization algorithm, including: Write the current slope state, the three-dimensional continuous action, the log probability of the action, the state value, the comprehensive reward, the termination flag, and the current candidate velocity trajectory into the trajectory cache, and use the state of the next slope as the input for subsequent strategy decisions; When the number of samples in the trajectory cache reaches the preset update condition, the discount reward is calculated backward from the end of the trajectory, and the advantage value is calculated based on the discount reward and the state value saved at the time of sampling. The policy probability ratio is constructed based on the ratio of the log probability of the current policy network to that of the old policy network at the time of sampling for the same sampling action. An optimization objective is constructed using the pruning term, the value function error term, and the policy distribution entropy regularization term of the policy probability ratio, and the continuous action policy network and value network are updated. The updated policy network parameters are synchronized to the old policy network so that the updated policy parameters are used for trajectory sampling in the next stage. When the train reaches the end of the line, the termination flag is set to true and the current training round ends, causing the discounted reward for the current line task to be truncated at the end.
10. A train trajectory optimization system based on gradient traction and speed curve reconnection, characterized in that, include: The track and train data processing module is used to obtain track gradient segments, speed limit segments, total track length, train dynamic parameters and planned running time, and to establish track attributes at each location. The reference trajectory generation module is used to generate a reference energy-saving speed curve, a shortest running time curve, and a speed boundary that meet the planned running time constraints. The slope state construction and action output module is used to construct the slope state based on the line section between adjacent slope boundaries as the current decision slope, and the length and slope of the slope ahead according to the train operation status and the length and slope of the slope ahead. The module inputs the continuous action strategy network to obtain three-dimensional continuous actions, which are used to determine the traction switching position in the current slope, the first traction ratio before the traction switching position, and the second traction ratio after the traction switching position. The dynamic propulsion and boundary correction module is used to perform train dynamics recursion position by position within the current slope according to a preset spatial step size, select the first traction ratio or the second traction ratio according to the relationship between the current position and the traction switching position, and recursively deduce the speed at the next position and update the running time and traction energy consumption by combining the maximum available traction acceleration, the additional effect of the track gradient and the basic running resistance, and correct the candidate speed according to the shortest running time curve and the speed boundary. The reference speed curve reconnection module is used to compare the candidate speed with the reference energy-saving speed curve position by position, starting from the end of the current slope. When there is a deviation, the reference speed curve reconnection is performed to reconnect the candidate speed trajectory with the reference energy-saving speed curve. The comprehensive evaluation and strategy update module is used to calculate the total running time, cumulative positive traction energy consumption, and speed change stability index based on the candidate speed trajectory after reconnection, forming punctuality evaluation and energy consumption evaluation. After energy saving and punctuality gating and combining position reliability weight, a comprehensive reward is obtained. The continuous action strategy optimization algorithm is used to update the continuous action strategy network, and the module returns to the slope state construction and action output module to execute the next slope until the train reaches the end of the line, and outputs the optimized train running trajectory.
