Abstract

This work presents a straightforward methodology based on neural networks (NN) which allows to obtain relevant dynamic information of unknown nonlinear systems. It provides an approach for cases in which the complex task of analyzing the dynamic behaviour of nonlinear systems makes it excessively challenging to obtain an accurate mathematical model. After reviewing the suitability of multilayer perceptrons (MLPs) as universal approximators to replace a mathematical model, the first part of this work presents a system representation using a model formulated with state variables which can be exported to a NN structure. Considering the linearization of the NN model in a mesh of operating points, the second part of this work presents the study of equilibrium states in such points by calculating the Jacobian matrix of the system through the NN model. The results analyzed in three case studies provide representative examples of the strengths of the proposed method. Conclusively, it is feasible to study the system behaviour based on MLPs, which enables the analysis of the local stability of the equilibrium points, as well as the system dynamics in its environment, therefore obtaining valuable information of the system dynamic behaviour.

1. Introduction

The innumerable strategies and new proposals in the control system area are generally based on the knowledge of the system to be controlled. In some cases, its model is achieved by mathematical and analytical procedures, because such model is a simplified representation of the system, or the problem to study is highly restricted to a specific operating point. Although the modelling is often approached by the means of mathematical and analytical methods, with the growing complexity involved in the systems and the requirements of accurate representation, such approaches turn into an increasingly challenging solution.

Consequently, considering the maturity of computational intelligence (CI) techniques and new enabler technologies, CI methods represent an attractive alternative to develop accurate modelling and control solutions for highly complex models [14].

Taking into account the need to obtain precise models of complex systems which are applicable in a wide operating range, the CI techniques are an ideal method to reproduce the behaviour of a complex system [2, 5, 6] or, as it will be presented in this work, to analyze the dynamics of systems.

When studying a process in engineering, in biomedical field, in natural sciences, and even in social systems, approaching the analysis from a dynamic point of view can be very attractive and convenient, depending on the focus of such study. A dynamic analysis of the system can provide wide and very rich information related to how the system will respond under certain inputs. Moreover, it can allow to study its dynamic behaviour through the analysis of the stability in open-loop, both locally and globally. In addition, it will be possible to study whether certain nonlinear phenomena affect the system, for example bifurcations, saddle, and limit cycles [7, 8].

The methods traditionally applied in control engineering are based on linear approximations around several operating points of the system. This is suitable when problems are studied and solved in a local domain. However, there is a trend to approach bigger problems with a more abstracted and global perspective, leading to the use of nonlinear methods [912]. At some point of complexity, and certainly if the system involves unknown parts and other uncertainties, an entirely formal analysis of the system becomes unsustainable [1315].

One of the main reasons for the use of nonlinear models is based on the dynamics of linear systems, since conventional mathematical formulations are not rich enough to reproduce a series of phenomena that usually appear in the real life [2, 16, 17]. The dynamic behaviour of a linear system, without considering its order, is basically governed by the eigenvalues of the corresponding state matrix [8]. On the contrary, nonlinear systems show a much richer behaviour, with self-excited oscillations (i.e., limit cycles), aperiodic behaviours and critically sensitive to the initial conditions [7], and chaos [18], as well as other dynamic phenomena exclusive to nonlinear systems, such as the existence of multiple states of equilibrium and bifurcations [19], among others.

The typically appropriate initial approach to analyze nonlinear systems is to use a representation of the system by means of a mathematical model, generally represented in state variables. This is possible assuming that sufficient information and knowledge of the system is available to generate its state equations, provided that the system dynamic is not extremely complex. In many applications, current research deals with the study of unknown complex systems, whether due to a complex dynamic, high dimensionality, or lack of information about the physical relationships that govern the behaviour of the system. In such situations, the techniques from the field of intelligent control can help to improve these studies, as Barragán et al. present in [20, 21] using Fuzzy logic to define a formal methodology for analyzing the dynamic behaviour of nonlinear systems, or Grande et al. in [11] to extract qualitative models of spatial evolution from a chemical system. In the same sense, neural networks (NN) become a powerful technique, since they are able to model highly complex nonlinear systems from input-output data. Proper selection and training of a basic structure such as a multilayer perceptron (MLP) can accurately reproduce the behaviour of a nonlinear system. This modelling technique can be used, both qualitatively and analytically [6, 2225], taking into account that MLPs are universal approximators, either for a function [2629] or its derivative [30, 31]. Thus, although the system might be unknown, it is possible to obtain a NN model of its behaviour, representing its dynamics in the workspace studied. In a formal sense, a NN model is a mathematical model. Hence, from this NN model, it is possible to study several aspects of the real dynamics of the system, conditioned only by the high precision of the model. This can be achieved with an exhaustive experimental stage where the topology of a NN is selected, capable of faithfully reproducing the behaviour of the system with the expected precision. This approach in solving this problem allows dealing with nonlinear systems, where modeling by traditional mathematical techniques can be challenging.

