Revision 349, 0.7 kB
(checked in by smidl, 15 years ago)
|
Barcelona + mex for pmsm + results of pwm experiment for off-line use with pwm.m (>> pwm(0))
|
Line | |
---|
1 | % Q |
---|
2 | std_ua=1; %2std = 2V |
---|
3 | std_ub=1; |
---|
4 | std_i_om=0.0002; |
---|
5 | std_i_th=1e-7; |
---|
6 | |
---|
7 | dt=0.000125; |
---|
8 | |
---|
9 | Rs=0.28; |
---|
10 | Ls=0.003465; |
---|
11 | Fmag= 0.1989; |
---|
12 | kp = 1.5; |
---|
13 | p = 4.0; |
---|
14 | J = 0.04; |
---|
15 | Bf = 0.0; |
---|
16 | Uc = 200.0; |
---|
17 | DT = 3e-6; |
---|
18 | |
---|
19 | |
---|
20 | StdQ=[ (dt/Ls)*std_ua + 0.005, ... |
---|
21 | (dt/Ls)*std_ub + 0.005,... |
---|
22 | 0.0002,... |
---|
23 | 1e-7]; |
---|
24 | |
---|
25 | Qu = (dt/Ls)^2*(2*3)^2/12; |
---|
26 | |
---|
27 | %R |
---|
28 | |
---|
29 | istep=0.085; |
---|
30 | R11 = (istep+istep)^2/12 |
---|
31 | |
---|
32 | % %diffs |
---|
33 | Tl=10; |
---|
34 | % th=[0 pi/2 pi]; |
---|
35 | % dom = p/J*Tl*dt |
---|
36 | % dia = Fmag/Ls*dt*dom*sin(th) |
---|
37 | % dib = -Fmag/Ls*dt*dom*cos(th) |
---|
38 | % dth = dom*dt |
---|
39 | % |
---|
40 | % % from om=0; |
---|
41 | % dom2= dom + kp*p*p * Fmag/J*dt* ( dib .* cos ( th +dth)- dia .* sin ( th +dth) ) + dom |
---|
42 | % dia = Fmag/Ls*dt*dom2.*sin(th+dth) |
---|
43 | % dib = -Fmag/Ls*dt*dom2.*cos(th+dth) |
---|
44 | % dth = dom2*dt |
---|
45 | % |
---|
46 | |
---|
47 | dom = p/J*Tl*dt |
---|
48 | Qrat=[Fmag/Ls*dt,Fmag/Ls*dt, 1, dt].^2 |
---|