# Patent

## Title
Matrix generation technique and plant control technique

## Abstract

In this disclosure, equations to be solved in the model predictive control are transformed by using an off-line algebraic simplification method into a matrix operational expression representing a product of a coefficient matrix and a vector regarding solution inputs within a control horizon is equal to a function vector regarding target values of output states and the output states. The size of the coefficient matrix is reduced compared with the conventional matrix. Then, the matrix operational expression is solved in an online plant control apparatus with present output states and present target values of the output stats of a plant to be controlled, by the direct method, to output the solution to the plant.

## Background
CROSS-REFERENCE TO RELATED APPLICATIONS
This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2011-043163, filed on Feb. 28, 2011, and the Japanese Patent Application No. 2011-229141, filed on Oct. 18, 2011, and the entire contents of which are incorporated herein by reference.
FIELD
This technique relates to a control technique of a plant.
BACKGROUND
The model predictive control is a control method for determining inputs to a control target at each step by optimizing responses up to a definite future time. This method is noteworthy as a control technique that enables the follow-up control to a non-stationary target value, and has a merit that constraint conditions such as saturation can be treated.
Conventionally, the study was mainly made for the linear system, however, recently, the study is actively made for the application to the non-linear system. At present, there are a lot of application examples that the non-linear problem is simplified to the linear problem. However, it is not easy to actually apply this technique to a case that high-speed changes occur even in the linear system, and it is desired that the calculation period is shortened.
Methods for processing a problem for the model predictive control in real time, which also includes a control target having a non-linear plant model are largely classified to two categories. One is a method that the state feedback control rule is represented by a function of a state x(k) of the plant off-line, and only substitution calculation is carried out online. On the other hand, the other method is a method that all calculation is carried out online.
As for the calculation carried out off-line, a method is considered that spaces of the present states x(k) of the plant are classified by a certain method such as return to Hamilton-Jacobi-Bellman method, and feedback control rules are given to the respective space regions. However, according to such a method, too many space regions may be generated. Moreover, if the number of dimensions of the states increases, the number of divisions rapidly increases.
On the other hand, as for the method for carrying out the calculation online, various numerical analysis method of optimization problems, such as gradient method, interior point method or the like, can be applied. In addition, a method for efficiently solving the problem by gasping the dual problem with respect to Lagrange multiplier and an algorithm that a structure such as Hessian matrix is used to improve the efficiency are advocated. However, when the normal iterative calculation is used as a method of the numerical calculation, the calculation is iterated until the solution is settled. Therefore, the calculation amount becomes huge.
Then, a method is considered to reduce the iteration calculations by the continuous deformation analysis using the time as a parameter. Even in such a case, when the change of the states x(k) of the plant is large, the number of iterations becomes large. Therefore, any step may not be completed within a desired period.
In addition, as for the numerical analysis method, a lot of approximations are used for the expression in the optimization problem in order to efficiently obtain the solution. Therefore, a large gap with the value to be intrinsically obtained may occur.
Namely, there is no technique for calculating the inputs for the plant at high speed in the model predictive control.
SUMMARY
A matrix generation method relating to a first aspect of this technique includes: converting, by using a computer, state equations, which represent a relationship between solution output states and solution inputs of a plant to be controlled, and initial condition expressions of output states into first linear expressions representing the solution output states at each step by the output states and the solution inputs; converting, by using the computer, first conditional expressions representing a relationship between a first Lagrange multiplier and a partial differentiation of a Hamiltonian with respect to the output states, and relational expressions representing a relationship between a value of the first Lagrange multiplier after the predictive horizon and a function regarding differences between target values of the output states and the solution output states after the predictive horizon into second linear expressions representing the first Lagrange multiplier at each step by the target values and the solution output states, wherein the Hamiltonian relates to a sum of a first function regarding a weighting addition of a square of an error between the target values of the output states and the output states and a square of inputs, a product of the first Lagrange multiplier and the state equations, and a second function regarding a second Lagrange multiplier and constraint conditions; converting, by using the computer, the first linear expressions and the second linear expressions into third linear expressions representing the first Lagrange multiplier at each step by the target values, the solution inputs and the output states, by substituting the first linear expressions into the second linear expressions; converting, by using the computer, the third linear expressions and second conditional expressions that are partial differentiations of the Hamiltonian with respect to the inputs and represents a relationship among the first Lagrange multiplier, the second Lagrange multiplier and the solution inputs, into fourth linear expressions representing a relationship at each step among the target values, the solution inputs and the output states; and transforming, by using the computer, the fourth linear expressions into a matrix operational expression representing a product of a coefficient matrix and a vector regarding the solution inputs within the control horizon is equal to a function vector regarding the target values and the output states to obtain the coefficient matrix and the function vector.
A matrix generation method relating to a second aspect of this technique includes: converting, by using a computer, state equations, which represent a relationship between solution output states and solution inputs of a plant to be controlled, and initial condition expressions of output states into first linear expressions representing the solution output states at each step by the output states and the solution inputs; converting, by using the computer, conditional expressions representing a relationship between a first Lagrange multiplier and a partial differentiation of a Hamiltonian with respect to the output states, and relational expressions representing a relationship between a value of the first Lagrange multiplier after a predictive horizon and a function regarding differences between target values of the output states and the solution output states after the predictive horizon into second linear expressions representing the first Lagrange multiplier at each step by the target values and the solution output states, wherein the Hamiltonian relates to a sum of a first function regarding a weighting addition of a square of an error between the target values of the output states and the output states and a square of inputs, a product of the first Lagrange multiplier and the state equations, and a second function regarding a second Lagrange multiplier and constraint conditions; converting, by using the computer, the first linear expressions and the second linear expressions into third linear expressions representing the first Lagrange multiplier at each step by the target values, the solution inputs and the output states, by substituting the first linear expressions into the second linear expressions; converting, by using the computer, the first linear expressions, the third linear expressions, fourth linear expressions and fifth linear expressions into sixth linear expressions representing a relationship at each step among the target values, the solution inputs and the output states, by substituting the third linear expressions, the fourth linear expressions and the fifth linear expressions into the first linear expressions, wherein the fourth linear expressions are obtained by approximating, by the solution inputs, the second Lagrange multipliers associated with lower limit values of the inputs included in the constraint conditions, and the fifth linear expressions are obtained by approximating, by the solution inputs, the second Lagrange multipliers associated with upper limit values of the inputs included in the constraint conditions; and transforming, by using the computer, the sixth linear expressions into a matrix operational expression representing a product of a coefficient matrix and a vector regarding the solution inputs within a control horizon is equal to a function vector regarding the target values and the output states to obtain the coefficient matrix and the function vector.
A plant control method relating to a third aspect of this technique includes: obtaining, by using a processor, present output states and present target values of output states of a plant to be controlled; calculating, by using the processor, solution inputs within a control horizon by substituting the present output states and the present target values into the linear equations and solving linear equations after the substituting, wherein the linear equations are represented in a form that a product of a coefficient matrix and a vector regarding solution inputs within the control horizon is equal to a function vector regarding target values of the output states and the output states, and the linear equations are equivalent to expressions including (a) state equations, which represent a relationship between solution output states and solution inputs of the plant to be controlled, (b) initial condition expressions of the output states, (c) first conditional expressions representing a relationship between a first Lagrange multiplier and a partial differentiation of a Hamiltonian with respect to the output state, (d) relational expressions representing a relationship between a value of the first Lagrange multiplier after a predictive horizon and a function regarding differences between the target values of the output states and the solution output states after the predictive horizon, and (e) second conditional expressions that are partial differentiations of the Hamiltonian with respect to the inputs and represents a relationship among the first Lagrange multiplier, the second Lagrange multiplier and the solution inputs, wherein the Hamiltonian relates to a sum of a first function regarding a weighting addition of a square of an error between the target values of the output states and the output states and a square of inputs, a product of the first Lagrange multiplier and the state equations, and a second function regarding a second Lagrange multiplier and constraint conditions; and extracting, by using the processor, solution inputs for a first time from among the solution inputs within the control horizon.
A matrix generation method relating to a fourth aspect of this technique includes: converting, by using a computer, state equations, which represent a relationship between solution output states and solution inputs of a plant to be controlled, and initial condition expressions of output states into first linear expressions representing the solution output states at each step by the output states and the solution inputs; generating, by using the computer, second linear expressions by substituting the first linear expressions and coefficient values of the solution inputs in the first linear expressions into third linear expressions regarding the solution output states, wherein the third linear expressions are obtained by partially differentiating a first term and a second term in a performance index, with respect to each of the solution inputs from a solution input at an initial time to a solution input at a time after (a control horizon—one sampling time) elapsed, and the first term in the performance index is a term for adding a square of an error between a target value of the output state and the solution output state, from a time after one sampling time elapsed since an initial time to a time after (a predictive horizon—one sampling time) elapsed, while weighting by a first weight matrix, and the second term in the performance index is a term for adding a square of an error between the target value of the output state and the solution output state after the predictive horizon while weighting by a second weight matrix, and the performance index includes the first term, the second term, a third term for adding a square of the solution inputs from the initial time to a time after (the predictive horizon—one sampling time) elapsed while weighting by a third weight matrix, and a fourth term for constraint conditions; generating, by using the computer, a first matrix by extracting coefficient values of terms of the solution inputs in the second linear expressions; generating, by using the computer, a vector by extracting terms other than the terms of the solution inputs in the second linear expressions; and generating, by using the computer, a third matrix by adding the first matrix and a second matrix having matrix elements that are obtained by partially differentiating the third term in the performance index with respect to each of the solution inputs from the solution input at the initial time to the solution input at the time after (the control horizon—one sampling time) elapsed, and are determined by element values of the third weight matrix, a value of the control horizon and a value of the predictive horizon.
A matrix generation method relating to a fifth aspect of this technique includes: converting, by using a computer, state equations, which represent a relationship between solution output states and solution inputs of a plant to be controlled, and initial condition expressions of output states into first linear expressions representing the solution output states at each step by the output states and the solution inputs; generating, by using the computer, for each of a plurality of expressions, second linear expressions by substituting the first linear expressions and coefficient values of the solution inputs in the first linear expressions into third linear expressions regarding the solution output states, wherein the plurality of expressions are obtained by classifying a first term and a second term in a performance index for each element of a first weight matrix and a second weight matrix, which is multiplied as a coefficient, and by removing each the element from a corresponding classification result, and the third linear expressions are obtained by partially differentiating each of the plurality of expressions, with respect to each of the solution inputs from a solution input at an initial time to a solution input at a time after (a control horizon—one sampling time) elapsed, and the first term in the performance index is a term for adding a square of an error between a target value of the output state and the solution output state from a time after one sampling time elapsed since an initial time to a time after (a predictive horizon—one sampling time) elapsed, while weighting by the first weight matrix, and the second term in the performance index is a term for adding a square of an error between the target value of the output state and the solution output state after the predictive horizon while weighting by the second weight matrix, and the performance index includes the first term, the second term, a third term for adding a square of the solution inputs from the initial time to a time after (the predictive horizon—one sampling time) elapsed while weighting by a third weight matrix, and a fourth term for constraint conditions; generating, by using the computer, for each of the plurality of expressions, a matrix by extracting, for each of the plurality of expressions, coefficients of the terms of the solution inputs in the second linear expressions; and generating, by using the computer, for each of the plurality of expressions, a vector by extracting, for each of the plurality of expressions, terms other than the terms of the solution inputs in the second linear expressions.
The object and advantages of the embodiment will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the embodiment, as claimed.



BRIEF DESCRIPTION OF DRAWINGS
FIG. 1 is a schematic diagram of an engine that is an example of a plant;
FIG. 2 is a functional block diagram of a first off-line matrix generation apparatus;
FIG. 3 is a diagram depicting a processing flow of a first off-line matrix generation processing;
FIG. 4 is a diagram to explain an engine control apparatus of the engine that is an example of the plant;
FIG. 5 is a simplified block diagram of a first engine control apparatus;
FIG. 6 is a diagram depicting a processing flow of a first model predictive controller;
FIG. 7 is a functional block diagram of a second off-line matrix generation apparatus;
FIG. 8 is a diagram depicting a processing of a second off-line matrix generation processing;
FIG. 9 is a simplified block diagram of a second engine control apparatus;
FIG. 10 is a diagram depicting a processing flow of a second model predictive controller;
FIG. 11 is a diagram depicting a state of the simultaneous equations before the off-line matrix generation processing;
FIG. 12 is a diagram depicting a state of the simultaneous equations after the off-line matrix generation processing;
FIG. 13 is a functional block diagram of a third off-line matrix generation apparatus;
FIG. 14 is a diagram depicting a processing flow of a third off-line matrix generation processing;
FIG. 15 is a schematically diagram to explain the generation of a matrix M1 and vector b;
FIG. 16 is a functional block diagram of a first off-line matrix generation apparatus relating to a second embodiment;
FIG. 17 is a diagram to depict a processing flow of a first off-line generation processing relating to the second embodiment;
FIG. 18 is a functional block diagram of a second off-line matrix generation apparatus relating to the second embodiment;
FIG. 19 is a diagram depicting a processing flow of a second off-line matrix generation processing relating to the second embodiment;
FIG. 20 is a functional block diagram of a first off-line matrix generation apparatus relating to a third embodiment;
FIG. 21 is a diagram depicting a processing flow of a first off-line matrix generation apparatus relating to the third embodiment;
FIG. 22 is a functional block diagram of a second off-line matrix generation apparatus relating to the third embodiment;
FIG. 23 is a diagram depicting a processing of a second off-line matrix generation processing relating to the third embodiment;
FIG. 24 is a functional block diagram of a computer;
FIG. 25 is a functional block diagram of an engine control apparatus; and
FIG. 26 is a functional block diagram of a plant control apparatus.



DESCRIPTION OF EMBODIMENTS
[Embodiment 1]
In this embodiment, a model predictive control for a linear system (hereinafter, called a linear model predictive control) is treated.
First, the formulation of this linear model predictive control will be explained. However, as for the details, please refer to Toshiyuki Ohtsuka, “A continuation/GMRES method for fast computation of nonlinear receding horizon control”, Automatica, 40(4), 563-574, April 2004.
The control target having m inputs and n outputs is represented by a following state equation:




  
    
      
        
          
            x
            .
          
          ⁡
          
            (
            t
            )
          
        
        =
        
          
            f
            ⁡
            
              (
              
                
                  x
                  ⁡
                  
                    (
                    t
                    )
                  
                
                ,
                
                  u
                  ⁡
                  
                    (
                    t
                    )
                  
                
              
              )
            
          
          =
          
            
              Ax
              ⁡
              
                (
                t
                )
              
            
            +
            
              Bu
              ⁡
              
                (
                t
                )
              
            
          
        
      
    
    
      
        (
        1
        )
      
    
  




Here, t represents the time, u(k)εRm represents a control input vector to the plant, and x(k)εRn represents a state vector of the plant. In addition, A represents an n*n matrix, and B represents an n*m matrix. The control input function is piecewise continuous for the time t.
In addition, a following constraint is given to the inputs.

umin≦u≦umax  (2)

In order to represent the inequational constraints as the equational constraints, dummy variables are introduced to obtain the following equational constraints. However, these are represented by C(u)=0.




  
    
      
        {
        
          
            
              
                
                  u
                  -
                  
                    u
                    max
                  
                  +
                  
                    u
                    α
                    2
                  
                
                =
                0
              
            
          
          
            
              
                
                  
                    u
                    min
                  
                  -
                  u
                  +
                  
                    u
                    β
                    2
                  
                
                =
                0
              
            
          
        
        }
      
    
    
      
        (
        3
        )
      
    
  




Under such a prerequisite, it is assumed that the present time is t=k, the evaluation section is a section up to the time t=k+T, and the target value of the state x is Xref. Then, a following performance index V is considered.

V=φ(T)+∫0TL(t)dt 

φ(T)=1⁄2((Xref−x(k+T))TS(Xref−x(k+T)))

L(t)=1⁄2((Xref−x(k+t))TQ(Xref−x(k+t))+u(k+t)TRu(k+t))− pTuα−pTuβ

 p=( p1, p2, . . . , pm)

p=(p1,p2, . . . ,pm)

Here, S, Q and R are respectively n*n, n*n and m*m weight matrices. Moreover, because the dummy variables uα and uβ appear in the second-order terms as expressed in the expression (3), the optimal solution can be adopted even if the sign is negative or positive. Therefore, in order to reflect which of positive or negative solution is preferable, it is assumed that ptopbar (p with a bar placed on p) and punderbar (p with a bar placed under p) are minute positive value, and a term “−pTtopbaruα−pTunderbaruβ” is added to the integrand of the performance index. Solving the input u* that minimizes the performance index V is a core problem of the linear model predictive control. Incidentally, ptopbar corresponds to the maximum value of ui, and punderbar corresponds to the minimal value of ui.
Lagrange multipliers are represented by λ and μ, and Hamiltonian H is defined as follows:

H=L+λT∫+μTC  (4)

The requirement that the optimal control minimizing the performance index V and the path at that time should satisfy is as follows:




  
    
      
        
          
            ∂
            H
          
          
            ∂
            u
          
        
        =
        
          
            
              ∂
              H
            
            
              ∂
              
                u
                a
              
            
          
          =
          
            
              
                ∂
                H
              
              
                ∂
                
                  u
                  β
                
              
            
            =
            0
          
        
      
    
    
      
        (
        5
        )
      
    
  
  
    
      
        
          λ
          .
        
        =
        
          -
          
            
              ∂
              H
            
            
              ∂
              x
            
          
        
      
    
    
      
        (
        6
        )
      
    
  
  
    
      
        
          λ
          ⁡
          
            (
            
              k
              +
              T
            
            )
          
        
        =
        
          φ
          ⁡
          
            (
            T
            )
          
        
      
    
    
      
        (
        7
        )
      
    
  




Therefore, solving u* minimizing V returns to solving u* satisfying the expressions (5) to (7).
Although the formulation was carried out in the continuous system up to here, a problem obtained by dividing the evaluation section and carrying out the discrete approximation is solved at each step. Typically, the evaluation section of the optimal control problem is divided by using the input cycle of the plant as the step size to carry out the discrete approximation. In the following, the problem to be solved at each step will be explained.
The cycle Δτ of the input is the width of the division, and T=HpΔτ, which is obtained by multiplying the input cycle Δτ by Hp, is used as the predictive horizon. This HpεR is called the predictive horizon. In the following, in order to simplify the expression, the function f(k+i*Δτ) in the continuous system is represented by f(i) in the discrete system. In addition, HcεR, which is the number of times that the control input can be changed, is called the control horizon. Then, the following expression can be obtained.

u(Hc−1)=u(Hc)= . . . =u(Hp−1)

The requirement of the optimization for the discretely approximate problem is represented by the following two-point boundary value problem.

x*(i+1)=x*(i)+f(x*(i),u*(i))Δτ  (8)

x*(0)=x(k)  (9)

Hu(λ*(i+1),μ*(i))=0  (10)

C(x*(i),u*(i))=0  (11)

λ*(i)=λ*(i+1)+Hx(x*(i),λ*(i+1))Δτ  (12)

λ*(Hp)=φxT(x*(Hp))  (13)

Here, x*(i), u*(i), λ*(i) and μ*(i) respectively represent the optimal output, input and Lagrange multipliers at the i-th step. ΦxT represents a partial differentiation of ΦxT with respect to x. In addition, Hu and Hx respectively represent the partial differentiations of Hamiltonian with respect to u and x. Namely, the following expressions can be obtained.



  
    
      H
      u
    
    =
    
      
        
          ∂
          H
        
        
          ∂
          u
        
      
      =
      
        
          [
          
            
              
                ∂
                H
              
              
                ∂
                
                  u
                  1
                
              
            
            ,
            ...
            ⁢
            
              
            
            ,
            
              
                ∂
                H
              
              
                ∂
                
                  u
                  m
                
              
            
          
          ]
        
        T
      
    
  




  
    
      H
      x
    
    =
    
      
        
          ∂
          H
        
        
          ∂
          x
        
      
      =
      
        
          [
          
            
              
                ∂
                H
              
              
                ∂
                
                  x
                  1
                
              
            
            ,
            ...
            ⁢
            
              
            
            ,
            
              
                ∂
                H
              
              
                ∂
                
                  x
                  n
                
              
            
          
          ]
        
        T
      
    
  



Then, when the expressions (8) to (13) are summarized, the problem to be solved is considered as the following non-linear equation system.




  
    
      
        
          [
          
            
              
                
                  
                    
                      x
                      *
                    
                    ⁡
                    
                      (
                      
                        i
                        +
                        1
                      
                      )
                    
                  
                  -
                  
                    
                      x
                      *
                    
                    ⁡
                    
                      (
                      i
                      )
                    
                  
                  -
                  
                    
                      f
                      ⁡
                      
                        (
                        
                          
                            
                              x
                              *
                            
                            ⁡
                            
                              (
                              i
                              )
                            
                          
                          ,
                          
                            
                              u
                              *
                            
                            ⁡
                            
                              (
                              i
                              )
                            
                          
                        
                        )
                      
                    
                    ⁢
                    Δτ
                  
                
              
            
            
              
                
                  
                    
                      x
                      *
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                  -
                  
                    x
                    ⁡
                    
                      (
                      k
                      )
                    
                  
                
              
            
            
              
                
                  
                    H
                    u
                  
                  ⁡
                  
                    (
                    
                      
                        
                          λ
                          *
                        
                        ⁡
                        
                          (
                          
                            i
                            +
                            1
                          
                          )
                        
                      
                      ,
                      
                        
                          u
                          *
                        
                        ⁡
                        
                          (
                          i
                          )
                        
                      
                      ,
                      
                        
                          μ
                          *
                        
                        ⁡
                        
                          (
                          i
                          )
                        
                      
                    
                    )
                  
                
              
            
            
              
                
                  C
                  ⁡
                  
                    (
                    
                      
                        
                          x
                          *
                        
                        ⁡
                        
                          (
                          i
                          )
                        
                      
                      ,
                      
                        
                          u
                          *
                        
                        ⁡
                        
                          (
                          i
                          )
                        
                      
                    
                    )
                  
                
              
            
            
              
                
                  
                    
                      λ
                      *
                    
                    ⁡
                    
                      (
                      i
                      )
                    
                  
                  -
                  
                    
                      λ
                      *
                    
                    ⁡
                    
                      (
                      
                        i
                        +
                        1
                      
                      )
                    
                  
                  -
                  
                    
                      
                        H
                        x
                      
                      ⁡
                      
                        (
                        
                          
                            
                              x
                              *
                            
                            ⁡
                            
                              (
                              i
                              )
                            
                          
                          ,
                          
                            
                              λ
                              *
                            
                            ⁡
                            
                              (
                              
                                i
                                +
                                1
                              
                              )
                            
                          
                        
                        )
                      
                    
                    ⁢
                    Δτ
                  
                
              
            
            
              
                
                  
                    
                      λ
                      *
                    
                    ⁡
                    
                      (
                      
                        H
                        p
                      
                      )
                    
                  
                  -
                  
                    
                      φ
                      x
                      T
                    
                    ⁡
                    
                      (
                      
                        
                          x
                          *
                        
                        ⁡
                        
                          (
                          
                            H
                            p
                          
                          )
                        
                      
                      )
                    
                  
                
              
            
          
          ]
        
        =
        0
      
    
    
      
        (
        14
        )
      
    
  




Therefore, in the linear model predictive control, the linear simultaneous equations (14) are solved at each step. The calculation efficiency of the equations (14) and accuracy of the solutions of the equations (14) determine the speed and accuracy of the solving method of the model predictive control.
Incidentally, in the recent diesel engine, in order to reduce the emission and improve the fuel cost, the Mass Air Flow (MAF) and Manifold Air Pressure (MAP) are optimally controlled by an induction system controller.
Typically, as illustrated in FIG. 1, the intake gas control system of the diesel engine includes a MAP control system and MAF control system, and MAP and MAF are independently controlled each other. In order to reduce Particulate Matters (PM) in the exhaust gas, the MAP control system controls a nozzle diameter of a Variable Nozzle Turbo (VNT) to control the MAP. On the other hand, in order to reduce nitrogen oxides (NOx) in the exhaust gas, the MAF control system controls a valve opening degree of an Exhaust Gas Recirculator (EGR) that recirculates the exhaust gas into a cylinder to control MAF.
Such a diesel engine is a 2-input and 2-output control system, and also in this embodiment, the 2-input and 2-output system is considered.
In case of the 2-input and 2-output system, the control output x(k), control input u(k), dummy variables uα, and uβ, Lagrange multipliers λ(k) and target value Xref of the control output are represented as follows:

x(k)=(x1(k),x2(k))T 

u(k)=(u1(k),u2(k))T 

uα= d=( d1, d2)T 

uβ=d=(d1,d2)T 

λ(k)=(λ1(k),λ2(k))T 

μ(k)=( μ1(k),μ1(k), μ2(k),μ2(k))T 

Xref=(xr1,xr2)T 

Incidentally, dtopbar (d with a bar placed on d) and dunderbar (d with a bar placed under d) are variables.
Furthermore, coefficient matrices in the state equations of the control target are represented as follows:




  
    A
    =
    
      (
      
        
          
            
              a
              11
            
          
          
            
              a
              12
            
          
        
        
          
            
              a
              21
            
          
          
            
              a
              22
            
          
        
      
      )
    
  
  ,
  
    B
    =
    
      (
      
        
          
            
              b
              11
            
          
          
            
              b
              12
            
          
        
        
          
            
              b
              21
            
          
          
            
              b
              22
            
          
        
      
      )
    
  




Moreover, weight matrices of the performance index V are represented as follows:



  
    
      S
      =
      
        (
        
          
            
              
                s
                1
              
            
            
              0
            
          
          
            
              0
            
            
              
                s
                2
              
            
          
        
        )
      
    
    ,
    
      

    
    ⁢
    
      Q
      =
      
        (
        
          
            
              
                q
                1
              
            
            
              0
            
          
          
            
              0
            
            
              
                q
                2
              
            
          
        
        )
      
    
  




  
    R
    =
    
      (
      
        
          
            
              r
              1
            
          
          
            0
          
        
        
          
            0
          
          
            
              r
              2
            
          
        
      
      )
    
  




  
    
      
        r
        α
      
      =
      
        (
        
          
            r
            3
          
          ,
          
            r
            4
          
        
        )
      
    
    ,
    
      

    
    ⁢
    
      
        r
        β
      
      =
      
        (
        
          
            r
            5
          
          ,
          
            r
            6
          
        
        )
      
    
  



