1 Introduction

With the stability of the system in mind, the Takagi–Sugeno (T–S) model is widely employed in fuzzy control systems. The model describes system dynamics in the manner of state space equations with fuzzy rules. On the basis of the model, a rule-based feedback controller can be designed; and all parameters pertinent to the controller are obtained by solving certain linear matrix inequalities (LMIs) [1].

Alternatively, as an extension of the T–S fuzzy model, the so-called affine T–S fuzzy model, which possesses additional affine terms, is known to be more capable of describing the plant of the system [2, 3]. The more precision a model has the better it is in terms of control performance to be expected, therefore, instead of the regular T–S fuzzy model, we focus on the affine T–S fuzzy model in this paper.

One of the main reasons why we focus on this model is because the traditional control design approach for the T–S fuzzy model, which involves solving certain LMIs to determine the relevant parameters, cannot be applied to this case due to the presence of additional affine terms in the model. This has been demonstrated in earlier works such as [2, 3], where system stability conditions are formulated as bilinear matrix inequalities (BMIs) that are eventually converted into iterative LMIs (ILMIs). However, in some cases, this process can be highly conservative. In recent years, a large number of theoretical results have appeared for control designs based on the affine T–S fuzzy model [4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]. All the recent works give the system stability conditions in the manner of LMIs. Although at first glance, the works dress different issues in the context of the affine T–S fuzzy model with uncertainties, such as output feedback control [5,6,7,8, 10,11,12,13,14,15,16, 18,19,20], filtering design [4, 9, 14, 17, 21], time-varying delay [8,9,10, 12], the way to treat the affine terms is the same. That is, after augmenting the system states where 1 is viewed as one of the states so that the affine terms can be involved in the system matrices of the state space equations just like the regular T–S fuzzy model, the control design approach based on the T–S fuzzy model is applied, where the S-procedure [22] with some inequalities is used to relax the conservativeness of the resulting LMIs. It is worth noting that when viewing 1 as one of the system states, because the derivative of 1 is zero and it is not influenced at any rate by whatever control input, the structure of the augmented state space equations is kind of special, though it looks like the regular one. As a result, when using the control design approach based on the regular T–S fuzzy model to design controllers for this augmented system, the resulting LMIs, as we will make it clear in this paper, are innately infeasible unless we introduce some quadratic inequalities with certain properties by using the S-procedure. Therefore, the aforementioned reason when introducing S-procedure in the existing works should be a necessity for the feasibility of the resulting LMIs rather than relaxing their conservativeness. It is crucial to note that in the case of affine T–S fuzzy models, not all quadratic inequalities can help us solve the final LMIs when using the S-procedure. The inequalities involved must possess certain properties. Despite this requirement, we found that all of the existing works barely manage to meet it. This means that some quadratic inequalities involved in the S-procedure fail to overcome the necessary requirements.

Recently, some works such as [23, 24], by locating the position of the local sub-system in state space through checking the information of the antecedent part of each fuzzy rule, the resulting region away from the origin could yield a quadratic inequality possessing the properties we need; however, the one-size-fits-all quadratic inequality worked at cost of a stringent assumption. Our previous works [25, 26], partitioned the state space in accordance with the corner points of the membership functions of the fuzzy rules into cells, and found that the cells away from the origin possess certain attributes that could be taken advantage of to guarantee preferable quadratic inequalities. However, the controller design was based on a common quadratic Lyapunov function (CQLF), which tends to be conservative in many cases, particularly when it comes to highly nonlinear complex systems.

The conservativeness in CQLF can be reduced by considering continuous piecewise quadratic Lyapunov functions (PQLF) [27, 28]. Among existing works, by employing the Filippov solutions a (possibly discontinuous) PQLF is introduced [29, 30], in which certain conditions for the partition boundaries must be satisfied. In [31], a PQLF was proposed on the basis of iteratively refining partitions. The work [32] constructs system stability conditions through PQLFs in form of BMIs. In view of the affine T–S fuzzy model in which the local system information is stipulated in the antecedent part of the corresponding fuzzy rule, the approach [33, 34] to PQLFs, as the works in [4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21], is widely used. Based on the information provided by the antecedent parts of the the affine T–S fuzzy model, the whole state space is partitioned into certain cells. Then cell-wise Lyapunov functions, that is a kind of PQLFs, are introduced to synthesize the controller with certain LMIs to guarantee the asymptotic stability of the closed-loop system. In doing so, the so-called continuity functions that are involved in the PQLFs must be found in advance to ensure the continuity of the PQLFs when the system state traverses between cells. Among the continuous functions, the ones of cells containing the origin are different from the others of the cells away from the origin. Although the work [34] provides a general way of obtaining the continuity functions for the latter, how to obtain the ones for the former simultaneously remains an open question, which is the reason why in the mentioned existing works they are just slightly citing the work [34] and not elaborating any further when it comes to the continuity functions.

Encouraged by the issues mentioned above, in this paper, without any extra terms such as uncertainties and time-varying delay et cetera, a pure affine T–S fuzzy model is considered in order to provide a clear methodology of controller design based on the PQLFs in the context of the model.

In this paper, first, we show what problems are behind there when using the affine T–S fuzzy model to design a controller and what kind of quadratic inequalities we need when using the S-procedure to help us solve the resulting LMIs. Then, after partitioning the state space into cells, we find that cells away from the origin possess certain attributes that can be used to form the required quadratic inequalities when using the S-procedure. In a controller based on the PQLFs, a way of obtaining the necessary two kinds of continuity functions is also provided. This is because the controller based on the PQLFs eventually leads to a cell-based controller, which implies that when the state traverse between cells, the chattering phenomenon in control input occurs. It is clear that such a chattering phenomenon in control input is undesirable in a control system, though the works mentioned above pay no attention to it. Therefore, the smoothing of control input between cells is also discussed after controller design.

Finally, the effectiveness of the controller and the smoothing method are demonstrated in simulations.

Therefore, besides the approach of controller design, the main contributions of this paper are threefold. The first contribution of the paper is the method of how to find and form the required quadratic inequalities when using the S-procedure to help solve the resulting LMIs by partitioning the state space into certain cells. The second one is to provide a way of obtaining the two kinds of continuity functions used in the piece-wise Lyapunov functions simultaneously. The way to prevent the chattering phenomenon in control input is the third contribution of this paper.

Throughout the paper \(*\) is used to denote either the symmetrical elements of a matrix, or the transpose of the sum of the previous terms in an expression.

2 Problem Statement

Consider a continuous non-linear system that can be expressed by the following affine T–S fuzzy model:

$$\begin{aligned} \text {Rule }i:&\quad \text {If } x_1 \text { is } {\Xi }_1^i \text { and } \ldots x_n \text { is } {\Xi }_n^i,\text { then }\nonumber \\&\quad \dot{x}= A_i x + B_i u+a_i, \end{aligned}$$
(1)

where \(x = [x_1,x_2,\ldots , x_n]^T \in {{{\mathcal {R}}}}^n\) denotes the state, and \({\Xi }_j^i~ (l = 1,2,\ldots ,n_r)\), denotes the fuzzy sets corresponding to \(x_j\) of the i-th fuzzy rule, \(u \in {{{\mathcal {R}}}}^m\), denotes the control input, \((A_i, a_i, B_i)\), denote the local system and \(a_i\) is the affine term, Accordingly, the overall affine T–S fuzzy model is given below:

$$\begin{aligned} \dot{x}=\sum _{i=1}^{n_r}\alpha _i\Bigl ( A_i x + B_i u+a_i \Bigr ), \end{aligned}$$
(2)

where \(\alpha _i(x) = \frac{\omega _i (x)}{\sum _{i=1}^{n_r} \omega _i (x)} \ge 0\) that is called firing level of i-th rule in this paper, \(\omega _i (x) = \prod _{j=1}^n\Xi _j^i(x)\).

Compared to the regular T–S fuzzy model, in the model above there are extra affine terms \(a_i\), and such a model is referred to as affine T–S fuzzy model in this paper. It has been shown that the inclusion of the affine terms increases the approximation capabilities of the model [3].

To see what problem arises when using such an affine T–S fuzzy model to design a controller, let us consider the following PDC controller:

$$\begin{aligned} u = \sum _{i=1}^{n_r} \alpha _i F_i x, \end{aligned}$$
(3)

where \(F_i \in R^{n\times m}\) are the control gains to be determined. Then, the closed-loop control system becomes

$$\begin{aligned} \dot{x}=\sum _{i=1}^{n_r}\sum _{j=1}^{n_r}\alpha _i\alpha _j\Bigl ( (A_i +B_iF_j )x +a_i \Bigr ). \end{aligned}$$
(4)

The system stability can be investigated by using Lyapunov stability theory. Defining following Lyapunov function candidate:

$$\begin{aligned} V= x^TP x, \end{aligned}$$
(5)

where \(P=P^T>0\), the system (4) will be asymptotically stable so long as \(\dot{V}<0\).

Computing the time derivative V along the trajectory of (4), we have

$$\begin{aligned} \dot{V}&=\dot{x}^TPx+x^TP\dot{x}\nonumber \\&=\sum _{i=1}^{n_r}\sum _{j=1}^{n_r}\alpha _i\alpha _j \begin{bmatrix} x\\ 1 \end{bmatrix} \begin{bmatrix} P(A_i+B_iF_j)+(*)&{}Pa_i\\ *&{}0 \end{bmatrix}\begin{bmatrix} x\\ 1 \end{bmatrix}, \end{aligned}$$
(6)

from which a condition maintaining \(\dot{V}<0\) can be obtained:

$$\begin{aligned} \begin{bmatrix} x\\ 1 \end{bmatrix} ^T\begin{bmatrix} P(A_i+B_iF_j)+(*)&{}Pa_i\\ *&{}0 \end{bmatrix}\begin{bmatrix} x\\ 1 \end{bmatrix}<0. \end{aligned}$$
(7)

Defining

$$\begin{aligned} {{\bar{x}}}&= \begin{bmatrix} x\\ 1 \end{bmatrix}, \quad {{\bar{P}}}= \begin{bmatrix} P&{}0\\ 0&{}p \end{bmatrix},\quad {{\bar{F}}}_j= \begin{bmatrix} F_j&{}0\\ \end{bmatrix},\\ {{\bar{A}}}_i&= \begin{bmatrix} A_i&{}a_i\\ 0&{}0 \end{bmatrix}, \quad {{\bar{B}}}_i = \begin{bmatrix} B_i\\ 0 \end{bmatrix}, \end{aligned}$$

where \(p>0\), thus (7) is rewritten as

$$\begin{aligned} {{\bar{x}}}^T\left( {{\bar{P}}}({{\bar{A}}}_i+{{\bar{B}}}_i{{\bar{F}}}_j) +(*)\right) {{\bar{x}}}<0, \end{aligned}$$
(8)

which will hold as long as

$$\begin{aligned} {{\bar{P}}}({{\bar{A}}}_i+{{\bar{B}}}_i{{\bar{F}}}_j)+(*)<0. \end{aligned}$$
(9)

Pre- and post-multiplying above inequality by \({{\bar{Q}}}={{\bar{P}}}^{-1}\) where

$$\begin{aligned} {{\bar{P}}}^{-1}= \begin{bmatrix} P^{-1}&{}0\\ 0&{}1/p \end{bmatrix}=: \begin{bmatrix} Q&{}0\\ 0&{}q \end{bmatrix}, \end{aligned}$$
(10)

we obtain its equivalent form in the form of LMIs:

$$\begin{aligned} \Theta _{ij} <0, \end{aligned}$$
(11)

where \(\Theta _{ij}={{\bar{A}}}_i {{\bar{Q}}} + {{\bar{B}}}_i {{\bar{M}}}_j + (*)\), \({{\bar{M}}}_j = {{\bar{F}}}_j {{\bar{Q}}}\). Looking into the details of \(\Theta _{ij}\), we have

$$\begin{aligned} \Theta _{ij}= \begin{bmatrix} A_iQ+B_iM_j+(*)&{}a_iq\\ *&{}0 \end{bmatrix}. \end{aligned}$$
(12)

It is known that for an LMI to be feasible all its principle minors must be less than zero. However, as shown in (12), due to the existence of the 0 on the diagonal, the LMI in (11) is definitely infeasible.

On the other hand, (11) is eventually a condition for maintaining

$$\begin{aligned} {{\bar{x}}}^T\Theta _{ij}{{\bar{x}}}<0. \end{aligned}$$
(13)

Therefore to this end, if we can manage to find a quadratic inequality such as

$$\begin{aligned} {{\bar{x}}}^TX {{\bar{x}}} < 0, \end{aligned}$$
(14)

where \(X=X^T\),

$$\begin{aligned} X= \begin{bmatrix} X_1&{}X_2\\ *&{}X_3 \end{bmatrix}, \quad X_3>0, \end{aligned}$$
(15)

then, by using the S-procedure, the inequality in (13) is transferred to

$$\begin{aligned} {{\bar{x}}}^T \Theta _{ij} {{\bar{x}}} <\tau {{\bar{x}}}^T X {{\bar{x}}}, \end{aligned}$$
(16)

where \(\forall \tau >0\), which leads to

$$\begin{aligned} \Theta _{ij} -\tau X<0, \end{aligned}$$
(17)

specifically,

$$\begin{aligned} \begin{bmatrix} A_{ij}^{(1)} + (*) -\tau X_1 &{}A_{ij}^{(2)}-\tau X_2\\ *&{} -\tau X_3 \end{bmatrix} <0. \end{aligned}$$
(18)

At this stage, it is easy to verify that the 0 on the diagonal in (12) is replaced by \(-\tau X_3\) that is negative definite owing to \(X_3=X_3^T>0\).

However, how to find such quadratic inequalities is still an open question, which will be discussed in the next section.

3 Fuzzy Partition

In this paper the state space is split into certain cells based on the antecedents of the fuzzy rules [33]. Let \(\{{{{\mathcal {S}}}}_i\}_{i=1}^{I_s}\) be a cell denoting a polyhedral partition of \(R^n\) with \(I_s=\Pi _{i=1}^n n_{x_i}\) being the finite number of the cells, where \(n_{x_i}\) is the number of partitions on \(x_i\). Let K(i) be the set of indexes (rule numbers) of the subsystems within the cell of \({{{\mathcal {S}}}}_i\) such that such \(\sum _{j=1}^{K(i)} \alpha _j = 1\), where \(\alpha _j\) is the firing level of j-th rule. Let \({{{\mathcal {I}}}}=\{1, 2, \ldots I_s\}\), and divide it further into two categories: one is \({{{\mathcal {I}}}}_0\), that includes cells that do not have affine terms, and the other is \({{{\mathcal {I}}}}_1\), that includes the remaining cells. It is evident that the origin is in a cell in \({{{\mathcal {I}}}}_0\), and all cells in \({{{\mathcal {I}}}}_1\) are away from the origin.

Therefore, based on the partition, the system (2) can be rewritten as

$$\begin{aligned} {\dot{x}}=\sum _{k \in {{{\mathcal {I}}}}} \sum _{i \in K(k)} \upsilon _k \alpha _i\left( A_i x + B_i u+a_i \right) , \end{aligned}$$
(19)

where \(\sum _{i=1}^{K(k)}\alpha _i = 1\), and

