MATLAB (8)

Lead-Lag Compensation

1
2
3
4
>> num=[4];
>> den=[1 0.5 0];
>> v=[-5 5 -5 5];
>> axis(v);

axis

1
2
>> rlocus(num,den);
>> axis(v);

rlocus
axis

1
2
3
>> rlocus(num,den);
>> grid on
>> hold on

grid on

1
2
3
>> numc=[25.04 5.008];
>> denc=[1 5.03247 0.0626 0];
>> rlocus(numc,denc);

Lead-Lag Compensation

1
2
3
4
5
6
7
>> den=[1 0.5 4];
>> denc=[1 5.0327 25.1026 5.008];
>> t=0:0.1:10;
>> step(num,den,t);
>> hold on
>> step(numc,denc,t);
>> grid on

Step Response

1
2
3
4
5
6
7
8
>> step(num,den,t);
>> den=[1 0.5 4 0];
>> step(num,den,t);
>> hold on
>> denc=[1,5.0327 25.1026 5.008 0];
>> step(numc,denc,t);
>> plot(t,t,'k');
>> grid on

Ramp Response