0% found this document useful (0 votes)
15 views

Control Systems Lab 08 11

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Control Systems Lab 08 11

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Control Systems Lab

Dr. Nalin Kumar Sharma,


Prof. Suresh Devasahayam,
Department of Electrical Engineering,
Indian Institute of Technology Jammu

Update on November 8, 2024


2
5 Second Order Systems 37
5.1 Introduction . . . . . . . . . . . . . . 37
5.1.1 Step Response of a Second Or-
der System . . . . . . . . . . . 38
5.1.2 Determining the Second Or-
der System Parameters from
Contents the Time Response . . . . . . 40
5.1.3 Transfer Functions, Bode
Plots, and Frequency Spectra 40
5.1.4 Characteristic Equation, the
Complex s-Plane, Pole-Zero
Plots . . . . . . . . . . . . . . 41
I Control Systems using Matlab 7 5.2 Aims . . . . . . . . . . . . . . . . . . 42
5.3 Experimental Procedure . . . . . . . . 43
1 MATLAB code for Control Systems Part-1 9 5.3.1 Step Response . . . . . . . . . 43
1.1 Plotting Pole-Zero Configuration in 5.3.2 Frequency Response . . . . . 43
the s-Plane . . . . . . . . . . . . . . . 9 5.3.3 Adjusting the Frequency and
1.2 Determining Transfer Function for a Damping . . . . . . . . . . . . 43
Closed-Loop System . . . . . . . . . . 11 5.3.4 Material Required . . . . . . . 43
1.3 Analyzing the Unit Step Response . . 13 5.4 Preliminary Report . . . . . . . . . . 43
1.4 Time Response to Various Inputs . . . 14 5.5 Final Report . . . . . . . . . . . . . . 43

2 MATLAB code for Control Systems Part-2 17 6 Feedback Control 45


2.1 Root Locus Analysis . . . . . . . . . 17 6.1 Introduction to Feedback Systems . . 45
2.2 Steady-State Error Analysis . . . . . 19 6.1.1 Feedback Control . . . . . . . 46
2.3 Bode Plot Analysis . . . . . . . . . . 20 6.1.2 Controller Design . . . . . . . 46
2.4 Nyquist Plot and Stability Analysis . 23 6.2 Operational Amplifier Circuits for
Control Systems . . . . . . . . . . . . 46
6.2.1 Summing Block . . . . . . . . 46
II Control Systems using Experiments 25 6.2.2 PID Controller . . . . . . . . 47
6.2.3 Setting the PID controller . . 47
3 First Order Systems 27 6.2.4 Stability analysis . . . . . . . 48
3.1 Introduction . . . . . . . . . . . . . . 27 6.3 Aims . . . . . . . . . . . . . . . . . . 48
3.1.1 Laplace and Fourier Transforms 29 6.4 Experimental Procedure . . . . . . . . 49
3.2 Aims of this Practical . . . . . . . . . 30 6.4.1 Material Required . . . . . . . 49
3.3 Experiments . . . . . . . . . . . . . . 31 6.4.2 Preliminary Report . . . . . . 49
3.3.1 Material Required . . . . . . . 31 6.4.3 Final Report . . . . . . . . . . 49
3.3.2 Experiments to Perform . . . 31
3.4 Preliminary Report . . . . . . . . . . 32 7 DC Motor Control 51
3.5 Final Report . . . . . . . . . . . . . . 32 7.1 Introduction . . . . . . . . . . . . . . 51
7.1.1 Voltage and Current Con-
4 Temperature Sensor 33 trol - Voltage Amplifier and
4.1 Introduction . . . . . . . . . . . . . . 33 Transconductance Amplifier . 52
4.1.1 Temperature sensor system . 33 7.1.2 Motor Angle Measurement . 52
4.1.2 LM35 . . . . . . . . . . . . . . 34 7.2 Aims . . . . . . . . . . . . . . . . . . 53
4.1.3 Aims . . . . . . . . . . . . . . 34 7.3 Experimental Procedure . . . . . . . . 53
4.1.4 Experimental Procedure . . . 34 7.4 Material Required . . . . . . . . . . . 53
4.1.5 Preliminary Report . . . . . . 36 7.5 Preliminary Report . . . . . . . . . . 54
4.1.6 Final Report . . . . . . . . . . 36 7.6 Final Report . . . . . . . . . . . . . . 54

3
CONTENTS CONTENTS

8 Position Control System 55 8.2 Aims . . . . . . . . . . . . . . . . . . 56


8.1 Introduction . . . . . . . . . . . . . . 55 8.3 Experimental Procedure . . . . . . . . 56
8.1.1 Plant Model - Geared DC motor 55 8.3.1 Material Required . . . . . . . 57
8.1.2 Closed Loop Control of Motor 8.4 Preliminary Report . . . . . . . . . . 57
Shaft Position . . . . . . . . . 55 8.5 Final Report . . . . . . . . . . . . . . 57

4
List of Figures

3.1 Response to a sinusoidal input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28


3.2 Response of a first-order system to a step input. Time scale=100ms/div . . . . . . . . . . . . . 29
3.3 Magnitude and Phase of the transfer function plotted against frequency as semi-log plots . . . 30
3.4 RC circuit network as first-order system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4.1 Semiconductor temperature sensor embedded in a plastic casing . . . . . . . . . . . . . . . . . 33


4.2 Functional diagram of the sensor LM35 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.3 Experimental application of a step change in temperature . . . . . . . . . . . . . . . . . . . . . 35
4.4 Step change in temperature shown in the upper graph results in the response shown in the
lower graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5.1 Second-order systems, (i) electrical and (ii) mechanical . . . . . . . . . . . . . . . . . . . . . . 37


5.2 Second-order system step response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.3 Second Order System Step Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.4 Gain and Phase Plots of a Second Order System . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.5 Transfer Function in the Complex s-Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

6.1 Feedback control system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45


6.2 Summing Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.3 Block schematic of PID controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.4 General first order response with time delay. The slope m = ko ≈ 1 . . . . . . . . . . . . . . . 48
6.5 General first order response with time delay. The slope m = ko ≈ 1 . . . . . . . . . . . . . . . 49

7.1 Schematic of geared DC motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51


7.2 Voltage Power Amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.3 Transconductance Amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.4 Potentiometer as Angle Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
7.5 Experimental Arrangement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

8.1 Motor Position Feedback Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

5
LIST OF FIGURES LIST OF FIGURES

6
Part I

Control Systems using Matlab

7
Chapter 1

MATLAB code for Control Systems Part-1

1.1 Plotting Pole-Zero Configuration in the s-Plane


Objective
To use MATLAB to plot the pole-zero configuration of a specified transfer function in the s-plane.

Background
In control systems, the transfer function is a vital tool that simplifies the analysis of system behavior by
avoiding the need to solve differential equations directly. A transfer function is generally expressed as the
ratio of two polynomials in the complex variable s:

N (s) am sm + · · · + a1 s + a0
H(s) = = (1.1)
D(s) bn sn + · · · + b1 s + b0
Where N (s) and D(s) are the numerator and denominator polynomials, respectively. Factoring these
polynomials allows us to express the transfer function in terms of poles and zeros:

(s − z1 )(s − z2 ) . . . (s − zm )
H(s) = K (1.2)
(s − p1 )(s − p2 ) . . . (s − pn )
Here, zi are the zeros, pi are the poles, and K is the system gain. Understanding the location of poles and
zeros in the s-plane is crucial for analyzing system stability and dynamic behavior.

MATLAB Program
clear all;
clc;

% Define numerator and denominator of the transfer function


n = [5 15 10];
d = [2 7 20 24 0];

% Create the transfer function model


Transfer_Function = tf(n, d);

% Convert the transfer function to zero-pole-gain form


G = zpk(Transfer_Function);

9
Chapter 1 MATLAB code for Control Systems Part-1 1.1 Plotting Pole-Zero Configuration in the s-Plane

% Extract poles, zeros, and gain


[z, p, k] = tf2zp(n, d);

% Reconstruct the transfer function from poles, zeros, and gain


