Stability analysis of a pneumatically actuated inverted pendulum

. This paper deals with the stabilization of an inverted pendulum on cart; the latter is pneumatically actuated by a double acting cylinder controlled by low cost proportional valves. In particular, a numerical model of whole system is developed in order to find the ability of the pneumatic actuation in stabilizing the pendulum and evaluate its bandwidth. A cascade of two control loops (the inner one for the pendulum angle, the outer one for the cart displacement) are analyzed and proper compensators are defined. The possibility of introducing an additional loop to control the force exerted by the actuator on the cart is evaluated.


Introduction
Majority of the inverted pendulum based applications belong to the field of human transportation such as self-balancing scooters [1], unicycles [2] or electric motorbikes [3]; recently many solutions have grown in the version of "autonomous robots" [4][5][6].The inverted pendulum still remains an interesting system for didactic use or to test new control types; to this aim papers focused on different architectures and control strategies [7,8] can be found.Moreover, applications in the field of biomechanics are quite interesting and challenging; in particular, the gait modelling and stability of biped robots [9] and postural exoskeleton balancing [10] are based on inverted pendulum models.Most of the applications make use of electric actuators, appreciated for their high bandwidth.Anyway, some others make use of pneumatic technology [11][12][13][14], which presents some advantages such as the low cost and bandwidth sufficient to obtain stabilization.In [11] a low cost pneumatic actuator is used to control the system, together with potentiometers that measure the linear and angular displacements of cart and pendulum respectively.The control is implemented on a notebook equipped with a PCMCIA card.In [12] an inner loop controlling the actuating force of a pneumatic cylinder was studied, while position and angle were controlled in an outer loop.A friction estimator offsets the control signal for the force control to compensate for friction.However the work is purely numerical.
The authors have already designed and manufactured a prototype of inverted pendulum mounted on cart and pneumatically actuated.The architecture of the system is described [13,14].Four proportional valves were used to supply the double-acting cylinder and potentiometers are employed to feedback the displacement signals; in particular, in [14] a common industrial logic controller (PLC) was used to control the pneumatic servosystem.
In this paper, the numerical model of the pneumatic system is detailed and various compensators are designed in order to achieve good stability margins and bandwidth.A cascade of two control loops (the inner one for the pendulum angle, the outer one for the cart displacement) is analysed and stability is discussed.The possibility of introducing an additional inner loop (third loop) to control the force exerted by the pneumatic cylinder is also evaluated and discussed.

Mathematical model
The inverted pendulum on cart is described by equations (1), (2) which represent the rotational and translational equilibrium:  sin  −  ̈+ ̈cos  = 0 (1) The pneumatic cylinder is modelled considering the equilibrium equation ( 5) and the mass balance equations (6,7) for the two chambers (rear chamber A and front chamber B).Friction force in pneumatic actuators depends on many factors such as velocity, chambers pressure, greasing conditions, material and shape of the seals [15], which can lead to complex friction models.For the scope of this analysis, a classical viscous friction model was employed.
where  0 and  0 are the air density and pressure in reference conditions.The air flow through the valves is given by where   = √/ 0 is the temperature ratio, b the critical ratio and C the valve conductance, ∆ is the pressure difference between chambers.The pressure difference on the supply valve is ∆=ps-p and ∆=p-pa on the discharge valve, where ps is the supply pressure and pa is the ambient pressure, while p is the pressure in chambers.
The proportional valves model is linearized around the operating point defined by (ps+pa)/2.Neglecting the opening time of the valve, this expression results to be proportional to the command signal u to the valve: Input signal u can change in range -1<u<1; positive/negative values refer to outward/backward cylinder motion.
From relations (3) to (9) Moreover, the relationship between the force F available in output from actuator and variables u and x is made explicit, where the cart position is assimilated to a disturbance variable and u is the input variable: where 

Control architecture
The control is aimed at controlling the pendulum angle and the cart position in the set point reducing to zero the error between set and feedback.The control on x is necessary as the cylinder stroke is limited to ±250 mm. Figure 1   As an alternative to this scheme, a further loop is introduced to control the force F exerted by the cylinder on the cart.The new architecture is depicted in Figure 2. In this case, a load cell is inserted between cylinder and cart.The eventual advantages of introducing this loop are discussed here below.

The regulators
Referring to Figures 1 and 2, transfer functions   ,   ,   are the regulators of displacement, angle and force loops respectively.The regulators designed are the filtered PID (with first order filter on the derivative part) and the filtered PD.The first one assumes the following form: where   ,   ,   are the proportional, integral and derivative gains, while   is the filter time constant.The second one lacks of the integral part and is equivalent to a phase lead compensator.
For the angle loop, compensator   was found to be of PIDf type.For the position loop, two alternatives compensators   were designed: a PIDf and a PDf.

Results and discussion
A stability analysis of the linearized system is performed around the operating point, characterized by x =0,  =0.
The compensators of the control architecture of Figure 1 were designed with Matlab pid Tuner toolbox considering the following constraints: a) the crossover frequency of the inner angle loop was fixed to 10 rad/s; b) the crossover frequency of the displacement outer loop was fixed to 1 rad/s; c) the minimum phase margin of both loops was set to 50°.Stability was verified both using the Nyquist criterion and analysing the sign of the closed loop transfer function roots.The performance of the controlled system is evaluated with the response to a displacement step.Figures 3a-3b show the cart displacement and the pendulum angle after a 100 mm step, considering the designed compensators   .The settling time, evaluated to reach 2% of the static value, is 13.9 s and 13.6 s for the PDf and the PIDf respectively, while the overshoot is 14.2% and 15.5% respectively.In both cases the angular oscillations is limited in range ±2°, see Figure 3b.

Control architecture 2: force F, angle 𝜽 and displacement 𝒙
The force control is based on eq.(11), which describes the dependency on , assimilated to a disturbance, and input signal u.The block diagram of Figure 4 depicts the force loop which have been considered to design compensator   .
Eq. ( 13) defines the disturbance transfer function between  and F, while eq.( 14) expresses it in the normalized form.
where   ≅ 33,5 /   ≅ 0,63 .These parameters are only function of physical parameters of the system.The closed loop transfer function is while the open loop transfer function (see Figure 4) is The system stability is assured as the phase is always beyond -90°.Considering constant Fset, the variation of F due to a variation of disturbance x is expressed by while the disturbance stiffness is defined as the inverse function: It is important to have a high disturbance stiffness in order to have a negligible influence of the disturbance on the controlled variable.Figure 5 shows the Bode diagram of the disturbance stiffness: introducing the controller, it is clear that it remains high in a wide frequency range, sufficient to cover the frequency of variation of displacement x.It gives wide stability margins and a crossover frequency higher than 100 rad/s.Compensators   e   are also reported in Table 2.The settling time, evaluated to reach 2% of the static value, is 12.1 s and 12.7 s for the PDf and the PIDf compensators respectively, while the overshoot is 13.5% and 17.2% respectively.In both cases the angular oscillations is limited in range ±2°, see Figure 6b.

Comparison
In both control architectures the two proposed sets of compensators don't really differ.In architecture 2 (with the force loop) the settling time is a little smaller (-6,6%) considering the same type of compensator   .Nevertheless, to have a more complete analysis of the comparison between the two architectures, a non-linear control system should be considered and experimental tests should be carried out.

Conclusions
Control architectures to stabilize a pneumatically actuated inverted pendulum were described in this paper and proper PD and PID compensators are designed.Cascade controls with two or three loops were considered to control the actuator force, the pendulum angle and the displacement.Both architectures allow the pendulum to be stable.In particular, the use of an additional internal force loop seems to be not so favorable in terms of transient response (settling time) compared to the cost needed for the force transducer.In order to further investigate and compare these solutions, a non-linear analysis will be carried out together with experimental tests.

Nomenclature
outlines the block diagram of the control architecture, which consists of a cascade of two loops to control angle  (inner loop) and position x (outer loop).

Fig. 1 .
Fig. 1.Control system architecture only with  and  controlled.

Fig. 3 .
Fig. 3. Response to a step displacement with two different compensators   , (a) cart position and (b) pendulum angle.

Fig 4 .
Fig 4. Control loop of the controlled variable .

Figure 6 Fig. 6 .
Figure6shows the response to a 100 mm displacement step in terms of cart position and pendulum angle obtained with two different compensators   .

Control architecture 1: angle 𝜽 and displacement 𝒙Table 1 .
Compensators of x and  loops

Table 2 .
Compensators of x and  loops in case of force control 0 : dead volumes of cylinder ( 3 )   : friction coefficient between cart and basement (/ )   : friction coefficient in cylinder (/)