root/applications/pmsm/Barcelona/QandR.m @ 338

Revision 338, 0.6 kB (checked in by smidl, 15 years ago)

Multiple Models + changes in loggers

Line 
1% Q
2std_ua=1; %2std = 2V
3std_ub=1;
4std_i_om=0.0002;
5std_i_th=1e-7;
6
7dt=0.000125;
8
9Rs=0.28;
10Ls=0.003465;
11Fmag= 0.1989;
12kp = 1.5;
13p = 4.0;
14J = 0.04;   
15Bf = 0.0; 
16Uc = 200.0;
17DT = 3e-6;
18
19
20StdQ=[ (dt/Ls)*std_ua + 0.005, ...
21    (dt/Ls)*std_ub + 0.005,...
22    0.0002,...
23    1e-7];
24
25Q= StdQ.^2
26
27%R
28
29istep=0.085;
30R11 = (istep+istep)^2/12
31
32%diffs
33Tl=10;
34th=[0 pi/2 pi];
35dom = p/J*Tl*dt
36dia = Fmag/Ls*dt*dom*sin(th)
37dib = -Fmag/Ls*dt*dom*cos(th)
38dth = dom*dt
39
40% from om=0;
41dom2= dom + kp*p*p * Fmag/J*dt* ( dib .* cos ( th +dth)- dia .* sin ( th +dth) ) + dom
42dia = Fmag/Ls*dt*dom2.*sin(th+dth)
43dib = -Fmag/Ls*dt*dom2.*cos(th+dth)
44dth = dom2*dt
Note: See TracBrowser for help on using the browser.