Professional Documents
Culture Documents
Lab Tasks
Lab Tasks
Result:
Q2: Use MATLAB command to find the partial fraction of the following
a)
b)
a) .
MATLAB Code:
Result:
b) .
MATLAB Code:
Result:
Q3: MATLAB M-file Script
Use MATLAB to generate the first 100 terms in the sequence a(n)define recursively by
a(n+1) = p*a(n)*(1-a(n))
with p=2.9 and a(1) = 0.5.
MATLAB Code;
Result:
Q4: Consider the following equation
a) Write a MATLAB M-file function to obtain numerical values of y(t). Your function must take
y(0), ζ, ωn, t and θ as function inputs and y(t) as output argument.
b) Obtain the plot for y(t) for 0<t<10 with an increment of 0.1, by considering the following two
cases
Case 1: y(0) =0.15 m, ωn= √2rad/sec, ζ= 3/(2√2ሻand θ= 0;
Case 2: y(0) =0.15 m, ωn= √2rad/sec, ζ= 1/(2√2ሻand θ= 0;
a) .
MATLAB M-file:
Result:
b) .
MATLAB Code (Case-I):
Result:
MATLAB Code (Case-II):
Result:
Q1: (CLO-1, PLO-5, C-3)
Consider the mechanical system depicted in the figure. The input is given by f(t), and the output is given
by y(t). Determine the transfer function from y(t) to f(t) and using MATLAB, write a m-file and plot the
system response to a unit step input. Let m=10, k=1 and b=0.5. Show that the peak amplitude of the
output is about 1.8.
MATLAB Code:
Result:
Q2: (CLO-1, PLO-5, C-3)
Consider the differential equation
and u(t) is a unit step. Determine the solution analytically and verify by co-plotting the analytical
solution and the step response obtained with ‘step’ function.
MATLAB Code:
Result:
Q1: (CLO-1, PLO-5, C-3)
Consider the transfer function
Using MATLAB plot the pole zero map of the above system.
MATLAB Code:
Result:
and u(t) is a unit step. Determine the solution analytically and verify by co-plotting the analytical
solution and the step response obtained with ‘step’ function.
MATLAB Code:
Result:
Q3: (CLO-1, PLO-5, C-3)
A system has a transfer function
Plot the response of the system when R(s) is a unit impulse and unit step for the parameter z=3, 6 and
12.
Result:
Q2: (CLO-1, PLO-5, C-3)
Consider the feedback system depicted in the figure below
(a). Compute the closed-loop transfer function using the ‘series’ and ‘feedback’ functions
(b). Obtain the closed-loop system unit step response with the ‘step’ function and verify that final value
of the output is 2/5.
MATLAB Code:
Result:
Q1: (CLO-1, PLO-5, C-3)
a) Unit Step Response of the First Order):
a. MATLAB Code:
Result:
b. MATLAB Code:
Result:
b) :
b. The time constant and the 63% percent of the final value are same.
c) :
c. The steady state value in both the cases are 1.
Q1: (CLO-1, PLO-5, C-3)
Question # 01:
Effect of damping ratio ζon performance measures. For a single-loop second order feedback system
given below
Find the step response of the system for values of ωn = 1 and ζ= 0.1, 0.4, 0.7, 1.0 and 2.0. Plot all the
results in the same figure window and fill the following table.
MATLAB Code:
Result:
Q1: (CLO-1, PLO-5, C-3)
Check the stability of following systems by using Routh Hurwitz criteria?
1
a)
s^8 + 2 s^7 + 8 s^6 + 12 s^5 + 20 s^4 + 16 s^3 + 16 s^2
a) MATLAB Code:
Result:
The roots of the polynomial 𝑠8 + 2𝑠7 + 8𝑠6 + 12𝑠5 + 20𝑠5 + 20𝑠4 + 16𝑠3 + 16𝑠2 are:
𝑠1 = 0
𝑠2 = 0
𝑠3 = 1.41421𝑖
𝑠4 = −1.41421𝑖
𝑠5 = −1 + 𝑖
𝑠6 = −1 − 𝑖
𝑠7 = 2𝑖
𝑠8 = −2𝑖
So, according to Routh Hurwitz criterion the system is not stable.
b) G = 1
b) MATLAB Code:
Result:
c) G = 4s+4
s^3 + 5 s^2 - 2 s + 4
c) MATLAB Code:
Result:
d) G = 1
d) MATLAB Code:
Result:
Result:
b) Solution:
MATLAB Code (Kp=2):
Result:
MATLAB Code (Kp=10):
Result:
MATLAB Code (Kp=100):
Result:
Comparison;
By analyzing all of the above responses, we can deduce that the proportional controller (Kp) can
increase the rise time and decrease the steady state error, but never completely remove it. While an
integral controller (Ki) will eliminate the steady state error, it can exacerbate the transient answer. Effect
of each controller Kp & Ki on the closed-loop system are summarized below:
It can be observed that using PI Controller Ts Settling time and Tp Peak Time are reduced.
It can be observed that Tr Rise time is reduced to quite a low value in comparison to PI controller or
without any controller.
It can be observed that with PID controller all the parameters of the step response are giving the best
results. therefore, it is better to use combination of PI & PD controller for the best results.
MATLAB Code:
Result:
Step Response:
Tuned:
MATLAB Code:
Tuned: