MATLAB code:
clc;clear all;close all;
%G(s)
b=12;%coefficients of u
a=[1 6 12];%coefficients of y
t=0:0.1:20;
disp('Continuous transfer fucntion G(s)')
sys=tf(b,a)
xt=(t>=0);%step input
%step response
y=lsim(sys,xt,t);
subplot(321)
plot(t,xt,'b','linewidth',3)
xlabel('t');ylabel('x(t)')
title('step input')
subplot(322)
plot(t,y,'r','linewidth',3)
xlabel('t');ylabel('y(t)')
title('step response of G(s)')
Ts=1;
sysd1 = c2d(sys,Ts);
n=0:1:20;
x=(n>=0);
y=lsim(sysd1,x,n);
subplot(323)
stem(n,y,'r','linewidth',3)
xlabel('n');ylabel('y(n)')
title('step response for Ts=1s')
Ts=0.5;sysd2 = c2d(sys,Ts)
y=lsim(sysd2,x,n);
subplot(324)
stem(n,y,'r','linewidth',3)
xlabel('n');ylabel('y(n)')
title('step response for Ts=0.5s')
Ts=2;sysd3 = c2d(sys,Ts);
y=lsim(sysd3,x,n);
subplot(325)
stem(n,y,'r','linewidth',3)
xlabel('n');ylabel('y(n)')
title('step response for Ts=2s')
disp('contunous state space model')
[a,b,c,d] = ssdata(sys)
disp('Discrete state space model')
[aa,bb,cc,dd] = ssdata(sysd2)
%step response of unty feedback system
%Gf(s)=G/(1+(G*H)) where H=1
%Gf=G/(1+G)=12/(s^2 +6s +24)
bb=12;
aa=[1 6 24];
syss=tf(bb,aa)
%step response
t=0:0.01:5;
xt=(t>=0);
y=lsim(syss,xt,t);
subplot(326)
plot(t,y,'m','linewidth',3)
xlabel('t');ylabel('y(t)')
title('Step response of unity feedback system')
Command window:
Continuous transfer fucntion G(s)
Transfer function 'sys' from input 'u1' to output ...
12
y1: --------------
s^2 + 6 s + 12
Continuous-time model.
Transfer function 'sysd2' from input 'u1' to output ...
0.561 z + 0.1996
y1: ------------------------
z^2 - 0.2891 z + 0.04979
Sampling time: 0.5 s
Discrete-time model.
contunous state space model
a =
0.00000 -1.20000
10.00000 -6.00000
b =
-1.20000
0.00000
c =
0 -1
d = 0
Discrete state space model
aa =
0.00000 0.04979
-1.00000 0.28911
bb =
-0.19963
0.56104
cc =
0 1
dd = 0
Transfer function 'syss' from input 'u1' to output ...
12
y1: --------------
s^2 + 6 s + 24
Continuous-time model.
_________________________________________________________________________________________
Observation:
The continouos transfer function is
12
G(s)= --------------
s^2 + 6 s + 12
From the graphs (2) (3) (4), the appropriate sampling time is Ts=0.5s.
The pulse transfer function is
G(z) = 0.561 z + 0.1996
------------------------
z^2 - 0.2891 z + 0.04979
The unity feedback system is
Gf(s)= 12
--------------
s^2 + 6 s + 24
The continuous state space model is
a =
0.00000 -1.20000
10.00000 -6.00000
b =
-1.20000
0.00000
c =
0 -1
d = 0
The discrete state space model is
aa =
0.00000 0.04979
-1.00000 0.28911
bb =
-0.19963
0.56104
cc =
0 1
dd = 0
you can use matlab to solve 1. Given the plant model differential equation: y" + 6y'+ 12y 12u(t) Find: a) G(s) continuous transfer function he step response of the unity feedback system c) The...
Consider a unity-feedback control system with a PI controller Gpr(s) and a plant G(s) in cascade. In particular, the plant transfer function is given as 2. G(s) = s+4, and the PI controller transfer function is of the forrm KI p and Ki are the proportional and integral controller gains, respectively where K Design numerical values for Kp and Ki such that the closed-loop control system has a step- response settling time T, 0.5 seconds with a damping ratio of...
CP3.1 A unity feedback system is having an open loop ransfer function (s34) Using MATLAB (a) Obtain closed-loop transfer function. (b) Obtain a state-space model. c) Using the state-space model obtain the unit step response
A unity feedback system with the forward transfer function G(s)=K/(s+1)(s+3)(s+6) is operating with a closed-loop step response that has 15% overshoot. Do the following: a) Evaluate the steady-state error for a unit step input b) Design a PI control to reduce the steady-state error to zero without affecting its transient response c) Evaluate the steady-state error and overshoot for a unit step input to your compensated system A unity feedback system with the forward transfer function G(s) is operating with...
A unity feedback system with the forward transfer function G)2)(s +5) is operating with a closed-loop step response that has 15% overshoot. Do the following: a) Evaluate the settling time for a unit step input; b) Design a PD control to yield a 15% overshoot but with a threefold reduction in settling time; c) Evaluate the settling time, overshoot, and steady-state error with the PD control. A unity feedback system with the forward transfer function G)2)(s +5) is operating with...
A unity feedback system with the forward transfer function G (s) = s(s+2)(s15) is operating with a closed-loop step response that has 15% overshoot. Do the following: a) Evaluate the settling time for a unit step input b) Design a PD control to yield a 15% overshoot but with a threefold reduction in settling time; c) Evaluate the settling time, overshoot, and steady-state error with the PD control. A unity feedback system with the forward transfer function G (s) =...
A classic second order system has transfer function the undamped natural frequency to be 10 rad/s throughout this exercise. Note, for the following MATLAB simulations you need to use format long defined at the top of the program to get full precision. a) Use MATLAB to plot the step response for three damping factors of ζ =0.5,1 and 1.5 respectively. step(g,tfinal)_ where tfinal is the max time you need to make it 2 secs and g is the b) Takeζ...
PROBLEM: A unity feedback system with the forward transfer function K G(s) s(s+7) is operating with a closed-loop step response that has 15% overshoot. Do the following: a. Evaluate the steady-state error for a unit ramp input. b. Design a lag compensator to improve the steady-state error by a factor of 20. c. Evaluate the steady-state error for a unit ramp input to your compensated system. d. Evaluate how much improvement in steady-state error was realized.
17. Consider unity feedback system with uncompensated forward transfer function a given by: K G(s) s+3)(s 6) The system requires a damping ratio of 0.5. If the design point is at -1.54 j2.66, design a PI controller to drive the steady-state error of the response to zero 17. Consider unity feedback system with uncompensated forward transfer function a given by: K G(s) s+3)(s 6) The system requires a damping ratio of 0.5. If the design point is at -1.54 j2.66,...
3. The open loop transfer function of a unity feedback system is given by \(G(S)=\frac{K}{S(1+S T)}\) Where Tand \(\mathrm{K}\) are constants having positive values. By what factor the amplifier gain be reduced so that (a) peak overshoot of unit step response of the system is reduced from \(75 \%\) to \(25 \% .\) b) The damping ratio increases from \(0.1\) to \(0.6\).
Problem 3 A unity feedback system has the loop transfer function G(s) = Kata) s(s + (a) Find the breakway and entry points on the real axis. (b) Find the gain and the roots when the real part of the complex roots is located at -2 (c) Sketch the root locus. Problem 4 The forward path G(s) of a unity feedback system with input R(s) and output Y (s) is given by G(o) 106I) (a) What is the type of...