Vol. 05, No. 01, pp.121-230, June 2012

# COMPARISON PERFORMANCE OF DIFFERENT PID CONTROLLERS FOR DC MOTOR

Abidaoun H. shallal

Communication Engineering Dept./College of Engineering/ Diyala University

E-mail: Abidau_70@yahoo.com

(Received:2/6/2011; Accepted:13/11/2011)

**ABSTRACT:** Speed control of Dc motors is an important issue also shorter settling time is desired. In this work at first a parallel PID compensator which adjusted by Ziegler–Nichols is designed but Ziegler–Nichols don't apply directly for all structures of PID controller, drive equations to applied Ziegler–Nichols for this configuration of PID compensator. The controller design process requirements are discussed by programming. Then the comparison between the PID configurations shows that the PID controller significantly reduced the overshoot, settling time and has the best performance encountering with system uncertainties. According to the matlab programming version 7.10 results, the D*PI controller has better performance than the PID configuration.

**Keywords:** PID, structure.

## 1. INTRODUCTION

PID controllers are widely used in industrial plants because it is simple and robust. Industrial processes are subjected to variation in parameters and parameter perturbations, which when significant makes the system unstable. So the control engineers are on look for automatic tuning procedures.

From the control point of view, dc motor exhibit excellent control characteristics because of the decoupled nature of the field (1). Recently, many modern control methodologies such as nonlinear control (2), optimal control (3), variable structure control (4) and adaptive control (5) have been extensively proposed for DC motor. However, these approaches are either complex in theoretical bases or difficult to implement (6). PID control with its three term functionality covering treatment to both transient and steady-state response, offers the simplest and yet most efficient solution too many real world control problems (7). However, for best performance, the PID parameters used in the calculation must be tuned according to the nature of the system – while the design is generic, the parameters depend on the specific system. The PID controller calculation (algorithm) involves three separate parameters, and is accordingly sometimes called three term control: the proportional, the integral and derivative values, denoted P, I and D. The proportional value determines the reaction to the current error, the integral value determines the reaction based on the sum of recent errors, and the derivative value determines the reaction based on the rate at which the error has been changing. The weighted sum of these three actions is used to adjust the process via a control element such as the position of a control valve or the power supply of a heating element. Heuristically, these values can be interpreted in terms of time: P depends on the present error, I on the accumulation of past errors, and D is a prediction of future errors, based on current rate of change (8). By tuning the three constants in the PID controller
$$ \frac{4 K_{p2} K_{i2} K_{d2}}{K_{d2}^2 K_{p2}^2} = 4 \frac{K_{i2}}{K_{d2} K_{p2}} $$
$$ K_{i2} = K_{i1} \dotfill (14) $$

$$ K_{d2} = \frac{1}{\frac{1}{K_{d2}} + \frac{1}{2} \sqrt{\left(\frac{K_{p2}}{K_{d2}}\right)^2 - 4 \frac{K_{i2}}{K_{d2}}}} \dotfill (15) $$

ii – By comparison equations (2) and (5) we get

$$ K_{i1} = K_{i4} \dotfill (16) $$

$$ \frac{2 K_{p2}}{2 K_{d2}} + \frac{1}{2} \sqrt{\left(\frac{K_{p2}}{K_{d2}}\right)^2 - 4 \frac{K_{i2}}{K_{d2}}} = K_{i4} \dotfill (17) $$

$$ \frac{1}{2} \frac{K_{p2}}{K_{d2}} - \frac{1}{2} \sqrt{\left(\frac{K_{p2}}{K_{d2}}\right)^2 - 4 \frac{K_{i2}}{K_{d2}}} = \frac{K_{p2}}{K_{d2}} \dotfill (18) $$

By addition

$$ \frac{K_{p2}}{K_{d2}} = K_{i4} + \frac{K_{p4}}{K_{d4}} $$
$$ \frac{K_{p2}}{K_{d4}} = \frac{K_{p4} + K_{i4} K_{d4}}{K_{d4}} $$
$$ K_{p4} = K_{p1} - K_{i4} K_{d4} \dotfill (19) $$

## 4. RESULTS AND DISCUSSION

