0% found this document useful (0 votes)
8 views18 pages

Cs Lab Program-2

The document provides an introduction to GNU Octave, a high-level language for numerical computations, and details various control system lab programs using Octave, including block diagram reduction techniques, poles and zeros of transfer functions, and second-order underdamped systems. Each program includes objectives, required apparatus, theoretical background, manual calculations, Octave code, and expected results. Additionally, it features viva questions to assess understanding of the concepts presented.

Uploaded by

impanachandru1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views18 pages

Cs Lab Program-2

The document provides an introduction to GNU Octave, a high-level language for numerical computations, and details various control system lab programs using Octave, including block diagram reduction techniques, poles and zeros of transfer functions, and second-order underdamped systems. Each program includes objectives, required apparatus, theoretical background, manual calculations, Octave code, and expected results. Additionally, it features viva questions to assess understanding of the concepts presented.

Uploaded by

impanachandru1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

BEC403 – CONTROL SYSTEM LAB (IPCC)

INTRODUCTION TO OCTAVE

GNU Octave is a high-level language primarily intended for numerical computations. It is typically used
for such problems as solving linear and nonlinear equations, numerical linear algebra, statistical
analysis, and for performing other numerical experiments. It may also be used as a batch-oriented
language for automated data processing.
The current version of Octave executes in a graphical user interface (GUI). The GUI hosts an Integrated
Development Environment (IDE) which includes a code editor with syntax highlighting, built-in
debugger, documentation browser, as well as the interpreter for the language itself. A command-line
interface for Octave is also available.
GNU Octave is freely redistributable software. You may redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation. The GPL is included
in this manual, see GNU GENERAL PUBLIC LICENSE.
This manual provides comprehensive documentation on how to install, run, use, and extend GNU
Octave. Additional chapters describe how to report bugs and help contribute code.
Octave version 8.4.0.
Among the many tasks that Octave can perform, the following are the most commonly used in the
scientific community :
• simple algebra
• trigonometry
• control structures
• linear algebra
• differential equations
• numerical integration

1
Page

Dept. of ECE, MIT Thandavapura


BEC403 – CONTROL SYSTEM LAB (IPCC)

PROGRAM 01
BLOCK DIAGRAM REDUCTION TECHNIQUE

AIM
To implement block diagram reduction technique to obtain transfer function of a control system using
octave.

APPARATUS REQUIRED

Sl. No. Name of the equipment / Software Quantity


1 PC with Windows 1
2 Octave (GUI) 8.4.0 1

THEORY
• Block diagrams are a visual representation of a system's components and their relationships,
using blocks (representing operations) and arrows (representing signal flow).
• They are used to model and analyse control systems, helping engineers understand how different
parts interact.
• The simplest form of the block diagram is the single block, with one input and one output.

• Block diagram reduction techniques simplify complex control system diagrams by combining
blocks, moving summing/pickoff points, and eliminating feedback loops to find the overall
transfer function.
• Common Block Diagram Reduction Techniques:
1. Combining Blocks in Cascade:
Ø If blocks are connected in series (one after another), their transfer functions are
multiplied.
2
Page

Dept. of ECE, MIT Thandavapura


BEC403 – CONTROL SYSTEM LAB (IPCC)

2. Combining Blocks in Parallel:


Ø If blocks are connected in parallel (between the same points), their transfer functions are
added.

3. Moving Summing Points:


Ø Summing points (where signals are added) can be moved around the diagram without
changing the system's behavior, as long as the signal paths are maintained.

4. Moving Pickoff Points:


Ø Pickoff points (where a signal is taken off for use in multiple places) can also be moved,
similar to summing points.

5. Eliminating Feedback Loops:


Ø Feedback loops (where output is fed back to the input) can be simplified using the
formula: G / (1 + GH), where G is the forward path gain and H is the feedback path
gain.
3
Page

Dept. of ECE, MIT Thandavapura


BEC403 – CONTROL SYSTEM LAB (IPCC)

6. Swapping Summing Points:


Ø Summing points can be interchanged without affecting the system's output.

MANUAL CALCULATION