[n1, d1] = zp2tf(z, p, k);

% Plot pole-zero map in the s-plane


pzmap(n, d);

% Open the LTI Viewer for system visualization


ltiview(G);

Output
The MATLAB script generates a pole-zero plot in the s-plane for the provided transfer function, offering
insights into system stability and dynamic characteristics.

Results:

10
Chapter 1 MATLAB code for Control Systems1.2
Part-1
Determining Transfer Function for a Closed-Loop System

1.2 Determining Transfer Function for a Closed-Loop System


Objective
To determine the overall transfer function for a closed-loop system from its block diagram representation
using MATLAB.

Background
Analyzing complex systems can be simplified by breaking them down into smaller, manageable blocks, each
with its own transfer function. Using block diagram reduction techniques, these blocks can be combined to
determine the overall transfer function of the system.

MATLAB Program
clear all;
clc;

% Define the transfer functions for each block


n1 = [1 0]; % G1: s
d1 = [0 1];

n2 = [5]; % G2: 5
d2 = [1];

n3 = [1]; % G3: 1/(s^2 + s)


d3 = [1 1 0];

n4 = [1]; % H1: 1
d4 = [1];

% Create the transfer functions


G1 = tf(n1, d1, ’inputname’, ’Ei’, ’outputname’, ’Eo 1’);
G2 = tf(n2, d2, ’inputname’, ’Ei’, ’outputname’, ’Eo 2’);
G3 = tf(n3, d3, ’inputname’, ’Eo’, ’outputname’, ’C’);
H1 = tf(n4, d4, ’inputname’, ’C’, ’outputname’, ’B’);

% Parallel combination of G1 and G2


[n5, d5] = parallel(n1, d1, n2, d2);
G_12 = tf(n5, d5, ’inputname’, ’Ei’, ’outputname’, ’Eo’);

% Series combination of G_12 and G3


[n6, d6] = series(n5, d5, n3, d3);
G_forward = tf(n6, d6, ’inputname’, ’Ei’, ’outputname’, ’C’);

% Feedback connection
[n7, d7] = feedback(n6, d6, n4, d4);
G_overall = tf(n7, d7, ’inputname’, ’R’, ’outputname’, ’C’);

% Plot poles and zeros of the overall transfer function

11
Chapter 1 MATLAB code for Control Systems1.2
Part-1
Determining Transfer Function for a Closed-Loop System

pzmap(G_overall);

Output
The program calculates and visualizes the overall transfer function of a closed-loop system, providing essential
information for understanding the system’s performance.

Results:

12
Chapter 1 MATLAB code for Control Systems Part-1 1.3 Analyzing the Unit Step Response

1.3 Analyzing the Unit Step Response


Objective
To plot the unit step response of a given transfer function and calculate key parameters such as delay time,
rise time, peak time, and maximum overshoot using MATLAB.

Background
The transient response of a system, which includes parameters such as rise time, delay time, and maximum
overshoot, is a critical aspect of system analysis. The unit step response is a standard test used to evaluate
these parameters and determine how the system behaves when subjected to a step input.

MATLAB Program
clear all;
clc;

% Define the transfer function


n = [25];
d = [1 6 25];
sys = tf(n, d);

% Determine system characteristics


R = roots(d);
S = stepinfo(sys, ’RiseTimeLimits’, [0.00, 1.00]);

% Visualize the step response and other characteristics


ltiview(sys);

Output
This MATLAB code produces a step response plot and computes important system parameters, helping assess
the system’s transient response and overall performance.

Results:

13
Chapter 1 MATLAB code for Control Systems Part-1 1.4 Time Response to Various Inputs

1.4 Time Response to Various Inputs

Objective
To analyze the time response of a system subjected to different input signals, including step, impulse, sinu-
soidal, ramp, and parabolic inputs, using MATLAB.

Background
Time response analysis is fundamental for understanding how a control system reacts to different inputs over
time. By examining the system’s response to various inputs, we can evaluate its stability, accuracy, and overall
behavior.

MATLAB Program
clear all;
close all;

% Define the transfer function


h1 = tf([9], [1 6 9]);

% Define time vector


t = linspace(1, 15);

% Plot step response


subplot(3, 2, 1);
step(h1);

% Plot impulse response


subplot(3, 2, 2);
impulse(h1);

% Define different input signals


r = sin(t); % Sinusoidal input
s = 2*t; % Ramp input
q = 5*(t.^2); % Parabolic input

% Plot sinusoidal response


subplot(3, 2, 3);
lsim(h1, r, t);

% Plot ramp response


subplot(3, 2, 4);
lsim(h1, s, t);

% Plot parabolic response


subplot(3, 2, 5);
lsim(h1, q, t);

14
Chapter 1 MATLAB code for Control Systems Part-1 1.4 Time Response to Various Inputs

Output
This script generates time response plots for various input signals, allowing for a comprehensive analysis of
the system’s dynamic behavior under different conditions.

Results:

15
Chapter 1 MATLAB code for Control Systems Part-1 1.4 Time Response to Various Inputs

16
Chapter 2

MATLAB code for Control Systems Part-2

2.1 Root Locus Analysis


Objective: To plot the root locus for a specified transfer function and identify the closed-loop poles for vary-
ing values of the gain K.

Background:
The root locus technique provides a graphical representation of the possible locations of closed-loop poles as a
system parameter, usually the gain K, is varied. The system’s closed-loop transfer function can be represented
as:

Y (s) KH(s)
= (2.1)
R(s) 1 + KH(s)
where H(s) is the open-loop transfer function. The closed-loop poles are determined by solving the
characteristic equation:

1 + KH(s) = 0 (2.2)
P (s)
Expressing H(s) as H(s) = Q(s) , the characteristic equation becomes:

Q(s) + KP (s) = 0 (2.3)


The root locus plots show the possible positions of the closed-loop poles as K varies. For cases where
H(s) has more poles than zeros, the system will have zeros at infinity, with corresponding root locus branches
extending to infinity (asymptotes). This method aids in selecting an appropriate gain K to satisfy specific
performance criteria.
Problem Statement:
Given the open-loop transfer function:

(s + 10)
H(s) = (2.4)
s(s + 8)(s + 12)(s + 25)
Design a feedback controller using the root locus method that satisfies a 10% overshoot and a 0.5-second
rise time.
MATLAB Code:

s = tf(’s’);
sys = (s + 10) / (s*(s + 8)*(s + 12)*(s + 25));
rlocus(sys);

17
Chapter 2 MATLAB code for Control Systems Part-2 2.1 Root Locus Analysis

axis([-30 5 -20 20]);


zeta = 0.6;
wn = 2.5;
sgrid(zeta, wn);
[k, poles] = rlocfind(sys);

Results:

18
Chapter 2 MATLAB code for Control Systems Part-2 2.2 Steady-State Error Analysis

2.2 Steady-State Error Analysis


Objective: To compute the steady-state error for a given transfer function.

Background:
For a unity feedback system, the transfer function can be written as:

C(s) H(s)
= (2.5)
R(s) 1 + H(s)
The error signal is defined as:

E(s) = R(s) − C(s) (2.6)


Substituting the expression for C(s):

R(s)
E(s) = (2.7)
1 + H(s)
The steady-state error ess can be found using the final value theorem:

sR(s)
ess = lim sE(s) = lim (2.8)
s→0 s→0 1 + H(s)
MATLAB Code:

clc;
clear all;
close all;
h = tf([6], [1 4 6]);
a = step(h);
[y, t] = step(h);
i = length(y);
z = y(i);
c = y(end);
sserror = abs(1 - c);

Results:

19
Chapter 2 MATLAB code for Control Systems Part-2 2.3 Bode Plot Analysis

2.3 Bode Plot Analysis


Objective: To generate the Bode plot for a given transfer function and determine the gain and phase margins
for evaluating relative stability.

Background:
Bode plots offer a frequency-domain perspective of a system’s transfer function, displaying both magnitude
and phase as functions of frequency. The Bode plot is advantageous for analyzing stability margins and
understanding the influence of controller parameters on system behavior.
The gain margin (GM) and phase margin (PM) are determined from the Bode plot as follows:

• The gain margin is the amount by which the system gain can be increased before instability occurs. It
is found at the frequency where the phase angle equals −180◦ .

• The phase margin is the additional phase lag required to bring the system to the brink of instability,
identified at the frequency where the magnitude equals 0 dB.

MATLAB Code:
clear all;
clc;
n = [80];
d = [1 12 45 60];
sys = tf(n, d);
w = logspace(-1, 2, 5);
bode(sys);
grid on;
[a, phase] = bode(sys, w);
mag = 20*log10(a);
[G_Margin, P_Margin, w_phase_crossover, w_gain_crossover] = margin(sys);
Gain_Margin_dB = 20*log10(G_Margin);
disp(’Frequency(rad/sec) Magnitude(dB) Phase(degree)’);
for i = 1:5
fprintf(’%f\t\t %f\t\t %f \n’, w(i), mag(i), phase(i));
end

1. Consider the following systems with closed-loop transfer functions

(a) 4
s(1+0.5s)(1+0.08s)
200(s+1)
(b) (s+10)2
200(s+2)
(c) s(s2 +10s+100)

(a) Plot their Bode-plot using MATLAB.


(b) Find their Gain Margin, Phase Margin, Gain Crossover Frequency, Phase Crossover Frequency

2. The response of a second-order system can be characterized by its damping ratio (ζ), which significantly
affects the system’s stability and performance. The Bode plot provides a graphical representation of the
system’s frequency response, including magnitude and phase information.
In this analysis, we will consider a standard second-order transfer function given by:

20
Chapter 2 MATLAB code for Control Systems Part-2 2.3 Bode Plot Analysis

ωn2
G(s) = (2.9)
s2 + 2ζωn s + ωn2
where ωn is the natural frequency, and ζ is the damping ratio.
We will plot the Bode plot for different values of the damping ratio (ζ = 0, 0.2, 0.4, 0.6, 0.8, 1) to observe
how it influences the system’s response.
The following MATLAB code generates the Bode plot for the specified damping ratios:
1 % Define the natural frequency ( omega_n )
2 omega_n = 1; % Natural frequency ( rad / s )
3
4 % Define the damping ratios to be analyzed
5 zeta_values = [0 , 0.2 , 0.4 , 0.6 , 0.8 , 1];
6
7 % Create a figure for the Bode plots
8 figure ;
9
10 % Loop through each damping ratio and plot the Bode plot
11 for zeta = zeta_values
12 % Define the transfer function for the second - order system
13 num = omega_n ^2; % Numerator ( omega_n ^2)
14 den = [1 , 2* zeta * omega_n , omega_n ^2]; % Denominator ( s ^2 + 2* zeta * omega_n * s
+ omega_n ^2)
15
16 % Create the transfer function
17 sys = tf ( num , den ) ;
18
19 % Plot the Bode plot for the current damping ratio
20 [ mag , phase , w ] = bode ( sys ) ;
21 mag = squeeze ( mag ) ; % Squeeze to remove singleton dimensions
22 phase = squeeze ( phase ) ;
23
24 % Plot magnitude
25 subplot (2 , 1 , 1) ; % Magnitude plot in the first subplot
26 semilogx (w , 20* log10 ( mag ) ) ; % Convert to dB
27 hold on ;
28
29 % Plot phase
30 subplot (2 , 1 , 2) ; % Phase plot in the second subplot
31 semilogx (w , phase ) ;
32 hold on ;
33 end
34
35 % Customize the magnitude plot
36 subplot (2 , 1 , 1) ;
37 title ( ’ Bode_Plot_of_Second - O r d e r _ S y s t e m _ w i t h _ V a r y i n g _ \ zeta ’) ;
38 xlabel ( ’ Frequency ( rad / s ) ’) ;
39 ylabel ( ’ Magnitude ( dB ) ’) ;
40 legend ( arrayfun ( @ ( z ) sprintf ( ’ \\ zeta =%.1 f ’ , z ) , zeta_values , ’ UniformOutput ’ ,
false ) ) ;
41 grid on ;
42
43 % Customize the phase plot
44 subplot (2 , 1 , 2) ;
45 xlabel ( ’ Frequency ( rad / s ) ’) ;
46 ylabel ( ’ Phase ( degrees ) ’) ;
47 legend ( arrayfun ( @ ( z ) sprintf ( ’ \\ zeta ␣ = ␣ %.1 f ’ , z ) , zeta_values , ’ UniformOutput ’ ,
false ) ) ;

21
Chapter 2 MATLAB code for Control Systems Part-2 2.3 Bode Plot Analysis

48 grid on ;
49
50 % Adjust the figure layout
51 sgtitle ( ’ B o d e _ P l o t s _ f o r _ D i f f e r e n t _ D a m p i n g _ R a t i o s ’) ;

Results:

22
Chapter 2 MATLAB code for Control Systems Part-2 2.4 Nyquist Plot and Stability Analysis

2.4 Nyquist Plot and Stability Analysis


Objective: To plot the Nyquist diagram for a specified transfer function and analyze the closed-loop stability
by evaluating gain and phase margins.

Background:
The Nyquist plot is a graphical method used to analyze the frequency response of a system, especially for
stability assessment in control systems. The Nyquist stability criterion determines stability based on the
number of encirclements of the critical point (−1, 0) in the complex plane.
The Nyquist plot combines magnitude and phase information into a single plot and provides insights into
stability by examining the number of clockwise encirclements of the critical point. Gain and phase margins
are calculated similarly to the Bode plot.
MATLAB Code:

clear all;
clc;
k = 5;
s = tf(’s’);
GH = k / (s * (1 + 0.8 * s) * (1 + 0.05 * s));
nyquist(GH);
[Gm, Pm, Wcp, Wcg] = margin(GH);
disp(’Gain Margin is’);
disp(Gm);
disp(’Phase Margin is’);
disp(Pm);
disp(’Phase crossover frequency is’);
disp(Wcp);
disp(’Gain crossover frequency is’);
disp(Wcg);
grid on;

23
Chapter 2 MATLAB code for Control Systems Part-2 2.4 Nyquist Plot and Stability Analysis

24
Part II

Control Systems using Experiments

25
Chapter 3

First Order Systems

3.1 Introduction
All the systems we will discuss in this course are linear systems. In simple terms, a linear system has the same
response to a very small signal and to a very large signal. First order systems are described by a first-order
differential equation.

Static and Dynamic Characterization - Time Domain


Static Calibration Static calibration determines the input-output relationship without considering time
dependence. This is also called steady-state calibration. If the static input-output relationship is a straight
line it is said to be a linear input-output relationship and can be algebraically expressed using the equation
of a straight line. If the input is a variable x, and the output is a variable y:

y = c + ax (1.1.1)
The constant a is the sensitivity of the transducer and c is a constant offset. The sensitivity of a transducer
or system is its most important property. It is usually desirable to have no offset, and we try to make c = 0.
Static calibration is performed by applying different values of input and measuring the corresponding output.

Non-Linearity If the input-output relationship is non-linear then it is desirable to linearize it. The lin-
earization can be done using analog devices or after digitization. Linearization in a modern digital system can
be done either by using transformation equations or by using look-up tables.

Dynamic Calibration Dynamic calibration determines the input-output relationship that may be a func-
tion of time. If the input-output relationship does not depend on the rate of change of any of the quantities,
then it is a zero-order system, and such a system is completely characterized by its static calibration. A
zero-order system has a perfect or ideal time response as the output function is a purely scaled (and possibly
amplitude shifted, or offset) version of the input.

Zero Order System A zero-order system has no time dependence and contains no time derivatives. The
input-output relation is given by a linear algebraic equation, for a linear zero-order system. In the following
equation, we explicitly indicate that the input variable, x(t), and the output variable, y(t), are both functions
of the independent variable time, t.

y(t) = c + ax(t) (1.1.2)


The values a and c are constants that represent the properties of the system.

