Keywords

1 Introduction

The most nonlinear dynamic objects have their ANM. Their parameters are known or can be determined by one of the typical identification procedure. The model obtained in this way describes well the main features of the identified dynamic object only in some OP [14]. Between them there are many secondary phenomena that are not described precisely enough by the mathematical model. The observed phenomena must be reproduced in order to obtain the model precise enough for the practical application.

A large number of mathematical models which can describe the linear or nonlinear systems in universal way were proposed in the literature, among others, neural networks [23, 36] treated as black box models, fuzzy systems [9, 20], flexible fuzzy systems [24, 27], neuro-fuzzy systems [28, 29, 43], flexible neuro-fuzzy systems [6, 7, 10, 26, 39,40,41,42], interval type 2 neuro-fuzzy systems [33, 34], Takagi-Sugeno systems [12], flexible Takagi-Sugeno systems [11]. The methods mentioned earlier enable modeling in an universal way but do not provide enough precision of the reproduction of the reference values.

Much better result can be obtained by using a hybrid approach [3, 15]. The approximate linear or nonlinear model can be used in the hybrid approach. It enables reproduction of the reference values with a sufficient precision only in the OP, whereas the universal model can determine the values of the parameters of the approximate model in different OP and between them. This approach ensures to obtain a sufficient precision of the identification in all states of the nonlinear dynamic object. In this paper we propose a new representation of the approximate state and input matrices by including the sparse corrections \(\varDelta {\hat{\mathbf {g}}}(\mathbf {x}(t))\) and \(\varDelta {\hat{\mathbf {q}}}(\mathbf {x}(t))\) of the known or estimated parameters \(\mathbf {g}\) and \(\mathbf {q}\). It allows to obtain characteristics of the unknown parameters of the ANM described by the FR of the TS fuzzy system. This approach provides the valuable knowledge for experts in order to identify better mathematical model of the ANM.

The remainder of this paper is organized as follows. Section 2 describes approximate modeling of nonlinear dynamic objects by the algebraic equations and on the basis of the state variable technique using sparse corrections of the known or estimated parameters in the operating points. Section 3 deals with fuzzy modeling of the corrections of the parameters in the operating points using the TS fuzzy system. Section 4 presents the algorithm for online identification of the OP described by FR of the TS fuzzy system. Section 5 describes the Permanent Magnet Synchronous Motor (PMSM) working in the two operating points. Finally, Sect. 6 shows simulation results which proves the effectiveness of the proposed method.

2 Approximate Modeling of the Nonlinear Dynamic Object

Let us consider the nonlinear dynamic stationary object described by the algebraic equations and based on the state variable technique [24]

$$\begin{aligned} \frac{d\mathbf x }{dt} = \mathbf {A}(\mathbf {x}(t))\mathbf {x}(t)+\mathbf {B}(\mathbf {x}(t))\mathbf u (t), \end{aligned}$$
(1)
$$\begin{aligned} \mathbf {y}(t)=\mathbf {C x(t)}, \end{aligned}$$
(2)

where \(\mathbf A (\mathbf {x}(t))\), \(\mathbf B (\mathbf {x}(t))\) are the system and input matrices respectively, \(\mathbf u (t)\), \(\mathbf y (t)\) are the input and output signals respectively, \(\mathbf x (t)\) is the vector of the state variables. The algebraic equations based on the state variable technique, delivered by the experts, describe the dynamic nonlinear object with a sufficient precision only in some characteristic work state called operating point. Beyond the OP there are phenomena that are not included in the mathematical model. Overall accuracy of such a model may be too low for many practical applications.