1. 2 block reduction technique (Cascade blocks)


𝟒𝒔 𝒔%𝟑
Given functions are 𝑮𝟏 = 𝟐𝒔𝟑 %𝒔𝟐 %𝒔%𝟐 𝒂𝒏𝒅 𝑮𝟐 = 𝒔𝟐 %𝟐𝒔%𝟐

4
Page

Dept. of ECE, MIT Thandavapura


BEC403 – CONTROL SYSTEM LAB (IPCC)

2. 3 block reduction technique (Cascade blocks)


𝟒𝒔𝟐 %𝒔%𝟏 𝒔%𝟑 𝟐𝒔𝟐 %𝟒𝒔%𝟒
Given functions are 𝑮𝟏 = , 𝑮𝟐 = 𝒂𝒏𝒅 𝑮𝟑 =
𝟐𝒔𝟑 %𝒔𝟐 %𝒔%𝟐 𝒔𝟐 %𝟐𝒔%𝟐 𝟑𝒔𝟑 %𝟓𝒔𝟐 %𝟕𝒔%𝟐

OCTAVE CODE

1. 2 block reduction technique (Cascade blocks)

Clc;
Disp (‘Block diagram reduction technique’);
p = [4 0];
q = [2 1 1 2];
a = tf (p, q); %First transfer function
r = [1 3];
s = [1 2 2];
b = tf (r, s); %Second transfer function
5

c = series (a, b); % Multiply a and b transfer function


Page

ars = feedback (c, 1, -1);

Dept. of ECE, MIT Thandavapura


BEC403 – CONTROL SYSTEM LAB (IPCC)

2. 3 block reduction technique (Cascade blocks)

Clc;
Disp (‘Block diagram reduction technique’);
p = [4 1 1];
q = [2 1 1 2];
a = tf (p, q); %First transfer function
r = [1 3];
s = [1 2 2];
b = tf (r, s); %Second transfer function
z = series (a, b); % Multiply 1st and 2nd transfer function
x = [2 4 4];
y = [3 5 7 2];
c= tf (x, y); %Third transfer function
d = series (z, c); % Multiply 1st and 2nd result with 3rd transfer function
ars = feedback (d, 1, -1);

OUTPUT

RESULT: Block diagram reduction technique is implemented and the transfer function of a control
6
Page

system is verified using octave.

Dept. of ECE, MIT Thandavapura


BEC403 – CONTROL SYSTEM LAB (IPCC)

VIVA QUESTIONS – BLOCK DIAGRAM REDUCTION

1. What are Block Diagrams?


2. Why Reduce Block Diagrams?
3. common Block Diagram Reduction Techniques.
4. Importance of Block Diagram Reduction.
5. What are the rules for combining blocks in series and parallel?

7
Page

Dept. of ECE, MIT Thandavapura


BEC403 – CONTROL SYSTEM LAB (IPCC)

PROGRAM 02
POLES AND ZEROS OF A TRANSFER FUNCTION

AIM
To determine poles and zeros from a given transfer function of a control system using octave.

APPARATUS REQUIRED

Sl. No. Name of the equipment / Software Quantity


1 PC with Windows 1
2 Octave (GUI) 8.4.0 1

THEORY
• A transfer function H(s) is a mathematical representation of the relationship between the output
and input of a system in the frequency domain. It is typically expressed as a ratio of two
polynomials in the complex variables:
𝐶(𝑠)
𝐻(𝑠) =
𝑅(𝑠)
• Where:
C(s) is the numerator polynomial = b.
R(s) is the denominator polynomial = a.
• ZEROS
Ø Zeros are the values of s that make the numerator C(s) equal to zero C(s) = 0.
Ø Zeros correspond to frequencies at which the system’s output is zero (i.e., the system
"cancels out" the input at that frequency).
Ø Zeros impact the system's frequency response by modifying the gain or phase.
• POLES
Ø Poles are the values of s that make the denominator R(s) equal to zero i.e R(s) = 0.
Ø Poles correspond to frequencies where the system’s response can become infinite or exhibit
resonance.
Ø Poles play a crucial role in the stability of the system and in shaping its transient response.
8
Page