During the analysis and design of control solutions, knowing the equilibrium states of a system, as well as the stability of such states, is an aspect of great interest. When the model of the system is completely unknown, this information could help to clarify how the system works, even to ease the design of an appropriate control. It should be noted that despite the existence of recent works that present formal analysis methodologies based on Fuzzy logic [17, 20, 21, 32] the authors have not currently found any work focused from the NN point of view, under a general approach as presented in this proposal.

This work presents a straightforward and easy to use methodology for extracting information from unknown systems using NNs. The main objective of this proposal is to develop a method that allows obtaining information on the dynamics of nonlinear systems, when there is no mathematical model, neither accurate nor approximate, to analyze them. In these situations, any additional information reached by new methods is significant, especially when this information is related to the analysis of the presence of equilibrium states and their local stability, as presented below. In this work, an MLP neural network is trained with a set of measured values of inputs and outputs of supposedly unknown systems, in order to reproduce the behaviour of these systems. For this purpose, taking into account that the dynamic study aims at analyzing the behaviour of each nonlinear system in their corresponding equilibrium states, the dataset of examples to train the NN will be obtained from its entire operating range. More specifically, the equilibrium states of three nonlinear systems will be studied through their NN models, which reproduce their corresponding state variable models. The equilibrium states are reached by a precise linearization in a grid of operating points extracted from the NN models, and subsequently performing a study of local stability. Using this information, the local stability of equilibrium states is obtained, as well as the system dynamics in the vicinity of the studied points, achieving valuable information about the dynamic behaviour of the nonlinear system.

This paper is organized as follows: Section 2 presents the problem and the formulation associated with it, explaining how it will be dealt with throughout the document. In Section 3, the procedures to obtain the linearization of a system and its extension to a NN model are explained. Section 4 presents three case studies to demonstrate the proposed approach, based on solid results. Finally, this work finalizes with the corresponding conclusions.

2. Problem Formulation

A generic continuous dynamic system will be considered, represented by state variables , where and depict a input system of order with representing the inputs and the state variables. is a static nonlinear map defined as [33]. An equivalent NN model, based on a MLP structure, which can estimate both the state variables of the continuous system and the system output , is represented by the equations in (1) [3436]. where is the regression vector and the vector of parameters of the NN, the inner weights, and the biases. is the function realized by the MLP, defined as . To model the evolution of each ith state variable, a MLP structure has to be trained adapting the parameters mentioned above. In the training process, the needed information is provided for both the states , with , and the system inputs , with .

By selecting a simple MLP structure that consists of one hidden layer of neurons, with sigmoidal activation functions, and a linear output layer, the NN output can be calculated by the following general expression [35]: where is the number of hidden neurons, represents the output neuron (for the case of several NN outputs), are the output layer weights and biases, is the activation function of each hidden neuron, and is the sum of weighted inputs to each hidden neuron, as shown in where are the weights and biases of the hidden layer and is the input vector to the NN, being the vector dimension.

Taking into account that a NN will reproduce the evolution of each state variable , the neural model can be related to the state model [35] as

From the above representation, in order to simplify the methodology in studying the obtained NN models, each state variable will be modeled by a different NN.

3. Information Obtained from the Neural Network Model

After obtaining an accurate model of a system, it is a fact that this model can be used to obtain system information through well-known techniques. In this section, a very important technique is presented to study nonlinear systems in two phases, as required by the methodology of this work. Firstly, the linearization of a neural state model will be exposed in detail. Secondly, the study of the equilibrium states of an unknown nonlinear system will be presented. This study is carried out through a NN model that reproduces the behaviour of the aforementioned nonlinear system. The study of the equilibrium states from the NN model, together with the study of their local stability from the linearization, allows to analyze the operational behaviour of a system from a qualitative point of view.

