Keywords

1 Introduction

An inverted pendulum is essentially a system with pendulum upright, in other word with the center of mass above its pivot point. All mechanical systems characterized by an unstable equilibrium point have a behavior that can be identified as an “inverted pendulum”; basically they are under-actuated systems in which the inputs are less than the degrees of freedom. The stability of human body, motorcycles, bicycles and aircrafts is based on the inverse pendulum principle. The interest on inverted pendulum based systems is still of great actuality and has always been appealing for researchers due to the implications in control and mechanical engineering: new control methods and solutions explore different actuation systems and new applications.

For this reasons researchers and engineers have been applying the idea of an inverted pendulum and the technology derived by an unstable system to several applications, like walking gaits for humanoid robots, autonomous robot and transport systems. The most known are the Segway, a two-wheeled self-balancing system [1], and the self-balancing unicycle [2], conceived for human transportation. Motion and stability of these systems are controlled by gyroscopes, tilt sensors, accelerometers and electric motors. The idea of autonomous robot based on an inverted pendulum has found a lot of interest in many researches in the last recent years. Many efforts have been carried out to achieve the balance and stability of the system with the use of various control architecture and optimization techniques: pole placement and linear quadratic regulator (LQR) [3,4,5,6,7], PID and Kalman filter [8, 9], gain scheduling [10], fuzzy logic [11, 12] and neural network [13]. The most common solution used to actuate the pendulum is the electric one. The most employed controllers are PID in various declination: one or more parallel PIDs or a double PID + LQR controller are studied and analysed in [14, 15]. Linguistic model and fuzzy logic controllers have been applied to an inverted pendulum since 1989 and ever since has continued to be a very effective method of control [16, 17]. Recent studies involve pneumatically actuated inverted pendulum. Pneumatic solutions are characterized by lower bandwidth respect to electric solutions, moreover they have by a high non linear behavior associated to the compressibility of air; the latter plus discontinuity and uncertainties in friction increase the difficult in stabilizing the pendulum. Given that pneumatics has favorable costs respect to electric technology, positive outcomes of these studies would have a quite good impact on the economics of these systems. To this aim, an inverted pendulum driven by pneumatics was studied in [18]. The test set-up involved a rod-less pneumatic cylinder controlled by a proportional directional 5/3 valve. PD compensator was proposed and a model-based linear state-variable feedback controller was designed applying LQR optimal design. As a first analysis, the dynamics of the pneumatic system has been simplified as a first order system. Satisfying results were obtained in keeping upright the position of the pendulum. A similar pneumatic test rig was proposed and studied in [19]. LQ and LQG feedback controllers were developed and experimental results shown a good stabilization around the upright position even though a little oscillatory motion cannot be completely nulled; the use of a friction compensator in addition to the above mentioned linear state feedback controllers reduced the undesirable effects of stick-slip. In [19] the authors introduced the idea of controlling the force acting on the pneumatic cylinder to achieve a robust control strategy. The latter consisted of two feedback loops: the inner one, the just mentioned force controller plus a friction compensator, whereas the outer loop for the pendulum position and angle control was based on a full state feedback controller. The cylinder was powered by a proportional directional 5/3 electro-valve. Results of the simulation showed a quite good ability of the strategy to control both position and angle of the pendulum in the stable upright condition. Though previous studies have demonstrated that good positioning accuracy and low positioning times can be obtained with pneumatic systems, they were achieved with expensive proportional control valves that provided an air flow proportional to a variable control signal. To this aim [20] deal with the on-off control of an inverted pendulum actuated with a pneumatic cylinder, the valve is a common low cost on-off electro-valve, 4 ports 3 positions directional spool valve. Simulation and experimental tests were performed by applying both conventional relay and pulse-width-relay driven by an LQR control law. Results showed the good ability to catch the pendulum in the upright position and confirmed the best performances obtained by the pulse-width relay method, even though a drift in the position of the cart or oscillation were observed. LQR law needs a careful selection of the weighing matrices and not lose the pendulum as the cart reaches its limit position. However, the question of whether it is possible to adopt low cost pneumatic drives for controlling an inverted pendulum still remains a challenging task.

To this aim, this paper investigates the potential of pneumatic actuation with low cost pneumatic components and digital valves driven with PWM technique; a double acting pneumatic cylinder and on-off 2/2 valves are used. The control is organized into three nested control loops: the inner one controls the force actuated by the pneumatic cylinder and the two outer loops control the angular position of the pendulum and the linear position of the cart. Model-based controllers were designed by linearizing the systems equations and applying the pole-placement method. Simulations were applied on the whole system and first result about the stabilization of the pendulum position are here presented.

2 The Model

2.1 The Mechanical System

The inverted pendulum mounted on the cart is depicted in Fig. 1. The cart is moved of displacement x, while the pendulum is inclined of angle θ.

Fig. 1.
figure 1

Sketch of the mechanical system of the inverted pendulum mounted on a cart

The dynamic equations of the two dofs system are:

