0% found this document useful (0 votes)
3 views

PID

This research article discusses the implementation of a speed control system for a DC motor using an auto-tuning PID controller, specifically applying the method proposed by Åström and Hägglund. The study compares the performance of PID parameters obtained through trial-error and two auto-tuning methods, demonstrating that the LabVIEW auto-tuning method yields superior results. The system was developed using LabVIEW and CompactRIO, providing a robust platform for testing and observing the control process.

Uploaded by

nguyenthanh8835
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

PID

This research article discusses the implementation of a speed control system for a DC motor using an auto-tuning PID controller, specifically applying the method proposed by Åström and Hägglund. The study compares the performance of PID parameters obtained through trial-error and two auto-tuning methods, demonstrating that the LabVIEW auto-tuning method yields superior results. The system was developed using LabVIEW and CompactRIO, providing a robust platform for testing and observing the control process.

Uploaded by

nguyenthanh8835
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Afyon Kocatepe Üniversitesi Fen ve Mühendislik Bilimleri Dergisi

Afyon Kocatepe University Journal of Science and Engineering

AKÜ FEMÜBİD 19 (2019) 035203 (690-696) AKU J. Sci. Eng. 19 (2019) 035203 (690-696)
DOI: 10.35414/akufemubid.593609
Araştırma Makalesi / Research Article
Performing Speed Control of a DC Motor with Auto-Tuning PID
Said Mahmut ÇINAR1, Zekeriya BALCI 2, İsmail YABANOVA3
1
Afyon Kocatepe Üniversitesi, Mühendislik Fakültesi, Elektrik Mühendisliği Bölümü, Afyonkarahisar.
2
Van Yüzüncü Yıl Üniversitesi, Çaldıran Yabancı Meslek Yüksekokulu, Elektronik ve Otomasyon Teknolojisi Bölümü, Van.
3
Afyon Kocatepe Üniversitesi, Teknoloji Fakültesi, Mekatronik Mühendisliği Bölümü, Afyonkarahisar.

Sorumlu yazar e-posta: [email protected] ORCID ID: https://orcid.org/0000-0002-8683-3884


[email protected] ORCID ID: https://orcid.org/0000-0002-1389-1784
[email protected] ORCID ID: https://orcid.org/0000-0001-8075-3579
Geliş Tarihi: 18.07.2019; Kabul Tarihi: 22.11.2019

Abstract
Although advanced controllers are used in control applications, proportional-integral-derivative (PID)
controllers are preferred in industry due to their simple structure and ease of application. However, it
Keywords can difficult to set these controller parameters for the controlled platform. These parameters tuning
with trial-error method leads to time and job loss, and the parameters determined in this way cannot
Self-Tuning PID; DC
provide a sufficiently efficient operating characteristic. In order to overcome this problem related to
motor; LabVIEW;
PID parameter tuning many automatic tuning methods have been developed. In this paper, the
CompactRIO; Speed
automatic tuning method proposed by Aström and Hagglund was applied to a DC motor speed control
control
system. The DC motor speed control system was implemented in an interface designed on Laboratory
Virtual Instrument Electronic Workbench (LabVIEW) environment and CompactRIO unit. The PID
parameters obtained with trial-error and two types auto-tuning methods were tested in the DC motor
control system and achieved results were compered. The results showed that performance of the PID
controller tuned with LAbVIEW auto-tuning method is better than others.

DC Motorun Otomatik Ayarlamalı PID ile Hız Kontrolünün


