root/applications/dual/vahala/pcrb/pcrb_E2.m @ 1433

Revision 1416, 145.9 kB (checked in by vahalam, 13 years ago)

pridani slozky pcrb s cramer-rao mezi

Line 
1%simulator PMSM for PCRB, choice: Ls/Ldq & correct/incorrect expectation
2clear all;
3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5
6%   settings
7    % ON/OFF  MODEL    IS CORR. E   INDUCT. L
8model1 = 1; % alpha-beta    nE      Ls
9model2 = 1; % d-q           nE      Ls
10model3 = 1; % 5sc           nE      Ls
11
12model4 = 1; % alpha-beta    E       Ls
13model5 = 1; % d-q           E       Ls
14model6 = 1; % 5sc           E       Ls
15
16model7 = 1; % alpha-beta    nE      Ldq
17model8 = 1; % d-q           nE      Ldq
18model9 = 1; % 5sc           nE      Ldq
19
20model10 = 1; % alpha-beta   E       Ldq
21model11 = 1; % d-q          E       Ldq
22model12 = 1; % 5sc          E       Ldq
23
24    % CONTROL
25    % 1 -   ome = ref_ome, the = integral(ome), ial = ibe = 0
26    % 2 -   PI control   
27    % 3 -   PI + injection (sin -> dq)
28    % 4 -   PI + injection (rect. -> dq)
29    % 5 -   PI + injection (const. -> ud) *J4 ~ 3e-6 for all exc. dq
30    % 6 -   PI + rnd error (ref_ome) *J4: dq bad; ab,5sc Ls ~ 4e-4; ab,5sc Ldq ~5e-6 
31    % 7 -   PI + injection (sin -> al-be)
32    % 8 -   PI + injection (rect. -> al-be)
33    % 9 -   PI + bicrit. (sign) *J4 ~ 1e-3 for all exc. dq
34    % 10 -  PI + rnd bicrit. selection (5)   
35control = 9;
36    % param. amp*phi(injom*dt*t) //phi = sin,cos,sign(sin),sing(cos)
37amp = 10.0;
38injom = 500;
39
40    %cov Q, R matrices
41%         %noise
42% Q = diag([0.0013 0.0013 5.0e-6 1.0e-10]);
43% R = diag([0.0006 0.0006]);
44%         %EKF
45% Q = diag([0.1 0.1 0.1 0.001]);
46% R = diag([0.05 0.05]);
47        %test
48Q = diag([0.1 0.1 0.1 1]);
49R = diag([0.05 0.05]);
50
51    % plot system variables
52plotsys = 0;
53
54%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
55%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
56%constants
57
58%   machine parameters
59Rs = 0.28;
60Ls = 0.003465;
61psipm = 0.1989;
62B = 0;
63TL = 0;
64kp = 1.5;
65pp = 4.0;
66J = 0.04;
67
68dt = 0.000125;
69
70Lq = 1.0*Ls;
71Ld = 0.9*Ls;
72
73%aliases
74kpp = kp*pp*pp;
75kppj = kpp/J;
76psi = psipm;
77
78a = 0.9898;
79b = 0.0072;
80c = 0.0361;
81d = 1.0;
82e = 0.0149;
83
84%horizont
85T = 120000;
86
87%reference signal
88ref_ome = zeros(1, T);
89% ref_profile = [1, 10, 50, 200, 200, 30, 0, 0, -1, -10, -50, -200, -200, -30, 0];
90ref_profile = [0, -1, 3, 6, 9, 6, 3, 0, 0, 0, 0, 0,0,-3, -6, -3];
91% ref_profile = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
92% ref_profile = ones(1,16);
93
94for k = 1:T,
95       index = floor(k*dt);
96       if(index>0)
97           lower = ref_profile(index);
98       else
99           lower = 0;
100       end
101       if(index<T*dt)
102           upper = ref_profile(index+1);
103       else
104           upper = 0;
105       end
106       ref_ome(k) = lower + (upper-lower)*dt*(k-index/dt);
107end
108
109
110
111%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
112%   system variables
113
114%system state and control
115x_sys = zeros(4, T);
116u_ab = zeros(2, T);
117u_dq = zeros(2, T);
118
119%covariance alternatives
120Q4 = Q;
121Q5 = zeros(5);
122Q5(1:4,1:4) = Q;
123Q5(5,5) = Q(4,4);
124q1 = Q4(1,1);
125q2 = Q4(2,2);
126q3 = Q4(3,3);
127q4 = Q4(4,4);
128q5 = Q5(5,5);
129iQ4 = inv(Q4);
130iQ5 = inv(Q5);
131iR = inv(R);
132e05q4 = exp(-1/2*q4);
133e2q4 = exp(-2*q4);
134e92q4 = exp(-9/2*q4);
135e4q4 = exp(4*q4);
136e8q4 = exp(-8*q4);
137e6q4 = exp(6*q4);
138
139%PCRB J matrices
140iJn1 = zeros(4,4,T);
141iJn2 = zeros(4,4,T);
142iJn3 = zeros(5,5,T);
143iJn4 = zeros(4,4,T);
144iJn5 = zeros(4,4,T);
145iJn6 = zeros(5,5,T);
146iJn7 = zeros(4,4,T);
147iJn8 = zeros(4,4,T);
148iJn9 = zeros(5,5,T);
149iJn10 = zeros(4,4,T);
150iJn11 = zeros(4,4,T);
151iJn12 = zeros(5,5,T);
152Jj1 = inv(Q4);
153Jj2 = inv(Q4);
154Jj3 = inv(Q5);
155Jj4 = inv(Q4);
156Jj5 = inv(Q4);
157Jj6 = inv(Q5);
158Jj7 = inv(Q4);
159Jj8 = inv(Q4);
160Jj9 = inv(Q5);
161Jj10 = inv(Q4);
162Jj11 = inv(Q4);
163Jj12 = inv(Q5);
164
165%PI control
166sum_iq = 0;
167sum_ud = 0;
168sum_uq = 0;
169kon_pi = 30.0;
170kon_ii = 0.0;
171kon_pu = 20.0;
172kon_iu = 0.0;
173
174%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
175%   init
176
177% measurement function derivatives
178C4 = zeros(2,4);
179C4(1,1) = 1.0;
180C4(2,2) = 1.0;
181
182C5 = zeros(2,5);
183C5(1,1) = 1.0;
184C5(2,2) = 1.0;
185
186% system function derivatives
187    %alpha-beta, equal Ls
188A14 = zeros(4);
189A14(1,1) = a;
190A14(2,2) = a;
191A14(3,3) = d;
192A14(4,3) = dt;
193A14(4,4) = 1.0;
194A4 = zeros(4);
195    %d-q, equal Ls
196A25 = zeros(4);
197A25(1,1) = a;
198A25(2,2) = a;
199A25(2,3) = -b;
200A25(3,2) = e;
201A25(3,3) = d;
202A25(4,3) = dt;
203A25(4,4) = 1.0;
204    %5sc, equal Ls
205A36 = zeros(5);
206A36(1,1) = a;
207A36(2,2) = a;
208A36(3,3) = d;
209A36(4,4) = 1.0;
210A36(5,5) = 1.0;
211    %alpha-beta, Ldq
212A70 = zeros(4);
213% A70(4,4) = 1.0;
214% A70(5,5) = 1.0;
215    %d-q, Ldq
216A81 = zeros(4);
217A81(1,1) = 1.0 - Rs*dt/Ld;
218A81(2,2) = 1.0 - Rs*dt/Lq;
219A81(3,3) = 1-B*dt/J;
220A81(4,3) = dt;
221A81(4,4) = 1.0;
222    %5sc, Ldq
223A92 = zeros(5);
224A92(4,4) = 1.0;
225A92(5,5) = 1.0;
226
227
228%expectation corrections
229    %cor. 2 -> 5
230D11_cor5 = diag([dt^2*q3/q2, dt^2*q3/q1, dt^2*q1/q2 + dt^2*q2/q1, 0.0]);
231    %cor. 3 -> 6
232D11_cor6 = diag([e^2*q4/q3,...
233                e^2*q5/q3,...
234                b^2*q5/q2 + dt^2*q5/q4 + b^2*q4/q1 + dt^2*q4/q5,...
235                e^2*q1/q3 + b^2*q3/q1 + dt^2*q3/q5,...
236                e^2*q2/q3 + b^2*q3/q2 + dt^2*q3/q4]);
237    %cor. 8 -> 11
238D11_cor11 = diag([Ld^2/Lq^2*dt^2*q3/q2 + dt^2*kp^2*pp^4*(Ld-Lq)^2*q2/J^2/q3,...
239                  Lq^2/Ld^2*dt^2*q3/q1 + dt^2*kp^2*pp^4*(Ld-Lq)^2*q1/J^2/q3,...
240                  Lq^2/Ld^2*dt^2*q2/q1 + Ld^2/Lq^2*dt^2*q1/q2, 0.0]);
241
242% new figure             
243figure;
244
245%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
246%   main loop
247
248for t = 1:T-1,
249    %aliases
250    ial = x_sys(1, t);
251    ibe = x_sys(2, t);
252    ome = x_sys(3, t);
253    the = x_sys(4, t);
254   
255    ia = ial;
256    ib = ibe;
257   
258    st = sin(the);
259    ct = cos(the);
260   
261    id = ial*cos(the) + ibe*sin(the);
262    iq = ibe*cos(the) - ial*sin(the);
263   
264    hia = ial;
265    hib = ibe;
266    hom = ome;
267    sht = sin(the);
268    cht = cos(the);
269    sh2t = sin(2*the);
270    ch2t = cos(2*the);
271    sh3t = sin(3*the);
272    ch3t = cos(3*the);
273    ch4t = cos(4*the);   
274   
275    %PCRB models
276    if(model1 == 1) %al-be/nE/Ls
277        A14(1,3) = b*sin(the);
278        A14(1,4) = b*ome*cos(the);
279        A14(2,3) = -b*cos(the);
280        A14(2,4) = b*ome*sin(the);
281        A14(3,1) = -e*sin(the);
282        A14(3,2) = e*cos(the);
283        A14(3,4) = -e*(ial*cos(the)+ibe*sin(the));
284
285        D11 = A14'*iQ4*A14;
286        D12 = -A14'*iQ4;
287        D21 = D12';
288        D22 = iQ4 + C4'*iR*C4;
289
290        Jj1 = D22 - D21/(Jj1 + D11)*D12;
291        iJn1(:,:,t) = inv(Jj1);       
292    end
293    if(model2 == 1) %d-q/nE/Ls
294        A25(1,2) = dt*ome;
295        A25(1,3) = dt*iq;
296        A25(2,1) = -dt*ome;
297        A25(2,3) = -dt*id-b;
298       
299        D11 = A25'*iQ4*A25;
300        D12 = -A25'*iQ4;
301        D21 = D12';
302        D22 = iQ4 + C4'*iR*C4;   
303
304        Jj2 = D22 - D21/(Jj2 + D11)*D12;
305        iJn2(:,:,t) = inv(Jj2);
306    end
307    if(model3 == 1) %5sc/nE/Ls
308        A36(1,3) = b*sin(the);
309        A36(1,4) = b*ome;
310        A36(2,3) = -b*cos(the);
311        A36(2,5) = -b*ome;
312        A36(3,1) = -e*sin(the);
313        A36(3,2) = e*cos(the);
314        A36(3,4) = -e*ial;
315        A36(3,5) = e*ibe;
316        A36(4,3) = dt*cos(the);
317        A36(4,5) = dt*ome;
318        A36(5,3) = -dt*sin(the);
319        A36(5,4) = -dt*ome;
320
321        D11 = A36'*iQ5*A36;   
322        D12 = -A36'*iQ5;
323        D21 = D12';
324        D22 = iQ5 + C5'*iR*C5;
325
326        Jj3 = D22 - D21/(Jj3 + D11)*D12;
327        iJn3(:,:,t) = inv(Jj3);
328    end
329    if(model4 == 1) %al-be/E/Ls
330        D11 = zeros(4);
331        D11(1, 1) = a^2/q1 + e^2/q3*(1/2 - 1/2*exp(-2*q4)*cos(2*the));
332        D11(1, 2) = -e^2/q3*sin(the)*cos(the)*exp(-2*q4);
333        D11(1, 3) = (a*b/q1 - d*e/q3)*sin(the)*exp(-1/2*q4);
334        D11(1, 4) = e^2/q3*(ial*sin(the)*cos(the)*exp(-2*q4) + ibe*(1/2 - 1/2*exp(-2*q4)*cos(2*the)))...
335                    + a*b/q1*ome*cos(the)*exp(-1/2*q4);
336        D11(2, 1) = D11(1, 2);
337        D11(2, 2) = a^2/q2 + e^2/q3*(1/2 + 1/2*exp(-2*q4)*cos(2*the));
338        D11(2, 3) = (d*e/q3 - a*b/q2)*cos(the)*exp(-1/2*q4);
339        D11(2, 4) = a*b/q2*ome*sin(the)*exp(-1/2*q4)...
340                    - e^2/q3*(ial*(1/2 + 1/2*exp(-2*q4)*cos(2*the)) + ibe*sin(the)*cos(the)*exp(-2*q4));
341        D11(3, 1) = D11(1, 3);
342        D11(3, 2) = D11(2, 3);
343        D11(3, 3) = d^2/q3 + dt^2/q4 + b^2/q2*(1/2 + 1/2*exp(-2*q4)*cos(2*the))...
344                    + b^2/q1*(1/2 - 1/2*exp(-2*q4)*cos(2*the));
345        D11(3, 4) = dt/q4 - d*e/q3*(ial*cos(the)*exp(-1/2*q4) + ibe*sin(the)*exp(-1/2*q4))...
346                    + b^2/q1*ome*sin(the)*cos(the)*exp(-2*q4) - b^2/q2*ome*sin(the)*cos(the)*exp(-2*q4);
347        D11(4, 1) = D11(1, 4);
348        D11(4, 2) = D11(2, 4);
349        D11(4, 3) = D11(3, 4);
350        D11(4, 4) = 1/q4 + e^2/q3*((q1 + ial^2)*(1/2 + 1/2*exp(-2*q4)*cos(2*the))...
351                    + 2*ial*ibe*sin(the)*cos(the)*exp(-2*q4)...
352                    + (q2 + ibe^2)*(1/2 - 1/2*exp(-2*q4)*cos(2*the)))...
353                    + b^2/q2*(q3 + ome^2)*(1/2 - 1/2*exp(-2*q4)*cos(2*the))...
354                    + b^2/q1*(q3 + ome^2)*(1/2 + 1/2*exp(-2*q4)*cos(2*the));
355
356        A4(1,1) = a;
357        A4(1,2) = 0.0;
358        A4(1,3) = b*sin(the)*exp(-1/2*q4);
359        A4(1,4) = b*ome*cos(the)*exp(-1/2*q4);
360        A4(2,1) = 0.0;
361        A4(2,2) = a;
362        A4(2,3) = -b*cos(the)*exp(-1/2*q4);
363        A4(2,4) = b*ome*sin(the)*exp(-1/2*q4);
364        A4(3,1) = -e*sin(the)*exp(-1/2*q4);
365        A4(3,2) = e*cos(the)*exp(-1/2*q4);
366        A4(3,3) = d;
367        A4(3,4) = -e*(ial*cos(the)*exp(-1/2*q4) + ibe*sin(the)*exp(-1/2*q4));
368        A4(4,1) = 0.0;
369        A4(4,2) = 0.0;
370        A4(4,3) = dt;
371        A4(4,4) = 1.0;
372
373        D12 = -A4'*iQ4;
374        D21 = D12';
375        D22 = iQ4 + C4'*iR*C4;
376
377        Jj4 = D22 - D21/(Jj4 + D11)*D12;
378        iJn4(:,:,t) = inv(Jj4);
379    end
380    if(model5 == 1) %d-q/E/Ls
381        A25(1,2) = dt*ome;
382        A25(1,3) = dt*iq;
383        A25(2,1) = -dt*ome;
384        A25(2,3) = -dt*id-b;
385       
386        D11 = A25'*iQ4*A25 + D11_cor5;
387        D12 = -A25'*iQ4;
388        D21 = D12';
389        D22 = iQ4 + C4'*iR*C4;   
390
391        Jj5 = D22 - D21/(Jj5 + D11)*D12;
392        iJn5(:,:,t) = inv(Jj5);
393    end
394    if(model6 == 1) %5sc/E/Ls
395        A36(1,3) = b*sin(the);
396        A36(1,4) = b*ome;
397        A36(2,3) = -b*cos(the);
398        A36(2,5) = -b*ome;
399        A36(3,1) = -e*sin(the);
400        A36(3,2) = e*cos(the);
401        A36(3,4) = -e*ial;
402        A36(3,5) = e*ibe;
403        A36(4,3) = dt*cos(the);
404        A36(4,5) = dt*ome;
405        A36(5,3) = -dt*sin(the);
406        A36(5,4) = -dt*ome;
407
408        D11 = A36'*iQ5*A36 + D11_cor6;   
409        D12 = -A36'*iQ5;
410        D21 = D12';
411        D22 = iQ5 + C5'*iR*C5;
412
413        Jj6 = D22 - D21/(Jj6 + D11)*D12;
414        iJn6(:,:,t) = inv(Jj6);
415    end
416    if(model7 == 1) %al-be/nE/Ldq       
417        A70 = [[ (Lq - Rs*dt*sin(the)^2)/Lq - (dt*ome*sin(the)*Lq^2*cos(the) + Rs*dt*Lq*cos(the)^2)/(Ld*Lq) + (Ld*dt*ome*cos(the)*sin(the))/Lq,                                       (dt*(Ld - Lq)*(- Lq*ome*cos(the)^2 + Rs*cos(the)*sin(the) + Ld*ome*sin(the)^2))/(Ld*Lq),    dt*cos(the)*(ia*sin(the) - ib*cos(the) + (Lq*(ib*cos(the) - ia*sin(the)))/Ld) + dt*sin(the)*(psi/Lq - ia*cos(the) - ib*sin(the) + (Ld*(ia*cos(the) + ib*sin(the)))/Lq),                                               (dt*(ome*psi*cos(the) + Rs*ib*cos(2*the) - Rs*ia*sin(2*the)))/Lq + (Ld*dt*(ia*ome*cos(2*the) + ib*ome*sin(2*the)))/Lq - (dt*(Lq^2*ia*ome*cos(2*the) + Lq^2*ib*ome*sin(2*the) + Lq*Rs*ib*cos(2*the) - Lq*Rs*ia*sin(2*the)))/(Ld*Lq)];...
418                [                                       (dt*(Ld - Lq)*(- Ld*ome*cos(the)^2 + Rs*cos(the)*sin(the) + Lq*ome*sin(the)^2))/(Ld*Lq), (Lq - Rs*dt*cos(the)^2)/Lq - (Lq*Rs*dt*sin(the)^2 - Lq^2*dt*ome*cos(the)*sin(the))/(Ld*Lq) - (Ld*dt*ome*cos(the)*sin(the))/Lq, (dt*(Lq*ia - psi*cos(the)))/Lq + (dt*((Lq^2*ia*cos(2*the))/2 - (Lq^2*ia)/2 + (Lq^2*ib*sin(2*the))/2))/(Ld*Lq) - (Ld*dt*(ia/2 + (ia*cos(2*the))/2 + (ib*sin(2*the))/2))/Lq, (dt*ome*psi*sin(the) - Rs*dt*ia*(2*sin(the)^2 - 1) + Rs*dt*ib*sin(2*the))/Lq + (Ld*(dt*ib*ome*(2*sin(the)^2 - 1) + dt*ia*ome*sin(2*the)))/Lq - (Lq*Rs*dt*ib*sin(2*the) + Lq^2*dt*ib*ome*(2*sin(the)^2 - 1) + Lq^2*dt*ia*ome*sin(2*the) - Lq*Rs*dt*ia*(2*sin(the)^2 - 1))/(Ld*Lq)];...
419                [     -dt*kppj*(psi*sin(the) - cos(the)*(Ld - Lq)*(ib*cos(the) - ia*sin(the)) + sin(the)*(Ld - Lq)*(ia*cos(the) + ib*sin(the))),      dt*kppj*(psi*cos(the) + cos(the)*(Ld - Lq)*(ia*cos(the) + ib*sin(the)) + sin(the)*(Ld - Lq)*(ib*cos(the) - ia*sin(the))),                                                                                                                                                                         1.0,                                                                                                                                                   -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)];...
420                [                                                                                                                             0.0,                                                                                                                             0.0,                                                                                                                                                                        dt,                                                                                                                                                                                                                                                                                1.0]];
421       
422        D11 = A70'*iQ4*A70;
423        D12 = -A70'*iQ4;
424        D21 = D12';
425        D22 = iQ4 + C4'*iR*C4;
426
427        Jj7 = D22 - D21/(Jj7 + D11)*D12;
428        iJn7(:,:,t) = inv(Jj7);       
429    end
430    if(model8 == 1) %d-q/nE/Ldq
431        A81(1,2) = Lq*dt/Ld*ome;
432        A81(1,3) = Lq*dt/Ld*iq;
433        A81(2,1) = -Ld*dt/Lq*ome;
434        A81(2,3) = -Ld*dt/Lq*id-psipm*dt/Lq;
435        A81(3,1) = kp*pp*pp*dt*(Ld-Lq)/J*iq;
436        A81(3,2) = kp*pp*pp*dt/J*((Ld-Lq)*id+psipm);   
437       
438        D11 = A81'*iQ4*A81;
439        D12 = -A81'*iQ4;
440        D21 = D12';
441        D22 = iQ4 + C4'*iR*C4;
442   
443        Jj8 = D22 - D21/(Jj8 + D11)*D12;
444        iJn8(:,:,t) = inv(Jj8);
445    end
446    if(model9 == 1) %5sc/nE/Ldq       
447        A92(1, 1) = 1.0 + dt*(-Rs*(st^2/Lq + ct^2/Ld) + ome*st*ct*(Ld/Lq - Lq/Ld));
448        A92(1, 2) = dt*(-ome + Rs*st*ct*(1/Lq - 1/Ld) + ome*(Ld*st^2/Lq + Lq*ct^2/Ld));
449        A92(1, 3) = dt*psi*st/Lq + dt*ial*st*ct*(Ld/Lq - Lq/Ld) + dt*ibe*(-1 + Ld/Lq*st^2 + Lq/Ld*ct^2);
450        A92(1, 4) = dt*psi*ome/Lq + dt*ial*(-Rs*2*st/Lq + ome*ct*(Ld/Lq - Lq/Ld)) + dt*ibe*(Rs*ct*(1/Lq - 1/Ld) + ome*2*Ld*st/Lq);
451        A92(1, 5) = dt*ial*(-Rs*2*ct/Ld + ome*st*(Ld/Lq - Lq/Ld)) + dt*ibe*(Rs*st*(1/Lq - 1/Ld) + ome*2*Lq*ct/Ld);
452
453        A92(2, 1) = dt*(ome + Rs*st*ct*(1/Lq - 1/Ld) - ome*(Lq*st^2/Ld + Ld*ct^2/Lq));
454        A92(2, 2) = 1 + dt*(-Rs*(st^2/Ld + ct^2/Lq) + ome*st*ct*(Lq/Ld - Ld/Lq));
455        A92(2, 3) = -dt*psi*ct/Lq + dt*ial*(1 - Lq*st^2/Ld - Ld*ct^2/Lq) + dt*ibe*st*ct*(Lq/Ld - Ld/Lq);
456        A92(2, 4) = dt*ial*(Rs*ct*(1/Lq - 1/Ld) - ome*2*Lq*st/Ld) + dt*ibe*(-Rs*2*st/Ld + ome*ct*(Lq/Ld - Ld/Lq));
457        A92(2, 5) = -dt*psi*ome/Lq + dt*ial*(Rs*st*(1/Lq - 1/Ld) -ome*2*Ld*ct/Lq) + dt*ibe*(-Rs*2*ct/Lq + ome*st*(Lq/Ld - Ld/Lq));
458
459        A92(3, 1) = dt*kpp/J*((Ld - Lq)*(-2*ial*st*ct + ibe*ct^2 - ibe*st^2) - psi*st);
460        A92(3, 2) = dt*kpp/J*((Ld - Lq)*(ial*ct^2 - ial*st^2 + 2*ibe*st*ct) + psi*ct);
461        A92(3, 3) = 1;
462        A92(3, 4) = dt*kpp/J*((Ld - Lq)*(-ial^2*ct - ial*ibe*2*st + ibe^2*ct) - psi*ial);
463        A92(3, 5) = dt*kpp/J*((Ld - Lq)*(-ial^2*st + ial*ibe*2*ct + ibe^2*st) + psi*ibe);
464
465        A92(4,3) = dt*cos(the);
466        A92(4,5) = dt*ome;
467        A92(5,3) = -dt*sin(the);
468        A92(5,4) = -dt*ome;
469   
470        D11 = A92'*iQ5*A92;
471        D12 = -A92'*iQ5;
472        D21 = D12';
473        D22 = iQ5 + C5'*iR*C5;
474
475        Jj9 = D22 - D21/(Jj9 + D11)*D12;
476        iJn9(:,:,t) = inv(Jj9);
477    end
478    if(model10 == 1) %al-be/E/Ldq
479        A70 = [[ (Lq - Rs*dt*1/2*(1 - e2q4*ch2t))/Lq - (dt*hom*sht*e05q4*Lq^2*cht*e05q4 + Rs*dt*Lq*1/2*(1 + e2q4*ch2t))/(Ld*Lq) + (Ld*dt*hom*sht*cht*e2q4)/Lq,                                       (dt*(Ld - Lq)*(- Lq*hom*1/2*(1 + e2q4*ch2t) + Rs*sht*cht*e2q4 + Ld*hom*1/2*(1 - e2q4*ch2t)))/(Ld*Lq),    dt*cht*e05q4*(hia*sht*e05q4 - hib*cht*e05q4 + (Lq*(hib*cht*e05q4 - hia*sht*e05q4))/Ld) + dt*sht*e05q4*(psi/Lq - hia*cht*e05q4 - hib*sht*e05q4 + (Ld*(hia*cht*e05q4 + hib*sht*e05q4))/Lq),                                               (dt*(hom*psi*cht*e05q4 + Rs*hib*ch2t*e2q4 - Rs*hia*sh2t*e2q4))/Lq + (Ld*dt*(hia*hom*ch2t*e2q4 + hib*hom*sh2t*e2q4))/Lq - (dt*(Lq^2*hia*hom*ch2t*e2q4 + Lq^2*hib*hom*sh2t*e2q4 + Lq*Rs*hib*ch2t*e2q4 - Lq*Rs*hia*sh2t*e2q4))/(Ld*Lq)];...
480                [                                       (dt*(Ld - Lq)*(- Ld*hom*1/2*(1 + e2q4*ch2t) + Rs*sht*cht*e2q4 + Lq*hom*1/2*(1 - e2q4*ch2t)))/(Ld*Lq), (Lq - Rs*dt*1/2*(1 + e2q4*ch2t))/Lq - (Lq*Rs*dt*1/2*(1 - e2q4*ch2t) - Lq^2*dt*hom*sht*cht*e2q4)/(Ld*Lq) - (Ld*dt*hom*sht*cht*e2q4)/Lq, (dt*(Lq*hia - psi*cht*e05q4))/Lq + (dt*((Lq^2*hia*ch2t*e2q4)/2 - (Lq^2*hia)/2 + (Lq^2*hib*sh2t*e2q4)/2))/(Ld*Lq) - (Ld*dt*(hia/2 + (hia*ch2t*e2q4)/2 + (hib*sh2t*e2q4)/2))/Lq, (dt*hom*psi*sht*e05q4 - Rs*dt*hia*(2*1/2*(1 - e2q4*ch2t) - 1) + Rs*dt*hib*sh2t*e2q4)/Lq + (Ld*(dt*hib*hom*(2*1/2*(1 - e2q4*ch2t) - 1) + dt*hia*hom*sh2t*e2q4))/Lq - (Lq*Rs*dt*hib*sh2t*e2q4 + Lq^2*dt*hib*hom*(2*1/2*(1 - e2q4*ch2t) - 1) + Lq^2*dt*hia*hom*sh2t*e2q4 - Lq*Rs*dt*hia*(2*1/2*(1 - e2q4*ch2t) - 1))/(Ld*Lq)];...
481                [     -dt*kppj*(psi*sht*e05q4 - cht*e05q4*(Ld - Lq)*(hib*cht*e05q4 - hia*sht*e05q4) + sht*e05q4*(Ld - Lq)*(hia*cht*e05q4 + hib*sht*e05q4)),      dt*kppj*(psi*cht*e05q4 + cht*e05q4*(Ld - Lq)*(hia*cht*e05q4 + hib*sht*e05q4) + sht*e05q4*(Ld - Lq)*(hib*cht*e05q4 - hia*sht*e05q4)),                                                                                                                                                                         1.0,                                                                                                                                                   -dt*kppj*(psi*(hia*cht*e05q4 + hib*sht*e05q4) + (Ld - Lq)*(hia*cht*e05q4 + hib*sht*e05q4)^2 - (Ld - Lq)*(hib*cht*e05q4 - hia*sht*e05q4)^2)];...
482                [                                                                                                                             0.0,                                                                                                                             0.0,                                                                                                                                                                        dt,                                                                                                                                                                                                                                                                                1.0]];
483       
484        D11 = zeros(4);
485        D11(1,1) = 1/q1 + (dt^2*(hom^2 + q3)*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/q2 + (dt^2*(hom^2 + q3)*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/q2 - (2*dt^2*(hom^2 + q3)*1/8*(1 - e8q4*ch4t))/q1 + (4*dt^2*(hom^2 + q3)*1/8*(1 - e8q4*ch4t))/q2 + (Rs^2*dt^2*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/(Ld^2*q1) + (Rs^2*dt^2*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(Lq^2*q1) - (2*Rs*dt*1/2*(1 + e2q4*ch2t))/(Ld*q1) + (dt^2*kppj^2*psi^2*1/2*(1 - e2q4*ch2t))/q3 - (2*Rs*dt*1/2*(1 - e2q4*ch2t))/(Lq*q1) - (2*Lq*dt^2*(hom^2 + q3)*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(Ld*q2) + (Ld^2*dt^2*(hom^2 + q3)*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/(Lq^2*q2) + (Lq^2*dt^2*(hom^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s*dt^2*hom*1/8*(1 - e8q4*ch4t))/(Lq^2*q2) - (Lq*Rs*dt^2*hom*1/8*(1 - e8q4*ch4t))/(Ld^2*q2) - (4*Ld*Lq*dt^2*(hia^2 + q1)*kppj^2*1/4*e8q4*(e6q4 - ch2t)*sh2t)/q3 + (4*Ld*Lq*dt^2*(hia^2 + q1)*kppj^2*1/4*e8q4*(e6q4 + ch2t)*sh2t)/q3 + (4*Ld*Lq*dt^2*(hib^2 + q2)*kppj^2*1/4*e8q4*(e6q4 - ch2t)*sh2t)/q3 - (4*Ld*Lq*dt^2*(hib^2 + q2)*kppj^2*1/4*e8q4*(e6q4 + ch2t)*sh2t)/q3 - (2*Ld*Lq*dt^2*hia*hib*kppj^2*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/q3 - (2*Ld*Lq*dt^2*hia*hib*kppj^2*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/q3 - (6*Ld^2*dt^2*hia*hib*kppj^2*1/8*(1 - e8q4*ch4t))/q3 - (6*Lq^2*dt^2*hia*hib*kppj^2*1/8*(1 - e8q4*ch4t))/q3 + (12*Ld*Lq*dt^2*hia*hib*kppj^2*1/8*(1 - e8q4*ch4t))/q3;
487        D11(1,3) = (3*dt^2*hia*hom*1/2*(1 + e2q4*ch2t))/(2*q2) - (dt*hib*1/2*(1 - e2q4*ch2t))/q1 - (dt*hib*1/2*(1 + e2q4*ch2t))/q1 - (dt^2*hia*hom*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/(2*q2) + (3*dt^2*hia*hom*1/2*(1 - e2q4*ch2t))/(2*q2) - (dt^2*hia*hom*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(2*q2) - (dt*kppj*psi*sht*e05q4)/q3 + (dt*psi*sht*e05q4)/(Lq*q1) + (Lq*dt*hib*1/2*(1 + e2q4*ch2t))/(Ld*q1) + (Ld*dt*hib*1/2*(1 - e2q4*ch2t))/(Lq*q1) - (2*dt^2*hia*hom*1/8*(1 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2*hib*(hom^2 + q3)*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(Lq*q2) - (2*Lq*dt^2*hib*(hom^2 + q3)*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(Ld*q2) + (Rs^2*dt^2*hia*sht*cht*e2q4)/(Ld^2*q2) + (Rs^2*dt^2*hia*sht*cht*e2q4)/(Lq^2*q2) - (Ld*dt^2*(hia^2 + q1)*kppj^2*psi*1/4*e92q4*(3*e4q4*sht - sh3t))/q3 + (2*Ld*dt^2*(hib^2 + q2)*kppj^2*psi*1/4*e92q4*(3*e4q4*sht - sh3t))/q3 + (Lq*dt^2*(hia^2 + q1)*kppj^2*psi*1/4*e92q4*(3*e4q4*sht - sh3t))/q3 - (2*Lq*dt^2*(hib^2 + q2)*kppj^2*psi*1/4*e92q4*(3*e4q4*sht - sh3t))/q3 + (Ld*dt*hia*hom*1/2*(1 + e2q4*ch2t))/(Lq*q1) - (Lq*dt*hia*hom*1/2*(1 + e2q4*ch2t))/(Ld*q1) - (Rs^2*dt^2*hib*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/(Ld*Lq*q1) - (Ld*dt*hia*hom*1/2*(1 - e2q4*ch2t))/(Lq*q1) + (Lq*dt*hia*hom*1/2*(1 - e2q4*ch2t))/(Ld*q1) - (Rs^2*dt^2*hib*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(Ld*Lq*q1) - (2*Ld^2*dt^2*(hib^3 + 3*hib*q2)*kppj^2*1/8*(1 - e8q4*ch4t))/q3 - (2*Lq^2*dt^2*(hib^3 + 3*hib*q2)*kppj^2*1/8*(1 - e8q4*ch4t))/q3 + (dt^2*hia*kppj^2*psi^2*sht*cht*e2q4)/q3 + (Ld^2*dt^2*hib*(hom^2 + q3)*1/2*(1 + e2q4*ch2t))/(Lq^2*q2) + (2*Rs*dt*hia*sht*cht*e2q4)/(Ld*q1) - (2*Rs*dt*hia*sht*cht*e2q4)/(Lq*q1) - (Lq^2*dt^2*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- (12*Ld*Lq*dt^2*hia*(hib^2 + q2)*kppj^2*1/4*e8q4*(e6q4 - ch2t)*sh2t)/q3 + (12*Ld*Lq*dt^2*hia*(hib^2 + q2)*kppj^2*1/4*e8q4*(e6q4 + ch2t)*sh2t)/q3 - (Ld*Rs*dt^2*hib*hom*sht*cht*e2q4)/(Lq^2*q2) - (Lq*Rs*dt^2*hib*hom*sht*cht*e2q4)/(Ld^2*q2);
489
490        D11(2,1) = D11(1,2);
491        D11(2,2) = 1/q2 + (dt^2*(hom^2 + q3)*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/q1 + (dt^2*(hom^2 + q3)*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/q1 + (4*dt^2*(hom^2 + q3)*1/8*(1 - e8q4*ch4t))/q1 - (2*dt^2*(hom^2 + q3)*1/8*(1 - e8q4*ch4t))/q2 + (Rs^2*dt^2*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/(Lq^2*q2) + (Rs^2*dt^2*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(Ld^2*q2) + (dt^2*kppj^2*psi^2*1/2*(1 + e2q4*ch2t))/q3 - (2*Rs*dt*1/2*(1 + e2q4*ch2t))/(Lq*q2) - (2*Rs*dt*1/2*(1 - e2q4*ch2t))/(Ld*q2) - (2*Ld*dt^2*(hom^2 + q3)*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(Lq*q1) + (Lq^2*dt^2*(hom^2 + q3)*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/(Ld^2*q1) + (Ld^2*dt^2*(hom^2 + q3)*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(Lq^2*q1) + (Ld^2*dt^2*(hia^2 + q1)*kppj^2*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/q3 + (Lq^2*dt^2*(hia^2 + q1)*kppj^2*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/q3 + (Ld^2*dt^2*(hia^2 + q1)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ld^2*dt^2*hia*hom*sht*cht*e2q4)/(2*Lq^2*q2) + (Ld*dt^2*hom*psi*1/4*e92q4*(e4q4*sht + sh3t))/(Lq^2*q2);
493        D11(2,4) = (dt^2*hia*(hom^2 + q3)*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/q1 + (dt^2*hia*(hom^2 + q3)*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/q1 - (Rs*dt*hia)/(Ld*q2) + (Rs*dt*hia)/(Lq*q2) + (Rs^2*dt^2*hia*1/2*(1 - e2q4*ch2t))/(Ld^2*q2) - (2*Rs^2*dt^2*hia*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(Ld^2*q2) + (dt*hom*psi*sht*e05q4)/(Lq*q2) + (dt^2*(hom^2 + q3)*psi*1/4*e92q4*(3*e4q4*cht + ch3t))/(Ld*q1) - (dt^2*(hom^2 + q3)*psi*1/4*e92q4*(3*e4q4*cht + ch3t))/(Lq*q1) - (dt^2*hia*kppj^2*psi^2*1/2*(1 + e2q4*ch2t))/q3 + (2*Rs*dt*hia*1/2*(1 - e2q4*ch2t))/(Ld*q2) - (2*Rs*dt*hia*1/2*(1 - e2q4*ch2t))/(Lq*q2) - (2*dt^2*hib*(hom^2 + q3)*1/4*e8q4*(e6q4 - ch2t)*sh2t)/q1 + (2*dt^2*hib*(hom^2 + q3)*1/4*e8q4*(e6q4 + ch2t)*sh2t)/q1 + (4*dt^2*hib*(hom^2 + q3)*1/4*e8q4*(e6q4 - ch2t)*sh2t)/q2 - (Ld*dt*hib*hom)/(Lq*q2) + (Lq*dt*hib*hom)/(Ld*q2) - (Ld^2*dt^2*(hia^3 + 3*hia*q1)*kppj^2*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/q3 - (Lq^2*dt^2*(hia^3 + 3*hia*q1)*kppj^2*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/q3 - (Ld^2*dt^2*(hia^3 + 3*hia*q1)*kppj^2*1/8*(3 - 4*e2q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ib*hom*1/8*(1 - e8q4*ch4t))/(Lq^2*q1) + (3*Lq*Rs*dt^2*hib*hom*1/8*(1 - e8q4*ch4t))/(Ld^2*q1) - (4*Ld*Rs*dt^2*hib*hom*1/8*(1 - e8q4*ch4t))/(Lq^2*q2) - (2*Lq*Rs*dt^2*hib*hom*1/8*(1 - e8q4*ch4t))/(Ld^2*q2) - (Rs*dt^2*hom*psi*1/4*e92q4*(e4q4*sht + sh3t))/(Ld*Lq*q1) - (12*Ld*Lq*dt^2*(hia^2 + q1)*hib*kppj^2*1/4*e8q4*(e6q4 - ch2t)*sh2t)/q3 + (12*Ld*Lq*dt^2*(hia^2 + q1)*hib*kppj^2*1/4*e8q4*(e6q4 + ch2t)*sh2t)/q3 - (Ld*Rs*dt^2*hia*hom*sht*cht*e2q4)/(Lq^2*q2) - (Lq*Rs*dt^2*hia*hom*sht*cht*e2q4)/(Ld^2*q2);
494
495        D11(3,1) = D11(1,3);
496        D11(3,2) = D11(2,3);
497        D11(3,3) = 1/q3 + dt^2/q4 + (3*dt^2*(hia^2 + q1))/(2*q2) + (dt^2*(hib^2 + q2)*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/q1 - (dt^2*(hia^2 + q1)*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(2*q2) + (dt^2*(hib^2 + q2)*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/q1 - (dt^2*(hia^2 + q1)*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/(2*q2) + (Lq^2*dt^2*(hia^2 + q1))/(4*Ld^2*q2) + (Ld^2*dt^2*(hia^2 + q1))/(4*Lq^2*q2) - (2*dt^2*(hia^2 + q1)*1/8*(1 - e8q4*ch4t))/q1 + (4*dt^2*(hib^2 + q2)*1/8*(1 - e8q4*ch4t))/q1 + (dt^2*(hia^2 + q1)*1/8*(1 - e8q4*ch4t))/q2 - (2*dt^2*(hib^2 + q2)*1/8*(1 - e8q4*ch4t))/q2 + (dt^2*psi^2*1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dt*(hia^2 + q1)*kppj*1/2*(1 + e2q4*ch2t))/q3 - (Lq*dt*(hib^2 + q2)*kppj*1/2*(1 + e2q4*ch2t))/q3 + (Ld*dt*(hia^2 + q1)*kppj*1/2*(1 - e2q4*ch2t))/q3 - (Ld*dt*(hib^2 + q2)*kppj*1/2*(1 - e2q4*ch2t))/q3 - (Lq*dt*(hia^2 + q1)*kppj*1/2*(1 - e2q4*ch2t))/q3 + (Lq*dt*(hib^2 + q2)*kppj*1/2*(1 - e2q4*ch2t))/q3 + (dt^2*hia*hib*hom*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/q1 - (dt^2*hia*hib*hom*1/2*(1 + e2q4*ch2t))/q2 + (dt^2*hia*hib*hom*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/q1 + (dt^2*hia*hib*hom*1/2*(1 - e2q4*ch2t))/q2 - (2*dt^2*hia*hib*hom*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/q2 - (dt*hia*kppj*psi*cht*e05q4)/q3 - (dt*hib*kppj*psi*sht*e05q4)/q3 - (2*dt^2*(hib^2 + q2)*hom*sht*cht*e2q4)/q2 + (2*Rs*dt^2*(hib^2 + q2)*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/(Ld*q1) + (Rs*dt^2*(hia^2 + q1)*1/2*(1 + e2q4*ch2t))/(2*Ld*q2) - (Rs*dt^2*(hib^2 + q2)*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/(Lq*q1) + (Rs*dt^2*(hia^2 + q1)*1/2*(1 + e2q4*ch2t))/(2*Lq*q2) - (Rs*dt^2*hib*psi*1/4*e92q4*(3*e4q4*sht - sh3t))/(Lq^2*q1) + (dt^2*hib*hom*psi*1/4*e92q4*(3*e4q4*cht + ch3t))/(Ld*q1) - (dt^2*hib*hom*psi*1/4*e92q4*(3*e4q4*cht + ch3t))/(Lq*q1) - (Ld*dt^2*hia*hib*hom)/(Lq*q2) + (Lq*dt^2*hia*hib*hom)/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*hia*hib*hom)/(2*Ld^2*q2) + (Ld^2*dt^2*hia*hib*hom)/(2*Lq^2*q2) + (dt^2*hom*psi^2*sht*cht*e2q4)/(Lq^2*q1) - (dt^2*hom*psi^2*sht*cht*e2q4)/(Lq^2*q2) - (Rs*dt^2*hia*psi*cht*e05q4)/(Lq^2*q2) - (6*dt^2*hia*hib*hom*1/8*(1 - e8q4*ch4t))/q1 + (6*dt^2*hia*hib*hom*1/8*(1 - e8q4*ch4t))/q2 - (dt^2*hib*hom*psi*cht*e05q4)/(Ld*q2) - (dt^2*hia*hom*psi*sht*e05q4)/(2*Ld*q2) + (dt^2*hia*hom*psi*sht*e05q4)/(Lq*q2) - (2*dt^2*hia*hom*psi*1/4*e92q4*(e4q4*sht + sh3t))/(Ld*q1) - (2*dt^2*hib*hom*psi*1/4*e92q4*(e4q4*cht - ch3t))/(Ld*q1) + (5*dt^2*hia*hom*psi*1/4*e92q4*(e4q4*sht + sh3t))/(2*Ld*q2) + (3*dt^2*hib*hom*psi*1/4*e92q4*(e4q4*cht - ch3t))/(Ld*q2) - (dt^2*hib*hom*psi*1/4*e92q4*(e4q4*cht - ch3t))/(Lq*q1) + (Ld*dt^2*hib*hom*psi*cht*e05q4)/(Lq^2*q2) - (Ld*dt^2*hia*hom*psi*sht*e05q4)/(2*Lq^2*q2) - (2*Ld*dt^2*(hib^2 + q2)*hom*1/4*e8q4*(e6q4 - ch2t)*sh2t)/(Lq*q1) - (2*Ld*dt^2*(hib^2 + q2)*hom*1/4*e8q4*(e6q4 + ch2t)*sh2t)/(Lq*q1) + (2*Lq*dt^2*(hib^2 + q2)*hom*1/4*e8q4*(e6q4 - ch2t)*sh2t)/(Ld*q1) + (2*Lq*dt^2*(hib^2 + q2)*hom*1/4*e8q4*(e6q4 + ch2t)*sh2t)/(Ld*q1) + (Lq^2*dt^2*(hia^2 + q1)*hom*sht*cht*e2q4)/(Ld^2*q2) - (Ld^2*dt^2*(hia^2 + q1)*hom*sht*cht*e2q4)/(Lq^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^2*q2) - (3*Ld*dt^2*hib*hom*psi*1/4*e92q4*(e4q4*cht - ch3t))/(Lq^2*q2) + (2*Rs*dt^2*hia*psi*1/4*e92q4*(e4q4*cht - ch3t))/(Ld*Lq*q1) - (Rs*dt^2*hib*psi*1/4*e92q4*(e4q4*sht + sh3t))/(Ld*Lq*q1) - (2*Rs*dt^2*hia*psi*1/4*e92q4*(e4q4*cht - ch3t))/(Ld*Lq*q2) + (2*Rs*dt^2*hib*psi*1/4*e92q4*(e4q4*sht + sh3t))/(Ld*Lq*q2) - (2*Ld*Rs*dt^2*hia*hib*sht*cht*e2q4)/(Lq^2*q2);
499
500        D11(4,1) = D11(1,4);
501        D11(4,2) = D11(2,4);
502        D11(4,3) = D11(3,4);
503        D11(4,4) = 1/q4 - (2*dt^2*(hib^2 + q2)*(hom^2 + q3))/q2 + (Rs^2*dt^2*(hia^2 + q1))/(Ld^2*q2) + (Rs^2*dt^2*(hia^2 + q1))/(Lq^2*q2) - (2*dt^2*(hia^2 + q1)*(hom^2 + q3)*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/q1 - (2*dt^2*(hia^2 + q1)*(hom^2 + q3)*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/q1 + (8*dt^2*(hib^2 + q2)*(hom^2 + q3)*1/2*(1 - e2q4*ch2t))/q2 - (8*dt^2*(hib^2 + q2)*(hom^2 + q3)*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/q2 + (4*dt^2*(hia^2 + q1)*(hom^2 + q3)*1/8*(1 - e8q4*ch4t))/q1 - (8*dt^2*(hib^2 + q2)*(hom^2 + q3)*1/8*(1 - e8q4*ch4t))/q1 - (8*dt^2*(hia^2 + q1)*(hom^2 + q3)*1/8*(1 - e8q4*ch4t))/q2 + (Rs^2*dt^2*(hib^2 + q2)*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/(Ld^2*q1) + (Rs^2*dt^2*(hib^2 + q2)*1/8*(3 + 4*e2q4*ch2t + e8q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2*q2) - (2*Ld*dt^2*(hia^3 + 3*hia*q1)*kppj^2*psi*1/4*e92q4*(e4q4*cht - ch3t))/q3 - (2*Ld*dt^2*(hib^3 + 3*hib*q2)*kppj^2*psi*1/4*e92q4*(e4q4*sht + sh3t))/q3 + (2*Lq*dt^2*(hia^3 + 3*hia*q1)*kppj^2*psi*1/4*e92q4*(e4q4*cht - ch3t))/q3 + (2*Lq*dt^2*(hib^3 + 3*hib*q2)*kppj^2*psi*1/4*e92q4*(e4q4*sht + sh3t))/q3 + (2*dt^2*hia*(hom^2 + q3)*psi*1/4*e92q4*(e4q4*cht - ch3t))/(Ld*q1) - (4*dt^2*hib*(hom^2 + q3)*psi*1/4*e92q4*(e4q4*sht + sh3t))/(Ld*q1) - (4*dt^2*hia*(hom^2 + q3)*psi*1/4*e92q4*(e4q4*cht - ch3t))/(Ld*q2) - (2*Rs*dt^2*hia*hib*hom*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/(Ld*q1) - (2*Rs*dt^2*hia*hib*hom*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/(Lq*q1) + (2*Rs*dt^2*hib*hom*psi*1/4*e92q4*(3*e4q4*cht + ch3t))/(Lq^2*q1) + (20*Ld^2*dt^2*(hia^2 + q1)*(hib^2 + q2)*kppj^2*1/8*(1 - e8q4*ch4t))/q3 + (20*Lq^2*dt^2*(hia^2 + q1)*(hib^2 + q2)*kppj^2*1/8*(1 - e8q4*ch4t))/q3 - (2*Rs*dt^2*hia*hib*hom*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(Ld*q1) - (8*Rs*dt^2*hia*hib*hom*1/2*(1 - e2q4*ch2t))/(Ld*q2) + (8*Rs*dt^2*hia*hib*hom*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(Ld*q2) - (2*Rs*dt^2*hia*hib*hom*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(Lq*q1) - (8*Rs*dt^2*hia*hib*hom*1/2*(1 - e2q4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q4*cht + ch3t))/(Lq^2*q1) + (4*Ld*dt^2*hib*(hom^2 + q3)*psi*1/4*e92q4*(3*e4q4*sht - sh3t))/(Lq^2*q2) + (4*Rs^2*dt^2*hia*hib*sht*cht*e2q4)/(Ld^2*q2) + (4*Rs^2*dt^2*hia*hib*sht*cht*e2q4)/(Lq^2*q2) - (2*Ld*dt^2*hia*(hib^2 + q2)*kppj^2*psi*1/4*e92q4*(3*e4q4*cht + ch3t))/q3 + (2*Lq*dt^2*hia*(hib^2 + q2)*kppj^2*psi*1/4*e92q4*(3*e4q4*cht + ch3t))/q3 - (4*Rs*dt^2*(hia^2 + q1)*hom*sht*cht*e2q4)/(Ld*q2) + (4*Rs*dt^2*(hib^2 + q2)*hom*sht*cht*e2q4)/(Ld*q2) - (4*Rs*dt^2*(hia^2 + q1)*hom*sht*cht*e2q4)/(Lq*q2) + (4*Rs*dt^2*(hib^2 + q2)*hom*sht*cht*e2q4)/(Lq*q2) - (2*Ld*dt^2*(hia^2 + q1)*hib*kppj^2*psi*1/4*e92q4*(3*e4q4*sht - sh3t))/q3 + (2*Lq*dt^2*(hia^2 + q1)*hib*kppj^2*psi*1/4*e92q4*(3*e4q4*sht - sh3t))/q3 - (4*Lq^2*dt^2*hia*hib*(hom^2 + q3)*1/4*e8q4*(e6q4 - ch2t)*sh2t)/(Ld^2*q1) + (4*Lq^2*dt^2*hia*hib*(hom^2 + q3)*1/4*e8q4*(e6q4 + ch2t)*sh2t)/(Ld^2*q1) - (4*Ld^2*dt^2*hia*hib*(hom^2 + q3)*1/4*e8q4*(e6q4 - ch2t)*sh2t)/(Lq^2*q1) + (4*Ld^2*dt^2*hia*hib*(hom^2 + q3)*1/4*e8q4*(e6q4 + ch2t)*sh2t)/(Lq^2*q1) + (8*Lq^2*dt^2*hia*hib*(hom^2 + q3)*1/4*e8q4*(e6q4 - ch2t)*sh2t)/(Ld^2*q2) + (8*Ld^2*dt^2*hia*hib*(hom^2 + q3)*1/4*e8q4*(e6q4 - ch2t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))/(Lq*q2) - (2*Ld*dt^2*hia*(hom^2 + q3)*psi*1/4*e92q4*(e4q4*cht - ch3t))/(Lq^2*q1) + (4*Ld*dt^2*hib*(hom^2 + q3)*psi*1/4*e92q4*(e4q4*sht + sh3t))/(Lq^2*q1) + (4*Ld*dt^2*hia*(hom^2 + q3)*psi*1/4*e92q4*(e4q4*cht - ch3t))/(Lq^2*q2) + (2*Ld*Rs*dt^2*hia*hib*hom*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/(Lq^2*q1) + (2*Lq*Rs*dt^2*hia*hib*hom*1/8*(3 + 4*e2q4*ch2t + e8q4*ch4t))/(Ld^2*q1) + (2*Ld*Rs*dt^2*hia*hib*hom*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(Lq^2*q1) + (2*Lq*Rs*dt^2*hia*hib*hom*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(Ld^2*q1) + (8*Ld*Rs*dt^2*hia*hib*hom*1/2*(1 - e2q4*ch2t))/(Lq^2*q2) + (8*Lq*Rs*dt^2*hia*hib*hom*1/2*(1 - e2q4*ch2t))/(Ld^2*q2) - (8*Ld*Rs*dt^2*hia*hib*hom*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(Lq^2*q2) - (8*Lq*Rs*dt^2*hia*hib*hom*1/8*(3 - 4*e2q4*ch2t + e8q4*ch4t))/(Ld^2*q2) + (10*Ld*dt^2*hia*(hib^2 + q2)*kppj^2*psi*1/4*e92q4*(e4q4*cht - ch3t))/q3 + (10*Ld*dt^2*(hia^2 + q1)*hib*kppj^2*psi*1/4*e92q4*(e4q4*sht + sh3t))/q3 - (10*Lq*dt^2*hia*(hib^2 + q2)*kppj^2*psi*1/4*e92q4*(e4q4*cht - ch3t))/q3 - (10*Lq*dt^2*(hia^2 + q1)*hib*kppj^2*psi*1/4*e92q4*(e4q4*sht + sh3t))/q3 - (2*Rs*dt^2*hia*hom*psi*sht*e05q4)/(Ld*Lq*q2) - (8*Rs^2*dt^2*hia*hib*1/4*e8q4*(e6q4 - ch2t)*sh2t)/(Ld*Lq*q1) + (8*Rs^2*dt^2*hia*hib*1/4*e8q4*(e6q4 + ch2t)*sh2t)/(Ld*Lq*q1) + (16*Rs^2*dt^2*hia*hib*1/4*e8q4*(e6q4 - ch2t)*sh2t)/(Ld*Lq*q2) + (4*Rs*dt^2*hia*hom*psi*1/4*e92q4*(e4q4*sht + sh3t))/(Ld*Lq*q1) + (2*Rs*dt^2*hib*hom*psi*1/4*e92q4*(e4q4*cht - ch3t))/(Ld*Lq*q1) - (4*Rs*dt^2*hib*hom*psi*1/4*e92q4*(e4q4*cht - ch3t))/(Ld*Lq*q2) - (12*Ld*Rs*dt^2*hia*hib*hom*1/8*(1 - e8q4*ch4t))/(Lq^2*q1) - (12*Lq*Rs*dt^2*hia*hib*hom*1/8*(1 - e8q4*ch4t))/(Ld^2*q1) + (8*Ld*Rs*dt^2*hia*hib*hom*1/8*(1 - e8q4*ch4t))/(Lq^2*q2) + (8*Lq*Rs*dt^2*hia*hib*hom*1/8*(1 - e8q4*ch4t))/(Ld^2*q2);
504       
505       
506        D12 = -A70'*iQ4;
507        D21 = D12';
508        D22 = iQ4 + C4'*iR*C4;
509
510        Jj10 = D22 - D21/(Jj10 + D11)*D12;
511        iJn10(:,:,t) = inv(Jj10);
512    end
513    if(model11 == 1) %d-q/E/Ldq
514        A81(1,2) = Lq*dt/Ld*ome;
515        A81(1,3) = Lq*dt/Ld*iq;
516        A81(2,1) = -Ld*dt/Lq*ome;
517        A81(2,3) = -Ld*dt/Lq*id-psipm*dt/Lq;
518        A81(3,1) = kp*pp*pp*dt*(Ld-Lq)/J*iq;
519        A81(3,2) = kp*pp*pp*dt/J*((Ld-Lq)*id+psipm);   
520       
521        D11 = A81'*iQ4*A81 + D11_cor11;
522        D12 = -A81'*iQ4;
523        D21 = D12';
524        D22 = iQ4 + C4'*iR*C4;
525   
526        Jj11 = D22 - D21/(Jj11 + D11)*D12;
527        iJn11(:,:,t) = inv(Jj11);
528    end
529    if(model12 == 1) %5sc/E/Ldq
530        A92(1, 1) = 1.0 + dt*(-Rs*(1/2*(1 - e2q4*ch2t)/Lq + 1/2*(1 + e2q4*ch2t)/Ld) + hom*sht*cht*e2q4*(Ld/Lq - Lq/Ld));
531        A92(1, 2) = dt*(-hom + Rs*sht*cht*e2q4*(1/Lq - 1/Ld) + hom*(Ld*1/2*(1 - e2q4*ch2t)/Lq + Lq*1/2*(1 + e2q4*ch2t)/Ld));
532        A92(1, 3) = dt*psi*sht*e05q4/Lq + dt*hia*sht*cht*e2q4*(Ld/Lq - Lq/Ld) + dt*hib*(-1 + Ld/Lq*1/2*(1 - e2q4*ch2t) + Lq/Ld*1/2*(1 + e2q4*ch2t));
533        A92(1, 4) = dt*psi*hom/Lq + dt*hia*(-Rs*2*sht*e05q4/Lq + hom*cht*e05q4*(Ld/Lq - Lq/Ld)) + dt*hib*(Rs*cht*e05q4*(1/Lq - 1/Ld) + hom*2*Ld*sht*e05q4/Lq);
534        A92(1, 5) = dt*hia*(-Rs*2*cht*e05q4/Ld + hom*sht*e05q4*(Ld/Lq - Lq/Ld)) + dt*hib*(Rs*sht*e05q4*(1/Lq - 1/Ld) + hom*2*Lq*cht*e05q4/Ld);
535
536        A92(2, 1) = dt*(hom + Rs*sht*cht*e2q4*(1/Lq - 1/Ld) - hom*(Lq*1/2*(1 - e2q4*ch2t)/Ld + Ld*1/2*(1 + e2q4*ch2t)/Lq));
537        A92(2, 2) = 1 + dt*(-Rs*(1/2*(1 - e2q4*ch2t)/Ld + 1/2*(1 + e2q4*ch2t)/Lq) + hom*sht*cht*e2q4*(Lq/Ld - Ld/Lq));
538        A92(2, 3) = -dt*psi*cht*e05q4/Lq + dt*hia*(1 - Lq*1/2*(1 - e2q4*ch2t)/Ld - Ld*1/2*(1 + e2q4*ch2t)/Lq) + dt*hib*sht*cht*e2q4*(Lq/Ld - Ld/Lq);
539        A92(2, 4) = dt*hia*(Rs*cht*e05q4*(1/Lq - 1/Ld) - hom*2*Lq*sht*e05q4/Ld) + dt*hib*(-Rs*2*sht*e05q4/Ld + hom*cht*e05q4*(Lq/Ld - Ld/Lq));
540        A92(2, 5) = -dt*psi*hom/Lq + dt*hia*(Rs*sht*e05q4*(1/Lq - 1/Ld) -hom*2*Ld*cht*e05q4/Lq) + dt*hib*(-Rs*2*cht*e05q4/Lq + hom*sht*e05q4*(Lq/Ld - Ld/Lq));
541
542        A92(3, 1) = dt*kpp/J*((Ld - Lq)*(-2*hia*sht*cht*e2q4 + hib*1/2*(1 + e2q4*ch2t) - hib*1/2*(1 - e2q4*ch2t)) - psi*sht*e05q4);
543        A92(3, 2) = dt*kpp/J*((Ld - Lq)*(hia*1/2*(1 + e2q4*ch2t) - hia*1/2*(1 - e2q4*ch2t) + 2*hib*sht*cht*e2q4) + psi*cht*e05q4);
544        A92(3, 3) = 1;
545        A92(3, 4) = dt*kpp/J*((Ld - Lq)*(-(hia^2 + q1)*cht*e05q4 - hia*hib*2*sht*e05q4 + (hib^2 + q2)*cht*e05q4) - psi*hia);
546        A92(3, 5) = dt*kpp/J*((Ld - Lq)*(-(hia^2 + q1)*sht*e05q4 + hia*hib*2*cht*e05q4 + (hib^2 + q2)*sht*e05q4) + psi*hib);
547
548        A92(4,3) = dt*cht*e05q4;
549        A92(4,5) = dt*hom;
550        A92(5,3) = -dt*sht*e05q4;
551        A92(5,4) = -dt*hom;
552       
553        D11 = zeros(5);
554        D11(1,1) = 1/q1 + (dt^2*(hom^2 + q3))/q2 + (Rs^2*(cht^4 + 6*cht^2*q5 + 3*q5^2)*dt^2)/(Ld^2*q1) + (Rs^2*dt^2*(sht^4 + 6*sht^2*q4 + 3*q4^2))/(Lq^2*q1) - (2*Rs*(cht^2 + q5)*dt)/(Ld*q1) - (2*(cht^2 + q5)*dt^2*(hom^2 + q3)*(sht^2 + q4))/q1 + (2*(cht^2 + q5)*dt^2*(hom^2 + q3)*(sht^2 + q4))/q2 - (2*Rs*dt*(sht^2 + q4))/(Lq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*(hom^2 + q3)*(sht^2 + q4))/(Lq^2*q1) + (2*Ld*cht*dt*hom*sht)/(Lq*q1) - (2*Lq*cht*dt*hom*sht)/(Ld*q1) + (2*Ld*dt^2*hib*kpp^2*psi*(sht^3 + 3*sht*q4))/(J^2*q3) - (2*Lq*dt^2*hib*kpp^2*psi*(sht^3 + 3*sht*q4))/(J^2*q3) + (4*Ld^2*(cht^2 + q5)*dt^2*(hia^2 + q1)*kpp^2*(sht^2 + q4))/(J^2*q3) - (2*Ld^2*(cht^2 + q5)*dt^2*(hib^2 + q2)*kpp^2*(sht^2 + q4))/(J^2*q3) + (4*Lq^2*(cht^2 + q5)*dt^2*(hia^2 + q1)*kpp^2*(sht^2 + q4))/(J^2*q3) - (2*Lq^2*(cht^2 + q5)*dt^2*(hib^2 + q2)*kpp^2*(sht^2 + q4))/(J^2*q3) - (2*Ld*Lq*(cht^4 + 6*cht^2*q5 + 3*q5^2)*dt^2*(hib^2 + q2)*kpp^2)/(J^2*q3) - (2*Ld*Lq*dt^2*(hib^2 + q2)*kpp^2*(sht^4 + 6*sht^2*q4 + 3*q4^2))/(J^2*q3) - (2*Ld*Rs*cht*dt^2*hom*(sht^3 + 3*sht*q4))/(Lq^2*q1) + (2*Lq*Rs*(cht^3 + 3*cht*q5)*dt^2*hom*sht)/(Ld^2*q1) - (2*Ld*Rs*(cht^3 + 3*cht*q5)*dt^2*hom*sht)/(Lq^2*q2) + (2*Lq*Rs*cht*dt^2*hom*(sht^3 + 3*sht*q4))/(Ld^2*q2) + (4*Ld^2*cht*dt^2*hia*hib*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) - (4*Ld^2*(cht^3 + 3*cht*q5)*dt^2*hia*hib*kpp^2*sht)/(J^2*q3) + (4*Lq^2*cht*dt^2*hia*hib*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) - (4*Lq^2*(cht^3 + 3*cht*q5)*dt^2*hia*hib*kpp^2*sht)/(J^2*q3) - (8*Ld*Lq*(cht^2 + q5)*dt^2*(hia^2 + q1)*kpp^2*(sht^2 + q4))/(J^2*q3) + (4*Ld*Lq*(cht^2 + q5)*dt^2*(hib^2 + q2)*kpp^2*(sht^2 + q4))/(J^2*q3) + (4*Ld*cht*dt^2*hia*kpp^2*psi*(sht^2 + q4))/(J^2*q3) - (2*Ld*(cht^2 + q5)*dt^2*hib*kpp^2*psi*sht)/(J^2*q3) - (4*Lq*cht*dt^2*hia*kpp^2*psi*(sht^2 + q4))/(J^2*q3) + (2*Lq*(cht^2 + q5)*dt^2*hib*kpp^2*psi*sht)/(J^2*q3) - (8*Ld*Lq*cht*dt^2*hia*hib*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) + (8*Ld*Lq*(cht^3 + 3*cht*q5)*dt^2*hia*hib*kpp^2*sht)/(J^2*q3);
555        D11(1,2) = (dt*hom)/q2 - (dt*hom)/q1 - (cht*dt^2*(hom^2 + q3)*(sht^3 + 3*sht*q4))/q1 + ((cht^3 + 3*cht*q5)*dt^2*(hom^2 + q3)*sht)/q1 + (cht*dt^2*(hom^2 + q3)*(sht^3 + 3*sht*q4))/q2 - ((cht^3 + 3*cht*q5)*dt^2*(hom^2 + q3)*sht)/q2 + (Rs*(cht^2 + q5)*dt^2*hom)/(Ld*q1) - (Rs*(cht^2 + q5)*dt^2*hom)/(Lq*q2) - (Rs*dt^2*hom*(sht^2 + q4))/(Ld*q2) + (Rs*dt^2*hom*(sht^2 + q4))/(Lq*q1) - (Rs*cht*dt*sht)/(Ld*q1) - (Rs*cht*dt*sht)/(Ld*q2) + (Rs*cht*dt*sht)/(Lq*q1) + (Rs*cht*dt*sht)/(Lq*q2) + (Rs^2*(cht^3 + 3*cht*q5)*dt^2*sht)/(Ld^2*q1) + (Rs^2*cht*dt^2*(sht^3 + 3*sht*q4))/(Ld^2*q2) - (Rs^2*cht*dt^2*(sht^3 + 3*sht*q4))/(Lq^2*q1) - (Rs^2*(cht^3 + 3*cht*q5)*dt^2*sht)/(Lq^2*q2) + (Lq*(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s*(cht^2 + q5)*dt^2*hom*(sht^2 + q4))/(Lq*q1) + (2*Rs*(cht^2 + q5)*dt^2*hom*(sht^2 + q4))/(Lq*q2) + (2*Ld^2*cht*dt^2*(hia^2 + q1)*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) - (2*Ld^2*(cht^3 + 3*cht*q5)*dt^2*(hia^2 + q1)*kpp^2*sht)/(J^2*q3) - (2*Ld^2*cht*dt^2*(hib^2 + q2)*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) + (2*Ld^2*(cht^3 + 3*cht*q5)*dt^2*(hib^2 + q2)*kpp^2*sht)/(J^2*q3) + (2*Lq^2*cht*dt^2*(hia^2 + q1)*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) - (2*Lq^2*(cht^3 + 3*cht*q5)*dt^2*(hia^2 + q1)*kpp^2*sht)/(J^2*q3) - (2*Lq^2*cht*dt^2*(hib^2 + q2)*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) + (2*Lq^2*(cht^3 + 3*cht*q5)*dt^2*(hib^2 + q2)*kpp^2*sht)/(J^2*q3) + (Ld*Rs*(cht^2 + q5)*dt^2*hom*(sht^2 + q4))/(Lq^2*q1) + (Lq*Rs*(cht^2 + q5)*dt^2*hom*(sht^2 + q4))/(Ld^2*q1) - (Ld*Rs*(cht^2 + q5)*dt^2*hom*(sht^2 + q4))/(Lq^2*q2) - (Lq*Rs*(cht^2 + q5)*dt^2*hom*(sht^2 + q4))/(Ld^2*q2) + (Ld*(cht^3 + 3*cht*q5)*dt^2*hib*kpp^2*psi)/(J^2*q3) - (Lq*(cht^3 + 3*cht*q5)*dt^2*hib*kpp^2*psi)/(J^2*q3) + (Ld*dt^2*hia*kpp^2*psi*(sht^3 + 3*sht*q4))/(J^2*q3) - (Lq*dt^2*hia*kpp^2*psi*(sht^3 + 3*sht*q4))/(J^2*q3) + (Ld^2*(cht^4 + 6*cht^2*q5 + 3*q5^2)*dt^2*hia*hib*kpp^2)/(J^2*q3) + (Lq^2*(cht^4 + 6*cht^2*q5 + 3*q5^2)*dt^2*hia*hib*kpp^2)/(J^2*q3) + (Ld^2*dt^2*hia*hib*kpp^2*(sht^4 + 6*sht^2*q4 + 3*q4^2))/(J^2*q3) + (Lq^2*dt^2*hia*hib*kpp^2*(sht^4 + 6*sht^2*q4 + 3*q4^2))/(J^2*q3) - (4*Ld*Lq*cht*dt^2*(hia^2 + q1)*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) + (4*Ld*Lq*(cht^3 + 3*cht*q5)*dt^2*(hia^2 + q1)*kpp^2*sht)/(J^2*q3) + (4*Ld*Lq*cht*dt^2*(hib^2 + q2)*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) - (4*Ld*Lq*(cht^3 + 3*cht*q5)*dt^2*(hib^2 + q2)*kpp^2*sht)/(J^2*q3) - (6*Ld^2*(cht^2 + q5)*dt^2*hia*hib*kpp^2*(sht^2 + q4))/(J^2*q3) - (6*Lq^2*(cht^2 + q5)*dt^2*hia*hib*kpp^2*(sht^2 + q4))/(J^2*q3) - (2*Ld*Lq*(cht^4 + 6*cht^2*q5 + 3*q5^2)*dt^2*hia*hib*kpp^2)/(J^2*q3) - (2*Ld*Lq*dt^2*hia*hib*kpp^2*(sht^4 + 6*sht^2*q4 + 3*q4^2))/(J^2*q3) - (3*Ld*(cht^2 + q5)*dt^2*hia*kpp^2*psi*sht)/(J^2*q3) - (3*Ld*cht*dt^2*hib*kpp^2*psi*(sht^2 + q4))/(J^2*q3) + (3*Lq*(cht^2 + q5)*dt^2*hia*kpp^2*psi*sht)/(J^2*q3) + (3*Lq*cht*dt^2*hib*kpp^2*psi*(sht^2 + q4))/(J^2*q3) + (12*Ld*Lq*(cht^2 + q5)*dt^2*hia*hib*kpp^2*(sht^2 + q4))/(J^2*q3);
556        D11(1,3) = (dt^2*hia*hom)/q2 - (dt*hib)/q1 + (dt*psi*sht)/(Lq*q1) - (cht*dt^2*hib*hom*(sht^3 + 3*sht*q4))/q1 + ((cht^3 + 3*cht*q5)*dt^2*hib*hom*sht)/q1 + (cht*dt^2*hib*hom*(sht^3 + 3*sht*q4))/q2 - ((cht^3 + 3*cht*q5)*dt^2*hib*hom*sht)/q2 + (Rs*(cht^2 + q5)*dt^2*hib)/(Ld*q1) + (Rs*dt^2*hib*(sht^2 + q4))/(Lq*q1) - (Rs*dt^2*psi*(sht^3 + 3*sht*q4))/(Lq^2*q1) - (2*(cht^2 + q5)*dt^2*hia*hom*(sht^2 + q4))/q1 + (2*(cht^2 + q5)*dt^2*hia*hom*(sht^2 + q4))/q2 - (dt*kpp*psi*sht)/(J*q3) + (Lq*(cht^2 + q5)*dt*hib)/(Ld*q1) + (Ld*dt*hib*(sht^2 + q4))/(Lq*q1) - (cht*dt^2*hom*psi)/(Lq*q2) + (Ld*(cht^2 + q5)*dt*hib*kpp)/(J*q3) - (Lq*(cht^2 + q5)*dt*hib*kpp)/(J*q3) - (Ld*dt*hib*kpp*(sht^2 + q4))/(J*q3) + (Lq*dt*hib*kpp*(sht^2 + q4))/(J*q3) - (Rs*cht*dt^2*hia*sht)/(Ld*q2) + (Rs*cht*dt^2*hia*sht)/(Lq*q2) - (Lq*Rs*(cht^4 + 6*cht^2*q5 + 3*q5^2)*dt^2*hib)/(Ld^2*q1) - (Ld*Rs*dt^2*hib*(sht^4 + 6*sht^2*q4 + 3*q4^2))/(Lq^2*q1) - (2*Ld*(cht^2 + q5)*dt^2*hia*hom)/(Lq*q2) + (Ld*(cht^3 + 3*cht*q5)*dt^2*hom*psi)/(Lq^2*q2) + (Rs*cht*dt^2*hia*(sht^3 + 3*sht*q4))/(Ld*q1) - (Rs*cht*dt^2*hia*(sht^3 + 3*sht*q4))/(Ld*q2) - (Rs*(cht^3 + 3*cht*q5)*dt^2*hia*sht)/(Lq*q1) + (Rs*(cht^3 + 3*cht*q5)*dt^2*hia*sht)/(Lq*q2) - (2*Lq*dt^2*hia*hom*(sht^2 + q4))/(Ld*q2) - (Rs*(cht^2 + q5)*dt^2*psi*sht)/(Lq^2*q2) - (cht*dt^2*hom*psi*(sht^2 + q4))/(Ld*q1) + (cht*dt^2*hom*psi*(sht^2 + q4))/(Ld*q2) + (Ld*cht*dt*hia*sht)/(Lq*q1) - (Lq*cht*dt*hia*sht)/(Ld*q1) + (Ld^2*(cht^4 + 6*cht^2*q5 + 3*q5^2)*dt^2*hia*hom)/(Lq^2*q2) - (Rs*(cht^2 + q5)*dt^2*hib*(sht^2 + q4))/(Ld*q1) + (Rs*(cht^2 + q5)*dt^2*hib*(sht^2 + q4))/(Ld*q2) - (Rs*(cht^2 + q5)*dt^2*hib*(sht^2 + q4))/(Lq*q1) + (Rs*(cht^2 + q5)*dt^2*hib*(sht^2 + q4))/(Lq*q2) + (Lq^2*dt^2*hia*hom*(sht^4 + 6*sht^2*q4 + 3*q4^2))/(Ld^2*q2) + (Ld*cht*dt^2*hom*psi*(sht^2 + q4))/(Lq^2*q1) - (2*Ld*cht*dt*hia*kpp*sht)/(J*q3) + (2*Lq*cht*dt*hia*kpp*sht)/(J*q3) - (Ld*Rs*(cht^2 + q5)*dt^2*hib*(sht^2 + q4))/(Lq^2*q2) - (Lq*Rs*(cht^2 + q5)*dt^2*hib*(sht^2 + q4))/(Ld^2*q2) - (Rs*(cht^2 + q5)*dt^2*psi*sht)/(Ld*Lq*q1) + (Rs*(cht^2 + q5)*dt^2*psi*sht)/(Ld*Lq*q2) - (Lq^2*(cht^3 + 3*cht*q5)*dt^2*hib*hom*sht)/(Ld^2*q1) + (Ld^2*cht*dt^2*hib*hom*(sht^3 + 3*sht*q4))/(Lq^2*q1) - (Lq^2*cht*dt^2*hib*hom*(sht^3 + 3*sht*q4))/(Ld^2*q2) + (Ld^2*(cht^3 + 3*cht*q5)*dt^2*hib*hom*sht)/(Lq^2*q2) - (Ld*cht*dt^2*hib*hom*sht)/(Lq*q1) + (Lq*cht*dt^2*hib*hom*sht)/(Ld*q1) - (Ld*cht*dt^2*hib*hom*sht)/(Lq*q2) + (Lq*cht*dt^2*hib*hom*sht)/(Ld*q2) + (Lq^2*(cht^2 + q5)*dt^2*hia*hom*(sht^2 + q4))/(Ld^2*q1) + (Ld^2*(cht^2 + q5)*dt^2*hia*hom*(sht^2 + q4))/(Lq^2*q1) - (Ld*Rs*cht*dt^2*hia*(sht^3 + 3*sht*q4))/(Lq^2*q1) + (Lq*Rs*(cht^3 + 3*cht*q5)*dt^2*hia*sht)/(Ld^2*q1) - (Ld*Rs*(cht^3 + 3*cht*q5)*dt^2*hia*sht)/(Lq^2*q2) + (Lq*Rs*cht*dt^2*hia*(sht^3 + 3*sht*q4))/(Ld^2*q2);
557        D11(1,4) = (dt*hom*psi)/(Lq*q1) - ((cht^3 + 3*cht*q5)*dt^2*hib*(hom^2 + q3))/q2 - (Rs*cht*dt*hib)/(Ld*q1) + (Rs*cht*dt*hib)/(Lq*q1) - (2*(cht^2 + q5)*dt^2*hia*(hom^2 + q3)*sht)/q1 - (2*cht*dt^2*hib*(hom^2 + q3)*(sht^2 + q4))/q1 + (2*(cht^2 + q5)*dt^2*hia*(hom^2 + q3)*sht)/q2 + (cht*dt^2*hib*(hom^2 + q3)*(sht^2 + q4))/q2 - (2*Rs*dt*hia*sht)/(Lq*q1) + (Rs^2*(cht^3 + 3*cht*q5)*dt^2*hib)/(Ld^2*q1) + (2*Rs^2*dt^2*hia*(sht^3 + 3*sht*q4))/(Lq^2*q1) + (dt^2*hia*kpp^2*psi^2*sht)/(J^2*q3) - (Rs^2*(cht^3 + 3*cht*q5)*dt^2*hib)/(Ld*Lq*q1) - (Rs*cht*dt^2*hia*hom)/(Ld*q2) + (Rs*cht*dt^2*hia*hom)/(Lq*q2) - (2*Rs*dt^2*hib*hom*sht)/(Ld*q2) + (Ld^2*(cht^3 + 3*cht*q5)*dt^2*hib*(hom^2 + q3))/(Lq^2*q2) + (2*Lq^2*dt^2*hia*(hom^2 + q3)*(sht^3 + 3*sht*q4))/(Ld^2*q2) - (Ld*cht*dt^2*hib*(hom^2 + q3))/(Lq*q2) + (Lq*cht*dt^2*hib*(hom^2 + q3))/(Ld*q2) - (Rs*(cht^3 + 3*cht*q5)*dt^2*hia*hom)/(Lq*q1) + (Rs*(cht^3 + 3*cht*q5)*dt^2*hia*hom)/(Lq*q2) - (2*Lq*dt^2*hia*(hom^2 + q3)*sht)/(Ld*q2) + (Ld^2*(cht^3 + 3*cht*q5)*dt^2*(hib^3 + 3*hib*q2)*kpp^2)/(J^2*q3) + (Lq^2*(cht^3 + 3*cht*q5)*dt^2*(hib^3 + 3*hib*q2)*kpp^2)/(J^2*q3) - (Rs*dt^2*hom*psi*(sht^2 + q4))/(Lq^2*q1) - (cht*dt^2*(hom^2 + q3)*psi*sht)/(Ld*q1) + (Ld*cht*dt*hia*hom)/(Lq*q1) - (Lq*cht*dt*hia*hom)/(Ld*q1) + (2*Ld*dt*hib*hom*sht)/(Lq*q1) + (Rs^2*(cht^2 + q5)*dt^2*hia*sht)/(Ld^2*q2) + (2*Rs^2*cht*dt^2*hib*(sht^2 + q4))/(Ld^2*q2) - (Rs^2*cht*dt^2*hib*(sht^2 + q4))/(Lq^2*q1) + (Rs^2*(cht^2 + q5)*dt^2*hia*sht)/(Lq^2*q2) + (3*Rs*cht*dt^2*hia*hom*(sht^2 + q4))/(Ld*q1) - (Rs*(cht^2 + q5)*dt^2*hib*hom*sht)/(Ld*q1) - (3*Rs*cht*dt^2*hia*hom*(sht^2 + q4))/(Ld*q2) + (Rs*(cht^2 + q5)*dt^2*hib*hom*sht)/(Ld*q2) - (3*Rs*(cht^2 + q5)*dt^2*hib*hom*sht)/(Lq*q1) + (3*Rs*(cht^2 + q5)*dt^2*hib*hom*sht)/(Lq*q2) + (Ld*cht*dt^2*(hom^2 + q3)*psi*sht)/(Lq^2*q1) - (Ld^2*(cht^3 + 3*cht*q5)*dt^2*(hia^2 + q1)*hib*kpp^2)/(J^2*q3) - (Lq^2*(cht^3 + 3*cht*q5)*dt^2*(hia^2 + q1)*hib*kpp^2)/(J^2*q3) + (2*Ld^2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q4))/(Ld^2*q2) - (4*Ld*Lq*(cht^2 + q5)*dt^2*(hia^3 + 3*hia*q1)*kpp^2*sht)/(J^2*q3) + (2*Ld*Lq*cht*dt^2*(hib^3 + 3*hib*q2)*kpp^2*(sht^2 + q4))/(J^2*q3) - (4*Ld*Lq*dt^2*hia*(hib^2 + q2)*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) - (3*Ld*Rs*cht*dt^2*hia*hom*(sht^2 + q4))/(Lq^2*q1) + (Ld*Rs*(cht^2 + q5)*dt^2*hib*hom*sht)/(Lq^2*q1) + (Lq*Rs*(cht^2 + q5)*dt^2*hib*hom*sht)/(Ld^2*q1) + (3*Lq*Rs*cht*dt^2*hia*hom*(sht^2 + q4))/(Ld^2*q2) - (Ld*Rs*(cht^2 + q5)*dt^2*hib*hom*sht)/(Lq^2*q2) - (Lq*Rs*(cht^2 + q5)*dt^2*hib*hom*sht)/(Ld^2*q2) + (5*Ld^2*cht*dt^2*(hia^2 + q1)*hib*kpp^2*(sht^2 + q4))/(J^2*q3) - (4*Ld^2*(cht^2 + q5)*dt^2*hia*(hib^2 + q2)*kpp^2*sht)/(J^2*q3) + (5*Lq^2*cht*dt^2*(hia^2 + q1)*hib*kpp^2*(sht^2 + q4))/(J^2*q3) - (4*Lq^2*(cht^2 + q5)*dt^2*hia*(hib^2 + q2)*kpp^2*sht)/(J^2*q3) - (Ld*(cht^2 + q5)*dt^2*hia*hib*kpp^2*psi)/(J^2*q3) + (Lq*(cht^2 + q5)*dt^2*hia*hib*kpp^2*psi)/(J^2*q3) + (3*Ld*cht*dt^2*(hia^2 + q1)*kpp^2*psi*sht)/(J^2*q3) - (Ld*cht*dt^2*(hib^2 + q2)*kpp^2*psi*sht)/(J^2*q3) - (3*Lq*cht*dt^2*(hia^2 + q1)*kpp^2*psi*sht)/(J^2*q3) + (Lq*cht*dt^2*(hib^2 + q2)*kpp^2*psi*sht)/(J^2*q3) + (3*Ld*dt^2*hia*hib*kpp^2*psi*(sht^2 + q4))/(J^2*q3) - (3*Lq*dt^2*hia*hib*kpp^2*psi*(sht^2 + q4))/(J^2*q3) + (2*Ld*Lq*(cht^3 + 3*cht*q5)*dt^2*(hia^2 + q1)*hib*kpp^2)/(J^2*q3) - (10*Ld*Lq*cht*dt^2*(hia^2 + q1)*hib*kpp^2*(sht^2 + q4))/(J^2*q3) + (8*Ld*Lq*(cht^2 + q5)*dt^2*hia*(hib^2 + q2)*kpp^2*sht)/(J^2*q3);
558        D11(1,5) = (dt^2*hib*(hom^2 + q3)*(sht^3 + 3*sht*q4))/q2 - (dt^2*(hom^2 + q3)*psi)/(Lq*q2) - (2*Rs*cht*dt*hia)/(Ld*q1) - (2*cht*dt^2*hia*(hom^2 + q3)*(sht^2 + q4))/q1 + (2*(cht^2 + q5)*dt^2*hib*(hom^2 + q3)*sht)/q1 + (2*cht*dt^2*hia*(hom^2 + q3)*(sht^2 + q4))/q2 - ((cht^2 + q5)*dt^2*hib*(hom^2 + q3)*sht)/q2 - (Rs*dt*hib*sht)/(Ld*q1) + (Rs*dt*hib*sht)/(Lq*q1) + (2*Rs^2*(cht^3 + 3*cht*q5)*dt^2*hia)/(Ld^2*q1) - (Rs^2*dt^2*hib*(sht^3 + 3*sht*q4))/(Lq^2*q1) + (dt^2*(hom^2 + q3)*psi*(sht^2 + q4))/(Ld*q2) - (dt^2*hib*kpp^2*psi^2*sht)/(J^2*q3) - (2*Rs*cht*dt^2*hib*hom)/(Lq*q2) + (Rs^2*dt^2*hib*(sht^3 + 3*sht*q4))/(Ld*Lq*q1) - (Rs*dt^2*hia*hom*sht)/(Ld*q2) + (Rs*dt^2*hia*hom*sht)/(Lq*q2) + (2*Ld^2*(cht^3 + 3*cht*q5)*dt^2*hia*(hom^2 + q3))/(Lq^2*q2) - (Lq^2*dt^2*hib*(hom^2 + q3)*(sht^3 + 3*sht*q4))/(Ld^2*q2) - (2*Ld*cht*dt^2*hia*(hom^2 + q3))/(Lq*q2) - (Ld*dt^2*hib*(hom^2 + q3)*sht)/(Lq*q2) + (Lq*dt^2*hib*(hom^2 + q3)*sht)/(Ld*q2) + (Rs*dt^2*hia*hom*(sht^3 + 3*sht*q4))/(Ld*q1) - (Rs*dt^2*hia*hom*(sht^3 + 3*sht*q4))/(Ld*q2) - (Ld^2*dt^2*(hib^3 + 3*hib*q2)*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) - (Lq^2*dt^2*(hib^3 + 3*hib*q2)*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) + (2*Lq*cht*dt*hib*hom)/(Ld*q1) + (Ld*dt*hia*hom*sht)/(Lq*q1) - (Lq*dt*hia*hom*sht)/(Ld*q1) + (Ld*(cht^2 + q5)*dt^2*(hom^2 + q3)*psi)/(Lq^2*q2) + (Rs^2*(cht^2 + q5)*dt^2*hib*sht)/(Ld^2*q1) + (Rs^2*cht*dt^2*hia*(sht^2 + q4))/(Ld^2*q2) + (Rs^2*cht*dt^2*hia*(sht^2 + q4))/(Lq^2*q2) - (2*Rs^2*(cht^2 + q5)*dt^2*hib*sht)/(Lq^2*q2) - (3*Rs*cht*dt^2*hib*hom*(sht^2 + q4))/(Ld*q1) + (3*Rs*cht*dt^2*hib*hom*(sht^2 + q4))/(Ld*q2) - (3*Rs*(cht^2 + q5)*dt^2*hia*hom*sht)/(Lq*q1) - (Rs*cht*dt^2*hib*hom*(sht^2 + q4))/(Lq*q1) + (3*Rs*(cht^2 + q5)*dt^2*hia*hom*sht)/(Lq*q2) + (Rs*cht*dt^2*hib*hom*(sht^2 + q4))/(Lq*q2) + (2*Ld^2*(cht^3 + 3*cht*q5)*dt^2*hia*(hib^2 + q2)*kpp^2)/(J^2*q3) + (2*Lq^2*(cht^3 + 3*cht*q5)*dt^2*hia*(hib^2 + q2)*kpp^2)/(J^2*q3) + (2*Ld^2*cht*dt^2*(hia^3 + 3*hia*q1)*kpp^2*(sht^2 + q4))/(J^2*q3) + (Ld^2*(cht^2 + q5)*dt^2*(hib^3 + 3*hib*q2)*kpp^2*sht)/(J^2*q3) + (2*Lq^2*cht*dt^2*(hia^3 + 3*hia*q1)*kpp^2*(sht^2 + q4))/(J^2*q3) + (Lq^2*(cht^2 + q5)*dt^2*(hib^3 + 3*hib*q2)*kpp^2*sht)/(J^2*q3) + (Ld^2*dt^2*(hia^2 + q1)*hib*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) + (Lq^2*dt^2*(hia^2 + q1)*hib*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) + (2*Ld*Lq*dt^2*(hib^3 + 3*hib*q2)*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) + (2*Rs^2*cht*dt^2*hia*(sht^2 + q4))/(Ld*Lq*q1) - (Rs^2*(cht^2 + q5)*dt^2*hib*sht)/(Ld*Lq*q1) - (2*Rs^2*cht*dt^2*hia*(sht^2 + q4))/(Ld*Lq*q2) + (2*Rs^2*(cht^2 + q5)*dt^2*hib*sht)/(Ld*Lq*q2) - (Rs*cht*dt^2*hom*psi*sht)/(Lq^2*q2) + (Ld*(cht^2 + q5)*dt^2*(hib^2 + q2)*kpp^2*psi)/(J^2*q3) - (Lq*(cht^2 + q5)*dt^2*(hib^2 + q2)*kpp^2*psi)/(J^2*q3) + (Lq^2*cht*dt^2*hia*(hom^2 + q3)*(sht^2 + q4))/(Ld^2*q1) + (Ld^2*cht*dt^2*hia*(hom^2 + q3)*(sht^2 + q4))/(Lq^2*q1) - (2*Lq^2*(cht^2 + q5)*dt^2*hib*(hom^2 + q3)*sht)/(Ld^2*q1) + (Ld^2*(cht^2 + q5)*dt^2*hib*(hom^2 + q3)*sht)/(Lq^2*q2) + (Ld*dt^2*(hia^2 + q1)*kpp^2*psi*(sht^2 + q4))/(J^2*q3) - (2*Ld*dt^2*(hib^2 + q2)*kpp^2*psi*(sht^2 + q4))/(J^2*q3) - (Lq*dt^2*(hia^2 + q1)*kpp^2*psi*(sht^2 + q4))/(J^2*q3) + (2*Lq*dt^2*(hib^2 + q2)*kpp^2*psi*(sht^2 + q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(hib^2 + q2)*kpp^2*(sht^2 + q4))/(J^2*q3) + (10*Ld*Lq*(cht^2 + q5)*dt^2*(hia^2 + q1)*hib*kpp^2*sht)/(J^2*q3) - (4*Ld*cht*dt^2*hia*hib*kpp^2*psi*sht)/(J^2*q3) + (4*Lq*cht*dt^2*hia*hib*kpp^2*psi*sht)/(J^2*q3);
559
560        D11(2,1) = D11(1,2);
561        D11(2,2) = 1/q2 + (dt^2*(hom^2 + q3))/q1 + (Rs^2*(cht^4 + 6*cht^2*q5 + 3*q5^2)*dt^2)/(Lq^2*q2) + (Rs^2*dt^2*(sht^4 + 6*sht^2*q4 + 3*q4^2))/(Ld^2*q2) - (2*Rs*(cht^2 + q5)*dt)/(Lq*q2) + (2*(cht^2 + q5)*dt^2*(hom^2 + q3)*(sht^2 + q4))/q1 - (2*(cht^2 + q5)*dt^2*(hom^2 + q3)*(sht^2 + q4))/q2 - (2*Rs*dt*(sht^2 + q4))/(Ld*q2) - (2*Lq*(cht^2 + q5)*dt^2*(hom^2 + q3))/(Ld*q1) - (2*Ld*dt^2*(hom^2 + q3)*(sht^2 + q4))/(Lq*q1) + (Lq^2*(cht^4 + 6*cht^2*q5 + 3*q5^2)*dt^2*(hom^2 + q3))/(Ld^2*q1) + (Rs^2*(cht^2 + q5)*dt^2*(sht^2 + q4))/(Ld^2*q1) + (Rs^2*(cht^2 + q5)*dt^2*(sht^2 + q4))/(Lq^2*q1) + (Ld^2*dt^2*(hom^2 + q3)*(sht^4 + 6*sht^2*q4 + 3*q4^2))/(Lq^2*q1) + ((cht^2 + q5)*dt^2*kpp^2*psi^2)/(J^2*q3) + (2*Rs*cht*dt^2*hom*sht)/(Ld*q1) - (2*Rs*cht*dt^2*hom*sht)/(Lq*q1) - (2*Rs^2*(cht^2 + q5)*dt^2*(sht^2 + q4))/(Ld*Lq*q1) + (2*Rs^2*(cht^2 + q5)*dt^2*(sht^2 + q4))/(Ld*Lq*q2) + (2*Rs*(cht^3 + 3*cht*q5)*dt^2*hom*sht)/(Ld*q1) - (2*Rs*(cht^3 + 3*cht*q5)*dt^2*hom*sht)/(Ld*q2) - (2*Rs*cht*dt^2*hom*(sht^3 + 3*sht*q4))/(Lq*q1) + (2*Rs*cht*dt^2*hom*(sht^3 + 3*sht*q4))/(Lq*q2) + (Ld^2*(cht^4 + 6*cht^2*q5 + 3*q5^2)*dt^2*(hia^2 + q1)*kpp^2)/(J^2*q3) + (Lq^2*(cht^4 + 6*cht^2*q5 + 3*q5^2)*dt^2*(hia^2 + q1)*kpp^2)/(J^2*q3) + (Ld^2*dt^2*(hia^2 + q1)*kpp^2*(sht^4 + 6*sht^2*q4 + 3*q4^2))/(J^2*q3) + (Lq^2*dt^2*(hia^2 + q1)*kpp^2*(sht^4 + 6*sht^2*q4 + 3*q4^2))/(J^2*q3) + (Lq^2*(cht^2 + q5)*dt^2*(hom^2 + q3)*(sht^2 + q4))/(Ld^2*q2) + (Ld^2*(cht^2 + q5)*dt^2*(hom^2 + q3)*(sht^2 + q4))/(Lq^2*q2) - (2*Ld*cht*dt*hom*sht)/(Lq*q2) + (2*Lq*cht*dt*hom*sht)/(Ld*q2) + (2*Ld*(cht^3 + 3*cht*q5)*dt^2*hia*kpp^2*psi)/(J^2*q3) - (2*Lq*(cht^3 + 3*cht*q5)*dt^2*hia*kpp^2*psi)/(J^2*q3) - (2*Ld^2*(cht^2 + q5)*dt^2*(hia^2 + q1)*kpp^2*(sht^2 + q4))/(J^2*q3) + (4*Ld^2*(cht^2 + q5)*dt^2*(hib^2 + q2)*kpp^2*(sht^2 + q4))/(J^2*q3) - (2*Lq^2*(cht^2 + q5)*dt^2*(hia^2 + q1)*kpp^2*(sht^2 + q4))/(J^2*q3) + (4*Lq^2*(cht^2 + q5)*dt^2*(hib^2 + q2)*kpp^2*(sht^2 + q4))/(J^2*q3) - (2*Ld*Lq*(cht^4 + 6*cht^2*q5 + 3*q5^2)*dt^2*(hia^2 + q1)*kpp^2)/(J^2*q3) - (2*Ld*Lq*dt^2*(hia^2 + q1)*kpp^2*(sht^4 + 6*sht^2*q4 + 3*q4^2))/(J^2*q3) + (2*Ld*Rs*cht*dt^2*hom*(sht^3 + 3*sht*q4))/(Lq^2*q1) - (2*Lq*Rs*(cht^3 + 3*cht*q5)*dt^2*hom*sht)/(Ld^2*q1) + (2*Ld*Rs*(cht^3 + 3*cht*q5)*dt^2*hom*sht)/(Lq^2*q2) - (2*Lq*Rs*cht*dt^2*hom*(sht^3 + 3*sht*q4))/(Ld^2*q2) - (4*Ld^2*cht*dt^2*hia*hib*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) + (4*Ld^2*(cht^3 + 3*cht*q5)*dt^2*hia*hib*kpp^2*sht)/(J^2*q3) - (4*Lq^2*cht*dt^2*hia*hib*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) + (4*Lq^2*(cht^3 + 3*cht*q5)*dt^2*hia*hib*kpp^2*sht)/(J^2*q3) + (4*Ld*Lq*(cht^2 + q5)*dt^2*(hia^2 + q1)*kpp^2*(sht^2 + q4))/(J^2*q3) - (8*Ld*Lq*(cht^2 + q5)*dt^2*(hib^2 + q2)*kpp^2*(sht^2 + q4))/(J^2*q3) - (2*Ld*cht*dt^2*hia*kpp^2*psi*(sht^2 + q4))/(J^2*q3) + (4*Ld*(cht^2 + q5)*dt^2*hib*kpp^2*psi*sht)/(J^2*q3) + (2*Lq*cht*dt^2*hia*kpp^2*psi*(sht^2 + q4))/(J^2*q3) - (4*Lq*(cht^2 + q5)*dt^2*hib*kpp^2*psi*sht)/(J^2*q3) + (8*Ld*Lq*cht*dt^2*hia*hib*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) - (8*Ld*Lq*(cht^3 + 3*cht*q5)*dt^2*hia*hib*kpp^2*sht)/(J^2*q3);
562        D11(2,3) = (dt*hia)/q2 + (dt^2*hib*hom)/q1 - (cht*dt*psi)/(Lq*q2) - (cht*dt^2*hia*hom*(sht^3 + 3*sht*q4))/q1 + ((cht^3 + 3*cht*q5)*dt^2*hia*hom*sht)/q1 + (cht*dt^2*hia*hom*(sht^3 + 3*sht*q4))/q2 - ((cht^3 + 3*cht*q5)*dt^2*hia*hom*sht)/q2 - (Rs*(cht^2 + q5)*dt^2*hia)/(Lq*q2) + (Rs*(cht^3 + 3*cht*q5)*dt^2*psi)/(Lq^2*q2) - (Rs*dt^2*hia*(sht^2 + q4))/(Ld*q2) + (2*(cht^2 + q5)*dt^2*hib*hom*(sht^2 + q4))/q1 - (2*(cht^2 + q5)*dt^2*hib*hom*(sht^2 + q4))/q2 + (cht*dt*kpp*psi)/(J*q3) - (Ld*(cht^2 + q5)*dt*hia)/(Lq*q2) - (Lq*dt*hia*(sht^2 + q4))/(Ld*q2) - (dt^2*hom*psi*sht)/(Lq*q1) + (Ld*(cht^2 + q5)*dt*hia*kpp)/(J*q3) - (Lq*(cht^2 + q5)*dt*hia*kpp)/(J*q3) - (Ld*dt*hia*kpp*(sht^2 + q4))/(J*q3) + (Lq*dt*hia*kpp*(sht^2 + q4))/(J*q3) + (Rs*cht*dt^2*hib*sht)/(Ld*q1) - (Rs*cht*dt^2*hib*sht)/(Lq*q1) + (Ld*Rs*(cht^4 + 6*cht^2*q5 + 3*q5^2)*dt^2*hia)/(Lq^2*q2) + (Lq*Rs*dt^2*hia*(sht^4 + 6*sht^2*q4 + 3*q4^2))/(Ld^2*q2) - (2*Lq*(cht^2 + q5)*dt^2*hib*hom)/(Ld*q1) + (Rs*(cht^3 + 3*cht*q5)*dt^2*hib*sht)/(Ld*q1) - (Rs*(cht^3 + 3*cht*q5)*dt^2*hib*sht)/(Ld*q2) - (Rs*cht*dt^2*hib*(sht^3 + 3*sht*q4))/(Lq*q1) + (Rs*cht*dt^2*hib*(sht^3 + 3*sht*q4))/(Lq*q2) - (2*Ld*dt^2*hib*hom*(sht^2 + q4))/(Lq*q1) + (Rs*cht*dt^2*psi*(sht^2 + q4))/(Lq^2*q1) + (Ld*dt^2*hom*psi*(sht^3 + 3*sht*q4))/(Lq^2*q1) + ((cht^2 + q5)*dt^2*hom*psi*sht)/(Ld*q1) - ((cht^2 + q5)*dt^2*hom*psi*sht)/(Ld*q2) - (Ld*cht*dt*hib*sht)/(Lq*q2) + (Lq*cht*dt*hib*sht)/(Ld*q2) + (Lq^2*(cht^4 + 6*cht^2*q5 + 3*q5^2)*dt^2*hib*hom)/(Ld^2*q1) - (Rs*(cht^2 + q5)*dt^2*hia*(sht^2 + q4))/(Ld*q1) + (Rs*(cht^2 + q5)*dt^2*hia*(sht^2 + q4))/(Ld*q2) - (Rs*(cht^2 + q5)*dt^2*hia*(sht^2 + q4))/(Lq*q1) + (Rs*(cht^2 + q5)*dt^2*hia*(sht^2 + q4))/(Lq*q2) + (Ld^2*dt^2*hib*hom*(sht^4 + 6*sht^2*q4 + 3*q4^2))/(Lq^2*q1) + (Ld*(cht^2 + q5)*dt^2*hom*psi*sht)/(Lq^2*q2) + (2*Ld*cht*dt*hib*kpp*sht)/(J*q3) - (2*Lq*cht*dt*hib*kpp*sht)/(J*q3) + (Ld*Rs*(cht^2 + q5)*dt^2*hia*(sht^2 + q4))/(Lq^2*q1) + (Lq*Rs*(cht^2 + q5)*dt^2*hia*(sht^2 + q4))/(Ld^2*q1) - (Rs*cht*dt^2*psi*(sht^2 + q4))/(Ld*Lq*q1) + (Rs*cht*dt^2*psi*(sht^2 + q4))/(Ld*Lq*q2) - (Lq^2*(cht^3 + 3*cht*q5)*dt^2*hia*hom*sht)/(Ld^2*q1) + (Ld^2*cht*dt^2*hia*hom*(sht^3 + 3*sht*q4))/(Lq^2*q1) - (Lq^2*cht*dt^2*hia*hom*(sht^3 + 3*sht*q4))/(Ld^2*q2) + (Ld^2*(cht^3 + 3*cht*q5)*dt^2*hia*hom*sht)/(Lq^2*q2) - (Ld*cht*dt^2*hia*hom*sht)/(Lq*q1) + (Lq*cht*dt^2*hia*hom*sht)/(Ld*q1) - (Ld*cht*dt^2*hia*hom*sht)/(Lq*q2) + (Lq*cht*dt^2*hia*hom*sht)/(Ld*q2) + (Lq^2*(cht^2 + q5)*dt^2*hib*hom*(sht^2 + q4))/(Ld^2*q2) + (Ld^2*(cht^2 + q5)*dt^2*hib*hom*(sht^2 + q4))/(Lq^2*q2) + (Ld*Rs*cht*dt^2*hib*(sht^3 + 3*sht*q4))/(Lq^2*q1) - (Lq*Rs*(cht^3 + 3*cht*q5)*dt^2*hib*sht)/(Ld^2*q1) + (Ld*Rs*(cht^3 + 3*cht*q5)*dt^2*hib*sht)/(Lq^2*q2) - (Lq*Rs*cht*dt^2*hib*(sht^3 + 3*sht*q4))/(Ld^2*q2);
563        D11(2,4) = ((cht^3 + 3*cht*q5)*dt^2*hia*(hom^2 + q3))/q1 - (dt^2*(hom^2 + q3)*psi)/(Lq*q1) - (Rs*cht*dt*hia)/(Ld*q2) + (Rs*cht*dt*hia)/(Lq*q2) - (cht*dt^2*hia*(hom^2 + q3)*(sht^2 + q4))/q1 + (2*(cht^2 + q5)*dt^2*hib*(hom^2 + q3)*sht)/q1 + (2*cht*dt^2*hia*(hom^2 + q3)*(sht^2 + q4))/q2 - (2*(cht^2 + q5)*dt^2*hib*(hom^2 + q3)*sht)/q2 - (2*Rs*dt*hib*sht)/(Ld*q2) - (Rs^2*(cht^3 + 3*cht*q5)*dt^2*hia)/(Lq^2*q2) + (2*Rs^2*dt^2*hib*(sht^3 + 3*sht*q4))/(Ld^2*q2) + ((cht^2 + q5)*dt^2*(hom^2 + q3)*psi)/(Ld*q1) - (cht*dt^2*hia*kpp^2*psi^2)/(J^2*q3) + (Rs^2*(cht^3 + 3*cht*q5)*dt^2*hia)/(Ld*Lq*q2) + (Rs*cht*dt^2*hib*hom)/(Ld*q1) - (Rs*cht*dt^2*hib*hom)/(Lq*q1) + (2*Rs*dt^2*hia*hom*sht)/(Lq*q1) - (Lq^2*(cht^3 + 3*cht*q5)*dt^2*hia*(hom^2 + q3))/(Ld^2*q1) + (2*Ld^2*dt^2*hib*(hom^2 + q3)*(sht^3 + 3*sht*q4))/(Lq^2*q1) - (Ld*cht*dt^2*hia*(hom^2 + q3))/(Lq*q1) + (Lq*cht*dt^2*hia*(hom^2 + q3))/(Ld*q1) + (Rs*(cht^3 + 3*cht*q5)*dt^2*hib*hom)/(Ld*q1) - (Rs*(cht^3 + 3*cht*q5)*dt^2*hib*hom)/(Ld*q2) - (2*Ld*dt^2*hib*(hom^2 + q3)*sht)/(Lq*q1) - (Ld^2*(cht^3 + 3*cht*q5)*dt^2*(hia^3 + 3*hia*q1)*kpp^2)/(J^2*q3) - (Lq^2*(cht^3 + 3*cht*q5)*dt^2*(hia^3 + 3*hia*q1)*kpp^2)/(J^2*q3) - (Ld*cht*dt*hib*hom)/(Lq*q2) + (Lq*cht*dt*hib*hom)/(Ld*q2) - (2*Lq*dt*hia*hom*sht)/(Ld*q2) + (Rs^2*(cht^2 + q5)*dt^2*hib*sht)/(Ld^2*q1) + (Rs^2*cht*dt^2*hia*(sht^2 + q4))/(Ld^2*q2) - (2*Rs^2*cht*dt^2*hia*(sht^2 + q4))/(Lq^2*q1) + (Rs^2*(cht^2 + q5)*dt^2*hib*sht)/(Lq^2*q1) + (Ld*dt^2*(hom^2 + q3)*psi*(sht^2 + q4))/(Lq^2*q1) - (3*Rs*(cht^2 + q5)*dt^2*hia*hom*sht)/(Ld*q1) + (3*Rs*(cht^2 + q5)*dt^2*hia*hom*sht)/(Ld*q2) - (Rs*(cht^2 + q5)*dt^2*hia*hom*sht)/(Lq*q1) - (3*Rs*cht*dt^2*hib*hom*(sht^2 + q4))/(Lq*q1) + (Rs*(cht^2 + q5)*dt^2*hia*hom*sht)/(Lq*q2) + (3*Rs*cht*dt^2*hib*hom*(sht^2 + q4))/(Lq*q2) + (Ld^2*(cht^3 + 3*cht*q5)*dt^2*hia*(hib^2 + q2)*kpp^2)/(J^2*q3) + (Lq^2*(cht^3 + 3*cht*q5)*dt^2*hia*(hib^2 + q2)*kpp^2)/(J^2*q3) + (Ld^2*cht*dt^2*(hia^3 + 3*hia*q1)*kpp^2*(sht^2 + q4))/(J^2*q3) + (2*Ld^2*(cht^2 + q5)*dt^2*(hib^3 + 3*hib*q2)*kpp^2*sht)/(J^2*q3) + (Lq^2*cht*dt^2*(hia^3 + 3*hia*q1)*kpp^2*(sht^2 + q4))/(J^2*q3) + (2*Lq^2*(cht^2 + q5)*dt^2*(hib^3 + 3*hib*q2)*kpp^2*sht)/(J^2*q3) + (2*Ld^2*dt^2*(hia^2 + q1)*hib*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) + (2*Lq^2*dt^2*(hia^2 + q1)*hib*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) + (2*Ld*Lq*(cht^3 + 3*cht*q5)*dt^2*(hia^3 + 3*hia*q1)*kpp^2)/(J^2*q3) + (2*Rs^2*cht*dt^2*hia*(sht^2 + q4))/(Ld*Lq*q1) - (2*Rs^2*(cht^2 + q5)*dt^2*hib*sht)/(Ld*Lq*q1) - (Rs^2*cht*dt^2*hia*(sht^2 + q4))/(Ld*Lq*q2) + (2*Rs^2*(cht^2 + q5)*dt^2*hib*sht)/(Ld*Lq*q2) + (Rs*cht*dt^2*hom*psi*sht)/(Lq^2*q1) - (2*Ld*(cht^2 + q5)*dt^2*(hia^2 + q1)*kpp^2*psi)/(J^2*q3) + (Ld*(cht^2 + q5)*dt^2*(hib^2 + q2)*kpp^2*psi)/(J^2*q3) + (2*Lq*(cht^2 + q5)*dt^2*(hia^2 + q1)*kpp^2*psi)/(J^2*q3) - (Lq*(cht^2 + q5)*dt^2*(hib^2 + q2)*kpp^2*psi)/(J^2*q3) + (Ld^2*cht*dt^2*hia*(hom^2 + q3)*(sht^2 + q4))/(Lq^2*q1) - (2*Lq^2*cht*dt^2*hia*(hom^2 + q3)*(sht^2 + q4))/(Ld^2*q2) + (Lq^2*(cht^2 + q5)*dt^2*hib*(hom^2 + q3)*sht)/(Ld^2*q2) + (Ld^2*(cht^2 + q5)*dt^2*hib*(hom^2 + q3)*sht)/(Lq^2*q2) + (Ld*dt^2*(hia^2 + q1)*kpp^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*cht*q5)*dt^2*hia*(hib^2 + q2)*kpp^2)/(J^2*q3) + (10*Ld*Lq*cht*dt^2*hia*(hib^2 + q2)*kpp^2*(sht^2 + q4))/(J^2*q3) + (8*Ld*Lq*(cht^2 + q5)*dt^2*(hia^2 + q1)*hib*kpp^2*sht)/(J^2*q3) - (4*Ld*cht*dt^2*hia*hib*kpp^2*psi*sht)/(J^2*q3) + (4*Lq*cht*dt^2*hia*hib*kpp^2*psi*sht)/(J^2*q3);
564        D11(2,5) = ((cht^2 + q5)*dt^2*hia*(hom^2 + q3)*sht)/q1 - (dt^2*hia*(hom^2 + q3)*(sht^3 + 3*sht*q4))/q1 - (2*Rs*cht*dt*hib)/(Lq*q2) - (dt*hom*psi)/(Lq*q2) + (2*cht*dt^2*hib*(hom^2 + q3)*(sht^2 + q4))/q1 - (2*(cht^2 + q5)*dt^2*hia*(hom^2 + q3)*sht)/q2 - (2*cht*dt^2*hib*(hom^2 + q3)*(sht^2 + q4))/q2 - (Rs*dt*hia*sht)/(Ld*q2) + (Rs*dt*hia*sht)/(Lq*q2) + (2*Rs^2*(cht^3 + 3*cht*q5)*dt^2*hib)/(Lq^2*q2) + (Rs^2*dt^2*hia*(sht^3 + 3*sht*q4))/(Ld^2*q2) + (cht*dt^2*hib*kpp^2*psi^2)/(J^2*q3) + (2*Rs*cht*dt^2*hia*hom)/(Ld*q1) - (Rs^2*dt^2*hia*(sht^3 + 3*sht*q4))/(Ld*Lq*q2) + (Rs*dt^2*hib*hom*sht)/(Ld*q1) - (Rs*dt^2*hib*hom*sht)/(Lq*q1) + (2*Lq^2*(cht^3 + 3*cht*q5)*dt^2*hib*(hom^2 + q3))/(Ld^2*q1) + (Ld^2*dt^2*hia*(hom^2 + q3)*(sht^3 + 3*sht*q4))/(Lq^2*q1) - (2*Lq*cht*dt^2*hib*(hom^2 + q3))/(Ld*q1) + (Rs*(cht^2 + q5)*dt^2*hom*psi)/(Lq^2*q2) - (Ld*dt^2*hia*(hom^2 + q3)*sht)/(Lq*q1) + (Lq*dt^2*hia*(hom^2 + q3)*sht)/(Ld*q1) - (Rs*dt^2*hib*hom*(sht^3 + 3*sht*q4))/(Lq*q1) + (Rs*dt^2*hib*hom*(sht^3 + 3*sht*q4))/(Lq*q2) + (Ld^2*dt^2*(hia^3 + 3*hia*q1)*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) + (Lq^2*dt^2*(hia^3 + 3*hia*q1)*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) - (cht*dt^2*(hom^2 + q3)*psi*sht)/(Ld*q2) - (2*Ld*cht*dt*hia*hom)/(Lq*q2) - (Ld*dt*hib*hom*sht)/(Lq*q2) + (Lq*dt*hib*hom*sht)/(Ld*q2) + (2*Rs^2*(cht^2 + q5)*dt^2*hia*sht)/(Ld^2*q1) + (Rs^2*cht*dt^2*hib*(sht^2 + q4))/(Ld^2*q1) + (Rs^2*cht*dt^2*hib*(sht^2 + q4))/(Lq^2*q1) - (Rs^2*(cht^2 + q5)*dt^2*hia*sht)/(Lq^2*q2) - (Rs*cht*dt^2*hia*hom*(sht^2 + q4))/(Ld*q1) + (3*Rs*(cht^2 + q5)*dt^2*hib*hom*sht)/(Ld*q1) + (Rs*cht*dt^2*hia*hom*(sht^2 + q4))/(Ld*q2) - (3*Rs*(cht^2 + q5)*dt^2*hib*hom*sht)/(Ld*q2) - (3*Rs*cht*dt^2*hia*hom*(sht^2 + q4))/(Lq*q1) + (3*Rs*cht*dt^2*hia*hom*(sht^2 + q4))/(Lq*q2) + (Ld*cht*dt^2*(hom^2 + q3)*psi*sht)/(Lq^2*q2) + (2*Ld^2*(cht^3 + 3*cht*q5)*dt^2*(hia^2 + q1)*hib*kpp^2)/(J^2*q3) + (2*Lq^2*(cht^3 + 3*cht*q5)*dt^2*(hia^2 + q1)*hib*kpp^2)/(J^2*q3) - (Ld^2*(cht^2 + q5)*dt^2*(hia^3 + 3*hia*q1)*kpp^2*sht)/(J^2*q3) + (2*Ld^2*cht*dt^2*(hib^3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4*Ld*Lq*cht*dt^2*(hib^3 + 3*hib*q2)*kpp^2*(sht^2 + q4))/(J^2*q3) + (2*Ld*Lq*dt^2*hia*(hib^2 + q2)*kpp^2*(sht^3 + 3*sht*q4))/(J^2*q3) + (Ld*Rs*cht*dt^2*hia*hom*(sht^2 + q4))/(Lq^2*q1) + (Lq*Rs*cht*dt^2*hia*hom*(sht^2 + q4))/(Ld^2*q1) - (3*Lq*Rs*(cht^2 + q5)*dt^2*hib*hom*sht)/(Ld^2*q1) - (Ld*Rs*cht*dt^2*hia*hom*(sht^2 + q4))/(Lq^2*q2) - (Lq*Rs*cht*dt^2*hia*hom*(sht^2 + q4))/(Ld^2*q2) + (3*Ld*Rs*(cht^2 + q5)*dt^2*hib*hom*sht)/(Lq^2*q2) - (4*Ld^2*cht*dt^2*(hia^2 + q1)*hib*kpp^2*(sht^2 + q4))/(J^2*q3) + (5*Ld^2*(cht^2 + q5)*dt^2*hia*(hib^2 + q2)*kpp^2*sht)/(J^2*q3) - (4*Lq^2*cht*dt^2*(hia^2 + q1)*hib*kpp^2*(sht^2 + q4))/(J^2*q3) + (5*Lq^2*(cht^2 + q5)*dt^2*hia*(hib^2 + q2)*kpp^2*sht)/(J^2*q3) + (3*Ld*(cht^2 + q5)*dt^2*hia*hib*kpp^2*psi)/(J^2*q3) - (3*Lq*(cht^2 + q5)*dt^2*hia*hib*kpp^2*psi)/(J^2*q3) - (Ld*cht*dt^2*(hia^2 + q1)*kpp^2*psi*sht)/(J^2*q3) + (3*Ld*cht*dt^2*(hib^2 + q2)*kpp^2*psi*sht)/(J^2*q3) + (Lq*cht*dt^2*(hia^2 + q1)*kpp^2*psi*sht)/(J^2*q3) - (3*Lq*cht*dt^2*(hib^2 + q2)*kpp^2*psi*sht)/(J^2*q3) - (Ld*dt^2*hia*hib*kpp^2*psi*(sht^2 + q4))/(J^2*q3) + (Lq*dt^2*hia*hib*kpp^2*psi*(sht^2 + q4))/(J^2*q3) - (4*Ld*Lq*(cht^3 + 3*cht*q5)*dt^2*(hia^2 + q1)*hib*kpp^2)/(J^2*q3) + (8*Ld*Lq*cht*dt^2*(hia^2 + q1)*hib*kpp^2*(sht^2 + q4))/(J^2*q3) - (10*Ld*Lq*(cht^2 + q5)*dt^2*hia*(hib^2 + q2)*kpp^2*sht)/(J^2*q3);
565
566        D11(3,1) = D11(1,3);
567        D11(3,2) = D11(2,3);
568        D11(3,3) = 1/q3 + ((cht^2 + q5)*dt^2)/q4 + (dt^2*(hib^2 + q2))/q1 + (dt^2*(hia^2 + q1))/q2 + (dt^2*(sht^2 + q4))/q5 + ((cht^2 + q5)*dt^2*psi^2)/(Lq^2*q2) + (dt^2*psi^2*(sht^2 + q4))/(Lq^2*q1) - (2*(cht^2 + q5)*dt^2*(hia^2 + q1)*(sht^2 + q4))/q1 + (2*(cht^2 + q5)*dt^2*(hib^2 + q2)*(sht^2 + q4))/q1 + (2*(cht^2 + q5)*dt^2*(hia^2 + q1)*(sht^2 + q4))/q2 - (2*(cht^2 + q5)*dt^2*(hib^2 + q2)*(sht^2 + q4))/q2 - (2*Lq*(cht^2 + q5)*dt^2*(hib^2 + q2))/(Ld*q1) - (2*Ld*(cht^2 + q5)*dt^2*(hia^2 + q1))/(Lq*q2) - (2*Ld*dt^2*(hib^2 + q2)*(sht^2 + q4))/(Lq*q1) - (2*Lq*dt^2*(hia^2 + q1)*(sht^2 + q4))/(Ld*q2) + (Lq^2*(cht^4 + 6*cht^2*q5 + 3*q5^2)*dt^2*(hib^2 + q2))/(Ld^2*q1) + (Ld^2*(cht^4 + 6*cht^2*q5 + 3*q5^2)*dt^2*(hia^2 + q1))/(Lq^2*q2) - (2*cht*dt^2*hia*psi)/(Lq*q2) + (Ld^2*dt^2*(hib^2 + q2)*(sht^4 + 6*sht^2*q4 + 3*q4^2))/(Lq^2*q1) + (Lq^2*dt^2*(hia^2 + q1)*(sht^4 + 6*sht^2*q4 + 3*q4^2))/(Ld^2*q2) - (2*dt^2*hib*psi*sht)/(Lq*q1) - (2*cht*dt^2*hia*hib*(sht^3 + 3*sht*q4))/q1 + (2*(cht^3 + 3*cht*q5)*dt^2*hia*hib*sht)/q1 + (2*cht*dt^2*hia*hib*(sht^3 + 3*sht*q4))/q2 - (2*(cht^3 + 3*cht*q5)*dt^2*hia*hib*sht)/q2 + (2*Ld*(cht^3 + 3*cht*q5)*dt^2*hia*psi)/(Lq^2*q2) + (2*Ld*dt^2*hib*psi*(sht^3 + 3*sht*q4))/(Lq^2*q1) + (Lq^2*(cht^2 + q5)*dt^2*(hia^2 + q1)*(sht^2 + q4))/(Ld^2*q1) + (Ld^2*(cht^2 + q5)*dt^2*(hia^2 + q1)*(sht^2 + q4))/(Lq^2*q1) + (Lq^2*(cht^2 + q5)*dt^2*(hib^2 + q2)*(sht^2 + q4))/(Ld^2*q2) + (Ld^2*(cht^2 + q5)*dt^2*(hib^2 + q2)*(sht^2 + q4))/(Lq^2*q2) - (2*cht*dt^2*hia*psi*(sht^2 + q4))/(Ld*q1) + (2*(cht^2 + q5)*dt^2*hib*psi*sht)/(Ld*q1) + (2*cht*dt^2*hia*psi*(sht^2 + q4))/(Ld*q2) - (2*(cht^2 + q5)*dt^2*hib*psi*sht)/(Ld*q2) - (2*Lq^2*(cht^3 + 3*cht*q5)*dt^2*hia*hib*sht)/(Ld^2*q1) + (2*Ld^2*cht*dt^2*hia*hib*(sht^3 + 3*sht*q4))/(Lq^2*q1) - (2*Lq^2*cht*dt^2*hia*hib*(sht^3 + 3*sht*q4))/(Ld^2*q2) + (2*Ld^2*(cht^3 + 3*cht*q5)*dt^2*hia*hib*sht)/(Lq^2*q2) - (2*Ld*cht*dt^2*hia*hib*sht)/(Lq*q1) + (2*Lq*cht*dt^2*hia*hib*sht)/(Ld*q1) - (2*Ld*cht*dt^2*hia*hib*sht)/(Lq*q2) + (2*Lq*cht*dt^2*hia*hib*sht)/(Ld*q2) + (2*Ld*cht*dt^2*hia*psi*(sht^2 + q4))/(Lq^2*q1) + (2*Ld*(cht^2 + q5)*dt^2*hib*psi*sht)/(Lq^2*q2);
569        D11(3,4) = (cht*dt)/q4 + (dt^2*hom*sht)/q5 + (Rs*cht*dt^2*(hib^2 + q2))/(Ld*q1) - (Rs*cht*dt^2*(hia^2 + q1))/(Ld*q2) - (Rs*cht*dt^2*(hib^2 + q2))/(Lq*q1) + (Rs*cht*dt^2*(hia^2 + q1))/(Lq*q2) + (dt^2*hom*psi^2*sht)/(Lq^2*q1) - (2*(cht^2 + q5)*dt^2*(hia^2 + q1)*hom*sht)/q1 + (2*(cht^2 + q5)*dt^2*(hib^2 + q2)*hom*sht)/q1 + (2*(cht^2 + q5)*dt^2*(hia^2 + q1)*hom*sht)/q2 - (2*(cht^2 + q5)*dt^2*(hib^2 + q2)*hom*sht)/q2 + (Rs*(cht^3 + 3*cht*q5)*dt^2*(hib^2 + q2))/(Ld*q1) + (Rs*(cht^3 + 3*cht*q5)*dt^2*(hia^2 + q1))/(Lq*q2) - (dt*hia*kpp*psi)/(J*q3) - (dt^2*hib*hom*psi)/(Lq*q1) + ((cht^3 + 3*cht*q5)*dt^2*hia*hib*hom)/q1 - ((cht^3 + 3*cht*q5)*dt^2*hia*hib*hom)/q2 - (Ld*cht*dt*(hia^2 + q1)*kpp)/(J*q3) + (Ld*cht*dt*(hib^2 + q2)*kpp)/(J*q3) + (Lq*cht*dt*(hia^2 + q1)*kpp)/(J*q3) - (Lq*cht*dt*(hib^2 + q2)*kpp)/(J*q3) - (2*Rs*dt^2*hia*hib*sht)/(Ld*q2) + (2*Rs*dt^2*hia*hib*sht)/(Lq*q1) + (2*Ld^2*dt^2*(hib^2 + q2)*hom*(sht^3 + 3*sht*q4))/(Lq^2*q1) + (2*Lq^2*dt^2*(hia^2 + q1)*hom*(sht^3 + 3*sht*q4))/(Ld^2*q2) - (3*cht*dt^2*hia*hib*hom*(sht^2 + q4))/q1 + (3*cht*dt^2*hia*hib*hom*(sht^2 + q4))/q2 - (Rs*(cht^2 + q5)*dt^2*hia*psi)/(Lq^2*q2) - (2*Ld*dt^2*(hib^2 + q2)*hom*sht)/(Lq*q1) - (2*Lq*dt^2*(hia^2 + q1)*hom*sht)/(Ld*q2) - (2*Rs*dt^2*hia*psi*(sht^2 + q4))/(Lq^2*q1) + ((cht^2 + q5)*dt^2*hib*hom*psi)/(Ld*q1) - ((cht^2 + q5)*dt^2*hib*hom*psi)/(Ld*q2) - (Lq*Rs*(cht^3 + 3*cht*q5)*dt^2*(hib^2 + q2))/(Ld^2*q1) - (Ld*Rs*(cht^3 + 3*cht*q5)*dt^2*(hia^2 + q1))/(Lq^2*q2) + (2*Rs*cht*dt^2*(hia^2 + q1)*(sht^2 + q4))/(Ld*q1) - (Rs*cht*dt^2*(hia^2 + q1)*(sht^2 + q4))/(Ld*q2) - (Rs*cht*dt^2*(hib^2 + q2)*(sht^2 + q4))/(Lq*q1) + (2*Rs*cht*dt^2*(hib^2 + q2)*(sht^2 + q4))/(Lq*q2) + (3*Ld*dt^2*hib*hom*psi*(sht^2 + q4))/(Lq^2*q1) + (Rs*(cht^2 + q5)*dt^2*hia*psi)/(Ld*Lq*q2) - (2*Ld*dt*hia*hib*kpp*sht)/(J*q3) + (2*Lq*dt*hia*hib*kpp*sht)/(J*q3) - (2*Ld*Rs*cht*dt^2*(hia^2 + q1)*(sht^2 + q4))/(Lq^2*q1) + (Ld*Rs*cht*dt^2*(hib^2 + q2)*(sht^2 + q4))/(Lq^2*q1) + (Lq*Rs*cht*dt^2*(hia^2 + q1)*(sht^2 + q4))/(Ld^2*q2) - (2*Lq*Rs*cht*dt^2*(hib^2 + q2)*(sht^2 + q4))/(Ld^2*q2) - (Lq^2*(cht^3 + 3*cht*q5)*dt^2*hia*hib*hom)/(Ld^2*q1) + (Ld^2*(cht^3 + 3*cht*q5)*dt^2*hia*hib*hom)/(Lq^2*q2) - (Ld*cht*dt^2*hia*hib*hom)/(Lq*q1) + (Lq*cht*dt^2*hia*hib*hom)/(Ld*q1) - (Ld*cht*dt^2*hia*hib*hom)/(Lq*q2) + (Lq*cht*dt^2*hia*hib*hom)/(Ld*q2) + (Rs*cht*dt^2*hib*psi*sht)/(Lq^2*q1) + (Lq^2*(cht^2 + q5)*dt^2*(hia^2 + q1)*hom*sht)/(Ld^2*q1) + (Ld^2*(cht^2 + q5)*dt^2*(hia^2 + q1)*hom*sht)/(Lq^2*q1) + (Lq^2*(cht^2 + q5)*dt^2*(hib^2 + q2)*hom*sht)/(Ld^2*q2) + (Ld^2*(cht^2 + q5)*dt^2*(hib^2 + q2)*hom*sht)/(Lq^2*q2) - (2*cht*dt^2*hia*hom*psi*sht)/(Ld*q1) + (2*cht*dt^2*hia*hom*psi*sht)/(Ld*q2) - (2*Ld*Rs*dt^2*hia*hib*(sht^3 + 3*sht*q4))/(Lq^2*q1) + (2*Lq*Rs*dt^2*hia*hib*(sht^3 + 3*sht*q4))/(Ld^2*q2) + (Ld*(cht^2 + q5)*dt^2*hib*hom*psi)/(Lq^2*q2) - (3*Rs*(cht^2 + q5)*dt^2*hia*hib*sht)/(Ld*q1) + (Rs*(cht^2 + q5)*dt^2*hia*hib*sht)/(Ld*q2) - (Rs*(cht^2 + q5)*dt^2*hia*hib*sht)/(Lq*q1) + (3*Rs*(cht^2 + q5)*dt^2*hia*hib*sht)/(Lq*q2) + (2*Ld*cht*dt^2*hia*hom*psi*sht)/(Lq^2*q1) + (Ld*Rs*(cht^2 + q5)*dt^2*hia*hib*sht)/(Lq^2*q1) + (Lq*Rs*(cht^2 + q5)*dt^2*hia*hib*sht)/(Ld^2*q1) - (Ld*Rs*(cht^2 + q5)*dt^2*hia*hib*sht)/(Lq^2*q2) - (Lq*Rs*(cht^2 + q5)*dt^2*hia*hib*sht)/(Ld^2*q2) - (Rs*cht*dt^2*hib*psi*sht)/(Ld*Lq*q1) + (2*Rs*cht*dt^2*hib*psi*sht)/(Ld*Lq*q2) + (3*Ld^2*cht*dt^2*hia*hib*hom*(sht^2 + q4))/(Lq^2*q1) - (3*Lq^2*cht*dt^2*hia*hib*hom*(sht^2 + q4))/(Ld^2*q2);
570        D11(3,5) = (cht*dt^2*hom)/q4 - (dt*sht)/q5 - (dt^2*hia*hib*hom*(sht^3 + 3*sht*q4))/q1 + (dt^2*hia*hib*hom*(sht^3 + 3*sht*q4))/q2 + (Rs*dt^2*(hib^2 + q2)*sht)/(Ld*q1) - (Rs*dt^2*(hia^2 + q1)*sht)/(Ld*q2) - (Rs*dt^2*(hib^2 + q2)*sht)/(Lq*q1) + (Rs*dt^2*(hia^2 + q1)*sht)/(Lq*q2) + (cht*dt^2*hom*psi^2)/(Lq^2*q2) - (2*cht*dt^2*(hia^2 + q1)*hom*(sht^2 + q4))/q1 + (2*cht*dt^2*(hib^2 + q2)*hom*(sht^2 + q4))/q1 + (2*cht*dt^2*(hia^2 + q1)*hom*(sht^2 + q4))/q2 - (2*cht*dt^2*(hib^2 + q2)*hom*(sht^2 + q4))/q2 + (dt*hib*kpp*psi)/(J*q3) - (Rs*dt^2*(hia^2 + q1)*(sht^3 + 3*sht*q4))/(Ld*q2) - (Rs*dt^2*(hib^2 + q2)*(sht^3 + 3*sht*q4))/(Lq*q1) - (dt^2*hia*hom*psi)/(Lq*q2) + (2*Rs*cht*dt^2*hia*hib)/(Ld*q1) - (2*Rs*cht*dt^2*hia*hib)/(Lq*q2) - (Ld*dt*(hia^2 + q1)*kpp*sht)/(J*q3) + (Ld*dt*(hib^2 + q2)*kpp*sht)/(J*q3) + (Lq*dt*(hia^2 + q1)*kpp*sht)/(J*q3) - (Lq*dt*(hib^2 + q2)*kpp*sht)/(J*q3) + (2*Lq^2*(cht^3 + 3*cht*q5)*dt^2*(hib^2 + q2)*hom)/(Ld^2*q1) + (2*Ld^2*(cht^3 + 3*cht*q5)*dt^2*(hia^2 + q1)*hom)/(Lq^2*q2) + (3*(cht^2 + q5)*dt^2*hia*hib*hom*sht)/q1 - (3*(cht^2 + q5)*dt^2*hia*hib*hom*sht)/q2 - (2*Lq*cht*dt^2*(hib^2 + q2)*hom)/(Ld*q1) - (2*Ld*cht*dt^2*(hia^2 + q1)*hom)/(Lq*q2) + (2*Rs*(cht^2 + q5)*dt^2*hib*psi)/(Lq^2*q2) + (Rs*dt^2*hib*psi*(sht^2 + q4))/(Lq^2*q1) - (dt^2*hia*hom*psi*(sht^2 + q4))/(Ld*q1) + (dt^2*hia*hom*psi*(sht^2 + q4))/(Ld*q2) + (Ld*Rs*dt^2*(hib^2 + q2)*(sht^3 + 3*sht*q4))/(Lq^2*q1) + (Lq*Rs*dt^2*(hia^2 + q1)*(sht^3 + 3*sht*q4))/(Ld^2*q2) + (Rs*(cht^2 + q5)*dt^2*(hib^2 + q2)*sht)/(Ld*q1) - (2*Rs*(cht^2 + q5)*dt^2*(hib^2 + q2)*sht)/(Ld*q2) - (2*Rs*(cht^2 + q5)*dt^2*(hia^2 + q1)*sht)/(Lq*q1) + (Rs*(cht^2 + q5)*dt^2*(hia^2 + q1)*sht)/(Lq*q2) + (Ld*dt^2*hia*hom*psi*(sht^2 + q4))/(Lq^2*q1) + (2*Ld*cht*dt*hia*hib*kpp)/(J*q3) - (2*Lq*cht*dt*hia*hib*kpp)/(J*q3) + (2*Lq*Rs*(cht^2 + q5)*dt^2*(hia^2 + q1)*sht)/(Ld^2*q1) - (Lq*Rs*(cht^2 + q5)*dt^2*(hib^2 + q2)*sht)/(Ld^2*q1) - (Ld*Rs*(cht^2 + q5)*dt^2*(hia^2 + q1)*sht)/(Lq^2*q2) + (2*Ld*Rs*(cht^2 + q5)*dt^2*(hib^2 + q2)*sht)/(Lq^2*q2) - (Rs*dt^2*hib*psi*(sht^2 + q4))/(Ld*Lq*q1) + (Ld^2*dt^2*hia*hib*hom*(sht^3 + 3*sht*q4))/(Lq^2*q1) - (Lq^2*dt^2*hia*hib*hom*(sht^3 + 3*sht*q4))/(Ld^2*q2) - (Ld*dt^2*hia*hib*hom*sht)/(Lq*q1) + (Lq*dt^2*hia*hib*hom*sht)/(Ld*q1) - (Ld*dt^2*hia*hib*hom*sht)/(Lq*q2) + (Lq*dt^2*hia*hib*hom*sht)/(Ld*q2) - (Rs*cht*dt^2*hia*psi*sht)/(Lq^2*q2) + (Lq^2*cht*dt^2*(hia^2 + q1)*hom*(sht^2 + q4))/(Ld^2*q1) + (Ld^2*cht*dt^2*(hia^2 + q1)*hom*(sht^2 + q4))/(Lq^2*q1) + (Lq^2*cht*dt^2*(hib^2 + q2)*hom*(sht^2 + q4))/(Ld^2*q2) + (Ld^2*cht*dt^2*(hib^2 + q2)*hom*(sht^2 + q4))/(Lq^2*q2) + (2*cht*dt^2*hib*hom*psi*sht)/(Ld*q1) - (2*cht*dt^2*hib*hom*psi*sht)/(Ld*q2) - (2*Lq*Rs*(cht^3 + 3*cht*q5)*dt^2*hia*hib)/(Ld^2*q1) + (2*Ld*Rs*(cht^3 + 3*cht*q5)*dt^2*hia*hib)/(Lq^2*q2) + (3*Ld*(cht^2 + q5)*dt^2*hia*hom*psi)/(Lq^2*q2) - (Rs*cht*dt^2*hia*hib*(sht^2 + q4))/(Ld*q1) + (3*Rs*cht*dt^2*hia*hib*(sht^2 + q4))/(Ld*q2) - (3*Rs*cht*dt^2*hia*hib*(sht^2 + q4))/(Lq*q1) + (Rs*cht*dt^2*hia*hib*(sht^2 + q4))/(Lq*q2) + (2*Ld*cht*dt^2*hib*hom*psi*sht)/(Lq^2*q2) + (Ld*Rs*cht*dt^2*hia*hib*(sht^2 + q4))/(Lq^2*q1) + (Lq*Rs*cht*dt^2*hia*hib*(sht^2 + q4))/(Ld^2*q1) - (Ld*Rs*cht*dt^2*hia*hib*(sht^2 + q4))/(Lq^2*q2) - (Lq*Rs*cht*dt^2*hia*hib*(sht^2 + q4))/(Ld^2*q2) - (2*Rs*cht*dt^2*hia*psi*sht)/(Ld*Lq*q1) + (Rs*cht*dt^2*hia*psi*sht)/(Ld*Lq*q2) - (3*Lq^2*(cht^2 + q5)*dt^2*hia*hib*hom*sht)/(Ld^2*q1) + (3*Ld^2*(cht^2 + q5)*dt^2*hia*hib*hom*sht)/(Lq^2*q2);
571
572        D11(4,1) = D11(1,4);
573        D11(4,2) = D11(2,4);
574        D11(4,3) = D11(3,4);
575        D11(4,4) = 1/q4 + (dt^2*(hom^2 + q3))/q5 + (dt^2*(hom^2 + q3)*psi^2)/(Lq^2*q1) - (2*(cht^2 + q5)*dt^2*(hia^2 + q1)*(hom^2 + q3))/q1 - (2*(cht^2 + q5)*dt^2*(hib^2 + q2)*(hom^2 + q3))/q2 + (dt^2*(hia^2 + q1)*kpp^2*psi^2)/(J^2*q3) + (Rs^2*(cht^2 + q5)*dt^2*(hib^2 + q2))/(Ld^2*q1) + (Rs^2*(cht^2 + q5)*dt^2*(hia^2 + q1))/(Ld^2*q2) + (Rs^2*(cht^2 + q5)*dt^2*(hib^2 + q2))/(Lq^2*q1) + (Rs^2*(cht^2 + q5)*dt^2*(hia^2 + q1))/(Lq^2*q2) + (4*Rs^2*dt^2*(hib^2 + q2)*(sht^2 + q4))/(Ld^2*q2) + (4*Rs^2*dt^2*(hia^2 + q1)*(sht^2 + q4))/(Lq^2*q1) - (4*cht*dt^2*hia*hib*(hom^2 + q3)*sht)/q1 + (4*cht*dt^2*hia*hib*(hom^2 + q3)*sht)/q2 - (2*Rs^2*(cht^2 + q5)*dt^2*(hib^2 + q2))/(Ld*Lq*q1) - (2*Rs^2*(cht^2 + q5)*dt^2*(hia^2 + q1))/(Ld*Lq*q2) + (Ld^2*(cht^2 + q5)*dt^2*(hia^4 + 6*hia^2*q1 + 3*q1^2)*kpp^2)/(J^2*q3) + (Ld^2*(cht^2 + q5)*dt^2*(hib^4 + 6*hib^2*q2 + 3*q2^2)*kpp^2)/(J^2*q3) + (Lq^2*(cht^2 + q5)*dt^2*(hia^4 + 6*hia^2*q1 + 3*q1^2)*kpp^2)/(J^2*q3) + (Lq^2*(cht^2 + q5)*dt^2*(hib^4 + 6*hib^2*q2 + 3*q2^2)*kpp^2)/(J^2*q3) + (Lq^2*(cht^2 + q5)*dt^2*(hia^2 + q1)*(hom^2 + q3))/(Ld^2*q1) + (Ld^2*(cht^2 + q5)*dt^2*(hia^2 + q1)*(hom^2 + q3))/(Lq^2*q1) + (Lq^2*(cht^2 + q5)*dt^2*(hib^2 + q2)*(hom^2 + q3))/(Ld^2*q2) + (Ld^2*(cht^2 + q5)*dt^2*(hib^2 + q2)*(hom^2 + q3))/(Lq^2*q2) - (2*cht*dt^2*hia*(hom^2 + q3)*psi)/(Ld*q1) + (4*Ld^2*dt^2*(hib^2 + q2)*(hom^2 + q3)*(sht^2 + q4))/(Lq^2*q1) + (4*Lq^2*dt^2*(hia^2 + q1)*(hom^2 + q3)*(sht^2 + q4))/(Ld^2*q2) + (4*Rs*cht*dt^2*(hia^2 + q1)*hom*sht)/(Ld*q1) - (4*Rs*cht*dt^2*(hia^2 + q1)*hom*sht)/(Ld*q2) - (4*Rs*cht*dt^2*(hib^2 + q2)*hom*sht)/(Lq*q1) + (4*Rs*cht*dt^2*(hib^2 + q2)*hom*sht)/(Lq*q2) + (4*Ld*dt^2*hib*(hom^2 + q3)*psi*sht)/(Lq^2*q1) + (2*Ld*cht*dt^2*(hia^3 + 3*hia*q1)*kpp^2*psi)/(J^2*q3) - (2*Lq*cht*dt^2*(hia^3 + 3*hia*q1)*kpp^2*psi)/(J^2*q3) - (2*Ld^2*(cht^2 + q5)*dt^2*(hia^2 + q1)*(hib^2 + q2)*kpp^2)/(J^2*q3) - (2*Lq^2*(cht^2 + q5)*dt^2*(hia^2 + q1)*(hib^2 + q2)*kpp^2)/(J^2*q3) + (4*Ld^2*dt^2*(hia^2 + q1)*(hib^2 + q2)*kpp^2*(sht^2 + q4))/(J^2*q3) + (4*Lq^2*dt^2*(hia^2 + q1)*(hib^2 + q2)*kpp^2*(sht^2 + q4))/(J^2*q3) - (2*Ld*Lq*(cht^2 + q5)*dt^2*(hia^4 + 6*hia^2*q1 + 3*q1^2)*kpp^2)/(J^2*q3) - (2*Ld*Lq*(cht^2 + q5)*dt^2*(hib^4 + 6*hib^2*q2 + 3*q2^2)*kpp^2)/(J^2*q3) + (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hib*hom*(sht^2 + q4))/(Lq^2*q1) + (8*Lq*Rs*dt^2*hia*hib*hom*(sht^2 + q4))/(Ld^2*q2) + (4*Ld*Lq*(cht^2 + q5)*dt^2*(hia^2 + q1)*(hib^2 + q2)*kpp^2)/(J^2*q3) - (8*Ld*Lq*dt^2*(hia^2 + q1)*(hib^2 + q2)*kpp^2*(sht^2 + q4))/(J^2*q3) + (4*Rs^2*cht*dt^2*hia*hib*sht)/(Ld*Lq*q1) - (4*Rs^2*cht*dt^2*hia*hib*sht)/(Ld*Lq*q2) - (2*Ld*cht*dt^2*hia*(hib^2 + q2)*kpp^2*psi)/(J^2*q3) + (2*Lq*cht*dt^2*hia*(hib^2 + q2)*kpp^2*psi)/(J^2*q3) + (4*Ld^2*cht*dt^2*hia*hib*(hom^2 + q3)*sht)/(Lq^2*q1) - (4*Lq^2*cht*dt^2*hia*hib*(hom^2 + q3)*sht)/(Ld^2*q2) + (4*Ld*dt^2*(hia^2 + q1)*hib*kpp^2*psi*sht)/(J^2*q3) - (4*Lq*dt^2*(hia^2 + q1)*hib*kpp^2*psi*sht)/(J^2*q3) + (8*Ld*Lq*cht*dt^2*hia*(hib^3 + 3*hib*q2)*kpp^2*sht)/(J^2*q3) - (8*Ld*Lq*cht*dt^2*(hia^3 + 3*hia*q1)*hib*kpp^2*sht)/(J^2*q3);
576        D11(4,5) = (dt*hom)/q4 - (dt*hom)/q5 + (2*(cht^2 + q5)*dt^2*hia*hib*(hom^2 + q3))/q1 - (2*(cht^2 + q5)*dt^2*hia*hib*(hom^2 + q3))/q2 - (2*cht*dt^2*(hia^2 + q1)*(hom^2 + q3)*sht)/q1 + (4*cht*dt^2*(hib^2 + q2)*(hom^2 + q3)*sht)/q1 + (4*cht*dt^2*(hia^2 + q1)*(hom^2 + q3)*sht)/q2 - (2*cht*dt^2*(hib^2 + q2)*(hom^2 + q3)*sht)/q2 - (2*dt^2*hia*hib*(hom^2 + q3)*(sht^2 + q4))/q1 + (2*dt^2*hia*hib*(hom^2 + q3)*(sht^2 + q4))/q2 - (dt^2*hia*hib*kpp^2*psi^2)/(J^2*q3) + (2*cht*dt^2*hib*(hom^2 + q3)*psi)/(Ld*q1) - (cht*dt^2*hib*(hom^2 + q3)*psi)/(Ld*q2) - (dt^2*hia*(hom^2 + q3)*psi*sht)/(Ld*q1) + (2*dt^2*hia*(hom^2 + q3)*psi*sht)/(Ld*q2) + (2*Rs^2*(cht^2 + q5)*dt^2*hia*hib)/(Ld^2*q1) - (2*Rs^2*(cht^2 + q5)*dt^2*hia*hib)/(Lq^2*q2) + (2*Rs*(cht^2 + q5)*dt^2*(hib^2 + q2)*hom)/(Ld*q1) - (2*Rs*(cht^2 + q5)*dt^2*(hib^2 + q2)*hom)/(Ld*q2) - (2*Rs*(cht^2 + q5)*dt^2*(hia^2 + q1)*hom)/(Lq*q1) + (2*Rs*(cht^2 + q5)*dt^2*(hia^2 + q1)*hom)/(Lq*q2) + (Rs^2*cht*dt^2*(hib^2 + q2)*sht)/(Ld^2*q1) + (Rs^2*cht*dt^2*(hia^2 + q1)*sht)/(Ld^2*q2) + (Rs^2*cht*dt^2*(hib^2 + q2)*sht)/(Lq^2*q1) + (Rs^2*cht*dt^2*(hia^2 + q1)*sht)/(Lq^2*q2) + (2*Rs^2*dt^2*hia*hib*(sht^2 + q4))/(Ld^2*q2) - (2*Rs^2*dt^2*hia*hib*(sht^2 + q4))/(Lq^2*q1) + (2*Rs*dt^2*(hia^2 + q1)*hom*(sht^2 + q4))/(Ld*q1) - (2*Rs*dt^2*(hia^2 + q1)*hom*(sht^2 + q4))/(Ld*q2) - (2*Rs*dt^2*(hib^2 + q2)*hom*(sht^2 + q4))/(Lq*q1) + (2*Rs*dt^2*(hib^2 + q2)*hom*(sht^2 + q4))/(Lq*q2) + (Ld*dt^2*hia*(hom^2 + q3)*psi*sht)/(Lq^2*q1) + (2*Ld^2*(cht^2 + q5)*dt^2*hia*(hib^3 + 3*hib*q2)*kpp^2)/(J^2*q3) - (2*Ld^2*(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(sht^2 + q4))/(Lq^2*q1) - (2*Lq^2*dt^2*hia*hib*(hom^2 + q3)*(sht^2 + q4))/(Ld^2*q2) + (Ld*cht*dt^2*hib*(hom^2 + q3)*psi)/(Lq^2*q2) + (4*Ld*Lq*dt^2*hia*(hib^3 + 3*hib*q2)*kpp^2*(sht^2 + q4))/(J^2*q3) - (4*Ld*Lq*dt^2*(hia^3 + 3*hia*q1)*hib*kpp^2*(sht^2 + q4))/(J^2*q3) - (6*Rs*cht*dt^2*hia*hib*hom*sht)/(Ld*q1) + (6*Rs*cht*dt^2*hia*hib*hom*sht)/(Ld*q2) - (6*Rs*cht*dt^2*hia*hib*hom*sht)/(Lq*q1) + (6*Rs*cht*dt^2*hia*hib*hom*sht)/(Lq*q2) - (2*Rs*cht*dt^2*hia*hom*psi)/(Ld*Lq*q1) + (Rs*cht*dt^2*hia*hom*psi)/(Ld*Lq*q2) - (Rs*dt^2*hib*hom*psi*sht)/(Ld*Lq*q1) + (2*Rs*dt^2*hib*hom*psi*sht)/(Ld*Lq*q2) - (6*Ld^2*cht*dt^2*(hia^2 + q1)*(hib^2 + q2)*kpp^2*sht)/(J^2*q3) - (6*Lq^2*cht*dt^2*(hia^2 + q1)*(hib^2 + q2)*kpp^2*sht)/(J^2*q3) - (2*Ld*Lq*cht*dt^2*(hia^4 + 6*hia^2*q1 + 3*q1^2)*kpp^2*sht)/(J^2*q3) - (2*Ld*Lq*cht*dt^2*(hib^4 + 6*hib^2*q2 + 3*q2^2)*kpp^2*sht)/(J^2*q3) - (3*Ld*cht*dt^2*(hia^2 + q1)*hib*kpp^2*psi)/(J^2*q3) + (3*Lq*cht*dt^2*(hia^2 + q1)*hib*kpp^2*psi)/(J^2*q3) - (3*Ld*dt^2*hia*(hib^2 + q2)*kpp^2*psi*sht)/(J^2*q3) + (3*Lq*dt^2*hia*(hib^2 + q2)*kpp^2*psi*sht)/(J^2*q3) - (4*Ld*Lq*(cht^2 + q5)*dt^2*hia*(hib^3 + 3*hib*q2)*kpp^2)/(J^2*q3) + (4*Ld*Lq*(cht^2 + q5)*dt^2*(hia^3 + 3*hia*q1)*hib*kpp^2)/(J^2*q3) + (2*Ld*Rs*cht*dt^2*hia*hib*hom*sht)/(Lq^2*q1) + (2*Lq*Rs*cht*dt^2*hia*hib*hom*sht)/(Ld^2*q1) - (2*Ld*Rs*cht*dt^2*hia*hib*hom*sht)/(Lq^2*q2) - (2*Lq*Rs*cht*dt^2*hia*hib*hom*sht)/(Ld^2*q2) + (12*Ld*Lq*cht*dt^2*(hia^2 + q1)*(hib^2 + q2)*kpp^2*sht)/(J^2*q3);
577
578        D11(5,1) = D11(1,5);
579        D11(5,2) = D11(2,5);
580        D11(5,3) = D11(3,5);
581        D11(5,4) = D11(4,5);
582        D11(5,5) = 1/q5 + (dt^2*(hom^2 + q3))/q4 + (dt^2*(hom^2 + q3)*psi^2)/(Lq^2*q2) - (2*dt^2*(hia^2 + q1)*(hom^2 + q3)*(sht^2 + q4))/q1 - (2*dt^2*(hib^2 + q2)*(hom^2 + q3)*(sht^2 + q4))/q2 + (dt^2*(hib^2 + q2)*kpp^2*psi^2)/(J^2*q3) + (4*Rs^2*(cht^2 + q5)*dt^2*(hia^2 + q1))/(Ld^2*q1) + (4*Rs^2*(cht^2 + q5)*dt^2*(hib^2 + q2))/(Lq^2*q2) + (Rs^2*dt^2*(hib^2 + q2)*(sht^2 + q4))/(Ld^2*q1) + (Rs^2*dt^2*(hia^2 + q1)*(sht^2 + q4))/(Ld^2*q2) + (Rs^2*dt^2*(hib^2 + q2)*(sht^2 + q4))/(Lq^2*q1) + (Rs^2*dt^2*(hia^2 + q1)*(sht^2 + q4))/(Lq^2*q2) + (4*cht*dt^2*hia*hib*(hom^2 + q3)*sht)/q1 - (4*cht*dt^2*hia*hib*(hom^2 + q3)*sht)/q2 - (2*Rs^2*dt^2*(hib^2 + q2)*(sht^2 + q4))/(Ld*Lq*q1) - (2*Rs^2*dt^2*(hia^2 + q1)*(sht^2 + q4))/(Ld*Lq*q2) + (4*Lq^2*(cht^2 + q5)*dt^2*(hib^2 + q2)*(hom^2 + q3))/(Ld^2*q1) + (4*Ld^2*(cht^2 + q5)*dt^2*(hia^2 + q1)*(hom^2 + q3))/(Lq^2*q2) + (Ld^2*dt^2*(hia^4 + 6*hia^2*q1 + 3*q1^2)*kpp^2*(sht^2 + q4))/(J^2*q3) + (Ld^2*dt^2*(hib^4 + 6*hib^2*q2 + 3*q2^2)*kpp^2*(sht^2 + q4))/(J^2*q3) + (Lq^2*dt^2*(hia^4 + 6*hia^2*q1 + 3*q1^2)*kpp^2*(sht^2 + q4))/(J^2*q3) + (Lq^2*dt^2*(hib^4 + 6*hib^2*q2 + 3*q2^2)*kpp^2*(sht^2 + q4))/(J^2*q3) + (Lq^2*dt^2*(hia^2 + q1)*(hom^2 + q3)*(sht^2 + q4))/(Ld^2*q1) + (Ld^2*dt^2*(hia^2 + q1)*(hom^2 + q3)*(sht^2 + q4))/(Lq^2*q1) + (Lq^2*dt^2*(hib^2 + q2)*(hom^2 + q3)*(sht^2 + q4))/(Ld^2*q2) + (Ld^2*dt^2*(hib^2 + q2)*(hom^2 + q3)*(sht^2 + q4))/(Lq^2*q2) - (2*dt^2*hib*(hom^2 + q3)*psi*sht)/(Ld*q2) + (4*Rs*cht*dt^2*(hib^2 + q2)*hom*sht)/(Ld*q1) - (4*Rs*cht*dt^2*(hib^2 + q2)*hom*sht)/(Ld*q2) - (4*Rs*cht*dt^2*(hia^2 + q1)*hom*sht)/(Lq*q1) + (4*Rs*cht*dt^2*(hia^2 + q1)*hom*sht)/(Lq*q2) - (2*Rs*dt^2*hia*hib*hom*(sht^2 + q4))/(Ld*q1) + (2*Rs*dt^2*hia*hib*hom*(sht^2 + q4))/(Ld*q2) - (2*Rs*dt^2*hia*hib*hom*(sht^2 + q4))/(Lq*q1) + (2*Rs*dt^2*hia*hib*hom*(sht^2 + q4))/(Lq*q2) + (2*Ld*dt^2*hib*(hom^2 + q3)*psi*sht)/(Lq^2*q2) + (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ia^2 + q1)*hom*sht)/(Ld^2*q1) - (4*Lq*Rs*cht*dt^2*(hib^2 + q2)*hom*sht)/(Ld^2*q1) - (4*Ld*Rs*cht*dt^2*(hia^2 + q1)*hom*sht)/(Lq^2*q2) + (4*Ld*Rs*cht*dt^2*(hib^2 + q2)*hom*sht)/(Lq^2*q2) + (2*Ld*Rs*dt^2*hia*hib*hom*(sht^2 + q4))/(Lq^2*q1) + (2*Lq*Rs*dt^2*hia*hib*hom*(sht^2 + q4))/(Ld^2*q1) - (2*Ld*Rs*dt^2*hia*hib*hom*(sht^2 + q4))/(Lq^2*q2) - (2*Lq*Rs*dt^2*hia*hib*hom*(sht^2 + q4))/(Ld^2*q2) - (8*Ld*Lq*(cht^2 + q5)*dt^2*(hia^2 + q1)*(hib^2 + q2)*kpp^2)/(J^2*q3) + (2*Rs*dt^2*hia*hom*psi*sht)/(Ld*Lq*q2) + (4*Ld*Lq*dt^2*(hia^2 + q1)*(hib^2 + q2)*kpp^2*(sht^2 + q4))/(J^2*q3) - (4*Rs^2*cht*dt^2*hia*hib*sht)/(Ld*Lq*q1) + (4*Rs^2*cht*dt^2*hia*hib*sht)/(Ld*Lq*q2) + (4*Ld*cht*dt^2*hia*(hib^2 + q2)*kpp^2*psi)/(J^2*q3) - (4*Lq*cht*dt^2*hia*(hib^2 + q2)*kpp^2*psi)/(J^2*q3) - (4*Lq^2*cht*dt^2*hia*hib*(hom^2 + q3)*sht)/(Ld^2*q1) + (4*Ld^2*cht*dt^2*hia*hib*(hom^2 + q3)*sht)/(Lq^2*q2) - (2*Ld*dt^2*(hia^2 + q1)*hib*kpp^2*psi*sht)/(J^2*q3) + (2*Lq*dt^2*(hia^2 + q1)*hib*kpp^2*psi*sht)/(J^2*q3) - (8*Ld*Lq*cht*dt^2*hia*(hib^3 + 3*hib*q2)*kpp^2*sht)/(J^2*q3) + (8*Ld*Lq*cht*dt^2*(hia^3 + 3*hia*q1)*hib*kpp^2*sht)/(J^2*q3);
583       
584        D12 = -A92'*iQ5;
585        D21 = D12';
586        D22 = iQ5 + C5'*iR*C5;
587
588        Jj12 = D22 - D21/(Jj12 + D11)*D12;
589        iJn12(:,:,t) = inv(Jj12);
590    end
591   
592    %control & simulation
593    if(control == 1) %ome = ref_ome, the = integral(ome), ial=ibe=0
594        x_sys(1, t+1) = 0;
595        x_sys(2, t+1) = 0;
596        x_sys(3, t+1) = ref_ome(t);
597        x_sys(4, t+1) = the + dt*ome;
598    else
599        if(control == 6) %rnd. err. ref_ome
600           ref_ome(t) = ref_ome(t) + amp*randn();
601        end
602       
603        %PI (only PI for control == 2)       
604        sum_iq = sum_iq + ref_ome(t) - ome;
605        ref_iq = kon_pi*(ref_ome(t) - ome) + kon_ii*sum_iq;
606        sum_ud = sum_ud - id;
607        u_dq(1, t) = kon_pu*(-id) + kon_iu*sum_ud;
608        sum_uq = sum_uq + ref_iq - iq;
609        u_dq(2, t) = kon_pu*(ref_iq - iq) + kon_iu*sum_uq;
610        u_dq(1, t) = u_dq(1, t) - Ls*ome*ref_iq;
611        u_dq(2, t) = u_dq(2, t) + psipm*ome;       
612               
613        if(control == 3) %inj. sin -> dq
614            u_dq(1,t) = u_dq(1,t) + amp*sin(injom*dt*t);
615            u_dq(2,t) = u_dq(2,t) + amp*cos(injom*dt*t);
616        elseif(control == 4) %inj. rect. -> dq
617            u_dq(1,t) = u_dq(1,t) + amp*sign(sin(injom*dt*t));
618            u_dq(2,t) = u_dq(2,t) + amp*sign(cos(injom*dt*t));
619        elseif(control == 5) %inj. const. -> d
620%             u_dq(1,t) = 0.1*Ld/dt - (1.0*Ld/dt - Rs)*id - Lq*ome*iq;
621            u_dq(1,t) = amp;           
622        elseif(control == 9) %bic. sign. ome           
623            u_dq(1,t) = u_dq(1,t) - amp*sign(ome);
624            u_dq(2,t) = u_dq(2,t) + amp*sign(ome);
625        end
626       
627        ual = u_dq(1,t)*cos(the) - u_dq(2,t)*sin(the);
628        ube = u_dq(1,t)*sin(the) + u_dq(2,t)*cos(the);
629       
630        if(control == 7) %inj. sin -> al-be
631            ual = ual + amp*cos(injom*dt*t);
632            ube = ube + amp*sin(injom*dt*t);
633        elseif(control == 8) %inj. rect. -> al-be
634            ual = ual + amp*sign(cos(injom*dt*t));
635            ube = ube + amp*sign(sin(injom*dt*t));       
636        elseif((control == 10)&&(rand() > (1/5))) %bic rnd. 5
637            duab = sign(rand(2,1)-0.5)*amp;
638            ual = ual + duab(1);
639            ube = ube + duab(2);
640        end
641     
642        ud = ual*cos(the) + ube*sin(the);
643        uq = ube*cos(the) - ual*sin(the);
644       
645        %simulation model Ldq
646        idpl = (1.0 - Rs*dt/Ld)*id + Lq*dt/Ld*ome*iq + dt/Ld*ud;
647        iqpl = (1.0 - Rs*dt/Lq)*iq - psipm*dt/Lq*ome - Ld*dt/Lq*ome*id + dt/Lq*uq;
648
649        x_sys(1, t+1) = idpl*cos(the) - iqpl*sin(the);
650        x_sys(2, t+1) = idpl*sin(the) + iqpl*cos(the);
651        x_sys(3, t+1) = (1.0-B*dt/J)*ome + kp*pp*pp*dt/J*((Ld-Lq)*id*iq + psipm*iq);
652        x_sys(4, t+1) = the + dt*ome;
653    end
654       
655end
656
657%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
658%   plot
659
660%axis
661xax = 1:T-1;
662timex = (xax)*dt;
663
664if(plotsys == 1)
665    subplot(2, 2, 1);
666    plot(timex, x_sys(1, xax));
667    subplot(2, 2, 2);
668    plot(timex, x_sys(2, xax));
669    subplot(2, 2, 3);
670    plot(timex, x_sys(3, xax), timex, ref_ome(xax));
671    subplot(2, 2, 4);
672    plot(timex, atan2(sin(x_sys(4, xax)),cos(x_sys(4, xax))));
673    figure;
674end
675
676if(model1 == 1)
677    hold on;
678    plot(timex, squeeze(iJn1(4,4,xax)), '-b');
679end
680if(model2 == 1)
681    hold on;
682    plot(timex, squeeze(iJn2(4,4,xax)), '-r');
683end
684if(model3 == 1)
685    hold on;
686    plot(timex, squeeze(iJn3(4,4,xax)), '-g',timex, squeeze(iJn3(5,5,xax)), '-g');
687end
688if(model4 == 1)
689    hold on;
690    plot(timex, squeeze(iJn4(4,4,xax)), '--b');
691end
692if(model5 == 1)
693    hold on;
694    plot(timex, squeeze(iJn5(4,4,xax)), '--r');
695end
696if(model6 == 1)
697    hold on;
698    plot(timex, squeeze(iJn6(4,4,xax)), '--g',timex, squeeze(iJn6(5,5,xax)), '--g');
699end
700if(model7 == 1)
701    hold on;
702    plot(timex, squeeze(iJn7(4,4,xax)), '-c');
703end
704if(model8 == 1)
705    hold on;
706    plot(timex, squeeze(iJn8(4,4,xax)), '-m');
707end
708if(model9 == 1)
709    hold on;
710    plot(timex, squeeze(iJn9(4,4,xax)), '-y',timex, squeeze(iJn9(5,5,xax)), '-y');
711end
712if(model10 == 1)
713    hold on;
714    plot(timex, squeeze(iJn10(4,4,xax)), '--c');
715end
716if(model11 == 1)
717    hold on;
718    plot(timex, squeeze(iJn11(4,4,xax)), '--m');
719end
720if(model12 == 1)
721    hold on;
722    plot(timex, squeeze(iJn12(4,4,xax)), '--y',timex, squeeze(iJn12(5,5,xax)), '--y');
723end
Note: See TracBrowser for help on using the browser.