Professional Documents
Culture Documents
INTERNATIONAL JOURNAL OF INNOVATIVE RESEARCH IN ELECTRICAL, ELECTRONICS, INSTRUMENTATION AND CONTROL ENGINEERING
Vol. 2, Issue 1, January 2014
Abstract: This paper presents the MATLAB simulation of control system and discusses open loop and closed loop
properties of control system. In this paper we start with transfer function of control system and their pole zero plots to
frequency response through MATLAB simulation coding. This paper also explains time domain and frequency domain
response of control system to different-different input, frequency domain analysis three techniques like root locus, bode
plot and nyquist plot are discussed. It is thus important to learn first how to generate transfer function and then applied
MATLAB commands to them to applicable in control system analysis, which are the main objectives of this paper. A
secondary objective is to learn the application of some basic MATLAB commands and how to apply them in simple control
system problems.
Keywords: Transfer function, Open & Closed loop, Frequency response, MATLAB, Simulink.
0.2
MATLAB SCRIPTS
a=[4 0]; % numerator coefficient 0
gf=tf(a,b) -0.4
>>Transfer function: -0.6
4s -0.8
-----
-1
s+5 -5 -4 -3 -2 -1 0 1 2
Real Axis
INTERNATIONAL JOURNAL OF INNOVATIVE RESEARCH IN ELECTRICAL, ELECTRONICS, INSTRUMENTATION AND CONTROL ENGINEERING
Vol. 2, Issue 1, January 2014
0.6
2s+1
0.4
1
5s2+s+2
Out1
0.2 Step Transfer Fcn
Imaginary Axis
-0.2
-0.4
Fig. 5. Simulink model for second order system
-0.6
-0.8
-2.5 -2 -1.5 -1 -0.5 0 0.7
Real Axis
Fig. 2. Pole zeros plot for transfer function 0.6
0.2
4
1 0.1
3s+5
Out 1
Step Transfer Fcn 0
0 2 4 6 8 10 12 14 16 18 20
time (sec)
0.3
0.25
1
0.2 1
s2 +10s+20
0.15 Out 1
Step Transfer Fcn
0.1
0.05
0
0 2 4 6 8 10
time (sec)
Fig. 7. Simulink model for without any controller
Fig. 4. Unit step response for first order system
INTERNATIONAL JOURNAL OF INNOVATIVE RESEARCH IN ELECTRICAL, ELECTRONICS, INSTRUMENTATION AND CONTROL ENGINEERING
Vol. 2, Issue 1, January 2014
0.05
C. P-I CONTROLLER RESPONSE (KP =100, KI= 100)
0.045
0.04 -K-
Response without any controller
0.035 KP
0.03
1
1 1
0.025 -K- s2 +10 s+20
s Out 2
Step 1 KI Integrator Transfer Fcn 1
0.02
0.015
0.01
Fig. 11. Simulink model for with PI controller
0.005
0
0 5 10 15 20 25 30 35
time (sec) 1.4
without controller
Fig. 8. Unit step response without any controller with PI controller
1.2 with P (Kp=10) controller
Steady State error (ess) = 0.965
Rise Time ≡ 3 second 1
1 0.6
10 1
s2 +10 s+20
Out 1
Step Gain Transfer Fcn
0.4
0.2
0
Fig. 9. Simulink model for with P controller 0 1 2 3 4 5 6 7 8 9 10
time (sec)
0.25
D. P-I-D CONTROLLER RESPONSE
P controller response
0.2
(KP =100, KI= 100 Kd = 10)
without controller
0.15 P controller -K-
KP
0.1 1
1 1
-K- s2 +10 s+20
s Out 2
0.05 Step 1 KI Integrator Transfer Fcn 1
10 du /dt
0
0 5 10 15 20 25 30 35 Kd Derivative
time (sec)
INTERNATIONAL JOURNAL OF INNOVATIVE RESEARCH IN ELECTRICAL, ELECTRONICS, INSTRUMENTATION AND CONTROL ENGINEERING
Vol. 2, Issue 1, January 2014
MATLAB SCRIPTS
1.4 G = tf([1],[1 10 20]);
without contoller
PI controller
bode(G)
1.2
P controller >>
PID controller
1
Bode Diagram
Unit step response
-20
0.8
-40
Magnitude (dB)
0.6 -60
-80
0.4
-100
0.2
-120
0
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
-45
time(sec)
Phase (deg)
Fig. 14. Unit step response with PID controller -90
PI controller.
-180
-1 0 1 2 3
10 10 10 10 10
Frequency (rad/sec)
VI. FREQUENCY RESPONSE OF TRANSFER
Fig. 16. Bode plot of system
FUNCTION
C. Bode Plot of System
A. Root Locus of System
𝟒𝐬
𝟐𝐬 + 𝟓 𝑮 𝒔 =
𝑮 𝒔 = 𝐬+𝟓
𝟐𝐬 𝟐 + 𝟑𝐬 + 𝟐
MATLAB SCRIPTS
MATLAB SCRIPTS G = tf([4],[1 5]);
G = tf([2 5],[2 3 2]); nyquist (G)
rlocus(G) >>
>>
Nyquist Diagram
Root Locus
2 0.4
1.5
0.3
1
0.2
0.5
Imaginary Axis
0.1
0
Imaginary Axis
-0.5 0
-1
-0.1
-1.5
-0.2
-2
-9 -8 -7 -6 -5 -4 -3 -2 -1 0 1
Real Axis
-0.3
Fig. 15. Root locus of system
-0.4
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8
B. Bode Plot of System
Real Axis
INTERNATIONAL JOURNAL OF INNOVATIVE RESEARCH IN ELECTRICAL, ELECTRONICS, INSTRUMENTATION AND CONTROL ENGINEERING
Vol. 2, Issue 1, January 2014
VII. CONCLUSION
This paper helps lots of beginner those who are
interested to learn Control system with MATLAB
programming, because this paper start with basic control
system concept programming and goes to various
mathematical operations, frequency domain analysis
programming. Main features of this paper unit step response
of various controller.
REFERENCES
[1] Online resources like www.google.com
[2] Online resources like www.mathwork.com
[3] Online Books, Notes.