Home > m > analyses > stuttgart > dkalman_matrices.m

dkalman_matrices

PURPOSE ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 produce discrete input matrices for ltpda_dkalman function
 (example)

 veronika 05-07-07
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0002 % produce discrete input matrices for ltpda_dkalman function
0003 % (example)
0004 %
0005 % veronika 05-07-07
0006 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0007 
0008 om2_quad = -2.24*(10^(-6)); 
0009 deltaom = -7*(10^(-7));
0010 
0011 t = 1/fs;
0012 
0013 A = [0 1 0;  -om2_quad 0  -1;  0 0 0];
0014 PHI= expm(A);
0015 
0016 om2 = sqrt(2.24*(10^(-6)));
0017 Bd = [(1/(om2^2))*(cosh(om2*t)-1)*(deltaom)    (1/(om2^2))*(cosh(om2*t)-1);
0018       (1/om2)*sinh(om2*t)*(deltaom)            (1/om2)*sinh(om2*t);
0019       0    0];
0020   
0021 H = [1 0 0];     %measurement matrix
0022 
0023 x0 = [0  0  0]';     
0024      
0025 P0 = [100  0  0;
0026       0  100  0;
0027       0  0  100];
0028   
0029 %calculate the Q and R matrix
0030 om2 = sqrt(2.24*(10^(-6))); 
0031 
0032 sigma1_quad = 0;
0033 sigma2_quad = 0;
0034 sigma3_quad = 10^(-13);
0035 sigmay_quad = 10^(-10);
0036 
0037 R = sigmay_quad;
0038 
0039 alpha1 = (sigma1_quad/2) -(sigma2_quad/(2*(om2^2))) +(3*sigma3_quad/(2*(om2^4)));
0040 alpha2 = (sigma1_quad/4) +(sigma2_quad/(4*(om2^2))) +(sigma3_quad/(4*(om2^4)));
0041 beta = (1/4)*(sigma1_quad*om2 +sigma2_quad/om2 + sigma3_quad/(om2^3));
0042 epsi1 = sigma2_quad/2 -(sigma1_quad*(om2^2))/2 - sigma3_quad/(2*(om2^2));
0043 epsi2 = (sigma1_quad*(om2^2))/4 + sigma2_quad/4 + sigma3_quad/(4*(om2^2));
0044 
0045 Q11 = alpha1*t +(exp(-om2*t)-exp(om2*t))*(sigma3_quad/(om2^5)) +(exp(2*om2*t)-exp(-2*om2*t))*(alpha2/(2*om2));
0046 
0047 Q12 = -beta/om2 +sigma3_quad/(om2^4) +(beta/(2*om2))*(exp(2*om2*t)+exp(-2*om2*t)) -(sigma3_quad/(2*(om2^4)))*(exp(-om2*t)+exp(om2*t));
0048 
0049 Q13 = -(sigma3_quad/(om2^2))*t+(sigma3_quad/(2*(om2^3)))*(-exp(-om2*t)+exp(om2*t));
0050 
0051 Q21 = Q12;
0052 
0053 Q22 = epsi1*t+(epsi2/(2*om2))*(exp(2*om2*t)-exp(-2*om2*t));
0054 
0055 Q23 = -sigma3_quad/(om2^2) +(sigma3_quad/(2*(om2^2)))*(exp(-om2*t)+exp(om2*t));
0056 
0057 Q31 = Q13;
0058 
0059 Q32 = Q23;
0060 
0061 Q33 = sigma3_quad*t;
0062 
0063 Q = [Q11  Q12  Q13;
0064      Q21  Q22  Q23;
0065      Q31  Q32  Q33];
0066

Generated on Mon 03-Sep-2007 12:12:34 by m2html © 2003