You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/354622337

Implementation of Position Control Servo DC Motor with PID Controller to


Humanoid Robot Arm

Conference Paper · September 2021

CITATIONS READS

0 6,051

2 authors:

Nada Mohamed Abdelrady Okasha Elnady


Alexandria University October 6 University
4 PUBLICATIONS 0 CITATIONS 48 PUBLICATIONS 117 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Abdelrady Okasha Elnady on 26 October 2021.

The user has requested enhancement of the downloaded file.


Implementation of Position Control Servo DC Motor
with PID Controller to Humanoid Robot Arm
Nada Mohamed Zakaria.
October 6 University, Egypt,nm035186@gmail.com
Supervisor: Abdelrady Okasha Elnady, Associate Professor
Head of Mechatronics Department Faculty of Engineering,October 6 th University, Egypt, rady_nady@yahoo.com

Abstract–In this paper implementation of position control servo DC In this paper Position control of a 3rd ordered plant (Servo
motor with PID controller to humanoid robot arm is discussed. The motor) using Conventional PID [2],[3]. Simulation for
objectives are development and analyze the movement of humanoid recreation and results for some cases, examines utilizing
robotic arms before implementation to show the system response MTLAB program. And besides, adding the disturbance to
and get the least errors. Humanoid robot arms are mechanically
process (angle) and finding that the system is returning stable
controlled devices designed for emulated the movement of a human
arm. The mathematical equations of servo DC motor are simulated after the disturbance is removed. [4].
and connected to PID controller using the MATLAB program. The
Practical experience, by connecting a real control system to a
PID controller is a closed loop feedback mechanism system. It
calculates an error value from the difference measured process PID controller with adjusting the angles of the motor, every
variable and desired value, and give pulse-width modulation joint of the arm could be moved. It could be taught the
(PWM) signal to send it to motor by microcontroller. As a result, humanoid robot arm to perform those tasks by imitation and
the system response is getting without error and less overshoot. And learning it once [5].
besides, the disturbance is added to process (angle) and found that
the system is returning stable after the disturbance is removed. With
practical experience, the system achieved the same response and
efficiency. Under this control, every joint of the arm could be II. METHODOLOGY
moved by adjusting the angles of the motor. The different activities The control of adaptive robotic mechanical systems can
could be applied using the humanoid robot arm safely, because it’s
be approached using the general proposed formulation. This
stable system.
methodology is based on the use of the basic principles of
Keywords: Humanoid robot arm, Servo DC Motor, PID control concepts. To build real control system: The
controller, MATLABSimulink. methodology can be divided into five main steps.
Step 1: Determine the system requirements. Position control of
I. INTRODUCTION DC servo motor to imitate the human arm by adjusting the
selected angle.
Humanoid robots are being used in the inspection,
maintenance and disaster response at power plants to relieve Step 2: Understanding servo motor control. The position data
human workers of laborious and dangerous tasks. They are to the control should be sent in the form of PWM signal
being developed to perform human tasks like personal through the Signal pin of servo motor.
assistance, through which they should be able to assist the sick
and elderly. Simply speaking, the control electronics adjust Step 3: Choose benefit of control and tune it.
shaft position by controlling the DCservo motor.The position
data to the control should be sent in the form of PWM signal Step 4: Controller simulation. PID controller is used to
through the Signal pin of servo motor. A Servo DC motor improve the dynamic performance and also reduce the
alongside servomechanism (closed-loop control system) goes steady state error of the systems.
about as a servo motor which is essentially utilized as a Step 5: Controller implementation. Apply it to the DC-servo
mechanical transducer in the computerization business. A motor to optimize and test if it is practically stable.
servo framework is a shut circle framework where the
criticism signal (position, speed, and so on) drives the motor.
The motors are coupled to a yield shaft (load) through a stuff
train for power coordinating. III. SYSTEM MODELLING
In this DC servo motor can be considered as a linear SISO
The main aim of this paper is to analyze the servo motor and
system having a 3rd order transfer function. Armature control
show cases hypothesis of dynamic DC motor about the
is a closed loop system, while field control is an open loop
boundaries for (𝒎, 𝑳𝒂, 𝑹𝒂, 𝑩𝒎, 𝑲𝒃) [1].Then speaks to system. Closed loop systems are often the preferred choice for
mathematical equations (close loop) for dynamic DC motor operators and business leaders who are looking for stability
without and with PID controller. and the convenience of a 108 automated process. Armature