3.1. Linearization of a Neural Model

Linearization is one of the most commonly used techniques in solving design problems in the field of nonlinear control systems, even though it is necessary to point out that this is a technique not ideal in many situations where the effects of nonlinearities are not negligible. It is a very convenient technique for the control of not excessively complex systems or in situations when the dynamics of the system is approximately known in regions where the system behaviour is close to a linear one, basically around equilibrium states.

Thereby, apart from being a method that aims at the control of systems, linearization could be a powerful resource to obtain information from a nonlinear system. It could be considered that, except in some situations, the behaviour of a nonlinear system around an equilibrium state is analogous to the one observed after linearization of the system in such state [19, 37, 38]. So, the study and calculation of equivalent linear systems from a nonlinear NN model can be a powerful technique to obtain information concerning the real nonlinear system analyzed.

The generic state model, obtained from a nonlinear system, is represented by

The first-order simplification of the Taylor series of the nonlinear system, in the domain of the state , can be determined an approximation as where , , and are (), (), and matrices, respectively.

Being and , the matrices of the linearized system are obtained as

For the rest of the presented work, the time dependence of state variables and system inputs will be suppressed in order to abbreviate the expressions.

If is an equilibrium state of the system, the matrix will be zero, since by definition, an equilibrium state leads the state equation to zero.

When the system (7) is represented by a NN model, the equivalent mathematical model is shown as (6). Linearizing the (7) around the state , the new equivalent mathematical model of a linearized neural model is represented by (10), being and the qth and vth vector components of and , respectively. These components are also the set of inputs of the NN.

By extending the previous (10) with (6), and consequently, (12) is obtained as in a reduced form to work with

Subsequently, based on the works of Pirabakaran and Becerra [23] and Larrea [39], where these derivatives are calculated through the internal connections of the NN, (13) can be calculated separately for each of its terms. For this purpose, it is necessary to define the activation function of the hidden layer neurons, . In this work, for the neurons of the hidden layer of the selected multilayer perceptron structure, the activation function hyperbolic tangent is chosen. The selection of a smooth activation function is performed to enable the calculation of the partial derivatives shown in (16). Applying the chain rule, we decompose the first part in three partial derivatives.

The first partial derivative of (14) is straightforward.

As the activation function is , we obtain that the second partial derivative of (14) results in where is precisely the value of the hth neuron output for the MLP neural network, , whilst the third partial derivative in (14) results in

Then, the overall solution for is being an integer value into the interval .

For the second derivative , the procedure is similar to the previous one, obtaining the expression where has integer values into the interval .

Substituting (18) and (19) in (12), the equivalent mathematical model of a nonlinear system based on NN and linearization around a state is depicted by

3.2. Equilibrium States and Local Stability

In order to perform an exhaustive analysis of the nonlinear system, it is first necessary to obtain an appropriate neural state model of that system, as presented in (1). This could be done through some of the existing modelling techniques [35], either online [40, 41] or offline [1, 6]. Subsequently, it is important to locate the different equilibrium states of the system. The search and location of such equilibrium states in a control system are one of the first problems that have to be solved in order to develop a study of the behaviour of the system. Before designing the control system, the identification and analysis of the equilibrium states provide valuable information about the behaviour of the system, especially in the case of a nonlinear system, since these states are the most relevant cases to study such systems through linearization techniques. In order to locate the equilibrium states of the system, (21) must be solved.

For nonlinear dynamics, the equilibrium states could be very difficult to solve analytically, so it is necessary to use numerical methods [2628, 30]. Given the mathematical model of a NN system characterized by a MLP, see (3), the set of nonlinear equations to solve is the following:

These equations represent the n MLPs that model the nonlinear system under study. When analyzing the dynamics of nonlinear systems, the calculation of their equilibrium states can be a notable problem. In contrast to linear systems, where one or infinite equilibrium states exist, a nonlinear system can contain one, none, a finite number, or infinite states of equilibrium. For the resolution of the set of equations in (22), both numerical or more complex methods can be utilized. Complex methods, as bioinspired algorithms (i.e., evolutionary computation techniques), can locate a large number of solutions, but its slower convergence is a clear disadvantage in comparison with numerical methods. Then, in order to solve the set of nonlinear equations in (22), the use of numerical methods will be proposed, since they can offer a rapid convergence and precision in the obtained results [42, 43]. In this sense, the Levenberg-Marquardt (L-M) method [44] with the extension proposed by Moré [45] will be performed. This algorithm needs initial conditions to initialize the search. Thus, taking into account that it will be necessary to maximize the probability of finding every existing equilibrium state, a thin grid of points in the ranges of inputs and state variables will be used. Although this is the methodology that has been used in this article, the important thing in this case is to obtain as many solutions as possible, regardless of the method used to find them. Therefore, any other algorithm to solve (22) would be perfectly valid.

The L-M algorithm requires the Jacobian matrix of the system, in order to accelerate its convergence. This matrix can be obtained, either with explicit calculation or with some technique to approximate it. In the previous Section 3.1, the calculation of the Jacobian matrix of a NN model has been solved under a general approach. Therefore, this matrix can be included into the numerical algorithm to enhance its precision and velocity of convergence.

Furthermore, the Jacobian matrix can be used, both for solving and finding the equilibrium states and for the linearization of the system in each of the solutions obtained. In this way, it is also possible to study the characteristics of the located equilibrium states, from the eigenvalues of the dynamic matrix of the linearized system. This analysis could improve the interpretation of system dynamics; it could help to study the local stability, even to observe more complex behaviours, such as bifurcations, saddle points, or limit cycles.

4. Case Studies

In this section, three different examples are presented. These examples come from different areas, being nonlinear electrical, mechanical, and biological systems, which initially will be considered as unknown. The algorithms have been implemented with the tools of MATLAB R, both for the MLP neural network training and for the calculation of the NN model linearization.

4.1. Equilibrium States of a Tunnel-Diode Circuit

Let the tunnel-diode circuit shown in Figure 1, where , 5 kΩ,  pF, and μH, with and as variables of the system, and the nonlinear relation between both. This is a case of study broadly used [20, 21], with the state model expressed by (23).

Supposing that has a nonlinear relation characterized by (24) and shown in Figure 2,

Considering that the system dynamics is unknown, the first stage in the work plan will be to obtain a NN model of the system from input-output data. These data will come from an exhaustive selection of examples that will cover the whole universe of the discourse of operating points of the system. Subsequently, after analyzing the NN model and its Jacobian matrix, relevant conclusions will be drawn regarding the dynamics of the system.

In the case of the tunnel-diode, a set of 2000 points is created to model the behaviour of the nonlinear relation which is uniformly distributed along their discourse universes, respectively. where 1600 data samples (80%) will be used in the modelling phase and 400 data samples (20%) in the validation phase. It must be noted that the mathematical model of the tunnel-diode has only been utilized to obtain the dataset, meaning that for the rest of the process it is considered unknown.

In order to keep an appropriate methodological procedure that provides the most adequate MLP neural network, a batch of training experiments has been prepared where the number of neurons in the hidden layer changes, being this the parameter to be studied in relation to the precise response of the NN output. All training experiments have been initialized with an extension of an advanced algorithm to assure the initial local stability of the NN [46]. The final structure selected has been the simplest one obtained that allows to estimate both outputs with enough precision approaching the real ones. This is a MLP with three inputs, x1, x2, and u, a hidden layer of three neurons with hyperbolic tangent activation function, and two outputs, ˙x1 and ˙x2. The training process was performed with a second order algorithm based on the L-M approach [44, 47], obtaining a validation MSE of 0.1147 V/ns and 3.03 mA/ns, respectively.

To solve the set of equations shown in (22), a minimization algorithm based on the same approach of L-M, adapted by Moré, has been used [44, 45]. With this purpose, a dense mesh has been created to initialize the calculation process whose limits are directly related to the universe of discourse of the studied variables, applying increments of 0.05 and 0.1. In Figure 3, solutions obtained by the numerical algorithm in the NN model are compared with the real system, neglecting the nonvalid solutions located outside the universe of discourse.

