# PRT100Y1 Lecture Notes - Lecture 4: Pid Controller, Rise Time, Matlab

MIDDLE EAST TECHNICAL UNIVERSITY

ELECTRICAL AND ELECTRONICS

ENGINEERING DEPARTMENT

EE402- DISCRETE TIME CONTROL SYSTEMS

RECITATION 4 REPORT

P, PD, PI, PID CONTROLLERS

Group Members:

Sena TEMEL

Semih YAĞLI

Semih GÖREN

1

Table of Contents

Title

Page

Introduction

2

Aim of the Recitation

2

P Controller

3

P-I Controller

3

P-D Controller

3

P-I-D Controller

4

Simulations and Results to Find the Constraints on Loop Tuning

4

Loop Tuning

6

Manual Tuning Method

10

Ziegler-Nichols Method

10

Cohen-Coon Tuning Method

12

Transient Responses of P, PD, PI and PID controllers

14

Transient Response of P Controller

14

Transient Response of P-D Controller

24

Transient Response of P-I Controller

27

Transient Response of P-I-D Controller

30

Digital P-I-D Control

33

PID Controller Design for Controlling DC Motor Speed in the Project

38

The Block Diagram of the DC Motor Speed Control Loop

39

PID Parameters

40

The Design Requirements of the System

40

The Schematic of the DC Motor

40

The Parameters of the DC Motor

41

The open loop transfer function of the DC motor

41

s*-domain to z-domain with ZOH (only plant-DC motor)

45

The Step Response of the System with PID Controller

48

PID Controller Design for Controlling DC Motor Position in the Project

48

The Design Requirements of the System

50

The Transfer Function of the DC Motor with Zero Order Hold

53

Conclusions

57

Appendix

58

2

Introduction:

This report is written to analyze the recitation that was presented on 02.04.2013. The

recitation was presented by Sena TEMEL, Semih YAĞLI and Semih GÖREN. It was mainly

about P, P-D, P-I and P-I-D controllers, their digital versus continuous time realizations and

their characteristics including sampling period effects on the response of digital ones.

Moreover, position and velocity form of P-I-D control was modeled on the ‘Gate’ project.

Apart from these topics, P-I-D tuning methods such as manual tuning, Ziegler-Nichols tuning,

Cohen-Coon tuning and MATLAB tuning method were discussed. Transient performances of

P, P-D, P-I and P-I-D controllers were explained in detail. Modeling a discrete time P-I-D

controller to control a continuous time plant was explained over a MATLAB code introducing

the effect of sampling time and the choice of s*-domain to z-domain transformation method

on MATLAB. It was explained how to remove poles that cause instability in discrete time by

adding a new pole. Finally, it was shown how one could control the speed and position of the

vehicle using discrete time P-I-D controller on the ‘Gate’ project.

Aim of the Recitation:

Aim of the recitation was to introduce the concept of Discrete Time P-I-D controllers and how

they can be implemented on real life projects.

It was first intended to explain the usage of continuous time P-I-D controllers. In the first part

of the recitation, it was aimed to show the how P, P-I, P-I-D controllers change the steady

state response of the closed loop systems. Moreover, the methods to tune P-I-D controllers

were introduced. It was meant to show that how hard it could get to properly tune a P-I-D

controller. Secondly, it was intended to show how P, P-D, P-I, and P-I-D controllers affect the

transient response of the closed loop system. It was meant to show how one can gain a feature

but lose the other. Thirdly, it was intended to show how one should estimate the dynamics of

the continuous time plant and use proper sampling time for discrete time P-I-D controller. It

was also meant to show how changing transformation method may cause different pole

locations on the z-plane. Lastly, it was intended to show how one could control the velocity

and the position of the vehicle of the ‘Gate’ project by implementing a discrete time P-I-D

controller in that project.