Changeset 338 for applications/pmsm/Barcelona/QandR.m
- Timestamp:
- 05/06/09 15:25:59 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/pmsm/Barcelona/QandR.m
r335 r338 29 29 istep=0.085; 30 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