Dept. of ECE, MIT Thandavapura


BEC403 – CONTROL SYSTEM LAB (IPCC)

MANUAL CALCULATION
𝟐𝒔#𝟑
1. Given transfer function is 𝑯(𝒔) = 𝟏 𝟏
𝒔𝟐 # 𝒔#𝟒
√𝟐

𝒙𝟐 #𝟑𝒙#𝟐
2. Given transfer function is 𝑯(𝒔) =
𝒙𝟐 #𝟐𝒙&𝟖

9
Page

Dept. of ECE, MIT Thandavapura


BEC403 – CONTROL SYSTEM LAB (IPCC)

OCTAVE CODE
𝟐𝒔#𝟑
1. Given transfer function is 𝑯(𝒔) = 𝟏 𝟏
𝒔𝟐 # 𝒔#𝟒
√𝟐
clc;
a = [2 3]
b = [1 1/sqrt(2) 1/4]
[z,p,k] = tf2zp (b,a)
zplane (b,a)

𝒙𝟐 #𝟑𝒙#𝟐
2. Given transfer function is 𝑯(𝒔) = 𝒙𝟐 #𝟐𝒙&𝟖

clc;
a = [1 3 2]
b = [1 2 -8]
[z,p,k] = tf2zp (b,a)
zplane (b,a)

OUTPUT

Zero’s for the given transfer function is Z =


Pole’s for the given transfer function is P =
Constant gain K =

FIGURE WINDOW

10

RESULT: Zeros and poles are calculated for the given transfer function of a control system and
Page

verified using octave.

Dept. of ECE, MIT Thandavapura


BEC403 – CONTROL SYSTEM LAB (IPCC)

VIVA QUESTIONS – POLES AND ZEROS

1. What is a 4-bit adder?


2. What are poles and zeros of a transfer function?
3. How do poles affect the stability of a system?
4. How do poles and zeros influence the frequency response of a system?
5. Explain the geometric interpretation of poles and zeros on the complex plane (s-plane).
6. How can the transfer function be written in terms of its poles and zeros?
7. What is the significance of a pole at the origin in a transfer function?
8. How do you find the poles and zeros of a transfer function?
9. What is the effect of poles with positive real parts on the stability of a system?
10. How can you use Octave to calculate the poles and zeros of a transfer function?

11
Page

Dept. of ECE, MIT Thandavapura


BEC403 – CONTROL SYSTEM LAB (IPCC)

PROGRAM 03
SECOND ORDER UNDER DAMPED SYSTEM

AIM
To determine transfer function of a second order Under damped System, for different damping factors
of a control system using octave.

APPARATUS REQUIRED

Sl. No. Name of the equipment / Software Quantity


1 PC with Windows 1
2 Octave (GUI) 8.4.0 1

THEORY
• In control systems, a second-order system is characterized by a transfer function with a
denominator having a highest power of 's' equal to 2, leading to potential oscillatory responses
and described by parameters like damping ratio and natural frequency.
• Damping is a measure of oscillation in a system factor which decay over time. Example for
damping is a swing which does not swing forever once pushed, it eventually comes to rest which
passes over time.
• The second order general transfer function is given by:
𝐾. 𝑊)*
𝐻(𝑠) =
𝑠 * + 2𝜁𝑊) 𝑠 + 𝑊)*
Where: Wn is the natural frequency, K is the system gain (constant) and 𝜁 (zeta) is the damping
factor
• Damping types and their behaviour:
12
Page

Dept. of ECE, MIT Thandavapura


BEC403 – CONTROL SYSTEM LAB (IPCC)

MANUAL CALCULATION
1. For the given Wn = 4; 𝜁 = 0.5 (underdamped 𝜁 < 1)); K = 2

𝐾. 𝑊)*
𝐻(𝑠) =
𝑠 * + 2𝜁𝑊) 𝑠 + 𝑊)*

2. For the given Wn = 7; 𝜁 = 0.5 (underdamped 𝜁 < 1)); K = 4

