Matlab Code For Step Response of Transfer Function Using Zoh Equivalent Approximation When T 1, 0.1, 0.01
Matlab Code For Step Response of Transfer Function Using Zoh Equivalent Approximation When T 1, 0.1, 0.01
h (k )
0.5
0
-0.5
-1
10
15
20
k
Step Response of T/F When T=0.1
25
30
25
30
h (k )
0.5
0
-0.5
-1
10
15
k
20
ANALYSIS FROM THE WAVEFORM:From the step response waveform, we analyze that when T=1,rise
time increases whereas the settling time decreases. The system is stable having
no overshoot. When T=0.1,rise time decreases and settling time increases. The
system is also stable in this case, having no overshoot.
axis(v);
xlabel('k');
ylabel('h(k)');
title('Step Response of T/F When T=1');
grid on;
%Using z=exp(st) Approximation,when T=0.1
num=[0 5]
den=[1 0.367]
u=[1 ones(1,15)]
k=0:15;
x=filter(num,den,u);
subplot(2,1,2);
plot(k,x);
v=[0 15 0 6];
axis(v);
xlabel('k');
ylabel('h(k)');
title('Step Response of T/F When T=0.1');
grid on;
h(k )
6
4
2
0
h(k )
10
15
10
15
k
Step Response of T/F When T=0.1
4
2
0