5th IUGRC International Undergraduate Research Conference,


Military Technical College, Cairo, Egypt, Aug 9th – Aug 12st, 2021.
controlled motors offer nearly unmatched accuracy and 𝐽 𝜃̈ + 𝑏 𝜃̇ = 𝑇 − 𝑇𝑙 (7)
control, along with a wide speed variation range.
By apply Laplace transform:

𝐸𝑎 (𝑠) = 𝑅𝑎 𝐼𝑎 (𝑠) + 𝐿𝑎 𝑠𝐼𝑎 (𝑠) + 𝐸𝑏 (𝑠) (8)


Advantages of armature-controlled DC motors include:
Where: 𝐸𝑎 (𝑠) Input voltage, 𝜃(𝑠) Output .
• Constant field current and torque: With the armature control
method, the field current and torque levels remain constant So, transfer function
throughout the application. Regardless of the speed of the
𝜃(𝑠) 𝐾
motor, you can rely on these factors. T.F = = (9)
𝐸𝑎 (𝑠) 𝑆 (𝐿𝑎 𝐽𝑆 2 +(𝐿𝑎 𝑏+𝑅𝑎 𝐽)𝑆+𝑅𝑎 𝑏+𝐾𝐾𝑏 )

• Fast and simple speed variation: Armature controlled DC


motors are known for their exceptional speed control, which
allows operators to vary the speed as necessary in both TABLE I: PARAMETER VALUES [6]
directions. Parameter Label Value

The relation between shaft position and armature voltage is 𝑅𝑎 Armature Resistance 1Ω
derived from the physical laws [1]. Schematic graph of DC-
𝐿𝑎 Armature inductance 0.5 H
servo motor is shown in Fig.1.
J Motor Moment of 0.0093
Inertia kg/𝑚2
B Motor Viscosity 0.008 N.m. s

𝐾𝑏 Motor EMF to speed 0.01


proportional constant v/rad/sec.
𝐾𝑚 Motor Torque to 0.01 N.m/amb
current proportional
constant

With neglect inductance:


Fig.1: Schematic of DC-servo motor.
𝜃(𝑠) 𝐾
= (10)
The air gap flux is given by: 𝐸𝑎 (𝑠) 𝑆( 𝑇𝑚𝑆+1)

𝜃(𝑠) 0.01
𝑘𝑓 𝑖𝑓 . (1) 𝐸𝑎 (𝑠)
=
0.005𝑆 3 +0.06𝑆 2 +0.1𝑆
. (11)

Torque is proportional to product of Flux and Armature


current

T = 𝑘1 𝑖𝑎 (t) (2)

T = 𝑘1 𝑘𝑓 𝑖𝑓 (t) 𝑖𝑎 (𝑡) (3)

The motor torque when the constant flux established in the


field coil is given by:

𝑇 = 𝐾𝑚 𝑖𝑎 (𝑡). (4)
Fig.2: Equivalent block diagram. [1]
Back EMF of the motor is given by:

𝑒𝑏 𝑘𝑏  (5)
So, differential equation for armature circuit servo motor
controlled by armature voltage:
𝑑𝑖𝑎
𝑙𝑎 + 𝑅𝑎 𝑖𝑎 + 𝑒𝑏 = 𝑒𝑎 (6)
𝑑𝑡

