1 Introduction

The ideal starting point when it is desired to know the behavior of a dynamic system, especially if it is nonlinear, is the obtaining of a mathematical model, usually a state model. This allows formal analysis; moreover if the aim is to control de system, it is compulsory a stability analysis which is practically impossible to do if the state model is not available (Andújar et al. 2004). If the system is well known and its dynamics are not excessively complex, then it is possible to obtain a state model of the system using the equations that describe its behavior (Mora and Amaya 2017). However, in complex systems or whose dynamics are not sufficiently known, get a state model this way can be really tedious, either because of its complexity or its dimension (López-Baldán et al. 2002). At other times, the ignorance of the relationships that govern the dynamics of the system make it necessary to consider alternative forms of modeling. In these cases, obtaining models from input–output data is shown as a highly effective technique. Intelligent modeling techniques [neural networks (McCulloch and Pitts 1943), fuzzy logic (Zadeh 1965), bioinspired algorithms (Dorigo et al. 1999), etc.] have become important in recent years in this field, especially for its inherent ability to model complex systems (Andújar et al. 2004; Andújar and Bravo 2005; Grande et al. 2010; Cazarez-Castro et al. 2017). Among the above alternatives, the fuzzy logic stands out for the possibility of obtaining relatively interpretable models (Vélez et al. 2010), without giving up the ability to model complex systems, either qualitatively, or quantitatively. Takagi–Sugeno (TS) type fuzzy models are the ideal alternative if the highest modeling capacity if desired, especially to keep the number of rules contained. TS fuzzy models are universal approximators of both the function (Wang 1992) and the derivative (Kreinovich et al. 2000), so, theoretically it is possible to obtain a sufficiently approximate model for any system with a small number of rules (Wang 1992) [keep in mind that the number of rules in TS fuzzy models is increased as a lower approximation error is desired (Kóczy and Hirota 1997)]. This has allowed its use in the design of complex nonlinear controllers (Li and Yang 2003; Shin et al. 2004; Shouyu and Yu 2006; González Fontanet et al. 2016).

A fuzzy model is, formally speaking, a mathematical model. On the other hand, is possible to convert a fuzzy model into a nonlinear state space model (Márquez et al. 2009; Andújar and Barragán 2005). Based on this results, a fuzzy state space model can be used, like any other nonlinear state space model, to perform a formal analysis to the original system. Therefore, known techniques can be applied to a fuzzy model to study aspects of the dynamics of the real system it represents. Basically, the knowledge of the states of equilibrium, as well as its local stability, are very interesting data when it comes to knowing the dynamic behavior of a system. If initially the behavior of the system is completely unknown, this information can be very useful to deeper in another type of analysis.

It can not be ignored that the modeling process is very important for analysis of real systems from its fuzzy model. For the analysis to be correct and conclusive, it is essential that the model reflects as closely as possible the dynamics of the system, since modeling errors will be reflected in the results obtained. For example, systems with strong nonlinearities will require more complex models, or systems subjected to noise will require the application of filters or specific modeling techniques suitable for these situations (Barragán et al. 2014). This way of approaching the problem allows its application to nonlinear systems and difficult to model by classic techniques.

In this paper, a methodology for extract information from unknown systems using fuzzy logic is presented. The paper is organized as follows: Sect. 2 presents the problem and the formulation used throughout the entire paper. Section 3 encompasses the different techniques to extract information that will be described in the article, namely, linearization in Sect. 3.1, obtaining the equilibrium states in Sect. 3.2, and study of periodic orbits from the Poincaré’s Sect. 3.3. In Sect. 4 two application examples are presented and, finally, Sect. 5 provides some conclusions.

2 Problem formulation

Let be a n order general continuous dynamic system with m inputs, \({{\dot{\mathbf{x}}}}(t) = {\mathbf {f}}({\mathbf {x}}(t), {\mathbf {u}}(t))\), a TS state space fuzzy model of it can be represented by the following set of rules (Takagi and Sugeno 1985):

$$\begin{aligned} \begin{array}{rl} R^{(l,i)}: \text { If } &{}x_1(t)\text { is }A_{1i}^l\text { and } \ldots \text { and }x_n(t)\text { is }A_{ni}^l \\ \text { and } &{} u_1(t)\text { is }B_{1i}^l\text { and } \ldots \text { and }u_m(t) \text { is }B_{mi}^l \\ \text { Then } &{} \dot{x}_i^l(t) =a_{0i}^l + \sum \limits _{k=1}^{n} a_{ki}^l x_k(t) + \sum \limits _{j=1}^{m} b_{ji}^l u_j(t), \end{array} \end{aligned}$$
(1)

where \(l=1\ldots M_i\) is the index of the rule and \(M_i\) the number of rules that model the evolution of the ith state variable, \(x_i(t), i=1\ldots n\). \(u_j(t), j=1\ldots m\), are the input signals, and \(a^l_{ki}\) and \(b^l_{ji}, k = 0\ldots n\), represent the set of adaptive parameters of the consequents of the rules. \(A_{ki}^l\) and \(B_{ji}^l\) are the antecedents (fuzzy sets) of the rules for the state and the inputs variables, respectively.

Using the above representation, each state variable can be modeled by a different number of rules. Additionally, each antecedent is completely independent of the rest, since no type of dependency between them is imposed. Moreover, even each antecedent can be represented by a different membership function. This representation facilitates the reduction of the total number of rules needed to model correctly a complex system, and, therefore, facilitates the modeling process by reducing the number of model parameters.

For the rest of the paper, the time dependence of the input and state variables will be omitted in order to simplify the notation.

If the state vector is extended in a coordinate (Márquez et al. 2009; Andújar and Barragán 2005) by \({\tilde{x}}_0 = 1\), the extended state vector \(\tilde{{\mathbf {x}}}\) takes the form:

$$\begin{aligned} \tilde{{\mathbf {x}}} = \left( {\tilde{x}}_0, {\tilde{x}}_1, \ldots , {\tilde{x}}_n\right) ^\text { T}= \left( 1, x_1, \ldots , x_n \right) ^\text { T} \end{aligned}$$
(2)

Using the weighted average as the aggregation method, and the extension of the state vector given in (2), the ith state derivative, \(\dot{x}_i\), generated by the set of rules \(R^{(l,i)}\), can be calculated by (Wang 1994):

$$\begin{aligned} {\dot{x}}_i = \sum \limits _{k=0}^n a_{ki}({\mathbf {x}}, {\mathbf {u}}) {\tilde{x}}_k + \sum \limits _{j=1}^m b_{ji}({\mathbf {x}}, {\mathbf {u}}) u_j, \end{aligned}$$
(3)

being \(a_{ki} ({\mathbf {x}}, {\mathbf {u}})\) and \(b_{ji} ({\mathbf {x}}, {\mathbf {u}})\) variables coefficients (Wong et al. 1997) defined by:

$$\begin{aligned} a_{ki} ({\mathbf {x}}, {\mathbf {u}}) = \dfrac{\sum _{l = 1}^{M_i} w_i^l({\mathbf {x}}, {\mathbf {u}}) a_{ki}^l}{\sum _{l = 1}^{M_i} w_i^l({\mathbf {x}}, {\mathbf {u}})}, \quad b_{ji} ({\mathbf {x}}, {\mathbf {u}}) = \dfrac{\sum _{l = 1}^{M_i} w_i^l({\mathbf {x}}, {\mathbf {u}}) b_{ji}^l}{\sum _{l = 1}^{M_i} w_i^l({\mathbf {x}}, {\mathbf {u}})}, \end{aligned}$$
(4)

where \(w_i^l({\mathbf {x}}, {\mathbf {u}})\) is calculated by (5), and represents the firing degree of the rules of the fuzzy model:

$$\begin{aligned} w_i^l({\mathbf {x}}, {\mathbf {u}}) = \prod \limits _{k=1}^n \mu _{ki}^l (x_k, \varvec{\sigma }_{ki}^l) \prod \limits _{j=1}^m \mu _{ji}^l (u_j, \varvec{\alpha }_{ji}^l) \end{aligned}$$
(5)

