Fuzzy-neural model identification procedure
Predictive control is a model-based strategy used to calculate the optimal control action, by solving an optimization problem at each sampling interval, in order to maintain the output of the controlled plant close to the desired reference. Model predictive control (MPC) based on linear models is an advanced control technique with many applications in the process industry (Rossiter, 2003). The next natural step is to extend the MPC concept to work with nonlinear models. The use of controllers that take into account the nonlinearities of the plant implies an improvement in the performance of the plant by reducing the impact of the disturbances and improving the tracking capabilities of the control system.
In this chapter, Nonlinear Model Predictive Control (NMPC) is studied as a more applicable approach for optimal control of multivariable processes. In general, a wide range of industrial processes are inherently nonlinear. For such nonlinear systems it is necessary to apply NMPC. Recently, several researchers have developed NMPC algorithms (Martinsen et al., 2004) that work with different types of nonlinear models. Some of these models use empirical data, such as artificial neural networks and fuzzy logic models. The model accuracy is very important in order to provide an efficient and adequate control action. Accurate nonlinear models based on soft computing (fuzzy and neural) techniques, are increasingly being used in model-based control (Mollov et al., 2004).
On the other hand, the mathematical model type, which the modelling algorithm relies on, should be selected. State-space models are usually preferred to transfer functions, because the number of coefficients is substantially reduced, which simplifies the computation; systems instability can be handled; there is no truncation error. Multi-input multi-output (MIMO) systems are modelled easily (Camacho et al., 2004) and numerical conditioning is less important.
A state-space representation of a Takagi-Sugeno type fuzzy-neural model (Ahmed et al., 2010; Petrov et al., 2008) is proposed in the Section 2. This type of models ensures easier description and direct computation of the gradient control vector during the optimization procedure. Identification procedure of the proposed model relies on a training algorithm, which is well-known in the field of artificial neural networks.
Obtaining an accurate model is the first stage of the of the NMPC predictive control strategy. The second stage involves the computation of a future control actions sequence. In order to obtain the control actions, a previously defined optimization problem has to be solved. Different types of objective and optimization algorithms (Fletcher, 2000) can be used in the optimization procedure. Two different approaches for NMPC are proposed in Section 3. They consider the unconstrained and constrained model predictive control problem. Both of the approaches use the proposed Takagi-Sugeno fuzzy-neural predictive model.
The proposed techniques of fuzzy-neural MPC are studied in Section 4, by experimental simulations in Matlab® environment in order to control the levels in a multi tank system (Inteco, 2009). The case study is capable to show how the proposed NMPC algorithms handle multivariable processes control problem.
2. Multivariable fuzzy-neural predictive model
The Takagi-Sugeno fuzzy-neural models are powerful modelling tools for a wide class of nonlinear systems. Fuzzy reasoning is capable of handling uncertain and imprecise information while neural networks can learn from samples. Fuzzy-neural networks combine the advantages of both artificial intelligent techniques and incorporate them in adaptive features. Those futures, based on a real time learning algorithm are the main advantage of the fuzzy-neural models.
The importance of the used in MPC strategy models and their adaptive characteristics is obvious. The accuracy of the model determines the accuracy of the control action. The proposed fuzzy-neural model is implemented in a classical NMPC scheme (Fig. 1) as a predictor (Camacho et al., 2004).
In this chapter a nonlinear discrete time state-space implementation is considered to represent the system dynamic:
The states in the next sampling time and the system output can be obtained by taking the weighted sum of the activated fuzzy rules, using
On the other hand the state-space matrices
where is the normalized value of the membership function degree
Fuzzy implication in the
2.1. Identification procedure for the fuzzy–neural model
The proposed identification procedure determines the unknown parameters in the Takagi-Sugeno fuzzy model, i.e. the parameters of membership functions, according to their shape and the parameters of the functions
Layer 1. The first layer represents the model inputs through its own input nodes
Layer 2. The fuzzification procedure of the input variables is performed in the second layer. The weights in this layer are the parameters of the chosen membership functions. Their number depends on the type and the number of the applied functions. All these parameters
Layer 3. The third layer of the network interprets the fuzzy rule base (2). Each neuron in the third layer has as many inputs as the input regression vector size
Layer 4. The fourth layer implements the fuzzy implication (5). Weights in this layer are set to one, in case the rule
Layer 5. The last layer (one node layer) represents the defuzzyfication procedure and forms the output of the fuzzy-neural network (3). This layer also contains a set of adjustable parameters –
2.2. Learning algorithm of the fuzzy–neural model
Two-step gradient learning procedure is used as a learning algorithm of the internal fuzzy-neural model. It is based on minimization of an instant error function
where the error
In order to find a weight correction for the parameters in the last layer of the proposed fuzzy-neural network the derivative of the instant error should be determined. Following the chain rule, the derivative is calculated considering the expressions (7) and (8)
After the calculation of the partial derivatives, the matrix elements for each matrix of the state-space equations corresponding to the
The proposed fuzzy-neural architecture allows the use of the previously calculated output error (8) in the next step of the parameters update procedure. The output error
where the derivative of the output error
The adjustable premise parameters of the fuzzy-neural model are the centre
The proposed identification procedure for the fuzzy-neural model could be summarized in the following steps (Table 1).
|Step 1.||Initialize the membership functions – number, shape, parameters;|
|Step 2.||Assign initial values for the network inputs;|
|Step 3.||Start the algorithm at the current moment k;|
|Step 4.||Fuzzify the network inputs and calculate the membership degrees upon the activated fuzzy set of the membership functions according to (6);|
|Step 5.||Perform fuzzy implication according to (5);|
|Step 6.||Calculate the fuzzy-neural network output, which is represented by state-space description of the modelled system – (3) and (4);|
|Step 7.||Calculate the instant error according to (8) and (9);|
|Step 8.||Start training procedure for fuzzy-neural network;|
|Step 9.||Adjust the consequent parameters according to (13);|
|Step 10.||Adjust the premise parameters according to (16) and (17).|
|Repeat the algorithm from Step 3 for each sampling time.|
3. Optimization algorithm of multivariable model predictive control strategy
The model provided by the Takagi-Sugeno type fuzzy-neural network is used to formulate the objective function for the optimization algorithm and to calculate the future control actions. The second stage of the predictive control strategy includes an optimization procedure. It utilizes the obtained results during the first (modelling) stage predictive model of the system. Using the Takagi-Sugeno fuzzy-neural model (3), the optimization algorithm computes the future control actions at each sampling period, by minimizing the typical for MPC strategy (Generalized Predictive Control – GPC) cost function (Akesson, 2006):
The cost function (18) may be rewritten in a matrix form as follows
The linear state-space model used for Takagi-Sugeno fuzzy rules (2) could be represented in the following form:
Based on the state-space matrices
The predictions of the output for
The recurrent equation for the output predictions, where
The prediction model defined in (27) can be generalized by the following matrix equality
All matrices, which take part in the equations above, are derived by the Takagi-Sugeno fuzzy-neural predictive model (4).
It is also possible to define the vector
This vector can be thought as a
3.1. Unconstrained model predictive control
In this section, the study is focused on the optimization problem of the unconstrained nonlinear predictive control with the quadratic cost function (18). The section presents an approximate solution of the problem where the information given by the obtained fuzzy-neural model is used to solve the problem.
The unconstrained optimization problem can be formulated in a matrix form. First, the predictor can be constructed as follows
Second, the cost function (19) can be rewritten as
The minimum of the function
Then the optimal sequence
The input applied to the controlled plant at time
It is evident that the expression given by the matrix equation (29) is the same as expression obtained for the generalized predictive control. However, in the GPC formulation the components involved in the calculation of the formula (29) are obtained from a linear model. In the present case the components introduced in this expression are generated by the designed nonlinear fuzzy-neural model. A more rigorous formulation of (29) will be representation of the components as time-variant matrices, as they are shown in the expression (22). In this case the matrix
The proposed method solves the problem of unconstrained MPC. A system of equations is solved at each sampling time
Applying this method, minimization of the GPC criterion (18) is based on a calculation of the gradient vector of the criterion cost function
Each element of this gradient vector (32) can be calculated using the following derivative matrix equation:
From the above expression (33) it can be seen that it is necessary to obtain two groups of partial derivatives. The first one is, and the second one is. The first partial derivatives in (33) have the following matrix form:
For computational simplicity assume that
The second group partial derivatives in (33) has the following matrix form:
Since, the matrix (39) has the following form:
Following this procedure it is possible to calculate the rest column elements of the matrix (34) which belongs to the next gradient vector elements (32). Finally, each element of the gradient-vector (32) could be obtained by the following system of equations:
where is the predicted system error.
The obtained system of equations (41)-(44) can be solved very easily, starting from the last equation (44) and calculating the last control action
The proposed unconstrained predictive control algorithm could be summarized in the following steps (Table 2).
|Step 1.||Initial identification of the Takagi-Sugeno fuzzy-neural predictive model;|
|Step 2.||Start the algorithm at the sample k with the initial parameters;|
|Step 3.||Calculate the predicted model output ŷ(k+j) using the tuned fuzzy-neural model (2);|
|Step 4.||Calculate the derivatives for the matrix (34) according to the equations (35)-(38);|
|Step 5.||Calculate predicted control actions according to (45)-(48) and update the sequence;|
|Step 6.||Apply the first optimal control action u(k);|
|Step 7.||Modify the model parameters into the rule (3) and update them for the next step 3|
3.2. Constrained model predictive control
The constrained nonlinear predictive control problem can be described as a problem of finding the “optimal” input sequence to move a dynamic system to a desired state, taking into account the constraints on the inputs and the outputs of the control systems. This section reveals the formulation of the constrained control problem for MPC uses. Essentially, the problem becomes a quadratic programming problem with linear inequality constraints (LICQP). It follows by the nature of the operational constraints, which are usually described by linear inequalities of the control and plant variables.
The problem of nonlinear constrained predictive control is formulated as a nonlinear quadratic optimization problem. By means of local linearization (20) the problem can be solved using QP. That way the solution to the linear constrained predictive control problem is obtained. At each sampling time the LICQP is solved with new parameters, which are obtained by the Takagi-Sugeno fuzzy-neural model. An active set method is used for solving the constructed quadratic programming problem.
3.2.1. Constraint types in model predictive control
The operational constraints may be classified in three major types according to the type of the system variables, which they are imposed on. The first two types of constraints deal with the control variable incremental variation ∆
Related to the origin model predictive control problem, the constraints are expressed in a set of linear equations. All types of constraints are taken into consideration for each moving horizon window.
Therefore, for multi-input case the number of the constraints for the change of the control variable
3.2.2. Quadratic programming in use of constrained MPC
Since the cost function
The Lagrange function is defined as follows
Several algorithms for constrained optimization are described in (Fletcher, 2000). In this chapter a primal active set method is used. The idea of active set method is to define a set
The QP, described in that way, is used to provide numerical solutions in constrained MPC problem.
3.2.3. Design the constrained model predictive problem
The fuzzy-neural identification procedure from the Section 2 provides the state-space matrices, which are needed to construct the constrained model predictive control optimization problem.
the cost function for the model predictive optimization problem can be specified as follow
The problem of minimizing the cost function (55) is a quadratic programming problem. If the Hessian matrix
The constraints (49) on the cost function may be rewritten in terms of
All types of constraints are combined in one expression as follows
Finally, following the definition of the LIQP (50), the model predictive control in presence of constraints is proposed as finding the parameter vector
In (59) the constraints expression (58) has been denoted by Ω
The proposed model predictive control algorithm can be summarized in the following steps (Table 3).
|Step 1.||Read the current states, inputs and outputs of the system;|
|Step 2.||Start identification of the fuzzy-neural predictive model following Algorithm 1;|
|Step 3.||With A(k), B(k), C(k), D(k) from Step 2 calculate the predicted output Y(k) according to (17);|
|Step 4.||Obtain the prediction error E(k) according to (23);|
|Step 5.||Construct the cost function (55) and the constraints (58) of the QP problem;|
|Step 6.||Solve the QP problem according to (59);|
|Step 7.||Apply only the first control action u(k).|
At each sampling time, LIQP (59) is solved with new parameters. The Hessian and the Lagrangian are constructed by the state-space matrices
4. Fuzzy-neural model predictive control of a multi tank system. Case study
The case study is implemented in MATLAB/Simulink® environment with Inteco® Multi tank system. The Inteco® Multi tank System (Fig. 4) comprises from three separate tanks fitted with drain valves (Inteco, 2009). The additional tank mounted in the base of the set-up acts as a water reservoir for the system. The top (first) tank has a constant cross section, while others are conical or spherical, so they are with variable cross sections. This causes the main nonlinearities in the system. A variable speed pump is used to fill the upper tank. The liquid outflows the tanks by the gravity. The tank valves act as flow resistors
4.1. Description of the multi tank system as a multivariable controlled process
In this case study a multi-input multi-output (MIMO) configuration of the Inteco Multi Tank system is used (Fig. 5). This corresponds to the linearized state-space model (60). Several issues have been recognized as causes of additional nonlinearities in plant dynamics:
nonlinearities (smooth and nonsmooth) caused by shapes of tanks;
saturation-type nonlinearities, introduced by maximum or minimum level allowed in tanks;
nonlinearities introduced by valve geometry and flow dynamics;
nonlinearities introduced by pump and valves input/output characteristic curve.
The simulation results have been obtained with random generated set points and following initial conditions (Table 4):
|Model predictive controller parameters||Prediction horizon Hp=10|
First included sample of the prediction horizon Hw=1
Control horizon Hu=3
|Inteco Multi tank system parameters||Flow coefficients for each tank|
a1=0.29; a2=0.2256; a3=0.2487
|Operational constraints on the system||Constraints on valve cross section ratio 0 ≤ Ci ≤ 2e-04, i=1,2,3|
Constraint on liquid inflow 0 ≤ q ≤ 1e-04 m3/s
Constraints on liquid level in each tank 0 ≤ Hi ≤ 0.35 m, i=1,2,3
|Simulation parameters||Time of simulation 600 s|
Sample time Ts=1 s
Figures below show typical results for level control problem. The reference value for each tank is changed consequently in different time. The proposed fuzzy-neural identification procedure ensures the matrices for the optimization problem of model predictive control at each sampling time
4.2. Experimental results with unconstrained model predictive control
The proposed unconstrained model predictive control algorithm (Table 2) with the Takagi-Sugeno fuzzy-neural model as a predictor has been applied to the level control problem. The experiments have been implemented with the parameters in Table 4. The weighting matrices are specified as follow: and. Note that the weighting matrix is constant over all prediction horizon, which allows to avoid matrix inversion at each sampling time with one calculation of at time
The next two figures - Fig. 7 and Fig. 8, show typical results regarding level control, where the references for
4.3. Experimental results with fuzzy-neural constrained predictive control
The experiments with the proposed constrained model predictive control algorithm (Table 3) have been made with level references close to the system outputs constraints. The weighting matrices in GPC cost function (19) are specified as and
without violating the operational constraints specified in Table 4. Similarly to the unconstrained case, the Takagi-Sugeno type fuzzy-neural model provides the state-space matrices
This chapter has presented an effective approach to fuzzy model-based control. The effective modelling and identification techniques, based on fuzzy structures, combined with model predictive control strategy result in effective control for nonlinear MIMO plants. The goal was to design a new control strategy - simple in realization for designer and simple in implementation for the end user of the control systems.
The idea of using fuzzy-neural models for nonlinear system identification is not new, although more applications are necessary to demonstrate its capabilities in nonlinear identification and prediction. By implementing this idea to state-space representation of control systems, it is possible to achieve a powerful model of nonlinear plants or processes. Such models can be embedded into a predictive control scheme. State-space model of the system allows constructing the optimization problem, as a quadratic programming problem. It is important to note that the model predictive control approach has one major advantage – the ability to solve the control problem taking into consideration the operational constraints on the system.
This chapter includes two simple control algorithms with their respective derivations. They represent control strategies, based on the estimated fuzzy-neural predictive model. The two- stage learning gradient procedure is the main advantage of the proposed identification procedure. It is capable to model nonlinearities in real-time and provides an accurate model for MPC optimization procedure at each sampling time.
The proposed consequent solution for unconstrained MPC problem is the main contribution for the predictive optimization task. On the other hand, extraction of a “local” linear model, obtained from the inference process of a Takagi–Sugeno fuzzy model allows treating the nonlinear optimization problem in presence of constraints as an LIQP.
The model predictive control scheme is employed to reduce structural response of the laboratory system - multi tank system. The inherent instability of the system makes it difficult for modelling and control. Model predictive control is successfully applied to the studied multi tank system, which represents a multivariable controlled process. Adaptation of the applied fuzzy-neural internal model is the most common way of dealing with plant’s nonlinearities. The results show that the controlled levels have a good performance, following closely the references and compensating the disturbances.
The contribution of the proposed approach using Takagi–Sugeno fuzzy model is the capacity to exploit the information given directly by the Takagi–Sugeno fuzzy model. This approach is very attractive for systems from high order, as no simulation is needed to obtain the parameters for solving the optimization task. The model’s state-space matrices can be generated directly from the inference of the fuzzy system. The use of this approach is very attractive to the industry for practical reasons related with the capacity of this model structure to combine local models identified in experiments around the different operating points.
The authors would like to acknowledge the Ministry of Education and Science of Bulgaria, Research Fund project BY-TH-108/2005.