Gerçekleştirilmesi
Öz
Kontrol uygulamalarında gelişmiş kontrolörler kullanılsa da PID (Proportional-Integral-Derivative)
kontrolörler basit yapısından ve kolay uygulanabildiğinden dolayı endüstride tercih edilmektedir. Ancak
kontrol edilecek platforma uygun PID parametrelerinin ayarlanması oldukça güç olabilmektedir. Bu
parametrelerin deneme yanılma yöntemiyle ayarlanması zaman ve iş kaybına sebep olmakla birlikte bu
Anahtar kelimeler
yolla tespit edilen parametrelerle ayarlanan kontrolörler yeterince verimli bir çalışma karakteristiği
Kendinden ayarlamalı
sunmayabilmektedir. PID parametrelerinin ayarıyla ilgili bu sorunların üstesinden gelebilmek için çok
PID; DC motor;
LabVIEW; CompactRIO, sayıda otomatik ayar yöntemi geliştirilmiştir. Bu makalede Åström ve Hägglund tarafından önerilen
otomatik ayar yöntemi bir DC motoru hız kontrol sistemine uygulanmıştır. Bu DC motor hız kontrol
Hız Kontrol
sistemi LabVIEW (Laboratory Virtual Instrument Electronic Workbench) ortamında geliştirilen ara yüz
ve CompactRIO ünitesi üzerinde gerçekleştirilmiştir. Deneme yanılma ve iki farklı otomatik ayarlama
yöntemiyle elde edilen PID parametreleri DC motor kontrol sistemi üzerinde denenmiş ve elde edilen
sonuçlar karşılaştırılmıştır. Sonuçlar, LabVIEW otomatik ayarlama yöntemiyle elde edilen
parametrelerle işletilen PID kontrolörün daha iyi performans gösterdiğini göstermiştir.
© Afyon Kocatepe Üniversitesi

1. Introduction systems and the steady-state characteristic of


various operating conditions. Moreover, the PIDs
Today, proportional-integral-derivative (PID) can be simply applied to many areas of the
controllers are still popular in the industry. The PID industry.
has become a popular controller because of its The PIDs show rapidly improvement with their
good performance of in many linear or nonlinear ability to be digitally implemented on
Performing Speed Control of a DC Motor with Auto-Tuning PID, Çınar vd.

programmable platforms such as microcontrollers. technique was tested in the laboratory on a


Many advanced control application such as self- coupled tank and good results was showed. Elmas
tuning, and adaptive PID controllers can be easily et al. (2009) mentioned that high performance
applied with the using microcontrollers. The PID cannot be achieved with conventional PI
parameters are very important for the controlled controllers because of the nonlinear characteristic
system. Unfortunately, tuning the parameters is of switched reluctance motors. They suggested the
manually difficult, and this requires some need to adapt PI coefficients to achieve good
information related to the system and the performance under different speeds and loads, and
controller. In addition to, after manually tuning the they used a fuzzy logic controller for this
PID parameters, it may be necessary to re-tune the adaptation. Levy et al. (2012) present a PID auto-
PID parameters depending on the system dynamics tuning application based on Åström and Hägglund's
and disturbances. Because of these difficulties, method for industrial programmable logic
new methods are presented for automatically controller (PLC) platforms. Kadu et al. (2015)
tuning the PID parameters. Procedure of the auto- realized the PID auto-tuning using relay based
tuning is consist of two step; firstly some tuning method for two different process.
experiments are made to definite the system
characteristic, secondly parameters are calculated In this paper, we presented a speed control of DC
by an algorithm. In the industry, the Ziegler-Nichols motor with auto-tuning PID. The auto-tuning PID
(ZN) method is widely used to set automatically PID was performed on a Laboratory Virtual Instrument
parameters. In the ZN method, an oscillation is Electronic Workbench (LabVIEW) based platform
created on the system output, and the oscillation with a simple and robust control structure. The
of critical frequency and amplitude are platform was equipped with CompactRIO (CRIO)
determined. After determining the critical unit to control and observe the industrial process.
frequency and amplitude, the PID parameters can Thanks to this platform, PID experiments was
be calculated using ZN rule table. Because of the ZN performed more easily and reliably and results was
methods is continuously executed under simultaneously observed via interface. The main
supervision and control, it is time consuming for contribution of this article is to introduce an
practical application (Bolat et al. 2005, Tan et al. experimental design in which PID parameters can
2001, Jahanshahi et al. 2015). In the literature, a lot be produced in a very simple manner.
of studies have been carried out using the relay
method (Ho et al. 1996, Liu et al. 2008, Hang et al.
2002). Some studies related to PID tuning are 2. Materials and Methods
listed;
In this section PID auto-tuning methods applied in
Marchetti et al. (2002) present an auto-tuning of this paper and DC motor speed control system are
multivariable system application on distributed presented.
control system. Wei et al. (2010) propose a simple
method to auto-tune PID controller based on a 2.1. Auto-tuning methods
modified relay feedback. The method was applied
to pulp consistency control in pulp preparation and In this paper, two auto-tuning methods used to
flowing section of paper machine and good tune the PID parameters. First one of the methods
performances was taken. Ho et al. (2003) auto- is an auto-tuning method named as relay feedback
tuned the PID controller the relay experiment using and it is used in LabVIEW/PID toolbox. Second one
iterative feedback tuning technique. The proposed is MATLAB auto-tuning method and it is used to
691
Performing Speed Control of a DC Motor with Auto-Tuning PID, Çınar vd.