\(\mu _{ki}^l (x_k(k), \varvec{\sigma }_{ki}^l)\) represents the kth membership function of the l rule for the ith state variable, which determines the fuzzy set \(A_{ki}^l\) in (1). \(\varvec{\sigma }_{ki}^l\) represents the set of adaptive parameters for \(A_{ki}^l\), represented by its membership function. In the same way, \(\mu _{ji}^l (u_j(k), \varvec{\alpha }_{ji}^l)\) represents the jth membership function of the l rule for the jth input variable, which determines the fuzzy set \(B_{ji}^l\) in (1). \(\varvec{\alpha }_{ji}^l\) represents the set of adaptive parameters for \(B_{ji}^l\), represented by its membership function.

Note that the representation used is not limited for the type or the distribution of the antecedents of fuzzy rules. Each of these antecedents can be specified individually, without any restriction or pre-established relationship with the rest of the antecedents.

The above formulation could be used in a similar way for the discrete time case, but starting from the set of rules:

$$\begin{aligned} \begin{array}{rl} R^{(l,i)}: \text { If } &{}x_1(d)\text { is }A_{1i}^l\text { and } \ldots \text { and }x_n(d) \text { is }A_{ni}^l\\ \text { and } &{}u_1(d)\text { is }B_{1i}^l\text { and } \ldots \text { and }u_m(d) \text { is }B_{mi}^l\\ \text { Then } &{}x_i^l(d+1) =a_{0i}^l + \sum \limits _{k=1}^{n} a_{ki}^l x_k(d) + \sum \limits _{j=1}^{m} b_{ji}^l u_j(d). \end{array} \end{aligned}$$
(6)

being d the the sampling interval for a given sampling time.

3 Extraction of information from fuzzy model

Once a mathematical model of a system is available, this model can be used to extract information from it by means of known techniques. In this section, three very important techniques for the study of nonlinear systems will be presented: the two first are (1) linearization and (2) study of the states of equilibrium, but applied to unknown systems from their fuzzy models. Through the study of the states of equilibrium and their local stability from the linearization, it is possible to catalog the dynamic behaviour of a system in a qualitative way. (3) The third technique is the application of Poincaré in numerical form for the study of periodic orbits.

3.1 Linearization of a TS fuzzy model

Linearization is one of the most used techniques in the analysis of nonlinear systems. Although it is not a very recommended technique in many cases, since the effects of the nonlinearities are avoided, it can be valid in regions where the behavior of the system is approximately linear, fundamentally in the vicinity of equilibrium states. Thus, linearization can be used to obtain useful information from a non-linear system. It is known that, with some exceptions, the behavior of a nonlinear system around a state of equilibrium is very similar to that of the linearized system around that state (Slotine and Li 1991). Therefore, obtaining the equivalent linear system of a non-linear fuzzy model can be a very useful tool for obtaining information from the original system. With this idea in mind, we are going to get the linearization of a TS fuzzy model.

Let be the generic state model of a non-linear system given by:

$$\begin{aligned} \dot{{\mathbf {x}}}(t) = {\mathbf {f}}\left( {\mathbf {x}}(t),{\mathbf {u}}(t)\right) , \end{aligned}$$
(7)

the Taylor serial development of system (7) around the state \((\mathbf {x}_0, {\mathbf {u}}_0)\), determines that it can be approximated by (8), where \({\bar{\mathbf{x}}}(t) = {\mathbf {x}}(t)-{\mathbf {x}}_0\) and \({\bar{\mathbf{u}}}(t)={\mathbf {u}}(t)-{\mathbf {u}}_0\), and where the matrices of the linearized system are calculated by (9), (10) and (11).

$$\begin{aligned} \dot{{\mathbf {x}}}(t)\approx & {} \mathbf {A}_0 +\mathbf {A} {\bar{\mathbf{x}}}(t) + \mathbf {B} {\bar{\mathbf{u}}}(t) \end{aligned}$$
(8)
$$\begin{aligned} \mathbf {A}_0= & {} {\mathbf {f}}({\mathbf {x}}_0,{\mathbf {u}}_0) \end{aligned}$$
(9)
$$\begin{aligned} \mathbf {A}= & {} \left. \begin{pmatrix} \dfrac{\partial f_1 ({\mathbf {x}}(t),{\mathbf {u}}(t))}{\partial x_1} &{} \ldots &{} \dfrac{\partial f_1 ({\mathbf {x}}(t),{\mathbf {u}}(t))}{\partial x_n} \\ \dfrac{\partial f_2 ({\mathbf {x}}(t),{\mathbf {u}}(t))}{\partial x_1} &{} \ldots &{} \dfrac{\partial f_2 ({\mathbf {x}}(t),{\mathbf {u}}(t))}{\partial x_n} \\ \vdots &{} \ddots &{} \vdots \\ \dfrac{\partial f_n ({\mathbf {x}}(t),{\mathbf {u}}(t))}{\partial x_1} &{} \ldots &{} \dfrac{\partial f_n ({\mathbf {x}}(t),{\mathbf {u}}(t))}{\partial x_n} \end{pmatrix}\right| _{({\mathbf {x}}_0,{\mathbf {u}}_0)} \end{aligned}$$
(10)
$$\begin{aligned} \mathbf {B}= & {} \left. \begin{pmatrix} \dfrac{\partial f_1 ({\mathbf {x}}(t),{\mathbf {u}}(t))}{\partial u_1} &{} \ldots &{} \dfrac{\partial f_1 ({\mathbf {x}}(t),{\mathbf {u}}(t))}{\partial u_m} \\ \dfrac{\partial f_2 ({\mathbf {x}}(t),{\mathbf {u}}(t))}{\partial u_1} &{} \ldots &{} \dfrac{\partial f_2 ({\mathbf {x}}(t),{\mathbf {u}}(t))}{\partial u_m} \\ \vdots &{} \ddots &{} \vdots \\ \dfrac{\partial f_n ({\mathbf {x}}(t),{\mathbf {u}}(t))}{\partial u_1} &{} \ldots &{} \dfrac{\partial f_n ({\mathbf {x}}(t),{\mathbf {u}}(t))}{\partial u_m} \end{pmatrix}\right| _{({\mathbf {x}}_0,{\mathbf {u}}_0)} \end{aligned}$$
(11)

If the state \((\mathbf {x}_0, \mathbf {u}_0)\) is an equilibrium state, evidently the matrix \(\mathbf {A}_0\) will be zero.

The system (7) can be represented by a fuzzy model like (1), whose mathematical equivalent is represented by (3). The linearization of this expression around the state \((\mathbf {x}_0, \mathbf {u}_0)\) results:

$$\begin{aligned} {\dot{x}}_i \approx f_i\left( {\mathbf {x}}_0,{\mathbf {u}}_0\right) + \sum \limits _{q=1}^n \left. \dfrac{\partial f_i}{\partial x_q}\right| _{({\mathbf {x}}_0,{\mathbf {u}}_0)} \bar{x}_q+ \sum \limits _{v=1}^m \left. \dfrac{\partial f_i}{\partial u_v}\right| _{({\mathbf {x}}_0,{\mathbf {u}}_0)} \bar{u}_v, \end{aligned}$$
(12)

where \({\bar{x}}_q\) and \({\bar{u}}_v\) are the qth and vth components of the vectors \({\bar{\mathbf{x}}}_0\) and \({\bar{\mathbf{u}}}_0\), respectively. Operating with (12) taking into account (3):

$$\begin{aligned} \begin{array}{r@{~}c@{~}l@{~}c@{~}l} {\dot{x}}_i &{}\approx &{} f_i\left( {\mathbf {x}}_0,{\mathbf {u}}_0\right) + \sum \limits _{q=1}^n\left[ \left. \dfrac{\partial }{\partial x_q}\left( \sum \limits _{k=0}^n a_{ki} {\tilde{x}}_k + \sum \limits _{j=1}^m b_{ji} u_j \right) \right| _{({\mathbf {x}}_0,{\mathbf {u}}_0)} {\bar{x}}_q \right] \\ &{}&{}+ \sum \limits _{v=1}^m\left[ \left. \dfrac{\partial }{\partial u_v}\left( \sum \limits _{k=0}^n a_{ki} {\tilde{x}}_k + \sum \limits _{j=1}^m b_{ji} u_j \right) \right| _{({\mathbf {x}}_0,{\mathbf {u}}_0)} \bar{u}_v \right] . \end{array} \end{aligned}$$
(13)