After substituting the values of $K_{p1} = 13.2$, $K_{i1} = 132$ & $K_{d1} = 0.33$ in equations (12), (14), (15), (16), (17) & (19) we get the following results

$$ K_{p3} = 6.6, \quad K_{i3} = 132, \quad K_{d3} = 0.05 $$

$$ K_{p4} = 6.6, \quad K_{i4} = 20, \quad K_{d4} = 0.33 $$

substituting the above results in figures (1), (3) & (4) and by using Matlab version 7.10, we get the same output; this illustrates as shown in figure (6) and around this values we get the values of $K_{p}$, $K_{i}$ & $K_{d}$ to minimize the maximum peak overshoot and settling time, this results are illustrated in table (2). From table (2) we get the same results for many PID configuration but different values of $K_{p}$, $K_{i}$ & $K_{d}$, these values are lower than any values of configurations of PID when we use D*PI configuration. therefore D*PI configuration is better than another configuration of PID controller. We made tuning on the type PI-D from PID controller and we get the results are illustrated in table (3). From table (3) we get the best result when the values $K_{p2} = 5$, $K_{i2} = 1$ & $K_{d2} = 0.1$ and we get MP = 0% & ts = 0.0747 sec. From table (2) the best output response when the values $K_{p3} = 1.973935317$, $K_{i3} = 1$ & $K_{d3} = 0.026064683$ and we get MP = 2% & ts=0.0261 sec, this values of MP & ts are suitable for this system because of the MP don't increase the tolerance and the ts is suitable too this illustrated in figure (7).

## 5. CONCLUSIONS

The Dc motor speed control needs the accuracy, because the overshooting state and steady-state error affect motor operation and response. The design and implementation of a dc motor speed system using many types from PID controller have been presented in this project. We find the parameters for the PID controller by Ziegler-Nichols at first, and by trying and error we find these parameters for many types from PID controller. Ziegler-Nichols method applied only in parallel PID controller, we make the mathematical algorithm which can be used in
Ziegler - Nichols method for all type of PID. By comparison these types, we find D*PI controller is the best type from PID for lower values from gains. According to the results the PID controller has the better performance encountering with noise and disturbance and parameter variation.

## 6. REFERENCES

[1] Raghavan S., 2005. "Digital Control for Speed and Position of a DC Motor", MS Thesis, Texas A&M University, Kingsville.

[2] Weerasooriya S., El-Sharkawi M. A., 1991. "Identification and control of a DC motor using back propagation neural networks", IEEE Trans. Energy Conversion, Vol. 6, p. 663-669.

[3] Reyer J. A., Papalambros P. Y., 2000. "An Investigation into Modeling and Solution Strategies for Optimal Design and Control", ASME Design Engineering Technical Conferences, Las Vegas, Nevada, Sep, p. 10-13.

[4] Lin F. J., Shyu K. K., Lin Y. S., 1999. "Variable structure adaptive control for PM synchronous servo motor drive", IEE Proc. IEE B:Elect. Power Applicat., vol. 146, Mar., p. 173-185.

[5] Rubaai A., Kotaru R., 2000. "Online identification and control of a DC motor using learning adaptation of neural networks", IEEE Trans. Industry Application, Vol. 36, p. 935-942.

[6] Lin C. L., Jan H. Y., 2002. "Evolutionarily multi-objective PID control for linear brushless DC motor", in Proc, IEEE Int. Conf. Industrial Elect. Society, Nov., p. 39-45.

[7] Ang K., Chong G., Li Y., 2005. "PID control system analysis, design, and technology", IEEE Trans. Control System Technology, vol. 13, p. 559-576.

[8] www.scribd.com/doc/42743447/PID 16 nov. 2010

[9] Ziegler J.G., Nichols N.B., 1942. "Optimum settings for automatic controllers", Trans. ASME 64, p. 759-768.

[10] Astrom K.J., Hagglund T., 2001. "The future of PID control", Control Engineering Practice 9, p. 1163-1175.

[11] Sharifian M.B.B., Rahnavard R. and Delavari H., 2009. "Velocity Control of Motor Based Intelligent methods and Optimal Integral State Feedback Controller", International Journal of Computer Theory and Engineering, Vol. 1, No. 1.