compare LabVIEW auto-tuning method. These


auto-tuning methods is detail presented.

2.1.a. Auto-tuning methods with relay feedback: In


order to achieve maximum performance and
system efficiency, it is necessary to adjust the PID
parameters according to process dynamics and
disturbance effects. Determination of the PID
parameters by trial and error method causes time Figure 1. Principle diagram of PID tuning method with
loss and system performance is negatively affected relay feedback.
too. For this reason, it has become important to
determine the PID controller parameters using The critical period (Tc) and gain (Kc) values of the
advanced tuning techniques (Hang et al. 2002). oscillation can be calculated from the system
response given Figure 3. In the practical
Åström and Hägglund propose a PID tuning method applications, the critical period is calculated
known as relay feedback in 1984 (Wei et al. 2010). determining zero crossing point of the oscillation.
This tuning method is based on the determination
of critical gain and critical frequency values. The The critical frequency (ωc) is calculated by the
tuning method is illustrated with the block diagram formula (1) using of the critical period (Tc) value.
(Figure 1). The PID controller and, relay are
activated with (a), and (b) position of switch, 2𝜋
𝜔𝑐 = (1)
respectively. 𝑇𝐶

In this method, to systematically determine the PID The critical gain (Kc) is calculated using the equation (2).

parameters, the system must first be steady-state.


4𝑑
Then the switch shown in Figure 1 is taken to 𝐾𝑐 = (2)
𝜋√𝑎2 − 𝜀 2
position (b), and an oscillation is started on the
system output. Any control system generally where;
increases its output, when increasing is occurred in d = relay amplitude, V
its input. When the output over the set value, the a = amplitude of oscillation signal, V
relay signal is applied in the reverse direction and ε = hysteresis value, s
the system is allowed to enter the oscillation (de
Sousa Neves 2009). The relay and system response Using the critical values of 𝑇𝑐 , and 𝐾𝑐 , the PID gain
signals are given in Figure 2 and 3, respectively. It is values are calculated with the ZN rule table (Table
observed that the system enters the oscillation 1).
state due to the relay signal.

Table 1. Table of ZN calculation according to 𝑇𝑐 and 𝐾𝑐 .


Controller KP Ki Kd
P 0.5KC - -
PI 0.45KC TC/1.2 -
PID 0.6KC TC/2 TC/8

692
Performing Speed Control of a DC Motor with Auto-Tuning PID, Çınar vd.

Figure 4. MATLAB/PID Tuner tool window

In the study, PID parameters were computed using


the pidTuner. DC motor supply voltage (Input) and
rotor speed (output) signals were acquired from DC
motor driving system, and the acquired data were
Figure 2. Relay signal - ur(t).
imported to the pidTuner. After the importing data,
pidTuner was automatically computed the PID
parameters according to the selected PID type.

2.2. System components

In this study, to tune parameters of the PID


controller which is realize controlling of a DC
motor, PC based test platform was used. The
platform was equipped with a DC motor, a DC
generator coupled with DC motor, an amplifier
circuit of DC motor, and a CompactRIO data
acquisition module. The CompactRIO module is
produced by National Instrument (NI) company
Figure 3. Response signal of the system - y(t). and, it performs some features such as
conditioning of feedback and control signals. The
2.1.b MATLAB auto-tuning method: MATLAB system components are presented detail in below.
software is widely used academic studies. MATLAB
software has a lot of toolbox, and there are some 2.2.a. Motor-generator unit: This unit is composed
auto-tuning tools such as “pidTuner” for PID tuning of coupling DC motor and generator to realize DC
jobs. The pidTuner can compute the PID motor speed control process (Figure 5). Speed
parameters considering to plant transfer function value of DC motor is converted to voltage by a
or input-output data of plant. transducer. The model specifications are given;