That can be written as:

$$\begin{aligned} \begin{array}{rclcl} {\dot{x}}_i &{}\approx &{} f_i\left( {\mathbf {x}}_0,{\mathbf {u}}_0\right) + \sum \limits _{q=1}^n\left. \left[ \dfrac{\partial \left( \sum _{k=0}^n a_{ki} {\tilde{x}}_k\right) }{\partial x_q} + \dfrac{\partial \left( \sum _{j=1}^m b_{ji} u_j\right) }{\partial x_q} \right] \right| _{({\mathbf {x}}_0,{\mathbf {u}}_0)} {\bar{x}}_q\\ &{}&{}+ \sum \limits _{v=1}^m\left. \left[ \dfrac{\partial \left( \sum _{k=0}^n a_{ki} {\tilde{x}}_k\right) }{\partial u_v} + \dfrac{\partial \left( \sum _{j=1}^m b_{ji} u_j\right) }{\partial u_v} \right] \right| _{({\mathbf {x}}_0,{\mathbf {u}}_0)} {\bar{u}}_v. \end{array} \end{aligned}$$
(14)

Then, each of the above partial derivatives will be solved independently. First:

$$\begin{aligned} \dfrac{\partial \left( \sum _{k=0}^n a_{ki} \tilde{x}_k \right) }{\partial x_q} = \sum \limits _{k=0}^n \dfrac{\partial \left( a_{ki} \tilde{x}_k \right) }{\partial x_q} = \sum \limits _{k=0}^n \dfrac{\partial a_{ki}}{\partial x_q} \tilde{x}_k + \sum \limits _{k=0}^n a_{ki} \dfrac{\partial \tilde{x}_k}{\partial x_q}. \end{aligned}$$
(15)

Since \(\dfrac{\partial \tilde{x}_k}{\partial x_q} = 1\) if \(k=q\), and 0 otherwise:

$$\begin{aligned} \sum \limits _{k=0}^n a_{ki} \dfrac{\partial \tilde{x}_k}{\partial x_q} = a_{qi}. \end{aligned}$$
(16)

Taking into account the value of \(a_{ki}\) given at (4),

$$\begin{aligned} \dfrac{\partial a_{ki}}{\partial x_q} = \dfrac{\partial }{\partial x_q} \left( \dfrac{\sum _{l = 1}^{M_i}{w_i^l a_{ki}^l}}{\sum _{l = 1}^{M_i}{w_i^l}} \right) = \dfrac{ \dfrac{\partial \left( \sum _{l = 1}^{M_i}{w_i^l a_{ki}^l} \right) }{\partial x_q} \sum _{l = 1}^{M_i}{\left( w_i^l\right) } - \dfrac{\partial \left( \sum _{l = 1}^{M_i}{w_i^l}\right) }{\partial x_q} \sum _{l = 1}^{M_i}{\left( w_i^l a_{ki}^l\right) } }{\left( \sum _{l = 1}^{M_i}{w_i^l}\right) ^2}. \end{aligned}$$
(17)

The firing degree of the rules of the model, \(w_i^l\), is a value dependent on the state and the input vector, while the elements \(a_{ki}^l\) are the constant coefficients of the consequent of the rules. In this way, it can be solved:

$$\begin{aligned} \dfrac{\partial \left( \sum _{l = 1}^{M_i}{w_i^l a_{ki}^l} \right) }{\partial x_q} = \sum \limits _{l = 1}^{M_i} \left( \dfrac{\partial w_i^l}{\partial x_q} a_{ki}^l\right) \end{aligned}$$
(18)

and

$$\begin{aligned} \dfrac{\partial \left( \sum _{l = 1}^{M_i}{w_i^l}\right) }{\partial x_q} = \sum \limits _{l = 1}^{M_i}\left( \dfrac{\partial w_i^l}{\partial x_q} \right) , \end{aligned}$$
(19)

thus (17) can be expressed as:

$$\begin{aligned} \dfrac{\partial a_{ki}}{\partial x_q}= & {} \dfrac{ \sum _{l = 1}^{M_i} \left( \dfrac{\partial w_i^l}{\partial x_q} a_{ki}^l\right) \sum _{l = 1}^{M_i}{\left( w_i^l\right) } - \sum _{l = 1}^{M_i}\left( \dfrac{\partial w_i^l}{\partial x_q} \right) \sum _{l = 1}^{M_i}{\left( w_i^l a_{ki}^l\right) } }{\left( \sum _{l = 1}^{M_i}{w_i^l}\right) ^2} \nonumber \\= & {} \dfrac{ \sum _{l = 1}^{M_i}\sum _{p = 1}^{M_i}\left( \dfrac{\partial w_i^l}{\partial x_q} a_{ki}^l w_i^p \right) - \sum _{l = 1}^{M_i}\sum _{p = 1}^{M_i}\left( \dfrac{\partial w_i^l}{\partial x_q} a_{ki}^p w_i^p \right) }{\left( \sum _{l = 1}^{M_i}{w_i^l}\right) ^2}, \end{aligned}$$
(20)

By simplifying this expression and its notation, it can be written as:

$$\begin{aligned} \dfrac{\partial a_{ki}}{\partial x_q} = \dfrac{ \sum _{l,p = 1}^{M_i} \left( \dfrac{\partial w_i^l}{\partial x_q} w_i^p (a_{ki}^l-a_{ki}^p)\right) }{\left( \sum _{l = 1}^{M_i}{w_i^l}\right) ^2}. \end{aligned}$$
(21)

Thus, the first derivative of (14) is obtained as:

$$\begin{aligned} \dfrac{\partial \left( \sum _{k=0}^n a_{ki} {\tilde{x}}_k\right) }{\partial x_q} = a_{qi} + \sum \limits _{k=0}^n\left( \dfrac{ \sum _{l,p = 1}^{M_i} \left( \dfrac{\partial w_i^l}{\partial x_q} w_i^p (a_{ki}^l-a_{ki}^p)\right) }{\left( \sum _{l = 1}^{M_i}{w_i^l}\right) ^2}\right) \tilde{x}_k \end{aligned}$$
(22)

In the previous expression it is necessary to calculate the derivative of the firing degree of the rules of the model regarding each of the state variables. This point will be resolved once all the derivatives of (14) have been calculated.

The second of the derivatives to be calculated is:

$$\begin{aligned} \dfrac{\partial \left( \sum \nolimits _{j=1}^m b_{ji} u_j\right) }{\partial x_q} = \sum \limits _{j=1}^m \dfrac{\partial \left( b_{ji} u_j \right) }{\partial x_q} = \sum \limits _{j=1}^m \dfrac{\partial b_{ji}}{\partial x_q} u_j + \sum \limits _{j=1}^m b_{ji} \dfrac{\partial u_j}{\partial x_q}. \end{aligned}$$
(23)

Since \({\mathbf {u}}(t)\) is independent of \({\mathbf {x}}(t), {\partial u_j}/{\partial x_q}=0\), so:

$$\begin{aligned} \dfrac{\partial \left( \sum \nolimits _{j=1}^m b_{ji} u_j\right) }{\partial x_q} = \sum \limits _{j=1}^m \dfrac{\partial b_{ji}}{\partial x_q} u_j. \end{aligned}$$
(24)

By operating in a similar way with (24) and taking into account (4), it can be easily obtained that:

$$\begin{aligned} \dfrac{\partial \left( \sum \nolimits _{j=1}^m b_{ji} u_j\right) }{\partial x_q} = \sum \limits _{j=1}^m\left( \dfrac{ \sum \nolimits _{l,p = 1}^{M_i} \left( \dfrac{\partial w_i^l}{\partial x_q} w_i^p (b_{ji}^l-b_{ji}^p)\right) }{\left( \sum \nolimits _{l = 1}^{M_i}{w_i^l}\right) ^2}\right) u_j. \end{aligned}$$
(25)

From (14), the third derivative to obtain is:

