Вы находитесь на странице: 1из 12

CONTROL AND INSTRUMENTATION 1

ENGT5145 CONTROL AND INSTRUMENTATION

ROTARY INVERTED PENDULUM SYSTEM, REPORT BASED ON LABORATORY WORK.


ABSTRACT

An inverted pendulum system is an experiment that consists of a link rotating vertically on a plane. This report
is about an experiment carried out on an inverted pendulum system, its functions and the general overview of
its functionality.

It also describes the process of building a Simulink model of an inverted pendulum, the description and
analysis of the open-loop systems simulation.

The report also describes the linearization process around the pendulum angle as performed in Matlab, with
the process of designing a full feedback controller that is based on the linearized model.

In this report, we also demonstrate and analyze the closed-loop system simulation results, in which we also
compare the results of the model pendulum with that of the real pendulum.

INTRODUCTION

The experiment is made up of a link literally the pendulum that is rotating and mounted vertically and on a
plane. This link is then attached to a pivot, mounted on a load shaft of a Direct Current motor (DC motor). The
pivot has an arm which can be rotated horizontally by the Direct Current motor. The motor(DC) uses a
tachometer and an encoder. On top of this, the encoder can be mounted on the pivot arm, which measures
pendulum angle. The main aim of the experiment is to find a balance of the pendulum in a vertical position and
position a pivot arm. Because the apparatus only has two levels of freedom and one actuator, this system is
underactuated and shows significant non-linear behaviour of a large pendulum system.
The motivation for this experiment is to be able to generate results for the simulations and be able to
compare them with real life systems. The applications for this system could be used in the design and
implementation of linear quadratic regulators e.t.c.

SYSTEM MODEL

The structure of an inverted pendulum is anchored on two factors;

a) The Degree of freedom (DOF) of the system.

b) The Actuation method.

The actuation method is linear and rotary. In this case, the very simplest structure of an inverted pendulum
has two Degree of Freedom (DOF) in which one is for the base position, and the other is for pendulum's angle.

Some of the main two (DOF) inverted pendulum systems are rotary inverted pendulum system and cart
inverted pendulum systems. And in cases of cart inverted pendulum systems, the pendulum is pinned to the
cart by a pin joint and is rotated freely in a vertical plane and motor used for driving the cart of the system
horizontally. The Rotary inverted pendulum (RIP) system is made of three elements; motor, arm and the
pendulum. In the RIP one end of the arm is joined to the shaft connecting to the motor, then the pendulum is
joined to the other end of the arm using a pin joint that can rotate freely vertically. For a greater degree of
freedom, the pendulum system configures by either the base enabled to move at multiple directions or add
more links to the pendulum. Such Configurations, in which the base can move in multiple directions, should
then be actuated using two degrees of freedoms, that forms a plane horizontally called planer inverted
pendulum system. There can be three mechanical structures of a planer inverted pendulum system; with
rotary-rotary actuation, planer inverted pendulum with linear-linear actuation and with combinations of linear
and rotary actuations.

The structure of a rotary-rotary-planer inverted pendulum is made up of three major elements; arm 1, arm 2
and a pendulum. Arm 1 joined to the shaft of a D.C. motor and can move in the horizontally. Arm 1 and arm 2
is both tightened using revolute joint and with a servo motor then attached to the joint to give torque to make
it rotate horizontally. The pendulum is then joined with arm 2 by a pin joint and is free to move vertically.

The following assumptions are important during the modelling of the system;

1) The system begins in an equilibrium state, showing the initial conditions are assumed to be zero.

2) The pendulum doesn't move more than a few degrees from the vertical to satisfy the linear model.

3) A small disturbance can be applied on the pendulum.

As the requirement of the design, the settling time, ts, has to be less than 0.5 seconds, that is, ts< 0.5secs. The
system overshoot value is to be at most 10%, that is ts = 10%.

Deriving the system dynamic equations

Having the velocities of the pendulum the system's equation can be derived by using the Euler-Lagrange
formulation.

1) Potential energy; gravity.

2) Kinetic energy; The Kinetic Energy in the system comes from moving hub the velocity of the point mass in
the horizontal direction the velocity of the point mass in the vertical direction and rotating pendulum at its
centre of mass.

CONTROLER DESIGN

a) Linearization
This experiment describes the process of linearizing nonlinear systems. This is often done for a
nonlinear control system for there are a wide variety of well-known algorithms for designing
controllers for linear systems. If we could linearize a nonlinear system, then we can design a control
system using a wide variety of methods. The trick is that the system must remain close to its
linearization point, or else the linearization cannot be valid.
b) State feedback design
The state feedback controller is created based on the following requirements; time settling, rising time,
peak overshoot and steady-state error. The power of space technique for analysis and control of
Multiple Input Multiple Output (MIMO) system can be investigated using MATLAB. This simulation
environment supports the development of real time applications.

The notions of controller design, with feedback of different kinds, control design by optimization.

The simple linear controllers are the pole-placement controller and the linear quadratic regulator
(LQR).

A simple experiment of a simple nonlinear continuous fermenter model is used to illustrate how to
design and use linear controllers to nonlinear process systems and what the dangers are of applying
them without care.

Assuming that the single input system dynamics is given by, assuming the symbols for the input
parameters given as;

E =AE+Bv

W=CE

Where; E is an r-dimensional vector of the transformed state variable,

v is a n-dimensional vector transformed in input variables,

w is n-dimensional transformed in the output variable

and matrices A, B, C have a simple physical value. If r< n, then additional n-r variables can be introduced to
complete coordination process. The r integer, in this case, is the relative degree.

E1 = E2

E2 = E3

Therefore;

Er = RE+ Sn+ku

n= PE+Qn

y=E1

where r is the relative degree. The static state feedback control law;

u= v-RE-Sn/k

this changes the r-th equation to Er=v, in this case, the stabilized input v is designed to stabilize the
system.
c) Zero-pole map as a figure

Zero pole map creates a pole-zero plot of the continuous dynamic system model x, and o indicates the poles
and zeros respectively, as shown in the following figure.
An open-loop linear time-invariant system is stable if:
In continuous-time, all the poles on the complex s-plane must be in the left-half plane (blue region) to ensure
stability. The system is marginally stable if distinct poles lie on the imaginary axis; that is, the real parts of the
poles are zero.
In discrete-time, all the poles in the complex z-plane must lie inside the unit circle (blue region). The system is
marginally stable if it has one or more poles lying on the unit circle.
Zero pole map(sysa,sysb...sysn) creates the pole-zero plot of multiple models on a single figure. The models
can have different numbers of inputs and outputs and can be a mix of continuous and discrete systems. For
SISO systems, zero pole map plots the system poles and zeros. For MIMO systems, zero pole map plots the
system poles and transmission zeros.
Zero pole map gives the system poles and transmission zeros as column vectors p and z. The pole-zero plot is
not displayed on the screen. Plot the poles and zeros of the continuous-time system represented by the
following transfer function

H = tf([2 5 1],[1 3 5]);


pzmap(H)
gridon

Plot the pole-zero map of time identified state-space model. In practice, you can obtain an IDSS model
by estimation based on input-output measurements of a system. For this example, create one from
state-space data.

A = [0.1 0; 0.2 -0.9];


B = [.1 ; 0.1];
C = [10 5];
D = [0];
sys = IDSS(A,B,C,D,'ts',0.1);
SIMULATIONS

a) Model Simulation
This is the process of designing and analysing a digital prototype of a physical model to predict its
performance in the real world.

We can build the inverted pendulum model in Simulink employing the equations derived above using the steps
below
Begin by typing simulink into the MATLAB command window to open the Simulink environment. Then open a
new model window in Simulink by choosing New > Simulink > Blank Model of the open Simulink Start
Page window
Insert four FCN Blocks from the Simulink User Defined Functions library. Build the equations for , , , and
employing these blocks.
Change the label of each FCN block to match its function.
Put four Integrator blocks from the Simulink Continuous library. The output of each Integrator block is going to
be a state variable of the system; , , , and .
Double click on each Integration block to add the Name of the state; of the variable. See the figure below. Also,
change the Initial condition; for (pendulum angle) to "pi" to show that the pendulum begins pointing straight
up.

Insert four Multiplexer blocks from Simulink Signal Routing library one for each FCN block.
Input two OUT1 blocks and one LN1 block from the Simulink Sinks and Simulink Sources libraries respectively.
Then double click on the label for the blocks and change the names. The two outputs are for the "Position"
of the cart and the "Angle" of the pendulum, while the one input is for the "Force" applied to the cart.
Connect each output of the Mux blocks to the input of the corresponding FCN block.
Connect the output of the and FCN blocks to two consecutive integrators to generate the cart's position
and the pendulum's angle. Your model should BE as;

This equation requires three inputs;


Double click on the corresponding Mux block and change Number of inputs: to "4".
Connect these three inputs to this Mux block in the order prescribed in the previous step.
Double click on the first FCN block and enter the equation as;

This equation also requires three inputs.


