(80553)}); // var url = "../userInformation/PDFLogin.aspx"; // var refererrurl = document.referrer; // var downloadurl = window.location.href; // var args = "PaperID=" + 80553 + "&RefererUrl=" + refererrurl + "&DownloadUrl=" + downloadurl; // url = url + "?" + args + "&rand=" + RndNum(4); // // $(this).bind('click', function() { ShowTwo(url)}); // } // }); // } // //获取下载pdf注册的cookie // function getcookie() { // var cookieName = "pdfddcookie"; // var cookieValue = null; //返回cookie的value值 // if (document.cookie != null && document.cookie != '') { // var cookies = document.cookie.split(';'); //将获得的所有cookie切割成数组 // for (var i = 0; i < cookies.length; i++) { // var cookie = cookies[i]; //得到某下标的cookies数组 // if (cookie.substring(0, cookieName.length + 2).trim() == cookieName.trim() + "=") {//如果存在该cookie的话就将cookie的值拿出来 // cookieValue = cookie.substring(cookieName.length + 2, cookie.length); // break // } // } // } // if (cookieValue != "" && cookieValue != null) {//如果存在指定的cookie值 // return false; // } // else { // // return true; // } // } // function ShowTwo(webUrl){ // alert("22"); // $.funkyUI({url:webUrl,css:{width:"600",height:"500"}}); // } //window.onload = pdfdownloadjudge;
AM> Vol.8 No.11, November 2017
Share This Article:
Cite This Paper >>

Stability Analysis of a Neurocontroller with Kalman Estimator for the Inverted Pendulum Case

Abstract Full-Text HTML XML Download Download as PDF (Size:2226KB) PP. 1602-1618
DOI: 10.4236/am.2017.811117    602 Downloads   923 Views  
Author(s)    Leave a comment
Julián Antonio Pucheta1, Cristian Rodríguez Rivero1, Carlos Alberto Salas2, Martín Herrera2, Sergio Oscar Laboret1


1Departamentos de Electrotecnia y de Electrónica, Laboratorio de Investigación Matemática Aplicada a Control (LIMAC), Facultad de Ciencias Exactas, Físicas y Naturales-Universidad Nacional de Córdoba, Córdoba, Argentina.
2Departamento de Ingeniería Electrónica, Facultad de Tecnología y Ciencias Aplicadas, Universidad Nacional de Catamarca, Catamarca, Argentina.


In this paper, a practical analysis of stability by simulation for the effect of incorporating a Kalman estimator in the control loop of the inverted pendulum with a neurocontroller is presented. The neurocontroller is calculated by approximate optimal control, without considering the Kalman estimator in the loop following the Theorem of the separation. The results are compared with a time-varying linear controller, which in noiseless conditions in the state or in the measurement has an acceptable performance, but when it is under noise conditions its operation closes into a state space range more limited than the one proposed here.


Optimal Control, Neurocontroller, Inverted Pendulum, State Estimation, Stability

Cite this paper

Pucheta, J. , Rivero, C. , Salas, C. , Herrera, M. and Laboret, S. (2017) Stability Analysis of a Neurocontroller with Kalman Estimator for the Inverted Pendulum Case. Applied Mathematics, 8, 1602-1618. doi: 10.4236/am.2017.811117.

1. Introduction

The motivation for this case study known as inverted pendulum control arises from the need to obtain robust controller systems to implement in situations where it is desired to maintain equilibrium of an unstable system. A direct related situation is the attitude control of a booster rocket at takeoff for sending a payload to space. It is a well-known problem in the control theory literature [1] [2] and machine learning [3] [4] [5] [6] . However, such problems are challenging since real systems are difficult to control and this is to some extent due to the fact that redundant feedback systems must be considered by the controller, as an effect similar to that of incorporating an estimator into the variables controller status. This fact causes instability in the closed loop, which must be foreseen and analyzed. The analysis can be done through simulations with the estimator-controller system, in order to establish some stability domain. In this work we opt for the control based on optimization [7] [8] [9] , where the optimal control problem is formulated. To solve the problem of optimal control, a very powerful tool is the Dynamic Programming technique [10] [11] implemented with approximations [3] [4] [5] in a machine learning scheme [12] , since it allows dealing with constrained, nonlinear processes and non-quadratic performance indexes. However, it is often difficult to achieve a methodology for the implementation of controllers based on machine learning, since they require heuristic and a good knowledge of the involved adaptation mechanisms [3] . In this work, a methodology to determine the conditions that achieve good results to implement in simulation is shown. A controller consisting of a compact function called neurocontroller is achieved.

In this paper, cases with and without estimator of a model that represents an inverted pendulum are studied. When a time varying linear quadratic regulator (TVLQR) with direct state measurement is used, good performance can be achieved. However, it can be improved with a neurocontroller. The obtained performances by using linear and neurocontroller are shown in Figure 1 and Figure 2, respectively. Note that the cumulative cost of the linear controller

