You are on page 1of 21

M E C H AT R O N I C S D E PA R T M E N T

SELF BAL ANCING


ROBOT
Medhat Mikhail Helmy ID: 20161006

Kerolos Fekry Wassef ID:20171103


INTRODUCTION:

• Balancing robots represent the classic inverted pendulum problem,


in which a large mass is placed at the end of a pole. The pole is free
to rotate around the base, and the base is free to move in the plane
perpendicular to the vertical. The goal of the problem is to keep the
pole vertical by moving the base in response to changes in the
angle.
• The objectives of this project are developing a PID controller to
control the angle of the robot.
OVERVIEW :

1. System modeling

2. open loop system response

3. Root Locus of Plant (under Proportional Control)

4. Applying PID control on the system


1-SYSTEM
MODELING
:
By studying the free body diagram for the system and solving equations
we got the following two governing equations for this system:

To linearize the system assume that the system stays within a small
neighborhood of this equilibrium with angle (phi)

• After subsisting the above approximations into our nonlinear


governing equations, we arrive at the two linearized equations of
motion.
TRANSFER FUNCTION
To obtain the transfer functions of the linearized system equations, we must first
take the Laplace transform of the system equations assuming zero initial
conditions. The resulting Laplace transforms are shown
below:

the transfer function becomes the following:


2-OPEN
LOOP
SYSTEM
RESPONSE:
• We will begin by looking at the open-loop response of the inverted
pendulum system
• We can examine the open-loop impulse response of the system.
Specifically, we will examine how the system responds to an
impulsive force applied to the cart employing the MATLAB
(Simulink) impulse input :
As we can see from the plot, the system response is entirely
unsatisfactory. In fact, it is not stable in open loop. Although the
pendulum's position is shown to increase past 100 radians (15
revolutions), the model is only valid for small (phi)
3- ROOT
LOCUS OF
PLANT :
SYS. BLOCK DIAGRAM:
• since we are attempting to control the pendulum's position, which should
return to the vertical after the initial disturbance, the reference signal we
are tracking should be zero.
• This type of situation is often referred to as a Regulator problem.
• The external force applied to the cart can be considered as an impulsive
disturbance.
• The resulting transfer function for the closed-loop system from an
input of force to an output of pendulum angle is then determined to
be the following:

• We will now begin to design a controller for our


system employing a root locus design method.

• This plot displays all possible closed-loop pole locations as a simple


proportional control gain k is varied from 0 to infinity. The root locus is
the same whether the multiplicative gain k is in the forward or feedback
path of the closed-loop system.
ROOT LOCUS OF THE PLANT:
• As we can see, one of the branches of the root locus is entirely in the right-half of the
complex s-plane. This means that no matter the choice of gain K , there will always be a closed-
loop pole in the right-half plane making the system's impulse response unstable.

• To solve this problem, we need to add a pole at the origin (an integrator) via the controller to
cancel the plant zero at the origin. This addition will produce two closed-loop poles in the right-
half plane.
4- APPLYING
PID
CONTROL :
PID CLOSED LOOP SYSTEM:

• Now we can begin to tune our controller. First let's examine the response
of the closed-loop system to an impulse disturbance for this initial set of
control gains
• This response is still not stable. Let's begin to modify the response
by tuning using MATLAB tuner to choose the values of constants .
PID TUNING:
PID TUNING:
• As we can see, the overshoot has been reduced so that the pendulum does not move
more than 0.05 radians away from the vertical. Since all of the given design requirements
have been met, no further iteration is needed.
THANKS FOR
LISTENING

You might also like