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

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

net/publication/339292312

PI Controller Research and Design

Conference Paper · August 2018

CITATIONS READS
0 1,152

3 authors, including:

Ma'Moun Abu-Ayyad
Pennsylvania State University-Harrisburg
59 PUBLICATIONS   198 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

A nonlinear model-based predicitve controller for injection speed View project

Technical SCIENCE ⚙ View project

All content following this page was uploaded by Ma'Moun Abu-Ayyad on 15 February 2020.

The user has requested enhancement of the downloaded file.


PI Controller Research and Design
Elisha Kossove
MC REU
Summer 2018
Faculty Advisors:
Dr. Ma’Moun Abu-Ayyad
Dr. Vittal Prabhu
Page |2

Abstract
Process control is a crucial part of many industrial processes. Since many machines provide
outputs that are unpredictable or do not meet the exact needs, a controller can help to refine the
output to what is needed. For this research, PI controllers were developed for controlling the
speed of a DC Servo Motor and for controlling temperature of a cylinder of an Injection Molding
Machine. The first process was very fast (only a few seconds) while the second was very slow
(several hours). However, each seemed to follow a similar trend with the different controllers
that were tested. A controller was found for each that would minimize the percent overshoot and
settling time. This is important because it will help to eliminate error in the processes.

Introduction
Controllers are widely used in many industries today, as they help to regulate processes that
would otherwise be unpredictable or not give the response needed. There are many different
types of controllers today and research is continuing in finding better and more improved
designs. The two main types of controllers are linear and non-linear. Most systems have a least
a small degree of non-linearity to them. Many are extremely non-linear. For this reason, non-
linear controllers often can provide better results. However, the downside to these is that the
math and theory needed to begin designing them is extremely advanced. Linear controllers on
the other hand can be modeled relatively easily and often can provide very good results.
For this research, a specific type of linear controller, the PI controller was explored. First, two
main design methods were explored. These were the Root Locus Method and the Theoretical
Method. Next, these were then applied to two different experimental setups to determine the
ideal controller for each. One experiment was to control the speed of a DC Servo Motor. The
other was to control temperature for a cylinder of an Injection Molding Machine.
As different design choices it was found that some were better than others as could be expected.
Additionally, some were found to not give close to the results needed. For each experiment, the
different choices along with conclusions are outlined.

Process Controls
The environments in which automatic control systems are used are often very unpredictable.
Controllers are therefore used to help make them more predictable and to meet the requirements
for the task for which they are being used. Much more literature has been written on linear
models as opposed to non-linear ones. One reason for this is that modeling linear models is far
easier than modeling non-linear ones [1].
Process controllers work to make a process approach some given set point according to certain
given parameters. A signal is sent to the controller with the current state of the system. The
controller then compares this to the set point. Using the difference between these two values (the
error) the controller makes the adjustment needed to move the system output to the set point. A
specific time interval is used for how often the signals are sent to the controller. Each time, the
above process is repeated [2].
Page |3

There have been many different Stochastic Model Predictive Controls (SMPC) that have been
used in systems. These include ones for linear as well as non-linear systems [3].
One type of controller is the Smith Predictor. A generalization of it has been developed that
controls linear time-invariant time-delay single-input single-output systems. Both combine a
stabilizing output-feedback controller with a predictor [4].
PI and PID controllers are regularly used in industry where an automatic controller is needed to
control a process [5].

PI Controller Design
The following steps will outline how a PI controller can be designed. There are two methods
that will be covered. The first is using root locus and the second is a theoretical method.
For both of these methods, the system must be represented in a transfer function of the form:
𝐾
𝐺𝑀 (𝑠) = 𝜏𝑠+1 (1)

K represents the gain of the system and τ represents the system’s time constant. Figure 1 is a
block diagram of the open loop system.

Figure 1: Block Diagram of System

The controller designed will have the form:


𝑘
(𝑠+ 𝑖 )
𝑘𝑖 𝑘𝑝
𝐺𝐶 (𝑠) = 𝑘𝑝 + = 𝑘𝑝 (2)
𝑠 𝑠

Figure 2 is a block diagram of the system with the controller.

Figure 2: Block Diagram of System with Controller

In addition, Overshoot Percentage (OS%) and Settling Time (Ts) must be chosen as design
specifications.
Root Locus Technique
The root locus technique designs the controller as follows. This involves locating a point that
satisfies the design specifications and then modifying the root locus to include that point.
Page |4

First the damping ratio is calculated using equation 3.