Comprehensively using the linearization proposed in this work, it has been possible to find linearized models in each of the equilibrium states shown in Figure 3. These have been characterized in relation to their behaviour, based on the eigenvalues of the dynamic matrix of the linearized system. As can be seen in Figure 3, the equilibrium states of the real system have been calculated accurately, where each type has correlation with the corresponding one obtained by the NN model. It must be noted that the numerical algorithm has found a set of equilibrium states in the NN model which do not exist in the real system. This error may be due to the intrinsic modeling error or to the minimization process with the L-M algorithm. When using numerical methods, tolerances have to be assumed to find the solutions. These tolerances, in addition to the minimization algorithm error, are considered as actual solutions. However, as they are not actual solutions, the study of the eigenvalues in these points reflects an erratic behaviour, since the types of detected eigenvalues are not coherent (at very close points, several types of eigenvalues are detected). This phenomenon does not happen in actual equilibrium states, so it is a simple way to discard the false states detected.

4.2. The Case of an Inverted Pendulum with Friction

The second example is an inverted pendulum with friction presented in Figure 4. The dynamics of this system is represented by (26). where the coefficient of friction is b = 0.5 N/m/s, is the pendulum angle with respect to the vertical, τ is the applied pair in N/m, M = 1 Kg is the mass of the pendulum, the length of rod is L = 0.5 m, and the acceleration of gravity is g = 9.81 m/s2.

Let be the state vector given by

Then, the system of inverted pendulum can be defined by the state model as

As a starting point, we consider that the system dynamics is unknown with the aim of validating the techniques developed in this paper. Moreover, we assume that it is possible to collect enough input-output data to obtain the neural model of the system. Thus, the first stage of this work will be to extract a MLP neural model of the pendulum system to be studied.

According to the previous example, a dataset has been prepared considering the universes of discourse of the state variables and input signal, respectively,

From these discourse universes, 2000 input-output data samples have been extracted, proportionally distributed, taking 1600 data samples (80%) for neural network training and 400 data samples (20%) for the validation. As was the case of the above study, the pendulum system will be considered as unknown.

Also as the previous case, the MLP neural network has been trained using the L-M algorithm [44, 47]. The most appropriate NN structure obtained has three inputs, x1, x2, and τ, a hidden layer of three neurons with hyperbolic tangent as activation function, and two outputs, and . The training process has been performed with the same algorithm, Levenberg-Marquardt, and the validation MSE errors have been 6.334 × 10−6 rad/s and 0.1857 rad.

Taking into account the obtained NN model of the system, the equilibrium states have been calculated as presented in Section 3.2 and explained at the above example. Thus, a grid of initial points has been created again, limiting each variable range into their universes of discourse, with increments of 0.1, 5, and 4, for the states and the input, respectively. All the equilibrium states located with the NN model are shown in Figure 5. As in the previous example, the points located outside of the universe of discourse have been discarded and removed.

For the real system, its equilibrium states are located on the line , being saddle points the equilibrium points on , and stable focuses on the rest sited on [] [48]. Compared with the equilibrium points estimated by the NN model, it can be concluded that those points have been correctly obtained. Certain discrepancies can be noticed in the steady states obtained around and , but the rest of equilibrium states estimated into the universe of discourse have been accurately located. The appearance of errors is inevitable as the NN model has an implicit error associated. Considering that such errors are within permissible limits, it is necessary to emphasize that the extracted information, with this neural approach, through the analysis of the neural structure is a powerful technique to obtain information from an unknown system.

4.3. A Prey-Predator Biological System

Nature is capable of providing diverse real-life examples in which animal behaviour presents multiple stable equilibrium states. This is the case of a predator-prey system with adaptation of prey behaviour to changing environmental conditions [49, 50]. The classic Lotka-Volterra predator-prey model is given by where and are sizes of the prey and the predator populations, is per capita reproduction rate of the prey, is the carrying capacity of environment, is the per capita mortality rate of the predator in the prey deficiency, is the attack rate, and e = ka shows the consumption efficiency after the attack. Let be the state vector given by

Then, the system of a biological prey-predator can be defined by the state model.

In response to an external challenge, each individual into the prey community may modify its behaviour between risky and safe conduct. On the basis of the vulnerability of individuals in risky mode, the first expression in (32), suppressing the time (t) dependence, will be extended as

In (33), and are the subpopulations of in risky () and safe () modes. In addition, , , and are magnitudes of the intermode competition [50].