Figure 1. Controller TVLQR with direct measurements. The initial conditions are x0 = [0 0 f0 0]T, where f0 takes the values 5.7˚, 11.5˚ and 63˚. Accumulated costs from each initial condition are 12.5, 51.8 and 3760.7, respectively.

Figure 2. Neurocontroller with direct measurements. The initial conditions are x0 = [0 0 f0 0]T, where f0 takes the values 5.7˚, 11.5˚ and 63˚. Accumulated costs from each initial condition are 123.8, 140.7 and 2691.3, respectively.

(3760.7) is 28% higher than that of the Neurocontroller (2691.3). However, when the controller is used in more realistic situations using a state estimator and considering noisy conditions in the measurements, the performance of the linear controller deteriorates more than the performance of the neurocontroller even until fails to stabilize the system for the same initial conditions. In this paper, an analysis of the system performance deterioration is shown when it requires a state estimator.

This paper is organized as follows. After this Introduction, the problem is detailed and expressed as mathematical equation in Section 2. In Section 3 is detailed the proposed solution. In Section 4 the implementation of the obtained solution and another one with classical methods for comparison purposes is developed. The obtained results are discussed in Section 5, with its pros and cons.

2. Problem Formulation

The dynamic programming approach assumes that the process evolution can be split in stages [10] , so take the version of dynamic systems in discrete time [9] is straightforward. The problem formulation puts in formal terms the optimal control elements. These elements are the cost function to minimize, the control law and the dynamic system model with its constraints. If the system model cannot be or is not feasible to express it in closed analytical form through a differential equation, it is useful to generate a black box model [13] .

This section introduces the nomenclature used along the article. The symbols are listed and explained.

i. k describes the discrete time variable.

ii. x(k), with x ( k ) n is the time dependent n-dimensional state vector whose components has the system’s state variables. These variables describe the process dynamics over discrete time.

iii. f is a nonlinear continuous function, f : n × m n that describes the relation between the state vector for two time instants.

iv. u ( k ) m is the system input or manipulated vector.

v. I is a convex function, I : n × m × + called the performance index designed by the control engineer.

vi. J is a convex function, J : n × m × + named the cost function designed by the control engineer.

vii. X is a bounded and closed set, X n .

viii. U is a bounded and closed set, U m .

ix. m is the control law or decision policy μ : n m , this function maps each state vector value with a control action u.

x. r and v are real value arrays of parameters r , v n + h + 2 , where h is determined by the control engineer.

xi. J ˜ is the approximation of the cost function J, and its domains includes the parameter vector r, J ˜ : n × m × n + h + 2 + .

xii. μ ˜ is a function whose behavior approximates the function m, includes the parameter vector v, μ ˜ : n × n + h + 2 m .

xiii. J * ( x ( k ) ) is the minimum cost to go from the state x at time k up to the terminal state at time N.

xiv. u o ( k ) m is the optimal control action at time k.

xv. ξ 1 , ξ 2 , , ξ h are real scalar values.

xvi. S ˜ data set of samples from the process under study.

xvii. C(i) is the cost associate to a control law evolving from the state i up to the terminal process state.

xviii. J ( i ) μ is the value of the cost to go function obtained after use the control law m starting at state i up to terminal state at time N.

xix. Ñ gradient operator.

xx. Q ( i , u ) , real valued function associated at state i and action u.

xxi. η n is a function that varies with iteration number n, bounded between 0 and 1.

xxii. Q ˜ ( i , u ) is the approximate version of the factor Q ( i , u ) .

xxiii. γ n is the discount factor, variable with iteration n and bounded between 0 and 1.

xxiv. μ ¯ control action expressed as look up table from every state.

xxv. J ˜ μ ( , r ) approximate cost to go function associated with the control law m.

xxvi. A n × n is the state matrix for the linear dynamic model.

xxvii. B n × 1 is the input matrix of the linear dynamic model.

xxviii. F n × n is the additive noise model at the state variables.

xxix. v ( k ) n is the random sequence with Gaussian distribution in each variable, zero mean and unit variance.

xxx. y ( k ) is the linear model output.

xxxi. C 1 × n is the linear model output matrix.

xxxii. G is the noise model at the measured variable.

xxxiii. w ( k ) is a white noise sequence with zero mean and unit variance.

xxxiv. δ is longitudinal displacement of the cart.

xxxv. δ ˙ is longitudinal velocity of the cart.

xxxvi. ϕ is the angle of the inverted pendulum bar.

xxxvii. ϕ ˙ is the angular velocity of the inverted pendulum bar.

xxxviii. MP is the cart concentrated mass, whose value here is 0.5 Kgr.

xxxix. mP is the bar concentrated mass, valued here is 0.1 Kgr.

xl. FP is the displacement friction constant assigned 0.1 N∙m−1∙s.

xli. lP is the size of the pendulum bar, 0.6 m.

