Control System Engineering Lab: Avanish Niranjan 17104088 EEN 210
Control System Engineering Lab: Avanish Niranjan 17104088 EEN 210
Control System Engineering Lab: Avanish Niranjan 17104088 EEN 210
Avanish Niranjan
17104088
EEN 210
Contents
Experiment 1: To Obtain Time Response of a First Order System for Various Inputs ............................ 2
Experiment 2: To Obtain Time Response of a Second Order System for Various Inputs ....................... 5
Experiment 3: To Simulate the Variation of Time Response of a Second Order System for Various
Values of Damping Ratio and Natural Frequency ................................................................................... 7
Experiment 4: To Simulate P, PI, PD Controller for Second Order Underdamped System................... 10
Experiment 5: To Simulate PID Controller for Second Order Underdamped System .......................... 12
Experiment 6: To Draw Root Locus of a Given System using MATLAB ................................................. 13
Experiment 7: To Draw Bode Plot of a Given System using MATLAB ................................................... 15
1
Experiment 1: To Obtain Time Response of a First Order System for
Various Inputs
Software Used
MATLAB R2017a
Theory
The system whose input-output equation is a first order differential equation is called first order
system. The order of the differential equation is the highest degree of derivative present in an
equation. First order system contains only one energy storing element. Usually a capacitor or
combination of two capacitors is used for this purpose. These cannot be connected to any
external energy storage element.
Most of the practical models are first order systems. If a system with higher order has a dominant
first order mode it can be considered as a first order system.
Provided that, input is constant and t>0, where v (0) is voltage or current at t=0. Now we will see
the unit responses with respect to first order systems and will see the transfer functions
accordingly.
2
Take the inverse Laplace transform: y (t) = 1 – e-t/T
3
Results and Conclusion
4
Experiment 2: To Obtain Time Response of a Second Order System for
Various Inputs
Software Used
MATLAB R2017a
Theory
The order of a differential equation is the highest degree of derivative present in that equation. A
system whose input-output equation is a second order differential equation is called Second
Order System.
There are a number of factors that make second order systems important. They are simple and
exhibit oscillations and overshoot. Higher order systems are based on second order systems. In
case of mechanical second order systems, energy is stored in the form of inertia whereas in case
of electrical systems, energy can be stored in a capacitor or inductor.
Standard form of second order system is given by:
Where:
ωn Is the natural frequency
ζ is the damping ratio
If 0< ζ <1, system is named as Damped System
If < ζ =1, system is named as Critically Damped System
If < ζ >1, system is named as Over Damped System
Simulink Model
5
Results and Conclusion
6
Experiment 3: To Simulate the Variation of Time Response of a
Second Order System for Various Values of Damping Ratio and
Natural Frequency
Software Used
MATLAB R2017a
Theory
The damping ratio is a dimensionless measure describing how oscillations in a system decay after a
disturbance. Many systems exhibit oscillatory behavior when they are disturbed from their position
of static equilibrium. A mass suspended from a spring, for example, might, if pulled and released,
bounce up and down. On each bounce, the system tends to return to its equilibrium position, but
overshoots it. Sometimes losses (e.g. frictional) damp the system and can cause the oscillations to
gradually decay in amplitude towards zero or attenuate. The damping ratio is a measure describing
how rapidly the oscillations decay from one bounce to the next.
Natural frequency, also known as eigenfrequency, is the frequency at which a system tends to
oscillate in the absence of any driving or damping force.
The motion pattern of a system oscillating at its natural frequency is called the normal mode (if all
parts of the system move sinusoidally with that same frequency).
If the oscillating system is driven by an external force at the frequency at which the amplitude of its
motion is greatest (close to a natural frequency of the system), this frequency is called resonant
frequency.
7
Simulink Model
8
Constant zeta=0.25
9
Experiment 4: To Simulate P, PI Controller for Second Order
Underdamped System
Software Used
MATLAB R2017a
Theory
In this tutorial we will introduce a simple, yet versatile, feedback compensator structure: the
Proportional-Integral-Derivative (PID) controller. The PID controller is widely employed because it
is very understandable and because it is quite effective. One attraction of the PID controller is that
all engineers understand conceptually differentiation and integration, so they can implement the
control system even without a deep understanding of control theory. Further, even though the
compensator is simple, it is quite sophisticated in that it captures the history of the system (through
integration) and anticipates the future behavior of the system (through differentiation). We will
discuss the effect of each of the PID parameters on the dynamics of a closed-loop system and will
demonstrate how to use a PID controller to improve a system's performance.
Increasing the proportional gain ( ) has the effect of proportionally increasing the control signal
for the same level of error. The fact that the controller will "push" harder for a given level of error
tends to cause the closed-loop system to react more quickly, but also to overshoot more. Another
effect of increasing is that it tends to reduce, but not eliminate, the steady-state error.
The addition of a derivative term to the controller ( ) adds the ability of the controller to
"anticipate" error. With simple proportional control, if is fixed, the only way that the control will
increase is if the error increases. With derivative control, the control signal can become large if the
error begins sloping upward, even while the magnitude of the error is still relatively small. This
anticipation tends to add damping to the system, thereby decreasing overshoot. The addition of a
derivative term, however, has no effect on the steady-state error.
The addition of an integral term to the controller ( ) tends to help reduce steady-state error. If
there is a persistent, steady error, the integrator builds and builds, thereby increasing the control
signal and driving the error down. A drawback of the integral term, however, is that it can make the
system more sluggish (and oscillatory) since when the error signal changes sign, it may take a while
for the integrator to "unwind."
10
Simulink Model
Results
11
Experiment 5: To Simulate PID Controller for Second Order
Underdamped System
Software Used
MATLAB R2017a
Theory
The above effects are observed by adding Kp Ki and Kd, hence to mitigate effect they’re used
together as PID controller.
Simulink Model
Result
12
Experiment 6: To Draw Root Locus of a Given System using MATLAB
Software Used
MATLAB R2017a
13
MATLAB Program
num= input('please enter the value of num');
den= input('please enter the value of den');
Transfer_Function=tf(num,den)
rlocus(Transfer_Function)
Output
please enter the value of num [1 3]
please enter the value of den conv([1 1 0], [1 4 16])
Transfer_Function =
s + 3
---------------------------
s^4 + 5 s^3 + 20 s^2 + 16 s
14
Experiment 7: To Draw Bode Plot of a Given System using MATLAB
Software Used
MATLAB R2017a
Theory
MATLAB Program
num= input('please enter the value of num');
den= input('please enter the value of den');
Transfer_Function=tf(num,den)
bode(Transfer_Function)
[Gain_Margin,Phase_Margin,Gain_Crossover_Frequency,Phase
_Crossover_Frequency] = margin(Transfer_Function)
Output
please enter the value of num 20*[1 1]
please enter the value of den conv([1 5 0],[1 2 10])
Transfer_Function =
15
20 s + 20
---------------------------
s^4 + 7 s^3 + 20 s^2 + 50 s
Gain_Margin =
3.1369
Phase_Margin =
103.6573
Gain_Crossover_Frequency =
4.0132
Phase_Crossover_Frequency =
0.4426
16