0% found this document useful (0 votes)
14 views23 pages

Control Systems Lab Experiments Guide

The document outlines a laboratory manual for control systems experiments in the Electrical and Electronics Engineering department, detailing various experiments related to transfer functions, including obtaining transfer functions from poles and zeros, step and impulse responses, and Bode plots using MATLAB. Each experiment includes an aim, theory, MATLAB program, procedure, and expected results. The manual serves as a practical guide for students to understand and analyze control systems through hands-on experience.

Uploaded by

vikram singh
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)
14 views23 pages

Control Systems Lab Experiments Guide

The document outlines a laboratory manual for control systems experiments in the Electrical and Electronics Engineering department, detailing various experiments related to transfer functions, including obtaining transfer functions from poles and zeros, step and impulse responses, and Bode plots using MATLAB. Each experiment includes an aim, theory, MATLAB program, procedure, and expected results. The manual serves as a practical guide for students to understand and analyze control systems through hands-on experience.

Uploaded by

vikram singh
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

CONTROL SYSTEMS

LAB

II YEAR IV SEM

Department of Electrical and Electronics


Engineering

i
Contents:
[Link] Name of the Experiment

1. TRANSFER FUNCTION FROMZEROS AND POLES

2. ZEROS AND POLES FROMTRANSFER FUNCTION


3. STEP RESPONSE OF A TRANSFER FUNCTION
4. IMPULSE RESPONSE OF A TRANSFER FUNCTION

5. RAMP RESPONSE OF ATRANSFER FUNCTION


6. TIME RESPONSE OF A SECOND ORDER SYSTEM

7. TRANSFER FUNCTION OF A [Link]

8. ROOT LOCUS FROM ATRANSFER FUNCTION

9. BODE PLOT FROM A TRANSFERFUNCTION

10. TRANSFER FUNCTION FROMSTATE MODEL

ii
1 .TRANSFER FUNCTION FROM ZEROS AND POLES
AIM:
To obtain a transfer function from given poles and zeroes using MATLAB

APPARATUS:
Software: MATLAB

THEORY:

A transfer function is also known as the network function is a mathematical representation, in


terms of spatial or temporal frequency, of the relation between the input and output of a (linear
time invariant) system. The transfer function is the ratio of the output Laplace Transform to the
input Laplace Transform assuming zero initial conditions. Many important characteristics of
dynamic or control systems can be determined from the transfer function.

The transfer function is commonly used in the analysis of single-input single-output electronic
system, for instance. It is mainly used in signal processing, communication theory, and control
theory. The term is often used exclusively to refer to linear time-invariant systems (LTI). In its
simplest form for continuous time input signal x(t) and output y(t), the transfer function is the
linear mapping of the Laplace transform of the input, X(s), to the output Y(s).

Zeros are the value(s) for z where the numerator of the transfer function equals zero. The
complex frequencies that make the overall gain of the filter transfer function zero. Poles are the
value(s) for z where the denominator of the transfer function equals zero. The complex
frequencies that make the overall gain of the filter transfer function infinite.

The general procedure to find the transfer function of a linear differential equation from input to
output is to take the Laplace Transforms of both sides assuming zero conditions, and to solve for
the ratio of the output Laplace over the input Laplace.

MATLAB PROGRAM:
z=input(‘enter zeroes’)
p=input(‘enter poles’)
k=input(‘enter gain’)

1
[num,den]=zp2tf(z,p,k)
tf(num,den)

PROCEDURE:

 Write MATLAB program in the MATLAB editor document.


 Then save and run the program.
 Give the required input.
 The syntax “zp2tf(z,p,k)” and “tf(num,den)” solves the given input poles and zeros and
gives the transfer function.
 zp2tf forms transfer function polynomials from the zeros, poles, and gains of a system in
factored form.
Now find the output theoretically for the given transfer function and compare it with the output
obtained practically

EXAMPLE:
Given poles are -3.2+j7.8,-3.2-j7.8,-4.1+j5.9,-4.1-j5.9,-8 and the zeroes are -0.8+j0.43,-0.8-
j0.43,-0.6 with a gain of 0.5

THEORITICAL CALCULATIONS:
Enter zeros
Z=
Enter poles
P=

Enter gain

num =
den =

Transfer function=

RESULT:

2
2. ZEROS AND POLES FROM TRANSFER FUNCTION

AIM:
To obtain zeros and poles from a given transfer function using MATLAB.

APPARATUS:
Software: MATLAB

THEORY:
The transfer function provides a basis for determining important system
response characteristics without solving the complete differential equation. As defined, the

