A parameter optimization method for virtual-real fusion grid rudder model based on DPPO
The parameters of the rocket grid rudder system are optimized through the DPPO algorithm and deep reinforcement learning environment, which solves the problems of insufficient accuracy and poor convergence of high-dimensional continuous space parameter optimization in the existing technology, and realizes the rapid finding of the best parameter values to ensure the landing point of the rocket. effect.
Patent Information
- Application Number
- CN202210394120.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-14
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-04-14
AI Technical Summary
The existing technology has problems such as insufficient accuracy, difficulty in convergence, and sensitivity to step sizes when optimizing the high-dimensional continuous space parameters of the rocket grid rudder system. It is difficult to quickly find the best parameter values to ensure that the rocket landing point is within the specified area.
A virtual-real fusion grid rudder model parameter optimization method based on DPPO is used to establish a physical simulation model, train a BP neural network agent model, design a PPO network, and use the DPPO algorithm to build a deep reinforcement learning environment and conduct multi-thread training to optimize the parameters to be adjusted. .
It realizes rapid parameter optimization in high-dimensional continuous space, reduces training time, improves the accuracy and convergence of parameter optimization, and can quickly find parameter values that meet the target landing point in practical applications.
Smart Images

Figure CN114818124B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of spacecraft design parameter optimization, and in particular to a virtual-real fusion grid rudder model parameter optimization method based on DPPO. Background Art
[0002] The rocket grid rudder system is a typical complex aerospace equipment. It is mainly used to control the landing point of the detached part after the rocket falls off, so that the detached part lands within the specified area, ensuring the safety of the launch mission and facilitating the recovery of the rocket. Its control process is complex, involving many parameters, and the experimental cost is extremely high. The amount of experimental data is small, and there are uncertain effects between the design process and the actual experimental process. In actual engineering applications, it is necessary to use simulation methods combined with physical formulas to simulate and model the grid rudder system in a virtual-real fusion manner, and adjust the design parameters based on the simulation results. In order to ensure the landing point of the rocket, the system parameters need to be controlled within a certain range. The system parameters need to be continuously adjusted during the design process. In order to narrow the target range as much as possible, that is, to make the simulation model more accurate, the current simulation model design parameters need to be optimized; that is, for dozens of sets of parameters, and each parameter takes values in a continuous space, the best values of these parameters are found so that after being used in the simulation model, the calculated landing point is within the specified area. Existing technologies for solving parameter optimization problems in such high-dimensional continuous spaces either have insufficient precision and difficulty solving continuous action problems, such as traditional value-based deep reinforcement learning methods, or have problems such as step-size sensitivity and difficulty in convergence, such as policy-based deep reinforcement learning methods. Therefore, there is an urgent need for a method that can meet the precision requirements and quickly find the best solution in high-dimensional continuous spaces. Summary of the invention
[0003] The object of the present invention is to provide a method for optimizing the parameters of a virtual-real fusion grid rudder model based on DPPO in view of some or all of the above-mentioned deficiencies in the prior art, including the following contents:
[0004] Establish the physical simulation model PM corresponding to the grid rudder system;
[0005] Using the PM to generate simulation data D;
[0006] Using the D to train the BP neural network to obtain the agent model SM of the PM;
[0007] Design a targeted PPO network;
[0008] Use the SM and the PPO network to build a deep reinforcement learning training environment DRLTE;
[0009] Based on the DPPO algorithm and the DRLTE, deep reinforcement learning is performed to optimize the parameters to be optimized.
[0010] Preferably, the process of using the PM to generate simulation data D is: determine the distribution of the parameters to be optimized, which is mean distribution, normal distribution or Weibull distribution; randomly take values for each parameter to be optimized according to its distribution, and together with other determined parameters of the grid rudder system, constitute input parameters, input the input parameters into the PM to obtain a prediction result composed of several parameters, and merge the input parameters and the prediction results into a complete set of data, i.e., input-output pairs; repeat the above process to obtain multiple sets of input-output pairs, i.e., simulation data D.
[0011] Preferably, the BP neural network comprises an input layer, two hidden layers and an output layer, wherein the number of neurons in the input layer is equal to the number of input parameters, the number of neurons in the output layer is equal to the number of parameters of the prediction results, the number of neurons in the first hidden layer is 128, the number of neurons in the second hidden layer is 64, the dropout is 0.3, the mean square loss function MseLoss is used as the loss function, both hidden layers use ReLU activation function, and the Adam optimization method is used.
[0012] Preferably, the termination condition of the training is that the error is within the allowable range of actual engineering, that is, the data of the landing point position related parameters in the prediction results that are within the error range accounts for more than 95% of the test data, and the data of other parameters in the prediction results that are within the error range accounts for more than 90% of the test data.
[0013] Preferably, before the training, the input parameters in D are preprocessed to achieve data standardization; the preprocessing uses the following Z-Score method to obtain the original data X and the standardized data X new :
[0014]
[0015] Among them, X mean is the mean value of the original data, and σ is the standard deviation of the original data.
[0016] Preferably, the PPO network includes two neural networks, Actor and Critic;
[0017] The structure of the Actor network is a fully connected neural network including three hidden layers, the number of nodes in the hidden layers is 128, 128, and 128 respectively, ReLU and Tanh activation functions are used, the input is the input-output pair, and the output is the probability distribution of the change of the parameter to be optimized;
[0018] The structure of the Critic network is a fully connected neural network including 3 hidden layers, the number of hidden layer nodes is 128, 128, and 128 respectively, and the ReLU activation function is used. The input is the input-output pair, and the output is the evaluation value of the input-output pair, that is, the evaluation value of the current grid rudder system parameter state quantity.
[0019] Preferably, the DRLTE includes the SM and the PPO networks,
[0020] Input the current state S into the Actor network to obtain the probability distribution of each parameter to be optimized in the grid rudder, randomly obtain action A according to the probability distribution, apply action A to the input parameter part of the current state S, obtain the input parameters of the next state, input the input parameters of the next state into SM, predict the output parameters of the next state, and use the input-output pair of the next state as the next state S_;
[0021] The reward R is calculated by S_ according to the following reward function:
[0022]
[0023] Among them, P next is the rocket's next state position, that is, the vector composed of the elements representing the position part in S_, P is the rocket's target position vector, m and n are coefficients used to limit the reward value range, d(X,Y) is the distance between the two vectors, and v next is the speed of the rocket in the next step, that is, the vector composed of the elements representing the speed in S_, v is the rocket's target speed vector, is the value of a certain attitude parameter of the grid rudder in the next state, that is, the value of a certain parameter in S_, x i is the target value of the attitude parameter, ∑ is the sum of squares of the difference between the current state and the target state of all attitudes of the grid rudder;
[0024] Combine S, A, R and S_ into<S,A,R,S_> After output.
[0025] Preferably, the DPPO algorithm is a multi-threaded PPO training method.
[0026] Preferably, the deep reinforcement learning optimization process for the optimization parameters to be optimized based on the DPPO algorithm and the DRLTE is as follows:
[0027] The main thread is used as the training subject, which contains a PPO network, namely the Global PPO network; several sub-thread workers are used as independent agents to collect data in their respective DRLTE and store them in the experience pool, and the PPO networks in the workers share the Global PPO network parameters; the main thread uses the data in the experience pool for training and updates the Global PPO parameters; the workers then collect data based on the new Global PPO, and this cycle repeats continuously. When the main thread training is completed, the data in the experience pool will stabilize within a certain range, and the parameter range to be optimized is taken out to obtain the result after parameter optimization;
[0028] The loss function loss during the Global PPO training is calculated by the following formula:
[0029] loss=action_loss+value_loss;
[0030] Where action_loss = -J PPO (θ), J PPO (θ) is the gradient value, which is obtained by the following gradient calculation method:
[0031]
[0032] Among them, min(A,B) is the minimum value operation, which means that when the difference between the action probabilities under the two parameters is too large, the action is clipped. θ (a t |s t ) is the time t under the parameter θ t Select a in the state t The probability of θ′ (a t |s t ) is the time t under the θ' parameter t Select a in the state t The probability of clip is the clipping function. Clip(A,B,C) means if A is less than B, then B is selected; if A is greater than C, then C is selected; otherwise, A is selected; ε is a smaller value within 0.2. If the probability of the same action in the same state in two networks with different parameters is greatly different, clipping is performed; EPS is the size of the experience pool; cumulative advantage function Calculated by the following formula:
[0033]
[0034] Among them, γ is the discount factor, r t′ is the reward value at time t′, that is, the reward R in the experience pool data at time t′, t′ takes values from t+1 to EPS, Vφ(st ) is the state s at time t t The valuation function under , this valuation function is the output value of the Critic network in the Global PPO network.
[0035] Preferably, when the main thread training is completed, for each parameter to be optimized, the mean and standard deviation are calculated using the data in the experience pool to obtain the distribution of the parameter, and the distribution of all the parameters to be optimized, i.e., the parameter optimization result, is output.
[0036] Beneficial Effects
[0037] The present invention uses a proxy model trained by a BP neural network to replace the physical simulation model of the grid rudder system, which can quickly generate data and complete predictions. It takes more than 20 hours to predict 20,000 sets of data using the Adams physical simulation model, but only 1.6 seconds using the proxy model. DPPO deep reinforcement learning is used to optimize the parameters of the grid rudder system. When calculating the gradient, the update step size is limited by comparing the parameters before and after the update, which solves the step size sensitivity problem of behavior-based reinforcement learning and makes training easier to converge. At the same time, a distributed approach is used to interact with the environment with multiple groups of threads to generate training data. While increasing the data collection speed, the correlation between networks is reduced, making it easier for training to converge and easier to achieve parameter optimization of the grid rudder system. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A flow chart of a method for optimizing parameters of a virtual-real fusion grid rudder model based on DPPO provided in an embodiment of the present invention;
[0039] Figure 2 A schematic diagram of the DPPO data flow provided by an embodiment of the present invention;
[0040] Figure 3 A schematic diagram of DPPO distribution provided by an embodiment of the present invention;
[0041] Figure 4 A schematic diagram of the Actor network structure provided by an embodiment of the present invention;
[0042] Figure 5 A schematic diagram of the Critic network structure provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.
[0044] The grid rudder simulation system calculates the target landing point through some rocket design parameters (including rocket structural parameters, angles, center of mass, mass, etc.), current flight state parameters (flight altitude, speed, direction, etc.), etc. In order to obtain more accurate landing point information, some rocket design parameters need to be tuned. For example, the input parameters are 75, including 44 design parameters and 31 flight state parameters, and the output results are 17 test result parameters including target landing point position, speed, etc. The purpose of parameter optimization is to tune the remaining 10 design parameters within their value ranges based on the known output results, 34 design parameters and 31 flight state parameters, that is, to select the design parameters that can enable the rocket to reach the target landing point. For this type of tuning, the traditional parameter tuning method is trial and error technology or evolutionary algorithm, but the optimization method of traditional evolutionary algorithm usually optimizes a specific set of initial states. When the initial parameters change, it needs to be recalculated from the beginning, which cannot effectively use historical data, has poor versatility and is quite time-consuming. Since the grid rudder simulation system is computationally complex, each simulation takes a lot of time, about 80 hours, and the design parameters are all in continuous space. If all the design parameters to be optimized are traversed in their value space to find the design parameters that can meet the target landing point, it will take an incalculable amount of time, which is unbearable for practical applications. Therefore, the landing point obtained by the existing design is usually within a very wide range around the target landing point, which brings various inconveniences such as later recovery. In order to solve the above problems, the present invention provides a virtual-reality fusion grid rudder system model parameter optimization method based on deep reinforcement learning DPPO network, which can quickly find the parameter values that meet the target conditions in a continuous space containing multiple parameters that affect each other, and provide efficiency and accuracy guarantees that meet practical applications for complex system design.
[0045] Below, by taking the optimization of the design parameters of the above-mentioned example grid rudder simulation system as an example, the virtual-reality fusion grid rudder system model parameter optimization method based on deep reinforcement learning DPPO network provided by the present invention is explained. The input of this method is 31 grid rudder flight state parameters, 34 determined design parameters, 17 target result parameters and 10 ranges of parameters to be tuned. The training agent adjusts the 10 parameters to be tuned. After training, the 10 parameters to be tuned will stabilize within a certain range, and the final stable parameter range is the parameter optimization result.
[0046] Figure 1 A parameter optimization method for a virtual-real fusion grid rudder model based on DPPO is provided in an embodiment of the present invention. As shown in the figure, the method comprises the following steps:
[0047] Step 1: Establish a physical simulation model PM corresponding to the grid rudder system;
[0048] This example directly uses the physical simulation model of the grid rudder system provided by a research institute and uses Adams software to build the model.
[0049] Step 2: Use PM to generate simulation data D;
[0050] Preferably, in order to make the obtained simulation data cover the model in step one as comprehensively as possible, sampling values are taken according to the distribution of each input parameter of the grid rudder system, specifically involving mean distribution, normal distribution, and Weibull distribution. Through the distribution of each input parameter, all parameter values are randomly taken to form a set of data, which are input into PM to obtain the prediction results, and all inputs and prediction results are combined into a complete set of data, namely, input-output pairs. Repeat the above process to obtain simulation data D consisting of several input-output pairs.
[0051] The input here is 75 parameters consisting of 31 grid rudder flight state parameters, 34 determined design parameters and 10 parameters to be tuned; the output is 17 target result parameters calculated by PM. The purpose of the present invention is to find the values of the 10 parameters to be tuned that can make the landing point calculated by PM meet the requirements of the preset rocket landing point position (i.e., the rocket target position).
[0052] Step 3: Use D to train the BP neural network to obtain the PM proxy model SM;
[0053] Since the prediction results of the physical simulation model PM are slow, if it is used as a training environment for subsequent reinforcement learning, it will lead to low training efficiency. Therefore, the BP neural network is used to construct its proxy model. The simulation data D generated in step 2 is used to train the BP neural network and construct a proxy model. The neural network with good fitting effect and meeting the accuracy requirements is used as the proxy model of the physical simulation model PM and as part of the training environment for subsequent reinforcement learning.
[0054] Preferably, in this example, the BP neural network is set to include an input layer, two hidden layers and an output layer, where the number of neurons in the input layer is equal to the number of input parameters, i.e. 75, the number of neurons in the output layer is equal to the number of parameters of the prediction results, i.e. 17, the number of neurons in the first hidden layer is 128, the number of neurons in the second hidden layer is 64, the dropout is 0.3, the mean square loss function MseLoss is used as the loss function, both hidden layers use ReLU activation function, and the Adam optimization method is used.
[0055] Specifically, the end condition for BP neural network training is set as follows: the error is within the allowable range of the actual project, that is, the data of the parameters related to the landing point position in the prediction results that meet the error range accounts for more than 95% of the test data, and the data of other parameters in the prediction results that meet the error range accounts for more than 90% of the test data.
[0056] Since the number of output parameters in this example is large, it is different from the previous classification problems such as binary classification. Therefore, it is necessary to combine the engineering allowable range of the grid rudder system to evaluate whether the proxy model meets the requirements. In this example, due to the high dimensionality of the output results, it is necessary to take into account the accuracy of each output result. The landing point position is the most important observation result. The data within the error range must account for more than 95% of the test data, and the other speed, direction and other results must have more than 90% of the test data meet the standard within the error range of 10%. For example, for the above-mentioned trained prediction model, use the simulated data generated in step 2 as the test set. More than 95% of the test data in the test set should meet the 17 result parameters output by the prediction model. All parameters related to the landing point position should meet the error between -5% standard value and +5% standard value; more than 90% of the test data in the test set should meet the 17 result parameters output by the prediction model. All parameters except the parameters related to the landing point position should meet the error between -10% standard value and +10% standard value. At this time, the prediction model can be used as the proxy model SM of PM.
[0057] Preferably, the parameters in D are preprocessed to achieve data standardization; the preprocessing uses the following Z-Score method to obtain the original data X and the standardized data X new :
[0058]
[0059] Among them, X mean is the mean value of the original data, and σ is the standard deviation of the original data.
[0060] Since the rocket grid rudder data has large dimensions and different physical meanings, with large differences in order of magnitude, it is difficult to obtain an effective proxy model by training the BP neural network using the original data. By preprocessing the parameters in the input-output pairs in the simulation data D, data standardization is achieved to facilitate the training of the BP neural network.
[0061] Step 4: Design a targeted PPO network;
[0062] Preferably, the PPO network includes two neural networks: Actor and Critic;
[0063] The structure of the Actor network is a fully connected neural network with three hidden layers. The number of nodes in the hidden layers is 128, 128, and 128, respectively. ReLU and Tanh activation functions are used. The input is an input-output pair in the form of step 2, and the output is the probability distribution of the change of the parameter to be optimized.
[0064] The structure of the Critic network is a fully connected neural network with three hidden layers. The number of hidden layer nodes is 128, 128, and 128 respectively. The ReLU activation function is used. The input is an input-output pair in the form of step 2, and the output is the evaluation value of the input-output pair, that is, the evaluation value of the current grid rudder system parameter state quantity.
[0065] Figure 4 The structure of the Actor network is shown. The meaning of the Actor network is to calculate the change probability distribution of each parameter to be optimized of the grid rudder according to the current state, that is, the input-output pair in step 2. For this example, since there are 10 parameters to be optimized, the distribution of each parameter is determined by the mean and standard deviation. Therefore, the output of the Actor network is 20 parameters, which are expressed in the form of a multidimensional vector. For each parameter to be optimized, by using the mean and standard deviation to randomly obtain the change amount within the distribution of each parameter, that is, the action, a vector composed of 10-dimensional changes is obtained, that is, the actions of the 10 parameters to be optimized. The input of the next state can be obtained by adding the input and the action.
[0066] Figure 5 The structure of the Critic network is shown, from which the evaluation value of the current grid rudder system parameter state quantity can be obtained for subsequent calculation of the loss.
[0067] Step 5: Use SM and PPO networks to build a deep reinforcement learning training environment DRLTE;
[0068] Specifically, DRLTE includes SM and PPO networks for generating training data;
[0069] Input the current state S into the Actor network to obtain the probability distribution of each parameter to be optimized in the grid rudder. Randomly obtain action A according to the probability distribution, apply action A to the input parameter part of the current state S, obtain the input parameters of the next state, input the input parameters of the next state into SM, predict the output parameters of the next state, and use the input-output pair of the next state as the next state S_; calculate the reward R from S_ according to the following reward function:
[0070]
[0071] Among them, P next is the rocket's next state position, that is, the vector composed of the elements representing the position part in S_, P is the rocket's target position vector, m and n are coefficients used to limit the reward value range, d(X,Y) is the distance between the two vectors, and v next is the speed of the rocket in the next step, that is, the vector composed of the elements representing the speed in S_, v is the rocket's target speed vector, is the value of a certain attitude parameter of the grid rudder in the next state, that is, the value of a certain parameter in S_, x i is the target value of the attitude parameter, ∑ is the sum of the squares of the difference between the current state and the target state of all attitudes of the grid rudder; P, v and x i All are known input parameters, m and n are hyperparameters;
[0072] Combine S, A, R and S_ to get the output of DRLTE composed of the current state, action, reward and next state.<S,A,R,S_> .
[0073] In order to reduce the time wasted in the simulation process, the proxy model SM in step three is used to build a training environment. The training environment simulates the simulation process, and the input of the training environment is the current parameters of the grid rudder system, that is, the input-output pair in step two, which is used as the current state S. The current state S is input into the Actor network to obtain the probability distribution of each action, and the action A is obtained by randomly taking values according to the probability distribution. The current parameters of the grid rudder system are updated with the action to obtain new grid rudder system parameters. The new parameters are input into the proxy model SM in step three, and the results under the new state are predicted to obtain a new input-output pair S_, that is, the next state; the reward value R is calculated according to the above-mentioned reward function using the current predicted result and the target result related to the actual landing position. Then the output of the training environment is<S,A,R,S_> , which is composed of the current state, action, reward, and next state.
[0074] Step 6: Perform deep reinforcement learning optimization on the optimization parameters based on the DPPO algorithm and DRLTE;
[0075] Preferably, the DPPO algorithm is a multi-threaded PPO training method.
[0076] Specifically, the deep reinforcement learning optimization process for the optimization parameters based on the DPPO algorithm and DRLTE is as follows:
[0077] The main thread is the training subject, which contains a PPO network, namely the Global PPO network; several sub-thread workers, as independent intelligent agents, collect data in their respective DRLTE and store them in the experience pool, and the PPO networks in the workers share the parameters of the Global PPO network; the main thread uses the data in the experience pool for training and updates the Global PPO parameters; the workers then collect data based on the new Global PPO, and this cycle repeats continuously. When the main thread training is finished, the data in the experience pool will stabilize within a certain range, and the parameter range to be optimized will be taken out to obtain the result after parameter optimization;
[0078] The loss function loss during the Global PPO training is calculated by the following formula:
[0079] loss=action_loss+value_loss;
[0080] Where action_loss = -J PPO (θ), J PPO (θ) is the gradient value, which is obtained by the following gradient calculation method:
[0081]
[0082] Among them, min(A,B) is the minimum value operation, which means that when the difference between the action probabilities under the two parameters is too large, the action is clipped. θ (a t |s t ) is the time t under the parameter θ t Select a in the state t The probability of θ′ (a t |s t ) is the time t under the θ' parameter t Select a in the state t The probability of clip is the clipping function. Clip(A,B,C) means if A is less than B, then B is selected; if A is greater than C, then C is selected; otherwise, A is selected; ε is a smaller value within 0.2. If the probability of the same action in the same state in two networks with different parameters is greatly different, clipping is performed; EPS is the size of the experience pool; cumulative advantage function Calculated by the following formula:
[0083]
[0084] Among them, γ is the discount factor, r t′ is the reward value at time t′, that is, the reward R in the experience pool data at time t′, t′ takes values from t+1 to EPS, Vφ(s t ) is the state s at time t t The valuation function under , this valuation function is the output value of the Critic network in the Global PPO network.
[0085] According to the above optimization process, for the parameter optimization problem of the grid rudder system in this example, use the following method: Figure 3 The distributed structure shown in the figure, assuming that the number of secondary threads is 10, the deep reinforcement learning optimization process is as follows, and the DPPO data flow during the optimization process is as follows Figure 2 As shown:
[0086] Step 6.1 Initialize 10 worker threads and Global PPO parameters. PPO contains two Actor networks with different parameters, θ and θ′, which are initially the same. The network with θ′ is a historical reference for the network with θ, which is used to limit the step size in subsequent calculations. Initialize the Critic network parameter φ and the number of updates M for θ and φ. Initialize the training environment DRLTE and initial state S of each worker thread. 0 , set the training round N, the number of iterations per round K and the number of steps BatchSize;
[0087] Step 6.2 10 secondary threads execute the strategy πθ of the Actor network in Global PPO with θ as parameter, and collect data in their respective environments DRLTE<S t ,A t ,R t ,S t_ >, where the subscript t represents the value obtained at time t.
[0088] Step 6.3 After the 10 secondary thread workers each execute BatchSize steps, they stop collecting data, clear the experience pool, and pass the collected data to the experience pool;
[0089] Step 6.4 The main thread assigns the Actor network parameter θ to θ′;
[0090] Step 6.5 calculates action_loss and value_loss, obtains loss, performs reverse transfer, and updates the GlobalPPO network parameters;
[0091] Calculate the cumulative advantage function of the Actor network in Global PPO based on the experience pool data Perform gradient calculation to get the gradient value J PPO (θ), according to J PPO (θ) obtain action_loss, action_loss = -J PPO (θ); where J PPO (θ) is calculated using the Clip method as follows:
[0092]
[0093] Among them, min(A,B) is the minimum operation, which means to cut when the action probability under the two parameters is too different. In this example, the gradient value under the current state is obtained through the min() function, π θ (a t |s t ) is the time t under the parameter θ t Select a in the statet The probability of θ′ (a t |s t ) is the time t under the parameter θ t Select a in the state t The probability of clip is the clipping function, clip(A,B,C) means if A is less than B, then B is taken; if A is greater than C, then C is taken; otherwise, A is taken; where ε is generally taken within 0.2. If the probability of the same action in the same state in two networks with different parameters is greatly different, clipping is performed; Calculated by the following formula:
[0094]
[0095] It means the cumulative advantage within t′ steps after calculating time t, where γ is the discount factor, which is generally 0.9, r t′ is the reward value at time t′. In this experiment, in the empirical data of 10*BatchSize, t′ corresponds to t to 10*BatchSize; Vφ(s t ) is the state s at time t t The valuation function under this condition is the output value of the Critic network in the Global PPO network;
[0096] Obtain L through the Critic network BL (φ), value_loss = L BL (φ), where L BL (φ) is calculated as follows;
[0097]
[0098] Get loss through action_loss and value_loss, loss = action_loss + value_loss, use loss for reverse propagation, and update the Actor and Critic network parameters.
[0099] Step 6.6 Step 6.5 is an Actor and Critic network update. Repeat the update M times and then go to step 6.7. If the number of updates is insufficient, go to step 6.5.
[0100] Step 6.7: Steps 6.2 to 6.6 are one iteration. After K iterations, one round of training is completed. Go to step 6.8. If it is less than K iterations, go back to step 6.2 for the next iteration.
[0101] Step 6.8 stops training after N rounds of training. At this time, the stable range of the 10 parameters to be tuned in the experience pool is the optimization result, which is output; if N rounds are less than N, return to step 6.2 and reset the states of the proxy models in the 10 secondary threads to obtain a new initial state.
[0102] The training process of the present invention is to train the intelligent agent to adjust the 10 parameters to be tuned. After the above training process, the 10 parameters to be tuned in the final experience pool will be stable within a certain range. The mean and standard deviation of each parameter in the experience pool are calculated respectively to obtain the distribution of the parameter. The distribution of the final 10 parameters is the parameter optimization result.
[0103] The present invention uses a proxy model trained by a BP neural network to replace the physical simulation model of the grid rudder system, which can quickly generate data and complete predictions. It takes more than 20 hours to predict 20,000 sets of data using the Adams physical simulation model, but only 1.6 seconds using the proxy model. DPPO deep reinforcement learning is used to optimize the parameters of the grid rudder system. When calculating the gradient, the probability of selecting actions in the network where the θ and θ′ parameters are located before and after the update is compared to limit the update step size, that is, the action, which solves the step size sensitivity problem of behavior-based reinforcement learning and makes training easier to converge. At the same time, a distributed approach is used to interact with the environment with multiple groups of threads to generate training data. While increasing the data collection speed, the correlation between networks is reduced, making it easier to converge training and easier to achieve parameter optimization of the grid rudder system.
[0104] For the continuous space optimization problem with more than 10 parameters in this example, the method of the present invention can obtain design parameters that meet the business scenario within 20 hours in the computing environment of AMD Ryzen7 5800H 3.20GHz, eight-core and sixteen-thread CPU, 16GB memory capacity, and 1.5TB hard disk capacity, greatly improving the design, production efficiency and design accuracy of complex system design units. At present, the method has been applied in a certain research institute and has achieved good results in meeting the design accuracy requirements and improving the design efficiency.
[0105] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of the unit does not constitute a limitation on the unit itself.
[0106] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof, and the steps and their serial numbers used in the above description process are only for convenience of description and are not intended to limit them to being implemented in the order of the serial numbers.
[0107] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A parameter optimization method for a virtual-real fusion grid rudder model based on DPPO, characterized in that: Includes the following: Establish the physical simulation model PM corresponding to the grid rudder system; Generate simulation data D using the PM; Using the D to train the BP neural network to obtain the agent model SM of the PM; Design a targeted PPO network; Use the SM and the PPO network to build a deep reinforcement learning training environment DRLTE; Based on the DPPO algorithm and the DRLTE, deep reinforcement learning optimization is performed on the optimization parameters to be optimized; The process of using the PM to generate simulation data D is as follows: determining the distribution of the parameters to be optimized, wherein the distribution is mean distribution, normal distribution or Weibull distribution; randomly taking values of each parameter to be optimized according to its distribution, and forming input parameters together with other determined parameters of the grid rudder system; inputting the input parameters into the PM to obtain prediction results composed of several parameters, and merging the input parameters and the prediction results into a set of complete data, namely, input-output pairs; repeating the above process to obtain multiple sets of input-output pairs, namely, simulation data D; The BP neural network comprises an input layer, two hidden layers and an output layer, wherein the number of neurons in the input layer is equal to the number of input parameters, the number of neurons in the output layer is equal to the number of parameters of the prediction result, the number of neurons in the first hidden layer is 128, the number of neurons in the second hidden layer is 64, the dropout is 0.3, the mean square loss function MseLoss is used as the loss function, both hidden layers use ReLU activation function, and the Adam optimization method is used; The end condition of the training is that the error is within the allowable range of the actual project, that is, the data of the parameters related to the landing point position in the prediction results that meet the error range accounts for more than 95% of the test data, and the data of other parameters in the prediction results that meet the error range accounts for more than 90% of the test data; Before the training, the parameters in D are preprocessed to achieve data standardization; the preprocessing Use the following Z-Score method to obtain the standardized data of the original data X : ; in, is the average value of the original data, is the standard deviation of the original data; The PPO network includes two neural networks: Actor and Critic; The structure of the Actor network is a fully connected neural network including three hidden layers, the number of nodes in the hidden layers is 128, 128, and 128 respectively, ReLU and Tanh activation functions are used, the input is the input-output pair, and the output is the probability distribution of the change of the parameter to be optimized; The structure of the Critic network is a fully connected neural network including 3 hidden layers, the number of hidden layer nodes is 128, 128, 128 respectively, using the ReLU activation function, the input is the input-output pair, and the output is the evaluation value of the input-output pair, that is, the evaluation value of the current grid rudder system parameter state quantity; The DRLTE includes the SM and the PPO network, Input the current state S into the Actor network to obtain the probability distribution of each parameter to be optimized in the grid rudder, randomly obtain action A according to the probability distribution, apply action A to the input parameter part of the current state S, obtain the input parameters of the next state, input the input parameters of the next state into SM, predict the output parameters of the next state, and use the input-output pair of the next state as the next state S_; The reward R is calculated by S_ according to the following reward function: ; in, is the rocket's next state position, that is, the vector composed of the elements representing the position part in S_, P is the rocket's target position vector, m and n are coefficients used to limit the reward value range, and d(X,Y) is the distance between the two vectors. is the speed of the rocket in the next step, that is, the vector composed of the elements representing the speed in S_, v is the rocket's target speed vector, is the value of a certain attitude parameter of the grid rudder in the next state, that is, the value of a certain parameter in S_, is the target value of the attitude parameter, ∑ is the sum of squares of the difference between the current state and the target state of all attitudes of the grid rudder; Combine S, A, R and S_ into<S,A,R,S_> After output; The DPPO algorithm is a multi-threaded PPO training method; The process of deep reinforcement learning optimization for the optimization parameters based on the DPPO algorithm and the DRLTE is as follows: The main thread is used as the training subject, which contains a PPO network, namely the Global PPO network; several sub-thread workers are used as independent agents to collect data in their respective DRLTE and store them in the experience pool, and the PPO networks in the workers share the Global PPO network parameters; the main thread uses the data in the experience pool for training and updates the Global PPO parameters; the workers then collect data based on the new Global PPO, and this cycle repeats continuously. When the main thread training is completed, the data in the experience pool will stabilize within a certain range, and the parameter range to be optimized is taken out to obtain the result after parameter optimization; The loss function loss during the Global PPO training is calculated by the following formula: loss=action_loss+value_loss; Among them, action_loss=- , is the gradient value, which is obtained by the following gradient calculation method: ; Among them, min(A,B) is the minimum value operation, which means that when the difference between the action probabilities under the two parameters is too large, the action is cut. For θ Parameters at time t Select in status The probability of For θ' Parameters at time t Select in status The probability of clip is the clipping function, clip(A,B,C) means if A is less than B, then take B; if A is greater than C, then take C; otherwise take A; is a smaller value within 0.
2. If the probability of the same action in the same state in two networks with different parameters is greatly different, it will be pruned; EPS is the size of the experience pool; cumulative advantage function Calculated by the following formula: ; in, is the discount factor, for The reward value is The reward R in the experience pool data at that time, From t+1 to EPS, is the state at time t The valuation function under this condition is the output value of the Critic network in the Global PPO network; When the main thread training is finished, for each parameter to be optimized, the mean and standard deviation are calculated using the data in the experience pool to obtain the distribution of the parameter, and the distribution of all the parameters to be optimized, i.e., the parameter optimization result, is output.