$$\begin{aligned} \dfrac{\partial \left( \sum \nolimits _{k=0}^n a_{ki} {\tilde{x}}_k\right) }{\partial u_v} = \sum \limits _{k=0}^n \dfrac{\partial \left( a_{ki} \tilde{x}_k \right) }{\partial u_v} = \sum \limits _{k=0}^n \dfrac{\partial a_{ki}}{\partial u_v} \tilde{x}_k + \sum \limits _{k=0}^n a_{ki} \dfrac{\partial \tilde{x}_k}{\partial u_v}. \end{aligned}$$
(26)

As before, \(\partial \tilde{x}_k/ \partial u_v = 0\), so:

$$\begin{aligned} \dfrac{\partial \left( \sum \nolimits _{k=0}^n a_{ki} {\tilde{x}}_k\right) }{\partial u_v} = \sum \limits _{k=0}^n \dfrac{\partial a_{ki}}{\partial u_v} \tilde{x}_k. \end{aligned}$$
(27)

Replacing \(a_{ki}\) from (4):

$$\begin{aligned} \dfrac{\partial a_{ki}}{\partial u_v} = \dfrac{\partial }{\partial u_v} \left( \dfrac{\sum \nolimits _{l = 1}^{M_i}{w_i^l a_{ki}^l}}{\sum \nolimits _{l = 1}^{M_i}{w_i^l}} \right) = \dfrac{ \dfrac{\partial \left( \sum \nolimits _{l = 1}^{M_i}{w_i^l a_{ki}^l} \right) }{\partial u_v} \sum \nolimits _{l = 1}^{M_i}{\left( w_i^l\right) } - \dfrac{\partial \left( \sum \nolimits _{l = 1}^{M_i}{w_i^l}\right) }{\partial u_v} \sum \nolimits _{l = 1}^{M_i}{\left( w_i^l a_{ki}^l\right) } }{\left( \sum \nolimits _{l = 1}^{M_i}{w_i^l}\right) ^2}. \end{aligned}$$
(28)

The firing degree of the rules of the fuzzy model, \(w_i^l\), is dependent on the state and the input vector, while \(a_{ki}^l\) are coefficients of the consequent of the rules. In this way it can be solved:

$$\begin{aligned} \dfrac{\partial \left( \sum \nolimits _{l = 1}^{M_i}{w_i^l a_{ki}^l} \right) }{\partial u_v} = \sum \limits _{l = 1}^{M_i} \left( \dfrac{\partial w_i^l}{\partial u_v} a_{ki}^l\right) , \end{aligned}$$
(29)

and

$$\begin{aligned} \dfrac{\partial \left( \sum \nolimits _{l = 1}^{M_i}{w_i^l}\right) }{\partial u_v} = \sum \limits _{l = 1}^{M_i}\left( \dfrac{\partial w_i^l}{\partial u_v} \right) , \end{aligned}$$
(30)

So, (28) can be expressed as:

$$\begin{aligned} \dfrac{\partial a_{ki}}{\partial u_v}= & {} \dfrac{ \sum \nolimits _{l = 1}^{M_i} \left( \dfrac{\partial w_i^l}{\partial u_v} a_{ki}^l\right) \sum \nolimits _{l = 1}^{M_i}{\left( w_i^l\right) } - \sum \nolimits _{l = 1}^{M_i}\left( \dfrac{\partial w_i^l}{\partial u_v} \right) \sum \nolimits _{l = 1}^{M_i}{\left( w_i^l a_{ki}^l\right) } }{\left( \sum \nolimits _{l = 1}^{M_i}{w_i^l}\right) ^2} \nonumber \\= & {} \dfrac{ \sum \nolimits _{l = 1}^{M_i}\sum \nolimits _{p = 1}^{M_i}\left( \dfrac{\partial w_i^l}{\partial u_v} a_{ki}^l w_i^p \right) - \sum \nolimits _{l = 1}^{M_i}\sum \nolimits _{p = 1}^{M_i}\left( \dfrac{\partial w_i^l}{\partial u_v} a_{ki}^p w_i^p \right) }{\left( \sum \nolimits _{l = 1}^{M_i}{w_i^l}\right) ^2}. \end{aligned}$$
(31)

That can be simplified to:

$$\begin{aligned} \dfrac{\partial a_{ki}}{\partial u_v} = \dfrac{ \sum \nolimits _{l,p = 1}^{M_i} \left( \dfrac{\partial w_i^l}{\partial u_v} w_i^p (a_{ki}^l-a_{ki}^p)\right) }{\left( \sum \nolimits _{l = 1}^{M_i}{w_i^l}\right) ^2}. \end{aligned}$$
(32)

Therefore, (26) or the third of the derivatives of (14), can be obtained as:

$$\begin{aligned} \dfrac{\partial \left( \sum \nolimits _{k=0}^n a_{ki} {\tilde{x}}_k\right) }{\partial u_v} = \sum \nolimits _{k=0}^n\left( \dfrac{ \sum \nolimits _{l,p = 1}^{M_i} \left( \dfrac{\partial w_i^l}{\partial u_v} w_i^p (a_{ki}^l-a_{ki}^p)\right) }{\left( \sum \nolimits _{l = 1}^{M_i}{w_i^l}\right) ^2}\right) \tilde{x}_k. \end{aligned}$$
(33)

In the previous expression, it is necessary to obtain the derivative of the firing degree of the rules of the fuzzy model regarding the input signals. This point will be resolved once all the derivatives of (14) have been calculated.

Finally, to calculate the fourth derivative of (14):

$$\begin{aligned} \dfrac{\partial \left( \sum \nolimits _{j=1}^m b_{ji} u_j\right) }{\partial u_v} = \sum \limits _{j=1}^m \dfrac{\partial \left( b_{ji} u_j \right) }{\partial u_v} = \sum \limits _{j=1}^m \dfrac{\partial b_{ji}}{\partial u_v} u_j + \sum \limits _{j=1}^m b_{ji} \dfrac{\partial u_j}{\partial u_v}. \end{aligned}$$
(34)

Since \(\dfrac{\partial u_j}{\partial u_v} = 1\) if \(j=v\), and 0 otherwise:

$$\begin{aligned} \sum \limits _{j=1}^m b_{ji} \dfrac{\partial u_j}{\partial u_v} = b_{vi}. \end{aligned}$$
(35)

Taking into account the value of \(b_{ji}\) given by (4):

$$\begin{aligned} \dfrac{\partial b_{ji}}{\partial u_v} = \dfrac{\partial }{\partial u_v} \left( \dfrac{\sum \nolimits _{l = 1}^{M_i}{w_i^l b_{ji}^l}}{\sum \nolimits _{l = 1}^{M_i}{w_i^l}} \right) =\dfrac{ \dfrac{\partial \left( \sum \nolimits _{l = 1}^{M_i}{w_i^l b_{ji}^l} \right) }{\partial u_v} \sum \nolimits _{l = 1}^{M_i}{\left( w_i^l\right) } - \dfrac{\partial \left( \sum \nolimits _{l = 1}^{M_i}{w_i^l}\right) }{\partial u_v} \sum \nolimits _{l = 1}^{M_i}{\left( w_i^l b_{ji}^l\right) } }{\left( \sum \nolimits _{l = 1}^{M_i}{w_i^l}\right) ^2}. \end{aligned}$$
(36)

Operating as with the previous derivatives:

$$\begin{aligned} \dfrac{\partial b_{ji}}{\partial u_v} = \dfrac{ \sum \nolimits _{l,p = 1}^{M_i} \left( \dfrac{\partial w_i^l}{\partial u_v} w_i^p (b_{ji}^l-b_{ji}^p)\right) }{\left( \sum \nolimits _{l = 1}^{M_i}{w_i^l}\right) ^2}, \end{aligned}$$
(37)

so that the last one of the derivatives of (14) can be expressed as:

$$\begin{aligned} \dfrac{\partial \left( \sum \nolimits _{j=1}^m b_{ji} u_j\right) }{\partial u_v} = b_{vi} + \sum \nolimits _{j=1}^m\left( \dfrac{ \sum \nolimits _{l,p = 1}^{M_i} \left( \dfrac{\partial w_i^l}{\partial u_v} w_i^p (b_{ji}^l-b_{ji}^p)\right) }{\left( \sum \nolimits _{l = 1}^{M_i}{w_i^l}\right) ^2}\right) u_j. \end{aligned}$$
(38)