transfer function is a rational function in the complex variable that is

It is often convenient to factor the polynomials in the numerator and the


denominator, and to write the transfer function in terms of those factors:

where, the numerator and denominator polynomials, N(s) and

D(s), have real coefficients defined by the system’s differential equation and .

As written in the above equation,

the are the roots of the equation and are defined to be the system zeros

the are the roots of the equation and are defined to be the system poles.

3
MATLAB PROGRAM:
num = input(‘enter the numerator of the transfer function’)
den = input(‘enter the denominator of the transfer function’)
[z,p,k] = tf2zp(num,den)

EXAMPLE:
Obtain the poles and zeros of the transfer function given below:

PROCEDURE:

 Type the program in the MATLAB editor that is in M-file.


 Save and run the program.
 Give the required inputs in the command window of MATLAB in matrix format.
 tf2zp converts the transfer function filter parameters to pole-zero-gain form.
 [z,p,k] = tf2zp(b,a) finds the matrix of zeros z, the vector of poles p, and the associated
vector of gains k from the transfer function parameters b and a:
 The numerator polynomials are represented as columns of the matrix b.
 The denominator polynomial is represented in the vector a.
 Note down the output of the program that is zeros, poles and gain obtained in MATLAB.
 The zeros, poles and gain are also obtained theoretically.

THEORITICAL CALCULATIONS:
Enter the numerator of the transfer function
num =
Enter the denominator of the transfer function

den

z=

p=

RESULT:

4
3. STEP RESPONSE OF A TRANSFER FUNCTION
AIM:
To obtain the step response of a transfer function of the given system using MATLAB.

APPARATUS:
Software: MATLAB

THEORY:
A step signal is a signal whose value changes from one level to another level in zero time.
Mathematically, the step signal is represented as given below:

where

In the Laplace transform form,

The step response of the given transfer function is obtained as follows:

So,

The output is given by,

MATLAB PROGRAM:
num = input(‘enter the numerator of the transfer function’)

5
den = input(‘enter the denominator of the transfer function’)
step(num,den)

EXAMPLE:
Obtain the step response of the transfer function given below:

PROCEDURE:

 Type the program in MATLAB editor that is in M-file.


 Save and run the program.
 Give the required inputs in the command window of MATLAB in matrix format.
 ‘step’ function calculates the unit step response of a linear system.
 Zero initial state is assumed in state-space case.
 When invoked with no output arguments, this function plots the step response on the
screen.
 step (sys) plots the response of an arbitrary LTI system.
 This model can be continuous or discrete, and SISO or MIMO.
 The step response of multi-input systems is the collection of step responses for each
input channel.
 The duration of simulation is determined automatically based on the system poles
and zeroes.
 Note down the response of the transfer function obtained in MATLAB.
 The response of the transfer function is also obtained theoretically.
 Both the responses are compared.

THEORETICAL CALCULATIONS

RESULT:

6
4. IMPULSE RESPONSE OF A TRANSFER FUNCTION
AIM:
To obtain the impulse response of a transfer function of the given system using MATLAB.

APPARATUS:
Software: MATLAB

THEORY:
An impulse signal is a signal whose value changes from zero to infinity in zero time.
Mathematically, the unit impulse signal is represented as given below:

where:

In the Laplace transform form,

The impulse response of the given transfer function is obtained as follows:

So,

The output is given by,

7
THEORETICAL CALCULATIONS:

den = input(‘enter the denominator of the transfer function’)


impulse(num,den)

EXAMPLE:
Obtain the impulse response of the transfer function given below:

PROCEDURE:

 Type the program in the MATLAB editor that is in M-file.


 Save and run the program.
 Give the required inputs in the command window of MATLAB in matrix format.
 ‘impulse’ calculates the impulse response of a linear system.
 The impulse response is the response to the Dirac input, δ (t) for continuous time systems
and to a unit pulse at for discrete time systems.
 Zero initial state is assumed in the state space case.
 When invoked without left hand arguments, this function plots the impulse response on
the screen.
 ‘impulse(sys)’ plots the impulse response of an arbitrary LTI model sys.
 This model can be continuous or discrete, SISO or MIMO.
 The impulse response of multi-input systems is the collection of impulse responses for
each input channel.
 The duration of simulation is determined automatically to display the transient behavior
of the response.
 Note down the response of the given transfer function obtained in MATLAB.
 The response of the transfer function is also obtained theoretically.
 Both the responses are compared.

RESULT:

8
5. AMP RESPONSE OF A TRANSFER FUNCTION

AIM:
To obtain the ramp response of a transfer function of the given system using MATLAB.

