Show
Ignore:
Timestamp:
03/04/12 19:28:08 (12 years ago)
Author:
vahalam
Message:

pridani a uprava lqg s hyperstavem viz clanek Kim2006

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)     
     1function [A_k, C_k, pre_k, A_l] = assembDeriv(ksi, iab, ksi0, Q, R, ref_ome, inddq)     
    22    a = 0.9898; 
    33    b = 0.0072; 
     
    66    e = 0.0149; 
    77    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; 
    820     
    921    ome = ksi(1); 
     
    1729     
    1830    %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 
    2038    C = [b*sin(the), b*ome*cos(the); -b*cos(the), b*ome*sin(the)]; 
    2139     
     
    115133    pre_k(1) = Pnew(1,1); 
    116134    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 
    118140end