Taking into account that , and defining the nonlinear function of the probability for a prey to be hunted by a predator as shown in Figure 6, with [50], the state model of the behavioural predator-prey system will be

Moreover, to reject biologically unreachable equilibrium states, it is necessary to preserve the condition.

As Pimenov et al. argue [50], this condition implies that prey in both modes, risky and safe, is taking advance of the same environment and using the same resources. This basically differs from the concepts of multiple patches or refuge, when the prey in these habitats is assumed to have no access to resources in other patches, and hence all

Considering again that the system dynamics are unknown, an extensive set of input-output data have been obtained from the state model in (34). Subsequently, a batch of different structures of MLP neural networks has been trained in order to extract an appropriate NN that accurately reproduces the behaviour of the predator-prey system. This dataset contains 10,000 points uniformly extracted from the universes of discourse of the state variables, and , and input, , respectively. where 8000 data (80%) have been used for training MLP neural networks, proceeding in previous examples, and 2000 data (20%) have been managed in the validation stage to select an appropriate neural model. After training and validating, for each of the state variables, a MLP structure with a different dimension has been selected, incorporating 15 neurons in the hidden layer for the estimation of and 6 neurons in the case of . The training process has been performed with the same algorithm as above, the second order L-M algorithm [44, 47], obtaining a validation MSE result of 17.797 and 0.1059 individuals, respectively.

Afterwards, the set of equations in (23) has been solved with the same approach as before, the L-M algorithm adapted by Moré [44, 45], through a dense mesh of points created into the universes of discourse of the studied variables, , , and , applying increments of 1 individual. Figure 7 shows the comparison between the solutions obtained through the NN model and the real system.

After the linearization developed in this work, different equilibrium states have been found in the real system, as shown in Figure 7. These states are characterized by their eigenvalues of the corresponding dynamic matrix. In the same way, it can be seen how the equilibrium states calculated by the NN model have correlation with the states existing in the real system. All these results are directly related to the analysis of the real system that Pimenov shows at work [50], and they maintain a precise correspondence with them. As in previous examples, those points calculated outside of the universe of discourse can also be discarded.

5. Conclusions

This work has presented a straightforward methodological procedure based on neural network models, to analyze the dynamical behaviour of unknown nonlinear systems. This implies presenting the linearization of a neural model to be compared with the proper linearization of the real system, and finally explaining the calculation of the equilibrium states of the real system through the NN model and its relation with the study of the local stability.

This work initiates a research line where NNs are the basis of a nonlinear system model, allowing to calculate its corresponding Jacobian matrix to analyze the local stability of the equilibrium states. Since it is assumed that there is no approximate mathematical model of the nonlinear system, the accuracy of the study of equilibrium states is related to the NN training process. In this process, many experiments have been developed to ensure the representativeness of the entire operating range that will be considered in the analysis of the nonlinear system. This has involved keeping the system under control and acquiring the appropriate amount of examples of variables and states.

The proposed method has been validated with three nonlinear systems coming from different fields (electrical, mechanical, and biological). This approach has been developed with multilayer perceptron neural network structures, one of the most simple and feasible in training and application. The training processes have been based on widely used Levenberg-Marquardt algorithm and developed with exhaustive input-output data of the above systems, guaranteeing the representativeness of each universe of discourse. Taking into account that after the training the errors have been within permissible limits, it is necessary to emphasize that the extracted information, with this neural approach, through the analysis of the neural structure is a powerful method to obtain information from an unknown system.

The results have shown that it is possible to obtain dynamical information of nonlinear systems uniquely using the corresponding NN model. This information is directly related to the equilibrium states of the real system, enabling to study the local stability around each equilibrium state.

Due to the interest of this research line, more additional works could be developed in the future considering other NN structures different to that presented in this paper, the multilayer perceptron with sigmoidal activation function in its unique hidden layer. The study of nonlinear systems of more complicated dynamic features (including systems with memory and with noncontinuous operating ranges), together with the modification of the NN structures (recurrent, radial basis function, deep neural networks, etc.), could establish a promising and extensive field of study.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

The authors would like to thank the Ministry of Economy, Industry and Competitiveness of Spain that has funded this work under the project DPI2017-85540-R (H2SMART-GRID).