Although the weight matrices S, Q and R are not always diagonal matrices, the explanation is made assuming they are diagonal matrices that are frequently used as a matter of fact. Incidentally, even when they are not diagonal matrices, it is possible to carry out a following processing without any problem.
Under these prerequisites, the expressions (14) are expanded as follows:

x1*(i+1)=x1*(i)+(a11x1*(i)+a12x2*(i)+b11u1*(i)+b12u2*(i))Δτ  (15)

x2*(i+1)=x2*(i)+(a21x1*(i)+a22x2*(i)+b21u1*(i)+b22u2*(i))Δτ  (16)

x1*(0)=x1(k)  (17)

x2*(0)=x2(k)  (18)

u1*(i)r1+λ1*(i+1)b11+λ2*(i+1)b21−μ1*(i)+ μ1*(i)=0  (19)

u2*(i)r2+λ1*(i+1)b12+λ2*(i+1)b22−μ2*(i)+ μ2*(i)=0  (20)

−p1+2μ1*(i)d1*(i)=0  (21)

− p1+2 μ1*(i) d1*(i)=0  (22)

−p2+2μ2*(i)d2*(i)=0  (23)

− p2+2 μ2*(i) d2*(i)=0  (24)

−u1*(i)+u1min+(d1*(i))2=0  (25)

u1*(i)−u1max+( d1*(i))2=0  (26)

−u2*(i)+u2min+(d2*(i))2=0  (27)

u2*(i)−u2max+( d2*(i))2=0  (28)

λ1*(i)=λ1*(i+1)+{−(xr1−x1*(i))q1+λ1*(i+1)a11+λ2*(i+1)a21}Δτ  (29)

λ2*(i)=λ2*(i+1)+{−(xr2−x2*(i))q1+λ1*(i+1)a12+λ2*(i+1)a22}Δτ  (30)

λ1*(Hp)=−(xr1−x1*(Hp))s1  (31)

λ2*(Hp)=−(xr2−x2*(Hp))s2  (32)

Incidentally, xr1 and xr2 represent component values of Xref.
It is desired that the simultaneous equations are solved at high speed for a control target whose response speed is high such as the intake system control in the aforementioned diesel engine. Furthermore, the direct method is preferable in order to stably obtain the correct solution without any error as much as possible. However, the direct method normally has a problem that the calculation time largely increases when the number of variables increases, compared with the iterative method. Therefore, in order to make it possible to calculate the problem within a permissible time, it is preferable that the size of the linear simultaneous equations is reduced as much as possible. According to such background, in this embodiment, by reducing the number of variables in the simultaneous equations in the off-line stage by an algebraic simplification method, the calculation amount is reduced in the online stage and the application of the direct method is enabled in a practical range.
As described above, the optimal control problem in the linear model predicative control is represented by the {(m+2n)*Hp}-element simultaneous equations (34) for the following variables in case of no constraints.




  
    
      
        
          
            M
            ~
          
          ⁡
          
            [
            
              
                
                  
                    x
                    *
                  
                
              
              
                
                  
                    u
                    *
                  
                
              
              
                
                  
                    λ
                    *
                  
                
              
            
            ]
          
        
        =
        
          b
          ~
        
      
    
    
      
        (
        33
        )
      
    
  
  
    
      
        
          
            x
            *
          
          =
          
            
              [
              
                
                  
                    x
                    *
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
                ,
                ...
                ⁢
                
                  
                
                ,
                
                  
                    x
                    *
                  
                  ⁡
                  
                    (
                    
                      H
                      p
                    
                    )
                  
                
              
              ]
            
            T
          
        
        ⁢
        
          

        
        ⁢
        
          
            u
            *
          
          =
          
            
              [
              
                
                  
                    u
                    *
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
                ,
                ...
                ⁢
                
                  
                
                ,
                
                  
                    u
                    *
                  
                  ⁡
                  
                    (
                    
                      
                        H
                        p
                      
                      -
                      1
                    
                    )
                  
                
              
              ]
            
            T
          
        
        ⁢
        
          

        
        ⁢
        
          
            λ
            *
          
          =
          
            
              [
              
                
                  
                    λ
                    *
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
                ,
                ...
                ⁢
                
                  
                
                ,
                
                  
                    λ
                    *
                  
                  ⁡
                  
                    (
                    
                      H
                      p
                    
                    )
                  
                
              
              ]
            
            T
          
        
      
    
    
      
        (
        34
        )
      
    
  




[Case where No Constraint Condition is Considered]
In case of the linear model predicative control without considering the constraint condition, it is possible to obtain the optimal inputs by solving these simultaneous equations.
Incidentally, finally, (m*Hp)-element simultaneous equations (35) using the equations (36) as variables are solved.

M[u*]=b  (35)

u*=[u*(0), . . . ,u*(Hp−1)]T  (36)

In this embodiment, an off-line matrix generation apparatus that carries out a processing to simplify the expressions (33) and (34) as described below is introduced.
FIG. 2 illustrates a functional block diagram of the off-line matrix generation apparatus 100 relating to this embodiment. Incidentally, FIG. 2 depicts a configuration without the constraints. The off-line matrix generation apparatus 100 has an input unit 101, input data storage unit 102, first transformation processing unit 103, first data storage unit 104, second transformation processing unit 105, second data storage unit 106, third transformation processing unit 107, third data storage unit 108, simultaneous equation generator 109, fourth data storage unit 110, matrix generator 111 and fifth data storage unit 112.
The input unit 101 accepts inputs of the matrices A, B, S, Q and R, and Hp, Hc and Δτ, as input data, and stores them into the input data storage unit 102. The input data storage unit 102 also stores data representing the simultaneous equations to be solved in addition to those data. The data of the simultaneous equations to be resolved may be inputted through the input unit 101. Furthermore, the input unit 101 also carries out a processing to set data of A, B, S, Q, R, Hp, Hc and Δτ into the simultaneous equations to be solved. The first transformation processing unit 103 carries out a first transformation processing by using data stored in the input data storage unit 102, and stores processing results into the first data storage unit 104. The second transformation processing unit 105 carries out a second transformation processing by using data stored in the input data storage unit 102, and stores processing results into the second data storage unit 106. The third transformation processing unit 107 carries out a third transformation processing by using data stored in the first data storage unit 104 and second data storage unit 106, and stores processing results into the third data storage unit 108.
The simultaneous equation generator 109 carries out a processing by using data stored in the first data storage unit 104 and third data storage unit 108, and stores processing results into the fourth data storage unit 110. The matrix generator 111 carries out a processing by using data stored in the fourth data storage unit 110, and stores processing results into the fifth data storage unit 112.
Next, processing contents of the off-line matrix generation apparatus 100 is explained by using FIG. 3. First, the input unit 101 accepts inputs of the matrices A, B, S, Q and R, and Hp, Hc and Δτ, and stores the input data into the input data storage unit 102 (FIG. 3: step S1). Data of the simultaneous equations to be solved may be inputted through the input unit 101, and may be stored into the input data storage unit 102. Furthermore, the input unit 101 also carries out a processing to set data of A, B, S, Q and R, Hp, Hc and Δτ into the simultaneous equations to be solved, and stores the processing results into the input data storage unit 102.
Then, the first transformation processing unit 103 carries out the first transformation processing for the optimal output state x*(i) by using data stored in the input data storage unit 102, and stores the processing results into the first data storage unit 104 (step S3).
Specifically, the following processing is carried out. Assuming i=0, the expression (9) is substituted into the expression (8). In case of the 2-input and 2-output system, the expression (17) is substituted into the expression (15), and the expression (18) is substituted into the expression (15). However, in order to simplify the explanation, the expressions (8) and (9) are used for the following explanation.
By carrying out such a processing, a following expression using, as variables, x(k) and u*(0) is obtained.

x*(1)=F1(x(k),u*(0))

Similarly, setting i=1, x*(2) is represented from the expression (8) by a linear expression using x*(1) and u*(1). Therefore, when the obtained expression of x*(1) is substituted, a following expression using, as variables, x(k), u*(0) and u*(1) is obtained.

x*(2)=F2(x(k),u*(0),u*(1))

By repeating the similar processing for x (3) and subsequent states, a following expression using x(k), u*(0), . . . and u*(i−1) can be obtained.

x*(i)=F1(x(k),u*(0), . . . ,u*(i−1))  (37)

Incidentally, i=0, 1, . . . , Hp−1.
Thus, the expressions of x*(i) are generated. Such processing results are stored into the first data storage unit 104.
In addition, the second transformation processing unit 105 carries out a second transformation processing for the optimal Lagrange multiplier λ*(i) by using data stored in the input data storage unit 102, and stores the processing results into the second data storage unit 106 (step S5).
Specifically, the following processing is carried out. Namely, setting i=Hp, the expression (13) (in case of 2-input and 2-output system, the expressions (31) and (32)) is adopted as it is. However, in ΦxT(x*(Hp)), the target value Xref and x*(Hp) are used as variables. Therefore, the Lagrange multiplier λ*(Hp) is represented as follows:

λ*(Hp)=GHp(Xref,x*(Hp))  (38)

Then, setting i=Hp−1, the expression (13) is substituted into the expression (12). In case of the 2-input and 2-output system, the expression (31) is substituted into the expression (29), and the expression (32) is substituted into the expression (30). However, in order to simplify the explanation, the expressions (12) and (13) are used in the following explanation.

λ*(Hp−1)=φxT(x*(Hp))+Hx(x*(Hp−1),ΦxT(x*(Hp)))Δτ

Here, ΦxT(x*(Hp)) is a function of the target value Xref and x*(Hp), and the second term is a function of x*(Hp−1) and ΦxT(x*(Hp)). Therefore, finally, λ*(Hp−1) is a function of Xref, x*(Hp) and x*(Hp−1), and is represented as follows:

λ*(Hp−1)=GHp−1(Xref,x*(Hp),x*(Hp−1))  (39)

After that, setting i=Hp−2, the expression (39) is substituted into the expression (12). By repeating such a processing, λ*(Hp−j) becomes a linear expression of Xref, x*(Hp), x*(Hp−1), . . . , x*(Hp−j).

λ*(Hp−j)=GHp−j(Xref,x*(Hp), . . . ,x*(Hp−j))  (40)

Incidentally, j=0, 1, . . . , Hp−1.
Thus, the expressions of λ*(Hp−j) are generated. Such processing results are stored into the second data storage unit 106.
Furthermore, the third transformation processing unit 107 carries out the third transformation processing for the optimal Lagrange multiplier λ*(i) by using data stored in the first data storage unit 104 and second data storage unit 106, and stores the processing results into the third data storage unit 108 (step S7).
Specifically, the following processing is carried out. The expression (37) is substituted into each λ*(Hp−j) in the expression (40). Thus, as represented below, each λ*(Hp−1) becomes a linear expression of Xref, u*(0), . . . , u*(Hp−1) and x(k).

λ*(Hp−j)={tilde over (G)}Hp−j(Xref,u*(0), . . . ,u*(Hp−1),x(k))  (41)

Data of each λ*(Hp−j) obtained by the aforementioned processing is stored into the third data storage unit 108.
After that, the simultaneous equation generator 109 carries out the simultaneous equation generation processing by using data stored in the first data storage unit 104 and third data storage unit 108, and stores the processing results into the fourth data storage unit 110 (step S9).
In case of no constraints, it is possible to consider μ*=0, and the expression (41) is substituted into the expression (10) (in case of the 2-input and 2-output system, the expressions (19) and (20)). Then, the expression (10) is represented as a combination of linear expressions whose variables are Xref, u*(0), . . . , u*(Hp−1) and x(k) as follows:

ζi(Xref,u*(0), . . . ,u*(Hp−1),x(k))=0  (42)

As described above, in case of no constraint conditions, the simultaneous equations from which the optimal control solutions of the digitized linear model predictive control should be obtained become linear expressions of u*(0), . . . , u*(Hp−1).
Data of these simultaneous equations is stored into the fourth data storage unit 110.
Then, the matrix generator 111 generates a matrix M and a vector b by using data stored in the fourth data storage unit 110, and stores the generated data into the fifth data storage unit 112 (step S11).
Specifically, the following processing is carried out. Namely, in case of Hc<Hp, the following expression is held.

u*(Hc−1)=u*(Hc)= . . . =u*(Hp−1)

Therefore, this relational expression is substituted into the expression (42). Then, the following expression is held.

ζi(Xref,u*(0), . . . ,u*(Hc−1),x(k))=0  (43)

