A method and device for predicting energy management in variable time domain
Through the variable time domain prediction energy management method, the DQN network model and dynamic programming algorithm are used to dynamically adjust the vehicle prediction time domain, which solves the problem of fixed prediction time domain in the traditional method, improves the energy prediction accuracy and energy saving effect, and achieves more efficiency. energy management.
Patent Information
- Application Number
- CN202210256076.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-15
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-03-15
AI Technical Summary
In traditional vehicle energy prediction methods, the prediction time domain is fixed and cannot adapt to changes in different working conditions, resulting in low prediction accuracy and high computational cost. Moreover, the variable time domain prediction method is limited by the number of samples and types of working conditions, and the effect is limited.
The variable time domain prediction energy management method is adopted, and the prediction time domain is dynamically adjusted according to the vehicle status through the DQN network model and dynamic programming algorithm to achieve autonomous learning and optimal control sequences, improving energy prediction accuracy and energy saving effect.
It improves the energy prediction accuracy, reduces the calculation cost, enhances the adaptability and energy-saving effect of energy management, and improves the generalization ability and performance of the algorithm through the application of reinforcement learning and experience pool.
Smart Images

Figure CN114620051B
Abstract
Description
Technical Field
[0001] The present disclosure relates to a vehicle predictive energy management method, and in particular, to a variable time domain predictive energy management method and device. Background Art
[0002] In vehicle control, it is necessary to predict and manage the energy of the vehicle. In traditional predictive energy management research, the length of the prediction time domain is directly related to the accuracy of the prediction. Therefore, different prediction time domain lengths will directly affect the optimization effect and computational cost. Usually, the prediction time domain length is selected based on the energy consumption under different prediction time domain lengths tested under offline conditions, and the prediction time domain with the lowest energy consumption is selected. Therefore, the prediction time domain is a fixed value and cannot be changed according to different working conditions. The fixed prediction time domain of the traditional method cannot adapt to changes in working conditions, so the prediction accuracy is not high, and the optimization effect and computational cost are limited. Variable time domain prediction can solve this problem well.
[0003] The most widely used variable time domain prediction methods include the variable time domain prediction method of optimal ΔSOC approximation. Although it is possible to select a suitable prediction time domain according to the current vehicle state to a certain extent, it is limited by factors such as the number of samples, the type of working conditions, and the prediction accuracy of the optimal ΔSOC. The prediction accuracy is not high and the effect is limited. The biggest challenge facing variable time domain prediction energy management is to shorten the calculation process and improve adaptability. Summary of the invention
[0004] Based on this, the present invention proposes a variable time domain energy prediction management method, which enables the vehicle to autonomously learn energy management strategies to adapt to different working conditions, which not only improves energy prediction accuracy and reduces costs, but also is more energy-efficient.
[0005] In order to achieve the above object, the technical solution of the present invention is:
[0006] In one aspect, the present invention provides a time-varying domain prediction energy management method, the method comprising the following steps:
[0007] S100, obtaining the current vehicle state quantity and its corresponding time domain, and obtaining the best predicted time domain at the next moment, wherein the length of the best predicted time domain may not be fixed;
[0008] S200, predicting a vehicle speed according to the optimal prediction time domain;
[0009] S300, based on the best prediction time domain, a dynamic programming algorithm is used to obtain an optimal control sequence of the vehicle, thereby realizing energy management in a variable time domain;
[0010] S400, after the vehicle executes the control instruction corresponding to the control sequence, it enters a new state;
[0011] The vehicle status includes the power battery charge state, the vehicle current position, the current vehicle speed, and the predicted vehicle speed at the last moment.
[0012] Preferably, in the method, the optimal prediction time domain is obtained through a DQN network model; the DQN network model implements the following action value function:
[0013] Q(t)=R(sta t , act t )+βmax Q(sta t , act t ;θ)
[0014] Where:
[0015] Q represents the action value function value under condition t; R represents the reward function; sta t Indicates the state of the vehicle under working condition t; act t represents the time domain of the vehicle under working condition t; θ is the weight parameter of the DQN network model, and β represents the weight of the maximum action value.
[0016] Preferably, in the method, the vehicle speed is predicted using a bidirectional long short-term memory model (Bi-directional Long Short-Term Memory, BiLSTM).
[0017] Preferably, in the method, the DQN network model is trained by the following steps:
[0018] S101, obtaining the current working state quantity of the vehicle and its corresponding time domain, and selecting the time domain with the maximum action value;
[0019] S102, predicting the vehicle speed according to the selected time domain, and calculating the reward value and the next operating state quantity according to the reward function under the model prediction framework;
[0020] S103, storing the current moment information group in the experience pool, the information group including the current state quantity, the time domain corresponding to the current state quantity, the reward value, and the state quantity at the next moment;
[0021] S104, randomly taking out n information groups from the experience pool, where n is a natural number greater than 1;
[0022] S105, for each information group, calculate the actual action value, and use the gradient descent algorithm to update the DQN network model parameters according to the square of the difference between the actual action value and the maximum action value;
[0023] S106. Set the next operating condition as the current operating condition and return to S101.
[0024] Preferably, in the method, the reward function is as follows:
[0025]
[0026] Where:
[0027] E fc is the energy consumption of the fuel cell system; E elec is the energy consumption of the power battery, ΔP fc is the output power change rate of the fuel cell system, γ, λ, and δ are weight coefficients respectively.
[0028] On the other hand, the present invention provides a time-varying predictive energy management device, the device comprising the following intelligent agent module and environment module;
[0029] The intelligent agent module obtains the current vehicle state and its corresponding time domain, and obtains the best predicted time domain at the next moment, and the length of the best predicted time domain can be not fixed;
[0030] The environment module receives the best prediction time domain of the intelligent agent module, first predicts the vehicle speed according to the best prediction time domain; then, based on the best prediction time domain, a dynamic programming algorithm is used to obtain the optimal control sequence of the vehicle, thereby realizing energy management in a variable time domain; finally, after the vehicle executes the control instruction corresponding to the control sequence, it enters a new state;
[0031] The vehicle status includes the power battery charge state, the vehicle current position, the current vehicle speed, and the predicted vehicle speed at the last moment.
[0032] Preferably, in the device, the optimal prediction time domain is obtained through a DQN network model; the DQN network model implements the following action value function:
[0033] Q(t)=R(sta t , act t )+βmax Q(sta t , act t ;θ)
[0034] Where:
[0035] Q represents the action value function value under condition t; R represents the reward function; sta t Indicates the state of the vehicle under working condition t; act t represents the time domain of the vehicle under working condition t; θ is the weight parameter of the DQN network model, and β represents the weight of the maximum action value.
[0036] Preferably, in the device, the vehicle speed is predicted using a bidirectional long short-term memory model (Bi-directional Long Short-Term Memory, BiLSTM).
[0037] Preferably, in the device, the DQN network model is trained by the following steps:
[0038] S101, obtaining the current working state quantity of the vehicle and its corresponding time domain, and selecting the time domain with the maximum action value;
[0039] S102, predicting the vehicle speed according to the selected time domain, and calculating the reward value and the next operating state quantity according to the reward function under the model prediction framework;
[0040] S103, storing the current moment information group in the experience pool, the information group including the current state quantity, the time domain corresponding to the current state quantity, the reward value, and the state quantity at the next moment;
[0041] S104, randomly taking out n information groups from the experience pool, where n is a natural number greater than 1;
[0042] S105, for each information group, calculate the actual action value, and use the gradient descent algorithm to update the DQN network model parameters according to the square of the difference between the actual action value and the maximum action value;
[0043] S106. Set the next operating condition as the current operating condition and return to S101.
[0044] Preferably, in the device, the reward function is as follows:
[0045]
[0046] Where:
[0047] E fc is the energy consumption of the fuel cell system; E elec is the energy consumption of the power battery, ΔP fc is the output power change rate of the fuel cell system, γ, λ, and δ are weight coefficients respectively.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] (1) The method and / or device of the present invention can predict the optimal prediction time domain of the next operating condition based on the vehicle state and the length of the time domain of the current operating condition. The optimal prediction time domain is not necessarily the same as the length of the time domain of the current state, thereby improving the effect of predictive energy management.
[0050] (2) The DQN network model is used for reinforcement learning, which is not limited by the number of samples, working condition type, etc., so that a more appropriate time domain can be selected according to the vehicle status to achieve a more energy-saving variable time domain energy management effect.
[0051] (3) When training the DQN network model, an experience pool is established and samples are randomly obtained from the experience pool, thereby improving the application performance and generalization ability of the reinforcement learning algorithm.
[0052] (4) The vehicle energy consumption and the output power of the fuel cell are used as part of the convergence value judgment during the training of the DQN network model. When the DQN network model converges, the predicted time domain is more energy-efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0054] Figure 1 , a schematic diagram of a method flow in one embodiment of the present invention;
[0055] Figure 2 , a schematic diagram of the structure of a device in one embodiment of the present invention. DETAILED DESCRIPTION
[0056] The following is a clear and complete description of the optimal variable time domain vehicle speed prediction energy management method based on deep reinforcement learning described in the present invention in conjunction with the accompanying drawings.
[0057] In Example 1, a time-varying domain prediction energy management method is adopted, and the method flow chart is as follows: Figure 1 As shown, the method mainly comprises the following steps:
[0058] S100, obtaining the current vehicle state quantity and its corresponding time domain, and obtaining the best predicted time domain at the next moment, wherein the length of the best predicted time domain may not be fixed;
[0059] S200, predicting a vehicle speed according to the optimal prediction time domain;
[0060] S300, based on the best prediction time domain, a dynamic programming algorithm is used to obtain an optimal control sequence of the vehicle, thereby realizing energy management in a variable time domain;
[0061] S400: After the vehicle executes the control instruction corresponding to the control sequence, it enters a new state.
[0062] In the above embodiment, preferably, the state quantity of the vehicle includes the state of charge of the power battery, the current position of the vehicle, the current speed of the vehicle, and the predicted speed of the vehicle at the last moment.
[0063] In the study of predictive energy management strategies for hybrid power systems under the traditional model prediction framework, the length of the prediction time domain directly affects the accuracy of vehicle speed prediction, and thus affects the optimization effect and computing cost of the entire vehicle. In the prediction stage, the energy consumption under different prediction time domains is usually tested under offline conditions, and the most energy-efficient prediction time domain is selected as the final prediction time domain. Therefore, the prediction time domains are all fixed values and cannot be adjusted according to changes in working conditions. In Example 1, a variable time domain predictive energy management strategy considering driving information is proposed. The proposed variable time domain prediction can adaptively select the prediction time domain according to the vehicle status, operating conditions, etc., that is, the optimal prediction time domain length can be not fixed, thereby improving the effect of predictive energy management. For example, act represents a selectable prediction time domain set, in which the time domain elements are {5, 10, 15, 20}, and the selection range of the prediction time domain is limited to improve the computing efficiency.
[0064] During the use of the method, after S400, the following steps are further performed:
[0065] Determine whether the trip is completed; if the trip is not completed, take the new state as the current vehicle state and return to S100.
[0066] In the above embodiment, the current best prediction time domain is obtained by determining a judgment value based on the current vehicle state and its corresponding time domain. By maximizing the judgment value, the time domain of the next operating condition is determined, and then the state of the vehicle in the next operating condition is determined.
[0067] One way to obtain the judgment value is to use the action value function, as follows:
[0068] Q(t)=R(sta t , act t )+βmax Q(sta t , act t ;θ)
[0069] Where:
[0070] Q represents the action value function value under condition t; R represents the reward function; sta t Indicates the state of the vehicle under working condition t; act t represents the time domain of the vehicle under working condition t; θ is the weight parameter of the DQN network model, and β represents the weight of the maximum action value.
[0071] Preferably, the judgment value is obtained directly based on the current vehicle state and its corresponding time domain through the DQN network model. The above action value function is implemented using the DQN network model, thereby directly obtaining the best prediction time domain.
[0072] After obtaining the best prediction time domain, in the MPC-based predictive energy management, the vehicle speed is first predicted according to the best prediction time domain, preferably using a bidirectional long short-term memory model (BiLSTM) for speed prediction, and then the predicted vehicle speed is passed to an optimization module. In the optimization module, a dynamic programming algorithm is used to search for a local optimal solution within a given prediction time domain length, thereby obtaining an optimal control sequence.
[0073] The control instructions corresponding to the optimal control sequence are sent to the research object, a fuel cell hybrid bus. The bus executes the control instructions and transfers to a new state, thereby obtaining a new state quantity of the bus. If it is used as the state quantity of the current vehicle, it returns to S100 until the vehicle journey is completed.
[0074] In this process, by implementing variable time domain prediction, the vehicle's operating conditions are adaptively adjusted according to the current state of the vehicle and the operating conditions. This is beneficial to improving the prediction accuracy of the vehicle speed and reducing the time spent, which in turn helps to optimize predictive energy management and effectively reduce energy consumption.
[0075] In the above embodiment, before using the DQN network model for prediction, training is performed through the following steps:
[0076] S101, obtaining the current working state quantity of the vehicle and its corresponding time domain, and selecting the time domain with the maximum action value;
[0077] S102, predicting the vehicle speed according to the selected time domain, and calculating the reward value and the next operating state quantity according to the reward function under the model prediction framework;
[0078] S103, storing the current moment information group in the experience pool, the information group including the current state quantity, the time domain corresponding to the current state quantity, the reward value, and the state quantity at the next moment;
[0079] S104, randomly taking out n information groups from the experience pool, where n is a natural number greater than 1;
[0080] S105, for each information group, calculate the actual action value, and use the gradient descent algorithm to update the DQN network model parameters according to the square of the difference between the actual action value and the maximum action value;
[0081] S106. Set the next operating condition as the current operating condition and return to S101.
[0082] During training, the state quantities can be normalized for rapid convergence.
[0083] If there is no prediction time domain initially, the prediction time domain can be obtained by random selection.
[0084] By setting up an experience pool, randomly selecting a set of data from the experience pool and passing it to the DQN network model for fitting the deep action value function, the convergence and efficiency of the training can be guaranteed. In order to ensure the independence of the time domain selection, the state-time domain-reward state transfer process is stored in the experience pool each time. By setting the length of the experience pool, the size of the experience pool and the update of the information group inside are controlled. The information group includes the current state quantity, the time domain corresponding to the current state quantity, the reward value, and the state quantity at the next moment. If the information group stored in the experience pool exceeds the set length, the early data of the experience pool is deleted. At this time, the size of n involved in the training process does not exceed the length of the experience pool.
[0085] When training the DQN network model, the square of the difference between the actual action value and the maximum action value is calculated, and the gradient descent algorithm is used to update the DQN network model parameters. In the convergence judgment, the vehicle energy consumption and the output power of the fuel cell are used as part of the convergence value judgment during the training of the DQN network model. That is, when the DQN network model converges, the prediction time domain is not only fast, but also the vehicle battery energy consumption can be reduced under the working conditions in the prediction time domain. The reward function setting can be set to:
[0086]
[0087] Where:
[0088] E fc is the energy consumption of the fuel cell system; E elec is the energy consumption of the power battery, ΔP fc is the output power change rate of the fuel cell system, γ, λ, and δ are weight coefficients respectively.
[0089] In Example 2, a time-varying prediction energy management device is used. A schematic diagram of a preferred device structure is shown in FIG. Figure 2As shown. The device includes the following intelligent body module and environment module; the intelligent body module obtains the state quantity of the current vehicle and its corresponding time domain, and obtains the best predicted time domain at the next moment, and the length of the best predicted time domain can be not fixed; the environment module receives the best predicted time domain of the intelligent body module, and first predicts the vehicle speed according to the best predicted time domain; then, based on the best predicted time domain, a dynamic programming algorithm is used to obtain the optimal control sequence of the vehicle, thereby realizing energy management of the variable time domain; finally, after the vehicle executes the control instruction corresponding to the control sequence, it enters a new state; the state quantity of the vehicle includes the power battery charge state, the current position of the vehicle, the current speed, and the predicted speed at the previous moment.
[0090] In the device, the optimal prediction time domain is obtained through a DQN network model; the DQN network model implements the following action value function:
[0091] Q(t)=R(sta t , act t )+βmax Q(sta t , act t ;θ)
[0092] Where:
[0093] Q represents the action value function value under condition t; R represents the reward function; sta t Indicates the state of the vehicle under working condition t; act t represents the time domain of the vehicle under working condition t; θ is the weight parameter of the DQN network model, and β represents the weight of the maximum action value.
[0094] In the device, the training method of the DQN network model and the reward functions and methods involved are the same and will not be repeated here.
[0095] In the device, the vehicle speed is preferably predicted using a bidirectional long short-term memory model (Bi-directional LongShort-Term Memory, BiLSTM).
[0096] In the device, the size of the experience pool and the update of the information group therein are controlled by setting the length of the experience pool. The information group includes the current state quantity, the time domain corresponding to the current state quantity, the reward value, and the state quantity at the next moment. If the information group stored in the experience pool exceeds the set length, the early data of the experience pool is deleted. In order to ensure the independence of the time domain selection, the current information group is stored in the experience pool every time.
[0097] Through the description of the above implementation modes, those skilled in the art can clearly understand that the method and / or device of the present disclosure can be implemented by means of software plus necessary general hardware, and of course can also be implemented by means of dedicated hardware including dedicated integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. In general, all functions performed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures used to implement the same function can also be various, such as analog circuits, digital circuits, or dedicated circuits, etc. However, for the present disclosure, software program implementation is a better implementation mode in most cases.
[0098] Although the embodiments of the present invention are described above in conjunction with the accompanying drawings, the present invention is not limited to the above specific embodiments and application fields, and the above specific embodiments are only illustrative and instructive, rather than restrictive. A person of ordinary skill in the art can also make many forms under the guidance of this specification and without departing from the scope of protection of the claims of the present invention, all of which belong to the protection of the present invention.
Claims
1. A time-varying predictive energy management method, It is characterized in that The method comprises the following steps: S100, obtaining the current vehicle state quantity and its corresponding time domain, and obtaining the best predicted time domain at the next moment, wherein the length of the best predicted time domain may not be fixed; S200, predicting a vehicle speed according to the optimal prediction time domain; S300, based on the vehicle speed predicted by the best prediction time domain, a dynamic programming algorithm is used to obtain an optimal control sequence of the vehicle, thereby realizing energy management in a variable time domain; S400, after the vehicle executes the control instruction corresponding to the control sequence, it enters a new state; The vehicle status includes the power battery charge state, the vehicle current position, the current vehicle speed, and the predicted vehicle speed at the last moment; The optimal prediction time domain is obtained through the DQN network model, and the DQN network model implements the following action value function: Q(t)=R(sta t ,act t )+βmaxQ(sta t ,act t ;θ) Where: Q represents the action value function value under condition t; R represents the reward function; sta t Indicates the state of the vehicle under working condition t; act t represents the time domain of the vehicle under working condition t; θ is the weight parameter of the DQN network model, and β represents the weight of the maximum action value; The DQN network model is trained through the following steps: S101, obtaining the current working state quantity of the vehicle and its corresponding time domain, and selecting the time domain with the maximum action value; S102, predicting the vehicle speed according to the selected time domain, and calculating the reward value and the next operating state quantity according to the reward function under the model prediction framework; S103, storing the current moment information group in the experience pool, the information group including the current state quantity, the time domain corresponding to the current state quantity, the reward value, and the state quantity at the next moment; S104, randomly taking out n information groups from the experience pool, where n is a natural number greater than 1; S105, for each information group, calculate the actual action value, and use the gradient descent algorithm to update the DQN network model parameters according to the square of the difference between the actual action value and the maximum action value; S106. Set the next operating condition as the current operating condition and return to S101.
2. The method according to claim 1, It is characterized in that The vehicle speed is predicted using a bidirectional long short-term memory model (Bi-directional Long Short-Term Memory, BiLSTM).
3. The method according to claim 1, It is characterized in that The reward function is as follows: Where: E fc is the energy consumption of the fuel cell system; E elec is the energy consumption of the power battery, ΔP fc is the output power change rate of the fuel cell system, γ, λ, and δ are weight coefficients respectively.
4. A time-varying predictive energy management device, It is characterized in that The device comprises the following agent module and environment module; The intelligent agent module obtains the current vehicle state and its corresponding time domain, and obtains the best predicted time domain at the next moment, and the length of the best predicted time domain can be not fixed; The environment module receives the best prediction time domain of the intelligent agent module, first predicts the vehicle speed according to the best prediction time domain; then, based on the vehicle speed predicted by the best prediction time domain, a dynamic programming algorithm is used to obtain the optimal control sequence of the vehicle, thereby realizing energy management in a variable time domain; finally, after the vehicle executes the control instruction corresponding to the control sequence, it enters a new state; The vehicle status includes the power battery charge state, the vehicle current position, the current vehicle speed, and the predicted vehicle speed at the last moment; The optimal prediction time domain is obtained through the DQN network model, and the DQN network model implements the following action value function: Q(t)=R(sta t ,act t )+βmaxQ(sta t ,act t ;θ) Where: Q represents the action value function value under condition t; R represents the reward function; sta t Indicates the state of the vehicle under working condition t; act t represents the time domain of the vehicle under working condition t; θ is the weight parameter of the DQN network model, and β represents the weight of the maximum action value; The DQN network model is trained through the following steps: S101, obtaining the current working state quantity of the vehicle and its corresponding time domain, and selecting the time domain with the maximum action value; S102, predicting the vehicle speed according to the selected time domain, and calculating the reward value and the next operating state quantity according to the reward function under the model prediction framework; S103, storing the current moment information group in the experience pool, the information group including the current state quantity, the time domain corresponding to the current state quantity, the reward value, and the state quantity at the next moment; S104, randomly taking out n information groups from the experience pool, where n is a natural number greater than 1; S105, for each information group, calculate the actual action value, and use the gradient descent algorithm to update the DQN network model parameters according to the square of the difference between the actual action value and the maximum action value; S106. Set the next operating condition as the current operating condition and return to S101.
5. The device according to claim 4, It is characterized in that The vehicle speed is predicted using a bidirectional long short-term memory model (Bi-directional Long Short-Term Memory, BiLSTM).
6. The device according to claim 4, It is characterized in that The reward function is as follows: Where: E fc is the energy consumption of the fuel cell system; E elec is the energy consumption of the power battery, ΔP fc is the output power change rate of the fuel cell system, γ, λ, and δ are weight coefficients respectively.