𝐾. 𝑊)*
𝐻(𝑠) =
𝑠 * + 2𝜁𝑊) 𝑠 + 𝑊)*

13
Page

Dept. of ECE, MIT Thandavapura


BEC403 – CONTROL SYSTEM LAB (IPCC)

OCTAVE CODE

clc;
clear all;
Wn = input (‘Enter the natural frequency Wn:’);
zeta = input (‘Enter the damping factor zeta:’);
K = input (‘Enter the system gain K:’);
num = [K*Wn^2]
den = [ 1 2*zeta*Wn Wn^2]
g = tf (num, den)

OUTPUT

1. For the given Wn = 4; 𝜁 = 0.5 (underdamped 𝜁 < 1)); K = 2


Enter the natural frequency Wn:
Enter the damping factor zeta:
Enter the system gain K:
g=

2. For the given Wn = 4; 𝜁 = 0.75 (underdamped 𝜁 < 1)); K = 2


Enter the natural frequency Wn:
Enter the damping factor zeta:
Enter the system gain K:
g= 14

RESULT: The transfer function of a second order Under damped System is determined for different
Page

damping factors of a control system using octave.

Dept. of ECE, MIT Thandavapura


BEC403 – CONTROL SYSTEM LAB (IPCC)

VIVA QUESTIONS – DAMPING SYSTEM

1. What is a second order system.


2. What is damping factor.
3. What is the value of the damping ratio (ζ)?
4. Does the system oscillate?
5. How quickly does the system return to equilibrium?
6. What is the practical application of this system?
7. What is under damped, critically damped and over damped.

15
Page

Dept. of ECE, MIT Thandavapura


BEC403 – CONTROL SYSTEM LAB (IPCC)

PROGRAM 04
FREQUENCY RESPONSE OF SECOND ORDER SYSTEM

AIM
To determine frequency step response of a second order system of a control system using octave.

APPARATUS REQUIRED

Sl. No. Name of the equipment / Software Quantity


1 PC with Windows 1
2 Octave (GUI) 8.4.0 1

THEORY
• In control systems, a second-order system is characterized by a transfer function with a
denominator having a highest power of 's' equal to 2, leading to potential oscillatory responses
and described by parameters like damping ratio and natural frequency.
• The second order general transfer function is given by:
𝐾. 𝑊)*
𝐻(𝑠) =
𝑠 * + 2𝜁𝑊) 𝑠 + 𝑊)*
Where: Wn is the natural frequency, K is the system gain (constant) and 𝜁 (zeta) is the damping
factor.
• Frequency response: In control systems, frequency response refers to how a system behaves
when presented with sinusoidal inputs at various frequencies. It's a method for analyzing the
steady-state response, providing insights into system dynamics like gain, phase, and stability.
• Step response: the step response refers to how a system reacts to a sudden, constant input change,
typically from zero to one, called a step input.

MANUAL CALCULATION
1. For the given Wn = 4; 𝜁 = 0.5; K = 2

𝐾. 𝑊)*
𝐻(𝑠) =
𝑠 * + 2𝜁𝑊) 𝑠 + 𝑊)*
16
Page

Dept. of ECE, MIT Thandavapura


BEC403 – CONTROL SYSTEM LAB (IPCC)

OCTAVE CODE

clc;
clear all;
Wn = input (‘Enter the natural frequency Wn:’);
zeta = input (‘Enter the damping factor zeta:’);
K = input (‘Enter the system gain K:’);
num = [K*Wn^2]
den = [ 1 2*zeta*Wn Wn^2]
g = tf (num, den)
t = feedback (g, 1)
step (t, ‘r’)

OUTPUT

For the given Wn = 4; 𝜁 = 0.5 (underdamped 𝜁 < 1)); K = 2


Enter the natural frequency Wn:
Enter the damping factor zeta:
Enter the system gain K:
g=
17
Page

Dept. of ECE, MIT Thandavapura


BEC403 – CONTROL SYSTEM LAB (IPCC)

FIGURE WINDOW

RESULT: The frequency step response of a second order system is determined for a control system
using octave.

18
Page

Dept. of ECE, MIT Thandavapura

You might also like