xlii. gP is the standard acceleration due to gravity, 9.81 m∙s−2.

xliii. Q 4 × 4 is the weighing matrix for the state vector from k = 0 to k = N − 1 with N the terminal state time.

xliv. S 4 × 4 is the weighing matrix for the state vector at the terminal state time N.

xlv. R is the weighing matrix for the control action variable.

Thus, to formulate the optimal control problem the expressions of the process model in discrete time, the restrictions in the variables and the cost function to be minimized are presented. Next, the problem of minimizing the separable cost function is considered by

x ( k + 1 ) = f ( x ( k ) , u ( k ) , k ) , k = 0 , 1 , , N 1 (1)

where x(0) has a fixed value and the constraints must be satisfied together with the system equation,

J ( x ( k ) , u ( k ) ) = k = 0 N I ( x ( k ) , u ( k ) ) (2)

where the constraints on state and manipulated variables are

x X n , u U m . (3)

The function I(×) is defined by the control engineer which must be convex but not necessarily quadratic, and f(×) is the nonlinear relationship between instants k and k + 1 of the state and manipulated variables. Moreover, they are bounded and continuous functions of their arguments, and both x and u belong to closed and bounded subsets of Ân and Âm, respectively. Then, the Weierstrass theorem asserts that there exists a minimization policy also called control law. Therefore, it is desired to find a correspondence relation

μ ( x ( k ) ) : n m (4)

that makes evolve the processes modelled by (2) from any initial condition to the final terminal state x(N) satisfying constraints (3), and minimizing the cost function (1). The implementation is shown in Figure 3, where the flow of information between the controller and the closed-loop system is stated. Note that the behavior of the closed loop system is done by designing the performance index which is added at each stage in the cost function (1).

3. Proposed Solution

In order to solve the formulated problem, the proposed solution is by using dynamic programming and then approximations are introduced through functions

μ ˜ ( x ( k ) , v ) : n m , (5)

J ˜ ( x , u , r ) : n × m × N + (6)

where the parameter vectors v and r must be determined.

The procedure to solve the optimal control problem for both continuous and discrete time dynamic systems is well known [7] [8] [14] , and consists of analytically minimize the proposed cost function (1) and from this minimization achieve an expression for function μ. When the system is linear and the cost function is quadratic, the optimal control problem has unique solution through the Riccati Equation. However, when the system is nonlinear the solution of the Hamilton-Jacobi-Bellman equation [14] must be found, whose solution is restricted to a certain class of nonlinear systems. Here, an optimization principle to solve the same control problem that allows to use any cost function and respecting the constraints in the state variables and in the control variables in a natural way is used.

The principle of optimality [10] allows solving an optimization problem in

Figure 3. Implementation of the controller based on numerical dynamic programming.

which a dynamic process evolves over time through stages. Applying the principle of optimality in (1), we obtain

J * ( x ( k ) ) = min u ( k ) J ( x ( k ) , u ( k ) ) = min u ( k ) { I ( x ( k ) , u ( k ) ) + J * ( f ( x ( k ) , u ( k ) ) ) } , (7)

called the Bellman’s Equation. Therefore, the optimal control action uo will be

u o ( k ) = arg min u ( k ) { I ( x ( k ) , u ( k ) ) + J * ( f ( x ( k ) , u ( k ) ) ) } , (8)

which is the optimal policy of decisions or optimal control law. Note that J* does not depend explicitly on u(k), as shows Equation (8).

To obtain the control law or the decision policy, there exists numerical methods, [3] [4] [10] [11] and approximations [3] [5] [12] which are detailed below. Now, an approximation function for values of Equation (1) in a compact domain is introduced. Thus, a compact representation of the cost associated with each state of the process is obtained.

The approximation function incorporates a set of vectors of parameters r, which is defined as a partitioned vector whose structure defines the function structure,

r = { r 1 1 , r 1 2 , , r 1 h , r 2 } (9)

where each vector r1 has the same dimension, which is the number of inputs of the function plus one to consider a static scalar unit parameter. So, h intermediate scalar values ξ are computed as the scalar product between the input vector x and the corresponding parameters as

ξ 1 = [ x T 1 ] r 1 1 , (10)

ξ 2 = [ x T 1 ] r 1 2 , (11)

ξ h = [ x T 1 ] r 1 h , (12)

every single value are processed through the hyperbolic tangent function, avoiding large numbers by

f ( ξ ) = exp ( ξ ) exp ( ξ ) exp ( ξ ) + exp ( ξ ) = 1 2 1 + exp ( 2 ξ ) (13)

where the right side has only one exp(×) computation for improving calculation time. So, with these h values together with the polarization 1 the inner product is implemented with the rest of the r parameter vector which is r2, and must be consistent in its dimension to be able to perform the product

Stability Analysis of a Neurocontroller with Kalman Estimator for the Inverted Pendulum Case

comments powered by Disqus

Copyright © 2020 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.