Freight train operation control method, device, electronic equipment and storage medium
By encoding the initial state of the freight train and using the reinforcement learning model to optimize the control levels, the problems of difficulty in operating freight trains and high energy consumption are solved, and safety and efficiency are improved.
Patent Information
- Application Number
- CN202211652028.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-21
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2042-12-21
AI Technical Summary
Freight trains have many formations and long lengths, and the traction braking response time is long, which makes driving operations difficult, energy consumption and equipment losses are serious, and complex lines affect transportation efficiency. Existing technology cannot effectively reduce energy consumption and improve transportation efficiency.
By encoding the initial state of the freight train, the feature code is obtained, and input into the reinforcement learning model to minimize the operating energy consumption and coupler force, obtain the target control level, and control the operation of the freight train based on this level. The reinforcement learning model is built by a convolutional neural network, combined with the experience replay mechanism and tile coding, to optimize the control level.
On the premise of ensuring operational safety, the operating energy consumption of freight trains is reduced, transportation efficiency is improved, and driver labor intensity and equipment losses are reduced.
Smart Images

Figure CN116001863B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of rail transit technology, and in particular to a freight train operation control method, device, electronic equipment and storage medium. Background Art
[0002] As the carrier of freight railways, the safe and efficient operation of freight trains is an important factor affecting the efficiency of freight railway transportation.
[0003] At present, freight trains rely on manual driving, but due to the large number of freight trains, long length, and long traction brake response time, the driving operation is difficult, and the driving operation skills of freight train drivers are required to be high. Frequent operation by freight train drivers leads to serious energy consumption and equipment loss. At the same time, complex line conditions also have a certain impact on the transportation efficiency of freight trains.
[0004] Therefore, how to improve the transportation efficiency of freight trains and reduce operating energy consumption while ensuring the safety of freight train operation has become an urgent problem that the industry needs to solve. Summary of the invention
[0005] In view of the problems existing in the prior art, the present invention provides a freight train operation control method, device, electronic equipment and storage medium.
[0006] In a first aspect, the present invention provides a method for controlling the operation of a freight train, comprising:
[0007] Encoding the initial state of the freight train operation to obtain a feature code corresponding to the initial state;
[0008] Inputting the feature code into a reinforcement learning model to obtain a target control level output by the reinforcement learning model;
[0009] Controlling the operation of the freight train based on the target control level;
[0010] Wherein, the reinforcement learning model is constructed with the goal of minimizing the operating energy consumption and coupler force of the freight train.
[0011] Optionally, according to a method for controlling the operation of a freight train provided by the present invention, before encoding the initial state of the freight train operation to obtain a feature code corresponding to the initial state, the method further includes:
[0012] An initial running state of the freight train is determined, wherein the initial running state includes an initial running speed and an initial position of the freight train.
[0013] Optionally, according to a method for controlling the operation of a freight train provided by the present invention, the encoding process of the initial state of the freight train operation to obtain a feature code corresponding to the initial state includes:
[0014] Performing grid discretization on the initial running speed and initial position of the freight train to obtain a plurality of tiles;
[0015] Encode each tile based on the tile encoding method to obtain encoding data corresponding to each tile;
[0016] Based on the plurality of encoding data, a feature code corresponding to the initial running speed and the initial position is generated.
[0017] Optionally, according to a freight train operation control method provided by the present invention, the reinforcement learning model is constructed by a convolutional neural network with experience replay.
[0018] Optionally, according to a freight train operation control method provided by the present invention, the reinforcement learning model includes a training network, a target network and an experience replay pool; the training network and the target network are both constructed based on the convolutional neural network with the same structure;
[0019] The solution process of the reinforcement learning model includes:
[0020] Based on the running state of the freight train, performing at least one interaction process between the agent and the environment through the training network, the target network and the experience replay pool;
[0021] When the number of rounds of interaction between the agent and the environment reaches a preset maximum number of rounds, a target control level output by the reinforcement learning model is obtained.
[0022] Optionally, according to a freight train operation control method provided by the present invention, a process of interaction between the agent and the environment includes:
[0023] Initializing the initial state of the reinforcement learning model based on the running state of the freight train, and using the ε-greedy algorithm to obtain an action corresponding to the initial state of the reinforcement learning model, wherein the action is used to represent the control level output by the reinforcement learning model in the current state;
[0024] Executing the action to obtain a next state of the initial state of the reinforcement learning model and a benefit corresponding to the next state, wherein the benefit is used to characterize the operating energy consumption and coupler force of the freight train;
[0025] The feature code corresponding to the initial state, the action, the benefit corresponding to the next state, and the feature code corresponding to the next state are combined and stored in the experience replay pool;
[0026] A preset number of target samples are randomly sampled from the experience replay pool, the network parameters of the training network are updated based on the target samples and the mean square error loss function, and the network parameters of the target network are updated based on the network parameters of the training network at intervals of a preset network parameter update cycle.
[0027] Optionally, according to a method for controlling the operation of a freight train provided by the present invention, the controlling the operation of the freight train based on the target control level includes:
[0028] Based on the target control level, controlling the train actuator system to output a target traction braking level corresponding to the target control level;
[0029] Based on the target traction braking level, the running speed and position of the freight train are controlled.
[0030] In a second aspect, the present invention further provides a freight train operation control device, comprising:
[0031] The encoding module is used to encode the initial state of the freight train operation and obtain a feature code corresponding to the initial state;
[0032] An acquisition module, used for inputting the feature code into a reinforcement learning model to acquire a target control level output by the reinforcement learning model;
[0033] A control module, used for controlling the operation of the freight train based on the target control level;
[0034] The reinforcement learning model is constructed with the goal of minimizing the operating energy consumption and coupler force of the freight train.
[0035] In a third aspect, the present invention further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the freight train operation control method as described in the first aspect is implemented.
[0036] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the freight train operation control method as described in the first aspect.
[0037] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the freight train operation control method as described in the first aspect.
[0038] The freight train operation control method, device, electronic device and storage medium provided by the present invention encode the initial state of the freight train operation, input the encoded feature code into the reinforcement learning model to obtain the target control level, and then control the freight train operation based on the target control level. Since the reinforcement learning model is constructed with the goal of minimizing the operating energy consumption and coupler force of the freight train, the target control level obtained by the reinforcement learning model can ensure that the freight train reduces the operating energy consumption of the freight train under the premise of safe operation, and improves the transportation efficiency of the freight train. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 It is a flow chart of the freight train operation control method provided by the present invention;
[0041] Figure 2 is a schematic diagram of tile encoding provided by the present invention;
[0042] Figure 3 It is a schematic diagram of the structure of the convolutional neural network provided by the present invention;
[0043] Figure 4 It is one of the schematic diagrams of the architecture of the freight train operation control reinforcement learning model provided by the present invention;
[0044] Figure 5 This is the second schematic diagram of the architecture of the freight train operation control reinforcement learning model provided by the present invention;
[0045] Figure 6 It is a structural schematic diagram of the freight train operation control device provided by the present invention;
[0046] Figure 7 It is a schematic diagram of the physical structure of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] In order to facilitate a clearer understanding of the embodiments of the present invention, some relevant background knowledge is first introduced as follows.
[0049] Compared with passenger trains, freight trains have more formations, longer lengths, and longer traction and braking response times, so driving operations are difficult and require higher driving skills from freight train drivers. Specifically, it is difficult to ensure the consistency of freight train drivers' operations and the stability of the train, which may lead to large longitudinal impulses, abnormal stops, overspeeding, and even broken hooks; Frequent operations by freight train drivers lead to serious energy consumption and equipment loss; In order to improve freight transportation efficiency, freight train drivers often drive for a long time, which increases the labor intensity of freight train drivers and may lead to reduced driving efficiency; In unfamiliar sections, most freight train drivers adopt a low-speed driving strategy for safety reasons, which reduces transportation efficiency to a certain extent. In addition, it is difficult to train freight train drivers, which increases personnel costs. Therefore, it is urgent to adopt a new technology to solve the relevant problems currently faced by freight train operation control.
[0050] Among other types of rail transit, urban rail transit has achieved fully automatic driving and other unmanned driving technologies, and high-speed railways are also conducting trials of train automatic driving technology. Currently, train automatic driving technology is very mature in the field of urban rail transit, but there are still the following inevitable safety risks in its application to freight train operation control:
[0051] (1) Freight railway lines have large gradient changes, especially in long downhill stages, which places high demands on the gear shifting of the freight train braking system. Otherwise, it is easy for the freight train to run too fast or even break the hook, causing other dangerous situations.
[0052] (2) Compared with ordinary trains, freight trains are more difficult to operate and more prone to impulsiveness. Rough operation is more likely to cause freight trains to separate or derail. The traction and electric braking force should be applied slowly and step by step. The electric braking force should not be too large, and the air brake decompression should not be too large. The existing automatic train operation (ATO) control algorithm cannot well meet the above constraints of freight train operation control.
[0053] (3) The existing ATO train control algorithm cannot meet the constraints of freight train operation control and cannot learn from the experience of excellent train drivers. However, for freight trains, the driving experience of excellent freight train drivers is very valuable and can improve the transportation efficiency of freight trains while ensuring the safety of freight train operation.
[0054] In addition, in the field of rail transit, the existing train operation optimization control method based on deep reinforcement learning cannot meet the constraints of operating environments such as long downhill freight railway lines. The present invention combines the unique operating characteristics of freight trains with the operating line conditions, and optimizes the control level of freight trains based on deep reinforcement learning. This can ensure that the operating energy consumption of freight trains is reduced while ensuring safe operation, and improve the transportation efficiency of freight trains.
[0055] The freight train operation control method, device, electronic device and storage medium provided by the present invention are exemplarily introduced below in conjunction with the accompanying drawings.
[0056] Figure 1 FIG. 1 is a flow chart of a method for controlling the operation of a freight train provided by the present invention. Figure 1 As shown, the method includes:
[0057] Step 100, encoding the initial state of the freight train operation to obtain a feature code corresponding to the initial state;
[0058] Step 110, inputting the feature code into a reinforcement learning model to obtain a target control level output by the reinforcement learning model;
[0059] Step 120, controlling the operation of the freight train based on the target control level;
[0060] The reinforcement learning model is constructed with the goal of minimizing the operating energy consumption and coupler force of the freight train.
[0061] Specifically, in an embodiment of the present invention, in order to overcome the defect that the existing train operation control method cannot meet the constraint requirements of complex line operation environments such as long downhill freight railway lines, and thus cannot ensure that freight trains can operate safely with low energy consumption, the present invention encodes the initial state of the freight train operation, and inputs the feature code obtained after encoding into the reinforcement learning model to obtain the target control level, and then controls the operation of the freight train based on the target control level. Since the reinforcement learning model is constructed with the goal of minimizing the operating energy consumption and coupler force of the freight train, the target control level obtained by the reinforcement learning model can ensure that the freight train reduces the operating energy consumption of the freight train under the premise of safe operation, and improves the transportation efficiency of the freight train.
[0062] Optionally, the initial state of the freight train operation can be encoded first to obtain the feature code corresponding to the initial state, and then the feature code can be input into the reinforcement learning model to obtain the target control level output by the reinforcement learning model, and then the freight train operation can be controlled based on the target control level.
[0063] Optionally, in the embodiment of the present invention, the ATO subsystem may be used as an agent in the reinforcement learning model architecture, and the control level output by the train ATO subsystem may be used as the action of the agent in the reinforcement learning.
[0064] It can be understood that the environment Environment in reinforcement learning needs to establish an accurate relationship between the output of the intelligent agent and the state transition. In an embodiment of the present invention, the environment in reinforcement learning can be intended to describe the relationship between the control level and the running speed and position of the freight train, that is, to construct an accurate train operation dynamics model under the premise that the control level is the independent variable.
[0065] Optionally, in an embodiment of the present invention, the running state of the freight train can be represented by the running speed and position of the freight train, and the speed and position of the freight train are defined as the state State of the environment return agent in reinforcement learning.
[0066] It can be understood that when the agent takes action a in state s, it is called the current agent's strategy, denoted by π, and the strategy is divided into two types: stochastic strategy (Stochastic Policy) and deterministic strategy (Deterministic Policy), as shown below:
[0067] π(a|s)=P(a k =a|s k =s)
[0068]
[0069] Among them, P(a k =a|s k =s) means that in reinforcement learning, state s k =s, the agent outputs action a k = the probability of a.
[0070] Optionally, in an embodiment of the present invention, the operating energy consumption of a freight train and the coupler force of a freight train are used as reward elements of reinforcement learning, and a reinforcement learning model is constructed with the goal of minimizing the operating energy consumption and coupler force of a freight train.
[0071] It can be understood that by optimizing the control level of freight trains based on a reinforcement learning model built with the goal of minimizing the operating energy consumption and coupler force of freight trains, the operating safety of freight trains can be guaranteed and the operating energy consumption of freight trains can be reduced. At the same time, the operation of freight trains can be automatically controlled through the target control level output by the reinforcement learning model, which can improve the transportation efficiency of freight trains.
[0072] The freight train operation control method provided by the present invention encodes the initial state of the freight train operation, inputs the encoded feature code into the reinforcement learning model to obtain the target control level, and then controls the freight train operation based on the target control level. Since the reinforcement learning model is constructed with the goal of minimizing the operating energy consumption and coupler force of the freight train, the target control level obtained by the reinforcement learning model can ensure that the freight train reduces the operating energy consumption of the freight train under the premise of safe operation, and improves the transportation efficiency of the freight train.
[0073] Optionally, before encoding the initial state of the freight train operation to obtain a feature code corresponding to the initial state, the method further includes:
[0074] An initial running state of the freight train is determined, wherein the initial running state includes an initial running speed and an initial position of the freight train.
[0075] Specifically, in an embodiment of the present invention, before encoding the initial state of the freight train and obtaining the feature code corresponding to the initial state, the initial state of the freight train can be determined, and the initial state includes the initial running speed and initial position of the freight train.
[0076] It can be understood that, in the embodiment of the present invention, the running speed and position of the freight train are used as the reinforcement learning state, so as to obtain the control level for controlling the operation of the freight train through the reinforcement learning model.
[0077] Optionally, the initial running speed and initial position of the freight train can be encoded first to obtain feature codes corresponding to the initial running speed and initial position, and then the feature codes can be input into the reinforcement learning model to obtain the target control level output by the reinforcement learning model, and then the operation of the freight train can be controlled based on the target control level.
[0078] The freight train operation control method provided by the present invention, by taking the running speed and position of the freight train as the reinforcement learning state, facilitates the realization of the control level for controlling the operation of the freight train through the reinforcement learning model, and because the reinforcement learning model is constructed with the goal of minimizing the running energy consumption and coupler force of the freight train, the target control level obtained by the reinforcement learning model can ensure that the running energy consumption of the freight train is reduced under the premise of running safety, and improve the transportation efficiency of the freight train.
[0079] Optionally, encoding the initial state of the freight train operation to obtain a feature code corresponding to the initial state includes:
[0080] Performing grid discretization on the initial running speed and initial position of the freight train to obtain a plurality of tiles;
[0081] Encode each tile based on the tile encoding method to obtain encoding data corresponding to each tile;
[0082] Based on the plurality of encoding data, a feature code corresponding to the initial running speed and the initial position is generated.
[0083] Specifically, in the embodiment of the present invention, encoding the initial state of the freight train operation to obtain the feature code corresponding to the initial state may include the following steps:
[0084] Step 1: Grid discretize the initial running speed and initial position of the freight train to obtain multiple tiles;
[0085] Step 2: Encode each tile based on the tile encoding method to obtain encoding data corresponding to each tile;
[0086] Step 3: Based on multiple coding data, generate a feature code corresponding to the initial running speed and initial position of the freight train.
[0087] It can be understood that tile-coding is a coarse form of coding for multi-dimensional continuous space. In tile-coding, the receptive fields of features are grouped into exhaustive partitions of the input space, each partition is called a tile, and the elements in a tile are called a tile. Each tile is the receptive field of a binary feature.
[0088] Taking the two-dimensional state space as an example, when performing tile-coding, the simplest tiling is a uniform grid form. Figure 2 is a schematic diagram of tile encoding provided by the present invention, such as Figure 2As shown in the figure, the shaded area of the grid on the left is the two-dimensional state space, point A represents one of the state points, the 4×4 grid is a tiling, each small square is a tile, then point A can be roughly encoded by the only tile of the tiling. In order to improve the encoding accuracy, it is necessary to increase the tiling, such as Figure 2 As shown in the grid on the right, in this example, there are three tiles in total. The three tiles do not overlap with each other and there is a certain offset. Point A corresponds to a unique tile in each of the three tiles. You can use a specific tile in the three tiles for encoding, which can improve the encoding accuracy. In tile-coding, the more tiles there are, the higher the encoding accuracy.
[0089] Optionally, in the embodiment of the present invention, it is assumed that there are N t A tiling is used for tile-coding, is the feature vector of the reinforcement learning state, then:
[0090]
[0091] in, Represents the iN t In a tiling, the feature encoding corresponding to state s is t In the tiling, the two-dimensional state space needs to be gridded and discretized, and N can be defined p is the number of discrete position components p in the state, Δp is the running position difference corresponding to each tile, N v is the number of discrete velocity components v in the state, Δv is the running speed difference corresponding to each tile, then there are a total of N in this tiling. p ×N v tiles, thus is defined as follows:
[0092]
[0093]
[0094] And, N p ,Δp,N v There are the following constraints between and Δv:
[0095]
[0096] Among them, P is the longest distance of the train running line, V max It is the maximum speed at which the train can run.
[0097] For all tilings, there is an offset between each tiling, and this offset needs to be independent, so as to ensure the accuracy of the feature vector. In the present invention, the values of offset in the two dimensions (position and speed) of each tiling need to be randomly selected from the intervals (0, Δp) and (0, Δv), respectively. Then N t The offset value of a tiling is calculated as follows:
[0098]
[0099] The freight train operation control method provided by the present invention encodes the initial operating speed and initial position of the freight train based on the tile encoding method, so as to facilitate the subsequent reinforcement learning state using the operating speed and position of the freight train, and realize the control level of controlling the operation of the freight train through the reinforcement learning model. Moreover, since the reinforcement learning model is constructed with the goal of minimizing the operating energy consumption and coupler force of the freight train, the target control level obtained by the reinforcement learning model can ensure that the operating energy consumption of the freight train is reduced under the premise of operating safety, and the transportation efficiency of the freight train is improved.
[0100] Optionally, the reinforcement learning model is constructed by a convolutional neural network with experience replay.
[0101] Specifically, in an embodiment of the present invention, a reinforcement learning model can be constructed based on a convolutional neural network with experience playback, so as to utilize the convolutional neural network to process the feature encoding corresponding to the running speed and position of the freight train.
[0102] It can be understood that after encoding the initial running speed v and position p of the freight train, the value function is approximated in the form of a convolutional neural network. The encoding of the state (v, p) is analogous to the pixel encoding of an image and is processed using a convolutional neural network. Figure 3 It is a schematic diagram of the structure of the convolutional neural network provided by the present invention, such as Figure 3 As shown, there are a total of 5 intermediate layers in this convolutional neural network.
[0103] It is understandable that during the reinforcement learning process, the agent stores the interaction information with the environment, that is, the experience, in the replay buffer pool, and then uniformly randomly selects part of the experience for replay to update the control policy. Unlike online reinforcement learning agents that discard incoming data immediately after an update, the experience replay method allows the agent to learn from the data generated by the previous version of the policy, so that one experience can be used for more than one update, thus breaking the limitation of time correlation, which is particularly useful when using the stochastic gradient descent algorithm based on the independent and identically distributed assumption to train neural network function approximation.
[0104] The freight train operation control method provided by the present invention constructs a reinforcement learning model based on a convolutional neural network with experience playback, so that the feature coding corresponding to the running speed and position of the freight train can be processed based on the convolutional neural network, thereby realizing control level optimization using deep reinforcement learning.
[0105] Optionally, the reinforcement learning model includes a training network, a target network and an experience replay pool; the training network and the target network are both constructed based on the convolutional neural network with the same structure;
[0106] The solution process of the reinforcement learning model includes:
[0107] Based on the running state of the freight train, performing at least one interaction process between the agent and the environment through the training network, the target network and the experience replay pool;
[0108] When the number of rounds of interaction between the agent and the environment reaches a preset maximum number of rounds, a target control level output by the reinforcement learning model is obtained.
[0109] Specifically, in an embodiment of the present invention, the reinforcement learning model may include a training network, a target network and an experience replay pool, wherein the training network and the target network are both constructed based on a convolutional neural network with the same structure, and the solution process of the reinforcement learning model includes: based on the running state of the freight train, executing the interaction process between the agent and the environment at least once through the training network, the target network and the experience replay pool, and obtaining the target control level output by the reinforcement learning model when the number of rounds of interaction between the agent and the environment reaches a preset maximum number of rounds.
[0110] Optionally, the preset maximum number of rounds may be 10 times, 20 times, 50 times, etc., which is not specifically limited in the embodiment of the present invention.
[0111] Optionally, the interaction process between the agent and the environment includes:
[0112] Initializing the initial state of the reinforcement learning model based on the running state of the freight train, and using the ε-greedy algorithm to obtain an action corresponding to the initial state of the reinforcement learning model, wherein the action is used to represent the control level output by the reinforcement learning model in the current state;
[0113] Executing the action to obtain a next state of the initial state of the reinforcement learning model and a benefit corresponding to the next state, wherein the benefit is used to characterize the operating energy consumption and coupler force of the freight train;
[0114] The feature code corresponding to the initial state, the action, the benefit corresponding to the next state, and the feature code corresponding to the next state are combined and stored in the experience replay pool;
[0115] A preset number of target samples are randomly sampled from the experience replay pool, the network parameters of the training network are updated based on the target samples and the mean square error loss function, and the network parameters of the target network are updated based on the network parameters of the training network at intervals of a preset network parameter update cycle.
[0116] Specifically, in the embodiment of the present invention, each interaction process between the agent and the environment may include the following steps:
[0117] Step 1: Based on the running state of the freight train, the initial state of the reinforcement learning model is initialized, and the ε-greedy algorithm is used to obtain the action corresponding to the initial state of the reinforcement learning model. The action is used to characterize the control level output by the reinforcement learning model in the current state;
[0118] Optionally, the running status of the freight train may include the running speed and position of the freight train.
[0119] Step 2: Execute the action obtained in step 1 to obtain the next state of the initial state of the reinforcement learning model and the benefit corresponding to the next state, which is used to characterize the running energy consumption and coupler force of the freight train;
[0120] Step 3: Combine the feature code corresponding to the initial state, the action, the benefit corresponding to the next state, and the feature code corresponding to the next state and store them in the experience replay pool;
[0121] Step 4: Randomly sample a preset number of target samples from the experience replay pool, update the network parameters of the training network based on the target samples and the mean square error loss function, and update the network parameters of the target network based on the network parameters of the training network at intervals of a preset network parameter update cycle.
[0122] Optionally, in an embodiment of the present invention, all network parameters of the training network may be updated based on the target sample and the mean square error loss function and through gradient back propagation of the neural network.
[0123] The freight train operation control method provided by the present invention constructs a reinforcement learning model based on the experience replay mechanism and the convolutional neural network, and then optimizes the control level by using deep reinforcement learning based on the interaction between the intelligent agent of the reinforcement learning model and the environment, and finally obtains the optimized target control level. The target control level can ensure that the freight train reduces the operating energy consumption of the freight train under the premise of safe operation and improves the transportation efficiency of the freight train.
[0124] Optionally, controlling the operation of the freight train based on the target control level includes:
[0125] Based on the target control level, controlling the train actuator system to output a target traction braking level corresponding to the target control level;
[0126] Based on the target traction braking level, the running speed and position of the freight train are controlled.
[0127] Specifically, in an embodiment of the present invention, after obtaining the target control level output by the reinforcement learning model, the train actuator system can be controlled to output a target traction and braking level corresponding to the target control level based on the target control level, and then the running speed and position of the freight train can be controlled based on the target traction and braking level.
[0128] The freight train operation control method provided by the present invention controls the train actuator system to output a target traction and braking level corresponding to the target control level based on the target control level output by the reinforcement learning model, and then controls the running speed and position of the freight train based on the target traction and braking level. Since the reinforcement learning model is constructed with the goal of minimizing the running energy consumption and coupler force of the freight train, the traction and braking level output by the train actuator system controlled by the target control level obtained by the reinforcement learning model can ensure that the running energy consumption of the freight train is reduced under the premise of running safety, and the transportation efficiency of the freight train is improved.
[0129] Figure 4 is one of the schematic diagrams of the architecture of the freight train operation control reinforcement learning model provided by the present invention, such as Figure 4 As shown, where:
[0130] Intelligent agent: As the output mechanism of the train operation control level, the ATO subsystem plays the role of an intelligent agent in the reinforcement learning architecture. It controls the speed and position of the train by changing the traction and braking level output by the train actuator system.
[0131] Environment: The environment in reinforcement learning needs to establish an accurate relationship between the output and state transition of the intelligent agent. In this invention, the purpose of the environment is to describe the relationship between the traction and braking level output by the train actuator system and the speed and distance of the train, that is, to build an accurate train running dynamics model under the premise of the control level as an independent variable. In the kth step of reinforcement learning, the running speed and position of the train are v k and p k , time point is t k . The traction force f at the current speed is obtained through the train traction and braking characteristic curve k Or braking force bk According to the dynamic model of the train, in the reinforcement learning step (k+1), the time point is t k+1 , the speed and position update calculation process of the train is as follows:
[0132] In t k ~t k+1 In the meantime, we can assume that the train is moving with uniform acceleration, and its acceleration is:
[0133]
[0134] Then at t k+1 At time , the speed and position of the train are:
[0135]
[0136]
[0137] Among them, f is the traction force output by the train traction drive system, v is the train running speed, b is the train braking force, R(v) is the basic running resistance of the train, and its size is related to the speed, G(p) is the additional slope resistance caused by the existence of a ramp on the track, and is related to the slope of the current position. M is the running mass of the train, τ is the train rotation mass coefficient, and its size is jointly determined by the total mass of the train and the converted mass of the rotating part, and p is the distance of the train running. In the embodiment of the present invention, the distance of the train running is regarded as the same as the position of the train. The calculation method of R(v) and G(p) is as follows:
[0138] R(v)=r0+r1v+r2v 2
[0139] G(p)=Mgsin(θ(p))
[0140] Where r0, r1 and r2 are the basic drag coefficients, g is the acceleration due to gravity, and θ(p) is the road slope at position p, in radians.
[0141] State: The running speed and position of the train are two important features that characterize the running state of the train. In the embodiment of the present invention, the running speed and position of the train are defined as the state of the environment returned to the agent in reinforcement learning. At the same time, the running speed and position of the train need to be within a specific limit range. The speed cannot exceed the speed limit of the current line, and the position range is within the entire running line. Therefore, at the time point of the kth step of reinforcement learning, t k , the state obtained by the agent from the environment is as follows:
[0142]
[0143] in, is at position pk The speed range in which the train is allowed to run, and P is the maximum speed of the train running position.
[0144] Action: The train ATO subsystem controls the train actuator system to output different control traction and braking levels by outputting control levels, thereby controlling the speed and position of the train. The control level output by the train ATO subsystem is used as the action of the intelligent agent in reinforcement learning. In reinforcement learning, the state s k Next, the agent outputs action a k The output action must belong to the control level of the train actuator system and be consistent with the previous action a k-1 The level distance between them complies with the constraints of the train actuator system.
[0145] a k ∈{M i |M i ∈,M min ,M max ],ΔM k =(a k -a k-1 )∈,ΔM min ,ΔM max ]}
[0146] Among them, M i M is the output level of the train actuator system. min is the minimum control level, M max is the maximum control level, ΔM min is the minimum value of the actuator output level change allowed, ΔM max The maximum value of the actuator output level change allowed.
[0147] Strategy: When an agent takes action a in state s, it is called the current agent's strategy, denoted by π. There are two types of strategies: stochastic policy and deterministic policy, as shown below:
[0148] π(a|s)=P(a k =a|s k =s)
[0149]
[0150] Among them, P(a k =a|s k =s) means that in reinforcement learning, state s k =s, the agent outputs action a k = the probability of a.
[0151] Benefit: The embodiment of the present invention uses the running energy consumption of freight trains and the coupling force of freight trains as the benefit elements of reinforcement learning. k Make the state change from s k Transfer to k+1 When k+1 , at this time point from t k Increase to t k+1 .
[0152]
[0153] From the above formula, it can be seen that the benefit consists of two parts. The first part is the negative of the operating energy consumption, and the second part is the negative of the maximum coupler force. e With ω c are the coefficients of operating energy consumption and coupler force respectively. f It is the efficiency of converting electrical energy into mechanical energy during traction of the train traction system. is the coupler force between all adjacent cars of a freight train, is the maximum value of the coupler force.
[0154] Figure 5 FIG. 2 is a second schematic diagram of the architecture of the freight train operation control reinforcement learning model provided by the present invention. Figure 5 As shown, the solution process of the model solution process of the freight train operation control reinforcement learning model includes the following steps:
[0155] Step 1: Initialize the experience playback set D, randomly initialize the network parameter ω, and use it to initialize the action value function q. Let ω - =ω, and use it to initialize the target action value function
[0156] Step 2: When the number of episodes is less than the maximum number of episodes EPISODE, loop steps 3 to 4;
[0157] Step 3: Initialize the environment, obtain the initial state, and encode the initial state to obtain the feature code;
[0158] Step 4: When the number of iterations is less than the maximum number of iterations per round, loop steps 5 to 12;
[0159] Step 5: Use the ε-greedy algorithm to obtain the current agent output action a t ;
[0160] Step 6: Execute action a t , get the income r t+1 and status t+1 ;
[0161] Step 7: For state s t+1 Encode to get
[0162] Step 8: Stored in the experience replay set D;
[0163] Step 9: Randomly sample BATCH samples from D
[0164] Step 10: Calculation
[0165]
[0166] Among them, the terminal state represents that the train has reached the end point;
[0167] Step 11: Using mean square error loss function Update all parameters ω of the network through gradient backpropagation of the neural network;
[0168] Step 12: Update the target network parameter ω every C steps - ←ω, where C is the preset parameter;
[0169] Step 13: The loop ends and the optimal solution sequence A=[a1,a2,...,a n ], which is the target control level.
[0170] It can be understood that the embodiment of the present invention constructs a freight train operation energy consumption and safety model based on the freight train dynamics model, designs a freight train operation control algorithm based on a deep Q network, takes the running speed and position of the freight train as reinforcement learning states, takes the minimum energy consumption and operation safety as the goals, optimizes the freight train operation control output level, and reduces the operation energy consumption while ensuring the safety of freight train operation.
[0171] It can be understood that the freight train operation control method provided in the embodiment of the present invention encodes the running speed and position of the freight train, processes the code using a convolutional neural network, combines the running line conditions of the freight train, uses deep reinforcement learning to optimize the control level, and finally outputs the optimal control level of the freight train.
[0172] The freight train operation control method provided by the present invention encodes the initial state of the freight train operation, inputs the encoded feature code into the reinforcement learning model to obtain the target control level, and then controls the freight train operation based on the target control level. Since the reinforcement learning model is constructed with the goal of minimizing the operating energy consumption and coupler force of the freight train, the target control level obtained by the reinforcement learning model can ensure that the freight train reduces the operating energy consumption of the freight train under the premise of safe operation, and improves the transportation efficiency of the freight train.
[0173] The freight train operation control device provided by the present invention is described below. The freight train operation control device described below and the freight train operation control method described above can be referenced to each other.
[0174] Figure 6 FIG. 1 is a schematic diagram of the structure of the freight train operation control device provided by the present invention. Figure 6 As shown, the device includes: an encoding module 610, an acquisition module 620 and a control module 630; wherein:
[0175] The encoding module 610 is used to encode the initial state of the freight train operation and obtain a feature code corresponding to the initial state;
[0176] The acquisition module 620 is used to input the feature code into the reinforcement learning model to obtain the target control level output by the reinforcement learning model;
[0177] The control module 630 is used to control the operation of the freight train based on the target control level;
[0178] The reinforcement learning model is constructed with the goal of minimizing the operating energy consumption and coupler force of the freight train.
[0179] The freight train operation control device provided by the present invention encodes the initial state of the freight train operation, inputs the encoded feature code into the reinforcement learning model to obtain the target control level, and then controls the freight train operation based on the target control level. Since the reinforcement learning model is constructed with the goal of minimizing the operating energy consumption and coupler force of the freight train, the target control level obtained by the reinforcement learning model can ensure that the freight train reduces the operating energy consumption of the freight train under the premise of safe operation, and improves the transportation efficiency of the freight train.
[0180] Optionally, the device further comprises a determination module;
[0181] The determination module is used to determine the initial state of the freight train operation, and the initial state includes the initial operation speed and initial position of the freight train.
[0182] Optionally, the encoding module 610 is specifically used for:
[0183] Performing grid discretization on the initial running speed and initial position of the freight train to obtain a plurality of tiles;
[0184] Encode each tile based on the tile encoding method to obtain encoding data corresponding to each tile;
[0185] Based on the plurality of encoding data, a feature code corresponding to the initial running speed and the initial position is generated.
[0186] Optionally, the reinforcement learning model is constructed by a convolutional neural network with experience replay.
[0187] The reinforcement learning model includes a training network, a target network and an experience replay pool; the training network and the target network are both constructed based on the convolutional neural network with the same structure;
[0188] The solution process of the reinforcement learning model includes:
[0189] Based on the running state of the freight train, performing at least one interaction process between the agent and the environment through the training network, the target network and the experience replay pool;
[0190] When the number of rounds of interaction between the agent and the environment reaches a preset maximum number of rounds, a target control level output by the reinforcement learning model is obtained.
[0191] Optionally, a process of interaction between the agent and the environment includes:
[0192] Initializing the initial state of the reinforcement learning model based on the running state of the freight train, and using the ε-greedy algorithm to obtain an action corresponding to the initial state of the reinforcement learning model, wherein the action is used to represent the control level output by the reinforcement learning model in the current state;
[0193] Executing the action to obtain a next state of the initial state of the reinforcement learning model and a benefit corresponding to the next state, wherein the benefit is used to characterize the operating energy consumption and coupler force of the freight train;
[0194] The feature code corresponding to the initial state, the action, the benefit corresponding to the next state, and the feature code corresponding to the next state are combined and stored in the experience replay pool;
[0195] A preset number of target samples are randomly sampled from the experience replay pool, the network parameters of the training network are updated based on the target samples and the mean square error loss function, and the network parameters of the target network are updated based on the network parameters of the training network at intervals of a preset network parameter update cycle.
[0196] Optionally, the control module 630 is specifically used to:
[0197] Based on the target control level, controlling the train actuator system to output a target traction braking level corresponding to the target control level;
[0198] Based on the target traction braking level, the running speed and position of the freight train are controlled.
[0199] The freight train operation control device provided by the present invention encodes the initial state of the freight train operation, inputs the encoded feature code into the reinforcement learning model to obtain the target control level, and then controls the freight train operation based on the target control level. Since the reinforcement learning model is constructed with the goal of minimizing the operating energy consumption and coupler force of the freight train, the target control level obtained by the reinforcement learning model can ensure that the freight train reduces the operating energy consumption of the freight train under the premise of safe operation, and improves the transportation efficiency of the freight train.
[0200] It should be noted here that the above-mentioned freight train operation control device provided in the embodiment of the present invention can implement all the method steps implemented in the above-mentioned freight train operation control method embodiment, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0201] Figure 7 is a schematic diagram of the physical structure of the electronic device provided by the present invention, such as Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the freight train operation control method provided by the above methods, and the method includes:
[0202] Encoding the initial state of the freight train operation to obtain a feature code corresponding to the initial state;
[0203] Inputting the feature code into a reinforcement learning model to obtain a target control level output by the reinforcement learning model;
[0204] Controlling the operation of the freight train based on the target control level;
[0205] Wherein, the reinforcement learning model is constructed with the goal of minimizing the operating energy consumption and coupler force of the freight train.
[0206] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0207] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, the computer can execute the freight train operation control method provided by the above methods, the method comprising:
[0208] Encoding the initial state of the freight train operation to obtain a feature code corresponding to the initial state;
[0209] Inputting the feature code into a reinforcement learning model to obtain a target control level output by the reinforcement learning model;
[0210] Controlling the operation of the freight train based on the target control level;
[0211] Wherein, the reinforcement learning model is constructed with the goal of minimizing the operating energy consumption and coupler force of the freight train.
[0212] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for controlling the operation of a freight train provided above is implemented, and the method comprises:
[0213] Encoding the initial state of the freight train operation to obtain a feature code corresponding to the initial state;
[0214] Inputting the feature code into a reinforcement learning model to obtain a target control level output by the reinforcement learning model;
[0215] Controlling the operation of the freight train based on the target control level;
[0216] Wherein, the reinforcement learning model is constructed with the goal of minimizing the operating energy consumption and coupler force of the freight train.
[0217] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0218] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0219] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for controlling the operation of a freight train, characterized in that: include: Encoding the initial state of the freight train operation to obtain a feature code corresponding to the initial state; Inputting the feature code into a reinforcement learning model to obtain a target control level output by the reinforcement learning model; Controlling the operation of the freight train based on the target control level; Wherein, the reinforcement learning model is constructed with the goal of minimizing the operating energy consumption and coupler force of the freight train; Before encoding the initial state of the freight train operation to obtain a feature code corresponding to the initial state, the method further includes: Determining an initial state of the freight train operation, wherein the initial state includes an initial operating speed and an initial position of the freight train; The encoding process of the initial state of the freight train operation to obtain a feature code corresponding to the initial state includes: Performing grid discretization on the initial running speed and initial position of the freight train to obtain a plurality of tiles; Encode each tile based on the tile encoding method to obtain encoding data corresponding to each tile; Based on the plurality of the coding data, generating a feature code corresponding to the initial running speed and the initial position; The coded data corresponding to each tile is expressed as: ; in, Indicates In tiles, the status s The corresponding coded data; represents the total number of the plurality of tiles; The said In tiles, the status s The corresponding encoded data is represented as: ; and, , , and The following constraints exist: ; in, Indicates the number of elements contained in the tile; Represents the position component in the state The number after discretization; Represents the velocity component in the state The number after discretization; Indicates the running position difference corresponding to each element; Indicates the running speed difference corresponding to each element; Indicates the maximum distance of the train running line; Indicates the maximum speed of the train; There is an offset between any two tiles, and the value of the offset of each tile in the position and speed of each tile is based on the interval and The offset of each tile is calculated as follows: 。 2. The method for controlling the operation of a freight train according to claim 1, characterized in that: The reinforcement learning model is constructed by a convolutional neural network with experience replay.
3. The method for controlling the operation of a freight train according to claim 2, characterized in that: The reinforcement learning model includes a training network, a target network and an experience replay pool; the training network and the target network are both constructed based on the convolutional neural network with the same structure; The solution process of the reinforcement learning model includes: Based on the running state of the freight train, performing at least one interaction process between the agent and the environment through the training network, the target network and the experience replay pool; When the number of rounds of interaction between the agent and the environment reaches a preset maximum number of rounds, a target control level output by the reinforcement learning model is obtained.
4. The method for controlling the operation of a freight train according to claim 3, characterized in that: The interaction process between the agent and the environment includes: Based on the running state of the freight train, the initial state of the reinforcement learning model is initialized, and the The algorithm obtains an action corresponding to the initial state of the reinforcement learning model, wherein the action is used to represent the control level output by the reinforcement learning model in the current state; Executing the action to obtain a next state of the initial state of the reinforcement learning model and a benefit corresponding to the next state, wherein the benefit is used to characterize the operating energy consumption and coupler force of the freight train; The feature code corresponding to the initial state, the action, the benefit corresponding to the next state, and the feature code corresponding to the next state are combined and stored in the experience replay pool; A preset number of target samples are randomly sampled from the experience replay pool, the network parameters of the training network are updated based on the target samples and the mean square error loss function, and the network parameters of the target network are updated based on the network parameters of the training network at intervals of a preset network parameter update cycle.
5. The freight train operation control method according to any one of claims 1 to 4, characterized in that: The controlling the operation of the freight train based on the target control level includes: Based on the target control level, controlling the train actuator system to output a target traction braking level corresponding to the target control level; Based on the target traction braking level, the running speed and position of the freight train are controlled.
6. A freight train operation control device, characterized in that: include: The encoding module is used to encode the initial state of the freight train operation and obtain a feature code corresponding to the initial state; An acquisition module, used for inputting the feature code into a reinforcement learning model to acquire a target control level output by the reinforcement learning model; A control module, used for controlling the operation of the freight train based on the target control level; Wherein, the reinforcement learning model is constructed with the goal of minimizing the operating energy consumption and coupler force of the freight train; Before encoding the initial state of the freight train operation to obtain a feature code corresponding to the initial state, the method further includes: Determining an initial state of the freight train operation, wherein the initial state includes an initial operating speed and an initial position of the freight train; The encoding process of the initial state of the freight train operation to obtain a feature code corresponding to the initial state includes: Performing grid discretization on the initial running speed and initial position of the freight train to obtain a plurality of tiles; Encode each tile based on the tile encoding method to obtain encoding data corresponding to each tile; Based on the plurality of the coding data, generating a feature code corresponding to the initial running speed and the initial position; The coded data corresponding to each tile is expressed as: ; in, Indicates In tiles, the status s The corresponding coded data; represents the total number of the plurality of tiles; The said In tiles, the status s The corresponding encoded data is represented as: ; and, , , and The following constraints exist: ; in, Indicates the number of elements contained in the tile; Represents the position component in the state The number after discretization; Represents the velocity component in the state The number after discretization; Indicates the running position difference corresponding to each element; Indicates the running speed difference corresponding to each element; Indicates the maximum distance of the train running line; Indicates the maximum speed of the train; There is an offset between any two tiles, and the value of the offset of each tile in the position and speed of each tile is based on the interval and The offset of each tile is calculated as follows: 。 7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the freight train operation control method as described in any one of claims 1 to 5 is implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the freight train operation control method as described in any one of claims 1 to 5 is implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the freight train operation control method as described in any one of claims 1 to 5 is implemented.
