clear all clc %% wood constants run('constants_wood_lin_mdl') run('state_space_wood_mdl_dis') beta_motor_wood = beta_motor; beta_motor_wood = beta_motor; Fdi_wood = Fdi; Ed_wood = Ed; Bd_new_wood = Bd_new; Fd1_wood = Fd1; Ad_wood= Ad; Ld_wood = Ld; Cd_wood = Cd; M_wood = Md; De_wood = Ed; Gd_wood = Gd; E_wood = E; B_new_wood = B_new; A_wood= A; C_wood = C; M_wood = M; A_tilde_wood = A_tilde; B_tilde_wood = B_tilde; B_wood = inv(M_wood)*B_tilde_wood; B_new_wood =[B_wood(:,1) B_wood(:,2)]; D_wood = E; G_tilde_wood = G_tilde; G_wood = inv(M_wood)*G_tilde_wood; %% bar values wood u_bar_wood = [m_sf_bar m_a_bar]' y_bar_wood = [T_w_bar O2_bar*100] d_bar_wood = [T_iw_bar] x_bar_wood = [T_w_bar T_bc_bar T_gc_bar T_eg_bar M_C_char_bar O2_bar] r_bar_wood = [T_w_bar O2_bar]' %% wheat constants run('constants_wheat_lin_mdl') run('state_space_wheat_mdl_dis') beta_motor_wheat = beta_motor; beta_motor_wheat = beta_motor; Fdi_wheat = Fdi; Ed_wheat = Ed; Bd_new_wheat = Bd_new; Fd1_wheat = Fd1; Ad_wheat= Ad; Ld_wheat = Ld; Cd_wheat = Cd; M_wheat = Md; De_wheat = Ed; Gd_wheat = Gd; E_wheat = E; B_new_wheat = B_new; A_wheat= A; C_wheat = C; M_wheat = M; A_tilde_wheat = A_tilde; B_tilde_wheat = B_tilde; B_wheat = inv(M_wheat)*B_tilde_wheat; B_new_wheat =[B_wheat(:,1) B_wheat(:,2)]; D_wheat = E; G_tilde_wheat = G_tilde; G_wheat = inv(M_wheat)*G_tilde_wheat; %% bar values wheat u_bar_wheat = [m_sf_bar m_a_bar]' y_bar_wheat = [T_w_bar O2_bar*100] d_bar_wheat = [T_iw_bar] x_bar_wheat = [T_w_bar T_bc_bar T_gc_bar T_eg_bar M_C_char_bar O2_bar] r_bar_wheat = [T_w_bar O2_bar]' %% Kalman filter values Q_wood = [0 0 0 0 0 0;0 0 0 0 0 0;0 0 0 0 0 0;0 0 0 0 0 0;0 0 0 0 0 0;0 0 0 0 10^-6 0.1*10^-3]; P0_wood = [0 0 0 0 0 0;0 0 0 0 0 0;0 0 0 0 0 0;0 0 0 0 0 0;0 0 0 0 0 0;0 0 0 0 0 0]; R_wood=[1 0;0 1]; %% setup for interface with real system. run('stoker_setup') run('constants_wood_non_lin_mdl')