In this work we propose the hybrid method which increases effectiveness of the modeling of the nonlinear dynamic object. It is done by the modeling of the system and input matrices parameters which are not described precisely enough by the mathematical model. The entire approximate model can be described by algebraic equations and on the basis of the state variable technique, where unknown linear or nonlinear part can be modeled by the \(\mathbf {\hat{A}}(\mathbf {x}(t),\mathbf {g} + \varDelta \hat{\mathbf {g}}(\mathbf {x}(t))\) and \(\mathbf {\hat{B}}(\mathbf {x}(t),\mathbf {q}+ \varDelta \hat{\mathbf {q}}(\mathbf {x}(t)))\) approximate matrices. The unknown parameters change and can be described by the correction values \(\varDelta \hat{\mathbf {g}}(\mathbf {x}(t))\) and \(\varDelta \hat{\mathbf {q}}(\mathbf {x}(t))\). For example, consider the specific nonlinear dynamic deterministic system with the element of the system matrix \(a_{23}=-i_d-\lambda _m/L\) with the unknown or estimated value of the \(\lambda _m\). The element \(a_{23}\) can be written as \(a_{23} \approx -i_d-(\lambda _m + \varDelta \hat{\lambda }_m)/L\). The parameter \(\lambda _m\) has constant value in the OP but changes in unknown way between them and can be modeled by the \(\varDelta \hat{\lambda }_m\) correction values. So by using the approximate matrices, we obtain the following form of the Eq. (1)

$$\begin{aligned} f(\mathbf x (t),\mathbf u (t))= & {} \hat{\mathbf {A}}\left( \mathbf {x}(t),\mathbf {g}+\varDelta \hat{\mathbf {g}}(\mathbf {x}(t))\right) \mathbf {x}(t) \\+ & {} \hat{\mathbf {B}}\left( \mathbf {x}(t),\mathbf {q} +\varDelta \hat{\mathbf {q}}(\mathbf {x}(t))\right) \mathbf u (t), \nonumber \end{aligned}$$
(3)

where \(\mathbf {\hat{A}}\), \(\mathbf {\hat{B}}\) are approximate state and input matrices respectively, \(\mathbf {g}\), \(\mathbf {q}\) are known parameters, \(\varDelta \hat{\mathbf {g}}(\mathbf {x}(t))\), \(\varDelta \hat{\mathbf {q}}(\mathbf {x}(t))\) are the sparse corrections of parameters \(\mathbf {g}\) and \(\mathbf {q}\), respectively.

3 Fuzzy Modeling of the Identified Parameters

The changes of the correction of the parameter values \(\varDelta \hat{\mathbf {g}}(\mathbf x (t))\) and \(\varDelta \hat{\mathbf {q}}(\mathbf x (t))\) take place between OP does not occur rapidly usually, but in a smooth unknown manner which is difficult to describe by using the mathematical model. The values of the parameters in the operating points pass fluently among themselves and overlap. Fuzzy systems are frequently used by many researches to fuzzy modeling and classification [9, 18,19,20, 35]. So, for modeling of the sparse corrections \(\varDelta \hat{\mathbf {g}}(\mathbf {x}(t))\), \(\varDelta \hat{\mathbf {q}}(\mathbf {x}(t))\) of the parameters \(\mathbf {g}\) and \(\mathbf {q}\), respectively, the TS fuzzy system is perfectly suitable as the universal approximator.

The construction of the most neuro-fuzzy structures [11] is based on the Mamdani reasoning type described by using t-norm, for example product or minimum. They require defuzzification of the output values, thus they cannot be applied easily for modeling of the corrections of the parameters opposed to TS fuzzy system [17]. This system includes dependence between a premise IF and a consequent THEN of the rule in the form

$$\begin{aligned} R^{(l)}: \ \mathrm {IF} \ \bar{\mathbf{x }}\ \mathrm {is}\ \mathbf D ^l\ \mathrm {THEN}\ \mathbf {y}^l\ = \mathbf f ^{(l)}({\mathbf {x}}), \end{aligned}$$
(4)

where: \(\bar{\mathbf{x }}=[\bar{x}_1, \bar{x}_2, \ldots , \bar{x}_N]\in \bar{\mathbf{X }}\), \(\mathbf {y}^l \in \mathbf Y ^l\), \(\mathbf D ^l=D^l_1\times D^l_2\times \ldots \times D^l_N\), \(D^l_1, D^l_2, \ldots , D^l_N\), are the fuzzy sets described by the membership functions \(\mu _{D^l_i}(\bar{x}_i)\), \(i=1,\ldots ,N\), \(l=1,\ldots ,n\), L is the number of the rules and N is the number of the inputs of the TS fuzzy system, \(\mathbf f ^{(l)}\) are the functions describing values of the system matrix or input matrix for the l-th fuzzy rule. In case of the \(a_{23}\) element of the state matrix, the \(f^{(l)}\) function from the consequent takes the form: \(f^{(l)}(t) = -i_d(t) - (\hat{\lambda }_m + \varDelta \hat{\lambda }_m(t))/L\).

Assuming the aggregation method as weighted average, using the Eq. (3) and Euler integration method with time step \(T_s\), we obtain the discrete approximate hybrid model described by Eq. (5)

$$\begin{aligned} f(\mathbf {x}{(k)}, \bar{\mathbf {x}}{(k)}, \mathbf {u}{(k+1)}) = \nonumber \\ \left( \mathbf {I}+ \left( \hat{\mathbf{A }}\left( \mathbf {x}(k), \mathbf {g}+ \frac{\sum \limits _{l=1}^{L} \mathbf {\hat{g}}^{l} \cdot \mu _\mathbf{D }{^{l}}( \bar{\mathbf{x }}(k))}{\sum \limits _{l=1}^{L}\mu _\mathbf{D }{^{l}}(\bar{\mathbf{x }}(k))}\right) \right) T_s \right) \mathbf {x}(k) \nonumber \\ + \left( \hat{\mathbf {B}}\left( \mathbf {x}(k),\mathbf {q} + \frac{\sum \limits _{m=L+1}^{L+M} \mathbf {\hat{q}}^m \cdot \mu _\mathbf{D }{^{m}}( \bar{\mathbf{x }}(k) )}{\sum \limits _{m=L+1}^{L+M}\mu _\mathbf{D }{^{m}}(\bar{\mathbf{x }}(k))} \right) \right) \mathbf {u}(k+1), \end{aligned}$$
(5)

where \(\bar{\mathbf {x}}(k)\) is the vector of the fuzzy values obtained from the vector \(\mathbf {x}(k)\) using singleton fuzzification, \(\mathbf {g}^l\), \(\mathbf {q}^m\) are the sparse vectors containing the correction values for the changing parameters in the l and m OP, \(l=1,\ldots ,L\), \(m=L+1,\ldots ,L+M\), L, M - number of the rules describing the OP for the state and input matrices respectively, \(\mu _\mathbf{D }{{^m}}( \bar{\mathbf{x }}(k))\) and \(\mu _\mathbf{D }{^{l}}( \bar{\mathbf{x }}(k) )\) are the membership functions describing activation levels of the operating point and \(\mathbf {I}\) is the identity matrix.

The Eq. (5) represents the discrete hybrid model describing the dynamic nonlinear deterministic system. The Euler integration method was selected for simplicity but there should be chosen better one in the practical application.

So, the local linear or nonlinear model in the operating point l and m is defined through the set of the parameters \(\theta _l=\{\mathbf {\hat{A}}(\mathbf {x}(k)),\mathbf {g}, \mathbf {\hat{g}}^l, \mathbf {D}^l\}\) and \(\theta _m=\{\mathbf {\hat{B}}(\mathbf {x}(k)), \mathbf {q}, \mathbf {\hat{q}}^m, \mathbf {D}^m\}\). The parameters are determined by hybrid operating point identification method using PSO and GA algorithms.

4 Online Identification of the Operating Point

The automatic detection of the OP in nonlinear modeling is a very hard and time-consuming task. In the most researches, authors focus on solutions using grouping and classification algorithms to discover potential areas that can be good candidates for operating points. The mentioned methods require a complete data set for estimating good candidate areas for OP.

In many researches there were used hybrid and evolutionary approach for find solution of the very hard and time-consuming tasks. Among others, Eftekhari [16] has used subtractive clustering algorithm [5, 13] to discover potential areas of applying local linear models which were identified subsequently by Ant Colony Algorithm (ACO). Brasileiro [4] applied ACO to the problem of choosing the best combination path in transparent optical networks. Aghdam [1] used PSO for feature selection in text categorization. Szczypta [32] has used evolutionary approach for design optimal controllers.

figure a

Lapa [22] and Szczypta [31] selected structure and parameters of the control system using Multi-Population Algorithms. Stanovov and Semenkin [30] proposed self-configuring hybrid evolutionary algorithm for fuzzy Imbalance classification. Bartczuk [3] proposed a new method for nonlinear fuzzy correction modeling of dynamic objects. He applied gene expression programming [2]. Przybyl [25] has used genetic algorithm for observer parameter tuning. Yang [37] used genetic algorithm combined with local search method for identifying susceptibility Genes.

In a new proposed hybrid evolutionary method based on [15] we identify the unknown parameters of the dynamic nonlinear stationary system and parameters of the FR step by step on the basis of incoming data samples. It is done by extending the measurement area as long as identified local linear or nonlinear model can reproduce of a reference values with sufficient precision. This a is similar approach as in the case Evolving Fuzzy Systems (EFS).

A new algorithm contains four main stages: the initialization of the OP (stage 1), the parameter identification by the PSO-GA (stage 2), the acquisition of the new data samples (stage 3), the update of fuzzy sets (stage 4) and key decision stage for adding the new OP (stage 5).

A new OP is added in the first initialization stage. The initial time \(t_{max}^{(e)}\) for used data samples is determined according to distance criterion \(\text {d}(\mathbf {x}(0), \mathbf {x}(t_{max}^{(e)}))<d_{start}\), where \(d_{start}\) is the maximum distance between measurements determined by the expert or from the experiments. Then, the initial parameters for the fuzzy set \(\mathbf {D}^1\) are estimated. For the trapezoidal membership function described by the Eq. (6), the initial parameters are determined using Eq. (7):

$$\begin{aligned} \mu _{\mathbf {D}}(x;a,b,c,d) = \left\{ {\begin{array}{*{20}{l}} {1 \quad }&{}\mathrm{{if}}\,{(b \le x \le c)}\\ {\frac{x-a}{b-a} \quad }&{}\mathrm{{if}}\,{(a \le x< b)}\\ {\frac{d-x}{d-c} \quad }&{}\mathrm{{if}}\,{(c < x \le d)}\\ {0 \quad }&{}{otherwise}\\ \end{array}} \right. , \end{aligned}$$
(6)

where abcd are parameters of the trapezoidal membership function,

$$\begin{aligned} b_i^1= & {} \min _{t< t_{max}^{(e)}} x_i(t),\quad c_i^1 = \max _{t < t_{max}^{(e)}} x_i(t), \nonumber \\ a_i^1= & {} b_i - (c_i-b_i)\rho _{init}, \quad d_i^1 = c_i + (c_i-b_i) \rho _{init}, \end{aligned}$$
(7)

where \(\rho _{init}\) is the initial fuzzy factor for the fuzzy set.

The one epoch of the hybrid swarm algorithm (PSO-GA) is performed in the parameters identification stage (2). The PSO-GA algorithm determines the unknown parameters of the nonlinear deterministic system and parameters of the fuzzy sets. If algorithm gives better results \({E}_{best}^{(e)}>{E}_{best}^{(e+1)}\) then the algorithm goes to the acquisition of the new data samples (stage 3) used for the parameters identification. The new data samples are included, if they meet the error criterion presented in Eq. (8)

$$\begin{aligned} \epsilon (\mathbf {\varTheta }_{best}^{(e)},t_{max}^{(e)}) = (\mathbf y '(\mathbf {\varTheta }_{best}^{(e)},t_{max}^{(e)}) -\mathbf y (t_{max}^{(e)}))^2, \end{aligned}$$
(8)

where: \(\mathbf y '(\mathbf {\varTheta }_{best}^{(e)},t_{max}^{(e)})\) is the output obtained for the best created model so far \(\mathbf {\varTheta }_{best}^{(e)}\) in the time \(t_{max}^{(e)}\) of the simulation, \(\mathbf y (t_{max}^{(e)})\) is the measured reference value.

In the result of added the new data samples, there are small changes of the domain for the fuzzy sets. So in the stage (4), the update of the most activated fuzzy set \(u = \arg \max \limits _{i=1,\ldots ,L}{\mu _\mathbf{D ^i} (\bar{\mathbf{x }}(t_{max}^{(e)}))}\) is needed and is performed by equations:

$$\begin{aligned} \left. \begin{array}{*{20}{l}} b_i^u=x_i(t_{max}^{(e)}) \\ a_i^u= b_i^u - (c_i^u - b_i^u) \rho _{up} \end{array} \right\} \quad \mathrm{{if}}\,{(b_i^u > x_i(t_{max}^{(e)}))}, \nonumber \\ \left. \begin{array}{*{20}{l}} c_i^u=x_i(t_{max}^{(e)}) \\ d_i^u= c_i^u + (c_i^u - b_i^u) \rho _{up} \end{array} \right\} \quad \mathrm{{if}}\,{(c_i^u < x_i^u(t_{max}^{(e)}))}. \end{aligned}$$
(9)

The reassessment of the obtained solutions is needed and is performed in the stage (5) in the consequence of updating of the fuzzy set and using the new data samples. In the stage (5), we check if there getting a new measurement data \(t^{(e)}_{max}>t^{(e-z)}_{max}\) for predefined number of epochs or the obtained error \(E^{(e)}_{best}\) for the best solution \(\mathbf {\varTheta }^{(e)}_{best}\) decreases \((E_{best}^{(e)}-E_{best}^{(e-z)})\le \varDelta E\). If not, the algorithm proceeds to add a new OP.

The algorithm finishes the work, when all measurement data \(t_{max}^{(e)}=T_{max}\) were used and the error criterion \(E_{best}^{e}\le E_{min}\) has been meet. As a criterion of the error we use Root Mean Square Error measure (RMSE).

5 The Permanent Magnet Synchronous Motor

The simulations were performed for the nonlinear model of the Permanent Magnet Synchronous Motor (PMSM). The PMSM can be described by algebraic equations based on the state variable technique using Eqs. (10) and (11)

$$\begin{aligned} \left[ \begin{array}{c} i_d(k+1) \\ i_q(k+1) \\ \omega _r(k+1)\\ \theta _r(k+1) \end{array} \right] = \left[ \begin{array}{cccc} a_{11} &{} 0 &{} a_{13} &{} 0 \\ 0 &{} a_{22} &{} a_{23} &{} 0 \\ 0 &{} a_{32} &{} a_{33} &{} 0 \\ 0 &{} 0 &{} a_{43} &{} 0 \end{array} \right] \left[ \begin{array}{c} i_d(k) \\ i_q(k) \\ \omega _r(k)\\ \theta _r(k) \end{array} \right] + \left[ \begin{array}{ccc} b_{11} &{} 0 &{} 0 \\ 0 &{} b_{22} &{} 0 \\ 0 &{} 0 &{} b_{33} \\ 0 &{} 0 &{} 0 \end{array} \right] \left[ \begin{array}{c} Vd(k) \\ Vq(k) \\ T_L(k) \end{array} \right] , \end{aligned}$$
(10)
$$\begin{aligned} \left[ \begin{array}{c} i_d(k) \\ i_q(k) \end{array} \right] = \left[ \begin{array}{cccc} 1 &{} 0 &{} 0 &{} 0 \\ 0 &{} 1 &{} 0 &{} 0 \\ \end{array} \right] \left[ \begin{array}{c} i_d(k) \\ i_q(k) \\ \omega _r(k) \\ \theta _r(k) \end{array} \right] , \end{aligned}$$
(11)

where: \(i_d(k)\), \(i_q(k)\) - d-axis and q-axis current component, \(\omega _r(k)\) - rotor speed, \(\varTheta _r\) - rotor position, \(V_d(k)\), \(V_q(k)\) - d-axis and q-axis voltage, \(T_L(k)\) - load torque, k - integration step.

The parameters of the system matrix \(\mathbf {A}\) and input matrix \(\mathbf {B}\) are described by Eqs. (1214)

$$\begin{aligned} a_{11} = a_{22} = 1-T_s\frac{R}{L}, \quad a_{13} = i_q(k) T_s,\quad a_{23} = -T_s(i_d(k)+\frac{\lambda _m}{L}), \end{aligned}$$
(12)

where: R - stator resistance \((1.456~\varOmega )\), L - stator inductance (0.008 H),

$$\begin{aligned} a_{32} = 1.5T_sP^2\frac{\lambda _m}{J}, \quad a_{33} = 1- T_s\frac{F}{J}, \end{aligned}$$
(13)

where: \(\lambda _m\) - rotor flux linkage (0.175Vs), F - friction coefficient,

$$\begin{aligned} a_{43} = T_s, \quad b_{11} = b_{22} = \frac{T_s}{L}, \quad b_{33} = -T_s\frac{P}{J}, \end{aligned}$$
(14)

where: P - number of pole pairs (3), J - moment of inertia \((0.06~JKgm^2)\).

Fig. 1.
figure 1

The control input voltages and the experimental results.

6 Experimental Results

The experiments are performed for the PMSM with unknown values of the friction coefficient F and moment of inertia J. The approximate initial values of the parameters obtained from the expert are: \(F\approx 0.0015\) and \(J\approx 0.0015\). Other parameters are known and are not identified in the experiments. The learning data set was prepared using mathematical model of the PMSM with known values of the \(J_{ref}\) (const) and \(F_{ref}\). The values of the parameter \(F_{ref}\) change in the three operating points according to the Fig. 1d. The control voltages \(V_q\) and \(V_d\) are presented in the Fig. 1a. The goal of the experiment is reproduction of the reference values \(\omega _{ref}\), \(I_d^{ref}\) and \(I_q^{ref}\) with the smallest error measure (RMSE). It is done by discovering the moment of inertia J (constant) and friction coefficient F values in the entire work area by the identification of the nonlinear stationary object in all operating points.

Figure 1d presents the discovered characteristic of the parameter F described by the membership functions \(\mu _{D_1}(\omega ),\ \mu _{D_2}(\omega ),\ \mu _{D_3}(\omega )\) of the TS fuzzy system. Each membership function \(\mu _{D_i}(\omega )\) describes the identified operating point \(\varTheta _i\). We select the important inputs from the measured values on the basis of expert’s knowledge. Figure 1e and f contain the obtained d-axis current \(I_d\) and q-axis current \(I_q\). Figure 1b and g, prove the effectiveness of the proposed method. The identified value of the moment of inertia \(J=0.001\) does not change in the entire work area as we expected.

Fig. 2.
figure 2

The progress of the new method for non-linear modeling.

Finally Fig. 2a and b present the progress of the method in the function of the epochs number. The observed local growth of the error in Fig. 2a is consequence of the acquisition of the new measurements presented in the Fig. 2b.

7 Conclusions

The proposed method for non-linear modeling using PSO and GA algorithms obtains very good results. Moreover, modeling of the OP in the form of the fuzzy rules of TS fuzzy system, provides valuable knowledge for the experts about the nature of the omitted phenomena. In future works the techniques developed in this paper will be extended to cope with interpretability aspects [8, 21].