27
Chapter 3 First Order Systems 3.1 Introduction

First Order System A system whose input-output relationship contains first derivatives is called a first-
order system. The input-output relationship can be described by a first-order differential equation. For exam-
ple, if x(t) is the input and y(t) is the output:

dy(t)
b + y(t) = ax(t) (1.1.3)
dt
Here, a and b are constants representing properties of the system.

Examples of First Order Systems


• Electrical Circuit
dVo (t)
RC + Vo (t) = Vi (t) (3.1)
dt
• Mechanical System
dx(t) 1
B + x(t) = F (t) (3.2)
dt K

Transfer Function Estimation


Direct Estimation of the Frequency Response Using a sinusoidal input of known frequency and ampli-
tude, we can measure the output and calculate the magnitude of the gain and the phase shift as shown in Fig.
3.1.

Figure 3.1: Response to a sinusoidal input

Step Response For this system, if a step change in input is given at time zero:
(
0 t<0
x(t) = (1.1.4)
1 t≥0
Then the output is given by the function:
n
y(t) = f0 t<0 (1.1.5)
This describes many commonly used systems like mercury in glass thermometers. From eq. 1.1.5 we can
get:

ys (t) = a, t→∞ (3.3)


We can next determine the value of b from eq. 1.1.5.

28
Chapter 3 First Order Systems 3.1 Introduction

Figure 3.2: Response of a first-order system to a step input. Time scale=100ms/div

3.1.1 Laplace and Fourier Transforms


The Laplace transform can be used to solve differential equations and therefore is valuable in analyzing the
dynamic response of first and second-order systems. In the Laplace domain, the ratio of the Output to the
Input is called the transfer function. The transfer function is a general form of the sensitivity of a system.
In the case of the first-order system above, we can take the Laplace transform of eq. 1.1.3 and write the
input-output transfer ratio as:

Y (s) a
= (1.2.1)
X(s) 1 + bs
The Laplace transform is a purely mathematical tool and does not have any physical meaning. A special
case of the Laplace transform is the Fourier√transform which can be obtained by replacing the Laplace variable
s by the complex frequency jω. Here j = −1 and ω is the angular frequency in radians/second (ω = 2πf ,
where f is the frequency in cycles/second or Hertz). The Fourier transform obtained by substituting s = jω
yields the frequency domain representation of the system. The Laplace transform (and implicitly the Fourier
transform) of the input-output relation is referred to as the transfer function of the system.
Applying the Fourier transform to a time function or signal describes the time function in terms of a set
of sinusoids (with a specific set of amplitude and phase values) - this is the frequency spectrum of the signal.
Applying the Fourier transform to a transfer function describes the frequency response of the system (with a
frequency-dependent gain, and a frequency-dependent phase shift). Taking the Fourier transform of eq. 1.2.1
and separating the real and imaginary parts using complex algebra, we have:

Y (jω) a abω
= −j (3.4)
X(jω) 1 + b2 ω 2 1 + b2 ω 2
We can now get the magnitude and phase:

1
|X(jω)| = √ (3.5)
1 + b2 ω 2

Frequency Response Plots


The transfer function of a system can be represented graphically by plotting (a) the gain magnitude and (b)
the phase against the frequency. These frequency plots are convenient ways of describing the system.
The gain magnitude and phase in eq. 1.2.2 are usually plotted against frequency in a log-log scale (gain)
and semi-log plot (phase) as shown in Fig. 3.3. Such plots are called Bode plots. The unit used for gain is
decibels (dB), which is 20 log10 X
Y
, and with dB as the unit the gain plot is a semi-log plot.
In the above discussion, we used a step function as the test signal. Sometimes it is possible to use sinusoidal
signals to test the system, in which case the input-output gain and input-output phase difference can be
directly measured for each sine frequency and plotted as in Fig. 3.3. A set of frequencies in the range of

29
Chapter 3 First Order Systems 3.2 Aims of this Practical

interest must be used for such a test. An advantage of using sinusoidal test signals is that prior assumptions
about the order of the system are not required.

Figure 3.3: Magnitude and Phase of the transfer function plotted against frequency as semi-log plots

RC Network - First Order System

We will use a resistor-capacitor network shown in Fig. 3.4 to study the behaviour of first order systems.

Figure 3.4: RC circuit network as first-order system

3.2 Aims of this Practical


1. To experimentally determine the step response of first-order systems.

2. To approximately estimate the impulse response of first-order systems.

3. To experimentally determine the frequency response of a first-order system using a sample electrical
RC circuit.

30
Chapter 3 First Order Systems 3.3 Experiments

3.3 Experiments

3.3.1 Material Required


1. Oscilloscope

2. Function Generator

3. Power Supply

4. Breadboard, Resistor, Capacitor, wires

3.3.2 Experiments to Perform


Step Response

A step signal is defined as the function:


(
1 t≥0
u(t) =
0 t<0

Since the step function has a transition only once in time, we will find it more convenient to use a rectangu-
lar function with repeating transitions. Therefore, we will use a periodic rectangular function with a pulse
duration of T1 and a period of Tp . It repeats every Tp seconds.
(
1 0 ≤ t ≤ T1
r(t) =
0 T1 ≤ t ≤ Tp

Using rectangular pulses of duration 500ms and amplitude 1V, obtain the step response of the system. The
period can be 1s. Capture the response of the RC system on the oscilloscope, and measure the rise time and
calculate the time constant.

Impulse Response

An impulse signal is a mathematical ideal, defined as a function having an area of unity and duration tending
to zero. In engineering application we can define the function as a rectangular function of duration ∆t, with
∆t → 0: (
1 0 ≤ t ≤ ∆t
δ(t) =
0 elsewhere

Set the function generator output amplitude to be 10V (use low Z-mode) and the pulse duration to be 1ms
(approximating ∆t ≈ 0) - note that this has an area of 0.01 V.s; therefore this is a gross approximation of an
impulse with the amplitude being too small and the duration being quite large. Capture the response on the
oscilloscope and measure the time constant.

Frequency Response

Using the frequencies, in the range 1Hz to 1000 Hz, determine the voltage gain and the phase shift of the
input-output of the given RC circuit. Use about 10 frequency values spaced logarithmically in this range.

31
Chapter 3 First Order Systems 3.4 Preliminary Report

3.4 Preliminary Report


1. For a massless mechanical system comprising a dashpot and spring in parallel, what is the relation
between the force and displacement? Write the differential equation and the transfer function. Add a
mass to the system and write the equation for the force-displacement transfer function.

3.5 Final Report


1. For the circuit of Fig. 3.4 write the equation relating the output voltage to the input voltage in the form
of eq. (3.1).

2. For the circuit of Fig. 3.4 write the equation relating the output voltage to the input voltage in the form
of eq. (3.1).

3. Draw the frequency response of the given system as Bode plots of magnitude and phase.

4. Determine the corner frequency (the frequency where the gain is 3dB less than that at very low fre-
quencies).

5. From the step response, calculate the time constant.

32
Chapter 4

Temperature Sensor

4.1 Introduction
Any sub-system which may be a sensor, actuator, or even a mathematical operation can be characterized in
terms of their input-output relation. In this lab practical, we will use an electronic temperature sensor and
determine its system characteristics. The LM35 is a single-chip integrated circuit temperature sensor. The
temperature sensor is a silicon bandgap temperature sensor, in which the forward junction voltage of a PN
junction varies as a function of temperature and current through the junction. The IC LM35 has additional
electronic circuitry to convert the temperature-sensitive semiconductor junction voltage into an output pro-
portional to the temperature in ◦ C.

4.1.1 Temperature sensor system


The semiconductor temperature sensor is encased in a plastic package for field use. This casing conducts
the temperature on the outside of the casing and the sensor, and this involves a time dependence of the
temperature change of the semiconductor sensor. Fig. 4.1 shows a representation of the semiconductor sensor
inside the plastic casing. In the LM35 used in this lab, 3 electrical leads are provided for connection. Two leads
are for the power supply to bias the electronics. A supply voltage of 5V may be given — be very careful to
observe the polarity of the supply voltage. The center lead is the output voltage, and the output is given by
the equation:
Vo = 0.01T
where T is the temperature in ◦ C.

Figure 4.1: Semiconductor temperature sensor embedded in a plastic casing

33
Chapter 4 Temperature Sensor 4.1 Introduction

Thermal conduction
If the temperature at the surface of the casing is T1 , the temperature of the sensor, T2 , depends on the prop-
erties and dimensions of the intervening material and is given by the equation:

dT2 (t) kA
= [T1 (t) − T2 (t)]
dt mcd
where:

• m = sensing element mass (kg)

• c = sensing element specific heat (J.K−1 .kg−1 ); for silicon, c = 700 J/◦ K/kg

• k = casing thermal conductivity (W.m−1 .K−1 ); for plastic, k ≈ 0.5 W/m/◦ K

• A = casing surface area (m2 )

• d = thickness of casing material (m)

This is the equation of a first-order system, and we should perform dynamic characterization to obtain the
transfer function of the sensor.

4.1.2 LM35
Fig. 4.2 shows the functional block schematic of the temperature sensing IC, LM35. The supply voltage can be
up to 30V. Note that both the supply and the output voltage are with reference to the terminal labeled Gnd.

Figure 4.2: Functional diagram of the sensor LM35

4.1.3 Aims
1. To characterize the temperature sensor LM35.

2. To determine the transfer function and the order of the system.

4.1.4 Experimental Procedure


Material Required
1. Oscilloscope

34
Chapter 4 Temperature Sensor 4.1 Introduction

2. Power Supply

3. LM35

Dynamic characterization of the sensor

Applying sinusoidal temperature changes is not possible. Therefore, we will use a step change in temperature
for dynamic characterization. A beaker of water at a temperature about 20◦ C above the ambient temperature
is used to provide the step change. Connect the LM35 to a power supply and the output to an oscilloscope. Set
the sweep-time of the oscilloscope to be about 1s/div. With the LM35 in air, ensure that the output corresponds
to the ambient air temperature. Immerse the LM35 quickly into the water and capture the transient voltage
change. Use triggered single sweep capture.

Figure 4.3: Experimental application of a step change in temperature

The response of the LM35 to the step change in temperature will be a first-order response based on eq. ??,
and as shown in Fig. 5.3. From this, the time constant of the system response can be determined. Using the
time constant and assuming the system to be a first-order system based on the physics given by eq. ??, we
can write the transfer function and draw the frequency response. You can either make measurements on the
oscilloscope itself or you can transfer the waveform to a computer and perform the calculations.

Figure 4.4: Step change in temperature shown in the upper graph results in the response shown in the lower
graph

35
Chapter 4 Temperature Sensor 4.1 Introduction

4.1.5 Preliminary Report


1. The LM35 is in a TO92 package which has a height of 4mm and width of 4mm. Assuming that this is a
cylinder, calculate the parameters of the package. Assume that the sensor inside is made of silicon and
has a mass of 5mg. Using eq. ?? calculate the theoretical time constant of the system.

2. Write the transfer function for this system.

4.1.6 Final Report


1. Draw the step-response of the sensor measured in the lab. What is the time constant? What is the
corner frequency?

2. Draw the Bode plots of the frequency response.

36
Chapter 5

Second Order Systems

5.1 Introduction
In the first two labs, we saw that first-order systems are described by a first-order differential equation, and
we saw examples of an electrical first-order system and a thermal second-order system. Second-order systems
are described by a second-order differential equation. The discussion in this lab is only about underdamped
second-order systems where the damping is between 0 and 1.
With the usual notation, if the system input is x(t) and the output is y(t), a general second-order system
is described by equation 5.1, with system parameters g, ωn , and ζ. These constants represent commonly
recognized physical properties called sensitivity, natural frequency, and damping.

dy(t)
y(t) + 2ζωn + ωn2 y(t) = g · x(t) (5.1)
dt

Y (s) gωn2
H(s) = = 2 (5.2)
X(s) s + 2ζωn s + ωn2
Examples of second-order systems are electrical resistor-inductor-capacitor (RLC) circuits, Fig. 5.1(i),
mechanical mass-damper-spring systems, Fig. 5.1(ii), and liquid flow systems in elastic tubes (liquid inertance,
tube elasticity, and viscous damping).

Figure 5.1: Second-order systems, (i) electrical and (ii) mechanical

For the electrical circuit, using Kirchhoff’s Voltage law:

37
Chapter 5 Second Order Systems 5.1 Introduction

dI(t) dVo (t)


Vi (t) = L + RI(t) + Vo (t), I(t) = C (5.3)
dt dt
d2 Vo (t) dVo (t)
Vi (t) = LC 2
+ RC + Vo (t) (5.4)
dt dt
Taking the Laplace transform:

Vi (s) = LCs2 Vo (s) + RCsVo (s) + Vo (s) (5.5)

Vo (s) 1
= (5.6)
Vi (s) 1 + RCs + LCs2
Comparing equation 5.6 with equation 5.1, we see that:
r
1 R C
ωn = √ , ζ= (5.7)
LC 2 L
For the mechanical system:

d2 y(t) dy(t)
F (t) = m +B + Ky(t) (5.8)
dt2 dt
Taking the Laplace transform:

F (s) = ms2 Y (s) + BsY (s) + KY (s) (5.9)

Y (s) 1 1/K
= 2
= B 1 2
(5.10)
F (s) ms + Bs + K 1 + K s + mK s
Comparing with equation 5.1, we see that:
r
K B
ωn = , ζ= √ (5.11)
m 2 mK

Note on Laplace Transforms


With second-order systems, the Laplace transforms are more elaborate, and Table 5.1 can be used to obtain the
inverse Laplace transform for the time functions. Time functions are what we can see in the physical world
or real world, and the Laplace transform domain is a mathematically useful way of analyzing the functions.
Therefore, the Laplace transform is useful for analysis, and the time functions illustrate real-world behavior.
The Fourier transform, which may be regarded as a special case of the Laplace transform, also gives us a way
of viewing time functions and time characteristics by separating them into frequency components.

5.1.1 Step Response of a Second Order System


Most second-order systems can be tested with a step change in input:
(
0, t < 0
x(t) =
1, t ≥ 0
1
X(s) =
s
The time response of a second-order system to a step change in input is shown in Fig. 5.3:

38
Chapter 5 Second Order Systems 5.1 Introduction

Table 5.1: Some Laplace Transform pairs

Time Function Laplace Transform


e−at 1
s+a
1
u(t) s
a
sin(at) s +a2
2
s
cos(at) s2 +a2
e−bt sin(at)u(t) a
(s+b)2 +a2
e−bt cos(at)u(t) s+b
(s+b)2 +a2
1
t s2

Figure 5.2: Second-order system step response

Analytical expression for the step response of a second-order system:


We will now obtain an algebraic expression for the step response of a second order system. We will only con-
sider the case where 0 < ζ < 1 called the underdamped case as this is the case most commonly encountered.
We will start with the transfer function in the Laplace domain and then take the inverse Laplace transform.

1
X(s) =
s

ωn2
Y (s) =
s(ωn2 + 2ζωn s + s2 )
Using partial fraction for separation of the terms to have only first order and second order terms:

ωn2 ωn2
Y (s) = =
s(ωn2 + 2ζωn s + s2 ) s(s + ζωn )2 + ωn2 (1 − ζ 2 )

A Bs + C
= +
s (s + ζωn )2 + ωn2 (1 − ζ 2 )
We find: A = 1, B = 1, C = 2ζωn . The term ωd = ωn 1 − ζ 2 is called the damped frequency. We also
p

write the denominator as the sum of two squares so that we can use the Laplace transform table.

1
s [(s + ζωn )2 + ωn2 (1 − ζ 2 )]
Taking the inverse Laplace transform using Table 3.1:
!
−ζωn t ζ
y(t) = 1 − e cos(ωd t) + p sin(ωd t) u(t)
1 − ζ2

39
Chapter 5 Second Order Systems 5.1 Introduction

Note that u(t) represents the unit step function which is equal to one for t ≥ 0 and is zero for t < 0.
The sine and cosine terms can be put in the form: sin A cos B + cos A sin B = sin(A + B), and we get a
convenient closed form:
!!
−ζωn t −1 ζ
y(t) = 1 − e sin ωd t + tan p
1 − ζ2

5.1.2 Determining the Second Order System Parameters from the Time Response
In the step response of Fig. 5.3, p = ys (t∞ ) = ys (t → ∞).

Figure 5.3: Second Order System Step Response

Maxima of the step response occur when the sine term is -1, i.e., when ωd t = 1 − ζ 2 ωn t = (4q − 1) π2
p

where q = 0, 1, 2, 3, . . . The period of the damped step response can be measured as t3 − t1 . Therefore,


ωd =
t3 − t1
To calculate the damping coefficient, we consider the decay of the oscillation. If ∆y(t1 ) = y(t1 ) − y(t∞ )
and ∆y(t3 ) = y(t3 ) − y(t∞ ), then:

∆y(t3 )
= e−ζωn (t3 −t1 )
∆y(t1 )
 
∆y(t1 )
Let α = ln ∆y(t3 ) , then rearranging eq. (3.1.14) we calculate
α
ζ=√
4π 2 + α2

5.1.3 Transfer Functions, Bode Plots, and Frequency Spectra


For the second order system discussed above, we can take the Fourier transform using s = jω in eq. (5.2):

Y (jω) 1
= 2
X(jω)

1 + j2ζ ωωn − ω
ωn

The magnitude of the transfer function:

Y (jω) 1
= s (3.1.17)
X(jω)  2 2  2
1 − ωωn + 2ζ ωωn

40
Chapter 5 Second Order Systems 5.1 Introduction

and the phase of the transfer function:


 
Y (jω) −2ζ ωωn
∠ = tan−1  (3.1.18)
 
2 
X(jω)

ω
1− ωn

Figure 5.4: Gain and Phase Plots of a Second Order System

5.1.4 Characteristic Equation, the Complex s-Plane, Pole-Zero Plots


In general, the transfer function of a system is a ratio of polynomials:

Y (s) b0 + b1 s + b2 s2 + . . .
=
X(s) a0 + a1 s + a2 s2 + . . .
For analysis, the polynomials can be factorized in the following form:

Y (s) (s − z1 )(s − z2 ) . . .
=
X(s) (s − p1 )(s − p2 ) . . .
The values z1 , z2 , . . . are called zeros since when s = z1 or s = z2 , etc., the transfer function becomes
zero. The values p1 , p2 , . . . are called poles since when s = p1 or s = p2 , etc., the transfer function becomes
infinite. The denominator equated to zero is called the characteristic equation. For the second order system
discussed here, the characteristic equation can be written from (??):

s2 + 2ζωn s + ωn2 = 0
The roots of this quadratic equation are:
p
s = −ζωn ± ωn ζ 2 − 1 = −ζωn ± jωd (5.12)
In eq. (5.12), we have used the fact that ζ < 1. When s takes the value of the roots, the transfer function
becomes infinite.
We see that the Laplace variable is necessarily a complex quantity of the form s = σ + jω. The transfer
function can be plotted in the complex s-plane with the poles and zeros represented by circles and crosses.
For the second order system discussed here, the transfer function, eq. (5.2) can be written as:

41
Chapter 5 Second Order Systems 5.2 Aims

Y (s) ωn2
= (3.1.21)
X(s) (s + ζωn )2 + ωn2 (1 − ζ 2 )

where p1 = −ζωn + jωd , p2 = −ζωn − jωd .

Figure 5.5: Transfer Function in the Complex s-Plane

From fig. 5.5, we see that as the damping coefficient, ζ, becomes smaller, the poles move closer to the
imaginary axis. When ζ = 0, the poles lie on the imaginary axis. We know that replacing s = jω in the
Laplace transform of a system (or a signal) gives us the Fourier transform. Therefore, the transfer function
taken along the imaginary axis of the complex plane is the Fourier transform. When the poles lie on the
imaginary axis, they represent impulses in the Fourier transform. From our study of Fourier transforms, we
know (or should know) that the inverse transform of a pair of impulses gives us a sinusoidal time-function—the
frequency of the sinusoid is ωn or the natural frequency. In the case of a system transfer function, this
represents sustained oscillation at the natural frequency—regardless of the input. The system oscillates at the
natural frequency or resonant frequency.
When the poles are on the left of the imaginary axis, the oscillation is damped until they fall on the real
axis, and the damped frequency becomes zero. When the poles lie on the right of the imaginary axis, the oscil-
lation grows exponentially—this represents instability. This instability is what is defined by the Bounded-Input
Bounded-Output condition for stability—i.e., a system is stable when a Bounded-Input produces a Bounded-
Output, and when a Bounded-Input produces an unBounded-Output, the system is said to be unstable.

5.2 Aims
1. To determine the parameters of a second order system, namely the natural frequency and the damping
coefficient.

2. To obtain the frequency response of a second order system.

42
Chapter 5 Second Order Systems 5.3 Experimental Procedure

5.3 Experimental Procedure


A second order electrical system shown in Fig. 5.1 will be used in this lab.

(a) Using L = 68µH, R = 2Ω, C = 0.1µF , assemble the circuit on a breadboard and measure the
response.

(b) Using L = 68µH, R = 2Ω, C = 0.47µF , repeat the measurements.

(c) Using L = 68µH, R = 10Ω, C = 0.1µF , note that the inductor has an internal resistance of about
1.2Ω.

5.3.1 Step Response


Apply a step signal of amplitude 5V at the input, Vi , and measure the output, Vo . Measure the time and
amplitude of the extrema, and calculate the damping factor and natural frequency.

5.3.2 Frequency Response


Using sine waves, of frequency 1Hz to 100kHz, measure the gain and phase shift of the second order system.

5.3.3 Adjusting the Frequency and Damping


• Keeping the frequency constant, adjust the damping. Do you observe increasing oscillation? Is there
sustained oscillation?

• Keeping the damping constant at the mid-position, adjust the frequency. Does the system oscillation
increase?

5.3.4 Material Required


1. Second order system board

2. Power supply, oscilloscope, function generator.

5.4 Preliminary Report


For an electronic system with L = 10H, C = 10µF , and R = 1kΩ, calculate the natural frequency and
damping coefficient. For these values, plot the step response for time 0 < t < 20ms. Calculate and plot the
frequency response for 0.1 < f < 10kHz.

5.5 Final Report


Report your measurements and calculations. From your experimental measurements, calculate the natural
frequency and damping coefficient. Draw the frequency response plots for the system at these values.

43
Chapter 5 Second Order Systems 5.5 Final Report

44
Chapter 6

Feedback Control

6.1 Introduction to Feedback Systems


A system with known transfer function will not always behave exactly as expected. Small changes in the
system due to environmental conditions like temperature and humidity, changes in the system due to degra-
dation of components with age, perturbations from external noise, etc., can result in deviations from the
expected behaviour of the system. The use of feedback, in which the actual output of the system is compared
with the desired output to correct for deviations from the desired behaviour of the system is an effective way
of compensating for such changes in the environment and internal properties of the system. Fig. 6.1 below
shows a general block diagram of a feedback control system.

Figure 6.1: Feedback control system

The feedback control system works by taking the difference between the input, and the actual output - this
difference is called the error signal. In Fig. 6.1, the input is denoted by X(s), the output by Y (s), and the error
signal by E(s). The output is passed through a system H(s) which represents the sensor that measures the
output to provide the feedback. Combination of system blocks is easier to analyze in the Laplace or Fourier
domain than in the time-domain. We can obtain the overall transfer function of the feedback control system
as follows:

E(s) = X(s) − Y (s)H(s)

Y (s) = E(s)G1 (s)G2 (s)

Y (s) = [X(s) − Y (s)H(s)]G1 (s)G2 (s)

Y (s) G1 (s)G2 (s)


= (6.1)
X(s) 1 + G1 (s)G2 (s)H(s)

45
Chapter 6 Feedback Control 6.2 Operational Amplifier Circuits for Control Systems

6.1.1 Feedback Control


A feedback control system as shown in Fig. 6.1 has many advantages and also some disadvantages:
1. Feedback control can make the speed of response of a system much faster.
2. A feedback controlled system is more immune to variations in plant characteristics. For example, plant
characteristics can vary with age, temperature, and other conditions. Feedback provides dynamic cor-
rection for such variations in the plant characteristics.
3. A feedback controlled system is more immune to external disturbances. If an external disturbance is
added to the system, then feedback enables dynamic correction so that the effect of the disturbance is
greatly reduced.
4. Feedback control increases the order of a system and therefore can render the system more unstable.
The design of the feedback control should be such that instability is avoided.

6.1.2 Controller Design


The goal of controller design is to make the overall system faster, more accurate in producing the desired
output, and also to avoid instability in the system behaviour.

Building blocks for control systems:


1. Summing block: This generates the error signal by taking the difference between the desired input
and the output as measured by a suitable sensor.
2. Controller: This takes the error signal and provides a driving signal to the system that is being con-
trolled. A common type of controller that will be used in this lab is the Proportional-Integral-Derivative
(PID) controller. The proportional component provides suitable amplification of the error signal, the
derivative component provides specific amplification of change in the error signal, and the integral
component provides amplification of long-term or persistent error in the system.

6.2 Operational Amplifier Circuits for Control Systems


Operational amplifiers (OpAmps) are generic amplifiers available as a one IC (integrated circuit) per OpAmp,
or more often as 2 or 4 OpAmps in a single IC. OpAmps can be used in circuits to realize the blocks in the
control system shown in Fig.6.1

6.2.1 Summing Block


The summing block, Fig.6.2, gives the difference between the input signal and the feedback from the output.
Fig.6.2, shows a difference amplifier which gives the difference between two signals. This performs the
function of the “summing block” in a control system to estimate the error between the desired function and
the feedback function.

R2
Vo (t) = [V1 (t) − V2 (t)]
R
 1 
V1 (t) − V2 (t)
Vo (t) = R2
R1
The circuit shown in Fig.6.2 is an improvement on the summing block - this is essentially an instrumen-
tation amplifier with high input impedance, differential inputs, and easy to adjust gain and common-mode
rejection.

46
Chapter 6 Feedback Control 6.2 Operational Amplifier Circuits for Control Systems

Figure 6.2: Summing Block

6.2.2 PID Controller

Figure 6.3: Block schematic of PID controller

Fig.6.3 shows the block schematic of a Proportional-Integral-Derivative controller. The input-output re-
lation of this controller is:
Z
dx(t)
y(t) = Kx(t) + KI x(t) dt + KD
dt
Taking the Laplace Transform, we get:
 
Y (s) KI
G(s) = =K 1+ + KD s
X(s) s

6.2.3 Setting the PID controller


Method I: Manual Tuning
A control system can be adjusted manually as follows:

1. Set all P, I, D gains to zero. Turn the potentiometers fully clockwise.

2. Increase the proportional gain as long as the system remains stable and free of oscillations.

3. If there is any steady-state error in the output, then increase the integral gain to minimize the long-term
error.

4. Finally, increase the derivative gain so that the system becomes faster.

47
Chapter 6 Feedback Control 6.3 Aims

5. The values for the P-I-D coefficients can be checked theoretically to ensure that the overall system
transfer function is stable and has fast response. However, steady state error is usually due to slight
variations in system parameters in practical implementation - therefore, final tuning often requires
experimental adjustment.

Method II: Ziegler-Nichols Method


A plant with first order characteristics with delay, called a First-Order Plus Dead-Time (FOPDT) system, has
transfer function of the form:

ko e−to s
G2 (s) =
(1 + τo s)
In such a case, the time delay makes the system more prone to instability. Ziegler-Nichols proposed a
method for tuning a PID controller to control such a system. First, the values of the time constant, τ , and the
time delay, to , are measured from the step-response of the system-under-control, i.e., the plant. The slope is
estimated at the point of maximum steepness.

Figure 6.4: General first order response with time delay. The slope m = ko ≈ 1

Using these parameters, ko , the steady-state value, to , the time delay, and To , the Ziegler-Nichols method
gives an empirical way of calculating the coefficients, kP , kI , kD as given in the table below. One can choose
to use a “P” (Proportional only controller), “PI” (Proportional-Integral controller), or a full “PID” controller.
Controller Type kP kI kD
P To
to 0 0
PI 0.9 Ttoo t3o 0
PID To
1.2 to 2
to
0.5
to

6.2.4 Stability analysis


In Eq.4.1.1, when the denominator is zero, the overall transfer function becomes infinite, which is an unde-
sirable and unstable condition. The denominator represents the characteristic equation, and it must always
be greater than zero. There are several methods for analyzing a feedback system to assess its stability.

6.3 Aims
1. To understand the components of feedback control.

48
Chapter 6 Feedback Control 6.4 Experimental Procedure

2. To use a PID controller to improve the time response of a first-order system.

6.4 Experimental Procedure


In this lab practical we will use feedback control to improve the behaviour of a simple first order system as
studied in the first lab. The first order system is an RC circuit with a time constant, τ = 0.01s. Fig.6.5 shows a
block schematic of the control system to be assembled and tested in this lab.

Figure 6.5: General first order response with time delay. The slope m = ko ≈ 1

Fig.6.5 shows the lab setup to be used. Two PCBs, the summing block and the PID controller will be
given. The internal circuits in these boards is as described above. The first order system-under-control must
be assembled on a breadboard. Using Fig.6.5 as a guide, connect the system. The time constant of the system
being controlled, the so- called “open-loop” system is known to be 0.01s. Adjust the PID controller using
Method I described above. Determine the time-constant of the overall system.

6.4.1 Material Required


1. Summing amplifier board

2. PID controller board

3. First order plant made with RC circuit

4. Power supply, oscilloscope, arbitrary function generator, and cables and probes

6.4.2 Preliminary Report


1. If a purely proportional controller is used with KP = 10, KI = 0, KD = 0, write the overall transfer
function. Use H(s) = 1.

2. If H(s) = 0.5, and KP = 20, what is the control system’s overall transfer function?

6.4.3 Final Report


Describe your laboratory procedure and report your experimental observations.

49
Chapter 6 Feedback Control 6.4 Experimental Procedure

50
Chapter 7

DC Motor Control

7.1 Introduction
The DC motor is an electromagnetic actuator, and converts electrical energy into mechanical work. The torque
generated by a DC motor is proportional to the current through its coil. A controlled voltage is very easy, but
with a little effort, we can make circuits to deliver controlled current to a motor. DC geared motors are used
for continuous motion as well as positioning. In this lab, we will use a DC motor with an attached gearbox.

Figure 7.1: Schematic of geared DC motor

The torque generated by the motor is proportional to the current through the coil, with a proportionality
constant, km , that depends on the physical parameters of the motor and the magnet:

Tm (t) = km I(t) (5.1.1)

Vi (t) is the voltage applied across the motor, and L and R are the inductance and resistance of the coil.
The rotating coil develops a back emf, eb = ke ϕ̇(t), where ϕ(t) is the angular displacement, and ϕ̇(t) is the
angular velocity of the motor shaft:

dI(t)
Vi (t) = L + RI(t) + eb
dt
dI(t)
=L + RI(t) + ke ϕ̇(t) (5.1.2)
dt
The moment of inertia of the motor is Jm , and the motor shaft frictional resistance coefficient is bm . The
gears provide a reduction ratio of n, so that the rotation of the gear-output shaft θ(t) and the braking torque
at the output shaft To (t) is:

51
Chapter 7 DC Motor Control 7.1 Introduction

The moment of inertia of all the gears is Jg , and the gears’ total frictional resistance coefficient is bg . Any
load or perturbation on the gear-output shaft is TL . The gears and external load referred to the motor shaft
is:
1 
Tc = Jg θ̈(t) + bm θ̇(t) + TL
n
The torque developed by the motor can be written as:
1 
Tm (t) = Jm ϕ̈(t) + bm ϕ̇(t) + Jg θ̈(t) + bm θ̇(t) + TL
n

nkm I(t) = n2 Jm θ̈(t) + n2 bm θ̇(t) + Jg θ̈(t) + bg θ̇(t) + TL

= n2 Jm + Jg θ̈(t) + n2 bm + bg θ̇(t) + TL
 

= Jo θ̈(t) + bo θ̇(t) + TL (5.1.4)


We’ll assume that there is no external load, so that TL = 0.

nkm I(t) = Jo θ̈(t) + bo θ̇(t) (5.1.5)


DC motors produce continuous rotation, and therefore, we shall consider the speed of the motor ρ(t) =
θ̇(t) as the output quantity. Note that from eq.5.1.3 To (t) = nTm (t) = nkm I(t).

nkm I(t) = Jo ρ̇(t) + bo ρ(t) (5.1.6)


Taking the Laplace transform of eq.5.1.6, we obtain the transfer function:

ρ(s) nkm (nkm /bo )


= =  (5.1.7)
I(s) Jo s + bo Jo
bo s + 1

The relation between the motor speed and motor current is a first-order system.

7.1.1 Voltage and Current Control - Voltage Amplifier and Transconductance Amplifier
The current required by a small DC motor can be several amperes, and a signal from a function generator
cannot provide such a large current. Therefore, we need to have a controllable voltage or current source
that can provide large currents. The figure here shows a power amplifier that can supply a few amperes of
current. The output is made with a complementary pair of transistors in a push-pull configuration. Used by
itself, such a pair of transistors will have a large crossover distortion when the voltage is near zero. Using a
feedback circuit as shown reduces the crossover distortion and gives a linear control for the output voltage.
If we measure the current at the output of the power amplifier and provide that as the feedback, we will have
a controlled current output. This is a voltage-controlled-current-source, or a transconductance amplifier. The
circuit is shown below.

7.1.2 Motor Angle Measurement


To measure the motor shaft angle, we can use a rotary potentiometer. A rotary potentiometer is usually pre-
vented from rotating more than about 340°; we will overcome this limitation by removing the mechanical stop.
However, the potentiometer reads only over an angle of 360°, after which it returns to 0°. This is illustrated in
the figure below.

52
Chapter 7 DC Motor Control 7.2 Aims

Figure 7.2: Voltage Power Amplifier

Figure 7.3: Transconductance Amplifier

7.2 Aims
1. To characterize a geared DC motor

2. To understand the use of power amplifiers and transconductance amplifiers

7.3 Experimental Procedure


Connect the geared DC motor as shown in the figure below. Use the function generator to give constant
current output of (a) 100mA, (b) 200mA, (c) 500mA, (d) 1A, and measure the angular displacement of the
motor on the oscilloscope. Calculate the speed of the motor for each case.
Apply a sinusoidal current to the motor with amplitude 500mA, and frequency (a) 0.1Hz, (b) 1Hz, (c)
10Hz. In each case, note the angular displacement θ(t) and calculate the angular velocity. Use these data to
determine the motor characteristics.

7.4 Material Required


1. Power supply

2. Function generator

53
Chapter 7 DC Motor Control 7.5 Preliminary Report

Figure 7.4: Potentiometer as Angle Sensor

Figure 7.5: Experimental Arrangement

3. Oscilloscope

4. Power amplifier board

5. Geared DC motor

6. Rotary potentiometer

7. Holder and coupler for motor-potentiometer

7.5 Preliminary Report


Obtain approximate values for the motor parameters from the internet. What are the units for the moment
of inertia and frictional resistance?

7.6 Final Report


Plot the current versus speed curve for the motor. What is the time constant of the motor?

54
Chapter 8

Position Control System

8.1 Introduction
8.1.1 Plant Model - Geared DC motor
The permanent magnet electric motor comprises a current-carrying conductor wound in an armature placed
in a magnetic field. The force on the conductor is proportional to (a) magnetic flux density, (b) the current,
and (c) the length of the conductor. The magnetic flux density is constant, and the length of the conductor
is also constant. The torque on the motor shaft is proportional to the applied current with proportionality
constant km , defined as

Tm (t) = km I(t) (8.1)


Considering the net moment of inertia of the rotor and gears, Jo , the instantaneous angular displacement
of the output shaft, θ(t), net coefficient of frictional damping bo , and negligible load torque on the motor shaft,
we have seen their relationship in previous experiment, which is also reproduced here for convenience:

To (t) = nTm (t) = nkm I(t) = Jo θ̈(t) + bo θ̇(t) (8.2)


The transfer function of the motor angular displacement with motor current as the input is:

θ(s) nkm nkm /bo nkm /bo


Gm (s) = = =  =  (8.3)
Jo s2 + bo s

I(s) Jo
s + 1 s Jo
s + 1
bo bo

In the previous lab, we only considered the angular velocity of the motor for system identification since,
when the motor is freely running, the speed is related to the armature current. When the motor was freely
running, instantaneous angular displacement was not related to any input quantity, except as an integral over
time of the speed that was controlled by the armature current.

8.1.2 Closed Loop Control of Motor Shaft Position


If we incorporate the motor in a feedback control system, we can control the shaft position.

θ(t)
Vθ (t) = Vp = kθ θ(t)
360◦

Vθ (s) = kθ θ(s) (8.4)


The overall closed-loop system transfer function can be written :

55
Chapter 8 Position Control System 8.2 Aims

Figure 8.1: Motor Position Feedback Control

θ(s) Gc (s)GA (s)Gm (s) kp km


= = (8.5)
Vi (s) 1 + H(s)Gc (s)GA (s)Gm (s) (Jo s + bo )s + kθ kp km
k k /J
=  p m o
k k k
s2 + Jboo s + θ Jpo m

This is a second-order system, as seen in the previous lab, and it can have a stable step response if the
poles are on the left side of the complex s-plane. Comparing eq.6.1.3 to the general form for a second-order
system, we can write:
s
kθ kp km bo
ωn = , ζ= p (8.6)
Jo 2 Jo kθ kp km
The poles are at:

s = −ζωn ± jωd
When ζ is large and close to unity, the system is stable. But when ζ is large, the system is also sluggish.
The damping coefficient ζ is inversely related to the value of kp .

8.2 Aims
1. To show position control using a DC motor and angular position sensor in a feedback control system.

2. To characterize the system properties using the step response.

8.3 Experimental Procedure


The DC motor has already been characterized in the previous lab, and we know the value of the motor time
constant, Jo /bo , and the motor sensitivity or gain, nkm /bo . We also know the sensitivity of the feedback
sensor (the potentiometer as an angle sensor), kθ ; this is the value of H(s) in fig. 8.1. We can adjust the value
of kp using the general-purpose PID controller used in the previous labs.
Set up the motor control arrangement as shown in fig.8.1. Set the motor position potentiometer to be
at a position approximately in the middle of its range, i.e., it should not be too close to 0◦ or 360◦ as the
potentiometer transition from maximum to minimum takes place in this region.
Adjust the control potentiometer and verify that the motor position varies in parallel. Use the oscilloscope
to monitor the motor output position from the potentiometer. You can use a step function from the function
generator to test the step response of the motor position control. How does varying the value of kp affect the
response?

56
Chapter 8 Position Control System 8.4 Preliminary Report

8.3.1 Material Required


1. Geared DC motor

2. Rotary potentiometer with attachment to motor shaft

3. PID controller board, Summing amplifier board, power amplifier board (transconductance amplifier)

8.4 Preliminary Report


Using approximate values for the constants in eq. (8.5), calculate the step response of the motor position
control. Can this system become unstable? Explain the conditions for stability.

8.5 Final Report


Describe your experimental designs. Report your observations.

57
Chapter 8 Position Control System 8.5 Final Report

58

You might also like