WO2021062725A1 - Electric motor control method, electric motor and movable platform - Google Patents

Electric motor control method, electric motor and movable platform Download PDF

Info

Publication number
WO2021062725A1
WO2021062725A1 PCT/CN2019/109635 CN2019109635W WO2021062725A1 WO 2021062725 A1 WO2021062725 A1 WO 2021062725A1 CN 2019109635 W CN2019109635 W CN 2019109635W WO 2021062725 A1 WO2021062725 A1 WO 2021062725A1
Authority
WO
WIPO (PCT)
Prior art keywords
rotor
electrical angle
angle value
motor
preset
Prior art date
Application number
PCT/CN2019/109635
Other languages
French (fr)
Chinese (zh)
Inventor
陈旭
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to CN201980034234.9A priority Critical patent/CN112889213B/en
Priority to PCT/CN2019/109635 priority patent/WO2021062725A1/en
Publication of WO2021062725A1 publication Critical patent/WO2021062725A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P21/00Arrangements or methods for the control of electric machines by vector control, e.g. by control of field orientation
    • H02P21/14Estimation or adaptation of machine parameters, e.g. flux, current or voltage
    • H02P21/18Estimation of position or speed

Definitions

  • the embodiments of the present application relate to the field of control, and in particular, to a motor control method, a motor, and a movable platform.
  • vector control can be used to start.
  • open-loop dragging is required to start. This method relies on a vector voltage with a higher amplitude to drive the motor rotor to rotate. After the rotor reaches a certain speed, it switches to other methods (such as back-EMF observer) to obtain position information and perform vector control.
  • This method of using open-loop dragging has low open-loop dragging efficiency and requires a larger starting power to ensure that it does not lose step.
  • the application provides a motor control method, a motor, and a movable platform, which realizes the use of a vector method for starting on a motor that does not have an absolute position.
  • the first aspect of the present application provides a motor control method, including:
  • the rotor of the motor is controlled to rotate in the preset first direction by the rotating first vector voltage, and when it is detected that the code disc provided on the rotor generates the nth signal edge, it is recorded
  • the first electrical angle value of the current first vector voltage; n is an odd number, and n ⁇ 1;
  • the rotor of the motor is controlled to rotate in a preset second direction with a rotating second vector voltage, and when it is detected that the code disc generates the nth signal edge, it is recorded
  • the second electrical angle value of the current second vector voltage wherein, the first direction and the second direction are opposite directions;
  • the current electrical angle value of the rotor is acquired according to the electrical angle offset value and the current signal edge count of the code disk, and the motor is controlled based on the electrical angle value of the rotor.
  • the second aspect of the present application provides a motor control method, which is applied to a motor, the motor includes a rotor, and an encoder is provided on the rotor, including:
  • the motor is controlled based on the electrical angle value of the rotor.
  • the third aspect of the present application provides a motor control method, which is applied to a motor, the motor includes a rotor, the rotor is provided with an encoder, and includes:
  • the motor is controlled based on the corrected electrical angle value.
  • the fourth aspect of the present application provides a motor control method applied to a motor, the motor includes a rotor, the rotor is provided with a position sensor, and the position sensor is used to detect the absolute mechanical position of the rotor, including :
  • the fifth aspect of the present application provides a motor control method, which is applied to a motor, the motor includes a rotor, and an encoder disk is provided on the rotor, including the steps:
  • the rotor is controlled to rotate to a preset target position by a vector voltage in a preset direction; the target position is correspondingly set with a preset initial electrical angle value;
  • the current electrical angle value of the rotor is acquired according to the initial electrical angle value and the current signal edge count of the encoder, and the motor is controlled based on the electrical angle value of the rotor.
  • a sixth aspect of the present application provides a motor control device, including a processor and a memory; the memory stores one or more computer program instructions;
  • the processor adjusts the one or more computer program instructions to execute the motor control method described in the first aspect.
  • a seventh aspect of the present application provides a motor control device, including a processor and a memory; the memory stores one or more computer program instructions;
  • the processor adjusts the one or more computer program instructions to execute the motor control method described in the second aspect.
  • An eighth aspect of the present application provides a motor control device, including a processor and a memory; the memory stores one or more computer program instructions;
  • the processor adjusts the one or more computer program instructions to execute the motor control method described in the third aspect.
  • a ninth aspect of the present application provides a motor control device, including a processor and a memory; the memory stores one or more computer program instructions;
  • the processor adjusts the one or more computer program instructions to execute the motor control method described in the fourth aspect.
  • a tenth aspect of the present application provides a motor control device, including a processor and a memory; the memory stores one or more computer program instructions;
  • the processor adjusts the one or more computer program instructions to execute the motor control method described in the fifth aspect.
  • the eleventh aspect of the present application provides a motor, including a rotor, a code disc, a memory, and a processor; the code disc is installed on the rotor and rotates with the rotor;
  • the memory stores one or more computer program instructions
  • the processor is used to call and execute the one or more computer program instructions to perform the following steps:
  • the rotor of the motor is controlled to rotate in the preset first direction by the rotating first vector voltage, and when it is detected that the code disc provided on the rotor generates the nth signal edge, it is recorded
  • the first electrical angle value of the current first vector voltage; n is an odd number, and n ⁇ 1;
  • the rotor of the motor is controlled to rotate in a preset second direction with a rotating second vector voltage, and when it is detected that the code disc generates the nth signal edge, it is recorded
  • the second electrical angle value of the current second vector voltage wherein, the first direction and the second direction are opposite directions;
  • the current electrical angle value of the rotor is acquired according to the electrical angle offset value and the current signal edge count of the code disk, and the motor is controlled based on the electrical angle value of the rotor.
  • the twelfth aspect of the present application provides a motor, including a rotor, a code disc, a memory, and a processor; the code disc is installed on the rotor and rotates with the rotor;
  • the memory stores one or more computer program instructions
  • the processor is used to call and execute the one or more computer program instructions to perform the following steps:
  • the motor is controlled based on the electrical angle value of the rotor.
  • the thirteenth aspect of the present application provides a motor, including a rotor, a code disc, a memory, and a processor; the code disc is installed on the rotor and rotates with the rotor;
  • the memory stores one or more computer program instructions
  • the processor is used to call and execute the one or more computer program instructions to perform the following steps:
  • the motor is controlled based on the corrected electrical angle value.
  • a fourteenth aspect of the present application provides a motor, including a rotor, a position sensor, a memory, and a processor; the position sensor is installed on the rotor;
  • the memory stores one or more computer program instructions
  • the processor is used to call and execute the one or more computer program instructions to perform the following steps:
  • the motor is controlled based on the corrected electrical angle value.
  • the fifteenth aspect of the present application provides a motor, including a rotor, a code disk, a memory, and a processor; the code disk is installed on the rotor and rotates with the rotor;
  • the memory stores one or more computer program instructions
  • the processor is used to call and execute the one or more computer program instructions to perform the following steps:
  • the rotor is controlled to rotate to a preset target position by a vector voltage in a preset direction; the target position is correspondingly set with a preset initial electrical angle value;
  • the current electrical angle value of the rotor is acquired according to the initial electrical angle value and the current signal edge count of the encoder, and the motor is controlled based on the electrical angle value of the rotor.
  • a fifteenth aspect of the present application provides a computer-readable storage medium that stores a computer program that, when executed by a computer, implements the motor control method described in any one of the first to fifth aspects.
  • the sixteenth aspect of this application provides a movable platform and a fuselage
  • the motor is installed on the fuselage and used to provide power
  • the controller is configured to execute the motor control method described in any one of the first aspect to the fifth aspect, and control the operation of the motor.
  • the rotor of the motor is controlled to rotate in the preset first direction with the rotating first vector voltage, and when it is detected that the code disc provided on the rotor produces the nth Record the first electrical angle value of the current first vector voltage when there are two signal edges; after recording the first electrical angle value, use the rotating second vector voltage to control the rotor of the motor in the preset second direction
  • the second electrical angle value of the current second vector voltage is recorded; the rotor's electrical angle value is obtained according to the first electrical angle value and the second electrical angle value.
  • FIG. 1 is a schematic flowchart of an embodiment of a motor control method provided by an embodiment of this application;
  • FIG. 2 is a schematic flowchart of another embodiment of a motor control method provided by an embodiment of this application.
  • FIG. 3 is a schematic flowchart of another embodiment of a motor control method provided by an embodiment of the application.
  • FIG. 4 is a schematic flowchart of another embodiment of a motor control method provided by an embodiment of the application.
  • FIG. 5 is a schematic flowchart of another embodiment of a motor control method provided by an embodiment of the application.
  • FIG. 6 is a schematic structural diagram of an embodiment of a motor control device provided by an embodiment of the application.
  • FIG. 7 is a schematic structural diagram of an embodiment of a motor control device provided by an embodiment of this application.
  • FIG. 8 is a schematic structural diagram of an embodiment of a motor control device provided by an embodiment of the application.
  • FIG. 9 is a schematic structural diagram of an embodiment of a motor control device provided by an embodiment of this application.
  • Fig. 10 is a schematic structural diagram of an embodiment of a motor control device provided by an embodiment of the application.
  • FIG. 11 is a schematic structural diagram of an embodiment of a motor provided by an embodiment of this application.
  • FIG. 12 is a schematic structural diagram of another embodiment of a motor provided by an embodiment of this application.
  • FIG. 13 is a schematic structural diagram of another embodiment of a motor provided by an embodiment of this application.
  • FIG. 14 is a schematic structural diagram of another embodiment of a motor provided by an embodiment of this application.
  • 15 is a schematic structural diagram of another embodiment of a motor provided by an embodiment of this application.
  • FIG. 16 is a schematic structural diagram of an embodiment of a movable platform provided by an embodiment of this application.
  • a permanent magnet synchronous motor is a synchronous motor that generates a synchronous rotating magnetic field by permanent magnet excitation.
  • the permanent magnet acts as a rotor to generate a rotating magnetic field.
  • the three-phase stator winding reacts through the armature under the action of the rotating magnetic field to induce a three-phase symmetrical current.
  • encoders To control the motor, it is necessary to know the position of the rotor.
  • resolvers To control the motor, it is necessary to know the position of the rotor.
  • Hall sensors are commonly used sensors to detect the position of the rotor.
  • the electrical angle also refers to the electrical position.
  • the position of the rotor is described in the concept of angle below.
  • the electrical angle is obtained by multiplying the mechanical angle by the number of poles of the motor, and the mechanical angle is also obtained by the detection of the position sensor.
  • the mechanical angle is also obtained by the detection of the position sensor.
  • FIG. 1 is a flowchart of an embodiment of a motor control method provided by an embodiment of the application.
  • the motor may be a permanent magnet synchronous motor, and the method may include a calibration step and a control step;
  • the calibration step includes:
  • the rotor of the motor is controlled to rotate in the preset first direction with the rotating first vector voltage, and when the n-th signal edge generated by the code disc set on the rotor is detected, record The current first electrical angle value of the first vector voltage, where n is an odd number and n ⁇ 1.
  • the position sensor provided on the rotor of the motor is a code disc
  • the signal edge may refer to a pulse signal edge or a transition edge.
  • the code disc is an incremental encoder (Incremental encoder).
  • the rotating first vector voltage may be specifically used to control the motor to rotate in the preset first direction without losing step.
  • the amplitude of the first vector voltage and the speed of rotation can be controlled to avoid the out-of-step problem.
  • the first vector voltage can be selected to ensure that the rotor of the motor can rotate without losing step.
  • the rotor can be controlled to rotate slowly at a preset rotation speed through the first vector voltage.
  • the first electrical angle value refers to the vector angle currently applied to the rotor by the first vector voltage.
  • the target position can be obtained by pre-positioning the rotor of the motor. Therefore, before starting from the preset target position and controlling the rotor of the motor with the rotating first vector voltage, the calibration step may further include:
  • the rotor is controlled to rotate to the preset target position through the third vector voltage in the preset direction.
  • the second direction is opposite to the first direction.
  • the rotating second vector voltage may be specifically used to control the rotor of the motor to rotate in the preset second direction without losing step.
  • the problem that the prior art is prone to out-of-step through open-loop dragging can be solved.
  • the second vector voltage can be selected to ensure that the rotor of the motor can rotate without losing the minimum vector voltage.
  • the method may further include:
  • the first vector voltage is used to continue to control the rotor to rotate in the first direction, and to control the rotor to stop rotating in the first direction before the code wheel generates a next signal edge.
  • the electrical angle offset value is the electrical angle value of the (n+1)/2th code wheel scale in the first direction starting from the preset target position (that is, the rotor is in the first direction or the first direction).
  • the middle code wheel scale passed in the two directions), which corresponds to the electrical angle value when the mechanical angle is zero.
  • the traditional direct pre-positioning method can only obtain a rough relationship between the relative position and the absolute position, and the one-way drag method will be affected by friction, and thus cannot obtain an accurate relationship between the relative position and the absolute position.
  • the method of dragging in the opposite direction can compensate for the influence of friction and obtain the precise relationship between relative position and absolute position. Therefore, obtaining the electrical angle offset value through the operations of step 101 to step 103 can eliminate the influence of friction and improve the accuracy of the electrical angle offset value.
  • the corresponding relationship between the mechanical position and the electrical position can be obtained through the above slow dragging method, that is, the relationship between the relative mechanical position of the encoder and the absolute electrical position of the motor can be established. Therefore, based on this as a feedback, the vector control method can be used to start the motor.
  • control steps include:
  • the signal edge count can be set to a preset value to start counting, for example, set to (n-1)/2.
  • the signal edge count it is not necessary to set the signal edge count to a preset value to record the signal edge count after the calibration step is completed, and then subtract the recorded value from the detected signal edge count to obtain the signal edge count of the current code disc.
  • the electrical angle value of the rotor may be used as an angle feedback value to implement vector control of the motor.
  • the electrical angle value of the rotor is calculated based on the signal edge count of the encoder and the electrical angle offset value.
  • the electrical angle offset value can compensate for the deviation caused by the initial installation position of the position sensor, thereby obtaining an accurate electrical angle. Realize accurate control of the motor.
  • the electrical angle of the rotor can be obtained as feedback on a motor that does not have an absolute position, so that the vector control mode is used for starting.
  • the obtaining the current electrical angle value of the rotor according to the electrical angle offset value and the current signal edge count of the code disc specifically includes:
  • the electrical angle value of the rotor is generated according to the initial electrical angle value and the electrical angle offset value.
  • the initial electrical angle value is added to the electrical angle offset value to generate the electrical angle value of the rotor.
  • the electrical angle value of the rotor can be calculated according to the following formula:
  • EleAngle represents the electrical angle value of the rotor
  • Index represents the signal edge count of the current code disc
  • Resolution EleAngel represents the electrical angle resolution of the code disc
  • the electrical angle resolution of the encoder is 360° (degree) divided by the resolution of the encoder, and then multiplied by the number of poles of the motor to obtain.
  • the electrical angle resolution is:
  • the initial electrical angle value is obtained by multiplying the current signal edge count of the code disc and the preset electrical angle resolution, that is, the angle value obtained by multiplying the relative angle and the number of poles of the motor.
  • the initial electrical angle value is directly used as the electrical angle value. Due to the deviation caused by the initial installation position of the position sensor and other factors, the initial electrical angle value is not accurate. The electrical angle value is corrected, and the obtained electrical angle value can correct the angle deviation, which improves the accuracy of the electrical angle value.
  • the electrical angle error range is (0°, 90°) or (-90°, 0°], at this time the motor
  • the lower limit of torque is:
  • K T is a parameter used to calculate the output torque, which is related to the inherent characteristics of the motor; I q is the current value corresponding to the q axis of the motor rotating, and EleAngleError is the electrical angle error.
  • the obtaining the current electrical angle value of the rotor according to the electrical angle offset value and the current signal edge count of the code disc may include:
  • the motor is controlled based on the electrical angle value of the rotor.
  • the electrical angle value can be calculated according to the following formula
  • EleAngle represents the electrical angle value of the rotor
  • Index represents the signal edge count of the current code disc
  • Resolution EleAngel represents the electrical angle resolution of the code disc
  • EleAngle_Offset represents the electrical angle offset value.
  • the preset coefficient may be greater than 0 and less than 1. In an actual application, the preset coefficient may be one-half.
  • the angle error range of the encoder becomes (-45°, 45°), and the lower limit of the motor torque at this time is:
  • the direction of rotation of the rotor is a third direction;
  • the signal edge count plus or minus a preset coefficient to generate the modified signal edge count is specifically:
  • the signal edge count is added to a preset coefficient to generate a modified signal edge count.
  • the direction of rotation of the rotor is the third direction; the acquisition of the signal edge count of the code disk, and the signal The edge count adds or subtracts a preset coefficient to generate a modified signal.
  • the edge count is specifically:
  • the signal edge count is subtracted by a preset coefficient to generate a modified signal edge count.
  • the obtaining the current electrical angle value of the rotor according to the electrical angle offset value and the current signal edge count of the code disc includes:
  • the electrical angle value of the rotor is generated according to the initial electrical angle value, the electrical angle offset value, and a preset electrical angle compensation value.
  • the electrical angle value can be calculated according to the following formula
  • EleAngle represents the electrical angle value of the rotor
  • Index represents the signal edge count of the current code disc
  • Resolution EleAngel represents the electrical angle resolution of the code disc
  • EleAngle_Offset represents the electrical angle offset value.
  • EleAngle compensate indicates the electrical angle compensation value.
  • the preset electrical angle compensation value is less than the electrical angle resolution of the code disc.
  • the electrical angle compensation value can be one-half of the electrical angle resolution, so that the midpoint of adjacent edges is used as electrical angle feedback, which can be effective Optimize the lower limit of motor torque.
  • the initial electrical angle value and the electrical angle offset value may be added, and a preset electrical angle compensation value is added or subtracted to obtain the electrical angle value of the rotor.
  • the direction of rotation of the rotor is the third direction
  • the preset electrical angle compensation value is added on the basis of the addition of the initial electrical angle value and the electrical angle offset value To obtain the electrical angle value of the rotor;
  • the preset electrical angle compensation value is subtracted to obtain the rotor Electrical angle value.
  • FIG. 2 is a flowchart of another embodiment of a motor control method according to an embodiment of the application. The method is applied to a motor, the motor includes a rotor, and an encoder is provided on the rotor.
  • the method can include the following steps:
  • the obtaining the current electrical angle value of the rotor according to the correction signal edge count and a preset electrical angle offset value of the rotor may include:
  • the electrical angle value of the rotor is generated according to the initial electrical angle value and the electrical angle offset value.
  • the motor may not start normally, nor can it achieve effective and accurate control of the motor. Therefore, it can be counted on the signal edge of the encoder
  • the basis adds or subtracts a preset coefficient to generate a modified signal edge count.
  • the electrical angle value of the rotor obtained by the electrical angle offset value of the rotor preset by the modified signal edge count, that is, the motor can be started normally, and the effective control of the motor can be realized to avoid the occurrence of the above-mentioned electrical angle resolution Unable to start caused by too low.
  • the electrical angle offset value can be pre-configured, of course, it can also be obtained in other ways.
  • the method may also include:
  • the rotor is controlled to rotate to a preset target position by a vector voltage in a preset direction; the target position is correspondingly set with a preset initial electrical angle value;
  • the initial electrical angle value is used as the electrical angle offset value of the rotor.
  • the rotor is positioned to the target position in advance, and the preset initial electrical angle value corresponding to the target position is used as the electrical angle offset value, so that the calibration step in the above-mentioned embodiment 1 can be omitted, which enables the motor to start faster.
  • the method may further include:
  • the rotor of the motor is controlled to rotate in the preset first direction with the rotating first vector voltage, and when it is detected that the code disc provided on the rotor generates the nth signal edge, it is recorded The first electrical angle value of the current first vector voltage;
  • the rotor of the motor is controlled to rotate in a preset second direction with a rotating second vector voltage, and when it is detected that the code disc generates the nth signal edge, it is recorded The second electrical angle value of the current second vector voltage;
  • the electrical angle offset value is calculated by using the method in the embodiment shown in FIG. 1.
  • the related content has been described in detail in the embodiment shown in FIG. 1, and will not be repeated here.
  • the obtaining the signal edge count of the code disc, and adding or subtracting a preset coefficient to the signal edge count to generate the modified signal edge count specifically includes:
  • the signal edge count is subtracted by a preset coefficient to generate a modified signal edge count.
  • Fig. 3 is a flowchart of another embodiment of a motor control method provided by an embodiment of the application. The method is applied to a motor, the motor includes a rotor, and an encoder is provided on the rotor.
  • the method can include the following steps:
  • the initial electrical angle value is obtained by multiplying the signal edge count and the preset electrical angle resolution
  • the electrical angle value of the rotor is generated according to the initial electrical angle value and the electrical angle offset value.
  • the initial electrical angle value is added to the electrical angle offset value to generate the electrical angle value of the rotor.
  • the electrical angle value of the rotor can be calculated according to the following formula:
  • EleAngle represents the electrical angle value of the rotor
  • Index represents the signal edge count of the current code disc
  • Resolution EleAngel represents the electrical angle resolution of the code disc
  • EleAngle_Offset represents the electrical angle offset value.
  • the motor may not start normally, nor can it achieve effective and accurate control of the motor. Therefore, it can be compensated by the angle compensation value. That is, the motor can be started normally, and effective and accurate control of the motor can be realized.
  • the angle compensation value is less than the electrical angle resolution of the encoder.
  • adding or subtracting a preset angle compensation value to the electrical angle value of the rotor to generate the corrected electrical angle value may include:
  • the electrical angle offset value can be pre-configured, of course, it can also be obtained in other ways.
  • the method may also include:
  • the initial electrical angle value is used as the electrical angle offset value of the rotor.
  • the rotor is positioned to the target position in advance, and the initial electrical angle value corresponding to the target position is used as the electrical angle offset value, so that the calibration step in the above-mentioned embodiment 1 can be omitted, which enables the motor to start faster.
  • the method may further include:
  • the rotor of the motor is controlled to rotate in the preset first direction with the rotating first vector voltage, and when it is detected that the code disc provided on the rotor generates the nth signal edge, it is recorded The first electrical angle value of the current first vector voltage;
  • the rotor of the motor is controlled to rotate in a preset second direction with a rotating second vector voltage, and when it is detected that the code disc generates the nth signal edge, it is recorded The second electrical angle value of the current second vector voltage;
  • the electrical angle offset value is calculated by using the method in the embodiment shown in FIG. 1.
  • the related content has been described in detail in the embodiment shown in FIG. 1, and will not be repeated here.
  • the absolute position detected by the position sensor can be corrected by a preset angle compensation value to avoid the above-mentioned problem of inability to start due to low accuracy.
  • FIG. 4 is a flowchart of another embodiment of a motor control method provided by an embodiment of the application.
  • the method is applied to a motor, the motor includes a rotor, and a position sensor is provided on the rotor.
  • the position sensor is used for The absolute mechanical position of the rotor is detected.
  • the method can include the following steps:
  • the angle compensation value can be used to compensate at this time to ensure that the motor can be started to achieve effective control of the motor.
  • the angle compensation value can be used for correction to obtain the corrected electrical angle value of the rotor, so as to avoid the situation that the motor cannot be started.
  • the absolute mechanical position of the rotor is acquired by the position sensor, and the electrical angle value of the rotor is acquired according to a preset correspondence between the absolute mechanical position of the rotor and the electrical angle value Can include:
  • the absolute mechanical position of the rotor is obtained by the position sensor, and the electrical angle value of the rotor is obtained according to the absolute mechanical position of the rotor and a preset electrical angle offset value.
  • the absolute mechanical position may be multiplied by the number of poles of the motor, and the preset electrical angle offset value is added to obtain the electrical angle value of the rotor.
  • the preset electrical angle offset value may be preset according to actual application conditions.
  • Figure 5 is a flowchart of another embodiment of a motor control method provided by an embodiment of the application.
  • the method is applied to a motor, the motor includes a rotor, and an encoder is provided on the rotor.
  • the method may include the following Steps:
  • the initial electrical angle value can be set by the user or automatically set by the system.
  • the electrical angle value of the rotor can be calculated according to the following formula:
  • EleAngle Direction*Index*Resolution EleAngel +EleAngle_initial;
  • EleAngle represents the electrical angle value of the rotor
  • Index represents the signal edge count of the current code disk
  • Resolution EleAngel represents the electrical angle resolution of the code disk
  • EleAngle_initial represents the initial electrical angle value
  • the rotor is positioned to the target position in advance, and the preset initial electrical angle value corresponding to the target position is used as the electrical angle offset value, so that the calibration step in the above embodiment 1 can be omitted, which makes the motor faster Start.
  • EleAngleError in formula (2) is the corresponding electrical angle error range between the two scale edges of the code wheel, for example, For encoders with electrical angle resolution of 90°, the range of EleAngleError is (0°, 90°) or (-90°, 0°].
  • FIG. 6 is a schematic structural diagram of an embodiment of a motor control device provided by an embodiment of the application, including a memory 601 and a processor 602;
  • the memory 601 stores one or more computer program instructions
  • the one or more computer program instructions of the processor 602 are used to execute the motor control method according to any one of claims 1-10.
  • the motor control device described in FIG. 6 can specifically execute the motor control method described in the embodiment shown in FIG. 1, and its implementation principles and technical effects will not be repeated.
  • FIG. 7 is a schematic structural diagram of another embodiment of a motor control device provided by an embodiment of the application.
  • the device may include a memory 701 and a processor 702;
  • the memory 701 stores one or more computer program instructions
  • the processor 702 adjusts the one or more computer program instructions to execute the motor control method according to any one of claims 11-13.
  • the motor control device described in FIG. 7 can execute the motor control method described in the embodiment shown in FIG. 2, and its implementation principles and technical effects will not be repeated.
  • FIG. 8 is a schematic structural diagram of another embodiment of a motor control device provided by an embodiment of the application.
  • the device may include a memory 801 and a processor 802;
  • the memory 801 stores one or more computer program instructions
  • the processor 802 adjusts the one or more computer program instructions to execute the motor control method according to any one of claims 14-16.
  • the motor control device described in FIG. 8 can execute the motor control method described in the embodiment shown in FIG. 3, and its implementation principles and technical effects will not be repeated.
  • FIG. 9 is a schematic structural diagram of another embodiment of a motor control device provided by an embodiment of the application.
  • the device may include a memory 901 and a processor 902;
  • the memory stores one or more computer program instructions
  • the processor adjusts the one or more computer program instructions to execute the motor control method according to any one of claims 17-18.
  • the motor control device described in FIG. 9 can execute the motor control method described in the embodiment shown in FIG. 4, and its implementation principles and technical effects will not be repeated.
  • FIG. 10 is a schematic structural diagram of another embodiment of a motor control device provided by an embodiment of the application.
  • the device may include a memory 1001 and a processor 1002;
  • the memory 1001 stores one or more computer program instructions
  • the processor 1002 adjusts the one or more computer program instructions to execute the motor control method according to claim 19 above.
  • the motor control device described in FIG. 10 can execute the motor control method described in the embodiment shown in FIG. 5, and its implementation principles and technical effects will not be repeated.
  • the embodiment of the present application also provides a motor.
  • the motor may include a rotor 1101, an encoder 1102, a memory 1103, and a processor 1104; wherein, the encoder 1102 is installed on the rotor 1101, and follow the rotor 1101 to rotate;
  • the memory 1103 stores one or more computer program instructions
  • the processor 1104 is configured to call and execute the one or more computer program instructions to perform the following steps:
  • the rotor 1201 of the motor is controlled to rotate in the preset first direction by the rotating first vector voltage.
  • the encoder 1202 provided on the rotor 1201 When detecting that the encoder 1202 provided on the rotor 1201 generates the n-th signal edge
  • n is an odd number, and n ⁇ 1;
  • the rotor 1201 of the motor is controlled to rotate in the preset second direction with the second vector voltage of rotation.
  • the code disk 1202 generates the nth signal edge .
  • the current electrical angle value of the rotor is acquired according to the electrical angle offset value and the current signal edge count of the code disk, and the motor is controlled based on the electrical angle value of the rotor.
  • the motor may include a rotor 1201, an encoder 1202, a memory 1203, and a processor 1204; wherein the encoder 1202 is installed on the rotor 1201 , And follow the rotor 1201 to rotate;
  • the memory 1203 stores one or more computer program instructions
  • the processor 1204 is configured to call and execute the one or more computer program instructions to perform the following steps:
  • the motor is controlled based on the electrical angle value of the rotor 1201.
  • the embodiment of the present application also provides a motor.
  • the motor may include a rotor 1301, an encoder 1302, a memory 1303, and a processor 1304; wherein the encoder 1302 is mounted on the rotor 1301 , And follow the rotor 1301 to rotate;
  • the memory 1303 stores one or more computer program instructions
  • the processor 1304 is configured to call and execute the one or more computer program instructions to perform the following steps:
  • the motor is controlled based on the corrected electrical angle value.
  • the embodiment of the present application also provides a motor.
  • the motor may include a rotor 1401, a position sensor 1402, a memory 1403, and a processor 1404; wherein the position sensor 1402 is installed on the rotor 1401 , And follow the rotor 1401 to rotate;
  • the memory 1403 stores one or more computer program instructions
  • the processor 1404 is configured to call and execute the one or more computer program instructions to perform the following steps:
  • the motor is controlled based on the corrected electrical angle value.
  • the motor may include a rotor 1501, an encoder 1502, a memory 1503, and a processor 1504; wherein the encoder 1502 is mounted on the rotor 1501 , And follow the rotor 1501 to rotate;
  • the rotor is controlled to rotate to a preset target position by a vector voltage in a preset direction; the target position is correspondingly set with a preset initial electrical angle value;
  • the current electrical angle value of the rotor is acquired according to the initial electrical angle value and the current signal edge count of the encoder, and the motor is controlled based on the electrical angle value of the rotor.
  • the above-mentioned related motors must also include other necessary components for realizing the functions of the motor, such as the stator and other components.
  • the aforementioned processor may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), or a field A programmable gate array (FPGA), controller, microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • CPU central processing unit
  • ASIC application specific integrated circuit
  • DSP digital signal processor
  • DSPD digital signal processing device
  • PLD programmable logic device
  • FPGA field A programmable gate array
  • the memory is configured to store various types of data to support corresponding operations.
  • the memory can be implemented by any type of volatile or non-volatile storage devices or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable and programmable Read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM erasable and programmable Read only memory
  • PROM programmable read only memory
  • ROM read only memory
  • magnetic memory flash memory
  • flash memory magnetic disk or optical disk.
  • an embodiment of the present application also provides a computer-readable storage medium that stores a computer program that, when executed by a computer, realizes the motor control described in any of the above-mentioned embodiments shown in FIGS. 1 to 6 method.
  • the embodiment of the present application also provides a movable platform.
  • the movable platform may include a fuselage 1601;
  • the motor 1602 is installed on the fuselage and used to provide power
  • the controller 1603 executes the motor control method described in any one of the embodiments in FIGS. 1 to 5 to control the operation of the motor.

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Control Of Motors That Do Not Use Commutators (AREA)