APPARATUS:
Software: MATLAB

THEORY:
A ramp signal is a signal which changes with time gradually in a linear fashion. Mathematically,
the unit ramp signal is represented as given below:
r

In the Laplace transform form,

The step response of the given transfer function is obtained as follows:

So,

The output is given by,

9
MATLAB PROGRAM:

num = input(‘enter the numerator of the transfer function’)


den = input(‘enter the denominator of the transfer function’)

lsim(num,den,u,t)

EXAMPLE:
Obtain the ramp response of the transfer function given below:

PROCEDURE:

 Type the program in the MATLAB editor that is in M-file.


 Save and run the program.
 Give the required inputs in the command window of MATLAB in matrix format.
 lsim simulates the (time) response of continuous or discrete linear systems to arbitrary
inputs.
 When invoked without left-hand arguments, lsim plots the response on the screen.
 lsim(sys,u,t) produces a plot of the time response of the LTI model sys to the input time
history t,u.
 The vector t specifies the time samples for the simulation and consists of regularly spaced
time samples.
 t = 0:dt:Tfinal
 The matrix u must have as many rows as time samples (length(t)) and as many columns
as system inputs.
 Each row u(i,:) specifies the input value(s) at the time sample t(i).
 Note down the response of the transfer function obtained in MATLAB.
 The response of the transfer function is also obtained theoretically.
 Both the responses are compared.

RESULT

10
6. TIME RESPONSE OF SECOND ORDER SYSTEM

AIM:
To obtain the time response of a given second order system with its damping frequency.

APPARATUS:
Software: MATLAB

THEORY:
The time response has utmost importance for the design and analysis of control systems because
these are inherently time domain systems where time is independent variable. During the
analysis of response, the variation of output with respect to time can be studied and it is known
as time response. To obtain satisfactory performance of the system with respect to time must be
within the specified limits. From time response analysis and corresponding results, the stability
of system, accuracy of system and complete evaluation can be studied easily.

Due to the application of an excitation to a system, the response of the system is known as time
response and it is a function of time. The two parts of response of any system:
(i) Transient response
(ii) Steady-state response.
Transient response: The part of the time response which goes to zero after large interval of time
is known as transient response.
Steady state response: The part of response that means even after the transients have died out is
said to be steady state response.
The total response of a system is sum of transient response and steady state response:
C(t)=Ctr(t)+Css(t)

TIME RESPONSE OF SECOND ORDER CONTROL SYSTEM:

11
.
PROCEDURE:
1. Time response of the system is being found when we give the values of natural undamped
frequency and damping ratio.

2. When we give these values first rise time ,peak time,peak overshoot,transfer function are being
calculated.
3. Then “ step(s)” And “impulse(s)” generates time response of the system.

5. The hold function determines whether new graphics object are added to the graph or replaces
objects in the graph.
6. hold on retains the current plot and certain axes properties so that subsequent graphing
command add to the existing graph.

7. hold off resets axes properties to their defaults before drawing new [Link] off is the default.

THEORETICAL CALCULATIONS:

RESULT:

12
7. TRANSFER FUNCTION OF A DC MOTOR

AIM:

 To determine the transfer function of a DC Motor.


 Interaction between mechanical and electrical quantities of a motor.
 Measuring time response of a DC motor and comparing with time response obtained
through transfer function.

THEORY:
The transfer function of a DC motor is studied ( in general)

13
PROCEDURE:
 Type the program in the MATLAB editor that is in M-file.
 Save and run the program.
 Give the required inputs in the command window of MATLAB .

RESULT:

14
8. ROOT LOCUS FROM A TRANSFER FUNCTION
AIM:
To plot the root locus for a given transfer function of the system using MATLAB.

APPARATUS:
Software: MATLAB

THEORY:
rlocus computes the Evans root locus of a SISO open-loop model. The root locus gives the
closed-loop pole trajectories as a function of the feedback gain k (assuming negative feedback).
Root loci are used to study the effects of varying feedback gains on closed-loop pole locations.
In turn, these locations provide indirect information on the time and frequency responses.
rlocus(sys) calculates and plots the rootlocus of the open-loop SISO model sys. This function can
be applied to any of the following feedback loops by setting sys appropriately.
If sys has transfer function

h(s) =

The closed-loop poles are the roots of

d(s) + k*n(s)=0

MATLAB PROGRAM:
num=input(‘enter the numerator of the transfer function’)
den=input(‘enter the denominator of the transfer function’)

h=tf(num,den)
rlocus(h)

PROCEDURE:

 Write MATLAB program in the MATLAB specified documents.


 Then save the program to run it.
