5 A Study On Teaching Method of Control Engineering
5 A Study On Teaching Method of Control Engineering
DOI 10.17148/IARJSET.2020.7901
Abstract: PID controller is so popular control engineering and it has been using in the industrial fields widely. So, it is
important to have a lecture for design and theory. This paper deals with design and lecture skill through implementation
of PID controller by using Python. So far, many universities and research centres have been using MATLAB to teach
and learn in control engineering. However, MATLAB is commercial S/W and expensive. Therefore, developing
country’s universities have a very difficult because of no license. Currently, many are interesting in Python because it is
open source and huge communities. It is a good tool to teach and learn as teacher and students. This paper provides on
how we can teach and learn control engineering through implementation of PID controller.
I. INTRODUCTION
A Proportional – Integral – Derivative (PID) controller has been widely used in the most industrial processes despite
continual advances in control theory. This is not only due to the simple structure which is theoretically easy to understand
but also to the fact that the tuning technique provides adequate performance in the vast majority of applications.
However, almost lecture is doing for theory and the simplified design method due to the limited S/W and design language
like commercial S/W, MATLAB.
Currently, many engineers and scientists have been interesting in Python for control engineering. Python S/W was
released in 1991 and have many communities to research. MATLAB S/W also has many communities for themselves.
However, there are too much differences between two communities, and licenses. Also, a lot of research models and
materials are written in MATLAB so far. However, MATLAB is a programming language which requires an expensive
license and they do not open their theory code.
Many researchers in and outside universities can’t afford this licensed S/W, which means that models are not available
for students although lots of people would like to work with these MATLAB of models. Computer Aided Control System
Design (CACSD) environments play a key role in teaching Control Systems in our universities. Since the late 1990,
MATLAB and Simulink have been chosen as the reference CACSD for control system design. Lectures and laboratories
take advantage of all the features in design and simulation offered by these products. On the other side, many universities
and few companies have been purchasing these expensive licenses related to the different toolboxes required for a
complete design environment. In addition, universities have to buy this package licenses of MATLAB products for their
education even under course and applications in applied research of graduate course.
There are free alternatives downloadable S/W on the web, but nothing has the same quality as the cited products. However,
currently Python is glowing up as one of the most promising tools since 1991. This S/W presents well a new approach to
control systems based on Python and a set of additional functions for controlling real applications. In order to apply rapid
prototyping methods in control design, we have to introduce this tool into lecture course from under course intensively.
We can lecture well material represented by the Python Control System toolbox, which is initially developed at Caltech
by Richard Murray. Most important things are that this S/W is free and there are many communities. Also, it is easy to
build control theory with this language.
Most of the commands implemented in the Python Control toolbox are related to the book from Richard Murray and Carl
Astrom “Feedback Systems” [4, 6, 7]. We can present and teach many control activities that can be performed using the
Python packages and the Python Control toolbox. Also, Python S/W can be well presented under Windows, Mac and
Linux.
Unfortunately, some professor or so do not still know on how they can approach and teach because of the traditional
conception, which is MATLAB is the best and friendly from a long time ago.
This paper’s aim is to provide on how we can teach control system in Python in Under course and graduate course.
I hope this material can be used usefully in the University and teachers.
This work is licensed under a Creative Commons Attribution 4.0 International License
IARJSET ISSN (Online) 2393-8021
ISSN (Print) 2394-1588
DOI 10.17148/IARJSET.2020.7901
This work is licensed under a Creative Commons Attribution 4.0 International License
IARJSET ISSN (Online) 2393-8021
ISSN (Print) 2394-1588
DOI 10.17148/IARJSET.2020.7901
It means everyone can understand to code and there are no arrays or matrices. Python is needed to address by the NumPy
package, which provides multidimensional arrays. With NumPy, numerical computing can be calculated.
They are numbers: real, float, and complex; strings; lists and tuples, which are two types of ordered sequences;
dictionaries, which are “associative arrays” or mappings; and sets, which are unordered collections of unique items.
The following list presents the types in more detail. The side notes next to each type show some code examples.
- Numbers are scalars. So, they are zero dimensional and do not have some shapes. This is quite different from
MATLAB, which are 1-by-1 matrices. Example: real_number = 1, float number = 1.0, complex number = 1 + 2j.
- Strings can be written with either single or double quotes and we cannot modify them. Instead of that, we can
create new strings based on the contents of an existing one. Example: s1 = 'a string', s2 = "also a string", s3 = """A
(possibly) multiline string""", s3[0] returns 'A', s2[:4] returns 'also'.
- Lists are similar to cell arrays in MATLAB except they are only one dimensional. They can contain anything,
including other lists. Even though they can contain items of different types at the same time. Example: word list = ['the',
'quick', 'brown', 'fox'], number list = [0, 1, 1, 2, 3, 5, 8].
- Tuples are lists’ cousins. They are also ordered sequences. Example: point = (0, 0), also a point = 0, 0, a_3d_point =
(0, 1, 2).
- They usually group together objects of different types, which are accessed via indexing.
- Dictionaries are similar to MATLAB structures.
This work is licensed under a Creative Commons Attribution 4.0 International License
IARJSET ISSN (Online) 2393-8021
ISSN (Print) 2394-1588
DOI 10.17148/IARJSET.2020.7901
- Sets are not used very often but allow for expressive “set operations”, such as intersection, union, difference,
etc. Example: lights = {'red', 'yellow', 'green'}, choices = ['yes', 'no', 'yes'], unique choices = set(choices), unique _choices
is {'yes', 'no'} (Fig. 1).
Python is also one of the top coding languages. This language is required, or at least used, by the overwhelming majority
of computer science courses in United States colleges and many more colleges all over the world. This means that learning
Python is almost essential if one wishes to pursue any degree which requires some fundamental knowledge of coding
and/or computer science practices, and especially for those who are looking to start a career in data analytics. Again, we
can see the similarity between Python and MATLAB from Fig. 1.
+
r e + uPID u
I ACTUATOR
- +
1
t
de ( t )
u ( t ) = K e( t ) + e()d + Td (1)
Ti 0 dt
or
t
de ( t )
u ( t ) = Ke( t ) + K i e()d + K d (2)
0
dt
where:
- K i = K : gain (reset) of integral part of the controller,
Ti
- K d = KTd : gain of derivative part of the controller.
1) PD controller: We had better lecture where we can apply PI or PD controller because students do not understand why.
Usually, PD controller can be used in control of moving objects such are flying and underwater vehicles, ships, rockets,
robot, and etc. Because the effect of PD controller can stabilize quickly by sudden changes in targeting variable.
Sometime, velocity control is used as sensor of heading change of moving object.
2) PI controller: PI controllers are the most often used in industry:
- Fast response of the system is not required
- Large disturbances and noise are present during operation of the process
- There is only one energy storage in process (capacitive or inductive)
- There are large transport delays in the system
This work is licensed under a Creative Commons Attribution 4.0 International License
IARJSET ISSN (Online) 2393-8021
ISSN (Print) 2394-1588
DOI 10.17148/IARJSET.2020.7901
Thermal processes with good thermal insulation act almost as integrators because insulation is good and thermal losses
are small. In such processes, there is present process dynamics with large inertia since dynamics is slow, derivative mode
is required for control of such processes. Integral mode would only already slow dynamics make more slowly.
e(t)
t
K
Ti 0
e(0) I= e()d; K = 1; Ti = 1
de(t1 )
e(t1) D= ; Td = 1
dt
P = Ke(t1) ; K = 1
0 t1 t
Fig.3 shows the output signal of PID control. Lecture must explain on how this output signal can be produced for student.
Also, they should explain proportional band because many industrial controllers in the site have defined a proportional
band (PB) instead of gain:
100
𝑃𝐵 = [%] (3)
𝐾
Usually, a proportional band is equal PB = 100%. Graphically characteristic of P controller is given in Fig. 4 (a) and
(b). Fig. 4 (b) illustrates well band’s concepts with 60% and 40%. If the controller has a narrow band, the output signal
of controller increases faster than wide band. That is an important for controller’s tuning when it is combined with I, D.
That is, PI, PD, PID controller.
u(t)
Umax
u0
Umin
- e0 e0 e(t)
Error Error
P-band P-band
This work is licensed under a Creative Commons Attribution 4.0 International License
IARJSET ISSN (Online) 2393-8021
ISSN (Print) 2394-1588
DOI 10.17148/IARJSET.2020.7901
uPI(t)
K
uI(t)
Ti
K
e(t) e(t)
1 1
Ti
0 t 0 t
Usually, they do not use derivative mode in control system with many picks or disturbance like flow system. They never
use on nuclear power plant level control system because derivative mode cannot eliminate control error. However, robot
arm control system should use derivative mode reacts only on change of the controller input.
This work is licensed under a Creative Commons Attribution 4.0 International License
IARJSET ISSN (Online) 2393-8021
ISSN (Print) 2394-1588
DOI 10.17148/IARJSET.2020.7901
large devices. Usually, we call that this phenomenon is called setpoint kick (or derivative kick), which is generally to be
avoided.
𝑡 𝑑𝑒𝑑
𝑀𝑉 = 𝑀𝑉𝑏𝑎𝑟 + 𝐾𝑝 𝑒𝑝 + 𝐾𝑖 ∫0 𝑒𝑖 𝑑𝑡 + 𝐾𝑑 (6)
𝑑𝑡
𝑒𝑝 (𝑡) = 𝛼𝑆𝑃 − 𝑃𝑉 (7a)
𝑒𝑖 (𝑡) = 𝑆𝑃 − 𝑃𝑉 (7b)
𝑒𝑑 (𝑡) = 𝛽𝑆𝑃 − 𝑃𝑉 (7c)
For that, we can recover by using setpoint weighting. To this end, the PID control formula is written as Equation (6), (7).
We can have the effect of a different error term for each term in the control equation as Equation (7).
The integral term offers the same condition as before, which has the function of gap reducing in order to force the process
variable 𝑃𝑉 to be equal to the setpoint 𝑆𝑃 at steady-state. The error terms for the proportional and derivative terms,
however, include constants 𝛼 𝑎𝑛𝑑 𝛽 which are used to modify the response to setpoint changes. Commonly, the tuning
is to set 𝛽=0 which entirely eliminates derivative action based on change in the setpoint. This tuning approach offer a
good result in process control because it eliminates the 'derivative term' associated with a quick change in setpoint. The
term 𝛼 is generally tuned to meet the specific application requirements of setpoint and setpoint tracking is not a high
priority when setting 𝛼=0 is a reasonable starting point.
V. CONCLUSION
PID controller is still quite important because it is using industrial area widely and there are many tuning methods for
many plant characteristics. So, it is important to have a lecture by using S/W. However, they use MATLAB S/W because
of limited S/W. This paper focuses on implementation of PID controller in Python (Colab). So many universities and
research centers have been using only MATLAB to teach and research so far. Of course, MATLAB is a good tool for
control engineering to teach and learn in University.
This work is licensed under a Creative Commons Attribution 4.0 International License
IARJSET ISSN (Online) 2393-8021
ISSN (Print) 2394-1588
DOI 10.17148/IARJSET.2020.7901
REFERENCES
[1]. https://www.educba.com/python-vs-matlab/
[2]. https://www.educba.com/software-development/courses/?source=footer
[3]. Software Development Course - All in one bundle (https://www.educba.com/software-development/courses/software-development-
course/?source=footer)
[4]. Become a Python Developer (https://www.educba.com/software-development/courses/python-certi
[5]. Ziegler and Nichols, “Optimum setting for automatic controllers,” Transaction ASME, Nov. pp. 759-768, 1942.
[6]. C. C. Hang and K. J. Astrom, “ Refinements of the Ziegler-Nichols tuning formular, “Proc. Inst. Elect. Eng., Vol. 138, pt. D, pp. 111-118, 1991.
[7]. K. J. Anstrom and T. Hagglud, “Automatic tuning of simple regulators with specifications on phase and amplitude margins, Automatica, Vol. 20,
pp. 645-651, 1984.
[8]. VirtualBox. [Online]. Available: https://www.virtualbox.org
[9]. Download Anaconda. [Online]. Available: http://continuum.io/downloads
[10]. Obtaining NumPy and SciPy libraries. [Online]. Available: http://www.scipy.org/scipylib/download.html
[11]. Python Control toolbox. [Online]. Available: https://github.com/python-control/python- control
[12]. NumPy for Matlab Users. [Online]. Available: http://wiki.scipy.org/NumPy for Matlab Users
[13]. David J. Pine. Introduction to Python for Science. [Online]. Available: https://github.com/djpine/pyman
[14]. Matplotlib. [Online]. Available: http://matplotlib.org/
[15]. [Online]. Available: http://docs.scipy.org/doc/scipy-
[16]. SymPy Tutorial. [Online]. Available: http://docs.sympy.org/dev/tutorial/index.html
This work is licensed under a Creative Commons Attribution 4.0 International License
IARJSET ISSN (Online) 2393-8021
ISSN (Print) 2394-1588
DOI 10.17148/IARJSET.2020.7901
BIOGRAPHIES
Dong Hwa Kim Ph.D: Dept. of Computational Intelligence and Systems Science, Interdisciplinary
Graduate School of Science and Engineering (AI Application for Automatic control), TIT (Tokyo
Institute of Technology), Tokyo, Japan. Hanbat National University (Dean, Prof., S. Korea), He has
experience in many University, overseas as Prof. He was NCP of EU-FP7 (EU-Framework Program,
ICT). He had keynote speak at several international conference and University. He has 200 papers in
Journal and conferences. He was editor of IJCIR (International Journal of Computational Intelligence).
He is current Prof. at Electrical Power and Control Eng. Adama Science and Tech. Uni., Ethiopia
(http://worldhumancare.wixsite.kimsite).
Hinsermu Alemayehu was born in Ethiopia, Fincha city in 1988. I received the B.Sc. in Electrical and
Electronics Technology in from ASTU (Adama Science and Technology University) in 2008 and M.Sc
degree in Control Engineering from Tianjin University of Technology and Education in 2011. He joined
EPCE, ASTU. He is currently working as a lecturer and Department head. Main areas of research interest
are control systems, robotics and automation and power electronics and drives. Currently he is a member
of the Ethiopian Society of Electrical Engineers.
This work is licensed under a Creative Commons Attribution 4.0 International License