Replacing (22), (25), (33) and (38) into (14), the equivalent mathematical model of a linearized fuzzy system around a point \(({\mathbf {x}}_0, {\mathbf {u}}_0)\) is given by:

$$\begin{aligned} {\dot{x}}_i\approx & {} f_i\left( {\mathbf {x}}_0,{\mathbf {u}}_0\right) \nonumber \\&+ \sum \limits _{q = 1}^n \left. \left( a_{qi} + \sum \limits _{k=0}^n {\varGamma }_{x_q}^{\mathcal {A}_{ki}} \tilde{x}_k + \sum \limits _{j=1}^m {\varGamma }_{x_q}^{\mathcal {B}_{ji}} u_j \right) \right| _{({\mathbf {x}}_0,{\mathbf {u}}_0)} \bar{x}_q \nonumber \\&+ \sum \limits _{v=1}^m\left. \left( b_{vi} + \sum \limits _{k=0}^n {\varGamma }_{u_v}^{\mathcal {A}_{ki}} \tilde{x}_k + \sum \limits _{j=1}^m {\varGamma }_{u_v}^{\mathcal {B}_{ji}} u_j \right) \right| _{({\mathbf {x}}_0,{\mathbf {u}}_0)} \bar{u}_v, \end{aligned}$$
(39)

where

$$\begin{aligned} {\varGamma }_{x_q}^{\mathcal {A}_{ki}} = \dfrac{\sum \nolimits _{l,p = 1}^{M_i}\left( \dfrac{\partial w_i^l}{\partial x_q} w_i^p (a_{ki}^l-a_{ki}^p)\right) }{\left( \sum \nolimits _{l = 1}^{M_i}{w_i^l}\right) ^2}, \end{aligned}$$
(40)
$$\begin{aligned} {\varGamma }_{x_q}^{\mathcal {B}_{ji}} = \dfrac{\sum \nolimits _{l,p = 1}^{M_i} \left( \dfrac{\partial w_i^l}{\partial x_q} w_i^p (b_{ji}^l-b_{ji}^p)\right) }{\left( \sum \nolimits _{l = 1}^{M_i}{w_i^l}\right) ^2}, \end{aligned}$$
(41)
$$\begin{aligned} {\varGamma }_{u_v}^{\mathcal {A}_{ki}} = \dfrac{\sum \nolimits _{l,p = 1}^{M_i}\left( \dfrac{\partial w_i^l}{\partial u_v} w_i^p (a_{ki}^l -a_{ki}^p)\right) }{\left( \sum \nolimits _{l = 1}^{M_i}{w_i^l}\right) ^2}, \end{aligned}$$
(42)

and

$$\begin{aligned} {\varGamma }_{u_v}^{\mathcal {B}_{ji}} = \dfrac{\sum \nolimits _{l,p = 1}^{M_i} \left( \dfrac{\partial w_i^l}{\partial u_v} w_i^p (b_{ji}^l -b_{ji}^p)\right) }{\left( \sum \nolimits _{l = 1}^{M_i}{w_i^l}\right) ^2}. \end{aligned}$$
(43)

If \(({\mathbf {x}}_0, {\mathbf {u}}_0)\) is an equilibrium state, \(f_i\left( {\mathbf {x}}_0,{\mathbf {u}}_0\right) = \mathbf {0}\), and

$$\begin{aligned} {{\dot{\mathbf{x}}}}(t) \approx \mathbf {A} {\mathbf {x}}(t) + \mathbf {B}{\mathbf {u}}(t), \end{aligned}$$
(44)

being

$$\begin{aligned} \mathbf {A} = \sum \limits _{q = 1}^n \left. \left( a_{qi} + \sum \limits _{k=0}^n {\varGamma }_{x_q}^{\mathcal {A}_{ki}} \tilde{x}_k + \sum \limits _{j=1}^m {\varGamma }_{x_q}^{\mathcal {B}_{ji}} u_j \right) \right| _{({\mathbf {x}}_0,{\mathbf {u}}_0)} , \end{aligned}$$
(45)

and

$$\begin{aligned} \mathbf {B} = \sum \limits _{v=1}^m\left. \left( b_{vi} + \sum \limits _{k=0}^n {\varGamma }_{u_v}^{\mathcal {A}_{ki}} \tilde{x}_k + \sum \limits _{j=1}^m {\varGamma }_{u_v}^{\mathcal {B}_{ji}} u_j \right) \right| _{({\mathbf {x}}_0,{\mathbf {u}}_0)} . \end{aligned}$$
(46)

3.1.1 Derived of the firing degree of the rules of the fuzzy model

The firing degree of the rules of the fuzzy model is dependent on the state and the input vectors, according to the expression (5), so:

$$\begin{aligned} \dfrac{\partial w_i^l({\mathbf {x}}, {\mathbf {u}})}{\partial x_q}= & {} \dfrac{\partial \left( \prod \nolimits _{k=1}^n \mu _{ki}^l (x_k,\varvec{\sigma }_{ki}^l)\right) }{\partial x_q} \prod \limits _{j=1}^m \mu _{ji}^l (u_j,\varvec{\alpha }_{ji}^l) \nonumber \\&+ \prod \limits _{k=1}^n \mu _{ki}^l (x_k,\varvec{\sigma }_{ki}^l) \dfrac{\partial \left( \prod \nolimits _{j=1}^m \mu _{ji}^l (u_j,\varvec{\alpha }_{ji}^l)\right) }{\partial x_q}, \end{aligned}$$
(47)

and

$$\begin{aligned} \dfrac{\partial w_i^l({\mathbf {x}}, {\mathbf {u}})}{\partial u_v}= & {} \dfrac{\partial \left( \prod \nolimits _{k=1}^n \mu _{ki}^l (x_k,\varvec{\sigma }_{ki}^l)\right) }{\partial u_v} \prod \limits _{j=1}^m \mu _{ji}^l (u_j,\varvec{\alpha }_{ji}^l) \nonumber \\&+ \prod \limits _{k=1}^n \mu _{ki}^l (x_k,\varvec{\sigma }_{ki}^l) \dfrac{\partial \left( \prod \nolimits _{j=1}^m \mu _{ji}^l (u_j,\varvec{\alpha }_{ji}^l)\right) }{\partial u_v}. \end{aligned}$$
(48)

The input and state vectors are independent of each other, therefore:

$$\begin{aligned} \dfrac{\partial \left( \prod \nolimits _{j=1}^m \mu _{ji}^l (u_j,\varvec{\alpha }_{ji}^l)\right) }{\partial x_q} = 0, \end{aligned}$$
(49)

and

$$\begin{aligned} \dfrac{\partial \left( \prod \nolimits _{k=1}^n \mu _{ki}^l (x_k,\varvec{\sigma }_{ki}^l)\right) }{\partial u_v} = 0. \end{aligned}$$
(50)

Thus,

$$\begin{aligned} \dfrac{\partial w_i^l({\mathbf {x}}, {\mathbf {u}})}{\partial x_q} = \dfrac{\partial \left( \prod \nolimits _{k=1}^n \mu _{ki}^l (x_k,\varvec{\sigma }_{ki}^l)\right) }{\partial x_q} \prod \limits _{j=1}^m \mu _{ji}^l (u_j,\varvec{\alpha }_{ji}^l), \end{aligned}$$
(51)

and

$$\begin{aligned} \dfrac{\partial w_i^l({\mathbf {x}}, {\mathbf {u}})}{\partial u_v} = \prod \limits _{k=1}^n \mu _{ki}^l (x_k,\varvec{\sigma }_{ki}^l) \dfrac{\partial \left( \prod \nolimits _{j=1}^m \mu _{ji}^l (u_j,\varvec{\alpha }_{ji}^l)\right) }{\partial u_v}. \end{aligned}$$
(52)

Since \(\dfrac{\partial x_k}{\partial x_q} = 1\) if \(k=q\), and 0 otherwise:

$$\begin{aligned} \dfrac{\partial w_i^l({\mathbf {x}}, {\mathbf {u}})}{\partial x_q} = \dfrac{\partial \mu _{qi}^l (x_q,\varvec{\sigma }_{qi}^l)}{\partial x_q} \prod \limits _{k=1, k \ne q}^n \mu _{ki}^l (x_k,\varvec{\sigma }_{ki}^l) \prod \limits _{j=1}^m \mu _{ji}^l (u_j,\varvec{\alpha }_{ji}^l). \end{aligned}$$
(53)

In the same way, since \(\dfrac{\partial u_j}{\partial u_v} = 1\) if \(j=v\), and 0 otherwise:

$$\begin{aligned} \dfrac{\partial w_i^l({\mathbf {x}}, {\mathbf {u}})}{\partial u_v} = \dfrac{\partial \mu _{vi}^l (u_v,\varvec{\alpha }_{vi}^l)}{\partial u_v} \prod \limits _{k=1}^n \mu _{ki}^l (x_k,\varvec{\sigma }_{ki}^l) \prod \limits _{j=1,j \ne v}^m \mu _{ji}^l (u_j,\varvec{\alpha }_{ji}^l). \end{aligned}$$
(54)

Note it is not necessary that the membership functions are differentiable, it is enough that they be piecewise differentiable. Piecewise membership functions could provide a jump discontinuity in its derivative, however, since the set of singular points is a null set, in numerical implementations this is not a real problem. For example, it is possible to suppose that its derivative is a point infinitesimally close to the right, or to the left, or as the average of these derivatives.

3.2 Obtaining the equilibrium states of a TS fuzzy model

There are many techniques to obtain a fuzzy model of a system from input–output data, both online (Barragán et al. 2014; Al-Hadithi et al. 2014; Andújar et al. 2014) and offline (Horikawa et al. 1992; Jang 1993; Penedo et al. 2012). Once we have a fuzzy state model of the system for analyzing its dynamical behaviour, the first necessary step is to locate its equilibrium states. This points provide a great information about the dynamic behavior of the system under study (Andújar et al. 2004).

Since for a TS system it is practically impossible to solve the equilibrium states analytically, it is necessary to use numerical methods. So, given by (3) the mathematical model of a TS system, the equations to solve are:

$$\begin{aligned} \begin{array}{rcccl} {\dot{x}}_1 &{}=&{} \sum \limits _{k=0}^n a_{k1}({\mathbf {x}}, {\mathbf {u}}) {\tilde{x}}_k + \sum \limits _{j=1}^m b_{j1}({\mathbf {x}}, {\mathbf {u}}) u_j &{}=&{} 0,\\ {\dot{x}}_2 &{}=&{} \sum \limits _{k=0}^n a_{k2}({\mathbf {x}}, {\mathbf {u}}) {\tilde{x}}_k + \sum \limits _{j=2}^m b_{j2}({\mathbf {x}}, {\mathbf {u}}) u_j &{}=&{} 0,\\ &{}\vdots &{}&{}\vdots \\ {\dot{x}}_n &{}=&{} \sum \limits _{k=0}^n a_{kn}({\mathbf {x}}, {\mathbf {u}}) {\tilde{x}}_k + \sum \limits _{j=n}^m b_{jn}({\mathbf {x}}, {\mathbf {u}}) u_j &{}=&{} 0.\\ \end{array} \end{aligned}$$
(55)

Similarly, for a discrete model:

$$\begin{aligned} \begin{array}{rcccl} x_1(d+1) &{}=&{} \sum \limits _{k=0}^n a_{k1}({\mathbf {x}}, {\mathbf {u}}) {\tilde{x}}_k(d) + \sum \limits _{j=1}^m b_{j1}({\mathbf {x}}, {\mathbf {u}}) u_j(d) &{}=&{} x_1(d),\\ x_2(d+1) &{}=&{} \sum \limits _{k=0}^n a_{k2}({\mathbf {x}}, {\mathbf {u}}) {\tilde{x}}_k(d) + \sum \limits _{j=2}^m b_{j2}({\mathbf {x}}, {\mathbf {u}}) u_j(d) &{}=&{} x_2(d),\\ &{}\vdots &{}&{}\vdots \\ x_n(d+1) &{}=&{} \sum \limits _{k=0}^n a_{kn}({\mathbf {x}}, {\mathbf {u}}) {\tilde{x}}_k(d) + \sum \limits _{j=n}^m b_{jn}({\mathbf {x}}, {\mathbf {u}}) u_j(d) &{}=&{} x_n(d).\\ \end{array} \end{aligned}$$
(56)

For solving the equation systems (55) and (56), numerical minimization methods, or other more sophisticated methods, such as bioinspired algorithms, can be used. Numerical methods have the advantage of rapid convergence if the solution is close to the starting point, but they only provide a solution, which is not necessarily the minimum. On the other hand, bioinspired algorithms can locate multiple solutions even in a large search space, but they have the disadvantage of being slower in convergence. In this paper, the authors have chosen to employ the Levenberg–Marquardt (LM) (Levenberg 1944) minimization method. In order to find the greatest possible number of equilibrium states, a mesh of points uniformly distributed throughout the state and input space of the system will be used. The LM algorithm will start at each of these points. If the algorithm converges, the localized point will be in the list of system equilibrium states, otherwise it will be ignored. It is important to keep in mind that the TS model can not faithfully represent the system in areas for which it has not been trained, therefore, all the equilibrium states obtained outside the universe of discourse of the state variables or inputs of the fuzzy model must be ignored.

The LM algorithm uses the Jacobian matrix of the system to improve its performance and convergence. Usually this matrix is obtained by approximation during the execution of the algorithm, but if it is facilitated its exact calculation can significantly improve the performance and convergence of the minimization. As the Jacobian matrix of a TS model is given by (39), as calculated in Sect. 3.1, it can be incorporated into the LM algorithm to improve it. This fact will be shown in the examples section.

Knowing the location of the states of equilibrium is important, but this information is insufficient if the behavior, at least local, of those states is not known. It is known that, with some exceptions, the behavior of a nonlinear system around a state of equilibrium is very similar to that of the linearized system around that state (Slotine and Li 1991). To know the local behavior of the states of equilibrium, it suffices to calculate the eigenvalues of the state matrix of the linearized system in these equilibrium states. Therefore, by obtaining the eigenvalues of the state matrix of the linearized system given by (39) in each of the equilibrium states, it will be possible to know approximately its local behavior. This will be true provided that the equilibrium state is hyperbolic, that is, its eigenvalues are not a pure complex number (or close to being, since the model’s own uncertainty and the calculations associated with it would make such estimates unreliable).

3.3 Application of Poincaré for the study of periodic orbits

As another technique of using fuzzy systems to extract useful information from the model of the real system, we are going to present the application of Poincaré in numerical form for the study of periodic orbits.

The study of periodic orbits can be carried out theoretically using Poincaré and Bendixon theorems (Slotine and Li 1991). However, as in the case of equilibrium states, it would be enormously complex to use these theorems theoretically on a TS model. There is a procedure, also devised by Henri Poincaré, that allows the location and study of periodic orbits: Poincaré’s sections, or Poincaré map. The Poincaré sections, \(P({\mathbf {x}})\), have of dimensionality one unit less than the dimensionality of the dynamic system. This consists of replacing the nth order flow of a continuous time system with a discrete time system of order \(n-1\). This system is constructed from the intersections of the orbits of the original system with a cross section, which allows to distinguish the periodic orbits as successive cuts in that section.

Being \(\chi \) a periodic orbit of the system, the trajectory that start at a point \({\mathbf {x}}(0) \in P({\mathbf {x}})\) will cut \(P({\mathbf {x}})\) at successive points \({\mathbf {x}}(k), k=1\ldots \infty \). These points constitute the map of Poincaré and can give us information about the nature of the solutions of the system, since it inherits many of the properties of the original system (Abraham and Shaw 1997).

