Optimal solution calculation device
The optimal solution calculation device addresses the inefficiency of model predictive control by generating initial solutions from previous optimal solutions and employing parallel processing, thereby reducing search numbers and calculation time.
Patent Information
- Application Number
- JP2023573978
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-01-17
- Filing Date
- 2022-12-27
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-12-27
AI Technical Summary
Existing model predictive control methods face limitations in calculation time due to the need for numerous searches for solution candidates, especially when using random initial solutions, which are inefficient and time-consuming.
An optimal solution calculation device that generates an initial solution using a previously calculated optimal solution, performs parallel processing across multiple processor elements, and adjusts the number of iterations based on the evaluation function's value, reducing the number of searches and calculation time.
This approach significantly reduces calculation time by up to 30% compared to conventional methods, enhancing the efficiency of model predictive control.
Smart Images

Figure 0007772097000006 
Figure 0007772097000007 
Figure 0007772097000008
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to an optimal solution calculation device for calculating an optimization problem in model predictive control.
[0002] (CROSS-REFERENCE TO RELATED APPLICATIONS) This application is based on and claims the benefit of priority from patent application serial number 2022-004778, filed January 17, 2022, the entire contents of which are incorporated herein by reference. [Background technology]
[0003] In recent years, a control method called model predictive control (MPC) has been attracting attention for controlling various control devices. By using model predictive control, the performance of the control device can be improved.
[0004] Model predictive control is a control method that performs optimized control by solving the control input that minimizes the performance index, which indicates the control objective. The control input is the input value to the controlled object. There are various methods for solving the control input, including analytically solving the performance index formula, gradient methods, and search-based methods.
[0005] However, analytically solving the mathematical expression for the evaluation function has the problem that the control target is limited, and gradient methods can fall into local solutions, which places limitations on the evaluation function.
[0006] As a search method, a method for increasing speed by parallel processing of multiple processor elements for multiple solution candidates is known, as shown in Non-Patent Document 1 below. [Prior art documents] [Non-patent literature]
[0007] [Non-Patent Document 1] Teppei Hirotsu and Atsushi Yokoyama, "Vehicle Motion Control Algorithm for Autonomous Driving in Urban Areas and its Implementation on Embedded ECUs," IEICE Technical Report, IEICE Techniques 115(518), pp.1-5, March 24, 2016 Summary of the Invention
[0008] The method of Non-Patent Document 1 is advantageous in that it eliminates limitations on the evaluation function and can solve problems associated with methods such as analytically solving evaluation functions and gradient methods. On the other hand, in search-based methods, when searching for solution candidates, an initial solution, which is the initial value of the solution, must be provided. However, since it is unknown where the initial solution is, a random value within the range of the upper and lower limits of the input value to be input to the control target is provided as the initial solution. However, providing a random value as the initial solution increases the number of searches for solution candidates, which increases the calculation time.
[0009] In view of the above problems, the present inventors have invented an optimum solution calculation device that reduces the number of searches and shortens the calculation time compared to conventional devices.
[0010] The present disclosure employs the following technical solutions to solve the above problems. The reference symbols in parentheses in the claims and in this section are merely examples showing the correspondence with specific solutions described in the embodiments below as one aspect, and do not limit the technical scope of the present disclosure.
[0011] The optimal solution calculation device according to the present disclosure is an optimal solution calculation device (1) that repeatedly calculates an optimal solution that minimizes an evaluation function having time-varying parameters at regular intervals, and includes an initial solution generation unit (11) that generates an initial solution that serves as an initial value for a search process that searches for an optimal solution, and an optimal solution search unit (12) that calculates the optimal solution by the search process using the initial solution, and the initial solution generation unit (11) generates the initial solution using an optimal solution that was previously calculated by the optimal solution search unit (12).
[0012] Rather than assigning an initial solution using a random number between the upper and lower limits of the evaluation function as in the past, the number of searches can be reduced and the calculation time can be shortened by generating an initial solution using the previous optimal solution, as in the present disclosure.
[0013] In one embodiment of the optimal solution calculation device, the optimal solution search unit (12) assigns a solution candidate to each processor element, and executes a process of repeating the search process using the assigned solution candidate a predetermined number of times in parallel for each processor element.
[0014] By performing parallel processing in this way, the calculation time can be reduced.
[0015] In one embodiment of the optimal solution calculation device, the search process crosses the solution candidates, calculates an evaluation function of the crossed solution candidates, and executes a process of updating the solution candidates if the calculated value of the evaluation function improves.
[0016] There are various methods for the search process, but the method disclosed in this disclosure can be used.
[0017] In one embodiment of the optimum solution calculation device, the optimum solution search unit (12) determines the number of iterations of the search process using the calculated value of the evaluation function of the solution candidate.
[0018] In one embodiment of the optimal solution calculation device, the optimal solution search unit (12) determines the number of iterations of the search process for a solution candidate having a small calculated value of the evaluation function to be greater than the number of iterations of the search process for a solution candidate having a large calculated value of the evaluation function.
[0019] In this way, by increasing the number of calculations of the evaluation function for solution candidates with good calculation values of the evaluation function, the convergence speed can be increased, the number of searches can be reduced, and the calculation time can be shortened. In an algorithm evaluation by the applicant, it was found that the calculation time could be reduced by 20 to 30 percent compared to when the evaluation function was calculated evenly for each solution candidate.
[0020] A control system may also be provided that includes any of the above-described optimum solution calculation devices.
[0021] By using the optimal solution calculation device of the present disclosure, it is possible to reduce the number of searches and shorten the calculation time compared to conventional methods in a method for exploratory solving an optimization problem of an evaluation function in model predictive control. [Brief explanation of the drawings]
[0022] [Figure 1] 1 is a block diagram schematically illustrating an example of the configuration of an optimal solution calculation device according to an embodiment of the present invention. [Figure 2] FIG. 2 is a diagram schematically illustrating an example of a graph of control input X and output Y in model predictive control. [Figure 3] FIG. 10 is a diagram schematically illustrating processing in an initial solution generating unit according to the present embodiment. [Figure 4] 1 is a block diagram schematically illustrating an example of a control device equipped with an optimal solution calculation device according to the present embodiment. [Figure 5] 3 is a flowchart showing an example of the overall processing process of the optimal solution calculation device according to the present embodiment. [Figure 6] 10 is a flowchart showing an example of a processing process of a search process of the optimal solution calculation device of the present embodiment. [Figure 7] 10 is a flowchart showing an example of a parallel processing process in the search process of the optimal solution calculation device of the present embodiment. [Figure 8] 10 is a flowchart showing an example of another processing process of parallel processing in the search processing of the optimal solution calculation device of the present embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0023] An example of the configuration of an optimal solution calculation device 1 of this embodiment is shown in the block diagram of Figure 1. The optimal solution calculation device 1 of this embodiment is a device that repeatedly calculates an optimal solution that minimizes an evaluation function having time-varying parameters at regular intervals. The optimal solution calculation device 1 has an initial solution generation unit 11 and an optimal solution search unit 12.
[0024] The initial solution generation unit 11 generates an initial solution that will be the initial value used in the search process for an optimal solution by the optimal solution search unit 12 (described later) by using an optimal solution from the previous cycle, preferably the optimal solution from the previous cycle. That is, it receives an input of an optimal solution calculated by the optimal solution search unit 12 (described later), and uses the input optimal solution to generate an initial solution that will be the initial value used in the search process for an optimal solution this time.
[0025] The optimal solution search unit 12 receives the initial solution generated by the initial solution generation unit 11 as an input as the initial value of an evaluation function, calculates an optimal solution that minimizes the evaluation function, and outputs it. Various methods can be used to calculate the optimal solution in the optimal solution search unit 12, for example, the ABC algorithm (Artificial Bee Colony Optimization Algorithm). Other methods that can be used include the GA algorithm (Genetic Algorithm) and the PSO algorithm (Particle Swam Optimization Algorithm).
[0026] The optimal solution search unit 12 passes the calculated optimal solution to the initial solution generation unit 11 as an input value for the initial solution in the next cycle, causing the initial solution generation unit 11 to generate an initial solution in the next cycle.
[0027] The processing of the optimal solution calculation device 1 of this embodiment used in model predictive control will be described in more detail. Note that an evaluation function indicating a control objective in model predictive control is denoted by H, a control input that minimizes the evaluation function H is denoted by X, and an output is denoted by Y. FIG. 2 shows an example of a graph of the control input X and output Y in model predictive control. The control input X is an input value to a controlled object 3 such as a motor, and the output Y is an output value from the controlled object 3. FIG. 2(a) is a prediction graph showing the relationship between the output Y, the output value Yref as a target value, and time T, and is a graph when the prediction interval is 16 cycles. The number of cycles in the prediction interval can be changed depending on the controlled object 3 and may be any number. FIG. 2(b) is a graph showing the relationship between the control input X and time T.
[0028] Here, as an example of prediction of the output Y, when the output Y is predicted using a difference equation, it can be calculated using the following Equation 1. (Number 1) TIFF0007772097000001.tif1183
[0029] As an example, in the case of servo control in which the output Y is made to follow the target value Yref, the evaluation function H is expressed as the sum of the squared errors with respect to the target value in the prediction interval (t to t + 15Δt), and can be calculated using the following equation 2. (Number 2) TIFF0007772097000002.tif2032TIFF0007772097000003.tif845
[0030] When the optimal solution calculated by the optimal solution search unit 12 at time T=t is Xopt(t)={Xopt_0(t), Xopt_1(t), . . . , Xopt_15(t)}, the optimal solution Xopt(t+Δt) for the next time step T=t+Δt is predicted as the following equation 3. (Number 3) TIFF0007772097000004.tif771
[0031] Therefore, the initial solution generating unit 11 calculates the initial value Xinit(t+Δt)={Xinit_0(t+Δt), Xinit_1(t+Δt), . . . , Xinit_15(t+Δt)} for the optimum solution search using the following equation 4. (Number 4) TIFF0007772097000005.tif19170
[0032] The optimal solution search unit 12 uses the initial solution Xinit(t+Δt) calculated by the initial solution generation unit 11 to calculate Xopt(t+Δt)={Xopt_0(t+Δt), Xopt_1(t+Δt), ···, Xopt_15(t+Δt)} that minimizes the evaluation function H, and outputs the first element Xopt_0(t+Δt) as the output value.
[0033] The initial solution generating unit 11 and the optimum solution searching unit 12 iteratively execute the above-mentioned processes while shifting the prediction horizon by Δt every control period Δt.
[0034] The above process is shown diagrammatically in Figure 3.
[0035] In the initial processing in which the optimal solution search unit 12 does not have an optimal solution, the initial solution generation unit 11 may generate, as the initial solution, a random value within the range between the upper and lower limit values of the calculated value of the evaluation function to be input to the control target 3, as in the conventional case.
[0036] Next, a description will be given of processing in a control system using the optimal solution calculation device 1 of this embodiment. In the following, a case where the control system controls the rotation speed of a motor will be described. A block diagram of the overall configuration of the control system in this case is shown in FIG.
[0037] 4, the control system has a controller 2 and a motor that is a controlled object 3, and the optimal solution calculation device 1 of this embodiment is provided in the controller 2. The controller 2 controls the controlled object 3, and has a target value generation unit 21, the optimal solution calculation device 1, a PWM 22, a driver 23, and an ACD 24.
[0038] The target value generating unit 21 generates a target value Yref(t) for the output value of the motor, which is the controlled object 3. In the case of controlling the rotation speed of the motor, the target value Yref(t) is the target rotation speed of the motor.
[0039] The optimum solution calculation device 1 has an initial solution generation unit 11 and an optimum solution search unit 12, similar to the above.
[0040] The initial solution generating unit 11 calculates an initial value Xinit(t) using the previous optimal solution in the optimal solution searching unit 12. <j>Generate the initial value Xinit(t) <j>is passed to the optimum solution search unit 12. j is a solution candidate index used in the processing of the optimum solution search unit 12, which will be described later.
[0041] The optimal solution search unit 12 calculates the initial value Xinit(t) generated by the initial solution generation unit 11. <j>is input as the initial value of the evaluation function H(X), and a process of searching for an optimal solution is executed. <j>In addition, time-varying parameters Param(t)={Yref(t), Y_0(t)} are input to the evaluation function H(X) to execute a process of searching for an optimal solution. The optimal solution search unit 12 calculates the optimal solution Xopt(t) and converts the optimal solution Xopt(t) into the initial value Xinit(t+Δt) in the next control period (t+Δt). <j>The optimal solution Xopt(t) is passed to the initial solution generating unit 11 as an input value for generating the optimal solution Xopt(t). The optimal solution searching unit 12 outputs Xopt_0(t), which is the first element of the optimal solution Xopt(t), as an output value.
[0042] The optimal solution search unit 12 periodically solves an optimization problem in model predictive control by searching for a plurality of solution candidates X <j>By performing parallel processing of the search using multiple processor elements, it is possible to speed up the processing. Publicly known techniques can be used for parallel processing. The processing in this case is shown in the flowcharts of Figures 5 to 7. Although the parallel processing is shown to be performed by four processor elements PE0 to PE3, the number of processor elements is not limited to four and can be any number equal to or greater than two. Furthermore, the publicly known technology shown in Non-Patent Document 1 can also be used for the parallel processing in the optimal solution search unit 12.
[0043] The optimum solution search unit 12 calculates Xopt(t) that minimizes the evaluation function H(X). When the evaluation function H(X) is nonlinear, it is common to calculate a solution using an exploratory method. Therefore, the optimum solution search unit 12 also uses an exploratory method in the following explanation. In the exploratory method, m solution candidates X <j>The evaluation function value H(X_j) (j=0, 1, 2, . . . , m-1) is calculated based on (j=0, 1, 2, . . . , m-1), and a process of searching for a solution is performed.
[0044] The optimal solution search unit 12 searches for the initial solution Xinit(t) generated by the initial solution generation unit 11. <j>Let X be the candidate solution. <j>(S100). Then, the search loop index iter is initialized (variable iter=0) (S110). The search loop index iter is the number of times the search process LoopBody has been repeated, and a predetermined number Maxcount is set as its maximum value.
[0045] Then, the optimum solution search unit 12 executes the search process LoopBody (S120).
[0046] The search process LoopBody first performs a cross-breeding process of the solution candidates (S200). For example, the cross-breeding process of the solution candidates is performed by randomly determining the index l1 of the solution candidates to be cross-breeded and the element l2 to be cross-breeded. If you do not crossbreed the solutions, X*_i <j>=X_i <j>where i≠l2, j≠l1 Calculate When crossbreeding solutions, X*_l2 <j> =X_l2 <j> +(X_l2 <l1> -X_l2 <j>) × rand where 0≦rand≦1 Calculate the following.
[0047] The process of crossbreeding solution candidates is not limited to the above, and other methods can also be used.
[0048] The evaluation function H is calculated using the solution candidates crossed in S200 (S210). For example, when the solutions are crossed, the evaluation function H(X*_l2 <j>) is calculated.
[0049] The value of the evaluation function H of the hybridized solution candidates is H(X* <j>) is the value H(X <j>), it is considered an improvement and the solution candidate after breeding is X* <j>Using this, the solution candidate X <j>is updated (S220), and the solution candidate index j is incremented (S230).
[0050] The processes from S200 to S230 are repeated until the process of crossbreeding and updating of all the solution candidates is completed (S240).
[0051] When the crossbreeding and update processes for all solution candidates have been performed, the process of the search process LoobBody is terminated and the search loop index iter is incremented (S130).
[0052] Then, the processing of S120 and S130 is repeated until the search processing LoopBody reaches a predetermined number of times Maxcount (S140).
[0053] 7, when executing the search process LoopBody, the optimal solution search unit 12 executes parallel processing using a plurality of processor elements PE0 to PE3. The processor elements PE0 to PE3 execute the solution candidate X <j>For example, the processor element PE0 is assigned four candidate solutions X <0> ~X <3> , the processor element PE1 has a solution candidate X <4> ~X <7> , the processor element PE2 has a solution candidate X <8> ~X <11> , the processor element PE3 has a solution candidate X <12> ~X <15> and execute the search process LoopBody for each.
[0054] By performing the above-described processing, the optimal solution search unit 12 calculates the optimal solution Xopt(t) that minimizes the evaluation function H(X), and outputs its first element, Xopt_0(t), as the output value of the optimal solution search unit 12.
[0055] The PWM 22 (Pulse Width Modulation) is a control circuit that converts the value Xopt_0(t) output by the optimum solution search unit 12 into a driver switching pulse.
[0056] The driver 23 converts the driver switching pulse converted by the PWM 22 into a current, inputs a control input X, and drives the motor, which is the controlled object 3.
[0057] The ACD 24 is a control circuit that converts the rotation speed of the motor, which is the output Y from the motor that is the controlled object 3, into a digital signal, and outputs an output value Y_0(t). The ACD 24 feeds back the output value Y_0(t) as an input value of the evaluation function H in the optimal solution calculation device 1.
[0058] The control system has the above-described configuration and controls the motor, which is the control target 3.
[0059] The processing process in the control system will be described. First, the control system passes the target value Yref(t) generated by the target value generation unit 21 to the optimal solution search unit 12 of the optimal solution calculation device 1. Then, the initial solution generation unit 11 uses the previous, preferably the previous, optimal solution Xopt(t-1) to generate an initial solution Xinit(t) to be used in the processing of the optimal solution search unit 12. <j>Generate.
[0060] The optimal solution search unit 12 then calculates the initial solution Xinit(t) generated by the initial solution generation unit 11. <j>Using the target value Yref(t) generated by the target value generation unit 21 and the previous output Y_0(t-1), the unit 12 substitutes the target value Yref(t) and the previous output Y_0(t-1) into the evaluation function H, and executes a search process for an optimal solution Xopt(t) that minimizes the evaluation function H. The unit 12 then outputs the first element Xopt_0(t) of the calculated optimal solution Xopt(t) as an output value. The optimal solution search unit 12 also passes the optimal solution Xopt(t) to the initial solution generation unit 11 so that the initial solution generation unit 11 can generate the next initial solution.
[0061] Xopt_0(t) output by the optimum solution calculation device 1 is converted into a driver switching pulse by the PWM 22, which is then input as control input X by the driver 23 to the motor, which is the controlled object 3, to drive it. Then, the output Y from the motor, which is the controlled object 3, is converted into a digital value by the ACD 24 to output the output value Y_0(t), which is input as the next input value to the optimum solution search unit 12 in the optimum solution calculation device 1.
[0062] By repeating the above process, the motor, which is the control target 3, can be controlled.
[0063] The optimal solution calculation device 1 of this embodiment uses each optimal solution in the prediction interval calculated at time t to calculate an initial value when calculating each optimal solution in the prediction interval at time t+Δt (see FIG. 3), thereby making it possible to reduce the calculation time by using an appropriate initial value.
[0064] The optimum solution search unit 12 may execute processing to improve the convergence speed when performing parallel processing in the processor elements PE. The processing in this case is schematically shown in FIG.
[0065] In the parallel processing of FIG. 7, the search process Loop Body for all solution candidates is processed equally in the processing for the solution candidates in each of the processor elements PE0 to PE3. However, in each of the processor elements PE0 to PE3, the solution candidate X is processed according to the value of the evaluation function H. <j>The ranking may be performed by ranking the solution candidates X, and the top-ranked solution candidates may be configured to execute more search processes LoopBody than the bottom-ranked solution candidates. <j>One method is to sort in ascending order of the value of the evaluation function H for each item, but ranking may be performed by other methods.
[0066] For example, in the processor element PE0, the solution candidate X <0> ~X <3> The value of the evaluation function H for H(X <0> )~H(X <3> ) in ascending order, the top candidate solutions are ranked in order of X <0> , X <1> , X <2> , X <3> In this case, the number of times the search process LoopBody is executed is set so that the number of top solution candidates is increased and the number of bottom solution candidates is decreased. As shown in Figure 8, the first place X <0> 4 times, 2nd place X <1> 2 times, 3rd place X <2> Once, 4th place X <3> The search process LoopBody may be executed once for each of the solution candidates ranked in the top ranking. In this case, it is preferable to execute the search process LoopBody without excluding the solution candidates ranked in the bottom ranking. With this configuration, the optimal solution can be found in a short time using the solution candidates ranked in the top ranking, and by searching the solution candidates ranked in the bottom ranking, the risk of falling into a local solution can be reduced. In this way, the limited resources of the processor element PE can be allocated efficiently. Note that the number of times the search process LoopBody is executed is not limited to the above, and it is sufficient that the top solution candidates are executed more often than the bottom solution candidates.
[0067] In the above description, the controlled object 3 is the rotation speed of a motor, but the controlled object 3 is not limited to the rotation speed of a motor and can be applied to various controlled objects 3.
[0068] In this embodiment, each value and evaluation function may be a vector in addition to a scalar.
[0069] The optimal solution calculation device of the present disclosure is not limited to the scope described in this specification, and can be arbitrarily modified within the scope of its technical concept. The order of each process can also be arbitrarily modified within the scope of its technical concept. [Industrial Applicability]
[0070] By using the optimal solution calculation device of the present disclosure, it is possible to reduce the number of searches and shorten the calculation time compared to conventional methods in a method for periodically solving an optimization problem of an evaluation function in model predictive control.< / j> < / j> < / j> < / j> < / j> < / j> < / j> < / j> < / j> < / j> < / j> < / l1> < / j> < / j> < / j> < / j> < / j> < / j> < / j> < / j> < / j> < / j> < / j> < / j> < / j>
Claims
1. An optimal solution calculation device that repeatedly calculates an optimal solution that minimizes an evaluation function having time-varying parameters at regular intervals, an initial solution generation unit that generates an initial solution that serves as an initial value for a search process that searches for an optimal solution; an optimal solution search unit that calculates the optimal solution by the search process using the initial solution, The initial solution generating unit generating the initial solution using a previous optimal solution calculated by the optimal solution search unit; The optimal solution search unit Assigning solution candidates to each processor element repeating the search process using the assigned solution candidates a predetermined number of times in parallel for each of the processor elements; determining the number of iterations of the search process using a calculated value of an evaluation function of the solution candidate; Optimal solution calculation device.
2. The search process includes: crossbreeding the solution candidates, calculating an evaluation function of the crossbreed solution candidates, and executing a process of updating the solution candidates when the calculated value of the evaluation function is improved; 2. The optimum solution calculation device according to claim 1.
3. The optimal solution search unit determining a number of iterations of the search process for a solution candidate having a small calculated value of the evaluation function to be greater than a number of iterations of the search process for a solution candidate having a large calculated value of the evaluation function; 3. The optimum solution calculation device according to claim 1 or 2.
4. A control system comprising the optimal solution calculation device according to claim 1.
Citation Information
Patent Citations
Method and apparatus for parallel searching of optimization problem
JP2002358201A
Prediction control device
JP2020008889A