Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Application of Control System

in Differential Drive Robot


19EEE354 Introduction to Robotics
Robot Layout and Motion

Two powered wheel to achieve drive


Spherical wheel can be attached for static stability
Mathematical Model
• Robot linear velocity: V and heading: θ
• By controlling the velocity and orientation, the
path of the robot can be planned
• Vr is the velocity of right wheel
• Vl is the velocity of left wheel
• L is the distance between the center of the
wheels
• θ is the directional angle of the robot with
respect to the reference coordinate system
• r is the radius of the wheel
• Velocity of the robot
Assumptions for modelling
• Robot is moving with constant velocity.
• The duration of the robot motion is within a small period of time and
so the velocities Vr and Vl would be constant in that duration.
• The wheels of the robots do not slip and the surface for robot motion
is flat
These assumptions are made because the individual velocities are time
variant components, and they change with the passage of time. So,
within time t1 to t2, these velocities can be considered constant
Closed Loop System

It is desired to move the robot in a certain direction θ and with constant velocity V
From these parameters, the velocity for left wheel (Vl) and right wheel (Vr) and are
sent to the kinematic equations to calculate the linear and angular velocities of the
robot
After integrating the angular velocity, resultant orientation is then fed back as input
to make the system a closed loop system, increasing its stability
Closed Loop System

Eg:
To move straight, both the motors must rotate at same speed
To achieve same RPM same voltages are applied
But due to mechanical constraints of the motors, they may spin at different speeds thus
the robot may not move in the desired straight path
By means of this closed loop system, deviation in the heading can be determined so that
by suitable actuation the robot can be made to go in the desired direction
Orientation Error Calculation
• By keeping the orientation error to minimum, the robot can be made to move in
the planned track
• In this block, the error in the orientation is calculated and then this error is fed to
the next block to calculate the individual wheel velocities Vl and Vr
• Normal mathematical subtraction of the angles produce a result which may not
be desired in terms of its sign and value
• For precise calculation and to avoid erroneous orientation, the function of atan2
is used
• The atan2 function is a four-quadrant function, which produces the angle within
the four quadrants of the plane
• It helps to determine the sign and the right quadrant placement of the resultant
angle, within the range of (−π, π]
Individual wheel velocity calculation
• The inputs required for the motion of a mobile robot are the linear
velocity V and the orientation θ
• The rate of change of position of robot in x-direction is 𝑥ሶ and that in
y-direction is 𝑦ሶ are given by
Vector components of V
• The angular velocity of the robot is given by
Derivation of wheel speed from V
• The inputs required for the motion of a mobile robot are the linear
velocity V and the orientation θ
• The rate of change of position of robot in x-direction is 𝑥ሶ and that in
y-direction is 𝑦ሶ are given by
Vector components of V
• The angular velocity of the robot is given by
Derivation of wheel speed from V
• The inputs required for the motion of a mobile robot are the linear
velocity V and the orientation θ
• The rate of change of position of robot in x-direction is 𝑥ሶ and that in
y-direction is 𝑦ሶ are given by
Vector components of V
• The angular velocity of the robot is given by

• The velocity V of the robot in a fixed reference coordinate system is


Wheel speed with V and θ

These equations compute the individual wheel velocity based on the robot’s linear
velocity V and robot’s heading θ
𝑑𝜃
ω= = 𝜃ሶ
𝑑𝑡
Estimation of Robot translation and Heading to
correct the orientation error

New values of
𝑥ሶ
𝑦ሶ
𝜃ሶ
To correct the error
in heading angle /
orientation
Actuation
• Result of the previous computation can be used for next iteration of
closed loop
• Whereas the values Vr and Vl that were computed can be used for
actuating the right and left wheels of the robot
• Suitable equation can be framed to convert the velocity computed
into duty ratio of PWM signal needed to control the motor
Controller Gain

Laplace transform
𝑠. 𝜃 𝑠 = 𝜔(𝑠)
Controller Gain

Laplace transform 𝜔(𝑠) 1


𝑠. 𝜃 𝑠 = 𝜔(𝑠) 𝐺 𝑠 = =
𝜃 𝑠 𝑠

The transfer function G(s) is a type-1 system; therefore, the closed loop system will
have zero steady-state error with proportional gain
Controller Gain

Laplace transform 𝜔(𝑠) 1


𝑠. 𝜃 𝑠 = 𝜔(𝑠) 𝐺 𝑠 = =
𝜃 𝑠 𝑠

The transfer function G(s) is a type-1 system; therefore, the closed loop system will
have zero steady-state error with proportional gain

It can be observed that there is


only one pole at s = −Kp
Controller Gain

The sampling time is set at 0.05 sec or 50 ms


As a thumb rule the smallest time constant of the system should be 10 times the
controller’s time constant, i.e 500 ms
So the gain for the position controller comes to be 2
Matlab Implementation
Simulation – Results
For simulation, the linear velocity for the robot was set as 50. The Vr and Vl are limited between 500 and
-500 as constant values.

Desired orientation angle θ, which


was considered as 90 degrees

Actual θ

The theta error can be observed


to reach zero
Simulation – Results

Estimation of x and y coordinates


Initially the values of x and y are zero, this shows that the robot is moving in the same spot and begins to
move as it’s orientation reaches near to the desired angle
Simulation – Results

This behavior of the robot can be observed from the figure where the velocities Vr and Vl are initially
constant with max velocity denoting motion is same place
Later they tend to a value 50 as soon as the robot orientation is near the desired angle
After reaching the desired direction, the robot moves straight in that direction (Differential speed = 0)
Reference
Kothandaraman, K. (1970) Motion planning and control of Differential
Drive Robot: Semantic scholar, undefined. Available at:
https://www.semanticscholar.org/paper/Motion-Planning-and-Control-
of-Differential-Drive-
Kothandaraman/eddefa921e26efbbfd6c65ad1e13af0bbbc1b946
(Accessed: November 16, 2022).

You might also like