If the location of a point belonging to \(\chi \) and \(P({\mathbf {x}})\) is unknown, let us call it \({\mathbf {x}}_{p}\), it can be located by studying a sequence of paths that have a point on \(P({\mathbf {x}})\), for example by simulations. In this case, \({\mathbf {x}}_{p}\) will be that point of origin in \({\mathbf {x}}(0) \in P({\mathbf {x}})\), whose next point of cut with the \(P({\mathbf {x}})\), \({\mathbf {x}}(1) \in P({\mathbf {x}})\), is at zero distance from the previous point on the surface of \(P({\mathbf {x}}), {\mathbf {x}}(0) = {\mathbf {x}}(1)\) (for a numerical simulation it will be necessary to use a small distance, \({\mathbf {x}}(0) \approx {\mathbf {x}}(1)\)). This point \({\mathbf {x}}_{p}\) allows to characterize the periodic trajectory, since the period of said oscillation will be equal to the time required by a trajectory that begins in \({\mathbf {x}}_{p}\) in returning to this point. In addition, the stability of the trajectory can also be studied from the map of Poincaré, since it has the following properties:

  1. 1.

    Near a periodic orbit, the map of Poincaré is monotonous \(\mathcal {C}^1\).

  2. 2.

    The periodic orbit \(\chi \) that originates in \({\mathbf {x}}_p \in P({\mathbf {x}})\) is asymptotically stable if \(|{\varDelta } P ({\mathbf {x}})|<1 \), and unstable if \(|{\varDelta } P ({\mathbf {x}})| > 1\) for the one-dimensional case. In the n-dimensional case, the stability of the \(\chi \) orbit will be given by the eigenvalues of the linear approximation of the discrete system \(P({\mathbf {x}})\) in \({\mathbf {x}}_{p}\).

4 Examples

In this section two examples of analysis are presented from their fuzzy models of nonlinear systems that will initially be considered unknown. The MATLAB\(^{\tiny \textregistered }\)  implementation of the LM algorithm has been used for all the presented examples. The calculation of the linearization of the fuzzy models was done using the Fuzzy Logic Tools library (Barragán and Andújar 2012).

Fig. 1
figure 1

Pendulum system with friction

4.1 Equilibrium states of a pendulum with friction

Be the pendulum with friction shown in Fig. 1, whose dynamics is determined by (57), where \(M=1\) kg is the mass of the pendulum, \(L=0.5\) m the length of the rod, \(g=9.8\) m/s\(^2\) the acceleration of gravity, \(b=0.5\) N/m/s the coefficient of friction, \(\theta \) the angle that forms the pendulum with respect to the vertical, and \(\tau \) the pair applied on it in N/m.

$$\begin{aligned} M L^2 \ddot{\theta }(t) + b \dot{\theta }(t) - M g L \sin (\theta (t)) = \tau (t) \end{aligned}$$
(57)

Considering the state vector:

$$\begin{aligned} {\mathbf {x}}(t) = \begin{pmatrix} x_1(t)\\ x_2(t) \end{pmatrix} = \begin{pmatrix} \theta (t)\\ \dot{\theta }(t) \end{pmatrix} , \end{aligned}$$
(58)

The system (57) can be represented by the state model:

$$\begin{aligned} \dot{x}_1(t)= & {} x_2(t) \nonumber \\ \dot{x}_2(t)= & {} \dfrac{g}{L} \sin (x_1(t)) - \dfrac{b}{M L^2}\, x_2(t) + \dfrac{1}{ML^2}\, u(t). \end{aligned}$$
(59)

In order to demonstrate the utility of the techniques developed in this paper, the model of the system will be considered unknown, therefore, expression (59) it will only serve to obtain, as if from the real system, a set of input–output data for modeling. Therefore, the first step must be to obtain a fuzzy state model of the system under study.

The choice of state variables is necessarily known, so that \(\dot{x}_1(t)\) can be modeled without using any type of learning algorithm (the possibility to include available knowledge is one of the advantages of fuzzy logic versus other techniques). For example, using triangular membership functions, this relationship can be represented by the following fuzzy rule:

$$\begin{aligned}&\hbox {If}\, x_1(t)\, \hbox {is}\, {\mathsf {Trimf}}(-\infty ; 0; \infty ) \,\hbox {and}\, x_2(t) \,\hbox {is}\, {\mathsf {Trimf}}(-\infty ; 0; \infty )\\&\hbox {and} \, \tau (t) \,\hbox {is}\, {\mathsf {Trimf}}(-\infty ; 0; \infty )\\&\hbox {Then}\, \dot{x}_1(t) = x_2(t) \end{aligned}$$

\({\mathsf {Trimf}}\) represents the triangular membership function whose parameters correspond to the three characteristic points of the triangle. Note that the membership function \({\mathsf {Trimf}}\)(\(-\infty \); 0; \(\infty \)) always takes value 1, so the previous rule models \(\dot{x}_1(t)\) exactly.

Taking as universe of discourse of the state variables

$$\begin{aligned} X \subseteq \left\{ {\mathbf {x}} \mid x_1 \in \left[ -\pi ,\pi \right] , x_2 \in \left[ -10,10\right] \right\} , \end{aligned}$$

and as universe of discourse of the input signal:

$$\begin{aligned} U \subseteq \left\{ \tau \mid \tau \in \left[ -10^3,10^3\right] \right\} , \end{aligned}$$

we have obtained \(10^4\) input–output data sets to model \(\dot{x}_2(t)\), so that 8000 data \((80\%)\) will be used in the modeling phase, and 2000 (the remaining \(20\%\)) in the validation phase. Please note that the actual model of the system has only been used to generate the input–output data set, henceforth being considered unknown.

The identification of the structure of the fuzzy model for \(\dot{x}_2(t)\), that is, the identification of the number of rules and of the initial values for antecedents and consequents, has been realized by the c-means clustering algorithm (Bezdek et al. 1984) using Gaussians membership functions, obtaining 3 rules. Then, the adjust of the parameters have been made by the ANFIS algorithm (Jang 1993). A root mean squared error (RMSE) of 1.018 were obtained during the validation for \(\dot{x}_2(t)\).

After obtaining a fuzzy model of the system, the equilibrium states will be searched as described in Sect. 3.2. For this, a mesh of initial points have being created. The limits of the mesh coincide with the universe of discourse of each of the variables of the system, and an increase of 0.1, 5, and 4 has been used for each of the state and input variables, respectively. The equilibrium states located outside the universe of discourse of the model are discarded. The equilibrium states located through the fuzzy model are shown in Fig. 2, and the evolution of their eigenvalues in Fig. 3.

Fig. 2
figure 2

Equilibrium states located through the fuzzy model

Fig. 3
figure 3

Evolution of the eigenvalues obtained from the fuzzy model

The actual equilibrium states of the system are on the line \(\tau = -M L g \sin (\theta )\). In the actual system, equilibrium points given by \(-\,\pi /2<\theta <\pi /2\) are saddle points, while the rest of equilibrium states of \([-\,\pi ,\pi ]\) are stables focus. Observing the results obtained from the fuzzy model, we can conclude that, in general, the equilibrium states of the system have been correctly obtained. There are small discrepancies with the type of equilibrium state obtained around \(|\tau |\approx 5\) and \(|\theta |\approx \pi /2\), but in the rest of the universe of discourse the equilibrium states have been correctly obtained. It is inevitable that errors occur, since the modeling errors themselves influence the results. However, it is necessary to take into account the important information that can be obtained from a fuzzy model of a system, in principle completely unknown, only through its analysis.

As an example, if the system is linearized around the origin using the fuzzy model:

$$\begin{aligned} {{\dot{\mathbf{x}}}}(t) = \begin{pmatrix}0 &{}\quad 1 \\ 17.3537 &{}\quad -\,1.9280\end{pmatrix}{\mathbf {x}}(t) + \begin{pmatrix}0 \\ 4.0030\end{pmatrix}\mathbf {\tau }(t), \end{aligned}$$

whose eigenvalues are 3.3119 and \(-5.2399\), while the linearization over the real system results in:

$$\begin{aligned} {{\dot{\mathbf{x}}}}(t) = \begin{pmatrix}0 &{}\quad 1 \\ 19.6 &{}\quad -\,2\end{pmatrix}{\mathbf {x}}(t) + \begin{pmatrix}0 \\ 4\end{pmatrix}\mathbf {\tau }(t). \end{aligned}$$

