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

Department of Avionics Engineering

Modern Control Systems

Experiment No.4

Analysis and Design of PID controller with control parameters in


MATLAB and SIMULINK

Prepared for

By:

Name:
ID:
Section:
Semester:

Total Mark:_____________
Obtained Marks:________
Signature:___________
Date:__________________
Objectives

• To learn the need of controller


• Types of Basic Controllers (P, I and D Controllers) and their properties.
• Controller combinations (PI, PD and PID Controllers) and their properties.
• PID tunning by MATLAB.
• Comparative performance analysis of PI, PD and PID Controllers.
Theory:

Why we need Controllers?

Performance of a system is usually analyzed on few basic parameters. These parameters are of time
domain as well as of frequency domain. Following are parameters:

Domain Parameters Desired Value Effect of Parameter

Lower value makes system's


Rise Time (𝑇𝑟) Lower is Better
response faster

Maximum Overshoot Lower value makes system more


Lower is Better
(𝑀𝑝) stable

Time Output settles faster to final


Settling Time (Ts) Lower is Better
Domain values if it has lower value

Lower is Better (Zero Output reaches to desired value


Steady State Error (𝑒𝑠𝑠)
required) if steady state error is zero

System becomes more stable


Phase Margin (PM) Higher is better
(More stability margins)

Gain crossover frequency


Frequency (𝑤𝑔) & Phase crossover 𝑤𝑝>𝑤𝑔 𝑤𝑝 > 𝑤𝑔 makes system stable
Domain frequency (𝑤𝑝)

• Controllers are actually system response modifiers.


• A controller is introduced with main plant transfer function in feed forward loop as shown below:

Different types of controllers:


Combination Mode
Basic Modes:
• Proportional + Integral (PI) Controller
• Proportional (P) Controller • Proportional + Derivative (PD) Controller
• Integral (I) Controller • Proportional + Integral + Derivative (PID)
• Derivative (D) Controller Controller

Proportional (P) Controller

• Proportional Controller is simply an amplifier.


• Its transfer function is 𝐺𝑐(𝑠)=𝐾𝑝 . It does not add any new pole or zero to the system.

With P-ControIIer, response of closed loop


system becomes faster. But maximum
overshoot also increases. The large value of Kp
can make system unstable.
P-ControIIer cannot handle steady state error.
It provides offset error too.

Derivative (D) Controller

• Its transfer function is 𝐺𝑐 (𝑠) = 𝐾𝑑 𝑠 . It adds a


zero to the system.
• D-Controllers give faster action when input

changes rapidly. However, D-Controllers are not


used alone.
• Because, if error e(t) is constant then its output is zero and hence actuator's output will also be
zero.
• Also, if error e(t) changes suddenly (Step) then output of D-controller will be impulsive.

Integral (I) Controller:

• Its transfer function is 𝐺𝑐(𝑠)= 𝐾 𝑠𝑖 It adds a pole and hence increases the order of the system

by 1.

• With I-Controller, offset error of P-


controllers is removed.
• Steady state error in step response is also
eliminated.
• However, system's response becomes
slightly slower.
• Oscillations in system's response
increase. Maximum overshoot increases.
This can make system
• unstable.

PID in MATLAB and SIMULINK:

In MATLAB, the best way to stabilize the plant response so to have the desired output response is by
using PID Tuner tool in both Simulink and MATLAB coding.

Syntax:

pidTuner(sys)

//Where “sys” will be your transfer function

Example:
Type of
Controller Required response
setting

Parameters
(kp, kd and ki)

Simulink Model:

Lab Task:

Lab Tasks:
Use PID tuner for the following transfer functions on MATLAB and change the stability
parameters to achieve a stable response with PI, PD and PID controller

a)

b)

Screenshot the graph and Parameters

Simulink Modeling:

On which P, I and D value the response of the plant will be as per given graph:

Figure 1: Graph without PID controller Figure 2: Graph with PID controller

You might also like