• Tidak ada hasil yang ditemukan

The linearized equations of motion for the rotary inverted pendulum system are as follows:

(Jr+mp`2rθ(t)−1

2mp`p`rγ¨(t) = T(t)−Brθ˙(t) (3.34a)

Jp +1 4mp`2p

¨γ(t)−1

2mp`p`rθ¨(t)−1

2mp`p(t) = −Bpγ˙(t), (3.34b) where `p, mp, and Jp are the pendulum’s length, mass, and moment of inertia with respect to its pivot;`r is the length of the rotary arm;Jr is the equivalent moment of inertia acting on the servo shaft;Bp and Br represent the viscous damping about the pendulum’s pivot and the servo shaft, respectively;g is the gravitational acceleration;

and T(t) is the torque applied to the rotary arm by the servo. The torque T(t) can be computed as follows:

T(t) = km Rm

Vm(t)− km2

Rmθ˙(t), (3.35) where km is the DC motor back-emf constant, Rm is the electrical resistance of the DC motor armature, and Vm(t) is the control input (voltage). The numerical values of these parameters are provided by Quanser [2] and are listed in Table 3.2. The linearized equations of motion for the rotary inverted pendulum system (Eq. 3.34) can be expressed in state-space form:

˙

x(t) = Ax(t) +Bu(t) (3.36a)

u(t) = −KTx(t), (3.36b)

Table 3.2: Parameter values for the rotary inverted pendulum apparatus [2].

Parameter Value Units

`p 0.129 m

`r 0.085 m

mp 0.024 kg

Jp 3.32820×105 kg m2 Jr 5.71979×105 kg m2

Bp 0 N m s/rad

Br 0 N m s/rad

Rm 8.4 Ω

km 0.042 V s/rad

g 9.81 m/s2

where x,hθ(t), γ(t)˙(t)˙(t)iT,u(t),V(t), andA and B are given as follows:

A =

0 0 1 0

0 0 0 1

0 149.2751 −0.0104 0 0 261.6091 −0.0103 0

, B=

0 0 49.7275 49.1493

. (3.37)

The controller samples at a rate of 500 Hz; thus, the system has an inherent delay of 2 ms. We begin by controlling the rotary inverted pendulum system without introducing any additional delays. We use feedback gains K = [−2,30,−2,2.5]T, which are provided by Quanser for the balance control exercise [129]. The steady- state response of the physical system is shown in Fig.3.9. The system is stable about its vertical equilibrium (γ = 180°) and recovers from an external disturbance.

0 10 20 30 40 50

175 180 185 190

0 10 20 30 40 50

-10 0 10 20

Figure 3.9: Stable response of the inverted pendulum (γ) and rotary arm (θ) with inherent delay of 2 ms and feedback gainsK= [−2,30,−2,2.5]T. An external

disturbance is applied between 13 and 23 seconds.

We now introduce an additional sensing delay τ, resulting in the following state- space representation of the rotary inverted pendulum system:

˙

x(t) =Ax(t) +Bu(tτ), (3.38) where A and B are given by Eq. 3.37. We first assess the stability of the system using the proposed pseudoinverse-based Galerkin method, then verify our predictions

experimentally. The real component of the rightmost roots of the system are shown in Fig. 3.10 as functions of delay τ, using the same feedback gains Kas above.

0 5 10 15 20

-15 -10 -5 0 5

Figure 3.10: Variation of the rightmost roots of Eq.3.38 with respect to delayτ using feedback gainsK= [−2,30,−2,2.5]T. The critical delay isτ = 9.76 ms.

The critical delay is the delay at which the system will become unstable; as shown, the simulations indicate a critical delay ofτ = 9.76 ms. As shown in Fig.3.11, the four rightmost characteristic roots of Eq. 3.38 lie in the left half of the complex plane whenτ = 5 ms, indicating that the system is stable; whenτ = 10 ms, two roots are in the right half of the complex plane and the system is unstable.

(a) (b)

-10 -5 0

-50 0 50

-10 -5 0

-50 0 50

Figure 3.11: Rightmost characteristic roots of Eq. 3.38 with delay (a) τ = 5 ms and (b)τ = 10 ms, using feedback gains K= [−2,30,−2,2.5]T.

We validate experimentally by deliberately introducing additional delay into the feedback controller, in increments of 0.5 ms. The physical system remained stable when delays of up to 7.5 ms were introduced (Fig.3.12(a)) and was unstable with an additional delay of 8 ms (Fig.3.12(b)).

(a) (b)

0 10 20 30 40 50

178 180 182

0 10 20 30 40 50

-4 -2 0 2

0 10 20 30 40

-1000 0 1000

0 10 20 30 40

-200 0 200

Figure 3.12: System response of the inverted pendulum (γ) and rotary arm (θ) using feedback gainsK = [−2,30,−2,2.5]T, with total delay of (a)τ = 2 + 7.5 =

9.5 ms–stable response and (b)τ = 2 + 8 = 10 ms–unstable response.

Thus, when added to the inherent delay of 2 ms, the physical system exhibited a critical delay of between 9.5 and 10 ms, which is in agreement with the predicted critical delay ofτ = 9.76 ms.

We now stabilize Eq. 3.38 with delay τ = 10 ms using the pseudoinverse-based Galerkin method and the procedure described in Section 3.1. We set α =α0 = 1 in the objective function (Eq.3.2) and solve the minimization problem using the Nelder–

Mead algorithm in MATLAB via thefminsearch function. We repeat the optimiza- tion procedure, increasing α by δα = 1 each iteration, until the real component of the rightmost pole is unable to reach −α. In this case, the algorithm terminates at α = 6, where the objective function value is J = 0.000222, the optimal feedback gains are K = [−2.3443,31.3406,−1.1797,2.7717]T, and the rightmost pole location is Re(λmax) = −5.9851. As shown in Fig. 3.13, the physical system is stable when a delay of 10 ms is introduced deliberately (producing a total delay of τ = 12 ms) and recovers from an external disturbance. As shown, the system is robust to exter- nal disturbances even without controlling the frequency of oscillations induced by the optimal feedback gains.

0 10 20 30 40 50 178

180 182

0 10 20 30 40 50

-10 0 10

Figure 3.13: Stable response of the inverted pendulum (γ) and rotary arm (θ) with total delay of τ = 2 + 10 = 12 ms and optimal feedback gains K = [−2.3443,31.3406,−1.1797,2.7717]T. An external disturbance is applied between

12 and 27 seconds.

The pseudoinverse-based Galerkin method predicts a critical delay ofτ = 17.7 ms when using the optimal feedback gains K computed above (Fig.3.14).

0 5 10 15 20

-15 -10 -5 0 5

Figure 3.14: Variation of the rightmost roots of Eq. 3.38 with respect to delay τ using optimal feedback gains K = [−2.3443,31.3406,−1.1797,2.7717]T. The

critical delay isτ = 17.7 ms.

We again validate this result experimentally by deliberately introducing addi- tional delay into the feedback controller, in increments of 0.5 ms. The physical system remained stable when delays of up to 15 ms were introduced (Fig. 3.15(a)) and was unstable when this delay was increased to 15.5 ms (Fig. 3.15(b)).

(a) (b)

0 10 20 30 40 50

150 180 210

0 10 20 30 40 50

-50 0 50

0 5 10 15 20 25

-2000 0 2000

0 5 10 15 20 25

-200 0 200

Figure 3.15: System response of the inverted pendulum (γ) and rotary arm (θ) using optimal feedback gainsK = [−2.3443,31.3406,−1.1797,2.7717]T, with total delay of (a) τ = 2 + 15 = 17 ms–stable response and (b) τ = 2 + 15.5 = 17.5 ms–

unstable response.

Thus, when added to the inherent delay of 2 ms, the physical system exhibited a critical delay of between 17 and 17.5 ms, which is within 1–4% of the predicted critical delay of τ = 17.7 ms. The pseudoinverse-based Galerkin method provided a simple and reliable means of predicting and optimizing the stability of the rotary inverted pendulum system.