Furthermore, because ζHc-1=0, . . . , ζHp-1=0 are equivalent expressions, they are excluded. Then, the simultaneous equations from which the optimal control solutions should be obtained become equivalent to Hc simultaneous equations using, as variables, u*(0), . . . , u*(Hc−1).




  
    
      
        {
        
          
            
              
                
                  
                    ζ
                    0
                  
                  ⁡
                  
                    (
                    
                      Xref
                      ,
                      
                        
                          u
                          *
                        
                        ⁡
                        
                          (
                          0
                          )
                        
                      
                      ,
                      ...
                      ⁢
                      
                        
                      
                      ,
                      
                        
                          u
                          *
                        
                        ⁡
                        
                          (
                          
                            
                              H
                              c
                            
                            -
                            1
                          
                          )
                        
                      
                      ,
                      
                        x
                        ⁡
                        
                          (
                          k
                          )
                        
                      
                    
                    )
                  
                
                =
                0
              
            
          
          
            
              ⋮
            
          
          
            
              
                
                  
                    ζ
                    
                      
                        H
                        c
                      
                      -
                      1
                    
                  
                  ⁡
                  
                    (
                    
                      Xref
                      ,
                      
                        
                          u
                          *
                        
                        ⁡
                        
                          (
                          0
                          )
                        
                      
                      ,
                      ...
                      ,
                      
                        
                          u
                          *
                        
                        ⁡
                        
                          (
                          
                            
                              H
                              c
                            
                            -
                            1
                          
                          )
                        
                      
                      ,
                      
                        x
                        ⁡
                        
                          (
                          k
                          )
                        
                      
                    
                    )
                  
                
                =
                0
              
            
          
        
      
    
    
      
        (
        44
        )
      
    
  




These equations are the simultaneous linear equations using m*Hc variables. “m” represents the number of inputs. The expressions (44) are collectively converted into a following format.

MU=b(Xref,x(k)),U=[u0*, . . . ,uHc−1*]T  (45)

Here, M is an M*Hc square matrix, and b is an m*Hc-dimensional vector having linear expressions of Xref and x(k) as components.
This matrix M and vector function b (Xref, x(k)) is output data of the off-line matrix generation apparatus 100.
By using such a method, because the calculation of the simultaneous linear equations, which is the main calculation portion, depends only on the dimension of the control inputs and the control horizon, the entire calculation amount is almost unchanged if the number of the control inputs does not vary even when the dimension of the output states increases.
Here, a specific example (called example 1) in the 2-input and 2-output system will be explained. The coefficient matrices in the state equations of the control target are set as follows:




  
    A
    =
    
      (
      
        
          
            2
          
          
            1
          
        
        
          
            
              -
              1
            
          
          
            3
          
        
      
      )
    
  
  ,
  
    B
    =
    
      (
      
        
          
            
              -
              1
            
          
          
            1
          
        
        
          
            
              -
              10
            
          
          
            5
          
        
      
      )
    
  




In addition, the weight matrices of the performance index V are set as follows:




  
    S
    =
    
      (
      
        
          
            100
          
          
            0
          
        
        
          
            0
          
          
            1
          
        
      
      )
    
  
  ,
  
    

  
  ⁢
  
    Q
    =
    
      (
      
        
          
            100
          
          
            0
          
        
        
          
            0
          
          
            1
          
        
      
      )
    
  
  ,
  
    

  
  ⁢
  
    R
    =
    
      (
      
        
          
            1
          
          
            0
          
        
        
          
            0
          
          
            1
          
        
      
      )
    
  
  ,




Furthermore, when the target value is Xref=(1, 10)T and Hp=4 and Hc=2 are held, the following matrix and vectors are obtained in case of no constraint conditions.



  
    M
    =
    
      (
      
        
          
            15104407
          
          
            
              -
              7896441
            
          
          
            36811445
          
          
            
              -
              2080975
            
          
        
        
          
            
              -
              7896441
            
          
          
            4129752
          
          
            
              -
              1920890
            
          
          
            1086695
          
        
        
          
            3119909
          
          
            
              -
              1628889
            
          
          
            765368
          
          
            
              -
              431542
            
          
        
        
          
            
              -
              1721304
            
          
          
            899259
          
          
            
              -
              420937
            
          
          
            237638
          
        
      
      )
    
  




  
    U
    =
    
      
        (
        
          
            
              u
              1
              *
            
            ⁡
            
              (
              0
              )
            
          
          ,
          
            
              u
              2
              *
            
            ⁡
            
              (
              0
              )
            
          
          ,
          
            
              u
              1
              *
            
            ⁡
            
              (
              1
              )
            
          
          ,
          
            
              u
              2
              *
            
            ⁡
            
              (
              1
              )
            
          
        
        )
      
      T
    
  




  
    b
    =
    
      (
      
        
          
            
              53760
              -
              
                623835
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              
                6454848
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
            
          
        
        
          
            
              
                -
                28110
              
              +
              
                335845
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              
                3376413
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
            
          
        
        
          
            
              11120
              -
              
                115403
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              
                1330685
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
            
          
        
        
          
            
              
                -
                6120
              
              +
              
                67233
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              
                734850
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
            
          
        
      
      )
    
  



The size of the matrix in the simultaneous linear equations before the aforementioned processing is carried out is 24*24, and the size of the matrix is reduced to 1⁄6. When the simultaneous linear equations are solved by the direct method, the calculation time is proportional to the cube of the matrix size. Therefore, the calculation time for the portion to solve the simultaneous equations becomes 1/216. Depending on the settings of the dimension of the inputs and control horizon, it is possible to reduce the matrix size of the simultaneous equations to be solved at one step by the aforementioned processing. Therefore, instead of the iterative method, the direct method can be adopted, and it becomes possible to obtain the solutions stably and at high speed. Moreover, because the simultaneous equations obtained by the aforementioned processing depend only on the dimension of the control inputs and control horizon Hc, the calculation amount does not largely increase even when the dimension of the output states x(k) becomes large. For example, when the dead time of the plant is considered by the Pade approximation or the like, the number of states increases for that purpose. For example, when 2-dimensional Pade approximation is applied, 2-input and 6-output system is required. However, even when the number of elements of the states x(i) becomes 6, there is no influence because the calculation amount depends only on the dimension of u*(i), and the simultaneous equations are obtained by replacing the terms of the optimal output states x*(i) with the terms u*(i) as aforementioned above.
FIG. 4 illustrates a diesel engine as an example of the engine relating to this embodiment of this technique. An Exhaust Gas Recirculator EGR to provide exhaust gas from an engine body 1 and a Variable Nozzle Turbo VNT to compress and provide fresh air to the engine body 1 by rotating a turbine by the pressure of the exhaust gas are coupled to the engine body 1. By adjusting a nozzle opening degree of the VNT, the rotation of the turbine of the VNT are adjusted, and a Manifold Air Pressure (MAP) measured by a MAP sensor is adjusted. On the other hand, by adjusting a valve opening degree of an EGR valve provided in the EGR, a Mass Air Flow (MAF) measured by a MAF sensor is adjusted.
The measurement value of MAP from the MAP sensor, measurement value of MAF from the MAF sensor, setting value of the fuel injection quantity given from the outside and setting value of the engine speed also given from the outside are inputted to the engine control apparatus 1000 relating to this embodiment. In addition, the manipulation amount (also called control input or simply input) of the valve opening degree of the EGR valve is outputted to the EGR valve from the engine control apparatus 1000, and the manipulation amount (also called control input or simply input) of the nozzle opening degree of the VNT nozzle is outputted to the VNT nozzle from the engine control apparatus 1000.
FIG. 5 illustrates a block diagram of an engine control apparatus 1000 relating to this embodiment. The engine control apparatus 1000 has a planning unit 210 and a first model predictive controller 220. The plant 230 corresponds to engine characteristics, for example. The first model predictive controller 220 includes a simultaneous equation computing unit 221 that is a computing unit to solve the simultaneous linear equations by the direct method and data storage unit 222. The data storage unit 222 stores data regarding M and b.
Namely, a setting value of the fuel injection quantity and a setting value of the engine speed are inputted to the planning unit 210. Furthermore, in the planning unit 210, the target values Uref of the EGR valve opening degree and VNT nozzle opening degree are associated with each combination of the fuel injection quantity and the engine speed, and the target values Xref of the MAP and MAF are associated with each combination of the fuel injection quantity and the engine speed. In this embodiment, the planning unit 210 outputs the target values Uref of the EGR valve opening degree and VNT nozzle opening degree, and the target values Xref of the MAP and MAF.
The target values Xref and output x(k) from the plant 230 (e.g. MAF sensor output and MAP sensor output) are inputted to the first model predictive controller 220. The first model predictive controller 220 carries out a model predictive control described below, and outputs inputs u*(i) to the plant 230. Such a processing is repeated.
Next, a processing carried out by the first model predictive controller 220 is explained by using FIG. 6. The first predictive controller 220 obtains the target values Xref and output x(k), and generates a numerical vector by substituting the target values Xref and output x(k) into b (FIG. 6: step S21). Then, the simultaneous equation computing unit 221 of the first model predictive controller 220 solves the simultaneous linear equations MU=b by the well-known direct method to derive a solution U (step S23). The method itself is the same as the conventional one. However, the matrix and vectors are completely different. As described above, not only the size of M and b is largely reduced, but also the respective components (also called elements) are different.
Namely, in case where the off-line matrix generation processing relating to this embodiment is not carried out, the left side of the summarized expressions (8) to (13) includes a product of a coefficient matrix including the coefficient matrices Abar and Bbar (Abar=I+ΔτA, Bbar=I+ΔτB) and components of the weight matrices S, Q and R of the performance index V, and a vector including the (the predictive horizon Hp*the number of inputs m) optimal inputs u*(i), the (the predictive horizon Hp*the number of outputs n) optimal outputs x*(i) and the (the predictive horizon Hp*the number of outputs n) optimal Lagrange multiplier λ*(i). On the other hand, the right side is a vector including components of x(k), which is unresolved when the off-line matrix generation processing is carried out, and target values Xref.
On the other hand, by carrying out the off-line matrix generation processing, elements to be considered are limited to the inputs u*(i) by transforming expressions representing the optimal output states x*(i) and the optimal Lagrange multiplier λ*(i) into the expressions of the optimal inputs u*(i) and carrying out the substitution. Then, as for the optimal inputs u*, the optimal inputs u*(Hc) to u*(Hp−1) are excluded to reduce the number of elements to be resolved. After the aforementioned off-line matrix generation processing is carried out, the vector U in MU=b includes, as components, only inputs u*(i) whose number of components is the control horizon Hc. In addition, the function vector b is a function of the target values Xref and x(k), and includes Hc elements. The coefficient matrix M is a coefficient matrix to secure the equivalence with the equations before the off-line matrix generation processing, in a form of MU=b.
Therefore, even when the same method to solve the simultaneous linear equations is used, the simultaneous linear equations in a completely different form are solved in this embodiment, and the processing load is largely reduced.
After that, the first model predictive controller 220 extracts the optimal input values u* from the solution U, and outputs the extracted values to the plant 230 (step S25). The optimal input values u* is a component u*(0) in the solution U. Then, the aforementioned processing is carried out until the processing is completed (step S27).
By carrying out the aforementioned processing, it becomes possible to obtain the optimal input values u* at high speed in this online processing. Incidentally, the target values Uref of the EGR valve opening degree and VNT nozzle opening degree, which are outputted from the planning unit 210, are added to u*, and the addition result is outputted to the plant 230.
[Case where the Constraint Condition is Considered]
Next, the case where the constraint conditions are considered will be explained. In case where no constraint conditions are considered, the algebraic simplification method is used to reduce the size of the matrix. However, because the constraint conditions C(u)=0 in the expressions (11) (in case of the 2-input and 2-output system, the expressions (25) to (28)) are nonlinear, it is impossible to treat the constraint conditions as they are. Then, by skillfully carrying out the algebraic processing and the first order approximation, the constraint conditions are built into the simultaneous linear equations in case where no constraint conditions are considered.
FIG. 7 illustrates a configuration of an off-line matrix generation apparatus 500 in case where the constraint conditions are considered. The same reference numbers are allocated to elements having the same function in case where no constraint conditions are considered.
The off-line matrix generation apparatus 500 has an input unit 101, input data storage unit 102, first transformation processing unit 103, first data storage unit 104, second transformation processing unit 105, second data storage unit 106, third transformation processing unit 107, third data storage unit 108, simultaneous equation generator 109, fourth data storage unit 110, matrix generator 111, fifth data storage unit 112 and fourth transformation processing unit 501. Thus, the fourth transformation processing unit 501 is newly introduced.
The input unit 101 accepts inputs of the matrices A, B, S, Q and R, Hp, Hc, Δτ, ptopbar and punderbar and stores them into the input data storage unit 102. The input data storage unit 102 also stores data representing the simultaneous equations to be solved in addition to those data. The data of the simultaneous equations to be solved may be inputted through the input unit 101. Furthermore, the input unit 101 also carries out a processing to set data of A, B, S, Q and R, Hp, Hc, Δτ, ptopbar and punderbar into the simultaneous equations to be solved. The constraint conditions may be inputted and stored into the input data storage unit 102. The first transformation processing unit 103 carries out a first transformation processing by using data stored in the input data storage unit 102, and stores processing results into the first data storage unit 104. The second transformation processing unit 105 carries out a second transformation processing by using data stored in the input data storage unit 102, and stores processing results into the second data storage unit 106. The third transformation processing unit 107 carries out a third transformation processing by using data stored in the first data storage unit 104 and second data storage unit 106, and stores processing results into the third data storage unit 108.
The simultaneous equation generator 109 carries out a processing by using data stored in the first data storage unit 104 and third data storage unit 108, and stores processing results into the fourth data storage unit 110. The matrix generator 111 carries out a processing by using data stored in the fourth data storage unit 110, and stores processing results into the fifth data storage unit 112.
The fourth transformation processing unit 501 carries out a processing by using data stored in the input data storage unit 102, and stores processing results into the fifth data storage unit 112.
Next, processing contents of the off-line matrix generation apparatus 500 is explained by using FIG. 8. First, the input unit 101 accepts inputs of the matrices A, B, 5, Q and R, and Hp, Hc, Δτ, ptopbar and punderbar, and stores the input data into the input data storage unit 102 (FIG. 8: step S31). The constraint conditions uminj and umaxj may also be inputted. Data of the simultaneous equations to be solved may be inputted through the input unit 101, and may be stored into the input data storage unit 102. Furthermore, the input unit 101 carries out a processing to set data of A, B, S, Q and R, Hp, Hc, Δτ, ptopbar and punderbar into the simultaneous equations to be solved, and stores the processing results into the input data storage unit 102.
Then, the first transformation processing unit 103 carries out the first transformation processing for the optimal output state x*(i) by using data stored in the input data storage unit 102, and stores the processing results into the first data storage unit 104 (step S33). This step is the same as the step S3. Therefore, the detailed explanation is omitted.
In addition, the second transformation processing unit 105 carries out a second transformation processing for the optimal Lagrange multiplier λ*(i) by using data stored in the input data storage unit 102, and stores the processing results into the second data storage unit 106 (step S35). This step is the same as the step S5. Therefore, the detailed explanation is omitted.
Furthermore, the third transformation processing unit 107 carries out the third transformation processing for the optimal Lagrange multiplier λ*(i) by using data stored in the first data storage unit 104 and second data storage unit 106, and stores the processing results into the third data storage unit 108 (step S37). This step is the same as the step S7. Therefore, the detailed explanation is omitted.
Then, the fourth transformation processing unit 501 carries out a constraint linear approximation calculation by using data stored in the input data storage unit 102 and third data storage unit 108, and stores processing results into the fifth data storage unit 112 (step S39). This step is different from a case where no constraint conditions are considered. However, because there is no influence to other processing, the detailed explanation will be made after the explanation of the processing of FIG. 8.
After that, the simultaneous equation generator 109 carries out the simultaneous equation generation processing by using data stored in the input data storage unit 102, and stores the processing results into the fourth data storage unit 110 (step S41). This step is the same as the step S9. Therefore, the detailed explanation is omitted.
Then, the matrix generator 111 generates a matrix M and a vector b by using data stored in the fourth data storage unit 110, and stores the generated data into the fifth data storage unit 112 (step S43). This step is the same as the step S11. Therefore, the detailed explanation is omitted. Thus, data to be used in the online processing is stored into the fifth data storage unit 112.
Next, the detailed constraint linear approximation calculation will be explained. Here, λ* and μ* are eliminated in the expression (10) (in case of the 2-input and 2-output system, the expressions (19) to (24)). Namely, linear expressions represented by u*(i) and ubar*(i) (ubar represents u with a bar placed on u), which is a value of u*(i) calculated one sampling time before are generated.
A case of the 2-input and 2-output system will be explained in detail. It is assumed that x*(i) is represented at the step S23 with u*(i) by the expressions (15) to (18), and λ*(i) is represented with u* by the expressions (29) to (32) and x*(i). Then, from i=0, the following transformation is carried out.
Namely, the expression (21) for the lower limit of the constraint conditions is transformed as follows:




  
    
      
        
          
            
              μ
              _
            
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
        =
        
          
            
              p
              _
            
            1
          
          
            2
            ⁢
            
              
                
                  d
                  _
                
                1
                *
              
              ⁡
              
                (
                0
                )
              
            
          
        
      
    
    
      
        (
        46
        )
      
    
  




Moreover, the expression (25) is transformed as follows:




  
    
      
        
          
            
              d
              _
            
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
        =
        
          
            
              
                u
                1
                *
              
              ⁡
              
                (
                0
                )
              
            
            -
            
              u
              1
              min
            
          
        
      
    
    
      
        (
        47
        )
      
    
  




Here, when the expression (47) is substituted into the expression (46), the following expression is obtained.




  
    
      
        
          
            
              μ
              _
            
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
        =
        
          
            
              p
              _
            
            1
          
          
            2
            ⁢
            
              
                
                  
                    u
                    1
                    *
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
                -
                
                  u
                  1
                  min
                
              
            
          
        
      
    
    
      
        (
        48
        )
      
    
  




Thus, μunderbar1*(0) (μ1*(0) with a bar placed under μ1*(0)) is transformed to a function of u1*(0). However, because this is not a linear function, it is impossible to treat it as the simultaneous linear equations. Therefore, the linear approximation is used.
When the linear approximation is carried out, the selection method of the reference point of the approximation is important. In this embodiment, the input value u1bar*(1) u, which was obtained at t=k−1 by the optimization calculation but was a value for the same time, is selected as the reference point. Namely, an output value after one sampling time, which was calculated, but was not outputted to the plant 230, is selected. Then, the expression (48) is transformed as follows:




  
    
      
        
          
            
              μ
              _
            
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
        =
        
          
            
              
                p
                _
              
              1
            
            
              2
              ⁢
              
                
                  
                    
                      u
                      1
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                  -
                  
                    u
                    1
                    min
                  
                
              
            
          
          +
          
            
              
                
                  p
                  _
                
                1
              
              ⁢
              
                
                  
                    u
                    ~
                  
                  1
                  *
                
                ⁡
                
                  (
                  1
                  )
                
              
            
            
              4
              ⁢
              
                
                  (
                  
                    
                      
                        
                          u
                          ~
                        
                        1
                        *
                      
                      ⁡
                      
                        (
                        1
                        )
                      
                    
                    -
                    
                      u
                      1
                      min
                    
                  
                  )
                
                
                  3
                  2
                
              
            
          
          -
          
            
              
                
                  p
                  _
                
                1
              
              
                4
                ⁢
                
                  
                    (
                    
                      
                        
                          
                            u
                            ~
                          
                          1
                          *
                        
                        ⁡
                        
                          (
                          1
                          )
                        
                      
                      -
                      
                        u
                        1
                        min
                      
                    
                    )
                  
                  
                    3
                    2
                  
                
              
            
            ⁢
            
              
                u
                1
                *
              
              ⁡
              
                (
                0
                )
              
            
          
        
      
    
    
      
        (
        49
        )
      
    
  




By doing so, it becomes possible to build the constraints into the simultaneous linear equations. Incidentally, in order to make it easy to understand, wunderbar and vunderbar (underbar represents underline.) are introduced.




  
    
      
        
          
            
              w
              _
            
            1
          
          ⁡
          
            (
            0
            )
          
        
        =
        
          
            
              
                p
                _
              
              1
            
            
              2
              ⁢
              
                
                  
                    
                      
                        u
                        ~
                      
                      1
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                  -
                  
                    u
                    1
                    min
                  
                
              
            
          
          +
          
            
              
                
                  p
                  _
                
                1
              
              ⁢
              
                
                  
                    u
                    ~
                  
                  1
                  *
                
                ⁡
                
                  (
                  1
                  )
                
              
            
            
              4
              ⁢
              
                
                  (
                  
                    
                      
                        
                          u
                          ~
                        
                        1
                        *
                      
                      ⁡
                      
                        (
                        1
                        )
                      
                    
                    -
                    
                      u
                      1
                      min
                    
                  
                  )
                
                
                  3
                  2
                
              
            
          
        
      
    
    
      
        (
        50
        )
      
    
  
  
    
      
        
          
            
              v
              _
            
            1
          
          ⁡
          
            (
            0
            )
          
        
        =
        
          
            
              p
              _
            
            1
          
          
            4
            ⁢
            
              
                (
                
                  
                    
                      
                        u
                        ~
                      
                      1
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                  -
                  
                    u
                    1
                    min
                  
                
                )
              
              
                3
                2
              
            
          
        
      
    
    
      
        (
        51
        )
      
    
  




Therefore, the expression (49) is represented as follows:

μ1*(0)=w1(0)+v1(0)u1*(0)  (52)

After similarly transforming μunderbar2(0), the linear approximation is carried out. Furthermore, after i is incremented by 1, the similar transformation is carried out. Then, the calculation results u1bar*(2) and u2bar*(2) after (i+1) unit times, which were calculated at t=k−1 by the optimization calculation, are feedback, and the linear approximation is carried out based on the feedback calculation results. Such a processing is repeated until i=Hc−1. Then, the following general expressions can be obtained.




  
    
      
        
          
            
              
                μ
                _
              
              1
              *
            
            ⁡
            
              (
              i
              )
            
          
          =
          
            
              
                
                  w
                  _
                
                1
              
              ⁡
              
                (
                i
                )
              
            
            +
            
              
                
                  
                    v
                    _
                  
                  1
                
                ⁡
                
                  (
                  i
                  )
                
              
              ⁢
              
                
                  u
                  1
                  *
                
                ⁡
                
                  (
                  i
                  )
                
              
            
          
        
        ⁢
        
          

        
        ⁢
        
          
            
              
                w
                _
              
              1
            
            ⁡
            
              (
              i
              )
            
          
          =
          
            
              
                
                  p
                  _
                
                1
              
              
                2
                ⁢
                
                  
                    
                      
                        
                          u
                          ~
                        
                        1
                        *
                      
                      ⁡
                      
                        (
                        
                          i
                          +
                          1
                        
                        )
                      
                    
                    -
                    
                      u
                      2
                      min
                    
                  
                
              
            
            +
            
              
                
                  
                    p
                    _
                  
                  1
                
                ⁢
                
                  
                    
                      u
                      ~
                    
                    1
                    *
                  
                  ⁡
                  
                    (
                    
                      i
                      +
                      1
                    
                    )
                  
                
              
              
                4
                ⁢
                
                  
                    (
                    
                      
                        
                          
                            u
                            ~
                          
                          1
                          *
                        
                        ⁡
                        
                          (
                          
                            i
                            +
                            1
                          
                          )
                        
                      
                      -
                      
                        u
                        1
                        min
                      
                    
                    )
                  
                  
                    3
                    2
                  
                
              
            
          
        
        ⁢
        
          

        
        ⁢
        
          
            
              
                v
                _
              
              1
            
            ⁡
            
              (
              i
              )
            
          
          =
          
            -
            
              
                
                  p
                  _
                
                1
              
              
                4
                ⁢
                
                  
                    (
                    
                      
                        
                          
                            u
                            ~
                          
                          1
                          *
                        
                        ⁡
                        
                          (
                          
                            i
                            +
                            1
                          
                          )
                        
                      
                      -
                      
                        u
                        1
                        min
                      
                    
                    )
                  
                  
                    3
                    2
                  
                
              
            
          
        
      
    
    
      
        (
        
          53
          ⁢
          
            -
          
          ⁢
          1
        
        )
      
    
  
  
    
      
        
          
            
              
                μ
                _
              
              2
              *
            
            ⁡
            
              (
              i
              )
            
          
          =
          
            
              
                
                  w
                  _
                
                2
              
              ⁡
              
                (
                i
                )
              
            
            +
            
              
                
                  
                    v
                    _
                  
                  2
                
                ⁡
                
                  (
                  i
                  )
                
              
              ⁢
              
                
                  u
                  2
                  *
                
                ⁡
                
                  (
                  i
                  )
                
              
            
          
        
        ⁢
        
          

        
        ⁢
        
          
            
              
                w
                _
              
              2
            
            ⁡
            
              (
              i
              )
            
          
          =
          
            
              
                
                  p
                  _
                
                2
              
              
                2
                ⁢
                
                  
                    
                      
                        
                          u
                          ~
                        
                        2
                        *
                      
                      ⁡
                      
                        (
                        
                          i
                          +
                          1
                        
                        )
                      
                    
                    -
                    
                      u
                      2
                      min
                    
                  
                
              
            
            +
            
              
                
                  
                    p
                    _
                  
                  2
                
                ⁢
                
                  
                    
                      u
                      ~
                    
                    2
                    *
                  
                  ⁡
                  
                    (
                    
                      i
                      +
                      1
                    
                    )
                  
                
              
              
                4
                ⁢
                
                  
                    (
                    
                      
                        
                          
                            u
                            ~
                          
                          2
                          *
                        
                        ⁡
                        
                          (
                          
                            i
                            +
                            1
                          
                          )
                        
                      
                      -
                      
                        u
                        2
                        min
                      
                    
                    )
                  
                  
                    3
                    2
                  
                
              
            
          
        
        ⁢
        
          

        
        ⁢
        
          
            
              
                v
                _
              
              2
            
            ⁡
            
              (
              i
              )
            
          
          =
          
            -
            
              
                
                  p
                  _
                
                2
              
              
                4
                ⁢
                
                  
                    (
                    
                      
                        
                          
                            u
                            ~
                          
                          2
                          *
                        
                        ⁡
                        
                          (
                          
                            i
                            +
                            1
                          
                          )
                        
                      
                      -
                      
                        u
                        2
                        min
                      
                    
                    )
                  
                  
                    3
                    2
                  
                
              
            
          
        
      
    
    
      
        (
        
          53
          ⁢
          
            -
          
          ⁢
          2
        
        )
      
    
  




Next, the expression (22) for the upper limit of the constraint conditions is transformed at i=0 as follows:




  
    
      
        
          
            
              μ
              _
            
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
        =
        
          
            
              p
              _
            
            1
          
          
            2
            ⁢
            
              
                
                  d
                  _
                
                1
                *
              
              ⁡
              
                (
                0
                )
              
            
          
        
      
    
    
      
        (
        54
        )
      
    
  




Moreover, the expression (26) is transformed as follows:




  
    
      
        
          
            
              d
              _
            
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
        =
        
          
            
              u
              1
              max
            
            -
            
              
                u
                1
                *
              
              ⁡
              
                (
                0
                )
              
            
          
        
      
    
    
      
        (
        55
        )
      
    
  




Here, when the expression (55) is substituted into the expression (54), the following expression is obtained.




  
    
      
        
          
            
              μ
              _
            
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
        =
        
          
            
              p
              _
            
            1
          
          
            2
            ⁢
            
              
                
                  u
                  1
                  max
                
                -
                
                  
                    u
                    1
                    *
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
              
            
          
        
      
    
    
      
        (
        56
        )
      
    
  




When viewing the expression (56), μtopbar1*(0) (μ1*(0) with a bar placed on μ1*(0)) for the upper limit is also represented as a function of u1*(0). Therefore, the similar linear approximation is carried out. Namely, in this embodiment, the input value u1bar*(1), which was obtained at t=k−1 by the optimization calculation but was a value for the same time, is selected as the reference point. Namely, an output value after one sampling time, which was calculated, but was not outputted to the plant 230, is selected. Then, the expression (56) is transformed as follows:




  
    
      
        
          
            
              u
              _
            
            1
            *
          
          ⁢
          
            (
            0
            )
          
        
        =
        
          
            
              
                p
                _
              
              1
            
            
              2
              ⁢
              
                
                  
                    u
                    1
                    max
                  
                  -
                  
                    
                      
                        u
                        ~
                      
                      1
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                
              
            
          
          -
          
            
              
                
                  p
                  _
                
                1
              
              ⁢
              
                
                  
                    u
                    ~
                  
                  1
                  *
                
                ⁡
                
                  (
                  1
                  )
                
              
            
            
              4
              ⁢
              
                
                  (
                  
                    
                      u
                      1
                      max
                    
                    -
                    
                      
                        
                          u
                          ~
                        
                        1
                        *
                      
                      ⁡
                      
                        (
                        1
                        )
                      
                    
                  
                  )
                
                
                  3
                  2
                
              
            
          
          +
          
            
              
                
                  p
                  _
                
                1
              
              
                4
                ⁢
                
                  
                    (
                    
                      
                        u
                        1
                        max
                      
                      -
                      
                        
                          
                            u
                            ~
                          
                          1
                          *
                        
                        ⁡
                        
                          (
                          1
                          )
                        
                      
                    
                    )
                  
                  
                    3
                    2
                  
                
              
            
            ⁢
            
              
                u
                1
                *
              
              ⁡
              
                (
                0
                )
              
            
          
        
      
    
    
      
        (
        57
        )
      
    
  




By doing so, it becomes possible to build the constraints into the simultaneous linear equations. Incidentally, in order to make it easy to understand, wtopbar and vtopbar (topbar represents a bar placed on the symbol.) are introduced.




  
    
      
        
          
            
              w
              _
            
            1
          
          ⁡
          
            (
            0
            )
          
        
        =
        
          
            -
            
              
                
                  p
                  _
                
                1
              
              
                2
                ⁢
                
                  
                    
                      u
                      1
                      max
                    
                    -
                    
                      
                        
                          u
                          ~
                        
                        1
                        *
                      
                      ⁡
                      
                        (
                        1
                        )
                      
                    
                  
                
              
            
          
          -
          
            
              
                
                  p
                  _
                
                1
              
              ⁢
              
                
                  
                    u
                    ~
                  
                  1
                  *
                
                ⁡
                
                  (
                  1
                  )
                
              
            
            
              4
              ⁢
              
                
                  (
                  
                    
                      u
                      1
                      max
                    
                    -
                    
                      
                        
                          u
                          ~
                        
                        1
                        *
                      
                      ⁡
                      
                        (
                        1
                        )
                      
                    
                  
                  )
                
                
                  3
                  2
                
              
            
          
        
      
    
    
      
        (
        58
        )
      
    
  
  
    
      
        
          
            
              v
              _
            
            1
          
          ⁡
          
            (
            0
            )
          
        
        =
        
          
            
              p
              _
            
            1
          
          
            4
            ⁢
            
              
                (
                
                  
                    u
                    1
                    max
                  
                  -
                  
                    
                      
                        u
                        ~
                      
                      1
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                
                )
              
              
                3
                2
              
            
          
        
      
    
    
      
        (
        59
        )
      
    
  




Such a processing is repeated until i=Hc−1. Then, the following general expressions can be obtained.




  
    
      
        
          
            
              
                μ
                _
              
              1
              *
            
            ⁡
            
              (
              i
              )
            
          
          =
          
            
              
                
                  w
                  _
                
                1
              
              ⁡
              
                (
                i
                )
              
            
            +
            
              
                
                  v
                  _
                
                1
              
              ⁢
              
                (
                i
                )
              
              ⁢
              
                
                  u
                  1
                  *
                
                ⁡
                
                  (
                  i
                  )
                
              
            
          
        
        ⁢
        
          

        
        ⁢
        
          
            
              
                
                  
                    
                      w
                      _
                    
                    1
                  
                  ⁡
                  
                    (
                    i
                    )
                  
                
                =
                
                  
                    -
                    
                      
                        
                          p
                          _
                        
                        1
                      
                      
                        2
                        ⁢
                        
                          
                            
                              u
                              1
                              max
                            
                            -
                            
                              
                                
                                  u
                                  ~
                                
                                1
                                *
                              
                              ⁡
                              
                                (
                                
                                  i
                                  +
                                  1
                                
                                )
                              
                            
                          
                        
                      
                    
                  
                  -
                  
                    
                      
                        
                          p
                          _
                        
                        1
                      
                      ⁢
                      
                        
                          
                            u
                            ~
                          
                          1
                          *
                        
                        ⁡
                        
                          (
                          
                            i
                            +
                            1
                          
                          )
                        
                      
                    
                    
                      4
                      ⁢
                      
                        
                          (
                          
                            
                              u
                              1
                              max
                            
                            -
                            
                              
                                
                                  u
                                  ~
                                
                                1
                                *
                              
                              ⁡
                              
                                (
                                
                                  i
                                  +
                                  1
                                
                                )
                              
                            
                          
                          )
                        
                        
                          3
                          2
                        
                      
                    
                  
                
              
            
          
          
            
              
                
                  
                    
                      v
                      _
                    
                    1
                  
                  ⁡
                  
                    (
                    i
                    )
                  
                
                =
                
                  
                    
                      p
                      _
                    
                    1
                  
                  
                    4
                    ⁢
                    
                      
                        (
                        
                          
                            u
                            1
                            max
                          
                          -
                          
                            
                              
                                u
                                ~
                              
                              1
                              *
                            
                            ⁡
                            
                              (
                              
                                i
                                +
                                1
                              
                              )
                            
                          
                        
                        )
                      
                      
                        3
                        2
                      
                    
                  
                
              
            
          
        
      
    
    
      
        (
        60
        )
      
    
  




After similarly transforming μtopbar2(0), the linear approximation is carried out. Furthermore, after i is incremented by 1, the similar transformation is carried out. Then, the calculation results u1bar*(2) and u2bar*(2) after (i+1) unit times, which were calculated at t=k−1 by the optimization calculation, are feedback, and the linear approximation is carried out based on the feedback calculation results. Such a processing is repeated until i=Hc−1. Then, the following general expressions can be obtained.




  
    
      
        
          
            
              
                μ
                _
              
              2
            
            ⁡
            
              (
              i
              )
            
          
          =
          
            
              
                
                  w
                  _
                
                2
              
              ⁡
              
                (
                i
                )
              
            
            +
            
              
                
                  
                    v
                    _
                  
                  2
                
                ⁡
                
                  (
                  i
                  )
                
              
              ⁢
              
                
                  u
                  2
                  *
                
                ⁡
                
                  (
                  i
                  )
                
              
            
          
        
        ⁢
        
          

        
        ⁢
        
          
            
              
                
                  
                    
                      w
                      _
                    
                    2
                  
                  ⁡
                  
                    (
                    i
                    )
                  
                
                =
                
                  
                    -
                    
                      
                        
                          p
                          _
                        
                        2
                      
                      
                        2
                        ⁢
                        
                          
                            
                              u
                              2
                              max
                            
                            -
                            
                              
                                
                                  u
                                  ~
                                
                                2
                                *
                              
                              ⁡
                              
                                (
                                
                                  i
                                  +
                                  1
                                
                                )
                              
                            
                          
                        
                      
                    
                  
                  -
                  
                    
                      
                        
                          p
                          _
                        
                        2
                      
                      ⁢
                      
                        
                          
                            u
                            ~
                          
                          2
                          *
                        
                        ⁡
                        
                          (
                          
                            i
                            +
                            1
                          
                          )
                        
                      
                    
                    
                      4
                      ⁢
                      
                        
                          (
                          
                            
                              u
                              2
                              max
                            
                            -
                            
                              
                                
                                  u
                                  ~
                                
                                2
                                *
                              
                              ⁡
                              
                                (
                                
                                  i
                                  +
                                  1
                                
                                )
                              
                            
                          
                          )
                        
                        
                          3
                          2
                        
                      
                    
                  
                
              
            
          
          
            
              
                
                  
                    
                      v
                      _
                    
                    2
                  
                  ⁡
                  
                    (
                    i
                    )
                  
                
                =
                
                  
                    
                      p
                      _
                    
                    2
                  
                  
                    4
                    ⁢
                    
                      
                        (
                        
                          
                            u
                            2
                            max
                          
                          -
                          
                            
                              
                                u
                                ~
                              
                              2
                              *
                            
                            ⁡
                            
                              (
                              
                                i
                                +
                                1
                              
                              )
                            
                          
                        
                        )
                      
                      
                        3
                        2
                      
                    
                  
                
              
            
          
        
      
    
    
      
        (
        61
        )
      
    
  




Generally, after carrying out the aforementioned transformation, the simultaneous linear equations are solved by these results and the processing results of the third transformation processing unit 107. However, actually, it has been understood that the entire simultaneous equations are represented as follows:




  
    
      
        
          
            (
            
              M
              -
              
                diag
                ⁡
                
                  (
                  
                    V
                    _
                  
                  )
                
              
              +
              
                diag
                ⁡
                
                  (
                  
                    V
                    _
                  
                  )
                
              
            
            )
          
          ⁢
          U
        
        =
        
          b
          +
          
            W
            _
          
          -
          
            W
            _
          
        
      
    
    
      
        (
        62
        )
      
    
  
  
    
      
        
          
            V
            _
          
          =
          
            [
            
              
                
                  
                    
                      
                        v
                        _
                      
                      1
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                
              
              
                
                  
                    
                      
                        v
                        _
                      
                      2
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                
              
              
                
                  ⋮
                
              
              
                
                  
                    
                      
                        v
                        _
                      
                      m
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                
              
              
                
                  
                    
                      
                        v
                        _
                      
                      1
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                
              
              
                
                  ⋮
                
              
              
                
                  
                    
                      
                        v
                        _
                      
                      m
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                
              
              
                
                  ⋮
                
              
              
                
                  
                    
                      
                        v
                        _
                      
                      1
                    
                    ⁡
                    
                      (
                      
                        
                          H
                          c
                        
                        -
                        1
                      
                      )
                    
                  
                
              
              
                
                  ⋮
                
              
              
                
                  
                    
                      
                        v
                        _
                      
                      m
                    
                    ⁡
                    
                      (
                      
                        
                          H
                          c
                        
                        -
                        1
                      
                      )
                    
                  
                
              
            
            ]
          
        
        ,
      
    
    
      
        (
        63
        )
      
    
  
  
    
      
        
          
            V
            _
          
          =
          
            [
            
              
                
                  
                    
                      
                        v
                        _
                      
                      1
                    
                    ⁢
                    
                      (
                      0
                      )
                    
                  
                
              
              
                
                  
                    
                      
                        v
                        _
                      
                      2
                    
                    ⁢
                    
                      (
                      0
                      )
                    
                  
                
              
              
                
                  ⋮
                
              
              
                
                  
                    
                      
                        v
                        _
                      
                      m
                    
                    ⁢
                    
                      (
                      0
                      )
                    
                  
                
              
              
                
                  
                    
                      
                        v
                        _
                      
                      1
                    
                    ⁢
                    
                      (
                      1
                      )
                    
                  
                
              
              
                
                  ⋮
                
              
              
                
                  
                    
                      
                        v
                        _
                      
                      m
                    
                    ⁢
                    
                      (
                      1
                      )
                    
                  
                
              
              
                
                  ⋮
                
              
              
                
                  
                    
                      
                        v
                        _
                      
                      1
                    
                    ⁢
                    
                      (
                      
                        
                          H
                          c
                        
                        -
                        1
                      
                      )
                    
                  
                
              
              
                
                  ⋮
                
              
              
                
                  
                    
                      
                        v
                        _
                      
                      m
                    
                    ⁢
                    
                      (
                      
                        
                          H
                          c
                        
                        -
                        1
                      
                      )
                    
                  
                
              
            
            ]
          
        
        ,
      
    
    
      
        (
        65
        )
      
    
  
  
    
      
        
          
            W
            _
          
          =
          
            [
            
              
                
                  
                    
                      
                        w
                        _
                      
                      1
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                
              
              
                
                  
                    
                      
                        w
                        _
                      
                      2
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                
              
              
                
                  ⋮
                
              
              
                
                  
                    
                      
                        w
                        _
                      
                      m
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                
              
              
                
                  
                    
                      
                        w
                        _
                      
                      1
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                
              
              
                
                  ⋮
                
              
              
                
                  
                    
                      
                        w
                        _
                      
                      m
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                
              
              
                
                  ⋮
                
              
              
                
                  
                    
                      
                        w
                        _
                      
                      1
                    
                    ⁡
                    
                      (
                      
                        
                          H
                          c
                        
                        -
                        1
                      
                      )
                    
                  
                
              
              
                
                  ⋮
                
              
              
                
                  
                    
                      
                        w
                        _
                      
                      m
                    
                    ⁡
                    
                      (
                      
                        
                          H
                          c
                        
                        -
                        1
                      
                      )
                    
                  
                
              
            
            ]
          
        
        ,
      
    
    
      
        (
        64
        )
      
    
  
  
    
      
        
          W
          _
        
        =
        
          [
          
            
              
                
                  
                    
                      w
                      _
                    
                    1
                  
                  ⁢
                  
                    (
                    0
                    )
                  
                
              
            
            
              
                
                  
                    
                      w
                      _
                    
                    2
                  
                  ⁢
                  
                    (
                    0
                    )
                  
                
              
            
            
              
                ⋮
              
            
            
              
                
                  
                    
                      w
                      _
                    
                    m
                  
                  ⁢
                  
                    (
                    0
                    )
                  
                
              
            
            
              
                
                  
                    
                      w
                      _
                    
                    1
                  
                  ⁢
                  
                    (
                    1
                    )
                  
                
              
            
            
              
                ⋮
              
            
            
              
                
                  
                    
                      w
                      _
                    
                    m
                  
                  ⁢
                  
                    (
                    1
                    )
                  
                
              
            
            
              
                ⋮
              
            
            
              
                
                  
                    
                      w
                      _
                    
                    1
                  
                  ⁢
                  
                    (
                    
                      
                        H
                        c
                      
                      -
                      1
                    
                    )
                  
                
              
            
            
              
                ⋮
              
            
            
              
                
                  
                    
                      w
                      _
                    
                    m
                  
                  ⁢
                  
                    (
                    
                      
                        H
                        c
                      
                      -
                      1
                    
                    )
                  
                
              
            
          
          ]
        
      
    
    
      
        (
        66
        )
      
    
  




Incidentally, diag(V) is a diagonal matrix whose diagonal components correspond to the respective components of the vector V.
Namely, the fourth transformation processing unit 501 generates vectors represented by the expressions (63) to (66) in fact.




  
    
      
        
          
            
              
                w
                _
              
              j
            
            ⁡
            
              (
              i
              )
            
          
          =
          
            
              
                
                  p
                  _
                
                j
              
              
                2
                ⁢
                
                  
                    
                      
                        
                          u
                          ~
                        
                        j
                        *
                      
                      ⁡
                      
                        (
                        
                          i
                          +
                          1
                        
                        )
                      
                    
                    -
                    
                      u
                      j
                      min
                    
                  
                
              
            
            +
            
              
                
                  
                    p
                    _
                  
                  j
                
                ⁢
                
                  
                    
                      u
                      ~
                    
                    j
                    *
                  
                  ⁡
                  
                    (
                    
                      i
                      +
                      1
                    
                    )
                  
                
              
              
                4
                ⁢
                
                  
                    (
                    
                      
                        
                          
                            u
                            ~
                          
                          j
                          *
                        
                        ⁡
                        
                          (
                          
                            i
                            +
                            1
                          
                          )
                        
                      
                      -
                      
                        u
                        j
                        min
                      
                    
                    )
                  
                  
                    3
                    2
                  
                
              
            
          
        
        ⁢
        
          

        
        ⁢
        
          
            
              
                v
                _
              
              j
            
            ⁡
            
              (
              i
              )
            
          
          =
          
            -
            
              
                
                  p
                  _
                
                j
              
              
                4
                ⁢
                
                  
                    (
                    
                      
                        
                          
                            u
                            ~
                          
                          j
                          *
                        
                        ⁡
                        
                          (
                          
                            i
                            +
                            1
                          
                          )
                        
                      
                      -
                      
                        u
                        j
                        min
                      
                    
                    )
                  
                  
                    3
                    2
                  
                
              
            
          
        
      
    
  
  
    
      
        
          
            
              
                w
                _
              
              j
            
            ⁢
            
              (
              i
              )
            
          
          =
          
            
              
                
                  p
                  _
                
                j
              
              
                2
                ⁢
                
                  
                    
                      u
                      j
                      max
                    
                    -
                    
                      
                        
                          u
                          ~
                        
                        j
                        *
                      
                      ⁡
                      
                        (
                        
                          i
                          +
                          1
                        
                        )
                      
                    
                  
                
              
            
            +
            
              
                
                  
                    p
                    _
                  
                  j
                
                ⁢
                
                  
                    
                      u
                      ~
                    
                    j
                    *
                  
                  ⁡
                  
                    (
                    
                      i
                      +
                      1
                    
                    )
                  
                
              
              
                4
                ⁢
                
                  
                    (
                    
                      
                        u
                        j
                        max
                      
                      -
                      
                        
                          
                            u
                            ~
                          
                          j
                          *
                        
                        ⁡
                        
                          (
                          
                            i
                            +
                            1
                          
                          )
                        
                      
                    
                    )
                  
                  
                    3
                    2
                  
                
              
            
          
        
        ⁢
        
          

        
        ⁢
        
          
            
              
                v
                _
              
              j
            
            ⁢
            
              (
              i
              )
            
          
          =
          
            -
            
              
                
                  p
                  _
                
                j
              
              
                4
                ⁢
                
                  
                    (
                    
                      
                        u
                        j
                        max
                      
                      -
                      
                        
                          
                            u
                            ~
                          
                          j
                          *
                        
                        ⁡
                        
                          (
                          
                            i
                            +
                            1
                          
                          )
                        
                      
                    
                    )
                  
                  
                    3
                    2
                  
                
              
            
          
        
        ⁢
        
          

        
        ⁢
        
          
            i
            =
            0
          
          ,
          
            
              ...
              ⁢
              
                
              
              ⁢
              
                H
                c
              
            
            -
            1
          
          ,
          
            j
            =
            1
          
          ,
          ...
          ⁢
          
            
          
          ,
          m
        
      
    
  




As for M, a result obtained by transforming a first constraint vector to a diagonal matrix is added to M, and a result obtained by transforming a second constraint vector to a diagonal matrix is further subtracted. The first constraint vector includes ((the number of inputs)*(control horizon Hc)) components represented by the upper limit value and the optimal input values at the corresponding time in the previous calculation result, and the second constraint vector includes ((the number of inputs)*(control horizon Hc)) components represented by the lower limit value and the optimal input values at the corresponding time in the previous calculation result. As for b, a third constraint vector is subtracted from b and a fourth vector is further added. The third vector includes ((the number of inputs)*(control horizon Hc)) components represented by the upper limit value and the optimal input values at the corresponding time in the previous calculation result, and the fourth constraint vector includes ((the number of inputs)*(control horizon Hc)) components represented by the lower limit value and the optimal input values at the corresponding time in the previous calculation result.
Next, FIG. 9 illustrates a block diagram of the engine control apparatus 1000 in case where the constraint condition is considered.
The engine control apparatus 1000 has a planning unit 210 and second model predictive controller 240. The plant 230 corresponds to the engine characteristics. The second model predictive controller 240 has a simultaneous equation computing unit 241, constraint condition reflection unit 242, U storage unit 243 and data storage unit 244. The data storage unit 244 stores data of b, Vunderbar, Vtopbar, Wunderbar and wtopber.
Namely, the setting values of the fuel injection quantity and engine speed are inputted to the planning unit 210, and in the planning unit 210, the target values Uref of the EGR valve opening degree and VNT nozzle opening degree are associated with each combination of the fuel injection quantity and the engine speed, and target values Xref of the MAP and MAF are associated with each combination of the fuel injection quantity and the engine speed. In this embodiment, the target values Uref of the EGR valve opening degree and the VNT nozzle opening degree and the target values Xref of the MAF and MAP are outputted from this planning unit 210.
The target values Xref, outputs x(k) from the plant 230 (MAF sensor output and MAP sensor output), optimal input value U*(i−1) calculated one sampling time before and constraint conditions are inputted to the second model predictive controller 240. When the constraint conditions do not vary, the constraints conditions are embedded into Wunderbar, Vunderbar, Wtopbar and Vtopbar in the off-line matrix generation processing. The second model predictive controller 240 carries out a processing for the model predictive control described below, and the input u*(i) is outputted to the plant 230.
Next, the processing of the second model predictive controller 240 will be explained by using FIG. 10. The second model predictive controller 240 obtains the target values Xref and x(k) and generates a numeral vector b by substituting the target values Xref and outputs x(k) into b (FIG. 10: step S51). Then, the second model predictive controller 240 determines whether or not the constraint conditions are valid (step S53). There is a case where the setting is fixed, and a setting of valid or invalid may be inputted from the outside.
When the constraint conditions are valid, the constraint condition reflection unit 242 reads out the solution U*(i−1) obtained one sampling time before from the U storage unit 243, and calculates Vunderbar, Vtopbar, Wunderbar and Wtopbar as described above (step S55). Incidentally, when the constraint conditions are set each time, data of the constraint conditions is obtained each time to use the data at the step S55. Then, the constraint condition reflection unit 242 calculates M=M−diag (Vunderbar)+diag (Vtopbar) (step S57), and calculates b=b+Wunderbar−Wtopbar (step S59). Thus, the constraint conditions are reflected to M and b. After that, the processing shifts to the step S61.
When the constraint conditions are invalid or after the step S59, the simultaneous equation computing unit 241 solves the simultaneous linear equations MU=b by the well-known direct method to derive the solution U, and stores the solution U into the U storage unit 243 (step S61). The method itself is the same as the conventional one, but the used matrix and vector are completely different.
Namely, when the off-line matrix generation processing in this embodiment is not carried out, the matrix as illustrated in FIG. 11 is used. Specifically, the left side includes a product of a coefficient matrix including the coefficient matrices Abar and Bbar (Abar=I+ΔτA, Bbar=I+ΔτB) and components of the weight matrices S, Q and R of the performance index V, and a vector including the (the predictive horizon Hp*the number of inputs m) optimal inputs u*(i), the (the predictive horizon Hp*the number of outputs n) optimal outputs x*(i) and the (the predictive horizon Hp*the number of outputs n) optimal Lagrange multipliers λ*(i). On the other hand, the right side is a vector including ((the predictive horizon Hp*(the number of inputs m)*(the number of outputs n)) optimal Lagrange multipliers μ*(i), components of x(k), which is unresolved when the off-line matrix generation processing is carried out, and target values Xref.
Then, by carrying out the off-line matrix generation processing, elements to be considered are limited to the inputs u*(i) by transforming the optimal output states x*(i) and the optimal Lagrange multipliers λ*(i) into the expressions of the optimal inputs u*(i) and carrying out the substitution. Then, as for the optimal inputs u*, the optimal inputs u*(Hc) to u*(Hp−1) are excluded to reduce the number of elements to be resolved. After the aforementioned off-line matrix generation processing is carried out, the vector b as illustrated in FIG. 12 is obtained. Namely, the vector U in MU=b includes only (control horizon Hc) optimal inputs u*(i) as components. In addition, the function vector b is a function of the target values Xref and x(k), and includes Hc elements. The coefficient matrix M is a coefficient matrix to secure the equivalence with the equations before the off-line matrix generation processing, in a form of MU=b.
Even if there are constraint conditions, when the values of the constraint conditions and the values of the calculation results U*(i−1) obtained one sampling time before are set, the constraint conditions can be treated as constant values. Therefore, the shapes of the matrix and vector are the same.
Therefore, even when the same method to solve the simultaneous linear equations is used, the simultaneous linear equations in a completely different form are solved in this embodiment. Therefore, it is possible to largely reduce the processing load.
After that, the second model predictive controller 240 extracts the optimal input values u* from the solution U, and outputs the extracted values to the plant 230 (step S63). The optimal input values u* is a component u*(0) in the solution U. Then, the aforementioned processing is carried out until the processing is completed (step S65).
By carrying out the aforementioned processing, it becomes possible to obtain the optimal input values u* at high speed in this online processing. Incidentally, the target values Uref of the EGR valve opening degree and VNT nozzle opening degree, which are outputted from the planning unit 210, are added to u*, and the addition results are outputted to the plant 230.
Here, in addition to the settings of the aforementioned example 1, a case is considered that the following constraint conditions are additionally set.




  
    
      
        {
        
          
            
              
                
                  -
                  5
                
                <
                
                  u
                  1
                
                <
                5
              
            
          
          
            
              
                
                  -
                  1
                
                <
                
                  u
                  2
                
                <
                2
              
            
          
        
      
    
    
      
        (
        67
        )
      
    
  




Then, the following simultaneous linear equations are obtained.



  
    
      (
      
        
          (
          
            
              
                15104407
              
              
                
                  -
                  7896441
                
              
              
                36811445
              
              
                
                  -
                  2080975
                
              
            
            
              
                
                  -
                  7896441
                
              
              
                4129752
              
              
                
                  -
                  1920890
                
              
              
                1086695
              
            
            
              
                3119909
              
              
                
                  -
                  1628889
                
              
              
                765368
              
              
                
                  -
                  4315542
                
              
            
            
              
                
                  -
                  1721304
                
              
              
                899259
              
              
                
                  -
                  420937
                
              
              
                237638
              
            
          
          )
        
        -
        
          (
          
            
              
                
                  
                    
                      v
                      _
                    
                    1
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
              
              
                0
              
              
                0
              
              
                0
              
            
            
              
                0
              
              
                
                  
                    
                      v
                      _
                    
                    2
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
              
              
                0
              
              
                0
              
            
            
              
                0
              
              
                0
              
              
                
                  
                    
                      v
                      _
                    
                    1
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
              
              
                0
              
            
            
              
                0
              
              
                0
              
              
                0
              
              
                
                  
                    
                      v
                      _
                    
                    2
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
              
            
          
          )
        
        +
        
          (
          
            
              
                
                  
                    
                      v
                      _
                    
                    1
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
              
              
                0
              
              
                0
              
              
                0
              
            
            
              
                0
              
              
                
                  
                    
                      v
                      _
                    
                    2
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
              
              
                0
              
              
                0
              
            
            
              
                0
              
              
                0
              
              
                
                  
                    
                      v
                      _
                    
                    1
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
              
              
                0
              
            
            
              
                0
              
              
                0
              
              
                0
              
              
                
                  
                    
                      v
                      _
                    
                    2
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
              
            
          
          )
        
      
      )
    
    =
    
      

    
    ⁢
    
      
    
    ⁢
    
      (
      
        
          (
          
            
              
                
                  53760
                  -
                  
                    623835
                    ⁢
                    
                      
                        x
                        1
                      
                      ⁡
                      
                        (
                        k
                        )
                      
                    
                  
                  -
                  
                    6454848
                    ⁢
                    
                      
                        x
                        2
                      
                      ⁡
                      
                        (
                        k
                        )
                      
                    
                  
                
              
            
            
              
                
                  
                    -
                    28110
                  
                  +
                  
                    335845
                    ⁢
                    
                      
                        x
                        1
                      
                      ⁡
                      
                        (
                        k
                        )
                      
                    
                  
                  +
                  
                    3376413
                    ⁢
                    
                      
                        x
                        2
                      
                      ⁡
                      
                        (
                        k
                        )
                      
                    
                  
                
              
            
            
              
                
                  11120
                  -
                  
                    115403
                    ⁢
                    
                      
                        x
                        1
                      
                      ⁡
                      
                        (
                        k
                        )
                      
                    
                  
                  -
                  
                    1330685
                    ⁢
                    
                      
                        x
                        2
                      
                      ⁡
                      
                        (
                        k
                        )
                      
                    
                  
                
              
            
            
              
                
                  
                    -
                    6120
                  
                  +
                  
                    67233
                    ⁢
                    
                      
                        x
                        1
                      
                      ⁡
                      
                        (
                        k
                        )
                      
                    
                  
                  +
                  
                    734850
                    ⁢
                    
                      
                        x
                        2
                      
                      ⁡
                      
                        (
                        k
                        )
                      
                    
                  
                
              
            
          
          )
        
        +
        
          (
          
            
              
                
                  
                    
                      w
                      _
                    
                    1
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
              
            
            
              
                
                  
                    
                      w
                      _
                    
                    2
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
              
            
            
              
                
                  
                    
                      w
                      _
                    
                    1
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
              
            
            
              
                
                  
                    
                      w
                      _
                    
                    2
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
              
            
          
          )
        
        -
        
          (
          
            
              
                
                  
                    
                      w
                      _
                    
                    1
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
              
            
            
              
                
                  
                    
                      w
                      _
                    
                    2
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
              
            
            
              
                
                  
                    
                      w
                      _
                    
                    1
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
              
            
            
              
                
                  
                    
                      w
                      _
                    
                    2
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
              
            
          
          )
        
      
      )
    
  




  
    
      
    
    ⁢
    
      
        
          
            v
            _
          
          1
        
        ⁡
        
          (
          0
          )
        
      
      =
      
        -
        
          1
          
            4
            ⁢
            
              
                (
                
                  
                    
                      
                        u
                        ~
                      
                      1
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                  +
                  5
                
                )
              
              
                3
                /
                2
              
            
          
        
      
    
  




  
    
      
    
    ⁢
    
      
        
          
            v
            _
          
          2
        
        ⁡
        
          (
          0
          )
        
      
      =
      
        -
        
          1
          
            4
            ⁢
            
              
                (
                
                  
                    
                      
                        u
                        ~
                      
                      2
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                  +
                  1
                
                )
              
              
                3
                /
                2
              
            
          
        
      
    
  




  
    
      
    
    ⁢
    
      
        
          
            v
            _
          
          1
        
        ⁡
        
          (
          1
          )
        
      
      =
      
        -
        
          1
          
            4
            ⁢
            
              
                (
                
                  
                    
                      
                        u
                        ~
                      
                      1
                      *
                    
                    ⁡
                    
                      (
                      2
                      )
                    
                  
                  +
                  5
                
                )
              
              
                3
                /
                2
              
            
          
        
      
    
  




  
    
      
    
    ⁢
    
      
        
          
            v
            _
          
          2
        
        ⁡
        
          (
          1
          )
        
      
      =
      
        -
        
          1
          
            4
            ⁢
            
              
                (
                
                  
                    
                      
                        u
                        ~
                      
                      2
                      *
                    
                    ⁡
                    
                      (
                      2
                      )
                    
                  
                  +
                  1
                
                )
              
              
                3
                /
                2
              
            
          
        
      
    
  




  
    
      
    
    ⁢
    
      
        
          
            w
            _
          
          1
        
        ⁡
        
          (
          0
          )
        
      
      =
      
        
          1
          
            2
            ⁢
            
              
                
                  
                    
                      u
                      ~
                    
                    1
                    *
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
                +
                5
              
            
          
        
        +
        
          
            
              
                u
                ~
              
              1
              *
            
            ⁡
            
              (
              1
              )
            
          
          
            4
            ⁢
            
              
                (
                
                  
                    
                      
                        u
                        ~
                      
                      1
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                  +
                  5
                
                )
              
              
                3
                /
                2
              
            
          
        
      
    
  




  
    
      
    
    ⁢
    
      
        
          
            w
            _
          
          2
        
        ⁡
        
          (
          0
          )
        
      
      =
      
        
          1
          
            2
            ⁢
            
              
                
                  
                    
                      u
                      ~
                    
                    2
                    *
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
                +
                1
              
            
          
        
        +
        
          
            
              
                u
                ~
              
              1
              *
            
            ⁡
            
              (
              1
              )
            
          
          
            4
            ⁢
            
              
                (
                
                  
                    
                      
                        u
                        ~
                      
                      2
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                  +
                  1
                
                )
              
              
                3
                /
                2
              
            
          
        
      
    
  




  
    
      
    
    ⁢
    
      
        
          
            w
            _
          
          1
        
        ⁡
        
          (
          1
          )
        
      
      =
      
        
          1
          
            2
            ⁢
            
              
                
                  
                    
                      u
                      ~
                    
                    1
                    *
                  
                  ⁡
                  
                    (
                    2
                    )
                  
                
                +
                5
              
            
          
        
        +
        
          
            
              
                u
                ~
              
              1
              *
            
            ⁡
            
              (
              2
              )
            
          
          
            4
            ⁢
            
              
                (
                
                  
                    
                      
                        u
                        ~
                      
                      1
                      *
                    
                    ⁡
                    
                      (
                      2
                      )
                    
                  
                  +
                  5
                
                )
              
              
                3
                /
                2
              
            
          
        
      
    
  




  
    
      
    
    ⁢
    
      
        
          
            w
            _
          
          2
        
        ⁡
        
          (
          1
          )
        
      
      =
      
        
          1
          
            2
            ⁢
            
              
                
                  
                    
                      u
                      ~
                    
                    2
                    *
                  
                  ⁡
                  
                    (
                    2
                    )
                  
                
                +
                1
              
            
          
        
        +
        
          
            
              
                u
                ~
              
              1
              *
            
            ⁡
            
              (
              2
              )
            
          
          
            4
            ⁢
            
              
                (
                
                  
                    
                      
                        u
                        ~
                      
                      2
                      *
                    
                    ⁡
                    
                      (
                      2
                      )
                    
                  
                  +
                  1
                
                )
              
              
                3
                /
                2
              
            
          
        
      
    
  




  
    
      
    
    ⁢
    
      
        
          
            v
            _
          
          1
        
        ⁡
        
          (
          0
          )
        
      
      =
      
        1
        
          4
          ⁢
          
            
              (
              
                5
                -
                
                  
                    
                      u
                      ~
                    
                    1
                    *
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
              
              )
            
            
              3
              /
              2
            
          
        
      
    
  




  
    
      
    
    ⁢
    
      
        
          
            v
            _
          
          2
        
        ⁡
        
          (
          0
          )
        
      
      =
      
        1
        
          4
          ⁢
          
            
              (
              
                2
                -
                
                  
                    
                      u
                      ~
                    
                    2
                    *
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
              
              )
            
            
              3
              /
              2
            
          
        
      
    
  




  
    
      
    
    ⁢
    
      
        
          
            v
            _
          
          1
        
        ⁡
        
          (
          1
          )
        
      
      =
      
        1
        
          4
          ⁢
          
            
              (
              
                5
                -
                
                  
                    
                      u
                      ~
                    
                    1
                    *
                  
                  ⁡
                  
                    (
                    2
                    )
                  
                
              
              )
            
            
              2
              /
              3
            
          
        
      
    
  




  
    
      
    
    ⁢
    
      
        
          
            v
            _
          
          2
        
        ⁡
        
          (
          1
          )
        
      
      =
      
        1
        
          4
          ⁢
          
            
              (
              
                2
                -
                
                  
                    
                      u
                      ~
                    
                    2
                    *
                  
                  ⁡
                  
                    (
                    2
                    )
                  
                
              
              )
            
            
              3
              /
              2
            
          
        
      
    
  




  
    
      
    
    ⁢
    
      
        
          
            w
            _
          
          1
        
        ⁡
        
          (
          0
          )
        
      
      =
      
        
          -
          
            1
            
              2
              ⁢
              
                
                  5
                  -
                  
                    
                      
                        u
                        ~
                      
                      1
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                
              
            
          
        
        -
        
          
            
              
                u
                ~
              
              1
              *
            
            ⁡
            
              (
              1
              )
            
          
          
            4
            ⁢
            
              
                (
                
                  5
                  -
                  
                    
                      
                        u
                        ~
                      
                      1
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                
                )
              
              
                3
                /
                2
              
            
          
        
      
    
  




  
    
      
    
    ⁢
    
      
        
          
            w
            _
          
          2
        
        ⁡
        
          (
          0
          )
        
      
      =
      
        
          1
          
            2
            ⁢
            
              
                2
                -
                
                  
                    
                      u
                      ~
                    
                    2
                    *
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
              
            
          
        
        -
        
          
            
              
                u
                ~
              
              1
              *
            
            ⁡
            
              (
              1
              )
            
          
          
            4
            ⁢
            
              
                (
                
                  2
                  -
                  
                    
                      
                        u
                        ~
                      
                      2
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                
                )
              
              
                3
                /
                2
              
            
          
        
      
    
  




  
    
      
    
    ⁢
    
      
        
          
            w
            _
          
          1
        
        ⁡
        
          (
          1
          )
        
      
      =
      
        
          -
          
            1
            
              2
              ⁢
              
                
                  5
                  -
                  
                    
                      
                        u
                        ~
                      
                      1
                      *
                    
                    ⁡
                    
                      (
                      2
                      )
                    
                  
                
              
            
          
        
        -
        
          
            
              
                u
                ~
              
              1
              *
            
            ⁡
            
              (
              2
              )
            
          
          
            4
            ⁢
            
              
                (
                
                  5
                  -
                  
                    
                      
                        u
                        ~
                      
                      1
                      *
                    
                    ⁡
                    
                      (
                      2
                      )
                    
                  
                
                )
              
              
                3
                /
                2
              
            
          
        
      
    
  




  
    
      
    
    ⁢
    
      
        
          
            w
            _
          
          2
        
        ⁡
        
          (
          1
          )
        
      
      =
      
        
          -
          
            1
            
              2
              ⁢
              
                
                  2
                  -
                  
                    
                      
                        u
                        ~
                      
                      2
                      *
                    
                    ⁡
                    
                      (
                      2
                      )
                    
                  
                
              
            
          
        
        -
        
          
            
              
                u
                ~
              
              1
              *
            
            ⁡
            
              (
              2
              )
            
          
          
            4
            ⁢
            
              
                (
                
                  2
                  -
                  
                    
                      
                        u
                        ~
                      
                      2
                      *
                    
                    ⁡
                    
                      (
                      2
                      )
                    
                  
                
                )
              
              
                3
                /
                2
              
            
          
        
      
    
  



As described above, by simplifying the problem to be solved using the algebraic method in the off-line processing to reduce the calculation amount in the online processing, the direct method for the simultaneous equations is adopted for the linear model predictive control. Then, it is possible to calculate the solution at high speed so that this embodiment is effective to the mechanical system having high-speed dynamics, and to stably obtain the solution. Furthermore, even if the dimension of the states x(k) of the plant increases, it becomes possible to suppress the increase of the calculation amount. Therefore, it becomes possible to carry out the real-time control for the plant.
In addition, the linear approximation is limited only to the portion that the constraint conditions are considered, and the deterioration of the accuracy is also suppressed as much as possible.
Incidentally, in case where the expressions (53-1) and (53-2) and expressions (60) and (61) are obtained, when these expressions are substituted into the expression (10) (in case of the 2-input and 2-output system, the expressions (19) and (20)), the terms μ*(i) are eliminated. Then, it is possible to further substitute the expression (41) into the expressions obtained after the aforementioned transformation.
Specifically, an off-line matrix generation apparatus 600 as illustrated in FIG. 13 is introduced. The difference with FIG. 7 is as follows: a point that the fourth transformation processing unit 501 is removed, a point that a second simultaneous equation generator 502 is introduced instead of the simultaneous equation generator 109, and a point that the second simultaneous equation generator 502 uses data stored in the input data storage unit 102. Moreover, the expressions (53-1) and (53-2) and expressions (60) and (61) are stored in the input data storage unit 102.
Then, as illustrated in FIG. 14, the steps S31 to S37 in the processing flow are the same. After the step S37, the second simultaneous equation generator 502 generates the simultaneous equations by carrying out the aforementioned substitution processing, and stores data of the generated simultaneous equations into the fourth data storage unit 110 (step S51).
After that, the matrix generator 111 generates the matrix M2 and vector b2 in M2 U=b by using data stored in the fourth data storage unit 110, and stores the generated matrix and vector into the fifth data storage unit 112 (step S53). This step is basically the same as the step S11. Therefore, the detailed explanation is omitted. However, because the terms that are not constants are included in the expressions (53-1) and (53-2) and expressions (60) and (61), the contents of the matrix M2 and b2 are different from those of the matrix M and vector b.
[Embodiment 2]
In this embodiment, the explanation is made for the 2-input and 2-output system. However, this embodiment can be applied to the m-input and n-output system by the similar method.
When the performance index V described in the first embodiment is digitized from the prediction section Hp and control section Hc, the performance index is represented as follows:




  J
  =
  
    
      
        ∑
        
          i
          =
          1
        
        
          Hp
          -
          1
        
      
      ⁢
      
        
      
      ⁢
      
        {
        
          
            
              (
              
                Xref
                -
                
                  
                    x
                    *
                  
                  ⁡
                  
                    (
                    i
                    )
                  
                
              
              )
            
            T
          
          ⁢
          
            Q
            ⁡
            
              (
              
                Xref
                -
                
                  
                    x
                    *
                  
                  ⁡
                  
                    (
                    i
                    )
                  
                
              
              )
            
          
        
        }
      
    
    +
    
      
        
          (
          
            Xref
            -
            
              
                x
                *
              
              ⁡
              
                (
                Hp
                )
              
            
          
          )
        
        T
      
      ⁢
      
        S
        ⁡
        
          (
          
            Xref
            -
            
              
                x
                *
              
              ⁡
              
                (
                Hp
                )
              
            
          
          )
        
      
    
    +
    
      
        ∑
        
          i
          =
          0
        
        
          Hp
          -
          1
        
      
      ⁢
      
        
      
      ⁢
      
        {
        
          
            
              
                u
                *
              
              ⁡
              
                (
                i
                )
              
            
            T
          
          ⁢
          
            
              Ru
              *
            
            ⁡
            
              (
              i
              )
            
          
        
        }
      
    
    -
    
      
        ∑
        
          i
          =
          0
        
        
          Hp
          -
          1
        
      
      ⁢
      
        
      
      ⁢
      
        (
        
          
            
              
                p
                _
              
              T
            
            ⁢
            
              u
              α
            
          
          +
          
            
              
                p
                _
              
              T
            
            ⁢
            
              u
              β
            
          
        
        )
      
    
  




However, u*(Hc)=u*(Hc+1)= . . . =u*(Hp−1).
Moreover, the weight matrix is defined as follows:




  
    Q
    =
    
      (
      
        
          
            
              q
              1
            
          
          
            0
          
        
        
          
            0
          
          
            
              q
              2
            
          
        
      
      )
    
  
  ,
  
    

  
  ⁢
  
    R
    =
    
      (
      
        
          
            
              r
              1
            
          
          
            0
          
        
        
          
            0
          
          
            
              r
              2
            
          
        
      
      )
    
  
  ,
  
    

  
  ⁢
  
    S
    =
    
      (
      
        
          
            
              s
              1
            
          
          
            0
          
        
        
          
            0
          
          
            
              s
              2
            
          
        
      
      )
    
  
  ,
  
    

  
  ⁢
  
    
      
        x
        *
      
      ⁡
      
        (
        i
        )
      
    
    =
    
      (
      
        
          
            
              
                x
                1
                *
              
              ⁡
              
                (
                i
                )
              
            
          
        
        
          
            
              
                x
                2
                *
              
              ⁡
              
                (
                i
                )
              
            
          
        
      
      )
    
  
  ,
  
    

  
  ⁢
  
    
      
        u
        *
      
      ⁡
      
        (
        i
        )
      
    
    =
    
      (
      
        
          
            
              
                u
                1
                *
              
              ⁡
              
                (
                i
                )
              
            
          
        
        
          
            
              
                u
                2
                *
              
              ⁡
              
                (
                i
                )
              
            
          
        
      
      )
    
  
  ,
  
    

  
  ⁢
  
    Xref
    =
    
      (
      
        
          
            
              Xref
              1
            
          
        
        
          
            
              Xref
              2
            
          
        
      
      )
    
  




The optimization problem that minimizes the digitized performance index J returns to the problem to solve the following simultaneous equations.




   
  
    {
    
      
        
          
            
              
                ∂
                J
              
              
                ∂
                
                  
                    u
                    1
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
              
            
            =
            0
          
        
        
          
            
              
            
            ⁢
            
              (
              68
              )
            
          
        
      
      
        
          
            
              
                ∂
                J
              
              
                ∂
                
                  
                    u
                    2
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
              
            
            =
            0
          
        
        
          
            
              
            
            ⁢
            
              (
              69
              )
            
          
        
      
      
        
          
            
              
                ∂
                J
              
              
                ∂
                
                  
                    u
                    1
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
              
            
            =
            0
          
        
        
          
            
              
            
            ⁢
            
              (
              70
              )
            
          
        
      
      
        
          ⋮
        
        
          
            
          
        
      
      
        
          
            
              
                ∂
                J
              
              
                ∂
                
                  
                    u
                    2
                  
                  ⁡
                  
                    (
                    
                      Hc
                      -
                      1
                    
                    )
                  
                
              
            
            =
            0
          
        
        
          
            
              
            
            ⁢
            
              (
              71
              )
            
          
        
      
    
  




On the other hand, the digitized performance index J is written down as follows:




  
    
      
        J
        =
      
    
    
      
        
          
            
              
                
                  
                    q
                    1
                  
                  ⁡
                  
                    (
                    
                      
                        Xref
                        1
                      
                      -
                      
                        
                          x
                          1
                          *
                        
                        ⁡
                        
                          (
                          1
                          )
                        
                      
                    
                    )
                  
                
                2
              
              +
              
                
                  
                    q
                    1
                  
                  ⁡
                  
                    (
                    
                      
                        Xref
                        1
                      
                      -
                      
                        
                          x
                          1
                          *
                        
                        ⁡
                        
                          (
                          2
                          )
                        
                      
                    
                    )
                  
                
                2
              
              +
              ...
              +
            
          
        
        
          
            
              
                
                  
                    q
                    1
                  
                  ⁡
                  
                    (
                    
                      
                        Xref
                        1
                      
                      -
                      
                        
                          x
                          1
                          *
                        
                        ⁡
                        
                          (
                          
                            Hp
                            -
                            1
                          
                          )
                        
                      
                    
                    )
                  
                
                2
              
              +
            
          
        
      
    
  
  
    
      
        
      
    
    
      
        
          
            
              
                
                  
                    q
                    2
                  
                  ⁡
                  
                    (
                    
                      
                        Xref
                        2
                      
                      -
                      
                        
                          x
                          2
                          *
                        
                        ⁡
                        
                          (
                          1
                          )
                        
                      
                    
                    )
                  
                
                2
              
              +
              
                
                  
                    q
                    2
                  
                  ⁡
                  
                    (
                    
                      
                        Xref
                        2
                      
                      -
                      
                        
                          x
                          2
                          *
                        
                        ⁡
                        
                          (
                          2
                          )
                        
                      
                    
                    )
                  
                
                2
              
              +
              ...
              +
            
          
        
        
          
            
              
                
                  
                    q
                    2
                  
                  ⁡
                  
                    (
                    
                      
                        Xref
                        2
                      
                      -
                      
                        
                          x
                          2
                          *
                        
                        ⁡
                        
                          (
                          
                            Hp
                            -
                            1
                          
                          )
                        
                      
                    
                    )
                  
                
                2
              
              +
            
          
        
      
    
  
  
    
      
        
      
    
    
      
        
          
            
              s
              1
            
            ⁡
            
              (
              
                
                  Xref
                  1
                
                -
                
                  
                    x
                    1
                    *
                  
                  ⁡
                  
                    (
                    Hp
                    )
                  
                
              
              )
            
          
          2
        
        +
        
          
            
              s
              2
            
            ⁡
            
              (
              
                
                  Xref
                  2
                
                -
                
                  
                    x
                    2
                    *
                  
                  ⁡
                  
                    (
                    Hp
                    )
                  
                
              
              )
            
          
          2
        
        +
      
    
  
  
    
      
        
      
    
    
      
        
          
            
              
                
                  r
                  1
                
                ⁢
                
                  
                    
                      u
                      1
                      *
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                  2
                
              
              +
              
                
                  r
                  1
                
                ⁢
                
                  
                    
                      u
                      1
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                  2
                
              
              +
              ...
              +
              
                
                  r
                  1
                
                ⁢
                
                  
                    
                      u
                      1
                      *
                    
                    ⁡
                    
                      (
                      
                        Hc
                        -
                        2
                      
                      )
                    
                  
                  2
                
              
              +
            
          
        
        
          
            
              
                
                  (
                  
                    Hp
                    -
                    Hc
                    +
                    1
                  
                  )
                
                ⁢
                
                  r
                  1
                
                ⁢
                
                  
                    
                      u
                      1
                      *
                    
                    ⁡
                    
                      (
                      
                        Hc
                        -
                        1
                      
                      )
                    
                  
                  2
                
              
              +
            
          
        
      
    
  
  
    
      
        
      
    
    
      
        
          
            
              
                
                  r
                  2
                
                ⁢
                
                  
                    
                      u
                      2
                      *
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                  2
                
              
              +
              
                
                  r
                  2
                
                ⁢
                
                  
                    
                      u
                      2
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                  2
                
              
              +
              ...
              +
              
                
                  r
                  2
                
                ⁢
                
                  
                    
                      u
                      2
                      *
                    
                    ⁡
                    
                      (
                      
                        Hc
                        -
                        2
                      
                      )
                    
                  
                  2
                
              
              +
            
          
        
        
          
            
              
                
                  (
                  
                    Hp
                    -
                    Hc
                    +
                    1
                  
                  )
                
                ⁢
                
                  r
                  2
                
                ⁢
                
                  
                    
                      u
                      2
                      *
                    
                    ⁡
                    
                      (
                      
                        Hc
                        -
                        1
                      
                      )
                    
                  
                  2
                
              
              -
            
          
        
      
    
  
  
    
      
        
      
    
    
      
        
          ∑
          
            i
            =
            0
          
          
            Hp
            -
            1
          
        
        ⁢
        
          
        
        ⁢
        
          (
          
            
              
                
                  p
                  _
                
                T
              
              ⁢
              
                u
                α
              
            
            +
            
              
                
                  p
                  _
                
                T
              
              ⁢
              
                u
                β
              
            
          
          )
        
      
    
  




Here, the performance index J is considered, separately in a form as follows:




  
    
      
        J
        =
      
    
    
      
        
          
            
              
                
                  
                    
                      
                        
                          q
                          1
                        
                        ⁡
                        
                          (
                          
                            
                              Xref
                              1
                            
                            -
                            
                              
                                x
                                1
                                *
                              
                              ⁡
                              
                                (
                                1
                                )
                              
                            
                          
                          )
                        
                      
                      2
                    
                    +
                    
                      
                        
                          q
                          1
                        
                        ⁡
                        
                          (
                          
                            
                              Xref
                              1
                            
                            -
                            
                              
                                x
                                1
                                *
                              
                              ⁡
                              
                                (
                                2
                                )
                              
                            
                          
                          )
                        
                      
                      2
                    
                    +
                    ...
                    +
                  
                
              
              
                
                  
                    
                      
                        
                          q
                          1
                        
                        ⁡
                        
                          (
                          
                            
                              Xref
                              1
                            
                            -
                            
                              
                                x
                                1
                                *
                              
                              ⁡
                              
                                (
                                
                                  Hp
                                  -
                                  1
                                
                                )
                              
                            
                          
                          )
                        
                      
                      
                        2
                                              
                    
                    +
                  
                
              
            
          
        
        
          
            
              
                
                  
                    
                      
                        
                          q
                          2
                        
                        ⁡
                        
                          (
                          
                            
                              Xref
                              2
                            
                            -
                            
                              
                                x
                                2
                                *
                              
                              ⁡
                              
                                (
                                1
                                )
                              
                            
                          
                          )
                        
                      
                      2
                    
                    +
                    
                      
                        
                          q
                          2
                        
                        ⁡
                        
                          (
                          
                            
                              Xref
                              2
                            
                            -
                            
                              
                                x
                                2
                                *
                              
                              ⁡
                              
                                (
                                2
                                )
                              
                            
                          
                          )
                        
                      
                      2
                    
                    +
                    ...
                    +
                  
                
              
              
                
                  
                    
                      
                        
                          q
                          2
                        
                        ⁡
                        
                          (
                          
                            
                              Xref
                              2
                            
                            -
                            
                              
                                x
                                2
                                *
                              
                              ⁡
                              
                                (
                                
                                  Hp
                                  -
                                  1
                                
                                )
                              
                            
                          
                          )
                        
                      
                      2
                    
                    +
                  
                
              
            
          
        
        
          
            
              
                
                  
                    s
                    1
                  
                  ⁡
                  
                    (
                    
                      
                        Xref
                        1
                      
                      -
                      
                        
                          x
                          1
                          *
                        
                        ⁡
                        
                          (
                          Hp
                          )
                        
                      
                    
                    )
                  
                
                2
              
              +
              
                
                  
                    s
                    2
                  
                  ⁡
                  
                    (
                    
                      
                        Xref
                        2
                      
                      -
                      
                        
                          x
                          2
                          *
                        
                        ⁡
                        
                          (
                          Hp
                          )
                        
                      
                    
                    )
                  
                
                2
              
              +
            
          
        
      
    
  
  
    
      
        
      
    
    
      
        
          
            
              
                
                  
                    
                      
                        r
                        1
                      
                      ⁢
                      
                        
                          
                            u
                            1
                            *
                          
                          ⁡
                          
                            (
                            0
                            )
                          
                        
                        2
                      
                    
                    +
                    
                      
                        r
                        1
                      
                      ⁢
                      
                        
                          
                            u
                            1
                            *
                          
                          ⁡
                          
                            (
                            1
                            )
                          
                        
                        2
                      
                    
                    +
                    ...
                    +
                    
                      
                        r
                        1
                      
                      ⁢
                      
                        
                          
                            u
                            1
                            *
                          
                          ⁡
                          
                            (
                            
                              Hc
                              -
                              2
                            
                            )
                          
                        
                        2
                      
                    
                    +
                  
                
              
              
                
                  
                    
                      
                        (
                        
                          Hp
                          -
                          Hc
                          +
                          1
                        
                        )
                      
                      ⁢
                      
                        r
                        1
                      
                      ⁢
                      
                        
                          
                            u
                            1
                            *
                          
                          ⁡
                          
                            (
                            
                              Hc
                              -
                              1
                            
                            )
                          
                        
                        2
                      
                    
                    +
                  
                
              
            
          
        
        
          
            
              
                
                  
                    
                      
                        r
                        2
                      
                      ⁢
                      
                        
                          
                            u
                            2
                            *
                          
                          ⁡
                          
                            (
                            0
                            )
                          
                        
                        2
                      
                    
                    +
                    
                      
                        r
                        2
                      
                      ⁢
                      
                        
                          
                            u
                            2
                            *
                          
                          ⁡
                          
                            (
                            1
                            )
                          
                        
                        2
                      
                    
                    +
                    ...
                    +
                    
                      
                        r
                        2
                      
                      ⁢
                      
                        
                          
                            u
                            2
                            *
                          
                          ⁡
                          
                            (
                            
                              Hc
                              -
                              2
                            
                            )
                          
                        
                        2
                      
                    
                    +
                  
                
              
              
                
                  
                    
                      
                        (
                        
                          Hp
                          -
                          Hc
                          +
                          1
                        
                        )
                      
                      ⁢
                      
                        r
                        2
                      
                      ⁢
                      
                        
                          
                            u
                            2
                            *
                          
                          ⁡
                          
                            (
                            
                              Hc
                              -
                              1
                            
                            )
                          
                        
                        
                          2
                                                  
                      
                    
                    -
                  
                
              
            
          
        
      
    
  
  
    
      
        
      
    
    
      
        
          ∑
          
            i
            =
            0
          
          
            Hp
            -
            1
          
        
        ⁢
        
          
        
        ⁢
        
          
            (
            
              
                
                  
                    p
                    _
                  
                  T
                
                ⁢
                
                  u
                  α
                
              
              +
              
                
                  
                    p
                    _
                  
                  T
                
                ⁢
                
                  u
                  β
                
              
            
            )
          
                  
      
    
  




Namely, J=J1+J2+CONS is held, and CONS is a term for the constraint conditions. When there are no constraint conditions, CONS is treated as being 0, and when CONS is not 0, CONS can be processed similarly to the first embodiment. Therefore, a method for processing J′=J1+J2 is considered. Then, the expressions (68) to (71) can be obtained by carrying out the following calculation.



  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        1
      
      
        ∂
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
    
    ,
    ...
    ⁢
    
      
    
    ,
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        1
      
      
        ∂
        
          
            u
            1
            *
          
          ⁡
          
            (
            
              Hc
              -
              1
            
            )
          
        
      
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        1
      
      
        ∂
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
    
    ,
    ...
    ⁢
    
      
    
    ,
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        1
      
      
        ∂
        
          
            u
            2
            *
          
          ⁡
          
            (
            
              Hc
              -
              1
            
            )
          
        
      
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        2
      
      
        ∂
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
    
    ,
    ...
    ⁢
    
      
    
    ,
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        2
      
      
        ∂
        
          
            u
            1
            *
          
          ⁡
          
            (
            
              Hc
              -
              1
            
            )
          
        
      
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        2
      
      
        ∂
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
    
    ,
    ...
    ⁢
    
      
    
    ,
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        2
      
      
        ∂
        
          
            u
            2
            *
          
          ⁡
          
            (
            
              Hc
              -
              1
            
            )
          
        
      
    
  



Here, as depicted in the expression (37), x1*(i) and x2*(i) are represented as a linear expression of u1*(0), u2*(0), . . . , u1*(Hc−1) and u2*(Hc−1). Therefore, ∂J1/∂u1*(0) is represented as follows:




  
    
      
        
          
            
              ∂
              J
            
            ⁢
            
              
            
            ⁢
            1
          
          
            ∂
            
              
                u
                1
                *
              
              ⁡
              
                (
                0
                )
              
            
          
        
        =
        
          
            
              -
              2
            
            ⁢
            
              
                q
                1
              
              ⁡
              
                (
                
                  
                    Xref
                    1
                  
                  -
                  
                    
                      x
                      1
                      *
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                
                )
              
            
            ⁢
            
              (
              
                coefficient
                ⁢
                
                  
                
                ⁢
                of
                ⁢
                
                  
                
                ⁢
                
                  
                    u
                    1
                    *
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
                ⁢
                
                  
                
                ⁢
                in
                ⁢
                
                  
                
                ⁢
                
                  
                    x
                    1
                    *
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
              
              )
            
          
          -
          
            2
            ⁢
            
              
                q
                1
              
              ⁡
              
                (
                
                  
                    Xref
                    1
                  
                  -
                  
                    
                      x
                      1
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                
                )
              
            
            ⁢
            
              (
              
                coefficient
                ⁢
                
                  
                
                ⁢
                of
                ⁢
                
                  
                
                ⁢
                
                  
                    u
                    1
                    *
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
                ⁢
                
                  
                
                ⁢
                in
                ⁢
                
                  
                
                ⁢
                
                  
                    x
                    1
                    *
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
              
              )
            
          
          -
          ...
          -
          
            2
            ⁢
            
              
                q
                1
              
              ⁡
              
                (
                
                  
                    Xref
                    1
                  
                  -
                  
                    
                      x
                      1
                      *
                    
                    ⁡
                    
                      (
                      
                        Hp
                        -
                        1
                      
                      )
                    
                  
                
                )
              
            
            ⁢
            
              (
              
                coefficient
                ⁢
                
                  
                
                ⁢
                of
                ⁢
                
                  
                
                ⁢
                
                  
                    u
                    1
                    *
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
                ⁢
                
                  
                
                ⁢
                in
                ⁢
                
                  
                
                ⁢
                
                  
                    x
                    1
                    *
                  
                  ⁡
                  
                    (
                    
                      Hp
                      -
                      1
                    
                    )
                  
                
              
              )
            
          
          -
          
            2
            ⁢
            
              
                q
                2
              
              ⁡
              
                (
                
                  
                    Xref
                    2
                  
                  -
                  
                    
                      x
                      2
                      *
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                
                )
              
            
            ⁢
            
              (
              
                coefficient
                ⁢
                
                  
                
                ⁢
                of
                ⁢
                
                  
                
                ⁢
                
                  
                    u
                    1
                    *
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
                ⁢
                
                  
                
                ⁢
                in
                ⁢
                
                  
                
                ⁢
                
                  
                    x
                    2
                    *
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
              
              )
            
          
          -
          
            2
            ⁢
            
              
                q
                2
              
              ⁡
              
                (
                
                  
                    Xref
                    2
                  
                  -
                  
                    
                      x
                      2
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                
                )
              
            
            ⁢
            
              (
              
                coefficient
                ⁢
                
                  
                
                ⁢
                of
                ⁢
                
                  
                
                ⁢
                
                  
                    u
                    1
                    *
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
                ⁢
                
                  
                
                ⁢
                in
                ⁢
                
                  
                
                ⁢
                
                  
                    x
                    2
                    *
                  
                  ⁡
                  
                    (
                    1
                    )
                  
                
              
              )
            
          
          -
          ...
          -
          
            2
            ⁢
            
              
                q
                2
              
              ⁡
              
                (
                
                  
                    Xref
                    2
                  
                  -
                  
                    
                      x
                      2
                      *
                    
                    ⁡
                    
                      (
                      
                        Hp
                        -
                        1
                      
                      )
                    
                  
                
                )
              
            
            ⁢
            
              (
              
                coefficient
                ⁢
                
                  
                
                ⁢
                of
                ⁢
                
                  
                
                ⁢
                
                  
                    u
                    1
                    *
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
                ⁢
                
                  
                
                ⁢
                in
                ⁢
                
                  
                
                ⁢
                
                  
                    x
                    2
                    *
                  
                  ⁡
                  
                    (
                    
                      Hp
                      -
                      1
                    
                    )
                  
                
              
              )
            
          
          -
          
            2
            ⁢
            
              
                s
                1
              
              ⁡
              
                (
                
                  
                    Xref
                    1
                  
                  -
                  
                    
                      x
                      1
                      *
                    
                    ⁡
                    
                      (
                      Hp
                      )
                    
                  
                
                )
              
            
            ⁢
            
              (
              
                coefficient
                ⁢
                
                  
                
                ⁢
                of
                ⁢
                
                  
                
                ⁢
                
                  
                    u
                    1
                    *
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
                ⁢
                
                  
                
                ⁢
                in
                ⁢
                
                  
                
                ⁢
                
                  
                    x
                    1
                    *
                  
                  ⁡
                  
                    (
                    Hp
                    )
                  
                
              
              )
            
          
          -
          
            2
            ⁢
            
              
                s
                2
              
              ⁡
              
                (
                
                  
                    Xref
                    2
                  
                  -
                  
                    
                      x
                      2
                      *
                    
                    ⁡
                    
                      (
                      Hp
                      )
                    
                  
                
                )
              
            
            ⁢
            
              (
              
                coefficient
                ⁢
                
                  
                
                ⁢
                of
                ⁢
                
                  
                
                ⁢
                
                  
                    u
                    1
                    *
                  
                  ⁡
                  
                    (
                    0
                    )
                  
                
                ⁢
                
                  
                
                ⁢
                in
                ⁢
                
                  
                
                ⁢
                
                  
                    x
                    2
                    *
                  
                  ⁡
                  
                    (
                    Hp
                    )
                  
                
              
              )
            
          
        
      
    
    
      
        (
        72
        )
      
    
  




When writing down as described above, it is possible to obtain a specific expression of the expression (68) by substituting x1*(i) and x2*(i) and a coefficient of u1*(0) in x1*(0) and the like into the expression (72). It is possible to transform expressions other than the expression (68) among the expressions (68) to (71) into a similar form, and by similarly substituting the expressions and coefficients, the specific expressions can be obtained. Namely, the expression like the expression (72) is prepared in advance for each of the expressions (68) to (71).
Then, the expressions after the substitution are arranged into the linear expressions of u1*(0), u2*(0), . . . , u1*(Hc−1) and u2*(Hc−1). Then, the following expressions are obtained.




  
    
      
        
          
            
              
                
                  
                    ∂
                    J
                  
                  ⁢
                  
                    
                  
                  ⁢
                  1
                
                
                  ∂
                  
                    
                      u
                      1
                      *
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                
              
              =
              
                
                  
                    m
                    
                      1
                      ,
                      1
                    
                  
                  ⁢
                  
                    
                      u
                      1
                      *
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                
                +
                
                  
                    m
                    
                      1
                      ,
                      2
                    
                  
                  ⁢
                  
                    
                      u
                      2
                      *
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                
                +
                
                  
                    m
                    
                      1
                      ,
                      2
                    
                  
                  ⁢
                  
                    
                      u
                      1
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                
                +
                ...
                +
              
            
          
        
        
          
            
              
                
                  m
                  
                    1
                    ,
                    
                      2
                      ⁢
                      
                        
                      
                      ⁢
                      Hc
                    
                  
                
                ⁢
                
                  
                    u
                    2
                    *
                  
                  ⁡
                  
                    (
                    
                      Hc
                      -
                      1
                    
                    )
                  
                
              
              +
              
                
                  b
                  1
                
                ⁡
                
                  (
                  
                    Xref
                    ,
                    
                      x
                      ⁡
                      
                        (
                        k
                        )
                      
                    
                  
                  )
                
              
            
          
        
      
    
    
      
        (
        73
        )
      
    
  
  
    
      
        
          
            
              
                
                  
                    ∂
                    J
                  
                  ⁢
                  
                    
                  
                  ⁢
                  1
                
                
                  ∂
                  
                    
                      u
                      2
                      *
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                
              
              =
              
                
                  
                    m
                    
                      2
                      ,
                      1
                    
                  
                  ⁢
                  
                    
                      u
                      1
                      *
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                
                +
                
                  
                    m
                    
                      2
                      ,
                      2
                    
                  
                  ⁢
                  
                    
                      u
                      2
                      *
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                
                +
                
                  
                    m
                    
                      2
                      ,
                      2
                    
                  
                  ⁢
                  
                    
                      u
                      1
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                
                +
                ...
                +
              
            
          
        
        
          
            
              
                
                  m
                  
                    2
                    ,
                    
                      2
                      ⁢
                      
                        
                      
                      ⁢
                      Hc
                    
                  
                
                ⁢
                
                  
                    u
                    2
                    *
                  
                  ⁡
                  
                    (
                    
                      Hc
                      -
                      1
                    
                    )
                  
                
              
              +
              
                
                  b
                  2
                
                ⁡
                
                  (
                  
                    Xref
                    ,
                    
                      x
                      ⁡
                      
                        (
                        k
                        )
                      
                    
                  
                  )
                
              
            
          
        
        
          
            ⋮
          
        
      
    
    
      
        (
        74
        )
      
    
  
  
    
      
        
          
            
              
                
                  
                    ∂
                    J
                  
                  ⁢
                  
                    
                  
                  ⁢
                  1
                
                
                  ∂
                  
                    
                      u
                      2
                      *
                    
                    ⁡
                    
                      (
                      
                        Hc
                        -
                        1
                      
                      )
                    
                  
                
              
              =
              
                
                  
                    m
                    
                      
                        2
                        ⁢
                        
                          
                        
                        ⁢
                        Hc
                      
                      ,
                      1
                    
                  
                  ⁢
                  
                    
                      u
                      1
                      *
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                
                +
                
                  
                    m
                    
                      
                        2
                        ⁢
                        
                          
                        
                        ⁢
                        Hc
                      
                      ,
                      2
                    
                  
                  ⁢
                  
                    
                      u
                      2
                      *
                    
                    ⁡
                    
                      (
                      0
                      )
                    
                  
                
                +
                
                  
                    m
                    
                      
                        2
                        ⁢
                        
                          
                        
                        ⁢
                        Hc
                      
                      ,
                      2
                    
                  
                  ⁢
                  
                    
                      u
                      1
                      *
                    
                    ⁡
                    
                      (
                      1
                      )
                    
                  
                
                +
                ...
                +
              
            
          
        
        
          
            
              
                
                  m
                  
                    
                      2
                      ⁢
                      
                        
                      
                      ⁢
                      Hc
                    
                    ,
                    
                      2
                      ⁢
                      Hc
                    
                  
                
                ⁢
                
                  
                    u
                    2
                    *
                  
                  ⁡
                  
                    (
                    
                      Hc
                      -
                      1
                    
                    )
                  
                
              
              +
              
                
                  b
                  
                    2
                    ⁢
                    Hc
                  
                
                ⁡
                
                  (
                  
                    Xref
                    ,
                    
                      x
                      ⁡
                      
                        (
                        k
                        )
                      
                    
                  
                  )
                
              
            
          
        
      
    
    
      
        (
        75
        )
      
    
  




Incidentally, b1 (Xref, x(k)) or the like is a constant term in a form of the linear expression of the target value Xref, initial state x1(k) and x2 (k) (i.e. the constant term in case of viewing, as variables, u1*(0), u2*(0), . . . , u1*(Hc−1) and u2*(Hc−1)).
Then, as illustrated in FIG. 15, a matrix M1 is generated by extracting and arranging coefficients of u1*(0), u2*(0), . . . , u1*(Hc−1) and u2*(Hc−1). Furthermore, the b vector is generated by extracting terms other than terms of u1*(0), u2*(0), . . . , u1*(Hc−1) and u2*(Hc−1), and arranging them after reversing the signs of them.
In addition, when the partial differentiation of J2 is calculated with respect to each of u1*(0), u2*(0), . . . , u1*(Hc−1) and u2*(Hc−1), the results are obtained as follows:




  
    
      
        
          
            
              ∂
              J
            
            ⁢
            
              
            
            ⁢
            2
          
          
            ∂
            
              
                u
                1
                *
              
              ⁡
              
                (
                0
                )
              
            
          
        
        =
        
          2
          ⁢
          
            r
            1
          
        
      
    
    
      
        (
        76
        )
      
    
  
  
    
      
        
          
            
              
                ∂
                J
              
              ⁢
              
                
              
              ⁢
              2
            
            
              ∂
              
                
                  u
                  2
                  *
                
                ⁡
                
                  (
                  0
                  )
                
              
            
          
          =
          
            2
            ⁢
            
              r
              2
            
          
        
        ⁢
        
          

        
        ⁢
        ⋮
      
    
    
      
        (
        77
        )
      
    
  
  
    
      
        
          
            
              ∂
              J
            
            ⁢
            
              
            
            ⁢
            2
          
          
            ∂
            
              
                u
                1
                *
              
              ⁡
              
                (
                
                  Hc
                  -
                  2
                
                )
              
            
          
        
        =
        
          2
          ⁢
          
            r
            1
          
        
      
    
    
      
        (
        78
        )
      
    
  
  
    
      
        
          
            
              ∂
              J
            
            ⁢
            
              
            
            ⁢
            2
          
          
            ∂
            
              
                u
                2
                *
              
              ⁡
              
                (
                
                  Hc
                  -
                  2
                
                )
              
            
          
        
        =
        
          2
          ⁢
          
            r
            2
          
        
      
    
    
      
        (
        79
        )
      
    
  
  
    
      
        
          
            
              ∂
              J
            
            ⁢
            
              
            
            ⁢
            2
          
          
            ∂
            
              
                u
                1
                *
              
              ⁡
              
                (
                
                  Hc
                  -
                  1
                
                )
              
            
          
        
        =
        
          2
          ⁢
          
            (
            
              Hp
              -
              Hc
              +
              1
            
            )
          
          ⁢
          
            r
            1
          
        
      
    
    
      
        (
        80
        )
      
    
  
  
    
      
        
          
            
              ∂
              J
            
            ⁢
            
              
            
            ⁢
            2
          
          
            ∂
            
              
                u
                2
                *
              
              ⁡
              
                (
                
                  Hc
                  -
                  1
                
                )
              
            
          
        
        =
        
          2
          ⁢
          
            (
            
              Hp
              -
              Hc
              +
              1
            
            )
          
          ⁢
          
            r
            2
          
        
      
    
    
      
        (
        81
        )
      
    
  




Thus, when the weight matrix R, the predictive section Hp and control section Hc are prepared, the values can be obtained. Therefore, the following matrix M2 are prepared in advance, and by setting the weight matrix R, predictive section Hp and control section Hc, the matrix M2 can be obtained. However, in this embodiment, because the expressions (72) and the like are prepared after the Hp and Hc were determined in advance, it is assumed that Hc and Hp have been set into the matrix M2.




  
    
      
        
          M
          ⁢
          
            
          
          ⁢
          2
        
        =
        
          (
          
            
              
                
                  2
                  ⁢
                  
                    r
                    1
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
            
            
              
                
                  
                
              
              
                
                  2
                  ⁢
                  
                    r
                    2
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
              
                0
              
              
                
                  
                
              
            
            
              
                
                  
                
              
              
                
                  
                
              
              
                ⋱
              
              
                
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
            
            
              
                
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
              
                
                  2
                  ⁢
                  
                    r
                    1
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
            
            
              
                
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
              
                
                  2
                  ⁢
                  
                    r
                    2
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
            
            
              
                
                  
                
              
              
                0
              
              
                
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
              
                
                  2
                  ⁢
                  
                    (
                    
                      Hp
                      -
                      Hc
                      +
                      1
                    
                    )
                  
                  ⁢
                  
                    r
                    1
                  
                
              
              
                
                  
                
              
            
            
              
                
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
              
                
                  
                
              
              
                
                  2
                  ⁢
                  
                    (
                    
                      Hp
                      -
                      Hc
                      +
                      1
                    
                    )
                  
                  ⁢
                  
                    r
                    2
                  
                
              
            
          
          )
        
      
    
    
      
        (
        82
        )
      
    
  




Then, M=M1+M2 is executed by using M1 obtained as described above and M2. As a result, M and b to calculate the same solution as the processing result in the first embodiment can be obtained. The constraint conditions can be treated similarly to the first embodiment.
For example, it is assumed that the following matrices and the like are set.




  
    A
    =
    
      (
      
        
          
            2
          
          
            1
          
        
        
          
            
              -
              1
            
          
          
            3
          
        
      
      )
    
  
  ,
  
    

  
  ⁢
  
    B
    =
    
      (
      
        
          
            
              -
              1
            
          
          
            1
          
        
        
          
            
              -
              10
            
          
          
            5
          
        
      
      )
    
  
  ,
  
    

  
  ⁢
  
    S
    =
    
      Q
      =
      
        (
        
          
            
              100
            
            
              0
            
          
          
            
              0
            
            
              1
            
          
        
        )
      
    
  
  ,
  
    

  
  ⁢
  
    R
    =
    
      (
      
        
          
            1
          
          
            0
          
        
        
          
            0
          
          
            1
          
        
      
      )
    
  
  ,
  
    

  
  ⁢
  
    Hp
    =
    4
  
  ,
  
    Hc
    =
    2
  




Then, it is assumed that the following linear expressions are obtained as the expressions (37).

x1*(1)=−u1*(0)+u2*(0)+2x1(k)+x2(k)  (83)

x2*(1)=−10u1*(0)+5u2*(0)−x1(k)+3x2(k)  (84)

x1*(2)=−12u1*(0)+7u2*(0)−u1*(1)+u2*(2)+3x1(k)+5x2(k)  (85)

x2*(2)=−29u1*(0)+17u2*(0)−10u1*(1)+5u2*(2)−5x1(k)+8x2(k)  (86)

x1*(3)=−53u1*(0)+28u2*(0)−13u1*(1)+8u2*(2)−x1(k)+18x2(k)  (87)

x2*(3)=−75u1*(0)+35u2*(0)−39u1*(1)+19u2*(2)−18x1(k)+19x2(k)  (88)

x1*(4)=−181u1*(0)+91u2*(0)−66u1*(1)+36u2*(2)−16x1(k)+55x2(k)  (89)

x2*(4)=−172u1*(0)+77u2*(0)−114u1*(1)+54u2*(2)−55x1(k)+39x2(k)  (90)

Then, when the expressions (83) to (90) and coefficients of uj*(i) are substituted into the expressions (72) and the like, the following expressions can be obtained.




  
    
      
        
          
            
              ∂
              J
            
            ⁢
            
              
            
            ⁢
            1
          
          
            ∂
            
              
                u
                1
                *
              
              ⁡
              
                (
                0
                )
              
            
          
        
        =
        
          
            7215300
            ⁢
            
              
                u
                1
                *
              
              ⁡
              
                (
                0
                )
              
            
          
          -
          
            3640650
            ⁢
            
              
                u
                2
                *
              
              ⁡
              
                (
                0
                )
              
            
          
          +
          
            2575046
            ⁢
            
              
                u
                1
                *
              
              ⁡
              
                (
                1
                )
              
            
          
          -
          
            1412116
            ⁢
            
              
                u
                2
                *
              
              ⁡
              
                (
                1
                )
              
            
          
          +
          
            582930
            ⁢
            
              
                x
                1
              
              ⁡
              
                (
                k
                )
              
            
          
          -
          
            2210790
            ⁢
            
              
                x
                2
              
              ⁡
              
                (
                k
                )
              
            
          
          +
          55120
        
      
    
    
      
        (
        91
        )
      
    
  
  
    
      
        
          
            
              ∂
              J
            
            ⁢
            
              
            
            ⁢
            1
          
          
            ∂
            
              
                u
                2
                *
              
              ⁡
              
                (
                0
                )
              
            
          
        
        =
        
          
            
              -
              3640650
            
            ⁢
            
              
            
            ⁢
            
              
                u
                1
                *
              
              ⁡
              
                (
                0
                )
              
            
          
          +
          
            1837750
            ⁢
            
              
            
            ⁢
            
              
                u
                2
                *
              
              ⁡
              
                (
                0
                )
              
            
          
          -
          
            1295966
            ⁢
            
              
            
            ⁢
            
              
                u
                1
                *
              
              ⁡
              
                (
                1
                )
              
            
          
          +
          
            711186
            ⁢
            
              
            
            ⁢
            
              
                u
                2
                *
              
              ⁡
              
                (
                1
                )
              
            
          
          -
          
            290880
            ⁢
            
              
            
            ⁢
            
              
                x
                1
              
              ⁡
              
                (
                k
                )
              
            
          
          +
          
            1116590
            ⁢
            
              
            
            ⁢
            
              
                x
                2
              
              ⁡
              
                (
                k
                )
              
            
          
          -
          28020
        
      
    
    
      
        (
        92
        )
      
    
  
  
    
      
        
          
            
              ∂
              J
            
            ⁢
            
              
            
            ⁢
            1
          
          
            ∂
            
              
                u
                1
                *
              
              ⁡
              
                (
                1
                )
              
            
          
        
        =
        
          
            2575046
            ⁢
            
              
            
            ⁢
            
              
                u
                1
                *
              
              ⁡
              
                (
                0
                )
              
            
          
          -
          
            1295966
            ⁢
            
              
            
            ⁢
            
              
                u
                2
                *
              
              ⁡
              
                (
                0
                )
              
            
          
          +
          
            934434
            ⁢
            
              
            
            ⁢
            
              
                u
                1
                *
              
              ⁡
              
                (
                1
                )
              
            
          
          -
          
            510094
            ⁢
            
              
            
            ⁢
            
              
                u
                2
                *
              
              ⁡
              
                (
                1
                )
              
            
          
          +
          
            222044
            ⁢
            
              
            
            ⁢
            
              
                x
                1
              
              ⁡
              
                (
                k
                )
              
            
          
          -
          
            784334
            ⁢
            
              
            
            ⁢
            
              
                x
                2
              
              ⁡
              
                (
                k
                )
              
            
          
          +
          19260
        
      
    
    
      
        (
        93
        )
      
    
  
  
    
      
        
          
            
              ∂
              J
            
            ⁢
            
              
            
            ⁢
            1
          
          
            ∂
            
              
                u
                2
                *
              
              ⁡
              
                (
                1
                )
              
            
          
        
        =
        
          
            
              -
              1412116
            
            ⁢
            
              
            
            ⁢
            
              
                u
                1
                *
              
              ⁡
              
                (
                0
                )
              
            
          
          +
          
            711186
            ⁢
            
              
            
            ⁢
            
              
                u
                2
                *
              
              ⁡
              
                (
                0
                )
              
            
          
          -
          
            510094
            ⁢
            
              
            
            ⁢
            
              
                u
                1
                *
              
              ⁡
              
                (
                1
                )
              
            
          
          +
          
            278804
            ⁢
            
              
            
            ⁢
            
              
                u
                2
                *
              
              ⁡
              
                (
                1
                )
              
            
          
          -
          
            119674
            ⁢
            
              
            
            ⁢
            
              
                x
                1
              
              ⁡
              
                (
                k
                )
              
            
          
          +
          
            430814
            ⁢
            
              
            
            ⁢
            
              
                x
                2
              
              ⁡
              
                (
                k
                )
              
            
          
          -
          10560
        
      
    
    
      
        (
        94
        )
      
    
  




When the coefficients of u1*(0), u2*(0), u1*(1) and u2*(1) are extracted from the expressions (91) to (94), the following matrix M1 can be obtained.




  
    M
    ⁢
    
      
    
    ⁢
    1
  
  =
  
    (
    
      
        
          7215300
        
        
          
            -
            3640650
          
        
        
          2575046
        
        
          
            -
            1412116
          
        
      
      
        
          
            -
            3640650
          
        
        
          1837750
        
        
          
            -
            1295966
          
        
        
          711186
        
      
      
        
          2575046
        
        
          
            -
            1295966
          
        
        
          934434
        
        
          
            -
            510094
          
        
      
      
        
          
            -
            1412116
          
        
        
          711186
        
        
          
            -
            510094
          
        
        
          278804
        
      
    
    )
  




Furthermore, when the terms other than the terms of u1*(0), u2*(0), u1*(1) and u2*(1) are extracted and their signs are reversed, the following vector b can be obtained.




  b
  =
  
    (
    
      
        
          
            
              
                -
                582930
              
              ⁢
              
                
                  x
                  1
                
                ⁡
                
                  (
                  k
                  )
                
              
            
            +
            
              2210790
              ⁢
              
                
                  x
                  2
                
                ⁡
                
                  (
                  k
                  )
                
              
            
            -
            55120
          
        
      
      
        
          
            
              290880
              ⁢
              
                
                  x
                  1
                
                ⁡
                
                  (
                  k
                  )
                
              
            
            -
            
              1116590
              ⁢
              
                
                  x
                  2
                
                ⁡
                
                  (
                  k
                  )
                
              
            
            +
            28020
          
        
      
      
        
          
            
              
                -
                222044
              
              ⁢
              
                
                  x
                  1
                
                ⁡
                
                  (
                  k
                  )
                
              
            
            +
            
              784334
              ⁢
              
                
                  x
                  2
                
                ⁡
                
                  (
                  k
                  )
                
              
            
            -
            19260
          
        
      
      
        
          
            
              119674
              ⁢
              
                
                  x
                  1
                
                ⁡
                
                  (
                  k
                  )
                
              
            
            -
            
              430814
              ⁢
              
                
                  x
                  2
                
                ⁡
                
                  (
                  k
                  )
                
              
            
            +
            10560
          
        
      
    
    )
  




In addition, when the element values of the matrix R and Hc and Hp are substituted into the matrix M2, the following matrix can be obtained.




  
    M
    ⁢
    
      
    
    ⁢
    2
  
  =
  
    (
    
      
        
          2
        
        
          0
        
        
          0
        
        
          0
        
      
      
        
          0
        
        
          2
        
        
          0
        
        
          0
        
      
      
        
          0
        
        
          0
        
        
          6
        
        
          0
        
      
      
        
          0
        
        
          0
        
        
          0
        
        
          6
        
      
    
    )
  




Then, the following matrix M can be obtained.




  M
  =
  
    
      
        M
        ⁢
        
          
        
        ⁢
        1
      
      +
      
        M
        ⁢
        
          
        
        ⁢
        2
      
    
    =
    
      (
      
        
          
            7215302
          
          
            
              -
              3640650
            
          
          
            2575046
          
          
            
              -
              1412116
            
          
        
        
          
            
              -
              3640650
            
          
          
            1837752
          
          
            
              -
              1295966
            
          
          
            711186
          
        
        
          
            2575046
          
          
            
              -
              1295966
            
          
          
            934440
          
          
            
              -
              510094
            
          
        
        
          
            
              -
              1412116
            
          
          
            711186
          
          
            
              -
              510094
            
          
          
            278810
          
        
      
      )
    
  




Thus, the calculation amount is reduced compared with the first embodiment, and the matrix M and vector b can be generated at high speed.
[Case where No Constraint Condition is Considered]
Next, FIG. 16 illustrates a configuration example (without the constraint conditions) of an off-line matrix generation apparatus 700 to generate the aforementioned matrix M and vector b. The off-line matrix generation apparatus 700 has an input unit 101, input data storage unit 102, first transformation processing unit 103, first data storage unit 104, second matrix generator 701, ninth data storage unit 702, substitution processing unit 703, sixth data storage unit 704, first matrix generator 705, seventh data storage unit 706, third matrix generator 707, and eighth data storage unit 708. The input unit 101, input data storage unit 102, first transformation processing unit 103 and first data storage unit 104 are almost the same as the elements illustrated in the first embodiment.
The input unit 101 accepts inputs of the matrices A, B, S, Q and R, and Δτ, and stores them into the input data storage unit 102. The input data storage unit 102 also stores data representing the simultaneous equations to be solved in addition to those data and the expressions of the partial differentiations of the portion J1 in the performance index, such as the expression (72) and the like and data of the matrix M2. Data of the simultaneous equations to be solved (the expressions (8) and (9) and in case of the 2-input and 2-output system, the expressions (15) to (18)) may be inputted from the input unit 101. Moreover, the first transformation processing unit 103 carries out a first transformation processing by using data stored in the input data storage unit 102, and stores processing results into the first data storage unit 104. Incidentally, the input unit 101 or first transformation processing unit 103 may carry out a processing to substitute the element values of the matrices A and B and the like into the relating simultaneous equations.
The second matrix generator 701 generates the matrix M2 from data (i.e. data of the matrix M2 and weight matrix R) stored in the input data storage unit 102, and stores the generated matrix M2 into the ninth data storage unit 702. The substitution processing unit 703 carries out a processing to substitute the aforementioned expression (37) and its coefficients into the expressions (72) and the like by using data stored in the input data storage unit 102 and first data storage unit 104, and stores the processing results into the sixth data storage unit 704. In addition, the substitution processing unit 703 also carries out a processing to substitute the elements values of the matrices S and Q and the like into the expressions (72) and the like.
The first matrix generator 705 carries out a processing to generate the matrix M1 and vector b by using data stored in the sixth data storage unit 704, and stores the matrix M1 into the seventh data storage unit 706, and stores the vector b into the eighth data storage unit 708. The third matrix generator 707 adds the matrices M1 and M2 stored in the ninth data storage unit 702 and the seventh data storage unit 706, and stores the matrix M as the addition result into the eighth data storage unit 708. Thus, the matrix M and vector b are stored in the eighth data storage unit 708.
Next, a processing flow of the off-line matrix generation apparatus 700 depicted in FIG. 16 is explained by using FIG. 17. First, the input unit 101 accepts inputs of the matrices A, B, S, Q and R, and Δτ, and stores the input data into the input data storage unit 102 (FIG. 17: step S61). Data of the simultaneous equations to be solved may be inputted from the input unit 101, and may be stored into the input data storage unit 102.
Then, the first transformation processing unit 103 carries out the first transformation processing for the optimal output state x*(i) by using data stored in the input data storage unit 102, and stores the linear expressions (i.e. the expressions (37)) as the processing results into the first data storage unit 104 (step S63). This step is the same as the step S3. Therefore, the detailed explanation is omitted. However, after data of the matrices A and B may be substituted at this step, the aforementioned processing is carried out.
Then, the substitution processing unit 703 reads out data of the matrices Q and S and data of the expressions (72) and the like (i.e. the partial differentiation expressions of the portion J1 in the performance index J) from the input data storage unit 102, reads out data of the linear expressions as the processing results of the first transformation processing from the first data storage unit 104, and carries out a processing to substitute element values of the matrices Q and S, the linear expressions as the processing results of the first transformation processing and its coefficients into the expressions (72) and the like to arrange the substitution results, and stores the processing results (the expressions (73) to (75)) into the sixth data storage unit 704 (step S65).
Furthermore, the first matrix generator 705 generates the matrix M1 by extracting coefficient values of u1*(0), u2*(0), . . . , u1*(Hc−1) and U2*(Hc−1) from the processing results of the substitution processing, which is stored in the sixth data storage unit 704, and stores the matrix M1 into the seventh data storage unit 706, and further generates the vector b by extracting constant terms and reversing the signs of them, and stores the vector b into the eighth data storage unit 708 (step S67).
On the other hand, the second matrix generator 701 reads out the element values of the weight matrix R and the expressions of the matrix M2 (the expressions (82)) from the input data storage unit 102, and generates the matrix M2 by substituting the element values of the weight matrix R into the expressions of the matrix M2, and stores the generated matrix M2 into the ninth data storage unit 702 (step S69).
After that, the third matrix generator 707 generates the matrix M by adding the matrix M1 stored in the seventh data storage unit 706 and the matrix M2 stored in the ninth data storage unit 702, and stores the generated matrix M into the eighth data storage unit 708 (step S71).
By carrying out such a processing, the matrix M and vector b are generated, and will be processed in the engine control apparatus in FIG. 5.
[Case where the Constraint Condition is Considered]
In case where the constraint conditions are valid, an off-line matrix generation apparatus 800 as illustrated in FIG. 18 is used. The difference with the off-line matrix generation apparatus 700 illustrated in FIG. 16 is a point that the fourth transformation processing unit 501 introduced when the constraint conditions are considered in the first embodiment is introduced. Namely, the fourth transformation processing unit 501 generates Vtopbar, Vunderbar, Wtopbar and Wunderbar from data stored in the input data storage unit 102, and stores them into the eighth data storage unit 708.
Therefore, as for a processing flow in case where the constraint conditions are considered, as illustrated in FIG. 19, a point that the step S73 that is a step to carry out the constraint linear approximation calculation executed by the fourth transformation processing unit 501 is added is different from FIG. 17. The step S73 is the same as the step S39 in FIG. 8, and the vectors represented by the expressions (63) to (66) are generated and stored into the eighth data storage unit 708.
By carrying out such a processing, the matrix M and vector b and Vtopbar, Vunderbar, Wtopbar and Wunderbar which relate to the constraint conditions, are generated, and they will be processed in the engine control apparatus in FIG. 9.
[Embodiment 3]
In the first and second embodiments, the matrix M and vector b are generated after embedding the element values of the weight matrices Q, R and S. Therefore, when it is determined whether or not the element values of the weight matrices is appropriate, by carrying out simulation instead of the actual engine control apparatus and it is determined that the element values of the weight matrices are not appropriate, the matrix M and vector b have to be regenerated and the simulation has to be carried out again. Thus, it takes a long time to generate appropriate matrix M and vector b. Then, by adopting the following measures, it is possible to avoid the repetition of the generating the matrix and vector, and only element values of the weight matrices only have to be changed in the simulation.
Specifically, a portion J′ of the performance index J is divided as follows:




Namely, the terms in J1 are grouped for each element of the weight matrices, basically. Specifically, J3 includes terms to which the element q1 of the weight matrix Q is multiplied, J4 includes terms to which the element q2 of the weight matrix Q is multiplied, J5 includes terms to which the element s1 of the weight matrix S is multiplied, and J6 includes terms to which the element s2 of the weight matrix S is multiplied. Even in case of a system other than the 2-input and 2-output system, the division is similarly carried out. Incidentally, J2 is treated similarly to the second embodiment. In addition, the constraint conditions are also treated similarly to the second embodiment.
Therefore, the minimizing the performance index J is divided into calculating the following partial differentiations, similarly to the second embodiment.



  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        3
      
      
        ∂
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
    
    ,
    ...
    ⁢
    
      
    
    ,
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        3
      
      
        ∂
        
          
            u
            2
            *
          
          ⁡
          
            (
            
              Hc
              -
              1
            
            )
          
        
      
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        4
      
      
        ∂
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
    
    ,
    ...
    ⁢
    
      
    
    ,
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        4
      
      
        ∂
        
          
            u
            2
            *
          
          ⁡
          
            (
            
              Hc
              -
              1
            
            )
          
        
      
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        5
      
      
        ∂
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
    
    ,
    ...
    ⁢
    
      
    
    ,
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        5
      
      
        ∂
        
          
            u
            2
            *
          
          ⁡
          
            (
            
              Hc
              -
              1
            
            )
          
        
      
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        6
      
      
        ∂
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
    
    ,
    ...
    ⁢
    
      
    
    ,
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        6
      
      
        ∂
        
          
            u
            2
            *
          
          ⁡
          
            (
            
              Hc
              -
              1
            
            )
          
        
      
    
  



However, in order to treat, as variables, the element values of the weight matrices, the portion obtained by excluding q1 in case of J3, for example, is treated as J31, as described below, and the expressions of the partial differentiation are prepared as follows:




  
    
      
        
          
            J
            ⁢
            
              
            
            ⁢
            3
          
          =
          
            
              
                q
                1
              
              ⁡
              
                (
                
                  
                    
                      
                        
                          
                            (
                            
                              
                                Xref
                                1
                              
                              -
                              
                                
                                  x
                                  1
                                  *
                                
                                ⁡
                                
                                  (
                                  1
                                  )
                                
                              
                            
                            )
                          
                          2
                        
                        +
                        
                          
                            (
                            
                              
                                Xref
                                1
                              
                              -
                              
                                
                                  x
                                  1
                                  *
                                
                                ⁡
                                
                                  (
                                  2
                                  )
                                
                              
                            
                            )
                          
                          2
                        
                        +
                        ...
                        +
                      
                    
                  
                  
                    
                      
                        
                          (
                          
                            
                              Xref
                              1
                            
                            -
                            
                              
                                x
                                1
                                *
                              
                              ⁡
                              
                                (
                                
                                  Hp
                                  -
                                  1
                                
                                )
                              
                            
                          
                          )
                        
                        2
                      
                    
                  
                
                )
              
            
                      
        
        ⁢
        
          

        
        ⁢
        
          
            
              
                
                  
                    
                      ∂
                      J
                    
                    ⁢
                    
                      
                    
                    ⁢
                    31
                  
                  
                    ∂
                    
                      
                        u
                        1
                        *
                      
                      ⁡
                      
                        (
                        0
                        )
                      
                    
                  
                
                =
              
            
            
              
                
                  -
                  2
                
                ⁢
                
                  (
                  
                    
                      
                        (
                        
                          
                            Xref
                            1
                          
                          -
                          
                            
                              x
                              1
                              *
                            
                            ⁡
                            
                              (
                              0
                              )
                            
                          
                        
                        )
                      
                      ⁢
                      
                        (
                        
                          coefficient
                          ⁢
                          
                            
                          
                          ⁢
                          of
                          ⁢
                          
                            
                          
                          ⁢
                          
                            
                              u
                              1
                              *
                            
                            ⁡
                            
                              (
                              0
                              )
                            
                          
                          ⁢
                          
                            
                          
                          ⁢
                          in
                          ⁢
                          
                            
                          
                          ⁢
                          
                            
                              x
                              1
                              *
                            
                            ⁡
                            
                              (
                              0
                              )
                            
                          
                        
                        )
                      
                    
                    +
                  
                
              
            
          
          
            
              
                
              
            
            
              
                
                  
                    (
                    
                      
                        Xref
                        1
                      
                      -
                      
                        
                          x
                          1
                          *
                        
                        ⁡
                        
                          (
                          1
                          )
                        
                      
                    
                    )
                  
                  ⁢
                  
                    (
                    
                      coefficient
                      ⁢
                      
                        
                      
                      ⁢
                      of
                      ⁢
                      
                        
                      
                      ⁢
                      
                        
                          u
                          1
                          *
                        
                        ⁡
                        
                          (
                          0
                          )
                        
                      
                      ⁢
                      
                        
                      
                      ⁢
                      in
                      ⁢
                      
                        
                      
                      ⁢
                      
                        
                          x
                          1
                          *
                        
                        ⁡
                        
                          (
                          1
                          )
                        
                      
                    
                    )
                  
                
                +
                ...
                +
              
            
          
          
            
              
                
              
            
            
              
                
                  
                    (
                    
                      
                        Xref
                        1
                      
                      -
                      
                        
                          x
                          1
                          *
                        
                        ⁡
                        
                          (
                          
                            Hp
                            -
                            1
                          
                          )
                        
                      
                    
                    )
                  
                  ⁢
                  
                    (
                    
                      coefficient
                      ⁢
                      
                        
                      
                      ⁢
                      of
                      ⁢
                      
                        
                      
                      ⁢
                      
                        
                          u
                          1
                          *
                        
                        ⁡
                        
                          (
                          0
                          )
                        
                      
                      ⁢
                      
                        
                      
                      ⁢
                      in
                      ⁢
                      
                        
                      
                      ⁢
                      
                        
                          x
                          1
                          *
                        
                        ⁡
                        
                          (
                          
                            Hp
                            -
                            1
                          
                          )
                        
                      
                    
                    )
                  
                
                )
              
            
          
        
      
    
    
      
        (
        95
        )
      
    
  




The expressions of the partial differentiation like the expression (95) are prepared for each of u1*(0), u2*(0), . . . , u1*(Hc−1) and u2*(Hc−1), and the expressions (37) and its coefficients in the expressions (37) are substituted into the expressions of the partial differentiation. Then, the expressions after the substitution are arranged with respect to each of u1*(0), u2*(0), . . . , u1*(Hc−1) and u2*(Hc−1). Then, similarly to the second embodiment, the coefficients of u1*(0), u2*(0), . . . , u1*(Hc−1) and u2*(Hc−1) are extracted to generate the matrix M3, and constant terms are extracted to generate the vector b3.
As for the portion J41 obtained by excluding the elements of the weight matrices from J4, the expressions of the partial differentiation like the expression (95) are prepared for each of u1*(0), u2*(0), . . . , u1*(Hc−1) and u2*(Hc−1), and the expressions (37) and its coefficients in the expressions (37) are substituted into the expressions of the partial differentiation. Then, the expressions after the substitution are further arranged with respect to each of u1*(0), u2*(0), . . . , u1*(Hc−1) and u2*(Hc−1). Then, similarly to the second embodiment, the coefficients of u1*(0), u2*(0), . . . , u1*(Hc−1) and u2*(Hc−1) are extracted to generate the matrix M4, and constant terms are extracted to generate the vector b4.
By similarly processing J5 and J6, the matric M5 and vector b5 and the matrix M6 and vector b6 are generated.
Finally, the matrix M and vector b to be generated are represented as follows:

M=q1M3+q2M4+s1M5+s2M6+M2  (93)

b=q1b3+q2b4+s1b5+s2b6  (94)

However, the respective matrices and vectors may be stored in association with the corresponding elements of the weight matrices without the aforementioned addition. Then, before the simulation is carried out, the matrices S, Q and R are set and the matrix M and vector b are generated by the expressions (93) and (94) to carry out the simulation.
For example, it is assumed that the matrices A and B are set as follows, Hp=4 and Hc=2 are set, and the matrices Q, R and S are 2*2 diagonal matrices as follows:



  
    
      A
      =
      
        (
        
          
            
              2
            
            
              1
            
          
          
            
              
                -
                1
              
            
            
              3
            
          
        
        )
      
    
    ,
    
      B
      =
      
        (
        
          
            
              
                -
                1
              
            
            
              1
            
          
          
            
              
                -
                10
              
            
            
              5
            
          
        
        )
      
    
  




  
    
      Q
      =
      
        (
        
          
            
              
                q
                1
              
            
            
              0
            
          
          
            
              0
            
            
              
                q
                2
              
            
          
        
        )
      
    
    ,
    
      R
      =
      
        (
        
          
            
              
                r
                1
              
            
            
              0
            
          
          
            
              0
            
            
              
                r
                2
              
            
          
        
        )
      
    
    ,
    
      S
      =
      
        (
        
          
            
              
                s
                1
              
            
            
              0
            
          
          
            
              0
            
            
              
                s
                2
              
            
          
        
        )
      
    
  



Then, when the expressions (37) are the expressions (83) to (90), the results of the partial differentiation of J31 is as follows:



  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        31
      
      
        ∂
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
    
    =
    
      
        5908
        ⁢
        
          
        
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      -
      
        3138
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      +
      
        1402
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      -
      
        872
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      -
      
        182
        ⁢
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      
        2030
        ⁢
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      132
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        31
      
      
        ∂
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
    
    =
    
      
        
          -
          3138
        
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      +
      
        1668
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      -
      
        742
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      +
      
        462
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      +
      
        102
        ⁢
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      
        1080
        ⁢
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      72
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        31
      
      
        ∂
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
    
    =
    
      
        1402
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      -
      
        742
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      +
      
        340
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      -
      
        210
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      -
      
        32
        ⁢
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      
        478
        ⁢
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      28
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        31
      
      
        ∂
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
    
    =
    
      
        
          -
          872
        
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      +
      
        462
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      -
      
        210
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      +
      
        130
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      +
      
        22
        ⁢
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      
        298
        ⁢
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      18
    
  



Therefore, the matrix M3 and vector b3 are represented as follows:



  
    
      M
      ⁢
      
        
      
      ⁢
      3
    
    =
    
      (
      
        
          
            5908
          
          
            
              -
              3138
            
          
          
            1402
          
          
            
              -
              872
            
          
        
        
          
            
              -
              3138
            
          
          
            1668
          
          
            
              -
              742
            
          
          
            462
          
        
        
          
            1402
          
          
            
              -
              742
            
          
          
            340
          
          
            
              -
              210
            
          
        
        
          
            
              -
              872
            
          
          
            462
          
          
            
              -
              210
            
          
          
            130
          
        
      
      )
    
  




  
    
      b
      ⁢
      
        
      
      ⁢
      3
    
    =
    
      (
      
        
          
            
              
                182
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              
                2030
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              132
            
          
        
        
          
            
              
                
                  -
                  102
                
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              
                1080
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              72
            
          
        
        
          
            
              
                32
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              
                478
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              28
            
          
        
        
          
            
              
                
                  -
                  22
                
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              
                298
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              18
            
          
        
      
      )
    
  



In addition, the results of the partial differentiation of J41 is as follows:



  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        41
      
      
        ∂
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
    
    =
    
      
        13132
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      -
      
        6162
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      +
      
        6430
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      -
      
        3140
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      +
      
        3010
        ⁢
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      
        3374
        ⁢
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      2280
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        41
      
      
        ∂
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
    
    =
    
      
        
          -
          6162
        
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      +
      
        2892
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      -
      
        3010
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      +
      
        1470
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      -
      
        1410
        ⁢
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      
        1584
        ⁢
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      1080
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        41
      
      
        ∂
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
    
    =
    
      
        6430
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      -
      
        3010
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      +
      
        3242
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      -
      
        1582
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      +
      
        1504
        ⁢
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      
        1642
        ⁢
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      980
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        41
      
      
        ∂
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
    
    =
    
      
        
          -
          3140
        
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      +
      
        1470
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      -
      
        1582
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      +
      
        772
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      -
      
        734
        ⁢
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      
        802
        ⁢
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      480
    
  



Therefore, the matrix M4 and vector b4 are represented as follows:



  
    
      M
      ⁢
      
        
      
      ⁢
      4
    
    =
    
      (
      
        
          
            13132
          
          
            
              -
              6162
            
          
          
            6430
          
          
            
              -
              3140
            
          
        
        
          
            
              -
              6162
            
          
          
            2892
          
          
            
              -
              3010
            
          
          
            1470
          
        
        
          
            6430
          
          
            
              -
              3010
            
          
          
            3242
          
          
            
              -
              1582
            
          
        
        
          
            
              -
              3140
            
          
          
            1470
          
          
            
              -
              1582
            
          
          
            772
          
        
      
      )
    
  




  
    
      b
      ⁢
      
        
      
      ⁢
      4
    
    =
    
      (
      
        
          
            
              
                
                  -
                  3010
                
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              
                3374
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              2280
            
          
        
        
          
            
              
                1410
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              
                1584
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              1080
            
          
        
        
          
            
              
                
                  -
                  1504
                
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              
                1642
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              980
            
          
        
        
          
            
              
                734
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              
                802
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              480
            
          
        
      
      )
    
  



Furthermore, the results of the partial differentiation of J51 is as follows:



  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        51
      
      
        ∂
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
    
    =
    
      
        65522
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      -
      
        3294
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      +
      
        23892
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      -
      
        13032
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      +
      
        5792
        ⁢
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      
        19910
        ⁢
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      362
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        51
      
      
        ∂
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
    
    =
    
      
        
          -
          32942
        
        ⁢
        
          
        
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      +
      
        16562
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      -
      
        12012
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      +
      
        6552
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      -
      
        2912
        ⁢
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      
        10010
        ⁢
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      182
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        51
      
      
        ∂
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
    
    =
    
      
        23892
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      -
      
        12012
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      +
      
        8712
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      -
      
        4752
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      +
      
        2112
        ⁢
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      
        7260
        ⁢
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      132
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        51
      
      
        ∂
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
    
    =
    
      
        
          -
          13032
        
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      +
      
        6552
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      -
      
        4752
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      +
      
        2592
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      -
      
        1152
        ⁢
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      
        3960
        ⁢
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      72
    
  



Therefore, the matrix M5 and vector b5 are represented as follows:



  
    
      M
      ⁢
      
        
      
      ⁢
      5
    
    =
    
      (
      
        
          
            65522
          
          
            
              -
              3294
            
          
          
            23892
          
          
            
              -
              13032
            
          
        
        
          
            
              -
              32942
            
          
          
            16562
          
          
            
              -
              12012
            
          
          
            6552
          
        
        
          
            23892
          
          
            
              -
              12012
            
          
          
            8712
          
          
            
              -
              4752
            
          
        
        
          
            
              -
              13032
            
          
          
            6552
          
          
            
              -
              4752
            
          
          
            2592
          
        
      
      )
    
  




  
    
      b
      ⁢
      
        
      
      ⁢
      5
    
    =
    
      (
      
        
          
            
              
                
                  -
                  5792
                
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              
                19910
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              362
            
          
        
        
          
            
              
                2912
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              
                10010
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              182
            
          
        
        
          
            
              
                
                  -
                  2112
                
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              
                7260
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              132
            
          
        
        
          
            
              
                1152
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              
                3960
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              72
            
          
        
      
      )
    
  



In addition, the results of the partial differentiation of J61 is as follows:



  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        61
      
      
        ∂
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
    
    =
    
      
        59168
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      -
      
        26488
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      +
      
        39216
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      -
      
        18576
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      +
      
        18920
        ⁢
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      
        13416
        ⁢
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      3440
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        61
      
      
        ∂
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
    
    =
    
      
        
          -
          26488
        
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      +
      
        11858
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      -
      
        17556
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      +
      
        8316
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      -
      
        8470
        ⁢
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      
        6006
        ⁢
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      1540
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        61
      
      
        ∂
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
    
    =
    
      
        39216
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      -
      
        17556
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      +
      
        25992
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      -
      
        12312
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      +
      
        12540
        ⁢
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      
        8892
        ⁢
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      2280
    
  




  
    
      
        
          ∂
          J
        
        ⁢
        
          
        
        ⁢
        61
      
      
        ∂
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
    
    =
    
      
        
          -
          18576
        
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      +
      
        8316
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            0
            )
          
        
      
      -
      
        12312
        ⁢
        
          
            u
            1
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      +
      
        5832
        ⁢
        
          
            u
            2
            *
          
          ⁡
          
            (
            1
            )
          
        
      
      -
      
        5940
        ⁢
        
          
            x
            1
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      
        5832
        ⁢
        
          
            x
            2
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      1080
    
  



Therefore, the matrix M6 and vector b6 are represented as follows:



  
    
      M
      ⁢
      
        
      
      ⁢
      6
    
    =
    
      (
      
        
          
            59168
          
          
            
              -
              26488
            
          
          
            39216
          
          
            
              -
              18576
            
          
        
        
          
            
              -
              26488
            
          
          
            11858
          
          
            
              -
              17556
            
          
          
            8316
          
        
        
          
            39216
          
          
            
              -
              17556
            
          
          
            25992
          
          
            
              -
              12312
            
          
        
        
          
            
              -
              18576
            
          
          
            8316
          
          
            
              -
              12312
            
          
          
            5832
          
        
      
      )
    
  




  
    
      b
      ⁢
      
        
      
      ⁢
      6
    
    =
    
      (
      
        
          
            
              
                
                  -
                  18920
                
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              
                13416
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              3440
            
          
        
        
          
            
              
                8470
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              
                6006
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              1540
            
          
        
        
          
            
              
                
                  -
                  12540
                
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              
                8892
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              2280
            
          
        
        
          
            
              
                5940
                ⁢
                
                  
                    x
                    1
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              -
              
                5832
                ⁢
                
                  
                    x
                    2
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
              
              +
              1080
            
          
        
      
      )
    
  



[Case where No Constraint Condition is Considered]
Next, FIG. 20 illustrates a configuration example (no constraint conditions) of an off-line matrix generation apparatus 900 to generate such matrices M2 to M6 and vectors b3 to b6. The off-line matrix generation apparatus 900 has an input unit 101, input data storage unit 102, first transformation processing unit 103, first data storage unit 104, second substitution processing unit 901, eleventh data storage unit 902, fourth matrix generator 903, twelfth data storage unit 904, fifth matrix generator 905 and thirteenth data storage unit 906. The input unit 101, input data storage unit 102, first transformation processing unit 103 and first data storage unit 104 are almost the same as those in the first embodiment.
The input unit 101 accepts inputs of matrices A and B, and Δτ that are input data from the user, for example, and stores the input data into the input data storage unit 102. The input data storage unit 102 also stores data of the simultaneous equations to be solved (e.g. the expressions (8) and (9), and in case of the 2-input and 2-output system, the expressions (15) to (18)), expressions obtained by partially differentiating the portions J31 to J61 of the performance index, such as the expressions (95) and the like, and data of the matrix M2. Data of the matrix M2 may not be processed, because the weight matrix R is treated as variables and Hp and Hc are settled. In addition, data of the simultaneous equations and the like may be inputted from the input unit 101. Furthermore, the first transformation processing unit 103 carries out the first transformation processing by using data stored in the input data storage unit 102, and stores the processing results into the first data storage unit 104. Incidentally, the input unit 101 or first transformation processing unit 103 may carry out a processing to substitute element values of the matrices A and B and the like into the relating simultaneous equations.
The second substitution processing unit 901 carries out a processing to substitute the aforementioned expressions (37) and their coefficients into the expressions (95) and the like by using data stored in the input data storage unit 102 and first data storage unit 104, and stores the processing results into the eleventh data storage unit 902.
The fourth matrix generator 903 carries out a processing to generate the matrices M3, M4, M5 and M6 and vectors b3, b4, b5 and b6 by using data stored in the eleventh data storage unit 902, and stores the matrices and vectors into the twelfth data storage unit 904. The fifth matrix generator 905 carries out a computation of the expressions (93) and (94) by using data stored in the input data storage unit 102 and twelfth data storage unit 904, and stores the computation results into the thirteenth data storage unit 906. By doing so, the matrix M and vector b in a state where the elements of the weight matrices Q, S and R are treated as variables are stored in the thirteenth data storage unit 906 to use the matrix M and vector b for the simulation or the like.
Next, FIG. 21 illustrates a processing flow of the off-line matrix generation apparatus 900 illustrated in FIG. 20. First, the input unit 101 accepts inputs of the matrices A and B and Δτ, which are input data from the user, and stores the input data into the input data storage unit 102 (FIG. 21: step S81). Data of the simultaneous equations to be resolved may be inputted from the input unit 101 and may be stored into the input data storage unit 102.
Then, the first transformation processing unit 103 carries out the first transformation processing for the optimal output state x*(i) by using data stored in the input data storage unit 102, and stores the linear expressions as the processing results (i.e. the expressions (37)) into the first data storage unit 104 (step S83). This step is almost the same as the step S3. Therefore, the further explanation is omitted. However, data of the matrices A and B and the like is substituted at this step and then this step may be processed at this step. Thus, the substitution may be carried out before this step.
Then, the second substitution processing unit 901 reads out data of the expressions (92) (i.e. the expressions of the partial differentiation of the portions J31 to J61 in the performance index J) from the input data storage unit 102, and carries out a processing to substitute the linear expressions as the processing results of the first transformation processing and their coefficients into the expressions (92) and the like and arrange the substitution results, and stores the processing results into the eleventh data storage unit 902 (step S85).
Furthermore, the fourth matrix generator 903 generates the matrices M3 to M6 by extracting the coefficient values of u1*(0), u2*(0), . . . , u1*(Hc−1) and u2*(Hc−1) from the processing results of the substitution processing, which are stored in the eleventh data storage unit 902, generates the vectors b3 to b6 by further extracting the constant terms from the processing results of the substitution processing and reversing the signs, and stores the matrices and vectors into the twelfth data storage unit 904 (step S87).
After that, the fifth matrix generator 905 generates the matrix M by respectively multiplying the matrices M3 to M6 stored in the twelfth data storage unit 904 by the corresponding elements of the weight matrices Q and S and further adding the matrix M2 stored in the input data storage unit 102, and stores the matrix M into the thirteenth data storage unit 906 (step S89). Namely, the matrix M is generated by q1M3+q2M4+s1M5+s2M6+M2.
Furthermore, the fifth matrix generator 905 generates the vector b by respectively multiplying the vectors b3 to b6 stored in the twelfth data storage unit 904 by the corresponding elements of the weight matrices Q and S, and stores the vector b into the thirteenth data storage unit 906 (step S91). Namely, the vector b is generated by q1b3+q2b4+s1b5+s2b6.
By carrying out such a processing, the matrix M and vector b in which the elements of the weight matrices Q, S and R are treated as variables are generated. Therefore, it becomes easy to carry out the adjustment of the weight matrix in the simulation.
Incidentally, the steps S89 and S91 may be executed in the simulation.
[Case where the Constraint Condition is Considered]
In case where the constraint conditions are considered, an off-line matrix generation apparatus 1100 as illustrated in FIG. 22 is used. The difference with the off-line matrix generation apparatus 900 illustrated in FIG. 20 is a point that the fourth transformation processing unit 501, which was introduced when the constraint conditions are considered in the first embodiment, is introduced. Namely, the fourth transformation processing unit 501 generates Vtopbar, Vunderbar, Wtopbar and Wunderbar from data stored in the input data storage unit 102, and stores the generated data into the thirteenth data storage unit 906.
Therefore, as for a processing flow when the constraint conditions are considered, as illustrated in FIG. 23, a point that step S93 is added, which is a step to carry out a constraint linear approximation calculation executed by the fourth transformation processing unit 501, is different from FIG. 21. The step S93 is similar to the step S39 in FIG. 8, and the vectors represented by the expressions (63) to (66) are generated and stored into the thirteenth data storage unit 906.
By carrying out such a processing, the matrix M and vector b in which the elements of the weight matrices Q, R and S are treated as variables, and Vtopbar, Vunderbar, Wtopbar and Wunderbar, which relate to the constraint conditions, are generated and used in the simulation.
Although the embodiments of this technique were explained, this technique is not limited to those embodiments. For example, the functional block diagrams and block diagrams are mere examples, and do not always correspond to actual program module configurations. In addition, as for the processing flows, as long as the processing results do not change, the steps may be executed in parallel, or the order of the steps may be exchanged. Furthermore, although the application of this technique to the engine control apparatus was explained, the application to plant control apparatuses other than the engine control apparatus is possible.
In addition, the off-line matrix generation apparatuses 100 and 500 to 1100 are computer devices as shown in FIG. 24. That is, a memory 2501 (storage device), a CPU 2503 (processor), a hard disk drive (HDD) 2505, a display controller 2507 connected to a display device 2509, a drive device 2513 for a removable disk 2511, an input device 2515, and a communication controller 2517 for connection with a network are connected through a bus 2519 as shown in FIG. 24. An operating system (OS) and an application program for carrying out the foregoing processing in the embodiment, are stored in the HDD 2505, and when executed by the CPU 2503, they are readout from the HDD 2505 to the memory 2501. As the need arises, the CPU 2503 controls the display controller 2507, the communication controller 2517, and the drive device 2513, and causes them to perform necessary operations. Besides, intermediate processing data is stored in the memory 2501, and if necessary, it is stored in the HDD 2505. In this embodiment of this technique, the application program to realize the aforementioned functions is stored in the computer-readable, non-transitory removable disk 2511 and distributed, and then it is installed into the HDD 2505 from the drive device 2513. It may be installed into the HDD 2505 via the network such as the Internet and the communication controller 2517. In the computer as stated above, the hardware such as the CPU 2503 and the memory 2501, the OS and the necessary application programs systematically cooperate with each other, so that various functions as described above in details are realized.
Incidentally, the aforementioned engine control apparatus 1000 is also a computer apparatus. That is, a Random Access memory (RAM) 4501, a processor 4503, a Read Only Memory (ROM) 4507 and sensors 4515 are connected through a bus 4519 as shown in FIG. 25. A control program for carrying out the processing in the embodiment (and an Operating System (OS) if it exists) is stored in the ROM 4507, and when executed by the processor 4503, they are read out from the ROM 4507 to the RAM 4501. The processor 4503 controls the sensors 4515 (MAP sensor and MAF sensor. According to circumstances, injection quantity measurement unit and engine speed measurement unit), and obtains measurement values. In addition, intermediate processing data is stored in the RAM 4501. Incidentally, the processor 4503 may include the ROM 4507, and may further include the RAM 4501. In this embodiment, the control program for carrying out the aforementioned processing may be distributed by a computer-readable storage removable disk in which the control program is recorded, and the control program may be written into the ROM 4507 by a ROM writer. In the computer apparatus as stated above, the hardware such as the processor 4503 and RAM 4501 and the ROM 4507 and the control program (and OS if it exists) systematically cooperate with each other, so that various functions as described above in details are realized.
The embodiments described above are summarized as follows:
In a matrix generation method relating to a first aspect of the embodiments, a data storage unit stores (a) state equations, which represent a relationship between solution output states and solution inputs of a plant to be controlled, (b) initial condition expressions of output states, (c) first conditional expressions representing a relationship between a first Lagrange multiplier and a partial differentiation of a Hamiltonian with respect to the output state, (d) relational expressions representing a relationship between a value of the first Lagrange multiplier after a predictive horizon (i.e. period) and a function regarding differences between target values of the output states and the solution output states after the predictive horizon, and (e) second conditional expressions that are partial differentiations of the Hamiltonian with respect to the inputs and represents a relationship among the first Lagrange multiplier, the second Lagrange multiplier and the solution inputs, wherein the Hamiltonian relates to a sum of a first function regarding a weighting addition of a square of an error between the target values of the output states and the output states and a square of inputs, a product of the first Lagrange multiplier and the state equations, and a second function regarding a second Lagrange multiplier and constraint conditions. Then, the matrix generation method relating to the first aspect of the embodiments includes: reading out the state equations and the initial condition expressions from the data storage unit to convert the state equations and the initial condition expressions into first linear expressions representing the solution output states at each step by the output states and the solution inputs; reading out the first conditional expressions and the relational expressions from the data storage unit to convert the first conditional expressions and the relational expressions into second linear expressions representing the first Lagrange multiplier at each step by the target values and the solution output states; converting the first linear expressions and the second linear expressions into third linear expressions representing the first Lagrange multiplier at each step by the target values, the solution inputs and the output states, by substituting the first linear expressions into the second linear expressions; reading out the second conditional expressions from the data storage unit to convert the third linear expressions and the second conditional expressions into fourth linear expressions representing a relationship at each step among the target values, the solution inputs and the output states; and transforming the fourth linear expressions into a matrix operational expression representing a product of a coefficient matrix and a vector regarding the solution inputs within a control horizon (i.e. period) is equal to a function vector regarding the target values and the output states to obtain the coefficient matrix and the function vector.
By carrying out such a processing, the sizes of the coefficient matrix and function vector are largely reduced, and simultaneous equations, which are represented by a matrix operational expression representing a product of a coefficient matrix and a vector regarding the solution inputs within the control horizon is equal to a function vector regarding the target values and the output states, can be resolved at high speed.
In addition, the matrix generation method relating to the first aspect of the embodiments may further include: generating a first constraint vector, a second constraint vector, a third constraint vector and a fourth constraint vector. In such a case, the first constraint vector may be a vector that includes, for each time, first constant terms in fifth linear expressions obtained by approximating, by the solution inputs, the second Lagrange multipliers associated with lower limit values of the inputs included in the constraint conditions, and the first constant terms may include the lower limit values of the inputs included in the constraint conditions and the solution inputs at a corresponding time, which were calculated one sampling time before. In addition, the second constraint vector may include, for each time, first coefficients of the solution input in the fifth linear expressions, and the first coefficients may include the lower limit values of the inputs included in the constraint conditions, and the solution inputs at the corresponding time, which were calculated one sampling time before. Furthermore, the third constraint vector may be a vector that includes, for each time, second constant terms in sixth linear expressions obtained by approximating, by the solution inputs, the second Lagrange multipliers associated with upper limit values of the inputs included in the constraint conditions, and the second constant terms may include the upper limit values of the inputs included in the constraint conditions and the solution inputs at the corresponding time, which were calculated one sampling time before. Moreover, the fourth constraint vector may include, for each time, second coefficients of the solution inputs in the sixth linear expressions, and the second coefficients may include the upper limit values of the inputs included in the constraint conditions, and the solution inputs at the corresponding time, which were calculated one sampling time before.
Thus, it becomes possible to easily carry out computation taking into consideration the constraint conditions.
In a matrix generation apparatus relating to a second aspect of the embodiments, a data storage unit stores (a) state equations, which represent a relationship between solution output states and solution inputs of a plant to be controlled, (b) initial condition expressions of output states, (c) first conditional expressions representing a relationship between a first Lagrange multiplier and a partial differentiation of a Hamiltonian with respect to the output state, (d) relational expressions representing a relationship between a value of the first Lagrange multiplier after a predictive horizon and a function regarding differences between target values of the output states and the solution output states after the predictive horizon, and (e) second conditional expressions that are partial differentiations of the Hamiltonian with respect to the inputs and represents a relationship among the first Lagrange multiplier, the second Lagrange multiplier and the solution inputs, wherein the Hamiltonian relates to a sum of a first function regarding a weighting addition of a square of an error between the target values of the output states and the output states and a square of inputs, a product of the first Lagrange multiplier and the state equations, and a second function regarding a second Lagrange multiplier and constraint conditions. The matrix generation apparatus relating to the second aspect of the embodiments includes: reading out the state equations and the initial condition expressions from the data storage unit to convert the state equations and the initial condition expressions into first linear expressions representing the solution output states at each step by the output states and the solution inputs; reading out the first conditional expressions and the relational expressions from the data storage unit to convert the first conditional expressions and the relational expressions into second linear expressions representing the first Lagrange multiplier at each step by the target values and the solution output states; converting the first linear expressions and the second linear expressions into third linear expressions representing the first Lagrange multiplier at each step by the target values, the solution inputs and the output states, by substituting the first linear expressions into the second linear expressions; reading out the second conditional expressions from the data storage unit to convert the third linear expressions and the second conditional expressions into fourth linear expressions representing a relationship at each step among the target values, the solution inputs and the output states; and transforming the fourth linear expressions into a matrix operational expression representing a product of a coefficient matrix and a vector regarding the solution inputs within the control horizon is equal to a function vector regarding the target values and the output states to obtain the coefficient matrix and the function vector.
When the constraint conditions are considered, the sizes of the coefficient matrix and function vector are largely reduced even when the expressions (a) to (e) are transformed as described above.
A control method relating to a third aspect of the embodiments includes: obtaining, by using a processor, present output states and present target values of output states of a plant to be controlled; calculating, by using the processor, solution inputs within the control horizon by substituting the present output states and the present target values into the linear equations and solving linear equations after the substituting, wherein the linear equations are represented in a form that a product of a coefficient matrix and a vector regarding solution inputs within the control horizon is equal to a function vector regarding target values of the output states and the output states, and the linear equations are equivalent to expressions including (a) state equations, which represent a relationship between solution output states and solution inputs of the plant to be controlled, (b) initial condition expressions of the output states, (c) first conditional expressions representing a relationship between a first Lagrange multiplier and a partial differentiation of a Hamiltonian with respect to the output state, (d) relational expressions representing a relationship between a value of the first Lagrange multiplier after the predictive horizon and a function regarding differences between the target values of the output states and the solution output states after the predictive horizon, and (e) second conditional expressions that are partial differentiations of the Hamiltonian with respect to the inputs and represents a relationship among the first Lagrange multiplier, the second Lagrange multiplier and the solution inputs, wherein the Hamiltonian relates to a sum of a first function regarding a weighting addition of a square of an error between the target values of the output states and the output states and a square of inputs, a product of the first Lagrange multiplier and the state equations, and a second function regarding a second Lagrange multiplier and constraint conditions; and extracting, by using the processor, solution inputs for a first time from among the solution inputs within the control horizon.
These linear equations are largely simplified compared with the original expressions (a) to (e). Therefore, even when the linear equations are solved by a normal method with normal computation, it becomes possible to obtain the solution input in a shorter period.
In addition, the constraint conditions including upper limit values and lower limit values for the solution input of the plant to be controller may be set. In such a case, the aforementioned calculating may include: generating a first matrix obtained by setting solution inputs at a corresponding time, which were calculated one sampling time before, into a first constraint vector and changing the first constraint vector to a diagonal matrix, wherein the first constraint vector is a vector that includes, for each time, first coefficients of the solution inputs in first linear expressions obtained by approximating, by the solution inputs, the second Lagrange multipliers associated with lower limit values of the inputs included in the constraint conditions, and the first coefficients include the lower limit values of the inputs included in the constraint conditions and the solution inputs at the corresponding time, which were calculated one sampling time before; generating a second matrix obtained by setting the solution inputs at the corresponding time, which were calculated one sampling time before, into a second constraint vector and changing the second constraint vector to the diagonal matrix, wherein the second constraint vector is a vector that includes, for each time, second coefficient of the solution inputs in second linear expressions obtained by approximating, by the solution inputs, the second Lagrange multipliers associated with upper limit values of the inputs included in the constraint conditions, and the second coefficients include the upper limit values of the inputs included in the constraint conditions and the solution inputs at the corresponding time, which were calculated one sampling time before; subtracting the first matrix from the coefficient matrix, and adding the second matrix; generating a first vector obtained by setting the solution inputs at the corresponding time, which were calculated one sampling time before, into first constant terms in the first linear expressions, wherein the first constant terms include the lower limit values of the inputs included in the constraint conditions, and the solution inputs at the corresponding time, which were calculated one sampling time before; generating a second vector obtained by setting the solution inputs at the corresponding time, which were calculated one sampling time before, into second constant terms in the second linear expressions, wherein the second constant terms include the upper limit values of the inputs included in the constraint conditions, and the solution inputs at the corresponding time, which were calculated one sampling time before; and adding the first vector to the function vector and subtracting the second vector.
Thus, it is possible to output the solution input taking into consideration the constraint conditions with less computation amount.
A plant control apparatus (FIG. 26) relating to a fourth aspect of the embodiments includes: (A) an obtaining unit (FIG. 26: 3100) to obtain present output states and present target values of the output states of the plant to be controlled; (B) a data storage unit (FIG. 26: 3400) storing linear equations represented in a form that a product of a coefficient matrix and a vector regarding solution inputs within the control horizon is equal to a function vector regarding target values of output states and the output states, wherein the linear equations are equivalent to expressions including (a) state equations, which represent a relationship between solution output states and solution inputs of a plant to be controlled, (b) initial condition expressions of the output states, (c) first conditional expressions representing a relationship between a first Lagrange multiplier and a partial differentiation of a Hamiltonian with respect to the output state, (d) relational expressions representing a relationship between a value of the first Lagrange multiplier after the predictive horizon and a function regarding differences between the target values of the output states and the solution output states after the predictive horizon, and (e) second conditional expressions that are partial differentiations of the Hamiltonian with respect to the inputs and represents a relationship among the first Lagrange multiplier, the second Lagrange multiplier and the solution inputs, and the Hamiltonian relates to a sum of a first function regarding a weighting addition of a square of an error between the target values of the output states and the output states and a square of inputs, a product of the first Lagrange multiplier and the state equations, and a second function regarding a second Lagrange multiplier and constraint conditions; (C) a calculation unit (FIG. 26: 3200) to calculate solution inputs within a control horizon by substituting the present output states and the present target values into the linear equations and solving the linear equations after the substituting; and (D) an output unit (FIG. 26: 3300) to extract solution inputs for a first time from among the solution inputs within the control horizon.
In a matrix generation method relating to a fifth aspect of the embodiments, a data storage unit stores (a) state equations, which represent a relationship between solution output states and solution inputs of a plant to be controlled, (b) initial condition expressions of output states, (c) first linear expressions regarding the solution output states, which are obtained by partially differentiating a first term and a second term in a performance index, with respect to each of the solution inputs from a solution input at an initial time to a solution input at a time after (a control horizon—one sampling time) elapsed, and (d) a first matrix having matrix elements that are obtained by partially differentiating a third term in the performance index with respect to each of the solution inputs from the solution input at the initial time to the solution input at the time after (the control horizon—one sampling time) elapsed, and are determined by element values of a third weight matrix, a value of the control horizon and a value of the predictive horizon, wherein the first term in the performance index is a term for adding a square of an error between a target value of the output state and the solution output state from a time after one sampling time elapsed since an initial time to a time after (the predictive horizon—one sampling time) elapsed, while weighting by a first weight matrix, and the second term in the performance index is a term for adding a square of an error between the target value of the output state and the solution output state after the predictive horizon while weighting by a second weight matrix, and the performance index includes the first term, the second term, the third term for adding a square of the solution inputs from the initial time to a time after (the predictive horizon—one sampling time) elapsed while weighting by the third weight matrix, and a fourth term for constraint conditions. The matrix generation apparatus relating to the fifth aspect of the embodiments includes: reading out the state equations and the initial condition expressions of output states to convert the state equations and the initial condition expressions into second linear expressions representing the solution output states at each step by the output states and the solution inputs; generating third linear expressions by substituting the second linear expressions and coefficient values of the solution inputs in the second linear expressions into the first linear expressions stored in the data storage unit; generating a second matrix by extracting coefficient values of terms of the solution inputs in the third linear expressions; generating a vector by extracting terms other than the terms of the solution inputs in the third linear expressions; and generating a third matrix by adding the first matrix stored in the data storage unit and the second matrix.
Because the computation amount is reduced by carrying out such a processing, it is possible to generate the third matrix and the vector at high speed.
In a matrix generation method relating to a sixth aspect of the embodiments, a data storage unit stores (a) the state equations, equations, which represent a relationship between solution output states and solution inputs of a plant to be controlled, (b) initial condition expressions of output states, (c) first linear expressions obtained by partially differentiating each of a plurality of expressions, with respect to each of the solution inputs from a solution input at an initial time to a solution input at a time after (a control horizon—one sampling time) elapsed, wherein a performance index includes a first term, a second term, a third term for adding a square of the solution inputs from the initial time to a time after (the predictive horizon—one sampling time) elapsed while weighting by a third weight matrix, and a fourth term for constraint conditions, and the first term in the performance index is a term for adding a square of an error between a target value of the output state and the solution output state from a time after one sampling time elapsed since an initial time to a time after (a predictive horizon—one sampling time) elapsed, while weighting by a first weight matrix, and the second term in the performance index is a term for adding a square of an error between the target value of the output state and the solution output state after the predictive horizon while weighting by a second weight matrix, and the plurality of expressions are obtained by classifying the first term and the second term in the performance index for each element of the first weight matrix and the second weight matrix, which is multiplied as a coefficient, and by removing each the element from a corresponding classification result. The matrix generation method relating to the sixth aspect of the embodiments includes: reading out the state equations and the initial condition expressions of output states to convert the state equations and the initial condition expressions into second linear expressions representing the solution output states at each step by the output states and the solution inputs; generating, for each of the plurality of expressions, third linear expressions by substituting the second linear expressions and coefficient values of the solution inputs in the second linear expressions into the first linear expressions stored in the data storage unit; generating, for each of the plurality of expressions, a matrix by extracting, for each of the plurality of expressions, coefficients of the terms of the solution inputs in the third linear expressions; and generating, for each of the plurality of expressions, a vector by extracting, for each of the plurality of expressions, terms other than the terms of the solution inputs in the third linear expressions.
By doing so, it becomes possible to adjust the element values of the weight matrices in the simulation or the like, which will be carried out later, without regenerating the matrix and vector. Incidentally, the constraint conditions can be processed in the fifth and sixth aspects of the embodiments, similarly to the first aspect of the embodiments.
Incidentally, it is possible to create a program causing a computer to execute the aforementioned processing, and such a program is stored in a computer readable storage medium or storage device such as a flexible disk, CD-ROM, DVD-ROM, magneto-optic disk, a semiconductor memory, and hard disk. In addition, the intermediate processing result is temporarily stored in a storage device such as a main memory or the like.
All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiments of the present inventions have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.

## Claims

1. A computer-readable, non-transitory storage medium storing a program for causing a computer to execute a process comprising:
converting state equations, which represent a relationship between solution output states and solution inputs of a plant to be controlled, and initial condition expressions of output states into first linear expressions representing the solution output states at each step by the output states and the solution inputs;
generating second linear expressions by substituting the first linear expressions and coefficient values of the solution inputs in the first linear expressions into third linear expressions regarding the solution output states, wherein the third linear expressions are obtained by partially differentiating a first term and a second term in a performance index, with respect to each of the solution inputs from a solution input at an initial time to a solution input at a first time after a first period calculated by (a control horizon—one sampling time) elapsed, and the first term in the performance index is a term for adding a square of an error between a target value of the output state and the solution output state, from a second time after the one sampling time elapsed since the initial time to a third time after a second period calculated by (a predictive horizon—the one sampling time) elapsed, while weighting by a first weight matrix, and the second term in the performance index is a term for adding a square of an error between the target value of the output state and the solution output state after the predictive horizon while weighting by a second weight matrix, and the performance index includes the first term, the second term, a third term for adding a square of the solution inputs from the initial time to the third time while weighting by a third weight matrix, and a fourth term for constraint conditions;
generating a first matrix by extracting coefficient values of terms of the solution inputs in the second linear expressions;
generating a vector by extracting terms other than the terms of the solution inputs in the second linear expressions; and
generating a third matrix by adding the first matrix and a second matrix having matrix elements that are obtained by partially differentiating the third term in the performance index with respect to each of the solution inputs from the solution input at the initial time to the solution input at the first time, and are determined by element values of the third weight matrix, a value of the control horizon and a value of the predictive horizon.

2. The computer-readable, non-transitory storage medium as set forth in claim 1, wherein the process further comprises generating a first constraint vector, a second constraint vector, a third constraint vector and a fourth constraint vector,
wherein the first constraint vector is a vector that includes, for each time, first constant terms in fifth linear expressions obtained by approximating, by the solution inputs, the second Lagrange multipliers associated with lower limit values of the inputs included in the constraint conditions, and the first constant terms include the lower limit values of the inputs included in the constraint conditions and the solution inputs at a corresponding time, which were calculated at previous calculation, and
wherein the second constraint vector includes, for each time, first coefficients of the solution input in the fifth linear expressions, and the first coefficients include the lower limit values of the inputs included in the constraint conditions, and the solution inputs at the corresponding time, which were calculated one sampling time before, and
wherein the third constraint vector is a vector that includes, for each time, second constant terms in sixth linear expressions obtained by approximating, by the solution inputs, the second Lagrange multipliers associated with upper limit values of the inputs included in the constraint conditions, and the second constant terms include the upper limit values of the inputs included in the constraint conditions and the solution inputs at the corresponding time, which were calculated one sampling time before, and
wherein the fourth constraint vector includes, for each time, second coefficients of the solution inputs in the sixth linear expressions, and the second coefficients include the upper limit values of the inputs included in the constraint conditions, and the solution inputs at the corresponding time, which were calculated one sampling time before.

3. A computer-readable, non-transitory storage medium storing a program for causing a computer to execute a process comprising:
converting state equations, which represent a relationship between solution output states and solution inputs of a plant to be controlled, and initial condition expressions of output states into first linear expressions representing the solution output states at each step by the output states and the solution inputs;
generating, for each of a plurality of expressions, second linear expressions by substituting the first linear expressions and coefficient values of the solution inputs in the first linear expressions into third linear expressions regarding the solution output states, wherein the plurality of expressions are obtained by classifying a first term and a second term in a performance index for each element of a first weight matrix and a second weight matrix, which is multiplied as a coefficient, and by removing each the element from a corresponding classification result, and the third linear expressions are obtained by partially differentiating each of the plurality of expressions, with respect to each of the solution inputs from a solution input at an initial time to a solution input at a first time after a first period calculated by (a control horizon—one sampling time) elapsed, and the first term in the performance index is a term for adding a square of an error between a target value of the output state and the solution output state from a second time after the one sampling time elapsed since the initial time to a third time after a second period calculated by (a predictive horizon—the one sampling time) elapsed, while weighting by the first weight matrix, and the second term in the performance index is a term for adding a square of an error between the target value of the output state and the solution output state after the predictive horizon while weighting by the second weight matrix, and the performance index includes the first term, the second term, a third term for adding a square of the solution inputs from the initial time to the third time while weighting by a third weight matrix, and a fourth term for constraint conditions;
generating, for each of the plurality of expressions, a matrix by extracting, for each of the plurality of expressions, coefficients of the terms of the solution inputs in the second linear expressions; and
generating, for each of the plurality of expressions, a vector by extracting, for each of the plurality of expressions, terms other than the terms of the solution inputs in the second linear expressions.

4. A matrix generation apparatus, comprising:
a data storage unit storing (a) state equations, which represent a relationship between solution output states and solution inputs of a plant to be controlled, (b) initial condition expressions of output states, (c) first linear expressions regarding the solution output states, which are obtained by partially differentiating a first term and a second term in a performance index, with respect to each of the solution inputs from a solution input at an initial time to a solution input at a first time after a first period calculated by (a control horizon—one sampling time) elapsed, and (d) a first matrix having matrix elements that are obtained by partially differentiating a third term in the performance index with respect to each of the solution inputs from the solution input at the initial time to the solution input at the first time, and are determined by element values of a third weight matrix, a value of the control horizon and a value of a predictive horizon, wherein the first term in the performance index is a term for adding a square of an error between a target value of the output state and the solution output state from a second time after the one sampling time elapsed since the initial time to a third time after a second period calculated by (the predictive horizon—the one sampling time) elapsed, while weighting by a first weight matrix, and the second term in the performance index is a term for adding a square of an error between the target value of the output state and the solution output state after the predictive horizon while weighting by a second weight matrix, and the performance index includes the first term, the second term, the third term for adding a square of the solution inputs from the initial time to the third time while weighting by the third weight matrix, and a fourth term for constraint conditions; and
a processing unit configured to execute a process comprising:
reading out the state equations and the initial condition expressions of output states to convert the state equations and the initial condition expressions into second linear expressions representing the solution output states at each step by the output states and the solution inputs;
generating third linear expressions by substituting the second linear expressions and coefficient values of the solution inputs in the second linear expressions into the first linear expressions stored in the data storage unit;
generating a second matrix by extracting coefficient values of terms of the solution inputs in the third linear expressions;
generating a vector by extracting terms other than the terms of the solution inputs in the third linear expressions; and
generating a third matrix by adding the first matrix stored in the data storage unit and the second matrix.

5. A matrix generation apparatus, comprising:
a data storage unit storing (a) the state equations, equations, which represent a relationship between solution output states and solution inputs of a plant to be controlled, (b) initial condition expressions of output states, (c) first linear expressions obtained by partially differentiating each of a plurality of expressions, with respect to each of the solution inputs from a solution input at an initial time to a solution input at a first time after a first period calculated by (a control horizon—one sampling time) elapsed, wherein a performance index includes a first term, a second term, a third term for adding a square of the solution inputs from the initial time to a second time after a second period calculated by (a predictive horizon—one sampling time) elapsed while weighting by a third weight matrix, and a fourth term for constraint conditions, and the first term in the performance index is a term for adding a square of an error between a target value of the output state and the solution output state from a third time after the one sampling time elapsed since the initial time to the second time, while weighting by a first weight matrix, and the second term in the performance index is a term for adding a square of an error between the target value of the output state and the solution output state after the predictive horizon while weighting by a second weight matrix, and the plurality of expressions are obtained by classifying the first term and the second term in the performance index for each element of the first weight matrix and the second weight matrix, which is multiplied as a coefficient, and by removing each the element from a corresponding classification result;
a processing unit configured to execute a process comprising:
reading out the state equations and the initial condition expressions of output states to convert the state equations and the initial condition expressions into second linear expressions representing the solution output states at each step by the output states and the solution inputs;
generating, for each of the plurality of expressions, third linear expressions by substituting the second linear expressions and coefficient values of the solution inputs in the second linear expressions into the first linear expressions stored in the data storage unit;
generating, for each of the plurality of expressions, a matrix by extracting, for each of the plurality of expressions, coefficients of the terms of the solution inputs in the third linear expressions; and
generating, for each of the plurality of expressions, a vector by extracting, for each of the plurality of expressions, terms other than the terms of the solution inputs in the third linear expressions.