^{1}

^{2}

^{3}

^{1}

^{2}

^{3}

This paper considers the design and practical implementation of linear-based controllers for a cart-type double inverted pendulum (DIPC). A constitution of two linked pendulums placed on a sliding cart, presenting a three Degrees of Freedom and single controlling input structure. The controller objective is to keep both pendulums in an up-up unstable equilibrium point. Modeling is based on the Euler-Lagrange equations, and the resulted nonlinear model is linearized around up-up position. First, the LQR method is used to stabilize DIPC by a feedback gain matrix in order to minimize a quadratic cost function. Without using an observer to estimate the unmeasured states, in the next step we make use of LQG controller which combines the Kalman-Bucy filter estimation and LQR feedback control to obtain a better steady-state performance, but poor robustness. Eventually, to overcome the unknown nonlinear model parameters, an adaptive controller is designed. This controller is based on Model Reference Adaptive System (MRAS) method, which uses the Lyapunov function to eliminate the defined state error. This controller improves both the steady-state and disturbance responses.

The nonlinear systems like the classic inverted pendulum have been widely used as a test bed in control laboratories to investigate the effectiveness of control methods on real systems [

The problem of controlling DIPC is separated into two stages: a swing-up control and a balancing control strategy [_{2} and H_{∞} optimization are utilized to overcome the uncertainties due to modeling imperfectness. In this paper we take the optimal solution as our baseline and try to have the least changes while passing from simulation to practical running by using an adaptive method to adapt the optimal gain against the upcoming uncertainties. The proposed approach is the so-called lyapunov-based MRAS adaptive control. Designing procedure in this method is simple and does not involve excessive computations, though easily track the uncertainties.

In order to design the adaptive controller, primarily we use the LQR method where, a quadratic performance criterion is considered for designing an optimal controller. It is proved that, this performance index can be minimized by a constant feedback gain matrix, which is the solution of Riccati equation [

We consider the disturbance response and steady-state behavior of the system as two factors to investigate the efficiency of LQR and adaptive controllers. In steady-state situation, DIPC acts almost as a linear system however, nonlinearities like stick-slip friction causing unwanted behaviors like limit cycle [

A schematic view of a mechanical DIPC system is depicted in Figure

Schematic of a DIPC.

According to the schematic depiction of DIPC system, the mathematical model is derived using the Lagrange method, assuming that there is negligible damping between mechanical parts [

Assuming that centers of mass of the pendulums are in the geometrical center of the links, which are solid rods, we have

The control system is designed to stabilize the pendulums in the up-up position. Therefore, the designed controllers are the regulatory type, which force the states to remain near zero. The controllers discussed in this paper are based on linear model.

To design a control law we introduce the state vector as

The Lagrange equations of motion (

The required linear model can be achieved by the linearization of above equation around

The linear system in (

In order to design an optimal control law,

It is proved [

An important issue on state feedback controllers is to obtain the states of the system in order to produce an input signal. But some states may not be available so that, some kind of an observer system is required to predict the states. This may be obtained by a pole placement procedure but another problem arises when our measurements and input signal(s) are infected with noises, then it would be a convergence problem using ordinary observer. In this case an optimal observer called

Suppose the noisy system is modeled as

Desired value of

The goal of the adaptive controller used in this paper for the DIPC system which follows a Model Reference approach, is to modify a feedback gain matrix,

It is desirable that the system

Naturally the next step is to define an error term to illustrate the efficiency of the adaptation task and then a Lyapunov function is introduced to stabilize the error dynamics [

To find a relation between adjustment of

Since

Ultimately, combining (

This shows an iterative adaptation:

The last step is to apply the discussed controllers to the practical system of DIPC. A constructed system is depicted in Figure

Block diagram of whole system.

Block diagram of whole system.

A primary issue to be regarded is obtaining the states of the system which, three of them already have been measured using incremental shaft encoders, but the rest, namely, the velocities of the parts are still absent. That is without using Tacho sensors; a derivation process is required to produce the rest of states which is a challenging task because of the quantized output of the position sensors. Except the LQG which uses an optimal estimator to produce the states, a direct difference approximation combined with prefilters (used for smoothing) is used in this paper, where a cut-off frequency for filtering is obtained by trial and error.

Linearized model parameters, that is,

To apply the LQR controller the weighting matrices,

For application of LQG controller we will introduce some remarks on effects of shaft encoders and process cycle on system. Incremental position sensors, using on-off optic method to produce the position data, provide limited resolution on output, namely, 0.1 degree in our case. This also appears on input section, providing resolution of approximately 0.01

And finally for implementation of adaptive controller, we consider the closed loop system obtained by LQR method on an ideal mathematical model, as a reference model. So

The adaptive controller by adjusting the feedback gain according to (

As discussed earlier, DIPC shows different nonlinear characteristics in steady-state and deviated situations, consequently using two separated adaptive controllers is rational. In steady-state situation, gently changing of system states implies that the convergence rate must be small. Thus the adaptation gain is chosen as

The practical results of applying discussed controllers on DIPC are depicted on Figure

Disturbance reponses of DIPC.

Steady-state behavior of DIPC.

Comparing adaptive controller with LQR, it is clear that adaptive controller especially for pendulums, has a shorter settling time. It is also possible to make this time even smaller by adjusting adaptation gain, but it may reduce the stability range of the system.

According to Figure

Excepting the LQG which has shown poor efficiency at all, the steady-state error of LQR is approximately twice the adaptive controller’s error for pendulums. Generally by taking into account both disturbance and steady-state responses, adaptive controller shows superior performance than LQR.

Three linear model-based controllers were designed and implemented in this paper. The LQG method also had a fantastic steady-state behavior but generally, it is not appropriate for controlling DIPC. The LQR method presenting an average efficiency was used as a baseline to demonstrate the advantages of adaptive controller.

DIPC intrinsically is a highly nonlinear system. Moreover, there are other unmodeled phenomena such as friction, motor nonlinearities, and belt elasticity. That affects the system behavior which is not considered in designing of LQR controller; however, detailed modeling of physical system is a laborious task. So, design of a model reference adaptive controller (MRAS) is carried out: initiating with LQR and adapting itself by time. This controller shows a satisfactory response in both steady-state and deviated conditions. It also uses less energy than the LQR in the real system. Moreover, by estimation of the optimized feedback gain, one may apply this gain directly to the system.

Ultimately, we will remark that, when DIPC is deviated from its linear region around up-up position, the intrinsic nonlinearities are dominant whereas around the linear region, other nonlinearities such as friction become important. This leads to the development of two independent adaptation processes for each steady-state and deviated conditions. Also an approach to obtain better results is to apply a dynamic adaptation gain, which results in a faster convergence rate of adjusted parameters and may be regarded as future task.

Equivalent mass of the cart system (0.71 kg)

Mass of first pendulum (0.35 kg)

Mass of second pendulum (0.2 kg)

Distance from a pivot joint to the first pendulum center of the mass (0.277 m)

Distance from a pivot joint to the second pendulum center of the mass (0.176 m)

Total length of first pendulum (0.4 m)

Total length of second pendulum (0.35 m)

Moment of inertia of first pendulum (0.0145 kg · m2)

Moment of inertia of first pendulum (0.007 kg · m2)

Wheeled cart position

First pendulum angle

Second pendulum angle

Control force

Gravity constant.