−ln (𝑂𝑆%)
𝜁= (3)
√𝜋 2 +ln (𝑂𝑆%)2

Second, the angle along which this damping ratio occurs on the root locus is calculated.
𝜙 = 𝑐𝑜𝑠 −1 (𝜁) (4)
Third, the natural frequency is calculated by rearranging equation 5.
4
𝑇𝑠 = 𝜁𝜔 (5)
𝑛

Fourth, the real portion of the point is obtained as follows.


𝑅𝑒𝑎𝑙 𝑃𝑜𝑟𝑡𝑖𝑜𝑛 = −𝜁𝜔𝑛 (6)
Finally, the imaginary portion is found using equation 7, where ωd represents the imaginary
portion.
𝜔𝑑
tan(𝜙) = (7)
𝜁𝜔𝑛

The angle criterion for root locus states that the sum of angles of lines drawn from poles minus
the sum of the angles of lines drawn from zeros to any point on the root locus must add up to an
odd multiple of 180° [6].
From the transfer function of the system, the root locus has one pole at -1/τ. With the controller
a second pole is added at the origin. The zero that the controller adds at -ki/kp is what must be
found. Using the angle criterion, a zero is added along the real axis such that the sum equals an
odd multiple of 180.
Theoretical Technique
Combining the controller with the system gives the transfer function:
𝐾(𝑘𝑝 𝑠+𝑘𝑖 )
𝐺(𝑠) = (8)
𝜏𝑠2 +𝑠

The formula for the closed loop transfer function of a unity feedback system is [locate source]:
𝐶(𝑠) 𝐺
= 1+𝐺 (9)
𝑅(𝑠)

This gives us:


𝐶(𝑠) 𝐾(𝑘𝑝 𝑠+𝑘𝑖 )
= 𝐾𝑘𝑝 +1 𝑘𝑘 (10)
𝑅(𝑠) 2
𝑠 +( )𝑠+ 𝑖
𝜏 𝜏

The form of the denominator is equivalent to that of the general characteristic equation for a
second order process. This can be given as:
𝑠 2 + 2𝜁𝜔𝑛 𝑠 + 𝜔𝑛2 (11)
Page |5

ζ is damping ratio and ωn is natural frequency.


This allows us to solve for kp and ki.
2𝜁𝜔𝑛 𝜏−1
𝑘𝑝 = (12)
𝐾
2𝜏
𝜔𝑛
𝑘𝑖 = (13)
𝐾

The following equations give ζ and ωn in terms of OS% and Ts.


−ln (𝑂𝑆%)
𝜁= (14)
√𝜋 2 +ln (𝑂𝑆%)2

4
𝜔𝑛 = 𝜁𝑇 (15)
𝑠

Using equations 12 through 15, kp and ki can be given in terms of OS% and Ts.
8𝜏−𝑇𝑠
𝑘𝑝 = (16)
𝐾𝑇𝑠

16𝜏(𝑙𝑛2 (𝑂𝑆%)+𝜋 2 )
𝑘𝑖 = (17)
𝐾𝑇𝑠2 𝑙𝑛2 (𝑂𝑆%)

Open Loop Test - Servo Motor


The first task was to design a controller to control the speed of a DC servo motor. In this case
the non-linearity of the system is low. The DC motor is coupled with a tachgenerator speed
transducer and the angular speed is the controlled variable. The setup is shown in Figure 1.

Figure 3:DC Servo Motor Setup

Data was accumulated and an ARX-Model was used to find a transfer function to fit the data.
The following is the MATLAB code and the graph that was generated. The graph shows the
error between the actual data and the best fit transfer function.
Page |6

[Add MATLAB Code]

Figure 4: Simulated Response Comparison

The gray line labeled “data_step” is the actual data of the system. The red line is the best fit first
order transfer function. As can be seen, the best fit is approximately 80%. Therefore, a PI
controller can be designed to help create a better fit given a percent overshoot and settling time.
Transfer Function for Model of System:
1
𝐺𝑀 (𝑠) = 0.2218𝑠+1 (18)

Design PI controller of form (kp will be assumed to be 1):


𝑘
(𝑠+ 𝑖 )
𝑘𝑝
𝑃𝐼𝑐𝑜𝑛𝑡𝑟𝑜𝑙𝑙𝑒𝑟 = 𝑘𝑝 (2)
𝑠

Example Calculation (Root Locus Method):