15
 The input is to be mentioned.
 The syntax “h=tf(num,den)” gives the transfer function and is represented as h.
 The syntax “rlocus(h)” plots the rootlocus of the transfer function h.
 Generally the syntax is of the form
rlocus(sys)
rlocus(sys,k)

rlocus(sys1, sys2, ….)

[r,k] = rlocus(sys)

r = rlocus(sys,k)

 rlocus(sys) calculates and plots the root locus of the open loop SISO model sys.
 Now we have to solve it theoretically.
 Now we have to compare the practical and theoretical ouputs to verify each other
correctly.

EXAMPLE:

Transfer function =

THEORETICAL CALCULATIONS:

enter the numerator of the transfer function

num=

enter the denominator of the transfer function


den=
Transfer function :

RESULT:

16
9. BODE PLOT FROM A TRANSFER FUNCTION
AIM:
To obtain bode plot for a givan transfer function of the system using MATLAB.

APPARATUS:
Software: MATLAB

THEORY:
Bode computes the magnitude and phase of the frequency response of LTI models. When
invoked without left-side arguments, bode produces a Bode plot on the screen. The magnitude is
plotted in decibels (dB), and the phase in degrees. The decibel calculation for mag is computed
as 20log10(|H(jw)|), where H(jw) is the system's frequency response. Bode plots are used to
analyze system properties such as the gain margin, phase margin, DC gain, bandwidth,
disturbance rejection, and stability.

Bode Calculations Gain

The magnitude of the transfer function T is defined as:

However, it is frequently difficult to transition a function that is in "numerator/denominator"


form to "real+imaginary" form. Luckily, our decibel calculation comes in handy. Let's say we
have a frequency response defined as a fraction with numerator and denominator polynomials
defined as:

If we convert both sides to decibels, the logarithms from the decibel calculations convert
multiplication of the arguments into additions, and the divisions into subtractions:

Gain = ∑ 20log(jω + zn) − ∑ 20log(jω + pm)

n m

17
bode(sys) plots the Bode response of an arbitrary LTI model sys. This model can be continuous
or discrete, and SISO or MIMO. In the MIMO case, bode produces an array of Bode plots, each
plot showing the Bode response of one particular I/O channel. The frequency range is
determined automatically based on the system poles and zeros.
bode(sys,w) explicitly specifies the frequency range or frequency points to be used for the plot.
To focus on a particular frequency interval [wmin,wmax], set w = {wmin,wmax}. To use
particular frequency points, set w to the vector of desired frequencies. Use logspace to generate
logarithmically spaced frequency vectors. All frequencies should be specified in radians/sec.

bode(sys1,sys2,...,sysN) or bode(sys1,sys2,...,sysN,w) plots the Bode responses of several LTI


models on a single figure. All systems must have the same number of inputs and outputs, but
may otherwise be a mix of continuous and discrete systems. This syntax is useful to compare the
Bode responses of multiple systems.
bode(sys1,'PlotStyle1',...,sysN,'PlotStyleN') specifies which color, linestyle, and/or marker
should be used to plot each system. For example,
bode(sys1,'r--',sys2,'gx')

uses red dashed lines for the first system sys1 and green 'x' markers for the second system sys2.
When invoked with left-side arguments
[mag,phase,w] = bode(sys)
[mag,phase] = bode(sys,w)

return the magnitude and phase (in degrees) of the frequency response at the frequencies w (in
rad/sec). The outputs mag and phase are 3-D arrays with the frequency as the last dimension (see
"Arguments" below for details). You can convert the magnitude to decibels by
magdb = 20*log10(mag)

MATLAB PROGRAM:
num=input('enter the numerator of the transfer function')
den=input('enter the denominator of the transfer function')
h=tf(num,den)

[gm pm wcp wcg]=margin(h)


bode(h)

18
PROCEDURE:

 Write the MATLAB program in the MATLAB editor.


 Then save and run the program.
 Give the required inputs.
 The syntax "bode(h)" solves the given input transfer function and gives the bode plot,
 where num,den are the numerator and denominator of the transfer function.
 Now plot the bode plot theoretically for the given transfer function and compare it with the
plot obtained practically.

RESULT:

19
[Link] FUNCTION FROM STATE MODEL

AIM:
To obtain the transfer function from the state model.

APPARATUS:
Software: MATLAB

THEORY:
The transfer function is defined as the ratio of Laplace transform of output to
Laplace transform of input. The transfer function of a given state model is given by:

A state space representation is a mathematical model of a physical system as a


set of input, output and state variables related by first-order differential equations. The state

