Changeset 1436 for applications/dual/vahala/kim/assembDeriv.m
- Timestamp:
- 03/04/12 19:28:08 (12 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/dual/vahala/kim/assembDeriv.m
r1435 r1436 1 function [A_k, C_k, pre_k, A_l] = assembDeriv(ksi, iab, ksi0, Q, R, ref_ome )1 function [A_k, C_k, pre_k, A_l] = assembDeriv(ksi, iab, ksi0, Q, R, ref_ome, inddq) 2 2 a = 0.9898; 3 3 b = 0.0072; … … 6 6 e = 0.0149; 7 7 dt = 0.000125; 8 9 Rs = 0.28; 10 Ls = 0.003465; 11 psi = 0.1989; 12 B = 0; 13 kp = 1.5; 14 pp = 4.0; 15 J = 0.04; 16 Lq = 1.0*Ls; 17 Ld = 0.9*Ls; 18 kpp = kp*pp*pp; 19 kppj = kpp/J; 8 20 9 21 ome = ksi(1); … … 17 29 18 30 %puvodni matice derivaci 19 A = [d, -e*(ia*cos(the)+ib*sin(the)); dt, 1.0]; 31 if(inddq == 0) 32 %stejne indukcnosti 33 A = [d, -e*(ia*cos(the)+ib*sin(the)); dt, 1.0]; 34 else 35 %ruzne indukcnosti 36 A = [d, -dt*kppj*(psi*(ia*cos(the) + ib*sin(the)) + (Ld - Lq)*(ia*cos(the) + ib*sin(the))^2 - (Ld - Lq)*(ib*cos(the) - ia*sin(the))^2); dt, 1.0]; 37 end 20 38 C = [b*sin(the), b*ome*cos(the); -b*cos(the), b*ome*sin(the)]; 21 39 … … 115 133 pre_k(1) = Pnew(1,1); 116 134 pre_k(2) = Pnew(1,2); 117 pre_k(3) = Pnew(2,2); 135 pre_k(3) = Pnew(2,2); 136 %max x(5) = pi^2/3 ... variance of uniform -pi,pi 137 if(pre_k(3) > pi^2/3) 138 pre_k(3) = pi^2/3; 139 end 118 140 end