The pidTuner can be run typing "pidTuner" in Supply voltage range: ±15Vdc symmetrically
MATLAB command window (Figure 4). In the PID DC motor power: 10W
tuner tool, input-output data of the plant are firstly Maximum speed of DC motor: 300rpm
Output voltage range of DC generator: 0 20Vdc
imported, then plant is identified, and PID
Output resolution of speed transducer: 1mV/rpm
parameter are finally computed according to the
identified plant.

693
Performing Speed Control of a DC Motor with Auto-Tuning PID, Çınar vd.

2.2.d. Software environment: Interface used to


control the DC motor system is designed with
LabVIEW software. The LabVIEW is putted by NI
company on the market in early 1980s. The
LabVIEW is an object-oriented software focused
measuring and instrumentation. Because highly
capable of process control and data acquisition
process control applications are easily
Figure 5. PID controller experimental setup. implemented with the LabVIEW (Kutlu and Turan
2010).
2.2.b. Amplifier circuit: The circuit is formed with
inverter and non-inverter two amplifier circuits. An interface was designed with the LabVIEW
The amplifier gains are +1 and -1, respectively. The (Figure 6). In the interface some components were
amplifier specifications are given; indicated by frame and number. These were;
program control buttons (1), PID gains and PID
Supply voltage range: ±15Vdc symmetrically
initial gains (2), auto tuned PID gains (3), graphical
Input voltage range of the amplifier: -10−+10Vdc
chart of control and system output and set point
2.2.c. CompactRIO unit: The CompactRIO (CRIO) is signals (4), and controller setting components (5).
a unit to control and observe the industrial process,
and it is putted by NI company on the market. The 3. Results and Discussion
CRIO is a compact system combined with real time
controller and field programmable gate array Firstly system components; motor-generator,
(FPGA). The CRIO specifications are given; amplifier, and CRIO modules were setup as making
the mechanical and electrical connections. Than
Supply voltage range: 19−30Vdc system was supplied by symmetric DC power
Processor frequency: 400MHz supply. Finally, communicate between the
FPGA type: Spartan-6LX25 experimental setup and interface were obtained
DRAM capacity: 128MB
via Ethernet port (Paç and Nadar 2008). After the
Internal memory: 256MB
system setup we started the PID controller tests.

Figure 6. Interface designed for auto tuning.

694
Performing Speed Control of a DC Motor with Auto-Tuning PID, Çınar vd.

PID parameters were manually adjusted with trial 4. Conclusion


and error, and system was run with these
parameters. After this the system output was come In this study, it is aimed to automatically tune the
close to set point, and then tuning mode was PID parameters. The PID parameters tuned to using
switched to automatic mode. In this manner, PID trial-error, MATLAB and LabVIEW auto-tuning
parameters were automatically adjusted. methods were applied to the system and obtained
results were comparatively examined. The data
PID parameters were manually adjusted with trial collected from the system were transferred by CRIO
and error, and system was run with these to the interface. Time interval of data acquisition
parameters. After this the system output was come was set to 50ms for this study. This was caused that
close to set point, and then tuning mode was some program blocks which has smaller than 50ms
switched to automatic mode. In this manner, PID time interval could not be run. To overcome this
parameters were automatically adjusted. problem data acquisition and tuning time intervals
can be decreased. In this study any load or distortion
The PID parameters tuned with trial-error, MATLAB was not applied to the DC motor, these can be
and LabVIEW auto-tuning methods were applied to applied and their effects can be examined. Than a
the system, and step responses of the system were self-tuning controller can be developed in the
compared. In the Figure 7, black, red, blue, and future.
green graphs were represented set point signal,
LabVIEW auto-tuning (purposed), MATLAB auto- References
tuning and trial-error tuning step response signals, Bolat, E.D., Erkan, K. and Postalcıoğlu, S., 2005.
respectively. The results were shown that in case of Experimental Autotuning PID Control of Temperature
LabVIEW auto-tuning low overshoot and short Using Microcontroller. EUROCON, Serbia &
settling time values were achieved according to Montenegro, Belgrade, 266-269.
trial-error and MATLAB auto-tuning methods.
de Sousa Neves, M.G., 2009. Relay method on auto-
tuning automation solutions, Universidade Técnica de
Lisboa, Instituto Superior Técnico.

