When generating the current reference, will there be any problem with running the simulation even if the motor is changed?
4 views (last 30 days)
Show older comments
Hello,
I am trying to run a simulation on the IPMSM velocity control example after changing the motor model.
I modified the parameters of the motor model, but I'm encountering an issue where the motor control fails in the example.
I suspect this might be because the entries in the lookup table-based "PMSM Current Reference Generator," which is used in the original example, are not suitable for the motor I am trying to use.
Could you please confirm if this mismatch is the likely cause of the problem?
Assuming that the lookup table values need to be tailored to the motor, could you please explain the methodology for determining RPM_VECT, TQ_VECT, VDC_VECT, ID_MAP, and IQ_MAP? I am looking for guidance on how to generate these maps based on a new motor's characteristics.
0 Comments
Accepted Answer
Shishir Reddy
on 24 Jun 2025
Hi @재환
Yes, the problem is likely caused by the lookup tables in the PMSM Current Reference Generator block not matching your new motor’s parameters. These tables (RPM_VECT, TQ_VECT, VDC_VECT, ID_MAP, IQ_MAP) provide the current references needed at different speeds and torques, so if they don’t fit your motor, the control will fail.
To fix this, the labels need to be updated based on the characteristics of the motor. Start by defining vectors of speeds and torques that cover your motor’s operating range. Then, for each speed-torque pair, calculate the corresponding d-axis and q-axis currents that produce the desired torque.
On assuming no field weakening (Id=0), 'lq' can be calculated as follows -
RPM_VECT = linspace(0, 4000, 20); % speed range
TQ_VECT = linspace(-10, 10, 21); % torque range
p = 4; Psi_f = 0.015; % motor parameters
ID_MAP = zeros(length(RPM_VECT), length(TQ_VECT));
IQ_MAP = TQ_VECT ./ ((3/2) * p * Psi_f); % simplified Iq calculation
IQ_MAP = repmat(IQ_MAP, length(RPM_VECT), 1);
Kindly note that, this snippet is a starting point, and it has to be refined based on the real data of the motor especially in the field weakening region (where id is not 0).
For more information regarding the 'PMSM Current Reference Generator' block, kindly refer the following documentation - https://www.mathworks.com/help/releases/R2024b/sps/ref/pmsmcurrentreferencegenerator.html
I hope this helps
0 Comments
More Answers (0)
See Also
Categories
Find more on Choose and Parameterize Blocks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!