The following example shows calculations for the first design choice using the Root Locus
Method.
Design Choice: OS% = 5%; Ts = 0.5 seconds
−ln (0.05)
Damping Factor: 𝜁= = 0.690
√𝜋 2 +ln (0.05)2

Angle: 𝜙 = 𝑐𝑜𝑠 −1 (0.690) = 46.37°


Page |7

4 𝑟𝑎𝑑
Natural Frequency: 𝜔𝑛 = 0.690×0.5 = 11.59 𝑠

Location on real axis: −𝜁𝜔𝑛 = −0.690 × 11.59 = −8


Location on imaginary axis: 𝜔𝑑 = 8 × tan(46.37) = 8.39
1
Model Pole: 𝑝1 = − 0.2218 = −4.5086

Controller Pole: 𝑝2 = 0
8.39
Angles from each pole 𝜃1 = 180 − 𝑡𝑎𝑛−1 (8−4.5086) = 112.59°
8.39
to design point: 𝜃2 = 180 − 𝑡𝑎𝑛−1 ( ) = 133.64°
8

Angle of Controller Zero: 𝜃𝑧 = 133.64° + 112.59° − 180° = 66.23°


8.39
Controller Zero: 𝑧 = − [tan(66.23°) + 8] = −11.70

𝒔+𝟏𝟏.𝟕𝟎
Controller Design: 𝑷𝑰 = 𝒔

Figure 5 shows the root locus plot along with the pole and zero angles.

Figure 5: Root Locus Plot of System with Controller

Example Calculation (Theoretical Method)


The following shows calculations for the first design choice using the Theoretical Method.
Page |8

Design Choice: OS% = 5%; Ts = 0.5 seconds


8×0.2218−0.5
𝑘𝑝 = 1×0.5
= 2.549

16×0.2218×√log (0.05)2 +𝜋2


𝑘𝑖 = = 29.806
1×0.52 ×ln (0.05)2

𝑘𝑖 0.0054
𝑘𝑝
= 0.0332 = 11.69

𝒔+𝟏𝟏.𝟔𝟗
Controller Design: 𝑷𝑰 = 𝒔

From these two examples, it can be seen that both the Root Locus and the Theoretical Method
produce equivalent results.
Several other designs were tested and the results are shown in the table below.
Table 1: Open Loop Test – Servo Motor
Design Design Design Design Design
Choice 1 Choice 2 Choice 3 Choice 4 Choice 5
OS% 5 2 2 0.1 0.1
Ts 0.5 0.4 0.8 0.5 0.1
PI 𝑠 + 11.70 𝑠 + 10.61 𝑠 + 7.48 𝑠 + 6.726 𝑠 + 25.6
( ) ( ) ( ) ( ) ( )
𝑠 𝑠 𝑠 𝑠 𝑠

A block diagram was then created in Simulink to obtain the system response with each of the
controllers.

Figure 6: Simulink Block Diagram


Page |9

Figure 7: Response with Each Controller

Each response is identified by OS%/Ts in the legend. From these results, that the controllers 3
and 4 provide the best response. Both have a very low percent overshoot, while still maintaining
a small settling time. It should be noted that the percent overshoot and settling time of the output
graph may not be exactly the same as the design. However, it still is close and gives the general
trend. Finally, it can be seen that controller 5 is a poor choice. The overshoot percentage has
spiked and the settling time is not improved beyond the other choices. From these results,
controller 4 is chosen as the best one for this case. It has a very low percent overshoot as well as
settling time.

Open Loop Test – Left Cylinder for Injection Molding Machine


The second test was to design a controller to regulate the temperature of the left cylinder of an
Injection Molding Machine. The machine uses three steel cylinders that are each encased by
electrical heating bands (200 Watts each). The cylinders each have a radius of 25 mm and a
length of 150 mm. An ungrounded E-type thermocouple is used to measure the temperature of
each cylinder. The energy that heats each zone is manipulated via an electronic solid state relay
(one for each control variable) that is pulse width modulated (PWM) using a digital output which
can change state (high or low). The duty cycle used for the PWM signal has a fixed duration of 5
seconds, which is the sum of the high and low states. Figure 8 shows the setup for this test.
P a g e | 10

Figure 8: Injection Molding Machine Temperature Control

The following graph shows the best fit that could be found for a first order system.

Figure 9: Simulated Response Comparison

The gray line labeled “data_step” is the actual data of the system. The red line is the best fit first
order transfer function. As can be seen, the best fit is approximately 90%. Therefore, a PI
controller can be designed to help create a better fit given a percent overshoot and settling time.
P a g e | 11