space representation (also known as the "time-domain approach") provides a convenient and
compact way to model and analyze systems with multiple inputs and outputs.
Unlike the frequency domain approach, the use of the state space
representation is not limited to systems with linear components and zero initial conditions.
"State space" refers to the space whose axes are the state variables. The state of the system
can be represented as a vector within that space.

The input state equation is given by,

The output equation is written as,

MATLAB PROGRAM:
A =input(‘enter the matrix A’)

20
B= input(‘enter the matrix B’)
C = input(‘enter the matrix C’)
D= input(‘enter the matrix D’)

Sys =ss2tf(A,B,C,D)

PROCEDURE:

 Type the program in the MATLAB editor that is in M-file.


 Save and run the program.
 Give the required inputs in the command window of MATLAB in matrix format.
 The command ss2tf(A,B,C,D)) converts the given transfer function into a state model.
 Note down the output obtained in MATLAB.
 The Transfer Function is also obtained theoretically.
 Both the state models are compared.

RESULT:

21

Common questions

Powered by AI

Zeros and poles are critical in determining the stability and response characteristics of a linear time-invariant system. Poles of a transfer function dictate the system's natural behavior; if any poles have positive real parts, the system is unstable. Zeros, on the other hand, influence the transient response but do not affect stability directly. However, they can shape how quickly the system responds. Thus, an understanding of the location of zeros and poles in the complex plane is essential for predicting and modifying system behavior .

Bode plots assist engineers by graphically representing the frequency response of control systems through magnitude and phase plots. They provide insights into gain margin, phase margin, bandwidth, and disturbance rejection capabilities. By analyzing the plots, engineers can determine how a system responds to different frequency inputs, which are critical for assessing stability margins and performance criteria. This facilitates tuning controllers to enhance stability and achieve desired transient and steady-state behaviors .

To generate a step response in MATLAB, input the numerator and denominator of the transfer function into MATLAB and use the 'step' function. This function evaluates the system's output when subjected to a step input, showing how the system responds over time. Evaluating the step response is significant because it provides key insights into the system's transient behavior, including rise time, settling time, and steady-state error, informing controller design and system tuning .

In a second-order system, poles determine the damping ratio and natural frequency, directly influencing time response characteristics such as overshoot, rise time, and settling time. A pair of complex conjugate poles results in oscillations, with the damping ratio influencing overshoot and settling. Zeros can also affect these characteristics by modifying the transient response, potentially introducing additional delays or amplifying specific frequencies, thus altering rise time and percent overshoot .

The 'ss2tf' function in MATLAB converts a state space model to a transfer function by deriving the Laplace transform of the state's dynamics, making it possible to express the relationship between input and output in terms of transfer functions. This conversion is important because while state space representations are powerful for designing complex, multivariable systems, transfer functions are often more intuitive for analyzing traditional SISO systems and are easier to manipulate for frequency domain analysis .

The state space representation differs from the transfer function approach by modeling the system with sets of input, output, and state variables using first-order differential equations, whereas the transfer function focuses on the input-output relationship in the Laplace domain. State space allows for modeling multi-input-multi-output systems and is not limited to linear components or zero initial conditions, offering a more comprehensive analysis of dynamic systems. It provides a more flexible framework for control system design, especially when employing state feedback or observer-based approaches .

The impulse response of a system can be obtained in MATLAB by inputting the system's transfer function into the 'impulse' function. Theoretically, this response represents how the system reacts to a Dirac delta function, revealing intrinsic properties of the system such as stability and natural frequencies. Practically, analyzing the impulse response helps identify potential resonance and stability issues, guiding corrective design measures to improve system robustness and reliability .

The 'rlocus' function in MATLAB is used to compute and plot the root locus of a system, which is crucial for understanding how the closed-loop poles of a control system change with varying gain values. This helps engineers predict the system's stability and responsiveness as feedback gains are modified, providing insight into the potential effects on performance and enabling them to design more robust systems .

The process of obtaining a transfer function from zeros and poles using MATLAB involves using the MATLAB function 'zp2tf', which converts zeros, poles, and gain into the transfer function representing the system. This is significant in control systems as it provides a mathematical representation of the relation between input and output, helping to analyze system dynamics and characteristics. Zeros and poles determine the behavior and stability of the system, making this conversion crucial for system analysis and design tasks .

The 'hold on' feature in MATLAB allows users to retain current plots and add additional graphics to the existing axes without erasing previous plots. This is particularly useful in time response analysis of control systems when comparing different system responses, such as overlaying step and impulse responses on the same graph for direct comparison of transient behaviors and responses under various conditions .

You might also like