In line 327, the step size is calculated incorrectly because the wrong dimension is accessed. This causes the LUTs to be slightly distorted.
i_q_stepsize = (i_q_max - i_q_min) / (pmsm_lut["i_q_vec"].shape[1] - 1)
hast to be
i_q_stepsize = (i_q_max - i_q_min) / (pmsm_lut["i_q_vec"].shape[0] - 1)
so that the stepsize becomes 1.
In line 327, the step size is calculated incorrectly because the wrong dimension is accessed. This causes the LUTs to be slightly distorted.
i_q_stepsize = (i_q_max - i_q_min) / (pmsm_lut["i_q_vec"].shape[1] - 1)hast to be
i_q_stepsize = (i_q_max - i_q_min) / (pmsm_lut["i_q_vec"].shape[0] - 1)so that the stepsize becomes 1.