Transfer Function for Model of System:


263
𝐺𝑀 (𝑠) = 24.315𝑠+1

Design PI controller of form (kp will be assumed to be 1):


𝑘
(𝑠+ 𝑖 )
𝑘𝑝
𝑃𝐼𝑐𝑜𝑛𝑡𝑟𝑜𝑙𝑙𝑒𝑟 = 𝑘𝑝 (2)
𝑠

Several different design choices were tested using the same process as with the Servo Motor.
Table 2 summarizes the results.
Table 2: Open Loop Test – Left Cylinder Injection
Molding Machine
Design Design Design Design
Choice 1 Choice 3 Choice 4 Choice 7
OS% 1 5 2 1
Ts 20 100 100 10
PI 𝑠 + 0.163 𝑠 + 0.0864 𝑠 + 0.0677 𝑠 + 0.3090
( ) ( ) ( ) ( )
𝑠 𝑠 𝑠 𝑠

Block diagrams for these controllers were then created using Simulink.

Figure 10: Block Diagram


P a g e | 12

Figure 11: Response with Each Controller

Each response is identified by OS%/Ts in the legend. This process was a very long, therefore the
time is given in minutes. From these results controllers 1 and 4 do not seem to be good options.
They both have a significantly larger percent overshoot than desired and their settling time is not
very good. However, both 2 and 3 have small overshoot and a reasonable settling time.
Controller 3 is chosen to be the best choice. It has the smallest overshoot and a very reasonable
settling time.

Conclusion/Next Steps
From this research I was introduced to the complexity and vastness of the control industry.
Specifically, I learned a large amount about PI controllers and how to design them. From the
two tests I did, I noted several main results. First, the design choice is not always reflected in the
actual output. Therefore, even though one choice may be what is desired, it may not be feasible
for the given system. Additionally, even though both systems were completely different and one
had a very long settling time, both produced a similar trend in results. A controller was able to
be designed to bring the percent overshoot and settling time within a certain amount. After this
point, the overshoot spiked and the settling time became worse.
In the future, I would like to run more sample calculations to more closely see how different
design choices affect the systems. In addition, I would like to learn to design other types of
controllers and see how they compare and differ with the PI controller.
P a g e | 13

References
[1] “System Identification: Linear vs. Nonlinear,” IEEE Transactions on Automatic Control, vol.
49, issue 8, p. 465, March 2004. Available: https://ieeexplore-ieee-
org.ezaccess.libraries.psu.edu/document/1273646/. [Accessed July 6, 2018].
[2] M. King, Process Control: a Practical Approach, 2nd ed. Isle of Wight, UK: John Wiley and
Sons, Ltd 2016. [E-book]. Available: Ebook Central.
[3] M. Farina, L. Giulioni, and R. Scattolini, “Stochastic linear Model Predictive Control with
chance constraints - A review,” Journal of Process Control, vol. 44, p. 53-67, August 2016.
Available:
http://apps.webofknowledge.com.ezaccess.libraries.psu.edu/InboundService.do?customersID
=ProQuest&mode=FullRecord&IsProductCode=Yes&product=WOS&Init=Yes&Func=Fra
me&DestFail=http%3A%2F%2Fwww.webofknowledge.com&action=retrieve&SrcApp=Su
mmon&SrcAuth=ProQuest&SID=8CtcV9eUuLEpq1WihgS&UT=WOS%3A000380973300
005. [Accessed July 6, 2018].
[4] R. Sanz, P. Garcia, and P. Albertos. “A generalized smith predictor for unstable time-delay
SISO systems,” ISA Transactions. vol 72, p. 197-204, January 2018. Available:
http://apps.webofknowledge.com.ezaccess.libraries.psu.edu/InboundService.do?customersID
=ProQuest&mode=FullRecord&IsProductCode=Yes&product=WOS&Init=Yes&Func=Fra
me&DestFail=http%3A%2F%2Fwww.webofknowledge.com&action=retrieve&SrcApp=Su
mmon&SrcAuth=ProQuest&SID=8CtcV9eUuLEpq1WihgS&UT=WOS%3A000424960100
019 [Accessed July 6, 2018]
[5] A. O’Dwyer, Handbook of PI and PID Controller Tuning Rules, 2nd ed. Covent Garden,
London: Imperial College Press 2006. [E-book]. Available: Ebook Central.
[6] N. S. Nise, Control Systems Engineering. John Wiley and Songs, Inc, 2011.

View publication stats

You might also like