Show
Ignore:
Timestamp:
05/23/10 11:40:48 (14 years ago)
Author:
smidl
Message:

Noise Particle

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • applications/bdmtoolbox/sandbox/mpf_arx_3.m

    r971 r974  
    88g.function = 'test_function'; 
    99 
    10 g.class = 'linfn'; 
    11 g.A     = eye(2); 
    12 g.B     = [1;0]; 
     10%     g.class = 'linfn'; 
     11%     g.A     = eye(2); 
     12%     g.B     = [1;0]; 
    1313 
    1414h.class = 'linfn'; 
     
    1717 
    1818fx.class = 'mgnorm<chmat>'; 
    19 fx.R = [0.3 -0.2; -0.2 0.5]; 
     19fx.R = [0.03 -0.02; -0.02 0.05]; 
    2020fx.g = g; 
    2121fx.rv = x; 
     
    2323 
    2424fy.class = 'mgnorm<chmat>'; 
    25 fy.R = 0.1*eye(2); 
     25fy.R = 0.01*eye(2); 
    2626fy.g = h; 
    2727fy.rv = y; 
     
    3939A.class = 'ARX'; 
    4040A.yrv = RV('vw',4); 
     41A.rv = RV('R',16); 
    4142A.rgr = RV({}); 
    4243A.dimx=4; 
    4344A.constant = 0; 
    44 A.frg=0.99; 
     45A.frg=1.0; 
     46A.prior.class='egiw'; 
     47A.prior.dimx=4; 
     48A.prior.V =1e-3*eye(4); 
     49 
    4550 
    4651M.class = 'NoiseParticle'; 
    4752M.g = g; 
    4853M.h = h; 
     54M.yrv = y; 
    4955M.rvx = x; 
    5056M.rvxc = RVtimes(x,-1); 
     
    5460PF.class='PF'; 
    5561PF.particle = M; 
    56 PF.n = 100; 
    57 PF.res_threshold = 1.0; 
     62PF.n = 1000; 
     63PF.res_threshold = 0.9; 
    5864PF.prior.class = 'enorm<ldmat>'; 
    5965PF.prior.mu = [0.2;0.3]; 
     
    6167 
    6268 
    63 exper.ndat = 2000; 
     69exper.ndat = 200; 
    6470O = estimator(DS,{PF},exper); 
    6571%%%%%% ARX estimator conditioned on frg 
     
    6975figure(1); 
    7076hold off 
    71 plot(M.Est0_Q_Q); 
    72 hold on 
    73 plot(ones(size(M.Est0_Q_Q,1),1)* DS.pdf.pdfs{2}.R(:)','--'); 
     77plot(O.Est0_apost_mean_R); 
    7478 
    7579figure(2) 
    7680hold off 
    77 plot(M.Est0_apost_mean_); 
     81plot(O.Est0_apost_mean_x); 
    7882hold on 
    79 plot(M.DS_x,'--'); 
     83plot(O.DS_dt_x,'--'); 
    8084