// settings for pmsm_estim.cpp

experiment={
	ndat = 120000;
};

system= {
	type = "pmsmDS";
	params = {type = "external";filename = "../cfg/zcu.cfg";path = "pmsm107";};
	tstep = 1.0; // steps for profile in [s]
	profileW = [0, 3, 10, 10, 3, 0, 0, -3, -3, -3, -10, -10, -4, 0, 0];
	profileM = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
//	options = "modelu";
};

estimator = (
	 {type="EKF";
	 IM = {type="pmsmIM";
		params = {type = "external";filename = "../cfg/zcu.cfg";path = "pmsm107";};
		variant = "Mz";
	 };
	 OM = {type="pmsmOM";};
     dQ=[0.002, 0.002, 5e-7, 3e-13, 1e-1];
	 dR=[0.0025, 0.0025];
	 dP0=[0., 0., 0., 0., 0.];
	 //connect
	 drv = {type="rv"; names=["o_ia","o_ib","o_ua","o_ub"];};  // observed u
	 //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u
	 rv = {type="rv"; names=["EKFMz"]; sizes=[5];};
	 options="logll,logbounds";
	 },
				 //
				 				 //
	 {type="pmsmCRBMz";
	 IM = {type="pmsmIM";
		params = {type = "external";filename = "../cfg/zcu.cfg";path = "pmsm107";};
		variant = "Mz";
	 };
	 OM = {type="pmsmOM";};
     dQ=[0.002, 0.002, 5e-7, 3e-13, 1e-1];
	 dR=[0.0025, 0.0025];
	 dP0=[0., 0., 0., 0., 0.];
	 //connect
	 drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];};  // observed u
	 //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u
	 rv = {type="rv"; names=["CRB"]; sizes=[5];};
	 options="logll,logbounds";
	 },

	 {type="pmsmCRB";
	 IM = {type="pmsmIM";
		params = {type = "external";filename = "../cfg/zcu.cfg";path = "pmsm107";};
		variant = "2o";
	 };
	 OM = {type="pmsmOM";};
     dQ=[0.002, 0.002, 0.3, 5e-9];
	 dR=[0.025, 0.025];
	 dP0=[0., 0., 0., 0.];
	 //connect
	 drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];};  // observed u
	 //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u
	 rv = {type="rv"; names=["CRB2"]; sizes=[4];};
	 options="logll,logbounds";
	 }


);
	
logger= {
	type="mexlog";
	maxlen = 119999;
};