Armature current produced torque applied to the inertia and


friction:

5th IUGRC International Undergraduate Research Conference,


Military Technical College, Cairo, Egypt, Aug 9 th – Aug 12st, 2021 2
The PID output in Frequency domain can be represented as
U(s) 𝐾𝑖
= 𝐾𝑝 + +𝐾𝑑 (13)
E(s) s

The closed loop Transfer Function is given by:


Y (s ) G(s)
= H(s)=1 (14)
U(s) 1+ G(s)H(s)

Y(s) =Output response(s) =input, G(s) =plant

And H(s) =controller.

Fig.3: MATLAB Simulink model of DC-servo motor


TABLE II: PID-CONTROLLER GAINS.

𝐾𝑝 𝐾𝑑 𝐾𝑖

5.6059 2.1993 1.1895

The transfer function of closed circle DC-servo motor with


PID controller:
3.883
T.F=G(s)= (15)
0.0002422 𝑆 3 ±0.6189𝑆 2 +4.681𝑆

Fig.4: Plot of angle vs. motor voltage.

It is noted from the response of close loop servo motor without


PID controller that there is a positive relationship between the
motor voltage and the angle.

Fig.5: PID-controller block diagram.


IV. PID CONTROLLER
Algorithm of Servo Motor:
It is to note that a developed model of human robot hand
consists of 19 joints. This is very complex, and a few 1. Determined the input values.
assumptions have been made to simplify the work. For 2. Calculated the transfer function plant for Servo DC
instance, friction and stickingare not taken into consideration motor without PID control of the Close Loop: from
for modeling [7]. This allows the conventional PID control to the equation (9).
perform a simple grasping task. In brief, Position control of 3. Calculated the transfer function for Servo DC motor
servo systems is normally unstable when they are with PID control using step unit of the close Loop:
implemented in closed loop configuration so PID controller is from the equation (15).
used to improve the dynamic performance and also reduce the 4. Drawing in MATLAB.
steady state error of the systems. The block diagram of PID
control is shown below Fig.5 V. SIMULATION
The output of The PID controller (U (t)) is given by: [8] The simulation is carried out in MATLAB Simulink. The
actual position and the output is the driven voltage to the
𝑑
U(t) = 𝐾𝑏 𝑒 (𝑡) +𝐾𝑖∫ 𝑒(𝑡) +𝐾𝑑 𝑑𝑡
e (t). (12) motor. Fig.7,8 shown simulation of servo with PID controller
add it’s response.
Where 𝐾𝑝 ,𝐾𝑖 ,𝐾𝑑 are proportional, Integral and derivative
gains and e (t) =error=set point-output

5th IUGRC International Undergraduate Research Conference,


Military Technical College, Cairo, Egypt, Aug 9 th – Aug 12st, 2021 3
from the system response and back stable after removing the
disturbance.

VI. IMPLEMENTATION
A. Control System
Fig.7: MATLAB Simulink model of DC-servo motor with PID-controller.
The motor is simulated and calculated transfer
function with PID controller. The real control system consists
of actuator (DC-servo motors) and the process (angle).The
potentiometer is the system feedback and gives
microcontroller signal to interface with MATLAB. The
schematic for the system is shown in Fig11.

Fig.8: Plot of DC-servo motor with PID-controller.

The characteristic for servo DC motor with PID controller for


close loop is stable without error and less over shoot.

Test motor stability: by adding disturbance for motor. This Fig.11: Schematic of control system for DC servo motor.
experiment shows that the system is stable at Fig9, 10.
The system is stable and ready to connect with real control
system as shown in Fig.12.

Fig.9: MATLAB Simulink model of DC-servo motor with PID-controller and


loading disturbance.

Fig.12: Humanoid robot arm with Microcontroller and MATLAB .

