^{1}

^{*}

^{1}

^{*}

^{1}

^{1}

The inverted pendulum is a classic problem in dynamics and control theory and is widely used as a benchmark for testing control algorithms. It is unstable without control. The process is non linear and unstable with one input signal and several output signals. It is hence obvious that feedback of the state of the pendulum is needed to stabilize the pendulum. The aim of the study is to stabilize the pendulum such that the position of the carriage on the track is controlled quickly and accurately. The problem involves an arm, able to move horizontally in angular motion, and a pendulum, hinged to the arm at the bottom of its length such that the pendulum can move in the same plane as the arm. The conventional PID controller can be used for virtually any process condition. This makes elimination the offset of the proportional mode possible and still provides fast response. In this paper, we have modelled the system and studied conventional controller and LQR controller. It is observed that the LQR method works better compared to conventional controller.

Inverted pendulum is one of the most difficult systems to control in the field of control engineering, because it is a non-linear as well as an unstable system. It provides a platform to test various control techniques and is used to simulate experiments such as walking robots, missile guidance and flying objects in space. To design a control system that keeps the pendulum balanced and tracks the cart to a commanded position, the conventional PID controller is still used in industries, because of its simple in control structure, not too expensive and elective for a linear system. The conventional PID controller can be used for virtually any process condition. This makes elimination the offset of the proportional mode possible and still provides fast response.

Generally, all systems are initially checked with conventional controllers including P, PI, and PID [

In Section 2, the problem is identified and defined. In Section 3, a detailed description about the experimental setup and system modelling is given. Section 4 describes about the designing of PID controller and LQR controller for the system. In Section 5, the simulation results are compared and Section 6 contains conclusion.

The problem of controlling an inverted pendulum is to balance the pendulum in its upright position by moving the arm in opposite direction. The control output is limited by several constraints like the speed of motor controlling the arm. In this study, simulation of control in inverted pendulum system has been carried out using MATLAB and Simulink software.

A Quanser rotary inverted pendulum which we used for modelling is shown in

The horizontal movement of the arm and the pendulum vertical position angle are measured by optical encoder. The encoders produce 4096 pulses for revolution, which gives a very reasonable precision in measurement. The arm motion is actuated by a DC motor. The DC motor is controlling the rotary motion of the arm. Encoder is used to feedback the angular position of the pendulum to servo electronics to generate actuating signal. The controller circuits provide the controlling signal which then drives the arm through the servomotor. Rotary motion of the arm applies moments on the inverted pendulum and keeps the pendulum upright.

To model the inverted model we consider a much more simplified model as shown in

The kinetic and potential energies are given by the following equations:

where J_{p}_{ }and M_{p} are arm inertia and pendulum mass respectively. Applying Lagrangian formula for the equations the state space model is obtained

Substituting the known values in the equations we obtain the state space model of the system. The new state description of the system with voltage as input is given below:

The transfer function model of the system obtained is given as:

In this section, the LQR controller and PID controller design is discussed, also the controller design using MATLAB and Simulink is discussed in this section

PID controller is the most widely used controllers for industrial applications [

where K_{p}, K_{i}, K_{d} are proportional, integral and derivative gains respectively which are the tuning parameters used to design a PID controller. We used the transfer function model of the system to design a PID controller in Simulink. The Simulink model of the PID controller is given in

The values of tuning parameters K_{p}, K_{i}, and K_{d} are 516.35, 431.787 and 61.63 respectively.

In this section, an LQR controller is developed for the inverted pendulum system. The LQR method uses the state feedback approach for controller design. As discussed, the system is expressed in state variable form as

Using this control closed loop system becomes _{c} the closed loop plant matrix and v(t) the new command input. C and D matrices are not used in the SVFB design.

To design an optimal SVFB we may define a performance index.

Substituting the SVFB we yields

We assume v(t) as zero as our only concern is internal stability of the system. The objective is to select the K that minimizes the performance index J. Q and R must be selected to be positive semi-definite and positive definite in order to minimize J. The feedback gain matrix K in LOR is solved using the equation

The design procedure for finding the feedback gain K for LQR can be formulated to 3 simple steps:

・ Select the design parameter matrices Q and R.

・ Find P by solving the ARE.

・ Find the state feedback matrix K using

The LQR guarantees pole placement and stability to the closed loop system as long as two LQR theorems [References] hold:

LQR theorem 1

Let the system (A, B) be reachable. Let R be positive definite and Q be positive definite. Then the closed loopsystem (A-BK) is asymptotically stable.

LQR theorem 2

Let the system (A, B) be stabilizable. Let R be positive definite, Q be positive semi definite, and

The SVFB gain K is found using lqr command in Matlab and this gain is given in the Simulink model to obtain the outout.

The value of Q matrix which gave the best pole placement was [100 0 0 0; 0 1 0 0; 0 0 200 0; 0 0 0 1] and R matrix was selected as [

The value of K derived is [−10.0000 719.0337 −17.8791 129.8297].

The PID and LQR controller performance for the system is simulated MATLAB Simulink. Q and R values are selected based on fine tuning by trial and error method. Responses of both the systems are studied with a square wave as input. The results of both the controllers are discussed in this section.

The response of the system with PID controller is shown in

The LQR controller gives a much stable and robust response for the system. The response of the system with LQR controller is given in

There is a considerable reduction in overshoot and settling time with the LQR controller. The response is more stable and robust.