Question

1. Given the plant model differential equation: y + 6y+ 12y 12u(t) Find: a) G(s) continuous transfer function he step respoyou can use matlab to solve

0 0
Add a comment Improve this question Transcribed image text
Answer #1

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.

step response of G(s) step input 1.15 1.1 1.05 0.8 0.6 0.4 0.2 0.95 0.9 0.85 15 20 15 20 step response for Ts=1s step respons

_________________________________________________________________________________________

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

Add a comment
Know the answer?
Add Answer to:
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...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT