Repeat at each kth instant (sampling period, ): |
Step 1. Update the current premise vector. Measurement of |
all the necessary variables for the determination of |
the current premise or antecedent vector, : |
|
Step 2. Update the state matrices. The TS fuzzy model was |
formalized in the form of linear time-varying state space |
equations, and the state matrices depend on the current |
premise vector. Therefore, at each instant, the following |
parameters must be updated, using (14): |
and |
Step 3. Calculate the predicted model outputs. The use of a |
model to predict future behaviour is essential in MPC. |
By means of the appropriate mathematical treatment, |
the outputs predicted by the model can be calculated. In |
our case, using (18), we will get: |
|
Step 4. Compute the current control action. By establishing |
the desired behaviour of our system through the previous |
definition of certain reference trajectories, which must |
be followed by the outputs of the plant, and applying |
principles of PFC, we can determine the expression of |
the necessary control action to achieve such behaviour. |
Thus, using (36), we will obtain: |
|
Step 5. Apply the calculated control action to WWTP. |