$$ \left\{ {\begin{array}{*{20}c} {F = \left( {m_{p} + m_{s} } \right)\ddot{x} + m_{p} l\ddot{\vartheta }\,\cos \vartheta - m_{p} l\dot{\vartheta }^{2} \,\sin \vartheta } \\ {m_{p} l^{2} \ddot{\vartheta } + m_{p} l\ddot{x}\,\cos \vartheta - m_{p} gl\,\sin \vartheta = 0} \\ \end{array} } \right. $$
(1)

where mp is the pendulum mass, concentrated at distance l from the hinge, ms the mass of the cart, F is the external force applied on the cart.

This system is linearized around the vertical position (\( \vartheta = 0 \)), under the hypothesis of negligible speed (\( \dot{\vartheta } = 0 \)). Under these assumptions, Eq. (1) simplify into

$$ \left\{ {\begin{array}{*{20}c} {F = \left( {m_{p} + m_{s} } \right)\ddot{x} + m_{p} l\ddot{\vartheta }} \\ {m_{p} l^{2} \ddot{\vartheta } + m_{p} l\ddot{x} - m_{p} gl\vartheta = 0} \\ \end{array} } \right. $$
(2)

and it is possible to obtain the transfer function \( G_{\vartheta /F} \) between force F and the pendulum inclination \( \vartheta \) and the transfer function \( G_{x/\vartheta } \) between the pendulum inclination \( \vartheta \) and displacement x:

$$ G_{\vartheta /F} \left( s \right) = \frac{\vartheta \left( s \right)}{F\left( s \right)} = \frac{ - 1}{{m_{s} ls^{2} - g\left( {m_{p} + m_{s} } \right)}} $$
(3)
$$ G_{x/\vartheta } \left( s \right) = \frac{x\left( s \right)}{\vartheta \left( s \right)} = - \frac{{m_{s} ls^{2} - g\left( {m_{p} + m_{s} } \right) + m_{p} g}}{{m_{s} s^{2} }} $$
(4)

2.2 The Pneumatic Actuation System

Figure 2 shows the scheme of the pneumatic actuation. The front and rear chambers of a double-acting cylinder are fed by 4 digital valves driven with pulse width modulation (PWM) technique. According to this technique, the input voltage reference Vref is converted into a digital VPWM signal with pulse duration proportional to the reference. The pulses are sent to the solenoids of the valves to ensure a proportional control of the flow rate. For each chamber, two normally closed two ways two positions (2/2) valves are used. In order to simplify in the linearized model an equivalent configuration of the digital valves is considered, which takes into account one three-ways/two-positions (3/2) proportional valve for each chamber of the cylinder [21].

Fig. 2.
figure 2

Sketch of the pneumatic actuation system with four digital valves

In static condition, the conductance of the valve is proportional to the opening section and therefore to the input signal Vref.

To take into account the dynamic phenomena associated to the opening/closing times of the valve and to capacitive effects of the volumes internal to the valve, a second order transfer function is considered between the input signal and the capacitance.

According to [21] the air flow through the valves is linearized around the reference working point r. For the supply valve, subsonic flow is assumed, with supply pressure ps upstream and pressure p1,r downstream:

$$ G_{1} = \frac{{\rho_{N} C}}{1 - b}\left( {p_{s} - p_{1,r} } \right) $$
(5)

where \( \rho_{N} \) is the air density in normal conditions, b is the critical pressure ratio and C is the valve conductance. For the discharge valve, sonic flow is assumed, with pressure p1,r upstream and ambient pressure downstream:

$$ G_{1} = \rho_{N} Cp_{1,r} $$
(6)

Expressions (5) and (6) are written for the rear chamber 1 and similar expressions are written for chamber 2, assuming that both valves are equal.

About the pneumatic cylinder, writing the continuity equation in the chambers and considering a polytropic expansion of air, it is possible to obtain the non-linear expressions of the input flows in the chambers. Linearizing around the reference point, characterized by null displacement x (middle position), null speed \( \dot{x} \), pressures p1,r and p2,r in the rear and front chambers respectively, the expressions of the mass flow rate G1 and G2 in the rear and front chambers becomes:

$$ G_{1} = \frac{{P_{1i} A_{1} }}{{RT_{1i} }}\left( {\frac{{P_{1,r} }}{{P_{1i} }}} \right)^{{\left( {1/n} \right)}} \frac{dx}{dt} + \frac{{V_{m1} + A_{1} x_{sc} }}{{nRT_{1i} }}\left( {\frac{{P_{1,r} }}{{P_{1i} }}} \right)^{{\left( {\frac{1 - n}{n}} \right)}} \frac{{dP_{1} }}{dt} $$
(7a)
$$ G_{2} = - \frac{{P_{2i} A_{2} }}{{RT_{2i} }}\left( {\frac{{P_{2,r} }}{{P_{2i} }}} \right)^{{\left( {1/n} \right)}} \frac{dx}{dt} + \frac{{V_{m2} + A_{2} x_{sc} }}{{nRT_{2i} }}\left( {\frac{{P_{2,r} }}{{P_{2i} }}} \right)^{{\left( {\frac{1 - n}{n}} \right)}} \frac{{dP_{2} }}{dt} $$
(7b)

where Vm1 and Vm2 are the dead volumes of the chambers, xsc is the half stroke of cylinder, A1 and A2 the sections, n is the polytropic expansion coefficient, R the gas constant, P1i, P2i, and T1i, T2i are the pressures and temperatures in the respective chambers in the initial condition.

The equilibrium equation of the cylinder rod is given by

$$ p_{1} A_{1} - p_{2} A_{2} - p_{amb} \left( {A_{1} - A_{2} } \right) - \beta \dot{x} - m_{s} \ddot{x} - F = 0 $$
(8)

where pamb is ambient pressure, β is the viscous friction coefficient, F the force acting externally on the cylinder rod, ms is the mass of the cart, included the mass of the cylinder rod.

2.3 The Control System

The basic architecture to control the system is shown in Fig. 3, where are visible the closed loop for the control of the pendulum inclination \( \vartheta \) inside the closed loop for the control of the cart position x, as proposed in [22]. Starting from this architecture, a third inner loop to control the force has been added between compensator \( C_{\theta } \) and transfer function \( G_{\theta /F} \), see Fig. 4. Gains KTX, K and KTF are referred to the position, angular and force transducers respectively.

Fig. 3.
figure 3

Basic architecture of the control system without force control

Fig. 4.
figure 4

Architecture of the force closed control system

Transfer function GF is calculated on the base of linearized equations of the pneumatic system. Its expression is the following:

$$ G_{F} \left( s \right) = \frac{{K_{v} \sigma_{n}^{2} }}{{s\left( {s^{2} + 2\xi \sigma_{n} s + \sigma_{n}^{2} } \right)}}\frac{{2AK_{1} }}{{R_{f} C_{p} s + 1 + K_{1} C_{p} }} $$
(9)

where K1 is

$$ K_{1} = \frac{{RT_{i} }}{{V_{m} + Ax_{sc} }} $$
(10)

Kv is the static gain of the valve, Rf is the resistance of the fitting in the cylinder ports, Cp is the capacitance of the pipe. In formulas (910) the two sections of the cylinder are assumed equal as well as the temperatures and the dead volumes of the chambers. Stability analysis is carried out on the linearized system by selecting a proper compensator CF for the force closed loop.

3 Results and Discussion

3.1 Stability Analysis of Inner Loop

The inner loop for the control of the pendulum inclination is considered and a stability analysis is carried out in order to obtain a suitable compensator \( C_{\vartheta } \). The open loop transfer function \( G_{ol\vartheta } \) is defined as

$$ G_{ol\vartheta } \left( s \right) = C_{\vartheta } \left( s \right)K_{TF} G_{clF} \left( s \right)G_{\theta /F} \left( s \right)K_{T\vartheta } $$
(11)

Where \( G_{clF} \left( s \right) = \frac{F\left( s \right)}{{V_{Fset} \left( s \right)}} \) is the transfer function between the reference force signal and the force, see Fig. 4. By choosing properly the compensator \( C_{\vartheta } \), the following stability margins are obtained, visible in the left of Fig. 5.

Fig. 5.
figure 5

Stability margins of open loop transfer functions \( G_{ol\vartheta } \) (left) and \( G_{olx} \) (right)

3.2 Stability Analysis of Outer Loop

The outer loop for the control of the cart position is considered and a stability analysis is carried out in order to obtain a suitable compensator Cx. The open loop transfer function Golx is defined as

$$ G_{olx} \left( s \right) = C_{x} \left( s \right)k_{T\vartheta } G_{cl\theta } \left( s \right)G_{x/\vartheta } k_{Tx} $$
(12)

where \( G_{cl\theta } \left( s \right) = \frac{\vartheta \left( s \right)}{{V_{\vartheta set} \left( s \right)}} \). By choosing properly the compensator Cx, the following stability margins are obtained, visible in the right of Fig. 5. Both compensators \( C_{\vartheta } \) and Cx are lead type, as suggested in [22].

3.3 Non-linear Model

A non-linear model based on Simulink has been developed in order to verify the stability of the system in the non-linear case. The compensators obtained from the linear stability analyses are inserted in this model. In this case, the system configuration includes four digital valves driven with a PWM signal as shown in Fig. 2.

The response to a step signal Xset of amplitude 100 mm at t = 0.5 s is shown in Fig. 6, where displacement x and angle \( \vartheta \) are reported vs time. The initial conditions are x = 0 and \( \dot{x} = 0 \). It can be noted that before moving the cart in the positive direction, it is necessary to incline the pendulum in this direction. To do this, initially it is necessary to move the cart backwards.

Fig. 6.
figure 6

Non-linear model: response to a step signal Xset

4 Conclusions

In this paper the model of an inverted pendulum pneumatically actuated is shown. The stability analysis of the linearized model has been carried out in order to set proper lead type compensators. The non-linear analysis shows the good performance of the system and the ability of the pneumatic actuation system in stabilizing the pendulum. This demonstrates the ability of pneumatic technology in performing such a duty and opens new perspective for low cost pneumatic components in different sectors. Future analyses will be devoted to study the effect of disturbances and develop an experimental set up for the model validation.