100% found this document useful (3 votes)
17K views6 pages

Unit Step Function in Matlab

The document describes finding the unit step response for the given transfer function S(s2+9s+19)/(s3+7s2+14s+8) by using partial fraction decomposition, taking the Laplace inverse of each term, and plotting the step response. MATLAB is used to code the transfer function, take the step response, and plot it along with the calculated unit step response curve, validating the analytical solution.

Uploaded by

shaista005
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
Download as doc, pdf, or txt
100% found this document useful (3 votes)
17K views6 pages

Unit Step Function in Matlab

The document describes finding the unit step response for the given transfer function S(s2+9s+19)/(s3+7s2+14s+8) by using partial fraction decomposition, taking the Laplace inverse of each term, and plotting the step response. MATLAB is used to code the transfer function, take the step response, and plot it along with the calculated unit step response curve, validating the analytical solution.

Uploaded by

shaista005
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1/ 6

Program No.

Object-: Write a program to find out the unit step response for the given
function-:
S(s2+9s+19)/s3+7s2+14s+8
Apparatus-: Matlab software 7.0.4

Theory-:
Step Response
Similarly to the impulse response, the step response of a system is the output of
the system when a unit step function is used as the input. The step response is a
common analysis tool used to determine certain metrics about a system.
Typically, when a new system is designed, the step response of the system is the
first characteristic of the system to be analyzed.

Convolution

However, the impulse response cannot be used to find the system output from
the system input in the same manner as the transfer function. If we have the
system input and the impulse response of the system, we can calculate the
system output using the convolution operationas such:

y(t) = h(t) * x(t)


Remember: an asterisk meansconvolution, not multiplication!
Where " * " (asterisk) denotes the convolution operation. Convolution is a
complicated combination of multiplication, integration and time-shifting. We can
define the convolution between two functions, a(t) and b(t) as the following:

(The variable τ (greek tau) is a dummy variable for integration). This operation
can be difficult to perform. Therefore, many people prefer to use the Laplace
Transform (or another transform) to convert the convolution operation into a
multiplication operation, through the Convolution Theorem.

Time-Invariant System Response


If the system in question is time-invariant, then the general description of the
system can be replaced by a convolution integral of the system's impulse
response and the system input. We can call this the convolution description of
a system, and define it below:

Convolution Theorem
This method of solving for the output of a system is quite tedious, and in fact it
can waste a large amount of time if you want to solve a system for a variety of
input signals. Luckily, the Laplace transform has a special property, called
the Convolution Theorem, that makes the operation of convolution easier:
Convolution Theorem
Convolution in the time domain becomes multiplication in the complex Laplace
domain. Multiplication in the time domain becomes convolution in the complex
Laplace domain.
The Convolution Theorem can be expressed using the following equations:

This also serves as a good example of the property of Duality.

Using the Transfer Function


The Transfer Function fully decribes a control system. The Order, Type and
Frequency response can all be taken from this specific function. Nyquist and
Bode plots can be drawn from the open loop Transfer Function. These plots
show the stability of the system when the loop is closed. Using the denominator
of the transfer function, called the characteristic equation the roots of the system
can be derived.For all these reasons and more, the Transfer function is an
important aspect of classical control systems. Let's start out with the definition:
Transfer Function
The Transfer function of a system is the relationship of the system's output to it's
input, represented in the complex Laplace domain.If the complex Laplace
variable is s, then we generally denote the transfer function of a system as
either G(s) or H(s). If the system input isX(s), and the system output is Y(s), then
the transfer function can be defined as such:

If we know the input to a given system, and we have the transfer function of the
system, we can solve for the system output by multiplying:
Y(s) = H(s)X(s)

Solution of the question:-

C(s)=R(s).G(s)

C(s)1/s.[(s2+9s+19)/s3+7s2+14s+8]

= s2+9s+19/s3+7s2+14s+8

Break the equations by partial fraction

C(s)=11/3(s+1)-5/2(s+2)-1/6(s+4)

Taking laplace inverse of each term,we get


11/3e-t -5/2e-2t-1/6e-4t

Coding :-
num=[1 7 8]
den=[1 14 12 4]
g=tf(num,den)
grid on
subplot(2,1,1)
step(g)
t=0:0.01:6
c=11/2*exp(-t)-5/2*exp(-2*t)-1/6*exp(-4*t)
grid on
subplot(2,1,2)
plot(t,c)
grid on

graph:-

Step Response
3

2
Amplitude

0
0 5 10 15
Time (sec)

0
0 1 2 3 4 5 6

Solution of the problem:


The given transfer Function :
S2+9s+9/s3 +7s2+14s+8
Taking first the denominator:
s3 +7s2+14s+8
s2(s+1)+6s(s+1)+8(s+1)
(s+1)( s2+6s+8)
(S+1)(s2+4s+2s+8)
(s+1)(s(s+4)+2(s+4)
(s+1)(s+4)(s+2)

S2+9s+9/s3 +7s2+14s+8=[a/s+1]+[b/s+4]+[c/s+2]
S2+9s+9=A(s+4)(s+2)+b(s+1)(s+2)+c(s+1)(s+4)

Put s=-1
We get ,
A =11/3
Putting S=-4
We get,
B=-5/2
Putting S=-2
We get,
B=-1/6

Putting these values and taking the laplace transform of that we get,
11/3e-t -5/2e-2t-1/6e-4t

Result:- we have successfully found out the unit step respose of the given
transfer function .
Questions:-
1)Area under a unit impulse function if
Ans) unity

2) Laplace transform of doublet is


Ans) s

3) If the poles of a control system lie on the imaginary axis in s-plane the system
will be :
Ans)marginally stable.

4) Roots of the charcterstics equations are nothing but:


Ans) poles of a ststem.

5) In Mechanical system,the spring force is proportional to:


Ans) Displacement

You might also like