-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtest.m
44 lines (42 loc) · 1.46 KB
/
test.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
method = 'zpetc';
[invGp,forwardOrder] = modelBasedFeedforward(GpDis,method);
[delta,~,alpha] = extraCompensation(GpDis,method);
figure;
bodeplot(1/GpDis,invGp,invGp * (1+delta*alpha),Op);
%%
%%
Sp = feedback(GpDis*GcDis,1);
figure;pzmap(Sp);
figure;bodeplot(Sp);
method = 'zpetc';
compensationOrder = 1;
[inverseSp,forwardOrder] = modelBasedFeedforward(Sp,method);
[delta,~] = extraCompensation(Sp,method,compensationOrder);
% inverseSp = inverseSp * lpDis;
figure;bodeplot(1/Sp,inverseSp,inverseSp*(1+delta),Op);
%%
Sp = feedback(GpDis*GcDis,1);
figure;pzmap(Sp);
figure;bodeplot(Sp);
method = 'zmetc';
compensationOrder = 1;
[inverseSp,forwardOrder] = modelBasedFeedforward(Sp,method);
[delta,~] = extraCompensation(Sp,method,compensationOrder);
% inverseSp = inverseSp * lpDis;
compensationOrder = 2;
[inverseSp,forwardOrder] = modelBasedFeedforward(Sp,method);
[delta2,~] = extraCompensation(Sp,method,compensationOrder);
figure;bodeplot(1/Sp,inverseSp,inverseSp*(1+delta),inverseSp*(1+delta2),Op);
%%
Sp = feedback(GpDis*GcDis,1);
figure;pzmap(Sp);
figure;bodeplot(Sp);
method = 'ignore';
compensationOrder = 1;
[inverseSp,forwardOrder] = modelBasedFeedforward(Sp,method);
[delta,~] = extraCompensation(Sp,method,compensationOrder);
% inverseSp = inverseSp * lpDis;
compensationOrder = 2;
[inverseSp,forwardOrder] = modelBasedFeedforward(Sp,method);
[delta2,~] = extraCompensation(Sp,method,compensationOrder);
figure;bodeplot(1/Sp,inverseSp,inverseSp*(1+delta),inverseSp*(1+delta2),Op);