Revision 706, 0.5 kB
(checked in by smidl, 15 years ago)
|
eol-native
|
-
Property svn:eol-style set to
native
|
Line | |
---|
1 | if 0 |
---|
2 | M=pmsm_estim_mex('Mz_mx.cfg'); |
---|
3 | save Mz M |
---|
4 | else |
---|
5 | load Mz |
---|
6 | end |
---|
7 | |
---|
8 | time = 0.000125*[0:size(M.crbzth,1)-1]; |
---|
9 | |
---|
10 | figure(1) |
---|
11 | subplot(2,1,1); |
---|
12 | plot(time,M.xom); |
---|
13 | grid on |
---|
14 | title('Simulated rotor speed profile'); |
---|
15 | |
---|
16 | subplot(2,1,2); |
---|
17 | hold off |
---|
18 | plot(time,M.crbzth); |
---|
19 | hold on |
---|
20 | plot(time,M.crbth,'r--'); |
---|
21 | grid on |
---|
22 | legend('EKF TL','EKF') |
---|
23 | title('Cramer-Rao bounds on rotor position') |
---|
24 | |
---|
25 | figure(2) |
---|
26 | hold off |
---|
27 | plot(time,M.crbzom); |
---|
28 | hold on |
---|
29 | plot(time,M.crbom,'r'); |
---|
30 | |
---|
31 | ind=100:size(M.crbth,1)-100; |
---|
32 | [min(M.crbom(ind)), max(M.crbom(ind))] |
---|
33 | [min(M.crbzom(ind)), max(M.crbzom(ind))] |
---|
34 | |
---|