Enter the above equation into the FCN block, change the number of inputs of the Mux block, and connect
the correct signals to the Mux block in the correct order.
b) Closed Loop simulation
Open SIMULINK and go to examplessim.
Click on the connection between the U block and Process TF block and delete it. Rename the U block
to “w”. This block is used to produce a step-change in the set point.
Place a copy of the Sum block to the right of w. Double click above the sum block icon and label the
block “Sum1”.
Open its dialogue box and change the ++ sequence to +-. Instantly, the block’s icon will show this
change. The top input will have a + located to the right of it while the bottom input will have a –
located above it. Therefore, the output of Sum1 will be the top input minus the bottom input. Connect
the output of w to the top input of Sum1. Also, connect the output from Sum to the bottom input of
Sum1. The output of Sum1 is the error between the set-point, w, and the controlled variable, C.
Select the MATLAB command window and type the following commands to obtain a labelled plot of
the response.
plot(t,C)
xlabel(‘Time’)
ylabel(‘C’)
title(‘Set-point Response’)
Figure shows the resulting plot.
Simulate the unit load response. Double click on w and set Final value to 0. Double click on L and set
Final value to 1. Again, select Start from the Simulation to begin the simulation. Type plot(t,C)to view
the response.
Label this plot the same way as the previous one except replace the title Setpoint Response with Load
Response.
Before starting another simulation, type t2=t; C2=C;
Now simulate the unit load response for ITAE (set point) by entering the set point controller settings
into the PID controller block and simulating. Type t3 = t; C3 = C; after the simulation has ended.
Next simulate the unit set point response for ITAE (set point) by setting Final value to 0 in L and Final
value to 1 in w and simulating.
Enter the following set of commands at the MATLAB prompt:
subplot(211)
plot(t1, C1,‘-‘, t, C, ‘--‘)
xlabel(‘Time’) ylabel(‘C’)
title(‘Set-point Response’)
subplot(212) plot(t2, C2, ‘-‘, t3, C3, ‘--‘)
xlabel(‘Time’) ylabel(‘C’)
title(‘Load Response’)
The sub plot command breaks, the Figure window into an m-by-n matrix of small rectangular panes
and makes the p-th pane active. The plot command following subplot will place the plot in the active
pane.
The plot(x1, y1, ‘linetype1’, x2, y2, ‘linetype2’, ...) command plots x1 vs. y1 with linetype1, x2 vs. y2
with linetype2. For the set of commands listed above, Figure shows the resulting MATLAB Figure
window.
EXPERIMENTATION WITH DISCUSSION

Based on MATLAB Simulink control system design and testing environment, the rotary inverted pendulum
motion control hardware-in-the-loop simulation platform is designed and implemented by applying hardware-
in-the-loop simulation technology. The mathematical system models of single and double inverted pendulums
are obtained. The optimal control method is adopted to design the controller, and the inverted pendulum is
studied in the simulation system loop. We can observe the dynamic system performance in online by building
up virtual instruments and verify the effectiveness of the control strategy. The results show that this system is
the ideal platform to research and apply control theory.

CONCLUSION WITH FUTURE WORKS

The design and simulation of the new concept of wheelchair based upon spherical inverted pendulum control
i.e. the SIPW is reported in this thesis. The thesis has demonstrated some various control strategies of inverted
pendulum system can be applied. Three control strategies, pole placement, LQR and PID are capable of
controlling the two DoF inverted pendulum's angle and the cart's position of the both Simulink model and
SimMechanics model. The PID control approach that was proposed to use two PID controllers solves the
problem to control an inverted pendulum system which is a MIMO system successfully. An alternative
inverted pendulum design that consists of two carts (bottom cart (vehicle), the top cart with inverted
pendulum) is presented in this report.

This design gives the possibility to control the bottom cart (vehicle) to get better characteristic on set point
tracking while another cart is moving on top to stabilise the inverted pendulum. The final objective of the
project in establishing the design and simulation of a spherical inverted pendulum wheelchair can be realised.
The wheelchair on spherical based upon inverted pendulum control is designed and simulated in
SimMechanics with state feedback control using LQR control strategy to find the gain matrix controller. The
simulation shows that the body which represents the chair and the occupant is balanced on a spherical ball
through four rollers (two driven and two idler) successfully. Thus the new wheelchair concept based upon the
dynamic and control of spherical inverted pendulum, which has the potential to offer improved mobility
compared with exiting wheelchairs in the market can be achieved. The development of this a new wheelchair
concept based have made contributions to the inverted pendulum application knowledge base including
developing simulation for stabilisation of the inverted pendulum system using various control strategies in
both Matlab Simulink and SimMechanics, proposing the new alternative inverted pendulum design
construction with two carts (bottom cart (vehicle), top cart with inverted pendulum) for improving
characteristic on the command tracking and modelling and controlling conceptual wheelchair, the spherical
inverted pendulum wheelchair (SIPW), for improving mobility to help.

For future work need to investigate the application of an adaptive suspension system which will be modelled
and integrated into the SIPW simulation and the SIPW dynamics investigation in terms of comfort and safety.
In term of safety need to be investigated the dynamic of the SIPW on the inclined surface? And in term of
comfort improvement need to be designed an optimised package for providing optimal seat performance for
the SIPW, to be investigated the driving control of the SIPW through a mobile phone, and maybe also need to
designed turntable mechanism under the seat to provide more degree of freedom to the wheelchair system.
Finally need to be determined and developed the parameters of the SIPW systems, including the suspension
system experimentally. Run test for the SIPW prototype to tune or maybe optimise the physical parameters so
that can meet with the real spherical inverted pendulum wheelchair application.

REFERENCES

http://researchonline.ljmu.ac.uk/id/eprint/4395/1/157458_2014fajarmphil.pdf

https://chemeng.queensu.ca/courses/CHEE319/documents/chee319_tutorial7-2.pdf

https://www.researchgate.net/publication/251933125_Design_and_Implementation_of_Rotary_Inverted_Pe
ndulum_Motion_Control_Hardware-In-The-Loop_Simulation_Platform

https://google.com/systemmodelofaninvertedpendulum

Вам также может понравиться