% addpath ~...applications/bdmtoolbox/mex/

C=config2mxstruct('/home/smidl/work/git/mixpp/applications/pmsm/experiments/ctrl_lq_dq2.cfg')
C.controllers{1}.estim=C.UD;
pmsm=pmsm_ctrl(C.system, C.controllers, C.experiment);