Update of numpy for complex numbers #249
Mario-de-Santi
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello. I don't know if anyone else has had trouble simulating the control of induction motors(classic controllers) due to the numpy library update, but if anyone else is having issues due to the use of np.complex, I have updated to the new numpy method np.complex128. I think the new method is correct, but if any of the GEM administrators could confirm:
Inside the program "flux_observer.py" of classical controllers:
line 21: self.integrated = np.complex(0, 0) ------> self.integrated = np.complex128(0)
line 43: delta = np.complex(i_s_alpha, i_s_beta) * self.r_r * self.l_m / self.l_r - self.integrated * np.complex(self.r_r / self.l_r, -omega) ------> delta = np.complex128(i_s_alpha + 1j * i_s_beta) * self.r_r * self.l_m / self.l_r - self.integrated * np.complex128(self.r_r / self.l_r - omega * 1j)
line 52: self.integrated = np.complex(0, 0) -------> self.integrated = np.complex128(0 + 0j)
Beta Was this translation helpful? Give feedback.
All reactions