Abstract

An electric motor control method, apparatus and device. The method comprises: starting from a preset target position, using a first vector voltage to control a rotor of an electric motor to rotate in a first direction, and when it is detected that a code wheel arranged on the rotor generates an nth signal edge, recording the current first electrical angle value of the first vector voltage; after the first electrical angle value is recorded, using a second vector voltage to control the rotor of the electric motor to rotate in a second direction, and when it is detected that the code wheel generates the nth signal edge, recording the current second electrical angle value of the second vector voltage; acquiring an electrical angle offset value of the rotor according to the first electrical angle value and the second electrical angle value; and counting and acquiring the current electrical angle value of the rotor according to the electrical angle offset value and the current signal edge of the code wheel, and controlling the electric motor on the basis of the electrical angle value of the rotor, thereby starting an electric motor without absolute position information by means of a vector method.

Description

电机控制方法、电机及可移动平台Motor control method, motor and movable platform 技术领域Technical field
本申请实施例涉及控制领域,尤其涉及一种电机控制方法、电机及可移动平台。The embodiments of the present application relate to the field of control, and in particular, to a motor control method, a motor, and a movable platform.
背景技术Background technique
对于配置有绝对位置传感器的电机,可以采用矢量控制方式启动。而对于不具备绝对位置的电机,需采用开环拖动启动。这种方法依靠一个幅值较高的矢量电压拖动电机转子转动,待转子达到一定速度后,再切换成其余方法(例如反电动势观测器)来获取位置信息,并进行矢量控制。这种使用开环拖动的方法开环拖动效率较低,需要较大的启动功率来保证不失步。For motors equipped with absolute position sensors, vector control can be used to start. For motors that do not have an absolute position, open-loop dragging is required to start. This method relies on a vector voltage with a higher amplitude to drive the motor rotor to rotate. After the rotor reaches a certain speed, it switches to other methods (such as back-EMF observer) to obtain position information and perform vector control. This method of using open-loop dragging has low open-loop dragging efficiency and requires a larger starting power to ensure that it does not lose step.
因此,在不具备绝对位置的电机上直接采用矢量控制方式进行启动为亟需解决的难题。Therefore, it is a difficult problem that needs to be solved urgently to directly adopt vector control method to start the motor without absolute position.
发明内容Summary of the invention
本申请提供了一种电机控制方法、电机及可移动平台,实现了在不具备绝对位置的电机上采用矢量方式进行启动。The application provides a motor control method, a motor, and a movable platform, which realizes the use of a vector method for starting on a motor that does not have an absolute position.
本申请的第一方面提供了一种电机控制方法,包括:The first aspect of the present application provides a motor control method, including:
由预设的目标位置开始,以旋转的第一矢量电压控制电机的转子以预设的第一方向进行转动,当检测到设于所述转子上的码盘产生第n个信号沿时,记录当前的第一矢量电压的第一电角度值;n为奇数,且n≥1;Starting from the preset target position, the rotor of the motor is controlled to rotate in the preset first direction by the rotating first vector voltage, and when it is detected that the code disc provided on the rotor generates the nth signal edge, it is recorded The first electrical angle value of the current first vector voltage; n is an odd number, and n≥1;
在记录所述第一电角度值后,以旋转的第二矢量电压控制所述电机的转子以预设的第二方向进行转动,当检测到所述码盘产生第n个信号沿时,记录当前的第二矢量电压的第二电角度值;其中,所述第一方向和所述第二方 向为相反方向;After the first electrical angle value is recorded, the rotor of the motor is controlled to rotate in a preset second direction with a rotating second vector voltage, and when it is detected that the code disc generates the nth signal edge, it is recorded The second electrical angle value of the current second vector voltage; wherein, the first direction and the second direction are opposite directions;
根据所述第一电角度值和第二电角度值获取所述转子的电角度偏移值;Obtaining the electrical angle offset value of the rotor according to the first electrical angle value and the second electrical angle value;
根据所述电角度偏移值和当前所述码盘的信号沿计数获取当前所述转子的电角度值,基于所述转子的电角度值对所述电机进行控制。The current electrical angle value of the rotor is acquired according to the electrical angle offset value and the current signal edge count of the code disk, and the motor is controlled based on the electrical angle value of the rotor.
本申请的第二方面提供了一种电机控制方法,应用于一电机,所述电机包括转子,所述转子上设有码盘,包括:The second aspect of the present application provides a motor control method, which is applied to a motor, the motor includes a rotor, and an encoder is provided on the rotor, including:
获取所述码盘的信号沿计数,将所述信号沿计数加上或减去一个预设的系数后生成修正信号沿计数;Acquiring the signal edge count of the code disc, adding or subtracting a preset coefficient to the signal edge count to generate a modified signal edge count;
根据所述修正信号沿计数和预设的所述转子的电角度偏移值获取当前所述转子的电角度值;Acquiring the current electrical angle value of the rotor according to the edge count of the correction signal and the preset electrical angle offset value of the rotor;
基于所述转子的电角度值对所述电机进行控制。The motor is controlled based on the electrical angle value of the rotor.
本申请的第三方面提供了一种电机控制方法,应用于一电机,所述电机包括转子,所述转子上设有码盘,包括:The third aspect of the present application provides a motor control method, which is applied to a motor, the motor includes a rotor, the rotor is provided with an encoder, and includes:
获取所述码盘的信号沿计数,根据所述信号沿计数和预设的所述转子的电角度偏移值获取当前所述转子的电角度值;Acquiring the signal edge count of the code disc, and acquiring the current electrical angle value of the rotor according to the signal edge count and a preset electrical angle offset value of the rotor;
将所述转子的电角度值加上或减去一个预设的角度补偿值后生成修正电角度值;Adding or subtracting a preset angle compensation value to the electrical angle value of the rotor to generate a corrected electrical angle value;
基于所述修正电角度值对所述电机进行控制。The motor is controlled based on the corrected electrical angle value.
本申请的第四方面提供了一种电机控制方法,应用于一电机,所述电机包括转子,所述转子上设有位置传感器,所述位置传感器用于检测所述转子的绝对机械位置,包括:The fourth aspect of the present application provides a motor control method applied to a motor, the motor includes a rotor, the rotor is provided with a position sensor, and the position sensor is used to detect the absolute mechanical position of the rotor, including :
通过所述位置传感器获取所述转子的绝对机械位置,根据预设的所述转子的绝对机械位置和电角度值的对应关系,获取所述转子的电角度值;Acquiring the absolute mechanical position of the rotor through the position sensor, and acquiring the electrical angle value of the rotor according to a preset correspondence between the absolute mechanical position of the rotor and the electrical angle value;
将所述转子的电角度值加上或减去一个预设的角度补偿值后生成修正电 角度值;Adding or subtracting a preset angle compensation value to the electrical angle value of the rotor to generate a corrected electrical angle value;
本申请的第五方面提供了一种电机控制方法,应用于一电机,所述电机包括转子,所述转子上设有码盘,包括步骤:The fifth aspect of the present application provides a motor control method, which is applied to a motor, the motor includes a rotor, and an encoder disk is provided on the rotor, including the steps:
通过预设方向的矢量电压控制所述转子转动至预设的目标位置;所述目标位置对应设置有预设的初始电角度值;The rotor is controlled to rotate to a preset target position by a vector voltage in a preset direction; the target position is correspondingly set with a preset initial electrical angle value;
从所述目标位置开始,根据所述初始电角度值和当前所述码盘的信号沿计数获取当前所述转子的电角度值,基于所述转子的电角度值对所述电机进行控制。Starting from the target position, the current electrical angle value of the rotor is acquired according to the initial electrical angle value and the current signal edge count of the encoder, and the motor is controlled based on the electrical angle value of the rotor.
本申请的第六方面提供了一种电机控制装置,包括处理器和存储器;所述存储器存储一条或多条计算机程序指令;A sixth aspect of the present application provides a motor control device, including a processor and a memory; the memory stores one or more computer program instructions;
所述处理器调整所述一条或多条计算机程序指令用以执行上述第一方面所述的电机控制方法。The processor adjusts the one or more computer program instructions to execute the motor control method described in the first aspect.
本申请的第七方面提供了一种电机控制装置,包括处理器和存储器;所述存储器存储一条或多条计算机程序指令;A seventh aspect of the present application provides a motor control device, including a processor and a memory; the memory stores one or more computer program instructions;
所述处理器调整所述一条或多条计算机程序指令用以执行上述第二方面所述的电机控制方法。The processor adjusts the one or more computer program instructions to execute the motor control method described in the second aspect.
本申请的第八方面提供了一种电机控制装置,包括处理器和存储器;所述存储器存储一条或多条计算机程序指令;An eighth aspect of the present application provides a motor control device, including a processor and a memory; the memory stores one or more computer program instructions;
所述处理器调整所述一条或多条计算机程序指令用以执行上述第三方面所述的电机控制方法。The processor adjusts the one or more computer program instructions to execute the motor control method described in the third aspect.
本申请的第九方面提供了一种电机控制装置,包括处理器和存储器;所述存储器存储一条或多条计算机程序指令;A ninth aspect of the present application provides a motor control device, including a processor and a memory; the memory stores one or more computer program instructions;
所述处理器调整所述一条或多条计算机程序指令用以执行上述第四方面所述的电机控制方法。The processor adjusts the one or more computer program instructions to execute the motor control method described in the fourth aspect.
本申请的第十方面提供了一种电机控制装置,包括处理器和存储器;所述存储器存储一条或多条计算机程序指令;A tenth aspect of the present application provides a motor control device, including a processor and a memory; the memory stores one or more computer program instructions;
所述处理器调整所述一条或多条计算机程序指令用以执行上述第五方面所述的电机控制方法。The processor adjusts the one or more computer program instructions to execute the motor control method described in the fifth aspect.
本申请的第十一方面提供了一种电机,包括转子、码盘、存储器和处理器;所述码盘安装在所述转子上,并跟随所述转子转动;The eleventh aspect of the present application provides a motor, including a rotor, a code disc, a memory, and a processor; the code disc is installed on the rotor and rotates with the rotor;
所述存储器存储一条或多条计算机程序指令;The memory stores one or more computer program instructions;
所述处理器用于调用并执行所述一条或多条计算机程序指令用以执行以下步骤:The processor is used to call and execute the one or more computer program instructions to perform the following steps:
由预设的目标位置开始,以旋转的第一矢量电压控制电机的转子以预设的第一方向进行转动,当检测到设于所述转子上的码盘产生第n个信号沿时,记录当前的第一矢量电压的第一电角度值;n为奇数,且n≥1;Starting from the preset target position, the rotor of the motor is controlled to rotate in the preset first direction by the rotating first vector voltage, and when it is detected that the code disc provided on the rotor generates the nth signal edge, it is recorded The first electrical angle value of the current first vector voltage; n is an odd number, and n≥1;
在记录所述第一电角度值后,以旋转的第二矢量电压控制所述电机的转子以预设的第二方向进行转动,当检测到所述码盘产生第n个信号沿时,记录当前的第二矢量电压的第二电角度值;其中,所述第一方向和所述第二方向为相反方向;After the first electrical angle value is recorded, the rotor of the motor is controlled to rotate in a preset second direction with a rotating second vector voltage, and when it is detected that the code disc generates the nth signal edge, it is recorded The second electrical angle value of the current second vector voltage; wherein, the first direction and the second direction are opposite directions;
根据所述第一电角度值和第二电角度值获取所述转子的电角度偏移值;Obtaining the electrical angle offset value of the rotor according to the first electrical angle value and the second electrical angle value;
根据所述电角度偏移值和当前所述码盘的信号沿计数获取当前所述转子的电角度值,基于所述转子的电角度值对所述电机进行控制。The current electrical angle value of the rotor is acquired according to the electrical angle offset value and the current signal edge count of the code disk, and the motor is controlled based on the electrical angle value of the rotor.
本申请的第十二方面提供了一种电机,包括转子、码盘、存储器和处理器;所述码盘安装在所述转子上,并跟随所述转子转动;The twelfth aspect of the present application provides a motor, including a rotor, a code disc, a memory, and a processor; the code disc is installed on the rotor and rotates with the rotor;
所述存储器存储一条或多条计算机程序指令;The memory stores one or more computer program instructions;
所述处理器用于调用并执行所述一条或多条计算机程序指令用以执行以下步骤:The processor is used to call and execute the one or more computer program instructions to perform the following steps:
获取所述码盘的信号沿计数,将所述信号沿计数加上或减去一个预设的系数后生成修正信号沿计数;Acquiring the signal edge count of the code disc, adding or subtracting a preset coefficient to the signal edge count to generate a modified signal edge count;
根据所述修正信号沿计数和预设的所述转子的电角度偏移值获取当前所述转子的电角度值;Acquiring the current electrical angle value of the rotor according to the edge count of the correction signal and the preset electrical angle offset value of the rotor;
基于所述转子的电角度值对所述电机进行控制。The motor is controlled based on the electrical angle value of the rotor.
本申请的第十三方面提供了一种电机,包括转子、码盘、存储器和处理器;所述码盘安装在所述转子上,并跟随所述转子转动;The thirteenth aspect of the present application provides a motor, including a rotor, a code disc, a memory, and a processor; the code disc is installed on the rotor and rotates with the rotor;
所述存储器存储一条或多条计算机程序指令;The memory stores one or more computer program instructions;
所述处理器用于调用并执行所述一条或多条计算机程序指令用以执行以下步骤:The processor is used to call and execute the one or more computer program instructions to perform the following steps:
获取所述码盘的信号沿计数,根据所述信号沿计数和预设的所述转子的电角度偏移值获取当前所述转子的电角度值;Acquiring the signal edge count of the code disc, and acquiring the current electrical angle value of the rotor according to the signal edge count and a preset electrical angle offset value of the rotor;
将所述转子的电角度值加上或减去一个预设的角度补偿值后生成修正电角度值;Adding or subtracting a preset angle compensation value to the electrical angle value of the rotor to generate a corrected electrical angle value;
基于所述修正电角度值对所述电机进行控制。The motor is controlled based on the corrected electrical angle value.
本申请的第十四方面提供了一种电机,包括转子、位置传感器、存储器和处理器;所述位置传感器安装在所述转子上;A fourteenth aspect of the present application provides a motor, including a rotor, a position sensor, a memory, and a processor; the position sensor is installed on the rotor;
所述存储器存储一条或多条计算机程序指令;The memory stores one or more computer program instructions;
所述处理器用于调用并执行所述一条或多条计算机程序指令用以执行以下步骤:The processor is used to call and execute the one or more computer program instructions to perform the following steps:
通过所述位置传感器获取所述转子的绝对机械位置,根据预设的所述转子的绝对机械位置和电角度值的对应关系,获取所述转子的电角度值;Acquiring the absolute mechanical position of the rotor through the position sensor, and acquiring the electrical angle value of the rotor according to a preset correspondence between the absolute mechanical position of the rotor and the electrical angle value;
将所述转子的电角度值加上或减去一个预设的角度补偿值后生成修正电角度值;Adding or subtracting a preset angle compensation value to the electrical angle value of the rotor to generate a corrected electrical angle value;
基于所述修正电角度值对所述电机进行控制。The motor is controlled based on the corrected electrical angle value.
本申请的第十五方面提供了一种电机,包括转子、码盘、存储器和处理器;所述码盘安装在所述转子上,并跟随所述转子转动;The fifteenth aspect of the present application provides a motor, including a rotor, a code disk, a memory, and a processor; the code disk is installed on the rotor and rotates with the rotor;
所述存储器存储一条或多条计算机程序指令;The memory stores one or more computer program instructions;
所述处理器用于调用并执行所述一条或多条计算机程序指令用以执行以下步骤:The processor is used to call and execute the one or more computer program instructions to perform the following steps:
通过预设方向的矢量电压控制所述转子转动至预设的目标位置;所述目标位置对应设置有预设的初始电角度值;The rotor is controlled to rotate to a preset target position by a vector voltage in a preset direction; the target position is correspondingly set with a preset initial electrical angle value;
从所述目标位置开始,根据所述初始电角度值和当前所述码盘的信号沿计数获取当前所述转子的电角度值,基于所述转子的电角度值对所述电机进行控制。Starting from the target position, the current electrical angle value of the rotor is acquired according to the initial electrical angle value and the current signal edge count of the encoder, and the motor is controlled based on the electrical angle value of the rotor.
本申请的第十五方面提供了一种计算机可读存储介质,存储有计算机程序,所述计算机程序被计算机执行时实现上述第一方面~第五方面中任一方面所述的电机控制方法。A fifteenth aspect of the present application provides a computer-readable storage medium that stores a computer program that, when executed by a computer, implements the motor control method described in any one of the first to fifth aspects.
本申请的第十六方面提供了一种可移动平台,机身;The sixteenth aspect of this application provides a movable platform and a fuselage;
电机,安装在所述机身,用于提供动力;The motor is installed on the fuselage and used to provide power;
控制器,用于执行上述第一方面~第五方面中任一方面所述的电机控制方法,控制所述电机的运行。The controller is configured to execute the motor control method described in any one of the first aspect to the fifth aspect, and control the operation of the motor.
本申请实施例中,由预设的目标位置开始,以旋转的第一矢量电压控制电机的转子以预设的第一方向进行转动,当检测到设于所述转子上的码盘产生第n个信号沿时,记录当前的第一矢量电压的第一电角度值;在记录所述第一电角度值后,以旋转的第二矢量电压控制所述电机的转子以预设的第二方向进行转动,当检测到所述码盘产生第n信号沿时,记录当前的第二矢量电压的第二电角度值;根据所述第一电角度值和第二电角度值获取所述转子 的电角度偏移值;根据所述电角度偏移值和当前所述码盘的信号沿计数获取当前所述转子的电角度值,基于所述转子的电角度值对所述电机进行控制,通过本申请实施例的技术方案实现了在不具备绝对位置的电机上采用矢量方式进行启动。In the embodiment of the present application, starting from the preset target position, the rotor of the motor is controlled to rotate in the preset first direction with the rotating first vector voltage, and when it is detected that the code disc provided on the rotor produces the nth Record the first electrical angle value of the current first vector voltage when there are two signal edges; after recording the first electrical angle value, use the rotating second vector voltage to control the rotor of the motor in the preset second direction When the code wheel is detected to generate the n-th signal edge, the second electrical angle value of the current second vector voltage is recorded; the rotor's electrical angle value is obtained according to the first electrical angle value and the second electrical angle value. Electrical angle offset value; obtain the current electrical angle value of the rotor according to the electrical angle offset value and the current signal edge count of the code disc, and control the motor based on the electrical angle value of the rotor, by The technical solution of the embodiment of the present application realizes that a vector mode is used for starting on a motor that does not have an absolute position.
附图说明Description of the drawings
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described here are used to provide a further understanding of the application and constitute a part of the application. The exemplary embodiments and descriptions of the application are used to explain the application, and do not constitute an improper limitation of the application. In the attached picture:
图1为本申请实施例提供的一种电机控制方法一个实施例的流程示意图;FIG. 1 is a schematic flowchart of an embodiment of a motor control method provided by an embodiment of this application;
图2为本申请实施例提供的一种电机控制方法的又一个实施例的流程示意图;2 is a schematic flowchart of another embodiment of a motor control method provided by an embodiment of this application;
图3为本申请实施例提供的一种电机控制方法的又一个实施例的流程示意图;3 is a schematic flowchart of another embodiment of a motor control method provided by an embodiment of the application;
图4为本申请实施例提供的一种电机控制方法的又一个实施例的流程示意图;4 is a schematic flowchart of another embodiment of a motor control method provided by an embodiment of the application;
图5为本申请实施例提供的一种电机控制方法的又一个实施例的流程示意图;5 is a schematic flowchart of another embodiment of a motor control method provided by an embodiment of the application;
图6为本申请实施例提供的一种电机控制装置的一个实施例的结构示意图;6 is a schematic structural diagram of an embodiment of a motor control device provided by an embodiment of the application;
图7为本申请实施例提供的一种电机控制装置的一个实施例的结构示意图;FIG. 7 is a schematic structural diagram of an embodiment of a motor control device provided by an embodiment of this application;
图8为本申请实施例提供的一种电机控制装置的一个实施例的结构示意图;FIG. 8 is a schematic structural diagram of an embodiment of a motor control device provided by an embodiment of the application;
图9为本申请实施例提供的一种电机控制装置的一个实施例的结构示意图;FIG. 9 is a schematic structural diagram of an embodiment of a motor control device provided by an embodiment of this application;
图10为本申请实施例提供的一种电机控制装置的一个实施例的结构示意 图;Fig. 10 is a schematic structural diagram of an embodiment of a motor control device provided by an embodiment of the application;
图11为本申请实施例提供的一种电机一个实施例的结构示意图;FIG. 11 is a schematic structural diagram of an embodiment of a motor provided by an embodiment of this application;
图12为本申请实施例提供的一种电机又一个实施例的结构示意图;FIG. 12 is a schematic structural diagram of another embodiment of a motor provided by an embodiment of this application;
图13为本申请实施例提供的一种电机又一个实施例的结构示意图;FIG. 13 is a schematic structural diagram of another embodiment of a motor provided by an embodiment of this application;
图14为本申请实施例提供的一种电机又一个实施例的结构示意图;14 is a schematic structural diagram of another embodiment of a motor provided by an embodiment of this application;
图15为本申请实施例提供的一种电机又一个实施例的结构示意图;15 is a schematic structural diagram of another embodiment of a motor provided by an embodiment of this application;
图16为本申请实施例提供的一种可移动平台一个实施例的结构示意图。FIG. 16 is a schematic structural diagram of an embodiment of a movable platform provided by an embodiment of this application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field of this application. The terminology used in the specification of the application herein is only for the purpose of describing specific embodiments, and is not intended to limit the application.
本申请实施例的技术方案可应用于永磁同步电机(英文:permanent magnet synchronous motor,简称:PMSM)的控制场景中,包括电机启动及运行等。其中,永磁同步电机是由永磁体励磁产生同步旋转磁场的同步电机,永磁体作为转子产生旋转磁场,三相定子绕组在旋转磁场作用下通过电枢反应,感应三相对称电流。The technical solution of the embodiment of the present application can be applied to the control scenario of a permanent magnet synchronous motor (English: permanent magnet synchronous motor, PMSM for short), including motor startup and operation. Among them, a permanent magnet synchronous motor is a synchronous motor that generates a synchronous rotating magnetic field by permanent magnet excitation. The permanent magnet acts as a rotor to generate a rotating magnetic field. The three-phase stator winding reacts through the armature under the action of the rotating magnetic field to induce a three-phase symmetrical current.
对电机进行控制需要获知转子位置,目前码盘、旋转变压器、霍尔等是常用的检测转子位置的传感器。To control the motor, it is necessary to know the position of the rotor. At present, encoders, resolvers, and Hall sensors are commonly used sensors to detect the position of the rotor.
若想对电机实现矢量控制,需要获知转子的电角度,其中,对于转子而言,电角度也即是指电位置,下文多以角度概念描述转子的位置。通常而言,电角度是由机械角度乘以电机对极数获得,机械角度也即由位置传感器检测 获得。然而,由于位置传感器的初始安装位置存在不同,因此,转子的实际电角度和通过以上方式计算得到的电角度存在偏差,这会影响电机的矢量控制。If you want to achieve vector control of a motor, you need to know the electrical angle of the rotor. For the rotor, the electrical angle also refers to the electrical position. The position of the rotor is described in the concept of angle below. Generally speaking, the electrical angle is obtained by multiplying the mechanical angle by the number of poles of the motor, and the mechanical angle is also obtained by the detection of the position sensor. However, due to the difference in the initial installation position of the position sensor, there is a deviation between the actual electrical angle of the rotor and the electrical angle calculated by the above method, which will affect the vector control of the motor.
为了对电机实现有效、准确的控制,发明人经过一系列研究提出了本申请的技术方案。In order to achieve effective and accurate control of the motor, the inventor proposed the technical solution of the application after a series of studies.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative work shall fall within the protection scope of this application.
图1为本申请实施例提供的一种电机控制方法一个实施例的流程图,该电机可以是指永磁同步电机,该方法可以包括标定步骤以及控制步骤;FIG. 1 is a flowchart of an embodiment of a motor control method provided by an embodiment of the application. The motor may be a permanent magnet synchronous motor, and the method may include a calibration step and a control step;
所述标定步骤包括:The calibration step includes:
101:由预设的目标位置开始,以旋转的第一矢量电压控制电机的转子以预设的第一方向进行转动,当检测到设于转子上的码盘产生第n个信号沿时,记录当前的第一矢量电压的第一电角度值,其中,n为奇数,且n≥1。101: Starting from the preset target position, the rotor of the motor is controlled to rotate in the preset first direction with the rotating first vector voltage, and when the n-th signal edge generated by the code disc set on the rotor is detected, record The current first electrical angle value of the first vector voltage, where n is an odd number and n≥1.
本实施例中,电机的转子上设置的位置传感器为码盘,信号沿可以是指脉冲信号沿或跳变沿。优选地,所述码盘为增量式编码器(Incremental encoder)。In this embodiment, the position sensor provided on the rotor of the motor is a code disc, and the signal edge may refer to a pulse signal edge or a transition edge. Preferably, the code disc is an incremental encoder (Incremental encoder).
可选地,可以具体是以旋转的第一矢量电压控制电机在不失步的情况下以预设的第一方向进行转动。例如,可以通过控制第一矢量电压的幅值和旋转的速度来避免失步问题的产生。Optionally, the rotating first vector voltage may be specifically used to control the motor to rotate in the preset first direction without losing step. For example, the amplitude of the first vector voltage and the speed of rotation can be controlled to avoid the out-of-step problem.
该第一矢量电压可以选择保证电机的转子能够转动且不失步情况下的最小矢量电压,通过第一矢量电压可以控制转子以预设的转动速度缓慢转动。The first vector voltage can be selected to ensure that the rotor of the motor can rotate without losing step. The rotor can be controlled to rotate slowly at a preset rotation speed through the first vector voltage.
其中,该第一电角度值即是指第一矢量电压当前施加给转子的矢量角度。Wherein, the first electrical angle value refers to the vector angle currently applied to the rotor by the first vector voltage.
其中,该目标位置可以对电机的转子进行预定位获得,因此,所述由预设的目标位置开始,以旋转的第一矢量电压控制电机的转子之前,所述标定 步骤还可以包括:Wherein, the target position can be obtained by pre-positioning the rotor of the motor. Therefore, before starting from the preset target position and controlling the rotor of the motor with the rotating first vector voltage, the calibration step may further include:
通过预设方向的第三矢量电压控制所述转子转动至预设的所述目标位置。The rotor is controlled to rotate to the preset target position through the third vector voltage in the preset direction.
102:在记录所述第一电角度值后,以旋转的第二矢量电压控制所述电机的转子以预设的第二方向进行转动,当检测到所述码盘产生第n个信号沿时,记录当前的第二矢量电压的第二电角度值。102: After recording the first electrical angle value, use the rotating second vector voltage to control the rotor of the motor to rotate in a preset second direction, and when it is detected that the code wheel generates the nth signal edge , Record the second electrical angle value of the current second vector voltage.
其中,所述第二方向与所述第一方向相反。Wherein, the second direction is opposite to the first direction.
可选地,可以具体是以旋转的第二矢量电压控制电机的转子在不失步的情况下以预设的第二方向进行转动。通过这种方式,可以解决现有技术通过开环拖动容易产生失步的问题。Optionally, the rotating second vector voltage may be specifically used to control the rotor of the motor to rotate in the preset second direction without losing step. In this way, the problem that the prior art is prone to out-of-step through open-loop dragging can be solved.
该第二矢量电压可以选择保证电机的转子能够转动且不失步情况下的最小矢量电压。The second vector voltage can be selected to ensure that the rotor of the motor can rotate without losing the minimum vector voltage.
可选地,在记录所述第一电角度值后,以旋转的第二矢量电压控制所述电机的转子以预设的第二方向进行转动前,所述方法还可以包括:Optionally, after the first electrical angle value is recorded, before controlling the rotor of the motor to rotate in a preset second direction with a rotating second vector voltage, the method may further include:
以所述第一矢量电压继续控制所述转子以所述第一方向进行转动,在所述码盘产生下一个信号沿前控制所述转子停止在所述第一方向上的转动。The first vector voltage is used to continue to control the rotor to rotate in the first direction, and to control the rotor to stop rotating in the first direction before the code wheel generates a next signal edge.
通过以上步骤,可以保证转子以第二方向转动时,可以经过转子以第一方向转动时经过的同一个码盘刻度。Through the above steps, it can be ensured that when the rotor rotates in the second direction, it can pass through the same code wheel scale that the rotor rotates in the first direction.
103:根据所述第一电角度值和第二电角度值获取所述转子的电角度偏移值。103: Obtain an electrical angle offset value of the rotor according to the first electrical angle value and the second electrical angle value.
可选地,该电角度偏移值可以具体为第一电角度值以及第二电角度值的和值的二分之一,也即电角度偏移值=(第一电角度值+第二角度值)/2。实际上,该电角度偏移值为由预设的目标位置开始,在第一方向上第(n+1)/2个码盘刻度的电角度值(即所述转子在第一方向或第二方向上经过的中间码盘刻度),其对应为机械角度为零时所对应的电角度值。Optionally, the electrical angle offset value may be specifically one half of the sum of the first electrical angle value and the second electrical angle value, that is, the electrical angle offset value = (first electrical angle value + second electrical angle value) Angle value)/2. In fact, the electrical angle offset value is the electrical angle value of the (n+1)/2th code wheel scale in the first direction starting from the preset target position (that is, the rotor is in the first direction or the first direction). The middle code wheel scale passed in the two directions), which corresponds to the electrical angle value when the mechanical angle is zero.
传统直接预定位方法只能得到粗略的相对位置和绝对位置的关系,单向拖动的方法会受到摩擦力的影响,进而无法得到准确的相对位置和绝对位置的关系。相反方向的拖动方法可以补偿摩擦力的影响,得到精确的相对位置和绝对位置的关系。因此,通过步骤101~步骤103的操作获得电角度偏移值可以消除摩擦力影响,提高电角度偏移值的准确度。The traditional direct pre-positioning method can only obtain a rough relationship between the relative position and the absolute position, and the one-way drag method will be affected by friction, and thus cannot obtain an accurate relationship between the relative position and the absolute position. The method of dragging in the opposite direction can compensate for the influence of friction and obtain the precise relationship between relative position and absolute position. Therefore, obtaining the electrical angle offset value through the operations of step 101 to step 103 can eliminate the influence of friction and improve the accuracy of the electrical angle offset value.
另外,通过以上缓慢拖动的方法可以获取机械位置和电位置的对应关系,也就是建立了码盘相对机械位置和电机绝对电位置的关系。因此,基于此作为反馈,可以采用矢量控制的方法启动电机。In addition, the corresponding relationship between the mechanical position and the electrical position can be obtained through the above slow dragging method, that is, the relationship between the relative mechanical position of the encoder and the absolute electrical position of the motor can be established. Therefore, based on this as a feedback, the vector control method can be used to start the motor.
在一优选实施例中,n=1,即转子以第一方向转动,码盘产生第一个信号沿时,记录当前第一矢量电压的第一电角度值;转子以第二方向转动,码盘产生第一个信号沿时,记录当前第二矢量电压的第二电角度。In a preferred embodiment, n=1, that is, the rotor rotates in the first direction, and when the encoder generates the first signal edge, the first electrical angle value of the current first vector voltage is recorded; the rotor rotates in the second direction, and the encoder When the disc generates the first signal edge, it records the second electrical angle of the current second vector voltage.
所述控制步骤包括:The control steps include:
104:根据所述电角度偏移值和当前所述码盘的信号沿计数获取当前所述转子的电角度值,基于所述转子的电角度值对所述电机进行控制。104: Obtain the current electrical angle value of the rotor according to the electrical angle offset value and the current signal edge count of the encoder, and control the motor based on the electrical angle value of the rotor.
在上述控制步骤中,可将所述信号沿计数设置为预设值开始计数,例如,设置为(n-1)/2。In the above control steps, the signal edge count can be set to a preset value to start counting, for example, set to (n-1)/2.
当然,也可以不将信号沿计数设置为预设值记录标定步骤完成之后的信号沿计数,之后检测得到的信号沿计数减去该记录数值,可以得到当前码盘的信号沿计数。Of course, it is not necessary to set the signal edge count to a preset value to record the signal edge count after the calibration step is completed, and then subtract the recorded value from the detected signal edge count to obtain the signal edge count of the current code disc.
此外,也可以是将信号计数清零,标定步骤开始时码盘重新计数。In addition, it is also possible to reset the signal count to zero, and the code wheel will count again when the calibration step starts.
其中,可以是将所述转子的电角度值作为角度反馈值,对所述电机实现矢量控制。Wherein, the electrical angle value of the rotor may be used as an angle feedback value to implement vector control of the motor.
本实施例中,转子的电角度值基于码盘的信号沿计数以及电角度偏移值计算获得,电角度偏移值可以补偿位置传感器的初始安装位置造成的偏差,从而获得准确的电角度,实现对电机准确控制。通过实施本发明实施例,可 以在不具备绝对位置的电机上获取转子的电角度作为反馈,从而采用矢量控制方式进行启动。In this embodiment, the electrical angle value of the rotor is calculated based on the signal edge count of the encoder and the electrical angle offset value. The electrical angle offset value can compensate for the deviation caused by the initial installation position of the position sensor, thereby obtaining an accurate electrical angle. Realize accurate control of the motor. By implementing the embodiments of the present invention, the electrical angle of the rotor can be obtained as feedback on a motor that does not have an absolute position, so that the vector control mode is used for starting.
在某些实施例中,所述根据所述电角度偏移值和当前所述码盘的信号沿计数获取当前所述转子的电角度值具体为:In some embodiments, the obtaining the current electrical angle value of the rotor according to the electrical angle offset value and the current signal edge count of the code disc specifically includes:
根据当前所述码盘的信号沿计数与预设的电角度分辨率相乘得到初始电角度值;Multiplying the preset electrical angle resolution according to the current signal edge count of the code wheel to obtain the initial electrical angle value;
根据所述初始电角度值与所述电角度偏移值生成所述转子的电角度值。The electrical angle value of the rotor is generated according to the initial electrical angle value and the electrical angle offset value.
可以是将初始电角度值加上所述电角度偏移值,生成所述转子的电角度值。It may be that the initial electrical angle value is added to the electrical angle offset value to generate the electrical angle value of the rotor.
具体的,转子的电角度值可以按照如下公式计算获得:Specifically, the electrical angle value of the rotor can be calculated according to the following formula:
EleAngle=Direction*Index*Resolution EleAngel+EleAngle_Offset---------公式(1) EleAngle=Direction*Index*Resolution EleAngel +EleAngle_Offset---------Formula (1)
其中,EleAngle表示转子的电角度值,Index表示当前码盘的信号沿计数,Resolution EleAngel表示码盘的电角度分辨率,EleAngle_Offset表示电角度偏移值。Ditection=±1表示转子的旋转方向。 Among them, EleAngle represents the electrical angle value of the rotor, Index represents the signal edge count of the current code disc, Resolution EleAngel represents the electrical angle resolution of the code disc, and EleAngle_Offset represents the electrical angle offset value. Ditection=±1 indicates the direction of rotation of the rotor.
其中,码盘的电角度分辨率为360°(度)除以码盘分辨率之后,再与电机对极数相乘获得。例如,对于设置有40线码盘的10对极电机,电角度分辨率为:
Figure PCTCN2019109635-appb-000001
Among them, the electrical angle resolution of the encoder is 360° (degree) divided by the resolution of the encoder, and then multiplied by the number of poles of the motor to obtain. For example, for a 10-pole motor with a 40-line code disc, the electrical angle resolution is:
Figure PCTCN2019109635-appb-000001
因此,根据当前所述码盘的信号沿计数与预设的电角度分辨率相乘得到初始电角度值,也即是相对角度与电机对极数的相乘得到的角度值。现有技术中,直接将初始电角度值作为电角度值,由于位置传感器的初始安装位置导致的偏差等因素,初始电角度值并不准确,本申请实施例中基于电角度偏移值对初始电角度值进行修正,获得的电角度值可以修正角度偏差,提高了电角度值的准确性。Therefore, the initial electrical angle value is obtained by multiplying the current signal edge count of the code disc and the preset electrical angle resolution, that is, the angle value obtained by multiplying the relative angle and the number of poles of the motor. In the prior art, the initial electrical angle value is directly used as the electrical angle value. Due to the deviation caused by the initial installation position of the position sensor and other factors, the initial electrical angle value is not accurate. The electrical angle value is corrected, and the obtained electrical angle value can correct the angle deviation, which improves the accuracy of the electrical angle value.
此外,对于电角度分辨率低的码盘,比如电角度分辨率为90°的码盘, 电角度误差范围为(0°,90°]或(-90°,0°],这时的电机扭矩下限为:In addition, for code discs with low electrical angle resolution, such as code discs with electrical angle resolution of 90°, the electrical angle error range is (0°, 90°) or (-90°, 0°], at this time the motor The lower limit of torque is:
T min=K T*I q*cos min(EleAngleError)=K T*I q*cos(90°)=0---------公式(2) T min =K T *I q *cos min (EleAngleError)=K T *I q *cos(90°)=0---------Formula (2)
其中,K T为计算输出扭矩使用的参数,与电机固有特性有关;I q为电机旋转q轴对应的电流值,EleAngleError为电角度误差。 Among them, K T is a parameter used to calculate the output torque, which is related to the inherent characteristics of the motor; I q is the current value corresponding to the q axis of the motor rotating, and EleAngleError is the electrical angle error.
电机扭矩为0Nm(牛米),则无法启动电机。If the motor torque is 0Nm (Nm), the motor cannot be started.
为了可以正常启动电机,作为一种可选方式,所述根据所述电角度偏移值和当前所述码盘的信号沿计数获取当前所述转子的电角度值可以包括:In order to start the motor normally, as an alternative, the obtaining the current electrical angle value of the rotor according to the electrical angle offset value and the current signal edge count of the code disc may include:
获取所述码盘的信号沿计数,将所述信号沿计数加上或减去一个预设的系数后生成修正信号沿计数;Acquiring the signal edge count of the code disc, adding or subtracting a preset coefficient to the signal edge count to generate a modified signal edge count;
根据所述修正信号沿计数和所述电角度偏移值获取当前所述转子的电角度值;Acquiring the current electrical angle value of the rotor according to the edge count of the correction signal and the electrical angle offset value;
基于所述转子的电角度值对所述电机进行控制。The motor is controlled based on the electrical angle value of the rotor.
具体地,该电角度值可以按照如下公式计算获得;Specifically, the electrical angle value can be calculated according to the following formula;
EleAngle=Direction*(Index±α)*Resolution EleAngel+EleAngle_Offset-----公式(3) EleAngle=Direction*(Index±α)*Resolution EleAngel +EleAngle_Offset-----Formula (3)
其中,EleAngle表示转子的电角度值,Index表示当前码盘的信号沿计数,Resolution EleAngel表示码盘的电角度分辨率,EleAngle_Offset表示电角度偏移值。Direction=±1表示转子的旋转方向,α表示预设的系数。 Among them, EleAngle represents the electrical angle value of the rotor, Index represents the signal edge count of the current code disc, Resolution EleAngel represents the electrical angle resolution of the code disc, and EleAngle_Offset represents the electrical angle offset value. Direction=±1 indicates the direction of rotation of the rotor, and α indicates a preset coefficient.
其中,该预设的系数可以大于0且小于1,在一个实际应用中,该预设的系数可以为二分之一。Wherein, the preset coefficient may be greater than 0 and less than 1. In an actual application, the preset coefficient may be one-half.
通过加上或减去一个预设的系数之后,假设预设的系数为二分之一,则码盘的角度误差范围变为(-45°,45°],这时的电机扭矩下限为:After adding or subtracting a preset coefficient, assuming that the preset coefficient is one-half, the angle error range of the encoder becomes (-45°, 45°), and the lower limit of the motor torque at this time is:
Figure PCTCN2019109635-appb-000002
Figure PCTCN2019109635-appb-000002
此时,电机就可以以正常扭矩T=K T*I q
Figure PCTCN2019109635-appb-000003
倍的扭矩进行启动,可以实现启动。因此,在本实施例中,使用相邻沿的中点作为电角度反馈,可以有 效优化电机扭矩的下限。
At this time, the motor can use the normal torque T=K T *I q
Figure PCTCN2019109635-appb-000003
It can be started with twice the torque. Therefore, in this embodiment, using the midpoint of the adjacent edges as the electrical angle feedback can effectively optimize the lower limit of the motor torque.
其中,在某些实施例中,基于所述转子的电角度值对所述电机进行控制时,所述转子转动的方向为第三方向;所述获取所述码盘的信号沿计数,将所述信号沿计数加上或减去一个预设的系数后生成修正信号沿计数具体为:Wherein, in some embodiments, when the motor is controlled based on the electrical angle value of the rotor, the direction of rotation of the rotor is a third direction; The signal edge count plus or minus a preset coefficient to generate the modified signal edge count is specifically:
当所述第一方向与所述第三方向相反时,将所述信号沿计数加上一个预设的系数后生成修正信号沿计数。When the first direction is opposite to the third direction, the signal edge count is added to a preset coefficient to generate a modified signal edge count.
在某些实施例中,基于所述转子的电角度值对所述电机进行控制时,所述转子转动的方向为第三方向;所述获取所述码盘的信号沿计数,将所述信号沿计数加上或减去一个预设的系数后生成修正信号沿计数具体为:In some embodiments, when the motor is controlled based on the electrical angle value of the rotor, the direction of rotation of the rotor is the third direction; the acquisition of the signal edge count of the code disk, and the signal The edge count adds or subtracts a preset coefficient to generate a modified signal. The edge count is specifically:
当所述第一方向与所述第三方向相同时,将所述信号沿计数减去一个预设的系数后生成修正信号沿计数。When the first direction is the same as the third direction, the signal edge count is subtracted by a preset coefficient to generate a modified signal edge count.
作为另一种可选方式,所述根据所述电角度偏移值和当前所述码盘的信号沿计数获取当前所述转子的电角度值包括:As another optional manner, the obtaining the current electrical angle value of the rotor according to the electrical angle offset value and the current signal edge count of the code disc includes:
根据当前所述码盘的信号沿计数与预设的电角度分辨率相乘得到初始电角度值;Multiplying the preset electrical angle resolution according to the current signal edge count of the code wheel to obtain the initial electrical angle value;
根据所述初始电角度值、所述电角度偏移值和预设的电角度补偿值生成所述转子的电角度值。The electrical angle value of the rotor is generated according to the initial electrical angle value, the electrical angle offset value, and a preset electrical angle compensation value.
具体地,该电角度值可以按照如下公式计算获得;Specifically, the electrical angle value can be calculated according to the following formula;
EleAngle=Direction*Index*Resolution EleAngel+EleAngle Offset+EleAngle compensate--------------------------------------------------------------------------------------公式(5) EleAngle=Direction*Index*Resolution EleAngel +EleAngle Offset +EleAngle compensate ------------------------------------ -------------------------------------------------- Formula (5)
其中,EleAngle表示转子的电角度值,Index表示当前码盘的信号沿计数,Resolution EleAngel表示码盘的电角度分辨率,EleAngle_Offset表示电角度偏移值。Direction=±1表示转子的旋转方向,EleAngle compensate表示电角度补偿值。 Among them, EleAngle represents the electrical angle value of the rotor, Index represents the signal edge count of the current code disc, Resolution EleAngel represents the electrical angle resolution of the code disc, and EleAngle_Offset represents the electrical angle offset value. Direction=±1 indicates the rotation direction of the rotor, and EleAngle compensate indicates the electrical angle compensation value.
该预设的电角度补偿值小于码盘的电角度分辨率,例如该电角度补偿值可以为电角度分辨率的二分之一,实现使用相邻沿的中点作为电角度反馈, 可以有效优化电机扭矩的下限。The preset electrical angle compensation value is less than the electrical angle resolution of the code disc. For example, the electrical angle compensation value can be one-half of the electrical angle resolution, so that the midpoint of adjacent edges is used as electrical angle feedback, which can be effective Optimize the lower limit of motor torque.
可选地,可以是将所述初始电角度值与所述电角度偏移值相加,再加上或减去预设的电角度补偿值,获得所述转子的电角度值。Optionally, the initial electrical angle value and the electrical angle offset value may be added, and a preset electrical angle compensation value is added or subtracted to obtain the electrical angle value of the rotor.
具体的,基于所述转子的基于所述转子的电角度值对所述电机进行控制时,所述转子转动的方向为第三方向;Specifically, when the motor is controlled based on the electrical angle value of the rotor based on the rotor, the direction of rotation of the rotor is the third direction;
优选地,当所述第一方向与所述第三方向相反时,在所述初始电角度值与所述电角度偏移值相加的基础上,再加上该预设的电角度补偿值,获得转子的电角度值;Preferably, when the first direction is opposite to the third direction, the preset electrical angle compensation value is added on the basis of the addition of the initial electrical angle value and the electrical angle offset value To obtain the electrical angle value of the rotor;
当所述第一方向与所述第三方向相同时,在所述初始电角度值与所述电角度偏移值相加的基础上,减去该预设的电角度补偿值,获得转子的电角度值。When the first direction is the same as the third direction, on the basis of the addition of the initial electrical angle value and the electrical angle offset value, the preset electrical angle compensation value is subtracted to obtain the rotor Electrical angle value.
图2为本申请实施例提供的一种电机控制方法又一个实施例的流程图,该方法应用于一电机,所述电机包括转子,所述转子上设有码盘。2 is a flowchart of another embodiment of a motor control method according to an embodiment of the application. The method is applied to a motor, the motor includes a rotor, and an encoder is provided on the rotor.
该方法可以包括以下几个步骤:The method can include the following steps:
201:获取所述码盘的信号沿计数,将所述信号沿计数加上或减去一个预设的系数后生成修正信号沿计数。201: Obtain the signal edge count of the code disc, add or subtract a preset coefficient to the signal edge count to generate a modified signal edge count.
202:根据所述修正信号沿计数和预设的所述转子的电角度偏移值获取当前所述转子的电角度值。可选地,所述根据所述修正信号沿计数和预设的所述转子的电角度偏移值获取当前所述转子的电角度值可以包括:202: Acquire the current electrical angle value of the rotor according to the edge count of the correction signal and a preset electrical angle offset value of the rotor. Optionally, the obtaining the current electrical angle value of the rotor according to the correction signal edge count and a preset electrical angle offset value of the rotor may include:
根据所述修正信号沿计数与预设的电角度分辨率相乘得到初始电角度值;Multiplying the edge count of the correction signal with the preset electrical angle resolution to obtain the initial electrical angle value;
根据所述初始电角度值与所述电角度偏移值生成所述转子的电角度值。The electrical angle value of the rotor is generated according to the initial electrical angle value and the electrical angle offset value.
可以是将初始电角度值与电角度偏移值相加获得所述转子的电角度值。具体计算过程可以详见上述的公式(3)。It may be that the initial electrical angle value and the electrical angle offset value are added to obtain the electrical angle value of the rotor. The specific calculation process can be seen in the above formula (3).
203:基于所述转子的电角度值对所述电机进行控制。203: Control the motor based on the electrical angle value of the rotor.
本实施例中,对于电角度分辨率低的码盘,结合上文描述可知,电机有可能无法正常启动,也无法实现对电机的有效、准确的控制,因此,可以在码盘的信号沿计数基础加上或减去一个预设的系数后生成修正信号沿计数。利用修改信号沿计数预设的所述转子的电角度偏移值获取的转子的电角度值,即可以正常启动电机,实现对电机的有效的控制,避免发生上述提及的由于电角度分辨率太低导致的无法启动的情况。In this embodiment, for an encoder with a low electrical angle resolution, combined with the above description, the motor may not start normally, nor can it achieve effective and accurate control of the motor. Therefore, it can be counted on the signal edge of the encoder The basis adds or subtracts a preset coefficient to generate a modified signal edge count. The electrical angle value of the rotor obtained by the electrical angle offset value of the rotor preset by the modified signal edge count, that is, the motor can be started normally, and the effective control of the motor can be realized to avoid the occurrence of the above-mentioned electrical angle resolution Unable to start caused by too low.
其中,电角度偏移值可以预先配置,当然也可以采用其它方式获得。Among them, the electrical angle offset value can be pre-configured, of course, it can also be obtained in other ways.
作为一种可选方式,该方法还可以包括:As an optional way, the method may also include:
通过预设方向的矢量电压控制所述转子转动至预设的目标位置;所述目标位置对应设置有预设的初始电角度值;The rotor is controlled to rotate to a preset target position by a vector voltage in a preset direction; the target position is correspondingly set with a preset initial electrical angle value;
将所述初始电角度值作为所述转子的电角度偏移值。The initial electrical angle value is used as the electrical angle offset value of the rotor.
预先将转子定位至目标位置,将目标位置对应预设的初始电角度值作为电角度偏移值,从而可以省略了上述实施例1中的标定步骤,这使得电机能够更快的启动。The rotor is positioned to the target position in advance, and the preset initial electrical angle value corresponding to the target position is used as the electrical angle offset value, so that the calibration step in the above-mentioned embodiment 1 can be omitted, which enables the motor to start faster.
作为另一种可选方式,该方法还可以包括:As another optional manner, the method may further include:
由预设的目标位置开始,以旋转的第一矢量电压控制电机的转子以预设的第一方向进行转动,当检测到设于所述转子上的码盘产生第n个信号沿时,记录当前的第一矢量电压的第一电角度值;Starting from the preset target position, the rotor of the motor is controlled to rotate in the preset first direction with the rotating first vector voltage, and when it is detected that the code disc provided on the rotor generates the nth signal edge, it is recorded The first electrical angle value of the current first vector voltage;
在记录所述第一电角度值后,以旋转的第二矢量电压控制所述电机的转子以预设的第二方向进行转动,当检测到所述码盘产生第n个信号沿时,记录当前的第二矢量电压的第二电角度值;After the first electrical angle value is recorded, the rotor of the motor is controlled to rotate in a preset second direction with a rotating second vector voltage, and when it is detected that the code disc generates the nth signal edge, it is recorded The second electrical angle value of the current second vector voltage;
根据所述第一电角度值和第二电角度值获取所述转子的电角度偏移值;Obtaining the electrical angle offset value of the rotor according to the first electrical angle value and the second electrical angle value;
也即采用图1所示实施例中的方式,计算获得电角度偏移值,相关内容已在图1所示实施例中进行了详细描述,在此将不再赘述。That is, the electrical angle offset value is calculated by using the method in the embodiment shown in FIG. 1. The related content has been described in detail in the embodiment shown in FIG. 1, and will not be repeated here.
在某些实施例中,所述获取所述码盘的信号沿计数,将所述信号沿计数 加上或减去一个预设的系数后生成修正信号沿计数具体为:In some embodiments, the obtaining the signal edge count of the code disc, and adding or subtracting a preset coefficient to the signal edge count to generate the modified signal edge count specifically includes:
获取所述码盘的信号沿计数;Acquiring the signal edge count of the code disc;
当所述转子对应电角度变化方向为正时,将所述信号沿计数加上一个预设的系数后生成修正信号沿计数;When the direction of change of the electrical angle corresponding to the rotor is positive, adding a preset coefficient to the signal edge count to generate a modified signal edge count;
当所述转子对应电角度变化方向为负时,将将所述信号沿计数减去一个预设的系数后生成修正信号沿计数。When the change direction of the electrical angle corresponding to the rotor is negative, the signal edge count is subtracted by a preset coefficient to generate a modified signal edge count.
图3为本申请实施例提供的一种电机控制方法又一个实施例的流程图,该方法应用于一电机,所述电机包括转子,所述转子上设有码盘。Fig. 3 is a flowchart of another embodiment of a motor control method provided by an embodiment of the application. The method is applied to a motor, the motor includes a rotor, and an encoder is provided on the rotor.
该方法可以包括以下几个步骤:The method can include the following steps:
301:获取所述码盘的信号沿计数,根据所述信号沿计数和预设的所述转子的电角度偏移值获取当前所述转子的电角度值。301: Obtain a signal edge count of the code disc, and obtain a current electrical angle value of the rotor according to the signal edge count and a preset electrical angle offset value of the rotor.
具体地,根据所述信号沿计数与预设的电角度分辨率相乘得到初始电角度值;Specifically, the initial electrical angle value is obtained by multiplying the signal edge count and the preset electrical angle resolution;
根据所述初始电角度值与所述电角度偏移值生成所述转子的电角度值。The electrical angle value of the rotor is generated according to the initial electrical angle value and the electrical angle offset value.
可以是将初始电角度值加上所述电角度偏移值,生成所述转子的电角度值。It may be that the initial electrical angle value is added to the electrical angle offset value to generate the electrical angle value of the rotor.
具体的,转子的电角度值可以按照如下公式计算获得:Specifically, the electrical angle value of the rotor can be calculated according to the following formula:
EleAngle=Direction*Index*Resolution EleAngel+EleAngle_Offset---------公式(1) EleAngle=Direction*Index*Resolution EleAngel +EleAngle_Offset---------Formula (1)
其中,EleAngle表示转子的电角度值,Index表示当前码盘的信号沿计数,Resolution EleAngel表示码盘的电角度分辨率,EleAngle_Offset表示电角度偏移值。Direction=±1表示转子的旋转方向。 Among them, EleAngle represents the electrical angle value of the rotor, Index represents the signal edge count of the current code disc, Resolution EleAngel represents the electrical angle resolution of the code disc, and EleAngle_Offset represents the electrical angle offset value. Direction=±1 indicates the direction of rotation of the rotor.
302:将所述转子的电角度值加上或减去一个预设的角度补偿值后生成修正电角度值。302: Add or subtract a preset angle compensation value to the electrical angle value of the rotor to generate a corrected electrical angle value.
303:基于所述修正电角度值对所述电机进行控制。303: Control the motor based on the corrected electrical angle value.
本实施例中,对于电角度分辨率低的码盘,结合上文描述可知,电机有可能无法正常启动,也无法实现对电机的有效、准确的控制,因此,可以通过角度补偿值进行补偿,即可以正常启动电机,实现对电机的有效、准确的控制。In this embodiment, for an encoder with low electrical angle resolution, combined with the above description, it can be known that the motor may not start normally, nor can it achieve effective and accurate control of the motor. Therefore, it can be compensated by the angle compensation value. That is, the motor can be started normally, and effective and accurate control of the motor can be realized.
该角度补偿值小于码盘的电角度分辨率。The angle compensation value is less than the electrical angle resolution of the encoder.
在某些实施例中,所述将所述转子的电角度值加上或减去一个预设的角度补偿值后生成修正电角度值可以包括:In some embodiments, adding or subtracting a preset angle compensation value to the electrical angle value of the rotor to generate the corrected electrical angle value may include:
当所述转子对应电角度变化方向为正时,即所述Direction为正时,将所述转子的电角度值加上一个预设的角度补偿值后生成修正电角度值;When the direction of electrical angle change corresponding to the rotor is positive, that is, when the Direction is positive, add a preset angle compensation value to the electrical angle value of the rotor to generate a corrected electrical angle value;
当所述转子对应电角度变化方向为负时,即所述Direction为负时,将所述转子的电角度值减去一个预设的角度补偿值后生成修正电角度值。When the direction of change of the electrical angle corresponding to the rotor is negative, that is, when the Direction is negative, the electrical angle value of the rotor is subtracted from a preset angle compensation value to generate a corrected electrical angle value.
其中,电角度偏移值可以预先配置,当然也可以采用其它方式获得。Among them, the electrical angle offset value can be pre-configured, of course, it can also be obtained in other ways.
作为一种可选方式,该方法还可以包括:As an optional way, the method may also include:
预通过预设方向的矢量电压控制所述转子转动至预设的目标位置;所述目标位置对应设置有预设的初始电角度值;Pre-control the rotor to rotate to a preset target position through a vector voltage in a preset direction; the target position is correspondingly set with a preset initial electrical angle value;
将所述初始电角度值作为所述转子的电角度偏移值。The initial electrical angle value is used as the electrical angle offset value of the rotor.
预先将转子定位至目标位置,将目标位置对应初始电角度值作为电角度偏移值,从而可以省略了上述实施例1中的标定步骤,这使得电机能够更快的启动。The rotor is positioned to the target position in advance, and the initial electrical angle value corresponding to the target position is used as the electrical angle offset value, so that the calibration step in the above-mentioned embodiment 1 can be omitted, which enables the motor to start faster.
作为另一种可选方式,该方法还可以包括:As another optional manner, the method may further include:
由预设的目标位置开始,以旋转的第一矢量电压控制电机的转子以预设的第一方向进行转动,当检测到设于所述转子上的码盘产生第n个信号沿时,记录当前的第一矢量电压的第一电角度值;Starting from the preset target position, the rotor of the motor is controlled to rotate in the preset first direction with the rotating first vector voltage, and when it is detected that the code disc provided on the rotor generates the nth signal edge, it is recorded The first electrical angle value of the current first vector voltage;
在记录所述第一电角度值后,以旋转的第二矢量电压控制所述电机的转子以预设的第二方向进行转动,当检测到所述码盘产生第n个信号沿时,记 录当前的第二矢量电压的第二电角度值;After the first electrical angle value is recorded, the rotor of the motor is controlled to rotate in a preset second direction with a rotating second vector voltage, and when it is detected that the code disc generates the nth signal edge, it is recorded The second electrical angle value of the current second vector voltage;
根据所述第一电角度值和第二电角度值获取所述转子的电角度偏移值;Obtaining the electrical angle offset value of the rotor according to the first electrical angle value and the second electrical angle value;
也即采用图1所示实施例中的方式,计算获得电角度偏移值,相关内容已在图1所示实施例中进行了详细描述,在此将不再赘述。That is, the electrical angle offset value is calculated by using the method in the embodiment shown in FIG. 1. The related content has been described in detail in the embodiment shown in FIG. 1, and will not be repeated here.
对于能获取绝对位置,但是精度低的位置传感器,可通过一预设的角度补偿值对该位置传感器检测得到的绝对位置进行修正,以避免上述由于精度低而导致的无法启动的问题。For a position sensor that can obtain an absolute position but has low accuracy, the absolute position detected by the position sensor can be corrected by a preset angle compensation value to avoid the above-mentioned problem of inability to start due to low accuracy.
图4为本申请实施例提供的一种电机控制方法又一个实施例的流程图,该方法应用于一电机,所述电机包括转子,所述转子上设有位置传感器,所述位置传感器用于检测所述转子的绝对机械位置。4 is a flowchart of another embodiment of a motor control method provided by an embodiment of the application. The method is applied to a motor, the motor includes a rotor, and a position sensor is provided on the rotor. The position sensor is used for The absolute mechanical position of the rotor is detected.
该方法可以包括以下几个步骤:The method can include the following steps:
401:通过所述位置传感器获取所述转子的绝对机械位置,根据预设的所述转子的绝对机械位置和电角度值的对应关系,获取所述转子的电角度值。401: Obtain the absolute mechanical position of the rotor through the position sensor, and obtain the electrical angle value of the rotor according to a preset correspondence between the absolute mechanical position of the rotor and the electrical angle value.
402:将所述转子的电角度值加上或减去一个预设的角度补偿值后生成修正电角度值。402: Add or subtract a preset angle compensation value to the electrical angle value of the rotor to generate a corrected electrical angle value.
403:基于所述修正电角度值对所述电机进行控制。403: Control the motor based on the corrected electrical angle value.
若位置传感器可以检测绝对机械位置,但是位置传感器的分辨率低,此时可以通过角度补偿值进行补偿,以保证电机可以启动,实现对电机的有效的控制。If the position sensor can detect the absolute mechanical position, but the resolution of the position sensor is low, the angle compensation value can be used to compensate at this time to ensure that the motor can be started to achieve effective control of the motor.
上述实施例中,可以通过角度补偿值进行修正,获得修正后的转子的电角度值,避免发生电机的无法启动的情况。In the above-mentioned embodiment, the angle compensation value can be used for correction to obtain the corrected electrical angle value of the rotor, so as to avoid the situation that the motor cannot be started.
在某些实施例中,所述通过所述位置传感器获取所述转子的绝对机械位置,根据预设的所述转子的绝对机械位置和电角度值的对应关系,获取所述转子的电角度值可以包括:In some embodiments, the absolute mechanical position of the rotor is acquired by the position sensor, and the electrical angle value of the rotor is acquired according to a preset correspondence between the absolute mechanical position of the rotor and the electrical angle value Can include:
通过所述位置传感器获取所述转子的绝对机械位置,根据所述转子的绝 度机械位置和预设的电角度偏移值,获取所述转子的电角度值。The absolute mechanical position of the rotor is obtained by the position sensor, and the electrical angle value of the rotor is obtained according to the absolute mechanical position of the rotor and a preset electrical angle offset value.
可选地,可以是将绝对机械位置乘以电机对极数,再加上所述预设的电角度偏移值,获得转子的电角度值。Optionally, the absolute mechanical position may be multiplied by the number of poles of the motor, and the preset electrical angle offset value is added to obtain the electrical angle value of the rotor.
其中,该预设的电角度偏移值可以是结合实际应用情况进行预先设定。Wherein, the preset electrical angle offset value may be preset according to actual application conditions.
图5为本申请实施例提供的一种电机控制方法又一个实施例的流程图,该方法应用于一电机,所述电机包括转子,所述转子上设有码盘,该方法可以包括以下几个步骤:Figure 5 is a flowchart of another embodiment of a motor control method provided by an embodiment of the application. The method is applied to a motor, the motor includes a rotor, and an encoder is provided on the rotor. The method may include the following Steps:
501:通过预设方向的矢量电压控制所述转子转动至预设的目标位置;所述目标位置对应设置有预设的初始电角度值。501: Control the rotor to rotate to a preset target position by a vector voltage in a preset direction; the target position is correspondingly set with a preset initial electrical angle value.
优选地,该初始电角度值可由用户进行设定或者系统自动设定。Preferably, the initial electrical angle value can be set by the user or automatically set by the system.
502:从所述目标位置开始,根据所述初始电角度值和当前所述码盘的信号沿计数获取当前所述转子的电角度值,基于所述转子的电角度值对所述电机进行控制。502: Starting from the target position, obtain the current electrical angle value of the rotor according to the initial electrical angle value and the current signal edge count of the code disc, and control the motor based on the electrical angle value of the rotor .
具体地,转子的电角度值可以按照如下公式计算获得:Specifically, the electrical angle value of the rotor can be calculated according to the following formula:
EleAngle=Direction*Index*Resolution EleAngel+EleAngle_initial; EleAngle=Direction*Index*Resolution EleAngel +EleAngle_initial;
其中,EleAngle表示转子的电角度值,Index表示当前码盘的信号沿计数,Resolution EleAngel表示码盘的电角度分辨率,EleAngle_initial表示初始电角度值,Direction=±1表示转子的旋转方向。 Among them, EleAngle represents the electrical angle value of the rotor, Index represents the signal edge count of the current code disk, Resolution EleAngel represents the electrical angle resolution of the code disk, EleAngle_initial represents the initial electrical angle value, and Direction = ±1 represents the rotation direction of the rotor.
在本实施例中,预先将转子定位至目标位置,将目标位置对应预设的初始电角度值作为电角度偏移值,从而可以省略上述实施例1中的标定步骤,这使得电机能够更快的启动。需要说明的是,由于电角度偏移值由用户进行设定,因此存在一定的误差,这时公式(2)中的EleAngleError为码盘两个刻度沿之间对应的电角度误差范围,例如,电角度分辨率为90°的码盘,EleAngleError的范围为(0°,90°]或(-90°,0°]。In this embodiment, the rotor is positioned to the target position in advance, and the preset initial electrical angle value corresponding to the target position is used as the electrical angle offset value, so that the calibration step in the above embodiment 1 can be omitted, which makes the motor faster Start. It should be noted that since the electrical angle offset value is set by the user, there is a certain error. At this time, EleAngleError in formula (2) is the corresponding electrical angle error range between the two scale edges of the code wheel, for example, For encoders with electrical angle resolution of 90°, the range of EleAngleError is (0°, 90°) or (-90°, 0°].
图6为本申请实施例提供的一种电机控制装置一个实施例的结构示意图, 包括存储器601和处理器602;FIG. 6 is a schematic structural diagram of an embodiment of a motor control device provided by an embodiment of the application, including a memory 601 and a processor 602;
所述存储器601存储一条或多条计算机程序指令;The memory 601 stores one or more computer program instructions;
所述处理器602所述一条或多条计算机程序指令用以执行如上权利要求1-10任一项所述的电机控制方法。The one or more computer program instructions of the processor 602 are used to execute the motor control method according to any one of claims 1-10.
图6所述的电机控制装置具体可以执行图1所示实施例所述的电机控制方法,其实现原理和技术效果不再赘述。The motor control device described in FIG. 6 can specifically execute the motor control method described in the embodiment shown in FIG. 1, and its implementation principles and technical effects will not be repeated.
图7为本申请实施例提供的一种电机控制装置又一个实施例的结构示意图,该装置可以包括存储器701以及处理器702;FIG. 7 is a schematic structural diagram of another embodiment of a motor control device provided by an embodiment of the application. The device may include a memory 701 and a processor 702;
所述存储器701存储一条或多条计算机程序指令;The memory 701 stores one or more computer program instructions;
所述处理器702调整所述一条或多条计算机程序指令用以执行如上权利要求11-13任一项所述的电机控制方法。The processor 702 adjusts the one or more computer program instructions to execute the motor control method according to any one of claims 11-13.
图7所述的电机控制装置可以执行图2所示实施例所述的电机控制方法,其实现原理和技术效果不再赘述。The motor control device described in FIG. 7 can execute the motor control method described in the embodiment shown in FIG. 2, and its implementation principles and technical effects will not be repeated.
图8为本申请实施例提供的一种电机控制装置又一个实施例的结构示意图,该装置可以包括存储器801以及处理器802;FIG. 8 is a schematic structural diagram of another embodiment of a motor control device provided by an embodiment of the application. The device may include a memory 801 and a processor 802;
所述存储器801存储一条或多条计算机程序指令;The memory 801 stores one or more computer program instructions;
所述处理器802调整所述一条或多条计算机程序指令用以执行如上权利要求14-16任一项所述的电机控制方法。The processor 802 adjusts the one or more computer program instructions to execute the motor control method according to any one of claims 14-16.
图8所述的电机控制装置可以执行图3所示实施例所述的电机控制方法,其实现原理和技术效果不再赘述。The motor control device described in FIG. 8 can execute the motor control method described in the embodiment shown in FIG. 3, and its implementation principles and technical effects will not be repeated.
图9为本申请实施例提供的一种电机控制装置又一个实施例的结构示意图,该装置可以包括存储器901以及处理器902;FIG. 9 is a schematic structural diagram of another embodiment of a motor control device provided by an embodiment of the application. The device may include a memory 901 and a processor 902;
所述存储器存储一条或多条计算机程序指令;The memory stores one or more computer program instructions;
所述处理器调整所述一条或多条计算机程序指令用以执行如上权利要求17-18任一项所述的电机控制方法。The processor adjusts the one or more computer program instructions to execute the motor control method according to any one of claims 17-18.
图9所述的电机控制装置可以执行图4所示实施例所述的电机控制方法,其实现原理和技术效果不再赘述。The motor control device described in FIG. 9 can execute the motor control method described in the embodiment shown in FIG. 4, and its implementation principles and technical effects will not be repeated.
图10为本申请实施例提供的一种电机控制装置又一个实施例的结构示意图,该装置可以包括存储器1001以及处理器1002;FIG. 10 is a schematic structural diagram of another embodiment of a motor control device provided by an embodiment of the application. The device may include a memory 1001 and a processor 1002;
所述存储器1001存储一条或多条计算机程序指令;The memory 1001 stores one or more computer program instructions;
所述处理器1002调整所述一条或多条计算机程序指令用以执行如上权利要求19所述的电机控制方法。The processor 1002 adjusts the one or more computer program instructions to execute the motor control method according to claim 19 above.
图10所述的电机控制装置可以执行图5所示实施例所述的电机控制方法,其实现原理和技术效果不再赘述。The motor control device described in FIG. 10 can execute the motor control method described in the embodiment shown in FIG. 5, and its implementation principles and technical effects will not be repeated.
此外,本申请实施例还提供了一种电机,如图11中所示,该电机可以包括转子1101、码盘1102、存储器1103和处理器1104;其中,所述码盘1102安装在所述转子1101上,并跟随所述转子1101转动;In addition, the embodiment of the present application also provides a motor. As shown in FIG. 11, the motor may include a rotor 1101, an encoder 1102, a memory 1103, and a processor 1104; wherein, the encoder 1102 is installed on the rotor 1101, and follow the rotor 1101 to rotate;
所述存储器1103存储一条或多条计算机程序指令;The memory 1103 stores one or more computer program instructions;
所述处理器1104用于调用并执行所述一条或多条计算机程序指令用以执行以下步骤:The processor 1104 is configured to call and execute the one or more computer program instructions to perform the following steps:
由预设的目标位置开始,以旋转的第一矢量电压控制电机的转子1201以预设的第一方向进行转动,当检测到设于所述转子1201上的码盘1202产生第n个信号沿时,记录当前的第一矢量电压的第一电角度值;n为奇数,且n≥1;Starting from the preset target position, the rotor 1201 of the motor is controlled to rotate in the preset first direction by the rotating first vector voltage. When detecting that the encoder 1202 provided on the rotor 1201 generates the n-th signal edge When, record the current first electrical angle value of the first vector voltage; n is an odd number, and n≥1;
在记录所述第一电角度值后,以旋转的第二矢量电压控制所述电机的转子1201以预设的第二方向进行转动,当检测到所述码盘1202产生第n个信号沿时,记录当前的第二矢量电压的第二电角度值;其中,所述第一方向和所述第二方向为相反方向;After the first electrical angle value is recorded, the rotor 1201 of the motor is controlled to rotate in the preset second direction with the second vector voltage of rotation. When it is detected that the code disk 1202 generates the nth signal edge , Record the second electrical angle value of the current second vector voltage; wherein the first direction and the second direction are opposite directions;
根据所述第一电角度值和第二电角度值获取所述转子1201的电角度偏移值;Obtaining the electrical angle offset value of the rotor 1201 according to the first electrical angle value and the second electrical angle value;
根据所述电角度偏移值和当前所述码盘的信号沿计数获取当前所述转子的电角度值,基于所述转子的电角度值对所述电机进行控制。The current electrical angle value of the rotor is acquired according to the electrical angle offset value and the current signal edge count of the code disk, and the motor is controlled based on the electrical angle value of the rotor.
本申请实施例还提供了一种电机,如图12中所示,该电机可以包括转子1201、码盘1202、存储器1203和处理器1204;其中,所述码盘1202安装在所述转子1201上,并跟随所述转子1201转动;The embodiment of the present application also provides a motor. As shown in FIG. 12, the motor may include a rotor 1201, an encoder 1202, a memory 1203, and a processor 1204; wherein the encoder 1202 is installed on the rotor 1201 , And follow the rotor 1201 to rotate;
所述存储器1203存储一条或多条计算机程序指令;The memory 1203 stores one or more computer program instructions;
所述处理器1204用于调用并执行所述一条或多条计算机程序指令用以执行以下步骤:The processor 1204 is configured to call and execute the one or more computer program instructions to perform the following steps:
获取所述码盘1202的信号沿计数,将所述信号沿计数加上或减去一个预设的系数后生成修正信号沿计数;Acquiring the signal edge count of the code disc 1202, adding or subtracting a preset coefficient to the signal edge count to generate a modified signal edge count;
根据所述修正信号沿计数和预设的所述转子1201的电角度偏移值获取当前所述转子的电角度值;Acquiring the current electrical angle value of the rotor according to the edge count of the correction signal and the preset electrical angle offset value of the rotor 1201;
基于所述转子1201的电角度值对所述电机进行控制。The motor is controlled based on the electrical angle value of the rotor 1201.
本申请实施例还提供了一种电机,如图13中所示,该电机可以包括转子1301、码盘1302、存储器1303和处理器1304;其中,所述码盘1302安装在所述转子1301上,并跟随所述转子1301转动;The embodiment of the present application also provides a motor. As shown in FIG. 13, the motor may include a rotor 1301, an encoder 1302, a memory 1303, and a processor 1304; wherein the encoder 1302 is mounted on the rotor 1301 , And follow the rotor 1301 to rotate;
所述存储器1303存储一条或多条计算机程序指令;The memory 1303 stores one or more computer program instructions;
所述处理器1304用于调用并执行所述一条或多条计算机程序指令用以执行以下步骤:The processor 1304 is configured to call and execute the one or more computer program instructions to perform the following steps:
获取所述码盘1302的信号沿计数,根据所述信号沿计数和预设的所述转子的电角度偏移值获取当前所述转子1301的电角度值;Acquiring the signal edge count of the code wheel 1302, and acquiring the current electrical angle value of the rotor 1301 according to the signal edge count and a preset electrical angle offset value of the rotor;
将所述转子1301的电角度值加上或减去一个预设的角度补偿值后生成修正电角度值;Adding or subtracting a preset angle compensation value to the electrical angle value of the rotor 1301 to generate a corrected electrical angle value;
基于所述修正电角度值对所述电机进行控制。The motor is controlled based on the corrected electrical angle value.
本申请实施例还提供了一种电机,如图14中所示,该电机可以包括转子1401、位置传感器1402、存储器1403和处理器1404;其中,所述位置传感器1402安装在所述转子1401上,并跟随所述转子1401转动;The embodiment of the present application also provides a motor. As shown in FIG. 14, the motor may include a rotor 1401, a position sensor 1402, a memory 1403, and a processor 1404; wherein the position sensor 1402 is installed on the rotor 1401 , And follow the rotor 1401 to rotate;
所述存储器1403存储一条或多条计算机程序指令;The memory 1403 stores one or more computer program instructions;
所述处理器1404用于调用并执行所述一条或多条计算机程序指令用以执行以下步骤:The processor 1404 is configured to call and execute the one or more computer program instructions to perform the following steps:
通过所述位置传感器1402获取所述转子的绝对机械位置,根据预设的所述转子的绝对机械位置和电角度值的对应关系,获取所述转子的电角度值;Obtain the absolute mechanical position of the rotor through the position sensor 1402, and obtain the electrical angle value of the rotor according to the preset correspondence between the absolute mechanical position of the rotor and the electrical angle value;
将所述转子1401的电角度值加上或减去一个预设的角度补偿值后生成修正电角度值;Adding or subtracting a preset angle compensation value to the electrical angle value of the rotor 1401 to generate a corrected electrical angle value;
基于所述修正电角度值对所述电机进行控制。The motor is controlled based on the corrected electrical angle value.
本申请实施例还提供了一种电机,如图15中所示,该电机可以包括转子1501、码盘1502、存储器1503和处理器1504;其中,所述码盘1502安装在所述转子1501上,并跟随所述转子1501转动;The embodiment of the present application also provides a motor. As shown in FIG. 15, the motor may include a rotor 1501, an encoder 1502, a memory 1503, and a processor 1504; wherein the encoder 1502 is mounted on the rotor 1501 , And follow the rotor 1501 to rotate;
通过预设方向的矢量电压控制所述转子转动至预设的目标位置;所述目标位置对应设置有预设的初始电角度值;The rotor is controlled to rotate to a preset target position by a vector voltage in a preset direction; the target position is correspondingly set with a preset initial electrical angle value;
从所述目标位置开始,根据所述初始电角度值和当前所述码盘的信号沿计数获取当前所述转子的电角度值,基于所述转子的电角度值对所述电机进行控制。Starting from the target position, the current electrical angle value of the rotor is acquired according to the initial electrical angle value and the current signal edge count of the encoder, and the motor is controlled based on the electrical angle value of the rotor.
可以理解的,上述涉及电机中必须还包括实现电机功能的其它一些必要部件,比如定子等部件。It is understandable that the above-mentioned related motors must also include other necessary components for realizing the functions of the motor, such as the stator and other components.
其中,上述涉及的处理器可以为中央处理器(CPU),或者专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微 处理器或其他电子元件实现,用于执行上述方法。Among them, the aforementioned processor may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), or a field A programmable gate array (FPGA), controller, microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
存储器被配置为存储各种类型的数据以支持相应操作。存储器可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory is configured to store various types of data to support corresponding operations. The memory can be implemented by any type of volatile or non-volatile storage devices or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable and programmable Read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
此外,本申请实施例还提供了一种计算机可读存储介质,存储有计算机程序,所述计算机程序被计算机执行时实现如上述图1~图6所示任一实施例中所述的电机控制方法。In addition, an embodiment of the present application also provides a computer-readable storage medium that stores a computer program that, when executed by a computer, realizes the motor control described in any of the above-mentioned embodiments shown in FIGS. 1 to 6 method.
此外,本申请实施例还提供了一种可移动平台,如图16中所示,该可移动平台可以包括机身1601;In addition, the embodiment of the present application also provides a movable platform. As shown in FIG. 16, the movable platform may include a fuselage 1601;
电机1602,安装在所述机身,用于提供动力;The motor 1602 is installed on the fuselage and used to provide power;
控制器1603,执行上述图1~图5任一实施例中所述的电机控制方法,控制所述电机的运行。The controller 1603 executes the motor control method described in any one of the embodiments in FIGS. 1 to 5 to control the operation of the motor.
以上各个实施例中的技术方案、技术特征在与本相冲突的情况下均可以单独,或者进行组合,只要未超出本领域技术人员的认知范围,均属于本申请保护范围内的等同实施例。The technical solutions and technical features in each of the above embodiments can be singly or combined in case of conflict with the present invention, as long as they do not exceed the cognitive scope of those skilled in the art, they all belong to the equivalent embodiments within the protection scope of this application. .
以上所述仅为本申请的实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only examples of this application, and do not limit the scope of this application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of this application, or directly or indirectly applied to other related technologies In the same way, all fields are included in the scope of patent protection of this application.
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the foregoing embodiments can still be modified, or some or all of the technical features can be equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present invention. range.