whose eigenvalues are 3.5387 and \(-\,5.5387\).

4.2 A subcritical Hopf bifurcation system

Be the system whose dynamics is determined by (60). As in the previous example, information about its dynamics will be obtained from a fuzzy model generated from input–output data, assuming that the dynamics of the system is unknown.

$$\begin{aligned} \dot{x}_1(t)= & {} x_1 \left( \mu - x_1^2(t)-x_2^2(t) \right) - x_2(t)\nonumber \\ \dot{x}_2(t)= & {} x_2 \left( \mu - x_1^2(t)-x_2^2(t) \right) + x_1(t) \end{aligned}$$
(60)

Taking as universe of discourse of the state variables

$$\begin{aligned} X \subseteq \left\{ {\mathbf {x}} \mid x_1, x_2 \in \left[ -2,2\right] \right\} , \end{aligned}$$

and as universe of discourse of the parameter:

$$\begin{aligned} M \subseteq \left\{ \mu \mid \mu \in \left[ -1.5, 1.5\right] \right\} . \end{aligned}$$

We have obtained 2500 input–output data sets to model the system; 2000 data (\(80\%\)) have been used in the modeling phase, and 500 (the remaining \(20\%\)) in the validation phase. Please note, as in the previous example, that the actual model of the system has only been used to generate the input–output data set, because for the application of the methodology developed in this work, the system is unknown.

The identification of the structure of the fuzzy model has been carry out by the c-means clustering algorithm (Bezdek et al. 1984) using Gaussian membership functions. In this case 4 rules were obtained, 2 for the dynamic of each state variable. Then, the adjust of the parameters have been made by the ANFIS algorithm (Jang 1993). A root mean squared errors (RMSE) of 0.4210 were obtained during the validation of \(\dot{x}_1(t)\), and 0.4135 during the validation of \(\dot{x}_2(t)\).

After obtaining a fuzzy model of the system, the equilibrium states have been searched as described in Sect. 3.2. For this, a mesh of initial points has being created. The limits of the mesh coincide with the universe of discourse of each of the variables of the system, and an increase of 0.5, and 0.3 was used for the state variables and \(\mu \), respectively. The equilibrium states located outside the universe of discourse of the model have been discarded. The equilibrium states located by the fuzzy model are shown in Fig. 4.

Fig. 4
figure 4

Equilibrium states located for a model with four rules

The actual system has a only equilibrium state at the origin, being the origin a stable focus for \(\mu < 0\), an unstable focus for \(\mu > 0\), and a center for \(\mu = 0\). In this example you can see that the equilibrium steady state has been found properly for all values of \(\mu \), but not always its type. This is due to an excessive error in the model. This has a simple solution, for example, if we use a 13 rules model (6 for \(\dot{x}_1(t)\) and 7 for \(\dot{x}_2(t)\), whose RMSE validation are 0.2059 and 0.1967 for \(\dot{x}_1(t)\) and \(\dot{x}_2(t)\), respectively), the equilibrium states located by the fuzzy model are shown in Fig. 5. In this case it is possible to observe a better correspondence between the equilibrium states detected by the model and the real ones. As in the previous example, it is important to note that errors are inevitable, but these may be bounded. However, it is to convenient to point out that perhaps the most important issue is the information that can be obtained from a fuzzy model of a system, in principle completely unknown, only by the developed analysis.

Fig. 5
figure 5

Equilibrium states located for a model with 13 rules

Nevertheless, this system may present more dynamic behaviors that can be studied; it is possible that the system has limit cycles. To locate possible oscillations the Poincaré application can be used as described in Sect. 3.3. The line \(x_1 = x_2\) has been used as Poincaré’s section. In Fig. 6 a phase portrait of the system for \(\mu = 0.7\) is shown along with the section of Poincaré chosen, which cuts off the oscillation. Repetitive cuts through the section of Poincaré that can indicate a periodic orbit will be looked for. The system could also be studied in negative-time, \({{\dot{\mathbf{x}}}}(t) = -{\mathbf {f}}({\mathbf {x}}(t), {\mathbf {u}}(t))\), since the numerical results are more complex to obtain if the limit cycle is unstable. In negative-time it becomes stable and can be studied without numerical problems. In fact, this system has been studied in the literature, and we know that for positive values of \(\mu \) this system has a limit cicle with radius \(\sqrt{\mu }\) and center in the origin [a complete theoretical analysis for this system was performed by Khalil (2000, pp. 73–75)]. However, it is important to bear in mind that this knowledge has not been used except to validate the results obtained through the proposed methodology.

Fig. 6
figure 6

Phase portrait for \(\mu = 0.7\) and \(P({\mathbf {x}})\) (dotted with dashed line)

Fig. 7
figure 7

Increase of \({\mathbf {x}}\) on the Poincaré’s section (solid line), and \({\mathbf {x}}_p\) (asterisk)

By performing a simulation of a trajectory ending in the limiting cycle, the point \({\mathbf {x}}_p \in P({\mathbf {x}})\) that characterizes the oscillation can be obtained. Figure 7 shows \({\mathbf {x}}_p\) obtained by the LM minimization algorithm, where \({\varDelta } x = {\mathbf {x}}(0)-{\mathbf {x}}(1) \in P({\mathbf {x}})\). Figure 8 shows a single trajectory of the system started at \({\mathbf {x}} = \left( 2, 1.5\right) ^\text { T}\), the Poincaré’s section and the points of intersection of these, \({\mathbf {x}}_p\); the point belonging to both the oscillation and the Poincaré section, is also shown. Figure 9 shows the Poincaré’s section of the previous trajectory. Finally, Fig. 10 shows the localized oscillation over other trajectories.

Fig. 8
figure 8

Poincaré’s section of a trajectory started at \({\mathbf {x}} = \left( 2, 1.5\right) ^\text { T}\) and located oscillation

Fig. 9
figure 9

Poincaré’s section for \(x_1\) and \(x_2\)

Fig. 10
figure 10

Localized oscillation over other simulations

Although it is evident from the simulations, the stability of the oscillation can be obtained by studying the increase of \(P({\mathbf {x}})\). Since at point \({\mathbf {x}}_p\) the absolute value is less than 1, it can be concluded that the oscillation is stable. By studying the time it takes the trajectory to start from \({\mathbf {x}}_p\) until it returns, a cycle time of 6.4393 s can be estimated, versus the actual cycle time around 6.2825 s.

As with the previous example, it has been shown that very valuable information can be obtained from an unknown system by using the developed methodology in this paper. In this case, in addition to obtaining the equilibrium states of the system, a limit cycle has also been located and characterized by the application of Poincaré. If the limit cycle had been unstable, it would probably not be localized by simulation, however, it would be easy to locate by simulating the system at negative-time, where the simulation would be stable.

5 Conclusions

In this paper we have presented a methodology that allows to study the dynamical behaviour of an unknown system. For that we have obtained firstly its Takagi–Sugeno type fuzzy model from input–output data. From the fuzzy model, the equilibrium states of the system can be approximated. The exact linearization of a general TS model has also been developed, with no restrictions in use or distribution of membership functions. From this linearization, local behaviors of the system can be studied, such as the local stability of equilibrium states. Finally, we propose the use of the Poincaré application on the fuzzy model for the study of the existence of periodic orbits in the real system. All proposals has been demonstrated by two examples: how valuable information can be extracted only from the analysis of the fuzzy model, such as the location of the equilibrium states of the system, the study of its local stability, as well as the presence and stability of oscillations in the system. For the analysis to be correct and conclusive, it is essential that the model reflects as closely as possible the dynamics of the system, since modeling errors will be reflected in the results obtained.

The study methodology proposed in this paper may be of great interest in the study of complex and large-scale systems, where it is difficult to obtain mathematical models of their behavior. But it may also be interesting from the point of view of control systems. When the design of a control system is going to be addressed, it is very important to have as much information as possible about the dynamic behavior of the system, and this is difficult to obtain only from data. Extracting this information from the data can be a great advantage for the control engineer in his design process, and can make a difference on the final results.