Elmas, Ç., Akcayol, M.A. and Yiğit, T., 2009. Bulanık PI


Denetleyici ile Bir Anahtarlamalı Relüktans Motorun
Hız Denetimi, Gazi Üniv. Müh. Mim. Fak. Der., 22/1,
65-72.

Hang, C.C., Aström, K.J. and Wang, Q.G., 2002. Relay


feedback auto-tuning of process controllers — a
Figure 7. DC motor speed variation accordingly PID tuning tutorial review, Journal of Process Control, 12/1, 143-
methods. 162.

Table 2. 𝑲𝑷 , 𝑻𝒊 , and 𝑻𝒅 parameters for tuning methods Ho, W.K., Feng, E.B. and Gan, O.P., 1996. A Novel Relay
Tuning Auto-Tuning Technique for Processes With
KP Ti Td
methods Integration, Control Eng. Practice, 7/4, 923-928.
Trial-error
0.0002 0.0003 0.000004
tuning Ho, W.K., Hong, Y., Hansson, A., Hjalmarsson, H. and
MATLAB auto- Deng, J.W., 2003. Relay auto-tuning of PID controllers
0.00495 0.0035 0.0007
tuning using iterative feedback tuning, Automatica, 39, 149-
LabVIEW auto- 157.
tuning 0.002874 0.002417 0.00058
(purposed)

695
Performing Speed Control of a DC Motor with Auto-Tuning PID, Çınar vd.

Jahanshahi, E., Sivalingam, S. and Schofield, J.B., 2015.


Industrial test setup for autotuning of PID controllers
in large-scale processes: Applied to Tennessee
Eastman process, IFAC-PapersOnLine, 48, 469-476.

Kadu, C.B., Bhusal, S.B. and Lukare, S.B, 2015. Autotuning


of Pid Controller for Robot Arm and Magnet Levitation
Plant, International Journal of Research in Engineering
and Technology, 4/1, 186-193.

Kutlu, A. and Turan, C., 2010. Elektronik Deney


Modüllerinin Labvıew ile Kontrolü, SDU International
Journal of Technologic Sciences, 2/3, 1-8.

Levy, S., Korotkin, S., Hadad, K., Ellenbogen, A., Arad, M.


and Kadmon, Y., 2012. PID autotuning using relay
feedback, IEEE 27th Convention of Electrical and
Electronics Engineers in Israel, Eilat, 1-4.

Liu, T. and Gao, F. 2008. Relay-Based Autotuning of PID


Controller for Improved Load Disturbance Rejection,
Proceedings of the 17th World Congress The
International Federation of Automatic Control, Seoul,
Korea, July 6-11, 10933-10938.

Marchetti, G., Scali, C. and Romagnoli, J.A., 2002. Relay


Autotuning Of Multivariable Systems: Application To
An Experimental Pilot-Scale Distillation Column, 15th
Triennial World Congress of the International
Federation of Automatic Control, Barcelona, 21–26
July, 127-132.

Paç, M.R. and Nadar, A., 2008. Hidroelektrik Santral (HES)


Otomasyonu için Ethernet Tabanlı Bir Haberleşme Alt-
Sistemi Tasarımı, Elektrik-Elektronik-Bilgisayar
Mühendisliği Sempozyumu ve Fuarı 26-30 Kasım
(ELECO-2008), Bursa, 1-5.

Tan, K.K., Lee, T.H. and Jiang, X., 2001. On-line relay
identification, assessment and tuning of PID
controller, Journal of Process Control, 11, 483-496.

Wei, T., Zhongfeng, W., Jinguo, Z. and Mengxiao, W.,


2010. A Relay Feedback Based Autotuning PID
Controller and Its Application to Pulp Consistency
Control, Proceedings of the 29th Chinese Control
Conference, Beijing, 3406-3410.

696

You might also like