In the SynchronousMachineLdq.init() code, if the losses key is missing in the eecpars dict, a KeyError is raised and not a ValueError.
The ValueError in line 744 of machine/sm.py need to replaced with a KeyError. This was fixed in all other Machine classes.
Side note, the class name is misleading as one can think that the class will expect Ld/Lq/psim maps as an argument while the class needs psid/psiq maps. The only difference in the 2 classes (SynchronousMachineLdq and SynchronousMachinePsidq) are the map coordinates. Maybe rename the classes as SynchronousMachineI1Beta and SynchronousMachineIdIq.
EDIT: in sm.py, in the characteristics() method, the self.betarange var is used while it does not exists in the SynchronousMachinePsidq class object.
In the SynchronousMachineLdq.init() code, if the
losses
key is missing in the eecpars dict, a KeyError is raised and not a ValueError. The ValueError in line 744 of machine/sm.py need to replaced with a KeyError. This was fixed in all other Machine classes.Side note, the class name is misleading as one can think that the class will expect Ld/Lq/psim maps as an argument while the class needs psid/psiq maps. The only difference in the 2 classes (SynchronousMachineLdq and SynchronousMachinePsidq) are the map coordinates. Maybe rename the classes as SynchronousMachineI1Beta and SynchronousMachineIdIq.
EDIT: in sm.py, in the
characteristics()
method, theself.betarange
var is used while it does not exists in the SynchronousMachinePsidq class object.Thanks,
Francois