Claims (31)

  1. 一种电机控制方法,其特征在于,包括:A motor control method, characterized in that it comprises:
    由预设的目标位置开始,以旋转的第一矢量电压控制电机的转子以预设的第一方向进行转动,当检测到设于所述转子上的码盘产生第n个信号沿时,记录当前的第一矢量电压的第一电角度值;n为奇数,且n≥1;Starting from the preset target position, the rotor of the motor is controlled to rotate in the preset first direction by the rotating first vector voltage, and when it is detected that the code disc provided on the rotor generates the nth signal edge, it is recorded The first electrical angle value of the current first vector voltage; n is an odd number, and n≥1;
    在记录所述第一电角度值后,以旋转的第二矢量电压控制所述电机的转子以预设的第二方向进行转动,当检测到所述码盘产生第n个信号沿时,记录当前的第二矢量电压的第二电角度值;其中,所述第一方向和所述第二方向为相反方向;After the first electrical angle value is recorded, the rotor of the motor is controlled to rotate in a preset second direction with a rotating second vector voltage, and when it is detected that the code disc generates the nth signal edge, it is recorded The second electrical angle value of the current second vector voltage; wherein, the first direction and the second direction are opposite directions;
    根据所述第一电角度值和第二电角度值获取所述转子的电角度偏移值;Obtaining the electrical angle offset value of the rotor according to the first electrical angle value and the second electrical angle value;
    根据所述电角度偏移值和当前所述码盘的信号沿计数获取当前所述转子的电角度值,基于所述转子的电角度值对所述电机进行控制。The current electrical angle value of the rotor is acquired according to the electrical angle offset value and the current signal edge count of the code disk, and the motor is controlled based on the electrical angle value of the rotor.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述电角度偏移值和当前所述码盘的信号沿计数获取当前所述转子的电角度值具体为:The method according to claim 1, wherein the obtaining the current electric angle value of the rotor according to the electric angle offset value and the current signal edge count of the code disc specifically comprises:
    根据当前所述码盘的信号沿计数与预设的电角度分辨率相乘得到初始电角度值;Multiplying the preset electrical angle resolution according to the current signal edge count of the code wheel to obtain the initial electrical angle value;
    根据所述初始电角度值与所述电角度偏移值生成所述转子的电角度值。The electrical angle value of the rotor is generated according to the initial electrical angle value and the electrical angle offset value.
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述电角度偏移值和当前所述码盘的信号沿计数获取当前所述转子的电角度值包括:The method according to claim 1, wherein the obtaining the current electric angle value of the rotor according to the electric angle offset value and the current signal edge count of the code disc comprises:
    获取所述码盘的信号沿计数,将所述信号沿计数加上或减去一个预设的系数后生成修正信号沿计数;Acquiring the signal edge count of the code disc, adding or subtracting a preset coefficient to the signal edge count to generate a modified signal edge count;
    根据所述修正信号沿计数和所述电角度偏移值获取当前所述转子的电角度值;Acquiring the current electrical angle value of the rotor according to the edge count of the correction signal and the electrical angle offset value;
    基于所述转子的电角度值对所述电机进行控制。The motor is controlled based on the electrical angle value of the rotor.
  4. 根据权利要求3所述的方法,其特征在于,基于所述转子的电角度值对所述电机进行控制时,所述转子转动的方向为第三方向;所述获取所述码盘的信号沿计数,将所述信号沿计数加上或减去一个预设的系数后生成修正信号沿计数具体为:The method according to claim 3, wherein when the motor is controlled based on the electrical angle value of the rotor, the direction of rotation of the rotor is a third direction; and the signal edge of the encoder is obtained Counting, adding or subtracting a preset coefficient from the signal edge count to generate a modified signal edge count specifically as follows:
    当所述第一方向与所述第三方向相反时,将所述信号沿计数加上一个预设的系数后生成修正信号沿计数。When the first direction is opposite to the third direction, the signal edge count is added to a preset coefficient to generate a modified signal edge count.
  5. 根据权利要求3所述的方法,其特征在于,基于所述转子的基于所述转子的电角度值对所述电机进行控制时,所述转子转动的方向为第三方向;所述获取所述码盘的信号沿计数,将所述信号沿计数加上或减去一个预设的系数后生成修正信号沿计数具体为:The method according to claim 3, wherein when the motor is controlled based on the electrical angle value of the rotor based on the rotor, the direction of rotation of the rotor is a third direction; and the obtaining of the The signal edge count of the code disc, and the signal edge count is added or subtracted by a preset coefficient to generate a modified signal edge count specifically as follows:
    当所述第一方向与所述三方向相同时,将所述信号沿计数减去一个预设的系数后生成修正信号沿计数。When the first direction is the same as the three directions, the signal edge count is subtracted by a preset coefficient to generate a modified signal edge count.
  6. 根据权利要求3所述的方法,其特征在于,所述根据所述修正信号沿计数和所述电角度偏移值获取当前所述转子的电角度值具体为:The method according to claim 3, wherein the obtaining the current electrical angle value of the rotor according to the correction signal edge count and the electrical angle offset value specifically comprises:
    根据所述修正信号沿计数与预设的电角度分辨率相乘得到初始电角度值;Multiplying the edge count of the correction signal with the preset electrical angle resolution to obtain the initial electrical angle value;
    根据所述初始电角度值与所述电角度偏移值生成所述转子的电角度值。The electrical angle value of the rotor is generated according to the initial electrical angle value and the electrical angle offset value.
  7. 根据权利要求1所述的方法,其特征在于,所述根据所述电角度偏移值和当前所述码盘的信号沿计数获取当前所述转子的电角度值包括:The method according to claim 1, wherein the obtaining the current electric angle value of the rotor according to the electric angle offset value and the current signal edge count of the code disc comprises:
    根据当前所述码盘的信号沿计数与预设的电角度分辨率相乘得到初始电角度值,根据所述初始电角度值、所述电角度偏移值和预设的电角度补偿值生成所述转子的电角度值。The initial electrical angle value is obtained according to the current signal edge count of the code disc and the preset electrical angle resolution, which is generated according to the initial electrical angle value, the electrical angle offset value and the preset electrical angle compensation value The electrical angle value of the rotor.
  8. 根据权利要求1所述的方法,其特征在于,所述由预设的目标位置开始,以旋转的第一矢量电压控制电机的转子之前,还包括:The method according to claim 1, characterized in that, before starting from a preset target position and controlling the rotor of the motor with the rotating first vector voltage, the method further comprises:
    通过预设方向的第三矢量电压控制所述转子转动至预设的所述目标位置。The rotor is controlled to rotate to the preset target position through the third vector voltage in the preset direction.
  9. 根据权利要求1所述的方法,其特征在于,所述以旋转的第一矢量电压控制电机的转子以预设的第一方向进行转动包括:The method according to claim 1, wherein the controlling the rotor of the motor to rotate in the preset first direction by the rotating first vector voltage comprises:
    以旋转的第一矢量电压控制电机在不失步的情况下以预设的第一方向进行转动;Using the rotating first vector voltage to control the motor to rotate in a preset first direction without losing step;
    所述以旋转的第二矢量电压控制所述电机的转子以预设的第二方向进行转动包括:The controlling the rotor of the motor to rotate in a preset second direction by the rotating second vector voltage includes:
    以旋转的第二矢量电压控制电机的转子在不失步的情况下以预设的第二方向进行转动。The rotor of the motor is controlled by the rotating second vector voltage to rotate in the preset second direction without losing step.
  10. 根据权利要求1所述的方法,其特征在于,所述以所述第一矢量电压继续控制所述转子以所述第一方向进行转动,在所述码盘产生下一个信号沿前控制所述转子停止在所述第一方向上的转动包括:The method according to claim 1, wherein the first vector voltage is used to continue to control the rotor to rotate in the first direction, and the encoder is controlled before the next signal is generated by the code wheel. Stopping the rotation of the rotor in the first direction includes:
    以所述第一矢量电压继续控制所述转子在不失步情况下以所述第一方向进行转动,在所述码盘产生下一个信号沿前控制所述转子停止在所述第一方向上的转动。Use the first vector voltage to continue to control the rotor to rotate in the first direction without losing step, and control the rotor to stop in the first direction before the encoder generates the next signal edge Rotation.
  11. 一种电机控制方法,其特征在于,应用于一电机,所述电机包括转子,所述转子上设有码盘,包括:A motor control method, characterized in that it is applied to a motor, the motor includes a rotor, the rotor is provided with an encoder, and includes:
    获取所述码盘的信号沿计数,将所述信号沿计数加上或减去一个预设的系数后生成修正信号沿计数;Acquiring the signal edge count of the code disc, adding or subtracting a preset coefficient to the signal edge count to generate a modified signal edge count;
    根据所述修正信号沿计数和预设的所述转子的电角度偏移值获取当前所述转子的电角度值;Acquiring the current electrical angle value of the rotor according to the edge count of the correction signal and the preset electrical angle offset value of the rotor;
    基于所述转子的电角度值对所述电机进行控制。The motor is controlled based on the electrical angle value of the rotor.
  12. 根据权利要求1所述的方法,其特征在于,还包括:The method according to claim 1, further comprising:
    通过预设方向的矢量电压控制所述转子转动至预设的目标位置;所述目标位置对应设置有预设的初始电角度值;The rotor is controlled to rotate to a preset target position by a vector voltage in a preset direction; the target position is correspondingly set with a preset initial electrical angle value;
    将所述初始电角度值作为所述转子的电角度偏移值。The initial electrical angle value is used as the electrical angle offset value of the rotor.
  13. 根据权利要求12所述的方法,其特征在于,所述获取所述码盘的信号沿计数,将所述信号沿计数加上或减去一个预设的系数后生成修正信号沿计数具体为:The method according to claim 12, wherein the obtaining the signal edge count of the code disc, and adding or subtracting a preset coefficient to the signal edge count to generate the modified signal edge count specifically comprises:
    获取所述码盘的信号沿计数;Acquiring the signal edge count of the code disc;
    当所述转子对应电角度变化方向为正时,将所述信号沿计数加上一个预设的系数后生成修正信号沿计数;When the direction of change of the electrical angle corresponding to the rotor is positive, adding a preset coefficient to the signal edge count to generate a modified signal edge count;
    当所述转子对应电角度变化方向为负时,将将所述信号沿计数减去一个预设的系数后生成修正信号沿计数。When the change direction of the electrical angle corresponding to the rotor is negative, the signal edge count is subtracted by a preset coefficient to generate a modified signal edge count.
  14. 一种电机控制方法,其特征在于,应用于一电机,所述电机包括转子,所述转子上设有码盘,包括:A motor control method, characterized in that it is applied to a motor, the motor includes a rotor, the rotor is provided with an encoder, and includes:
    获取所述码盘的信号沿计数,根据所述信号沿计数和预设的所述转子的电角度偏移值获取当前所述转子的电角度值;Acquiring the signal edge count of the code disc, and acquiring the current electrical angle value of the rotor according to the signal edge count and a preset electrical angle offset value of the rotor;
    将所述转子的电角度值加上或减去一个预设的角度补偿值后生成修正电角度值;Adding or subtracting a preset angle compensation value to the electrical angle value of the rotor to generate a corrected electrical angle value;
    基于所述修正电角度值对所述电机进行控制。The motor is controlled based on the corrected electrical angle value.
  15. 根据权利要求14所述的方法,其特征在于,还包括:The method according to claim 14, further comprising:
    通过预设方向的矢量电压控制所述转子转动至预设的目标位置;所述目标位置对应设置有预设的初始电角度值;The rotor is controlled to rotate to a preset target position by a vector voltage in a preset direction; the target position is correspondingly set with a preset initial electrical angle value;
    将所述初始电角度值作为所述转子的电角度偏移值。The initial electrical angle value is used as the electrical angle offset value of the rotor.
  16. 根据权利要求14所述的方法,其特征在于,所述将所述转子的电角度值加上或减去一个预设的角度补偿值后生成修正电角度值包括:The method according to claim 14, wherein said adding or subtracting a preset angle compensation value to the electrical angle value of the rotor to generate a modified electrical angle value comprises:
    当所述转子对应电角度变化方向为正时,将所述转子的电角度值加上一个预设的角度补偿值后生成修正电角度值;When the direction of change of the electrical angle corresponding to the rotor is positive, adding a preset angle compensation value to the electrical angle value of the rotor to generate a corrected electrical angle value;
    当所述转子对应电角度变化方向为负时,将所述转子的电角度值减去一个预设的角度补偿值后生成修正电角度值。When the direction of change of the electrical angle corresponding to the rotor is negative, a preset angle compensation value is subtracted from the electrical angle value of the rotor to generate a corrected electrical angle value.
  17. 一种电机控制方法,其特征在于,应用于一电机,所述电机包括转子,所述转子上设有位置传感器,所述位置传感器用于检测所述转子的绝对机械位置,包括:A motor control method, characterized in that it is applied to a motor, the motor includes a rotor, the rotor is provided with a position sensor, and the position sensor is used to detect the absolute mechanical position of the rotor, and includes:
    通过所述位置传感器获取所述转子的绝对机械位置,根据预设的所述转子的绝对机械位置和电角度值的对应关系,获取所述转子的电角度值;Acquiring the absolute mechanical position of the rotor through the position sensor, and acquiring the electrical angle value of the rotor according to a preset correspondence between the absolute mechanical position of the rotor and the electrical angle value;
    将所述转子的电角度值加上或减去一个预设的角度补偿值后生成修正电角度值;Adding or subtracting a preset angle compensation value to the electrical angle value of the rotor to generate a corrected electrical angle value;
    基于所述修正电角度值对所述电机进行控制。The motor is controlled based on the corrected electrical angle value.
  18. 根据权利要求17所述的方法,其特征在于,所述通过所述位置传感器获取所述转子的绝对机械位置,根据预设的所述转子的绝对机械位置和电角度值的对应关系,获取所述转子的电角度值包括:17. The method according to claim 17, wherein the absolute mechanical position of the rotor is acquired by the position sensor, and the absolute mechanical position of the rotor is obtained according to a preset correspondence between the absolute mechanical position of the rotor and the electrical angle value. The electrical angle value of the rotor includes:
    通过所述位置传感器获取所述转子的绝对机械位置,根据所述转子的绝度机械位置和预设的电角度偏移值,获取所述转子的电角度值。The absolute mechanical position of the rotor is obtained by the position sensor, and the electrical angle value of the rotor is obtained according to the absolute mechanical position of the rotor and a preset electrical angle offset value.
  19. 一种电机控制方法,其特征在于,应用于一电机,所述电机包括转子,所述转子上设有码盘,包括步骤:A motor control method, characterized in that it is applied to a motor, the motor includes a rotor, the rotor is provided with an encoder, and includes the steps:
    通过预设方向的矢量电压控制所述转子转动至预设的目标位置;所述目标位置对应设置有预设的初始电角度值;The rotor is controlled to rotate to a preset target position by a vector voltage in a preset direction; the target position is correspondingly set with a preset initial electrical angle value;
    从所述目标位置开始,根据所述初始电角度值和当前所述码盘的信号沿计数获取当前所述转子的电角度值,基于所述转子的电角度值对所述电机进行控制。Starting from the target position, the current electrical angle value of the rotor is acquired according to the initial electrical angle value and the current signal edge count of the encoder, and the motor is controlled based on the electrical angle value of the rotor.
  20. 一种电机控制装置,其特征在于,其特征在于,包括处理器和存储器;A motor control device, characterized in that it comprises a processor and a memory;
    所述存储器存储一条或多条计算机程序指令;The memory stores one or more computer program instructions;
    所述处理器调整所述一条或多条计算机程序指令用以执行如上权利要求1-10任一项所述的电机控制方法。The processor adjusts the one or more computer program instructions to execute the motor control method according to any one of claims 1-10.
  21. 一种电机控制装置,其特征在于,其特征在于,包括处理器和存储器;A motor control device, characterized in that it comprises a processor and a memory;
    所述存储器存储一条或多条计算机程序指令;The memory stores one or more computer program instructions;
    所述处理器调整所述一条或多条计算机程序指令用以执行如上权利要求11-13任一项所述的电机控制方法。The processor adjusts the one or more computer program instructions to execute the motor control method according to any one of claims 11-13.
  22. 一种电机控制装置,其特征在于,其特征在于,包括处理器和存储器;A motor control device, characterized in that it comprises a processor and a memory;
    所述存储器存储一条或多条计算机程序指令;The memory stores one or more computer program instructions;
    所述处理器调整所述一条或多条计算机程序指令用以执行如上权利要求14-16任一项所述的电机控制方法。The processor adjusts the one or more computer program instructions to execute the motor control method according to any one of claims 14-16.
  23. 一种电机控制装置,其特征在于,其特征在于,包括处理器和存储器;A motor control device, characterized in that it comprises a processor and a memory;
    所述存储器存储一条或多条计算机程序指令;The memory stores one or more computer program instructions;
    所述处理器调整所述一条或多条计算机程序指令用以执行如上权利要求17-18任一项所述的电机控制方法。The processor adjusts the one or more computer program instructions to execute the motor control method according to any one of claims 17-18.
  24. 一种电机控制装置,其特征在于,其特征在于,包括处理器和存储器;A motor control device, characterized in that it comprises a processor and a memory;
    所述存储器存储一条或多条计算机程序指令;The memory stores one or more computer program instructions;
    所述处理器调整所述一条或多条计算机程序指令用以执行如上权利要求19所述的电机控制方法。The processor adjusts the one or more computer program instructions to execute the motor control method according to claim 19 above.
  25. 一种电机,其特征在于,包括转子、码盘、存储器和处理器;所述码盘安装在所述转子上,并跟随所述转子转动;A motor, characterized by comprising a rotor, a code disc, a memory and a processor; the code disc is installed on the rotor and rotates with the rotor;
    所述存储器存储一条或多条计算机程序指令;The memory stores one or more computer program instructions;
    所述处理器用于调用并执行所述一条或多条计算机程序指令用以执行以下步骤:The processor is used to call and execute the one or more computer program instructions to perform the following steps:
    由预设的目标位置开始,以旋转的第一矢量电压控制电机的转子以预设的第一方向进行转动,当检测到设于所述转子上的码盘产生第n个信号沿时,记录当前的第一矢量电压的第一电角度值;n为奇数,且n≥1;Starting from the preset target position, the rotor of the motor is controlled to rotate in the preset first direction by the rotating first vector voltage, and when it is detected that the code disc provided on the rotor generates the nth signal edge, it is recorded The first electrical angle value of the current first vector voltage; n is an odd number, and n≥1;
    在记录所述第一电角度值后,以旋转的第二矢量电压控制所述电机的转子以预设的第二方向进行转动,当检测到所述码盘产生第n个信号沿时,记录当前的第二矢量电压的第二电角度值;其中,所述第一方向和所述第二方向为相反方向;After the first electrical angle value is recorded, the rotor of the motor is controlled to rotate in a preset second direction with a rotating second vector voltage, and when it is detected that the code disc generates the nth signal edge, it is recorded The second electrical angle value of the current second vector voltage; wherein, the first direction and the second direction are opposite directions;
    根据所述第一电角度值和第二电角度值获取所述转子的电角度偏移值;Obtaining the electrical angle offset value of the rotor according to the first electrical angle value and the second electrical angle value;
    根据所述电角度偏移值和当前所述码盘的信号沿计数获取当前所述转子的电角度值,基于所述转子的电角度值对所述电机进行控制。。The current electrical angle value of the rotor is acquired according to the electrical angle offset value and the current signal edge count of the code disk, and the motor is controlled based on the electrical angle value of the rotor. .
  26. 一种电机,其特征在于,包括转子、码盘、存储器和处理器;所述码盘安装在所述转子上,并跟随所述转子转动;A motor, characterized by comprising a rotor, a code disc, a memory and a processor; the code disc is installed on the rotor and rotates with the rotor;
    所述存储器存储一条或多条计算机程序指令;The memory stores one or more computer program instructions;
    所述处理器用于调用并执行所述一条或多条计算机程序指令用以执行以下步骤:The processor is used to call and execute the one or more computer program instructions to perform the following steps:
    获取所述码盘的信号沿计数,将所述信号沿计数加上或减去一个预设的系数后生成修正信号沿计数;Acquiring the signal edge count of the code disc, adding or subtracting a preset coefficient to the signal edge count to generate a modified signal edge count;
    根据所述修正信号沿计数和预设的所述转子的电角度偏移值获取当前所述转子的电角度值;Acquiring the current electrical angle value of the rotor according to the edge count of the correction signal and the preset electrical angle offset value of the rotor;
    基于所述转子的电角度值对所述电机进行控制。The motor is controlled based on the electrical angle value of the rotor.
  27. 一种电机,其特征在于,包括转子、码盘、存储器和处理器;所述码盘安装在所述转子上,并跟随所述转子转动;A motor, characterized by comprising a rotor, a code disc, a memory and a processor; the code disc is installed on the rotor and rotates with the rotor;
    所述存储器存储一条或多条计算机程序指令;The memory stores one or more computer program instructions;
    所述处理器用于调用并执行所述一条或多条计算机程序指令用以执行以下步骤:The processor is used to call and execute the one or more computer program instructions to perform the following steps:
    获取所述码盘的信号沿计数,根据所述信号沿计数和预设的所述转子的电角度偏移值获取当前所述转子的电角度值;Acquiring the signal edge count of the code disc, and acquiring the current electrical angle value of the rotor according to the signal edge count and a preset electrical angle offset value of the rotor;
    将所述转子的电角度值加上或减去一个预设的角度补偿值后生成修正电角度值;Adding or subtracting a preset angle compensation value to the electrical angle value of the rotor to generate a corrected electrical angle value;
    基于所述修正电角度值对所述电机进行控制。The motor is controlled based on the corrected electrical angle value.
  28. 一种电机,其特征在于,包括转子、位置传感器、存储器和处理器;所述位置传感器安装在所述转子上;A motor, characterized by comprising a rotor, a position sensor, a memory, and a processor; the position sensor is installed on the rotor;
    所述存储器存储一条或多条计算机程序指令;The memory stores one or more computer program instructions;
    所述处理器用于调用并执行所述一条或多条计算机程序指令用以执行以下步骤:The processor is used to call and execute the one or more computer program instructions to perform the following steps:
    通过所述位置传感器获取所述转子的绝对机械位置,根据预设的所述转子的绝对机械位置和电角度值的对应关系,获取所述转子的电角度值;Acquiring the absolute mechanical position of the rotor through the position sensor, and acquiring the electrical angle value of the rotor according to a preset correspondence between the absolute mechanical position of the rotor and the electrical angle value;
    将所述转子的电角度值加上或减去一个预设的角度补偿值后生成修正电角度值;Adding or subtracting a preset angle compensation value to the electrical angle value of the rotor to generate a corrected electrical angle value;
    基于所述修正电角度值对所述电机进行控制。The motor is controlled based on the corrected electrical angle value.
  29. 一种电机,其特征在于,包括转子、码盘、存储器和处理器;所述码盘安装在所述转子上,并跟随所述转子转动;A motor, characterized by comprising a rotor, a code disc, a memory and a processor; the code disc is installed on the rotor and rotates with the rotor;
    所述存储器存储一条或多条计算机程序指令;The memory stores one or more computer program instructions;
    所述处理器用于调用并执行所述一条或多条计算机程序指令用以执行以下步骤:The processor is used to call and execute the one or more computer program instructions to perform the following steps:
    通过预设方向的矢量电压控制所述转子转动至预设的目标位置;所述目标位置对应设置有预设的初始电角度值;The rotor is controlled to rotate to a preset target position by a vector voltage in a preset direction; the target position is correspondingly set with a preset initial electrical angle value;
    从所述目标位置开始,根据所述初始电角度值和当前所述码盘的信号沿计数获取当前所述转子的电角度值,基于所述转子的电角度值对所述电机进行控制。Starting from the target position, the current electrical angle value of the rotor is acquired according to the initial electrical angle value and the current signal edge count of the encoder, and the motor is controlled based on the electrical angle value of the rotor.
  30. 一种计算机可读存储介质,其特征在于,存储有计算机程序,所述计算机程序被计算机执行时实现如权利要求1~19任一项所述的电机控制方法。A computer-readable storage medium, characterized in that it stores a computer program, which, when executed by a computer, implements the motor control method according to any one of claims 1-19.
  31. 一种可移动平台,其特征在于,包括机身;A movable platform, characterized in that it includes a fuselage;
    电机,安装在所述机身,用于提供动力;The motor is installed on the fuselage and used to provide power;
    控制器,用于执行如权利要求1~19任一项所述的电机控制方法,控制所述电机的运行。The controller is configured to execute the motor control method according to any one of claims 1-19 to control the operation of the motor.
PCT/CN2019/109635 2019-09-30 2019-09-30 Electric motor control method, electric motor and movable platform WO2021062725A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980034234.9A CN112889213B (en) 2019-09-30 2019-09-30 Motor control method, motor and movable platform
PCT/CN2019/109635 WO2021062725A1 (en) 2019-09-30 2019-09-30 Electric motor control method, electric motor and movable platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/109635 WO2021062725A1 (en) 2019-09-30 2019-09-30 Electric motor control method, electric motor and movable platform

Publications (1)

Publication Number Publication Date
WO2021062725A1 true WO2021062725A1 (en) 2021-04-08

Family

ID=75336314

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/109635 WO2021062725A1 (en) 2019-09-30 2019-09-30 Electric motor control method, electric motor and movable platform

Country Status (2)

Country Link
CN (1) CN112889213B (en)
WO (1) WO2021062725A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113391551A (en) * 2021-06-01 2021-09-14 佛山市顺德区乐普达电机有限公司 Motor electrical angle compensation method and device, electronic equipment and storage medium
CN116915118A (en) * 2023-07-14 2023-10-20 苏州利氪科技有限公司 Zero position learning method and device for motor

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114499290A (en) * 2021-12-22 2022-05-13 上海微创医疗机器人(集团)股份有限公司 Position deviation calibration method, motor driving method, system and equipment
CN117220563B (en) * 2023-11-07 2024-02-13 深圳市杰美康机电有限公司 Motor control method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06351278A (en) * 1993-06-07 1994-12-22 Fuji Electric Co Ltd Vector controller for induction motor
CN105871162A (en) * 2016-04-13 2016-08-17 上海信耀电子有限公司 Servo system for permanent magnet synchronous motor and positioning and deviation eliminating methods
CN106685298A (en) * 2017-01-18 2017-05-17 凡己科技(苏州)有限公司 Low-resolution coder position calculating method for electric forklift
CN108199636A (en) * 2017-12-28 2018-06-22 江苏集萃智能制造技术研究所有限公司 A kind of motor initial angle localization method based on vector control strategy
CN108923711A (en) * 2018-07-02 2018-11-30 沈阳新松智能驱动股份有限公司 A kind of absolute value encoder adjusting zero method of servo-system zero point check and correction

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080079142A (en) * 2007-02-26 2008-08-29 창원대학교 산학협력단 Moving method of brushless dc motor for odd without hall sensor
JP6331188B2 (en) * 2014-01-27 2018-05-30 株式会社デンソー Motor control device
CN104779852B (en) * 2015-03-23 2017-12-01 四川长虹电器股份有限公司 A kind of electric motor starting control method
CN106533308B (en) * 2016-12-31 2019-10-29 深圳市优必选科技有限公司 Permanent magnet synchronous motor angle detecting method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06351278A (en) * 1993-06-07 1994-12-22 Fuji Electric Co Ltd Vector controller for induction motor
CN105871162A (en) * 2016-04-13 2016-08-17 上海信耀电子有限公司 Servo system for permanent magnet synchronous motor and positioning and deviation eliminating methods
CN106685298A (en) * 2017-01-18 2017-05-17 凡己科技(苏州)有限公司 Low-resolution coder position calculating method for electric forklift
CN108199636A (en) * 2017-12-28 2018-06-22 江苏集萃智能制造技术研究所有限公司 A kind of motor initial angle localization method based on vector control strategy
CN108923711A (en) * 2018-07-02 2018-11-30 沈阳新松智能驱动股份有限公司 A kind of absolute value encoder adjusting zero method of servo-system zero point check and correction

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113391551A (en) * 2021-06-01 2021-09-14 佛山市顺德区乐普达电机有限公司 Motor electrical angle compensation method and device, electronic equipment and storage medium
CN113391551B (en) * 2021-06-01 2023-08-01 佛山市顺德区乐普达电机有限公司 Motor electric angle compensation method and device, electronic equipment and storage medium
CN116915118A (en) * 2023-07-14 2023-10-20 苏州利氪科技有限公司 Zero position learning method and device for motor

Also Published As

Publication number Publication date
CN112889213B (en) 2022-07-05
CN112889213A (en) 2021-06-01

Similar Documents

Publication Publication Date Title
WO2021062725A1 (en) Electric motor control method, electric motor and movable platform
JP6658208B2 (en) Motor system
CN111245306B (en) Signal processing device and signal processing method
CN107919830B (en) Calibration method and device of motor position sensor
KR20180021660A (en) Method for sensor-free control of a PMSM motor
JP2002034278A (en) Pole position detector for motor
US20140354271A1 (en) Rotation angle detector, rotation angle detection method, and image forming apparatus
JP2018033301A (en) Method for determining orientation of rotor of non-iron pmsm motor in sensor free manner
JP6186824B2 (en) Brushless motor control device, brushless motor electrical angle estimation method, and storage medium
CN107834914A (en) Brushless electric motor rotor angle computation method based on Hall
KR102166814B1 (en) Apparatus for compensating errors of position sensor for mortor, Method thereof
JP2541169B2 (en) Resolver detection error correction method
US7786686B2 (en) Method and device for estimating the angular position of the rotor of a brushless motor
JP6962957B2 (en) DC excitation type magnetic pole initial position detection device and magnetic pole position detection device
CN110932615B (en) Method and device for determining angle position of rotor of permanent magnet synchronous motor and motor
JP2006017725A (en) Method of measuring revolution of motor
JP4284435B2 (en) Servo motor magnetic pole detection method
CN114172414A (en) Servo motor initial electrical angle determining method and device and readable storage medium
JP4718401B2 (en) Motor control device
JPH0787779A (en) Drive circuit of brushless motor
CN110492818B (en) Zero correction method and correction device for motor and motor control system
CN113131818B (en) Hall sensor installation error identification method, device and motor control system
JP3546862B2 (en) Control device and control method for permanent magnet type brushless motor
US10686392B2 (en) Driving permanent magnet motor based on neutral point voltage
KR102260078B1 (en) Align method of motor

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19947852

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19947852

Country of ref document: EP

Kind code of ref document: A1