// settings for pmsm_estim.cpp

experiment={
	ndat = 60000;
};

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

estimator = (
	{type="EKF";
	IM = {type="pmsmIM";
	  params = {type = "external";filename = "../cfg/zcu.cfg";path = "pmsm107";};
	  variant = "2o";
	};
	OM = {type="pmsmOM";};
	dQ=[0.17, 0.17, 0.0000004, 1e-11];
	dR=[0.0001, 0.0001];
	//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=["EKF"]; sizes=[4];};
	options="logbounds";
	},
		///////////
	{type="pmsmCRB";
	IM = {type="pmsmIM";
	  params = {type = "external";filename = "../cfg/zcu.cfg";path = "pmsm107";};
	  variant = "2o";// 2nd order Taylor
	};
	OM = {type="pmsmOM";};
	dQ=[0.017, 0.017, 0.00000004, 1e-12];
	dR=[0.0000000001, 0.000000001];
	//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=["EKF"]; sizes=[4];};
	},
		///////////
	{type="EKF";
	IM = {type="pmsmIM";
	  params = {type = "external";filename = "../cfg/zcu.cfg";path = "pmsm107";};
	  variant = "2o";// 2nd order Taylor
	};
	OM = {type="pmsmOM4";};
	dQ=[0.017, 0.017, 0.00000004, 1e-12];
	dR=[0.0000000001, 0.000000001, 0.000000001, 0.000000001];
	//connect
	drv = {type="rv"; names=["o_ia","o_ib","o_om","o_th","o_ua","o_ub"];};  // observed u
	//drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u
	rv = {type="rv"; names=["ekff"]; sizes=[4];};
	}


);
	
logger= {
	type="dirfilelog";
	maxlen = 1;
	dirname = "exp/pwm";
};
