Experiment No: -03 Date:-
To perform PID control strategy and PID tuning using MATLAB simulations.
+
Course Outcome 2: Develop the control strategies using MatLab Simulation Environment.
Introduction: - Consider the following unity feedback system
Figure 1:-Block diagram of Unity feedback System
Plant: A system to be controlled.
Controller: Provides excitation for the plant; Designed to control the overall system behavior.
The three-term controller: The transfer function of the PID controller looks like the following:
𝐾 + 𝐾𝐼 + 𝐾 𝑆 = 𝐾 𝑆2 + 𝐾 𝑆 + 𝐾
𝑃 𝐷 𝐷 𝑃 𝐼
𝑆
Where,
KP = Proportional gain
KI = Integral gain
KD = Derivative gain
First, let's take a look at how the PID controller works in a closed-loop system using the schematic
shown above. The variable (e) represents the tracking error, the difference between the desired input
value (R) and the actual output (Y). This error signal (e) will be sent to the PID controller, and the
controller computes both the derivative and the integral of this error signal. The signal (u) just past the
controller is now equal to the proportional gain (KP) times the magnitude of the error plus the integral
gain (KI) times the integral of the error plus the derivative gain (KD) times the derivative of the error.
𝑑𝑒(𝑡)
𝑢 = 𝐾𝑃𝑒(𝑡) + 𝐾𝐼 ∫ 𝑒(𝑡)𝑑𝑡 + 𝐾𝐷
𝑑𝑡
This signal (u) will be sent to the plant, and the new output (Y) will be obtained. This new output (Y)
will be sent back to the sensor again to find the new error signal (e). The controller takes this new error
signal and computes its derivatives and it’s internal again. The process goes on and on.
Consider the first order system and second order system
Assume P, I and D value is 1.
1
PID
s+1 Scope
Step PID Controller Transfer Fcn
Figure 2: - PID controller with First order System
1
PID
s2+s+1 Scope
Step PID Controller Transfer Fcn
Figure 3: - PID controller with Second order system
Simulink Model: -
Graph: -
• For first order system [p=1, i=1, d=0]
• For first order system[p=1.37, i=8.022, d=0]
• For Second order system[p=1, i=1, d=0]
• For second order system[p=0, i=4.69, d=0]
Marks Sign of Faculty