Control 2 Lab Report
Control 2 Lab Report
2
Experiment Name:
Feedback System and PID Controller
Objective:
1. To model and analyze a feedback control system using MATLAB/Simulink.
2. To study the effect of different PID (Proportional, Integral, Derivative) parameters on the
dynamic response of a control system.
3. To observe and compare system behavior under various controller configurations using time-
domain simulations.
Theory:
A feedback control system continuously measures the output of a system and adjusts its input to
maintain the desired performance. It consists of a forward path, a feedback path, and a controller
that modifies the input signal based on the error between the desired and actual outputs. One
widely used controller in control systems is the PID controller, which incorporates three terms:
• Proportional (P): Provides control action proportional to the current error.
• Integral (I): Eliminates steady-state error by integrating the error over time.
• Derivative (D): Predicts future error based on its rate of change, improving system stability
and response time.
The combined PID control action enhances system performance by improving stability, reducing
overshoot, and decreasing settling time. In MATLAB, such systems are typically modeled using
transfer functions, and their time-domain responses (e.g., step responses) are analyzed to
evaluate the effectiveness of different PID parameter settings.
Program 1:
clc
clear all
s=tf('s');
p1=-3+4i;
p2=-3-4i;
G=1/((s-p1)*(s-p2))
H=1/(s+2)
sys= feedback (G,H)
step (sys)
Output:
Figure 1
Program 2:
clc
clear all
s=tf('s');
p1=-3+4i;
p2=-3-4i;
G=1/((s-p1)*(s-p2));
sys= feedback (G,1);
step (sys)
Output:
Figure 2
Program 3:
clc
clear all
s=tf('s');
p1=-3+4i;
p2=-3-4i;
G=1/((s-p1)*(s-p2));
kp=200;
ki=0;
kd=0;
cont=kp+ki/s+kd+s;
sys= feedback (G,cont);
step (sys)
Output:
Figure 3
Program 4:
clc
clear all
s=tf('s');
p1=-3+4i;
p2=-3-4i;
G=1/((s-p1)*(s-p2));
kp=0;
ki=100;
kd=0;
cont=kp+ki/s+kd+s;
sys= feedback (G,cont);
step (sys)
Output:
Figure 4
Program 5:
clc
clear all
s=tf('s');
p1=-3+4i;
p2=-3-4i;
G=1/((s-p1)*(s-p2));
kp=0;
ki=0;
kd=1;
cont=kp+ki/s+kd+s;
sys= feedback (G,cont);
step (sys)
Output:
Program 6: Figure 5
clc
clear all
s=tf('s');
p1=-3+4i;
p2=-3-4i;
G=1/((s-p1)*(s-p2));
kp=200;
ki=100;
kd=0;
cont=kp+ki/s+kd+s;
sys= feedback (G,cont);
step (sys)
Output:
Figure 6
Program 7:
clc
clear all
s=tf('s');
p1=-3+4i;
p2=-3-4i;
G=1/((s-p1)*(s-p2));
kp=0;
ki=100;
kd=1;
cont=kp+ki/s+kd+s;
sys= feedback (G,cont);
step (sys)
Output:
Program 8: Figure 7
clc
clear all
s=tf('s');
p1=-3+4i;
p2=-3-4i;
G=1/((s-p1)*(s-p2));
kp=200;
ki=0;
kd=1;
cont=kp+ki/s+kd+s;
sys= feedback (G,cont);
step (sys)
Output:
Figure 8
Program 9:
clc
clear all
s=tf('s');
p1=-3+4i;
p2=-3-4i;
G=1/((s-p1)*(s-p2));
kp=200;
ki=100;
kd=1;
cont=kp+ki/s+kd+s;
sys= feedback (G,cont);
step (sys)
Output:
Figure 9
Discussion: