Motor controller
According to some embodiments, a motor controller has a first controller operating in a start-up mode and configured to apply a high frequency injection signal to a motor, extract a motor parameter based on a measured response to the high frequency injection signal, determine an alignment error of the motor based on the measured response, and correct the motor parameter based on the alignment error to generate a corrected motor parameter, and a second controller operating in a control mode and configured to control the motor based on the corrected motor parameter.
1 . A method for controlling a motor comprising:
applying a high frequency injection signal to a motor during a start-up mode;
extracting a motor impedance parameter based on a measured response to the high frequency injection signal;
determining an alignment error of the motor based on the measured response;
correcting the motor impedance parameter based on the alignment error to generate a corrected motor impedance parameter; and
controlling the motor during a control mode based on the corrected motor impedance parameter, wherein:
determining the alignment error comprises:
determining a first component of the alignment error during a first interval;
determining a second component of the alignment error during a second interval; and
combining the first component of the alignment error and the second component of the alignment error.
2 . The method of claim 1 , wherein:
applying the high frequency injection signal comprises:
applying the high frequency injection signal on a first control axis during the first interval; and
applying the high frequency injection signal on a second control axis during the second interval; and
extracting the motor impedance parameter comprises:
determining a first control axis inductance parameter during the first interval; and
determining a second control axis inductance parameter during the second interval.
3 . The method of claim 1 , comprising:
aligning the motor to a first position during the first interval; and
aligning the motor to a second position during the second interval, wherein:
extracting the motor impedance parameter comprises:
determining a first component of an inductance parameter during the first interval;
determining a second component of the inductance parameter during the second interval; and
combining the first component of the inductance parameter and the second component of the inductance parameter to generate the motor impedance parameter prior to correcting the motor impedance parameter.
4 . The method of claim 1 , wherein controlling the motor comprises:
configuring a gain parameter of a controller based on the corrected motor impedance parameter; and
generating a drive signal for the motor using the controller configured with the gain parameter.
5 . The method of claim 1 , wherein controlling the motor comprises:
determining a feedback parameter based on the motor impedance parameter; and
controlling the motor based on the feedback parameter.
6 . The method of claim 5 , wherein determining the feedback parameter comprises:
estimating at least one of torque, stator flux, rotor flux, or back EMF of the motor based on the motor impedance parameter.
7 . The method of claim 1 , comprising:
responsive to the alignment error exceeding a first threshold, rotating the motor and iterating the applying of the high frequency injection signal, the extracting of the motor impedance parameter, the determining of the alignment error, and the correcting of the motor impedance parameter.
8 . The method of claim 7 , comprising:
generating a warning indictor responsive to iterating the applying of the high frequency injection signal, the extracting of the motor impedance parameter, the determining of the alignment error, and the correcting of the motor impedance parameter a number of times greater than a retrial threshold.
9 . The method of claim 1 , comprising:
controlling the motor in the start-up mode utilizing a first controller; and
controlling the motor in the control mode utilizing a second controller.
10 . A motor controller, comprising:
a first controller operating in a start-up mode and configured to:
apply a high frequency injection signal to a motor;
extract a motor parameter based on a measured response to the high frequency injection signal;
determine an alignment error of the motor based on the measured response; and
correct the motor parameter based on the alignment error to generate a corrected motor parameter;
a second controller operating in a control mode and configured to control the motor based on the corrected motor parameter.
11 . The motor controller of claim 10 , wherein:
the first controller is configured to determine the alignment error by:
determining a first component of the alignment error during a first interval;
determining a second component of the alignment error during a second interval; and
combining the first component of the alignment error and the second component of the alignment error.
12 . The motor controller of claim 11 , wherein:
the first controller is configured to apply the high frequency injection signal by:
applying the high frequency injection signal on a first control axis during the first interval; and
applying the high frequency injection signal on a second control axis during a second interval; and
the first controller is configured to extract the motor parameter by:
determining a first control axis inductance parameter during the first interval; and
determining a second control axis inductance parameter during the second interval.
13 . The motor controller of claim 11 , wherein:
the first controller is configured to:
align the motor to a first position during the first interval;
align the motor to a second position during the second interval; and
extract the motor parameter by:
determining a first component of an inductance parameter during the first interval;
determining a second component of the inductance parameter during the second interval; and
combining the first component of the inductance parameter and the second component of the inductance parameter to generate the motor parameter prior to correcting the motor parameter.
14 . The motor controller of claim 10 , wherein:
the second controller is configured to generate a drive signal for the motor using a gain parameter generated based on the corrected motor parameter.
15 . The motor controller of claim 10 , wherein:
the second controller is configured to:
determine a feedback parameter based on the motor parameter; and
control the motor based on the feedback parameter.
16 . The motor controller of claim 15 , wherein:
the feedback parameter comprises at least one of torque, stator flux, rotor flux, or back EMF of the motor based on the motor parameter.
17 . The motor controller of claim 10 , wherein:
the first controller is configured to:
responsive to the alignment error exceeding a first threshold, rotate the motor and iterate the applying of the high frequency injection signal, the extracting of the motor parameter, the determining of the alignment error, and the correcting of the motor parameter.
18 . The motor controller of claim 17 , wherein:
the first controller is configured to generate a warning indictor responsive to iterating the applying of the high frequency injection signal, the extracting of the motor parameter, the determining of the alignment error, and the correcting of the motor parameter a number of times greater than a retrial threshold.
19 . A system, comprising:
a motor;
a current sense unit configured to measure current in the motor;
a transform unit configured to generate, based on the current, a first current signal corresponding to a first control axis and a second current signal corresponding to a second control axis;
a first controller operating in a start-up mode and configured to:
apply a high frequency injection signal on the first control axis and the second control axis;
extract a motor parameter based on responses to the high frequency injection signal measured in the first current signal and the second current signal;
determine an alignment error of the motor based on the responses to the high frequency injection signal measured in the first current signal and the second current signal; and
correct the motor parameter based on the alignment error to generate a corrected motor parameter; and
a second controller operating in a control mode and configured to control the motor based on the corrected motor parameter.
20 . The system of claim 19 , wherein:
the first controller is configured to:
responsive to the alignment error exceeding a first threshold, rotate the motor and iterate the applying of the high frequency injection signal, the extracting of the motor parameter; the determining of the alignment error, and the correcting of the motor parameter; and
generate a warning indictor responsive to iterating the applying of the high frequency injection signal, the extracting of the motor parameter, the determining of the alignment error, and the correcting of the motor parameter a number of times greater than a retrial threshold.