Fig.10: Response of DC-servo motor with PID-controller and loading The practical experiment [9], the actuator (DC-servo
disturbance motor) is connected to power supply and gave feedback to
It can be noted that the system under disturbance when step microcontroller. Our microcontroller is Arduino-Mega
time is 5 sec there is disturbance founded by (-0.2) detract which makes an interface between input and output. The

5th IUGRC International Undergraduate Research Conference,


Military Technical College, Cairo, Egypt, Aug 9 th – Aug 12st, 2021 4
PID controller takes error signal from MATLAB and
calculates the PWM signal that motor received by
microcontroller.

Now, the different activities could be applied using the


humanoid robot arm safely as shown at Fig.13,14,15.

Fig.15: Humanoid robot arm under control.

VII. CONCLUSIONS
In this paper, distinctive PID controlleris work for
controlling a servo DC motor framework and
implementation for humanoid arm robot.This dual feedback
Fig.13: Free body diagram of humanoid robot arm. control provides for a faster response time of the armature
throughout its total voltage range together with the feature
of a position for different voltages. The disturbance is
added to help in checking stability of the system. Analysis
of walking gait, optimal control of multiple motors or other
actuators, controlling the Degree of Freedom (DOF),
adaptability control and intelligence are also the challenging
tasks to make Humanoid robots behave like a human.

ACKNOWLEDGMENT
First and foremost, I would like to thank God Almighty for
giving me the strength, knowledge, ability and opportunity to
undertake this research study and to persevere and complete it
satisfactorily. Without his blessings, this achievement would
not have been possible. The success of this step required a lot
of guidance and assistance from Assoc. Prof. Abdelrady
Fig.14: Implementation position control of servo motor to humanoid robot Okasha Elnady, head of Mechatronics Department Faculty of
arm Engineering October 6th University and I would like to thank
him for giving me all support and guidance.

5th IUGRC International Undergraduate Research Conference,


Military Technical College, Cairo, Egypt, Aug 9 th – Aug 12st, 2021 5
REFERENCES
[1] L. S. Mezher, “Characteristics of servo DC motor with
PID controller,” J. Mech. Eng. Res. Dev., vol. 44, no. 2,
pp. 392–400, 2021.
[2] P. R. Kumar, A. Pradesh, V. N. Babu, and A. Pradesh,
“Controller Tuning with Soft Computing,” vol. 3, no. 11,
pp. 976–980, 2014.
[3] Sailan, Khaled, and Klaus-Dieter Kuhnert. "DC motor
angular position control using PID controller for the
purpose of controlling the hydraulic pump," 2013.‫‏‬
[4] “Global Water Crisis : the Facts,” pp. 1–3, 2017,
[Online]. Available: http://inweh.unu.edu.
[5] A. Intelligence, K. Cs, and A. Intelligence, “Human Arm
Imitation by a 7-DOF Serial Manipulator,” pp. 1–5,
2013.
[6] A. Alim and T. Abubokar, “Control of separately excited
Dc motor,” J. Electr. Electron. Eng., vol. 4, no. 1, pp. 7–
10, 2011.
[7] J. Jalani, H. Hamzah and S. Mashori, "Modelling And
Simulation Of A Humanoid Robot Arm," Full Paper
Proceeding GTAR-,Vol. 1, 19-29,2014.
[8] C. W. Rowley and B. A. Batten, “Dynamic and Closed-
Loop Control,” Fundam. Appl. Mod. Flow Control, vol.
231, pp. 115–148, 2009, doi:
10.2514/5.9781563479892.0115.0148.
[9] H. L. Choi and J. T. Lim, “On robust position control of
DC motors by $epsilon$-PID controller and its
application to humanoid,” IFAC Proc. Vol., vol. 17, no. 1
PART 1, 2008, doi: 10.3182/20080706-5-KR-1001.1574.

5th IUGRC International Undergraduate Research Conference,


Military Technical College, Cairo, Egypt, Aug 9 th – Aug 12st, 2021 6

View publication stats

You might also like