## LIST OF SYMBOLS

<table><tr><td>T</td><td>Time</td></tr><tr><td>E</td><td>Error</td></tr><tr><td>L</td><td>Delay time</td></tr><tr><td>T</td><td>Delay constant</td></tr><tr><td>y(t)</td><td>Dc motor velocity (step response)</td></tr><tr><td>u(t)</td><td>Dc motor input</td></tr><tr><td>r(t)</td><td>Reference input (step function)</td></tr><tr><td>e(t)</td><td>Error between Dc motor velocity and reference input</td></tr><tr><td>Mp</td><td>Maximum peak overshoot</td></tr><tr><td>Ts</td><td>Settling time</td></tr></table>
LIST OF ABBREVIATIONS

<table><caption>Table (1): Ziegler - Nichols Recipe – First Method.</caption><tr><td>P</td><td>Proportional</td></tr><tr><td>I</td><td>Integral</td></tr><tr><td>D</td><td>Derivative</td></tr><tr><td>PID</td><td>Proportional – Integral – Derivative</td></tr><tr><td>PD</td><td>Proportional – Derivative</td></tr><tr><td>PI</td><td>Proportional – Integral</td></tr><tr><td>K<sub>p</sub></td><td>Proportional gain</td></tr><tr><td>K<sub>i</sub></td><td>Integral gain</td></tr><tr><td>K<sub>d</sub></td><td>Derivative gain</td></tr><tr><td>T<sub>d</sub></td><td>Derivative time</td></tr><tr><td>T<sub>i</sub></td><td>Integral time</td></tr><tr><td>D*PI</td><td>Serial controller</td></tr></table>

<table><caption>Table (2): MP & settling time for different structure of PID.</caption><thead><tr><th>Type of controller</th><th>K<sub>p</sub></th><th>T<sub>i</sub></th><th>T<sub>d</sub></th></tr></thead><tbody><tr><td>P</td><td>T/L</td><td>∞</td><td>0</td></tr><tr><td>PI</td><td>0.9T/L</td><td>L/0.3</td><td>0</td></tr><tr><td>PID</td><td>1.2T/L</td><td>2L</td><td>0.5L</td></tr></tbody></table>

<table><thead><tr><th>PID<br>(K<sub>p</sub><sub>1</sub>, K<sub>i</sub><sub>1</sub>, K<sub>d</sub><sub>1</sub>)</th><th>D*PI<br>(K<sub>p</sub><sub>2</sub>, K<sub>i</sub><sub>2</sub>, K<sub>d</sub><sub>2</sub>)</th><th>I*PD<br>(K<sub>p</sub><sub>3</sub>, K<sub>i</sub><sub>3</sub>, K<sub>d</sub><sub>3</sub>)</th><th>Mp(%)</th><th>Settling time(sec)</th></tr></thead><tbody><tr><td>0.496639<br>1.091<br>0.00599889</td><td>0.483091272<br>1.091<br>0.012417715</td><td>0.013547727<br>80.53011013<br>0.00599889</td><td>9.48</td><td>0.176</td></tr><tr><td>2<br>1<br>0.04</td><td>1.9797959<br>1<br>0.0202041</td><td>0.0202041<br>49.4949<br>0.04</td><td>5.18</td><td>0.0677</td></tr><tr><td>2<br>1<br>0.05</td><td>1.974679434<br>1<br>0.025320565</td><td>0.025320565<br>39.49358869<br>0.05</td><td>2.32</td><td>0.051</td></tr><tr><td>2<br>1<br>0.0512</td><td>1.974063653<br>1<br>0.025936347</td><td>0.025936347<br>38.55593072<br>0.0512</td><td>2.05</td><td>0.0461</td></tr><tr><td>2<br>1<br>0.0513</td><td>1.97401232<br>1<br>0.025987679</td><td>0.029835657<br>38.47977232<br>0.0513</td><td>2.03</td><td>0.0454</td></tr><tr><td>2<br>1<br>0.0514</td><td>1.973960985<br>1<br>0.026039015</td><td>0.026039015<br>38.403901021<br>0.0514</td><td>2.01</td><td>0.0443</td></tr><tr><td>2<br>1<br>0.05145</td><td>1.973935317<br>1<br>0.026064683</td><td>0.026064683<br>38.36608972<br>0.05145</td><td>2</td><td>0.0261</td></tr><tr><td>2<br>1<br>0.09</td><td>1.953939201<br>1<br>0.04606798</td><td>0.04606798<br>21.71043557<br>0.09</td><td>0</td><td>0.0559</td></tr></tbody></table>
<table><caption>Table (3): MP & settling time for PI-D controller.</caption><thead><tr><th>PI-D<br>(K<sub>p1</sub>, K<sub>i1</sub>, K<sub>d1</sub>)</th><th>Mp(%)</th><th>Settling time (sec)</th></tr></thead><tbody><tr><td>2, 1, 0.025</td><td>7.97</td><td>0.0911</td></tr><tr><td>5, 1, 0.05</td><td>6.77</td><td>0.0583</td></tr><tr><td>5, 1, 0.06</td><td>2.71</td><td>0.0551</td></tr><tr><td>5, 1, 0.07</td><td>0.44</td><td>0.0416</td></tr><tr><td>5, 1, 0.1</td><td>0</td><td>0.0747</td></tr></tbody></table>