$$\begin{aligned} \upsilon _k = \left\{ \begin{array}{ll} 1, &{}\quad {{\bar{x}}} \in {{{\mathcal {S}}}}_k\\ 0, &{}\quad {{\bar{x}}} \notin {{{\mathcal {S}}}}_k. \end{array} \right. \end{aligned}$$
(20)

To begin with, let us consider an affine T–S fuzzy model, in which there is only one variable, \(x_1\) in its antecedents. Focusing on the cell \({{{\mathcal {S}}}}_k\) where \(k \in {{{\mathcal {I}}}}_1\), let the cell be defined by the section \((l_{1k}, r_{1k})\), that is, \(l_{1k}< x_1 < r_{1k}\). As \(k \in {{{\mathcal {I}}}}_1\), the signs of both \(l_{1k}\) and \(r_{1k}\) are the same, which means that \(l_{1k} \cdot r_{1k} > 0\) all of the time. In addition, we have

$$\begin{aligned} (x_1 - l_{1k})(x_1 - r_{1k}) < 0, \end{aligned}$$
(21)

which leads to

$$\begin{aligned} x_1^2 - (l_{1k} + r_{1k})x_1 + l_{1k} r_{1k} < 0, \end{aligned}$$
(22)

equivalently

$$\begin{aligned} {{\bar{x}}}^T \Psi _{1k} {{\bar{x}}} < 0, \end{aligned}$$
(23)

where

$$\begin{aligned} \Psi _{1k} = \begin{bmatrix} 1&{}0&{}\ldots &{}0&{}- \frac{l_{1k}+r_{1k}}{2}\\ *&{}0&{}\ldots &{}0&{}0\\ \vdots &{}\vdots &{}\ddots &{}\vdots &{}\vdots \\ *&{}*&{}\ldots &{}0&{}0\\ *&{}*&{}\ldots &{}*&{}l_{1k} r_{1k} \end{bmatrix}. \end{aligned}$$
(24)

We see that the bottom right corner is always positive, this makes it a favourable inequality as we guarantee a negative value on the diagonal of the LMI whenever \(k \in {{{\mathcal {I}}}}_1\).

Next, let us consider the case, where, besides \(x_1\), there is another variable \(x_2\) in the antecedents of the fuzzy rules, and the support is \(x_2 \in (l_{2k}, ~r_{2k})\), then we have

$$\begin{aligned} (x_2 - l_{2k})(x_2 - r_{2k}) < 0. \end{aligned}$$
(25)

Therefore, inequalities (21) and (25) yield

$$\begin{aligned} {{\bar{x}}}^T \Psi _{2k} {{\bar{x}}} < 0 \end{aligned}$$
(26)

with

$$\begin{aligned} \Psi _{2k} = \begin{bmatrix} 1&{}0&{}0&{}\ldots &{}0&{}- \frac{l_{1k}+r_{1k}}{2}\\ *&{}0&{}0&{}\ldots &{}0&{}- \frac{l_{2k}+r_{2k}}{2}\\ \vdots &{}\vdots &{}\vdots &{}\ddots &{}\vdots &{}\vdots \\ *&{}*&{}0&{}\ldots &{}0&{}0\\ *&{}*&{}*&{}\ldots &{}1&{}0\\ *&{}*&{}*&{}\ldots &{}*&{}\displaystyle \sum _{i=1}^{2} l_{ik} r_{ik} \end{bmatrix}, \end{aligned}$$
(27)

where the bottom right corner, is positive again owing to \(l_{2k} \cdot r_{2k} > 0\).

Generalizing the inequality for an arbitrary number of variables in the antecedents of the fuzzy rules, and for any cell \({{{\mathcal {S}}}}_k\) where \(k \in {{{\mathcal {I}}}}_1\) we can always obtain the following quadratic inequality:

$$\begin{aligned} {{\bar{x}}}^T \Psi _k {{\bar{x}}} < 0, \end{aligned}$$
(28)

with

$$\begin{aligned} \Psi _{k} = \begin{bmatrix} 1&{}0&{}\ldots &{}0&{}- \frac{l_{1k}+r_{1k}}{2}\\ *&{}1&{}\ldots &{}0&{}- \frac{l_{2k}+r_{2k}}{2}\\ \vdots &{}\vdots &{}\ddots &{}\vdots &{}\vdots \\ *&{}*&{}\ldots &{}1&{}- \frac{l_{nk}+r_{nk}}{2}\\ *&{}*&{}\ldots &{}*&{}\displaystyle \sum _{i=1}^{n} l_{ik} r_{ik} \end{bmatrix}, \end{aligned}$$
(29)

and \(\sum _{i=l}^{n} l_{ik} r_{ik}>0\). It can be noted that the inequality (28) only holds if \(x \in {{{\mathcal {S}}}}_k\), which will be used in the control designs in the next section.

As long as a cell is away from the origin, there is one inequality like (21) for each variable in the antecedent of the fuzzy rules. However, it is not necessary to involve all the inequalities in the final \(\Psi _{k}\) in (29) in the case of \(\sum _{i=1}^{n} l_{ik} r_{ik}\le 0\). For example, let us consider cell \({{{\mathcal {S}}}}_2\) in Fig. 1. We have two inequalities:

$$\begin{aligned}&(x_1 - l_{12})(x_1 - r_{12})< 0,\\&(x_2 - l_{22})(x_2 - r_{22}) < 0, \end{aligned}$$

where \(l_{12}=-2, r_{12}=-1, l_{22}=-2\), and \(r_{22}=2\). If we involve both the two inequalities in \(\Psi _{2}\), then \(\sum _{i=1}^{2} l_{i2} r_{i2}\) would be \((-2)\cdot (-1)+(-2)\cdot 2=-2\) which is not positive as required. Therefore, in this case only the first inequality will be involved in the final \(\Psi _{2}\):

$$\begin{aligned} \Psi _{2} = \begin{bmatrix} 1&{}0&{}- \frac{l_{12}+r_{12}}{2}\\ *&{}0&{}0\\ *&{}*&{} l_{12}\cdot r_{12} \end{bmatrix}. \end{aligned}$$
Fig. 1
figure 1

Partition example

In summary, the procedure of the partition and obtaining the required quadratic inequalities are given as follows.

  1. Step 1:

    On the basis of the antecedents of the fuzzy rules, partition the state space into certain cells such that the sum of the related firing levels is 1 at each cell;

  2. Step 2:

    Using \((x_p - l_{pk})(x_p - r_{pk}) < 0\) where \(x_p\) is one of variables to form the k-th cell and \(x_p \in (l_{pk}, ~r_{pk})\) to establish the quadratic inequality (28) for the k-th cell;

  3. Step 3:

    Check if the term at the bottom right corner of \(\Psi _k\) is greater than zero; if not, remove pertinent contents in \(\Psi _k\) related to variables \(x_p\) such that \(l_{pk}r_{pk}<0\) to guarantee the term at the bottom right corner of \(\Psi _k\) is greater than zero.

4 Control System Design

Under the fuzzy partition described above, the system (2) is equal to (19), which means the system behaviour in each cell \({{{\mathcal {S}}}}_k\) is irrelevant to the rest of the cells. In other words, a controller working in a cell \({{{\mathcal {S}}}}_k\) will not have influence over any of the others, which encourages us to design cell-based controllers. First, let us provide the following lemma.

Lemma 1

Given compatible matrices \({{{\mathcal {A}}}}\), \({{{\mathcal {Q}}}}\), LMI

$$\begin{aligned} {{{\mathcal {A}}}}{{{\mathcal {Q}}}}+{{{\mathcal {Q}}}}{{{\mathcal {A}}}}^T<0, \end{aligned}$$
(30)

where \({{{\mathcal {Q}}}}={{{\mathcal {Q}}}}^T>0\), is equivalent to LMI

$$\begin{aligned} \begin{bmatrix} {{{\mathcal {A}}}}{{{\mathcal {X}}}}_1+(*)&{}{{{\mathcal {Q}}}}-{{{\mathcal {X}}}}_1^T+{{{\mathcal {A}}}}{{{\mathcal {X}}}}_2\\ *&{}-{{{\mathcal {X}}}}_2+(*) \end{bmatrix}<0, \end{aligned}$$
(31)

where \({{{\mathcal {X}}}}_1\) and \({{{\mathcal {X}}}}_2\) are free parameters with compatible dimensions.

Proof

By the elimination procedure for matrix variables [22], for a given GX and V with compatible dimensions, the following inequalities are equivalent:

$$\begin{aligned}&G+X^TV+V^TX<0, \end{aligned}$$
(32)
$$\begin{aligned}&{{\tilde{V}}}^TG{{\tilde{V}}}<0, \end{aligned}$$
(33)

where \({{\tilde{V}}}\) is the orthogonal complement of V, that is, \(V{{\tilde{V}}}=0\). Setting

$$\begin{aligned} V&=\begin{bmatrix} {{{\mathcal {A}}}}^T&-I \end{bmatrix},\quad {{\tilde{V}}}=\begin{bmatrix} I\\ {{{\mathcal {A}}}}^T \end{bmatrix}, \end{aligned}$$
(34)
$$\begin{aligned} G&=\begin{bmatrix} 0&{}{{{\mathcal {Q}}}}\\ {{{\mathcal {Q}}}}&{}0 \end{bmatrix},\quad X=\begin{bmatrix} {{{\mathcal {X}}}}_1&{{{\mathcal {X}}}}_2 \end{bmatrix}, \end{aligned}$$
(35)

it follows that

$$\begin{aligned} {{\tilde{V}}}^TG{{\tilde{V}}}={{{\mathcal {A}}}}{{{\mathcal {Q}}}} +{{{\mathcal {Q}}}}{{{\mathcal {A}}}}^T. \end{aligned}$$
(36)

Furthermore, substituting GX and V in (34) and (35) into (33), it leads to (31). This completes the proof. \(\square\)

Then, with the asymptotic stability of the origin in mind, the following assumption is made:

Assumption 1

The affine terms \(a_i = 0\) in cells \({{{\mathcal {S}}}}_k\) where \(k \in {{{\mathcal {I}}}}_0\).

Therefore, we have

$$\begin{aligned} \dot{x} = \sum _{k \in {{{\mathcal {I}}}}_0} \sum _{i \in K(k)} \upsilon _k \alpha _i\left( A_ix + B_i u\right) . \end{aligned}$$
(37)

For the convenience of description, we provide the following definition:

$$\begin{aligned}&n_k={\left\{ \begin{array}{ll} n+1&{}\quad \text {for }k \in {{{\mathcal {I}}}}_1\\ n&{}\quad \text {for }k \in {{{\mathcal {I}}}}_0 \end{array}\right. }. \end{aligned}$$
(38)

4.1 Controller Design

On the basis of the partition, we design controllers for cells \({{{\mathcal {S}}}}_k\):

$$\begin{aligned} u = {{\bar{G}}}_k {{\bar{x}}} \end{aligned}$$
(39)

where \({{\bar{G}}}_{k}=[G_{k}~~g_{k}]\in R^{m\times n_k}\) is to be determined, \(G_{k}\in R^{m\times n}\), which means \({{\bar{G}}}_{k}=G_{k}\) for \(k \in {{{\mathcal {I}}}}_0\). Therefore the closed-loop system becomes:

$$\begin{aligned} \dot{{{\bar{x}}}} = \sum _{i=1}^{n_r} \alpha _i ({{\bar{A}}}_i + {{\bar{B}}}_i {{\bar{G}}}_k) {{\bar{x}}} \end{aligned}$$
(40)

which is reduced to \(\dot{x} = \sum _{i=1}^{n_r} \alpha _i ( A_i + B_i G_k) x\) for \(k \in {{{\mathcal {I}}}}_0\).

Now, a piecewise Lyapunov function candidate is then given as:

$$\begin{aligned} V_k(x) = {{\bar{x}}}^T {{\bar{P}}}_k {{\bar{x}}}, \end{aligned}$$
(41)

where

$$\begin{aligned} {{\bar{P}}}_k={{\bar{F}}}_k^TP{{\bar{F}}}_k, \end{aligned}$$
(42)

\(P=P^T\in R^{p\times p}\) is positive definite with \(p=\sum _{i=1}^n\left( n_{x_i}+1\right) +n\), and \({{\bar{F}}}_k=[F_k~~f_k]\in R^{p\times n_k}\) with \(F_k\in R^{p\times n}\) satisfying

$$\begin{aligned} {{\bar{F}}}_i{{\bar{x}}}={{\bar{F}}}_j{{\bar{x}}}, \qquad x\in {{{\mathcal {S}}}}_i\cap {{{\mathcal {S}}}}_j \end{aligned}$$
(43)

which is called the continuity function. It is constructed in order to guarantee the Lyapunov functions (41) are continuous across the cell boundaries [33]. It is clear that the Lyapunov function (41) becomes \(V_k(x) =x^T P_k x\), where \(P_k= F_k^TPF_k\), for \(k\in {{{\mathcal {I}}}}_0\).

As for the continuity functions \({{\bar{F}}}_k\), it is clear that they are not unique for cells \({{{\mathcal {S}}}}_k\), which means \({{\bar{F}}}_k\), if constructed in a different way can have different forms including the dimension of p, where \(p\ge n+1\). Some works [33, 34] provides a systematic way to construct \({{\bar{F}}}_k\) satisfying (43) in accordance with the corner points of the membership functions in the antecedents of the fuzzy rules. However, this method does not guarantee that \(f_k=0\) for \(k\in {{{\mathcal {I}}}}_0\); and a practical extension is given in Appendix A.

Although \({{\bar{P}}}_k\), as a whole, is square and can be made invertible, it is of no use solving the whole \({{\bar{P}}}_k\) in the final LMIs, as in doing so we cannot maintain the relation in (43); in other words, the structure in (43) must be retained in the final LMIs; to meet this end, apart from P, \({{\bar{F}}}_k\) is necessary to be square and invertible:

$$\begin{aligned} \bar{{{\bar{F}}}}_k = \begin{bmatrix} F_{0k}&{{\bar{F}}}_k \end{bmatrix}\in R^{p\times p} \end{aligned}$$
(44)

where \(F_{0k}\in R^{p\times (p-n_k)}\) are free parameters such that rank(\(\bar{{{\bar{F}}}}_k)=p\). Then we have

$$\begin{aligned} \bar{{{\bar{F}}}}_i \bar{{{\bar{x}}}} = \bar{{{\bar{F}}}}_j \bar{{{\bar{x}}}}, \quad \bar{{{\bar{x}}}}=\begin{bmatrix} x_0\equiv 0\\ {{\bar{x}}} \end{bmatrix}\in R^p \end{aligned}$$
(45)

where \(x_0\in R^{p-n_k}\) is a newly added auxiliary state vector chosen by

$$\begin{aligned} \dot{x}_0=-\lambda x_0,\quad \lambda >0. \end{aligned}$$
(46)

From (40) and (46), we have an augmented system:

$$\begin{aligned} \dot{ \bar{{{\bar{x}}}}}=\sum _{i=1}^{n_r} \alpha _i \bar{{{\bar{A}}}}_{ik}\bar{{{\bar{x}}}} \end{aligned}$$
(47)

where

$$\begin{aligned} \bar{{{\bar{A}}}}_{ik} = \begin{bmatrix} -\lambda I&{}0\\ 0&{}{{\bar{A}}}_i + {{\bar{B}}}_i {{\bar{G}}}_k \end{bmatrix} \end{aligned}$$

in which \({{\bar{A}}}_i, {{\bar{B}}}_i\) and \({{\bar{G}}}_k\) become \(A_i, B_i\) and \(G_k\), respectively for \(k \in {{{\mathcal {I}}}}_0\). It is clear that the system (40) is stable as long as the system (47) is. Therefore, now we focus on this augmented system.

Thus, by using (45), the Lyapunov function (41) becomes:

$$\begin{aligned} V_k(x) = \bar{{{\bar{x}}}}^T \bar{{{\bar{P}}}}_k \bar{{{\bar{x}}}}, \end{aligned}$$
(48)

where

$$\begin{aligned} \bar{{{\bar{P}}}}_k=\bar{{{\bar{F}}}}_k^TP\bar{{{\bar{F}}}}_k. \end{aligned}$$
(49)

Taking the derivative on the trajectory of (47), we get the asymptotic stability condition:

$$\begin{aligned} \bar{{{\bar{A}}}}_{ik}^T {\bar{{{\bar{P}}}}_k} + {\bar{{{\bar{P}}}}_k}\bar{{{\bar{A}}}}_{ik} < 0 \end{aligned}$$
(50)

which is equivalent to

$$\begin{aligned} \bar{{{\bar{A}}}}_{ik} \bar{{{\bar{Q}}}}_{k} + \bar{{{\bar{Q}}}}_{k}\bar{{{\bar{A}}}}_{ik}^T < 0 \end{aligned}$$
(51)

where

$$\begin{aligned} \bar{{{\bar{Q}}}}_{k}={\bar{{{\bar{P}}}}_{k}}^{-1} =\bar{{{\bar{F}}}}_k^{-1}P^{-1}\bar{{{\bar{F}}}}_k^{-T}=: L_k Q L_k^T>0. \end{aligned}$$
(52)

It is worth noting that not only \(\bar{{{\bar{P}}}}_{k}\) as a whole is invertible but also each of the elements within such as \(\bar{{{\bar{F}}}}_k\) is also invertible.

Now by applying Lemma 1 to (51), we have

$$\begin{aligned} \begin{bmatrix} \bar{{{\bar{A}}}}_{ik}{{{\mathcal {X}}}}_{1k}+(*)&{}\bar{{{\bar{Q}}}}_{k}-{{{\mathcal {X}}}}_{1k}^T+\bar{{{\bar{A}}}}_{ik}{{{\mathcal {X}}}}_{2k}\\ *&{}-{{{\mathcal {X}}}}_{2k}+(*) \end{bmatrix}<0 \end{aligned}$$
(53)

Defining \({\mathcal {X}}_{1k}\in R^{p\times p}\) and \({\mathcal {X}}_{2k}\in R^{p\times p}\) as follows [5]:

$$\begin{aligned} {\mathcal {X}}_{1k} = \begin{bmatrix} {X}_{1k}^{(1)}&{}{X}_{1k}^{(2)}\\ 0&{}{X}_{1k}^{(3)} \end{bmatrix}, \quad {\mathcal {X}}_{2k} = \begin{bmatrix} {X}_{2k}^{(1)}&{}{X}_{2k}^{(2)}\\ 0&{}\delta {X}_{1k}^{(3)} \end{bmatrix} \end{aligned}$$
(54)

where \({X}_{1k}^{(1)}\in R^{(p-n_k) \times (p-n_k)}\), \({X}_{1k}^{(2)}\in R^{(p-n_k) \times n_k}\), \({X}_{1k}^{(3)} \in R^{n_k \times n_k}\), \({X}_{2k}^{(1)}\in R^{(p-n_k) \times (p-n_k)}\), \({X}_{2k}^{(2)}\in R^{(p-n_k) \times n_k}\) and \(\delta\) is scalar, (53) becomes following LMIs:

$$\begin{aligned} \begin{bmatrix} {{\mathcal {A}}}_{ik}^{(1)}+ (*)&{}L_k Q L_k^T - {{{\mathcal {X}}}}_{1k}^T + {{\mathcal {A}}}_{ik}^{(2)}\\ *&{}- {\mathcal {X}}_{2k} - {\mathcal {X}}_{2k}^T \end{bmatrix} < 0 \end{aligned}$$
(55)

where

$$\begin{aligned} {{\mathcal {A}}}_{ik}^{(1)}&= \begin{bmatrix} -\lambda {X}_{1k}^{(1)}&{}-\lambda {X}_{1k}^{(2)}\\ *&{} {{\bar{A}}}_i{X}_{1k}^{(3)}+{{\bar{B}}}_i{{\bar{M}}}_k \end{bmatrix} \end{aligned}$$
(56)
$$\begin{aligned} {{\mathcal {A}}}_{ik}^{(2)}&= \begin{bmatrix} -\lambda {X}_{2k}^{(1)}&{}-\lambda {X}_{2k}^{(2)}\\ *&{} {{\bar{A}}}_i{X}_{2k}^{(3)}+\delta {{\bar{B}}}_i{{\bar{M}}}_k \end{bmatrix} \end{aligned}$$
(57)

and \({{\bar{M}}}_k={{\bar{G}}}_k X_{1k}^{(3)}\).

However, the LMIs (55) are still structurally infeasible for \(k\in {{{\mathcal {I}}}}_1\), because certain diagonal block of the bottom right corner of \({{\mathcal {A}}}_{ik}^{(1)}\), which is on the diagonal of the LMIs, is zero. As shown in the preceding section, each of cells for \(k\in {{{\mathcal {I}}}}_1\) contains a favourable quadratic inequality (28) that helps us solve the LMIs (55). As a result, by using S-procedure as in (17), \({{\mathcal {A}}}_{ik}^{(1)}\) of (55) is replaced as:

$$\begin{aligned} {{\mathcal {A}}}_{ik}^{(1)}&= \begin{bmatrix} -\lambda {X}_{1k}^{(1)}&{}0\\ *&{} {{\bar{A}}}_i{X}_{1k}^{(3)}+{{\bar{B}}}_i{{\bar{M}}}_k-\tau \Psi _k \end{bmatrix} \end{aligned}$$
(58)

where \(\forall \tau >0\).

To summarise, we have the following theorem.

Theorem 1

Given the affine T–S fuzzy model (2), the state space is partitioned to be a collection of cells \(\{{{{\mathcal {S}}}}_i\}_{i \in {{\mathcal {I}}}}\), where \(\sum _{m=1}^{K(i)}\alpha _m=1\) with K(i) being the set of the rule numbers associated with the cell. Further dividing \({{{\mathcal {I}}}}\) into \({{{\mathcal {I}}}}_0\) and \({{{\mathcal {I}}}}_1\), where \({{{\mathcal {I}}}}_0\) denotes the index set of cell indexes that contain the origin and \({{{\mathcal {I}}}}_1\) does not, each of cells \({{{\mathcal {S}}}}_k\) for \(k\in {{{\mathcal {I}}}}_1\) contains a quadratic inequality (28). For all of the cells, with continuity functions \({{\bar{F}}}_k=[F_k~~f_k]\in R^{p\times n_k}\) with \(F_k\in R^{p\times n}\) subject to (43), and some given scalars \(\lambda >0\) and \(\delta\), if there exists matrix \(Q =Q^T\in R^{p\times p}\), matrices \({{\bar{G}}}_{k}=[G_{k}~~g_{k}]\in R^{m\times n_k}\) with \(G_{k}\in R^{m\times n}\) in each of the cells, \({X}_{1k}^{(1)},~~{X}_{2k}^{(1)}\in R^{(p-n_k) \times (p-n_k)}\), \({X}_{1k}^{(2)},~~{X}_{2k}^{(2)}\in R^{(p-n_k) \times n_k}\), \({X}_{1k}^{(3)} \in R^{n_k \times n_k}\), and \(M_k\in R^{m\times n_k}\), such that LMI \(\tau >0\), LMIs (52), where matrices \(L_k\) are the inverses of \(\bar{{{\bar{F}}}}_k\) defined in (45), along with LMIs (55) with (57) and

$$\begin{aligned}&(56) \text { for } k\in {{{\mathcal {I}}}}_0,\\&.(58) \text { for } k\in {{{\mathcal {I}}}}_1 \end{aligned}$$

are held, then controller given in (39) with \({{\bar{G}}}_k={{\bar{M}}}_k(X_{1k}^{(3)})^{-1}\) guarantees the closed-loop system (40) under Assumption 1, is to be asymptotically stable. \(\square\)

Remark 1

Although the piecewise Lyapunov functions (cell-wise precisely) \({{\bar{P}}}_k\) are used, they depend on the common matrix P. Nevertheless, \({{\bar{P}}}_k\) is to be expected to be found easier than in the regular case such as P in (7).

Remark 2

In order to expand \({{\bar{F}}}_k\) to square matrices \(\bar{{{\bar{F}}}}_k\) in (44), it is necessary to insert some prescribed matrices \(F_{0k}\), which may have much influence over the feasibility of LMIs in Theorem 1.

4.2 Preventing Chattering Phenomenon

Whilst the piece-wise Lyapunov function is continuous when the state travels from one cell to another thanks to the continuity functions, the cell-based controller may cause chattering between cells. It is clear that the chattering phenomenon in a control system should be best avoided. Therefore, in this section we consider how to transfer the proposed controller to one that such a phenomenon does not occur.

To convey the idea clearly, let us consider a simple case where there is only one antecedent variable \(x_1\) in the affine T–S fuzzy model. Now, we suppose that, as shown in (a) of Fig. 2, the triangular membership function \(\Xi _i\) is used to define the fuzzy set in the antecedent part of the i-th fuzzy rule. At the corner point \(d_i\) at which \(\Xi _i(x_1)=1\), the space is divided into two cells \({{{\mathcal {S}}}}_{i-1}\) on the left side and \({{{\mathcal {S}}}}_i\) on the other side, which means

  • (Fact 1:) both controllers \({{\bar{G}}}_{i-1}{{\bar{x}}}\), and \({{\bar{G}}}_{i}{{\bar{x}}}\) can stabilise all sub-systems corresponding with the fuzzy rules with indexes defined in \(K(i-1)\), and K(i), respectively.

    Furthermore, as long as the fuzzy partition is performed at such a corner point like \(d_i\), the rule index i is definitely included in both \(K(i-1)\) and K(i); therefore,

  • (Fact 2:) both controllers \({{\bar{G}}}_{i-1}{{\bar{x}}}\), and \({{\bar{G}}}_{i}{{\bar{x}}}\) can stabilise the sub-system corresponding with i-th rule. For simplicity, let us say the system is \(\dot{{{\bar{x}}}}={{\bar{A}}}_i{{\bar{x}}}+{{\bar{B}}}_iu\).

Now let us approximate the fuzzy set \(\Xi _{i+1}\), as shown in Fig. 2, by moving its left corner point from \(d_i\) to \(d_i+\varepsilon\) where \(\varepsilon >0\) is to make small neighbourhood such that in which only the firing level of i-th rule is not zero. Therefore, considering the facts 1 and 2, in the neighbourhood \([d_{i}~d_i+\varepsilon ]\) the whole system behaviour is determined by \(\dot{{{\bar{x}}}}={{\bar{A}}}_i{{\bar{x}}}+{{\bar{B}}}_iu\), which can be stabilised by either controller \({{\bar{G}}}_{i-1}{{\bar{x}}}\) or \({{\bar{G}}}_{i}{{\bar{x}}}\).

On the other hand, the discontinuity between the two controllers, \(({{\bar{G}}}_{i-1} -{{\bar{G}}}_{i}) {{\bar{x}}}\), can be prevented by introducing a controller \(u=(\alpha _{i-1} {{\bar{G}}}_{i-1}+\alpha _i {{\bar{G}}}_{i}){{\bar{x}}}\) where \(\alpha _{i-1}+\alpha _i=1\), which means the closed-loop system

$$\begin{aligned} \dot{x}=\sum _{j=i-1}^i\alpha _i\left( {{\bar{A}}}_i+{{\bar{B}}}_i {{\bar{G}}}_{j}\right) {{\bar{x}}} \end{aligned}$$
(59)

must be stable. A condition of the asymptotic stability is that there exists a compatible symmetric \(P>0\) such that \(P{{\bar{A}}}_i+P{{\bar{B}}}_i{{\bar{G}}}_j<0\) where \(j=i-1, i\).

Consequently, the discontinuity of the controllers between cells \({{{\mathcal {S}}}}_{i-1}\) and \({{{\mathcal {S}}}}_{i}\) can be prevented by introducing a controller in the neighbourhood as follows:

$$\begin{aligned} \left. \begin{array}{ll} \text {If } x_1\text { is } \Theta _{i-1}, &{}\quad \text {then } u={{\bar{G}}}_{i-1}{{\bar{x}}}\\ \text {If } x_1\text { is } \Theta _{i}, &{}\quad \text {then } u={{\bar{G}}}_{i}{{\bar{x}}} \end{array} \right\} \end{aligned}$$
(60)

where the fuzzy sets \(\Theta _{i-1}\) and \(\Theta _{i}\) are defined as in Fig. 3, subject to that there is a \(P=P^T>0\) such that

$$\begin{aligned}&P{{\bar{A}}}_i+P{{\bar{B}}}_i{{\bar{G}}}_j+(*)-\tau \phi <0, \end{aligned}$$
(61)

where \(j=i-1, i\), \(\forall \tau >0\), and

$$\begin{aligned} \phi = \begin{bmatrix} 1 &{}0 &{}\frac{2d_i+\varepsilon }{2}\\ *&{}0&{}0\\ *&{}*&{}d_i(d_i+\varepsilon ) \end{bmatrix}. \end{aligned}$$
(62)
Fig. 2
figure 2

Smoothing control input with triangular membership functions

Fig. 3
figure 3

Fuzzy sets smoothing control inputs between cells

When it comes to the trapezoidal membership functions as shown in (a) of Fig. 4, a similar neighbourhood of \(d_i\) inside \({{{\mathcal {S}}}}_i\) can be established. As a result, by using the fuzzy sets \(\Theta _{i-1}\) and \(\Theta _{i}\) shown in (b) of Fig. 4, the two rules in (60) are able to smooth the control input between the two cells.

Fig. 4
figure 4

Smoothing control input with trapezoidal membership functions

5 Simulation Examples

In order to demonstrate the effectiveness of our proposed controller, we apply it to two systems. The first one is the inverted pendulum system, in which the approach of obtaining an affine T–S fuzzy model by using the Taylor series expansion is shown. The second one is an affine T–S fuzzy model with two antecedent variables of fuzzy rules.

5.1 Inverted Pendulum on a Cart

A pendulum is mounted on top of a vehicle, where the bottom of the pendulum is connected via a pivot and a mass is attached to the top. The goal is to keep the pendulum from falling over by moving the vehicle below.

The dynamics of the system can be described by the following non-linear equations:

$$\begin{aligned}&I_m \ddot{\theta }= F_v l \sin \theta - F_h l \cos \theta \nonumber \\&F_v - mg = -ml (\ddot{\theta }\sin \theta + {{\dot{\theta }}}^2 \cos \theta ) \nonumber \\&F_h = m \ddot{y} + ml (\ddot{\theta }\cos \theta - {{\dot{\theta }}}^2 \sin \theta ) \nonumber \\&u - F_h = M \ddot{y} \end{aligned}$$
(63)

where \(\theta\) is the angular position of the pendulum in relation to the equilibrium point, 2l the length of the pendulum, m the mass of the pendulum, y the position of the vehicle, M the mass of the vehicle, \(F_v\) the vertical force at the pivot, \(F_h\) the horizontal force, \(I_m = \frac{1}{m} l^2\) is the moment of inertia of the pendulum, \(g = 9.81m/s^2\) the gravity constant, and finally the control input u is the driving force of the vehicle.

Defining \(x^T = [\theta ~~ {{\dot{\theta }}}]\) we can obtain the following dynamic equations:

$$\begin{aligned} \dot{x}_1&= x_2\nonumber \\ \dot{x}_2&= f(x, u) \end{aligned}$$
(64)

where

$$\begin{aligned} f(x, u) = \frac{g \sin (x_1) - a m l x_2^2 \sin (2 x_1)/2 - a \cos (x_1) u}{4l/3 - a m l \cos ^2(x_1)} \end{aligned}$$

and \(a = \frac{1}{m + M}\). In order to linearize the system and obtain an affine T–S fuzzy model, we employ the Taylor series expansion. Expanding f into the Taylor series around the equilibrium points \((x_e, u_e)\)

$$\begin{aligned} \dot{x}_2&= f(x_e, u_e) + a_e(x - x_e) + b_e(u - u_e)\nonumber \\&= a_e x + b_e u - (a_e x_e + b_e u_e) \end{aligned}$$
(65)

where

$$\begin{aligned} a_e = \frac{\partial f}{\partial x^T}\Bigr |_{\begin{array}{c} x=x_e\\ u=u_e \end{array}}, \quad b_e = \frac{\partial f}{\partial u}\Bigr |_{\begin{array}{c} x=x_e\\ u=u_e \end{array}} \end{aligned}$$
(66)

and \((x_e, u_e)\) is an operating point chosen so that \(f(x_e, u_e) = 0\), and the higher-order terms in the Taylor series expansion are ignored. Therefore, the system can be linearized around \((x_e, u_e)\)

$$\begin{aligned} \dot{x} = \begin{bmatrix} 0&{}1\\ a_e \end{bmatrix} x + \begin{bmatrix} 0\\ b_e \end{bmatrix} u + \begin{bmatrix} 0\\ -(a_e x_e + b_e u_e) \end{bmatrix}. \end{aligned}$$
(67)
Table 1 Operating points

Using the operating points listed in Table 1 we obtain the following affine T–S fuzzy model:

$$\begin{aligned} R_i:&\text {If } x_1 \text { is } \Xi _i \text {, then } ~\dot{x} = A_i x + B_i u + a_i, \end{aligned}$$

where \(\Xi _i\) (\(i=1\sim 5\)) are fuzzy sets whose membership functions are shown in Fig. 5,

$$\begin{aligned} A_1&= \begin{bmatrix} 0&{}1\\ 421.2865&{}0 \end{bmatrix} = A_5, \quad B_1 = \begin{bmatrix} 0\\ -0.0052 \end{bmatrix} = B_5\\ A_2&= \begin{bmatrix} 0&{}1\\ 22.4745&{}0 \end{bmatrix} = A_4, \quad B_2 = \begin{bmatrix} 0\\ -0.1147 \end{bmatrix} = B_4\\ A_3&= \begin{bmatrix} 0&{}1\\ 17.2941&{}0 \end{bmatrix} , \quad B_3 = \begin{bmatrix} 0\\ -0.1765 \end{bmatrix} , \quad a_3 = \begin{bmatrix} 0\\ 0 \end{bmatrix}\\ a_1&= \begin{bmatrix} 0\\ 632.3559 \end{bmatrix} = -a_5, \quad a_2 = \begin{bmatrix} 0\\ 6.4142 \end{bmatrix} = -a_4. \end{aligned}$$

With the range of \(x_1 = [-88,~~+88] \cdot \pi /180\), we can partition the state space into the following cells

$$\begin{aligned} {{{\mathcal {S}}}}_1&= [-88~~-45] \cdot \pi /180\\ {{{\mathcal {S}}}}_2&= [-45~~-5] \cdot \pi /180\\ {{{\mathcal {S}}}}_3&= [-5~~5] \cdot \pi /180\\ {{{\mathcal {S}}}}_4&= [5~~45] \cdot \pi /180\\ {{{\mathcal {S}}}}_5&= [45~~88] \cdot \pi /180. \end{aligned}$$

Therefore we also have

$$\begin{aligned}&K(1) = \{1,2\}, \quad K(2) = \{2,3\},\\&K(3) = \{3\}, \quad ~~~ K(4) = \{3,4\},\\&K(5) = \{4,5\},\\&I_1 = \{1,2,4,5\}, \quad I_0 = \{3\}, \end{aligned}$$

for which, it can be verified that \(\sum _{m=1}^{K(l)} \alpha _m = 1\).

Fig. 5
figure 5

The membership functions on \(x_1\) in the inverted pendulum system

By a similar approach as in the works [33, 34], we can obtain continuity matrices \({{\bar{F}}}_k\in R^{18\times 3}\) (\(k=1 \sim 5\)), which are not all shown here for the sake of space but \({{\bar{F}}}_1\sim {{\bar{F}}}_3\) just for example. It is easy to confirm that \({{\bar{F}}}_1{{\bar{x}}}={{\bar{F}}}_2{{\bar{x}}}\), and \({{\bar{F}}}_2{{\bar{x}}}={{\bar{F}}}_3{{\bar{x}}}\).

$$\begin{aligned} {{\bar{F}}}_1&= \begin{bmatrix} -1.3325 &{} 0 &{} -1.0465\\ 1.3325 &{} 0 &{} 2.0465\\ 0 &{} 0 &{} 0\\ 11.4592 &{} 0 &{} 0\\ 0 &{} 0 &{} 0\\ 0 &{} 0 &{} 0\\ 1.0000 &{} 0 &{} 0\\ 0 &{} 1.0000 &{} 0 \end{bmatrix}\\ {{\bar{F}}}_2&= \begin{bmatrix} 0 &{} 0 &{} 0\\ -1.4324 &{} 0&{} -0.1250\\ 1.4324 &{} 0 &{} 1.1250\\ 11.4592 &{} 0 &{} 0\\ 0 &{} 0 &{} 0\\ 0 &{} 0 &{} 0\\ 1.0000 &{} 0 &{} 0\\ 0 &{}1.0000 &{} 0 \end{bmatrix}\\ {{\bar{F}}}_3&= \begin{bmatrix} 0 &{} 0&{} 0\\ 0 &{} 0 &{} 0\\ -11.4592 &{} 0 &{} 0\\ 11.4592 &{} 0 &{} 0\\ 0 &{} 0 &{} 0\\ 1.0000 &{} 0&{} 0\\ 0 &{} 1.0000 &{} 0 \end{bmatrix},\\ \end{aligned}$$

In addition, \(F_{0k}\) in (44) are made by random numbers as long as rank(\(\bar{{{\bar{F}}}}_k)=8\). Consequently, the control gains \({{\bar{G}}}_k\) for each cell are obtained:

$$\begin{aligned} {{\bar{G}}}_1&= 10^3\times \begin{bmatrix} 2.3036&0.1526&0.7043 \end{bmatrix}\\ {{\bar{G}}}_2&= 10^3\times \begin{bmatrix} 1.9464&0.1717&-0.8217 \end{bmatrix}\\ {{\bar{G}}}_3&= 10^3\times \begin{bmatrix} 2.6065&0.2085&0 \end{bmatrix}\\ {{\bar{G}}}_4&= 10^3\times \begin{bmatrix} 1.9464&0.1717&0.8217 \end{bmatrix}\\ {{\bar{G}}}_5&= 10^3\times \begin{bmatrix} 2.3036&0.1526&-0.7043 \end{bmatrix}. \end{aligned}$$

Setting the initial state \(x_0 =[-70~~0]^T\cdot \pi /180\), \(\lambda = 0.1\), and \(\delta =2\) we obtain the simulation results shown in Figs. 14 and  15. We can see from Fig. 6 that both \(x_1\) and \(x_2\) converge to 0 by the control effort shown in Fig. 7. The controller is basically cell-wise, which means the controller input is discontinuous when the state traverse from one cell to another.

Fig. 6
figure 6

The transient response of state x by the cell-based controller

Fig. 7
figure 7

The behaviour of the cell-based controller u

In order to prevent the input from the discontinuity, let us us the idea given in Sect. 4.2, and transfer the cell-wise controller into the following fuzzy controller:

$$\begin{aligned} R_i:&\quad \text {If } x_1 \text { is } \Theta _i \text {, then } u = {{\bar{G}}}_i{{\bar{x}}} \end{aligned}$$
(68)

where \(i=1 \sim 5\), \(\Theta _i\) are fuzzy sets whose membership functions are shown in Fig. 8 where \(\varepsilon =3*\pi /180\).

Fig. 8
figure 8

The membership functions on \(x_1\) in the fuzzy controller

The control performance is shown in Figs. 9 and 10. Compared to Fig. 7, it is clear that the discontinuity in control input is no longer existing.

Fig. 9
figure 9

The transient response of state x by the fuzzy controller (68)

Fig. 10
figure 10

The behaviour of the fuzzy controller u in (68)

Some level surfaces of the computed Lyapunov functions are shown in Fig. 11.

Fig. 11
figure 11

Level surfaces of the Lyapunov functions

5.2 An Affine System

Consider an affine system that is described by the following affine T–S fuzzy model [35]:

$$\begin{aligned} R_i:&\quad \text {If } x_1 \text { is } \Xi _1^i \text { and } x_2 \text { is } \Xi _2^i \text {, then } \\&\quad \dot{x} = A_i x + B_i u + a_i, \end{aligned}$$

where \(i=1 \sim 9\), \(\Xi _j^i~(j = 1,2)\) are fuzzy sets whose membership functions are shown in Fig. 12, and

$$\begin{aligned} A_1&= \begin{bmatrix} -7&{}-7.7\\ 7&{}6.3 \end{bmatrix}, A_2 = \begin{bmatrix} -1&{}-2\\ 2&{}-8 \end{bmatrix} = A_3 = A_5 = A_8,\\ A_4&= \begin{bmatrix} -10&{}-11\\ 10&{}9 \end{bmatrix} = A_7, A_6 = \begin{bmatrix} -10&{}-10\\ 10&{}5 \end{bmatrix},\\ A_9&= \begin{bmatrix} -14&{}-14\\ 14&{}7 \end{bmatrix}, B_i \equiv \begin{bmatrix} 0\\ 1 \end{bmatrix},\\ a_1&= \begin{bmatrix} 0\\ -2 \end{bmatrix} = a_7, a_3 = \begin{bmatrix} 0\\ 2 \end{bmatrix},\\ a_2&= \begin{bmatrix} 0\\ 0 \end{bmatrix} = a_4 = a_5 = a_6 = a_8 = a_9, \end{aligned}$$
Fig. 12
figure 12

The membership functions on \(x_1\) and \(x_2\) in the affine system

Then, based on these membership functions the state-space is partitioned into 9 cells \({{{\mathcal {S}}}}_k~(k= 1 \sim 9)\) that is shown in Fig. 13. Therefore, we have

$$\begin{aligned}&K(1) = \{1,2,4,5\}, \quad K(2) = \{2,5\},\quad K(3) = \{2,3,5,6\}, \\&K(4) = \{4,5\}, \quad K(5) = \{5\},\quad K(6) = \{5,6\}, \\&K(7) = \{4,5,7,8\}, \quad K(8) = \{5,8\}, \quad K(9) = \{5,6,8,9\},\\&I_1 = \{1,2,3,4,6,7,8,9\}, \quad I_0 = \{5\}, \end{aligned}$$

where \(I_0\) denotes the cells near the origin, and \(I_1\) denotes those away from it. It can be verified that \(\sum _{j=1}^{K(k)} \alpha _j = 1\) for any cell \({{{\mathcal {S}}}}_k\),

Fig. 13
figure 13

Fuzzy partition

As in the first example, we can obtain continuity matrices \({{\bar{F}}}_k\in R^{12\times 3}\) (\(k=1 \sim 9\)), which are not all shown here for the sake of space but \({{\bar{F}}}_1\sim {{\bar{F}}}_3\) and \({{\bar{F}}}_5\) just for example. It is easy to confirm that \({{\bar{F}}}_1{{\bar{x}}}={{\bar{F}}}_2{{\bar{x}}}\), \({{\bar{F}}}_2{{\bar{x}}}={{\bar{F}}}_3{{\bar{x}}}\) and \({{\bar{F}}}_2{{\bar{x}}}={{\bar{F}}}_5{{\bar{x}}}\).

$$\begin{aligned} {{\bar{F}}}_1&= \begin{bmatrix} -1&{}0&{}-1\\ 1&{}0&{}2\\ 1&{}0&{}0\\ 0&{}0&{}0\\ 0&{}-1&{}-1\\ 0&{}1&{}2\\ 0&{}1&{}0\\ 0&{}0&{}0\\ 1&{}0&{}0\\ 0&{}1&{}0 \end{bmatrix},\quad {{\bar{F}}}_2 = \begin{bmatrix} -1&{}0&{}-1\\ 1&{}0&{}2\\ 1&{}0&{}0\\ 0&{}0&{}0\\ 0&{}0&{}0\\ 0&{}-1&{}0\\ 0&{}1&{}0\\ 0&{}0&{}0\\ 1&{}0&{}0\\ 0&{}1&{}0 \end{bmatrix}, \\ {{\bar{F}}}_3&= \begin{bmatrix} -1&{}0&{}-1\\ 1&{}0&{}2\\ 1&{}0&{}0\\ 0&{}0&{}0\\ 0&{}0&{}0\\ 0&{}-1&{}0\\ 0&{}-1&{}2\\ 0&{}1&{}-1\\ 1&{}0&{}0\\ 0&{}1&{}0 \end{bmatrix},\quad {{\bar{F}}}_5 = \begin{bmatrix} 0&{}0&{}0\\ -1&{}0&{}0\\ 1&{}0&{}0\\ 0&{}0&{}0\\ 0&{}0&{}0\\ 0&{}-1&{}0\\ 0&{}1&{}0\\ 0&{}0&{}0\\ 1&{}0&{}0\\ 0&{}1&{}0 \end{bmatrix}. \end{aligned}$$

In addition, \(F_{0k}\) in (44) are made by random numbers as long as rank(\(\bar{{{\bar{F}}}}_k)=12\). Consequently, the control gains \({{\bar{G}}}_k\) for each cell are obtained:

$$\begin{aligned} {{\bar{G}}}_1&= \begin{bmatrix} -1.5654&-5.9374&-0.6439 \end{bmatrix},\\ {{\bar{G}}}_2&= \begin{bmatrix} -0.5472&2.3723&0.1353 \end{bmatrix},\\ {{\bar{G}}}_3&= \begin{bmatrix} -6.0847&-6.9501&-2.2955 \end{bmatrix},\\ {{\bar{G}}}_4&= \begin{bmatrix} -2.6395&-2.5735&0.0814 \end{bmatrix},\\ {{\bar{G}}}_5&= \begin{bmatrix} -0.7340&2.2792&0 \end{bmatrix},\\ {{\bar{G}}}_6&= \begin{bmatrix} -1.5053&0.2986&-0.1354 \end{bmatrix},\\ {{\bar{G}}}_7&= \begin{bmatrix} -2.5281&-2.3450&0.3628 \end{bmatrix},\\ {{\bar{G}}}_8&= \begin{bmatrix} -0.5574&2.3934&-0.1341 \end{bmatrix},\\ {{\bar{G}}}_9&= \begin{bmatrix} -11.5225&-9.3201&1.4113 \end{bmatrix}. \end{aligned}$$

Setting the initial state \(x_0 =[-3~~4]^T\), \(\lambda = 0.1\), and \(\delta =2\) we obtain the simulation results shown in Figs. 14 and  15. We can see from Fig. 14 that both \(x_1\) and \(x_2\) converge to 0 by the control effort shown in Fig. 15. The controller is basically cell-wise, which means, as shown in the close-up of the inset, the controller input is discontinuous when the state traverse from one cell to another.

Fig. 14
figure 14

The transient response of state x by the cell-based controller

Fig. 15
figure 15

The behaviour of the cell-based controller u in (39)

In order to prevent the input from the discontinuity, again let us employ the idea shown in Sect. 4.2, and make some neighbourhoods as in Fig. 16.

Fig. 16
figure 16

Newly inserted neighbourhoods between cells

As a result, the cell-wise controller can be transferred into the following fuzzy controller:

$$\begin{aligned} R_i:&\quad \text {If } x_1 \text { is } \Theta _1^i \text { and } x_2 \text { is } \Theta _2^i \text {, then } ~ u = {{\bar{G}}}_i{{\bar{x}}}, \end{aligned}$$

where \(i=1 \sim 9\), \(\Theta _j^i~(j = 1,2)\) are fuzzy sets whose membership functions are shown in Fig. 17.

Fig. 17
figure 17

The membership functions on \(x_1\) and \(x_2\) in the fuzzy controller

Setting \(\varepsilon =0.3\), the control performance is shown in Figs. 18 and 19. Although the transient response of state x is almost the same as in Fig. 14, the discontinuity in control input is no longer existing.

Fig. 18
figure 18

The transient response of state x by the fuzzy controller

Fig. 19
figure 19

The behaviour of the fuzzy controller u in (39)

Some level surfaces of the computed Lyapunov functions are shown in Fig. 20.

Fig. 20
figure 20

Level surfaces of the Lyapunov functions

6 Conclusion

In this paper, the problem of feedback control for a class of affine T–S fuzzy models using piece-wise Lyapunov functions has been investigated. In designing a controller based on the affine T–S fuzzy model, this paper has first made clear that the resulting LMIs are in fact innately infeasible. To overcome the problem, it is shown that some quadratic inequalities with certain properties are necessary to be involved by using the S-procedure. Then, by partitioning the state space into certain cells, the required quadratic inequalities are obtained. Along with the proposed feedback controller using the piece-wise Lyapunov functions, the issue to obtain the continuity functions involved in the piece-wise Lyapunov functions has also been addressed. In particular, in order to prevent the chattering phenomenon in control input when the state traverses between cells, neighbourhoods inserted between cells have been proven effective as shown in the simulations.

In the piece-wise Lyapunov functions, there is still a common positive definite matrix that exists within the continuity functions. The presence of the common positive definite matrix within could hinder the ability of relaxing the conservatism of the piece-wise Lyapunov functions, which will be explored further as one of our future tasks. In addition, the results established in the paper are based on continuous time, its discrete time version also needed to be done in due course.