<figure><img src="image_1.png" /><figcaption>Fig.(1): Parallel PID controller.</figcaption></figure>

<figure><img src="image_2.png" /><figcaption>Fig.(2): PI-D controller.</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>Fig.(3): Serial (D*PI) controller.</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>Fig.(4): Serial (I*PD)controller.</figcaption></figure>
<figure><img src="image_5.png" /><figcaption>Fig.(5): Response Curve for Ziegler-Nichols First Method.</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>Fig.(6): Output response with PID controller.</figcaption></figure>

$$K_{p1} = 13.2, K_{i1} = 132 \& K_{d1} = 0.33$$

$$K_{p2} = 6.6, K_{i2} = 132 \& K_{d2} = 0.05$$

$$K_{p3} = 6.6, K_{i3} = 20 \& K_{d3} = 0.33$$

$$\text{M.p}(\%) = 1.54 \text{ & ts= } 0.00504 \text{ sec}$$

<figure><img src="image_7.png" /><figcaption>Fig.(7): Output response with PID controller</figcaption></figure>

$$K_{p1} = 2, K_{i1} = 1 \& K_{d1} = 0.05145$$

$$K_{p2} = 1.973935317, K_{i2} = 1 \& K_{d2} = 0.026064683$$

$$K_{p3} = 0.026064683, K_{i3} = 38.36608972 \& K_{d3} = 0.05145$$

$$\text{M.p}(\%) = 2 \text{ & ts= } 0.0261 \text{ sec}$$
# أدا عقارنة لأجهزة سيطرة PID المختلفة لمحرك ذو تغذية مستمرة

عبدعون حمدان شلال

قسم هندسة الاتصالات / كلية الهندسة/ جامعة ديالى

## الخلاصة

السيطرة على سرعة المحركات ذات التغذية المستمرة مهمة بالإضافة إلى ذلك منشورة لتصميم أقصر زمن استقرار للمنظمة ، في هذا البحث تم ضبط تعديل PID وتصميمه بواسطة طرق ( Ziegler - Nichols ) بعد ذلك صممنا تعديل النظام بواسطة عدة تراكيب من PID ولكن ( Ziegler - Nichols ) لا يمكن تطبيقها على الأنواع الجديدة مباشرة ، لذلك تم اشتقاق معادلات تفاضلية لغرض تطبيق ( Ziegler - Nichols ) مباشرة على جميع التراكيب في هذا البحث ، من خلال النتائج وجدنا أن D*PI هو أفضل تركيب من تراكيب ال PID وذلك لأنه يستخدم أقل قيم ويعطينا نفس النتائج ، البرمجة بواسطة ( Matlab V . 7.10 ) ملائمة لإظهار هذه النتائج .
الكلمات الدالة : جهاز السيطرة PID ، تركيب.