WO2023116626A1 - Position deviation calibration method, electric motor driving method and system, and device - Google Patents
Position deviation calibration method, electric motor driving method and system, and device Download PDFInfo
- Publication number
- WO2023116626A1 WO2023116626A1 PCT/CN2022/140015 CN2022140015W WO2023116626A1 WO 2023116626 A1 WO2023116626 A1 WO 2023116626A1 CN 2022140015 W CN2022140015 W CN 2022140015W WO 2023116626 A1 WO2023116626 A1 WO 2023116626A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- motor
- position sensor
- value
- electrical angle
- sensor
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P6/00—Arrangements for controlling synchronous motors or other dynamo-electric motors using electronic commutation dependent on the rotor position; Electronic commutators therefor
- H02P6/08—Arrangements for controlling the speed or torque of a single motor
Definitions
- the present application relates to the technical field of motor control, in particular to a position deviation calibration method, a motor driving method, system and equipment.
- the motor and its driver are the power actuators of the robot and the core components of the robot system.
- the relative position of the traditional motor and its encoder is fixed and calibrated before leaving the factory.
- the motor driver and the motor have a matching relationship, and the relative position relationship between the installation of the motor and the position sensor of different manufacturers/countries is not uniform, so the user must purchase the motor driver and the motor as a set.
- the present application provides a position deviation calibration method capable of calibrating a position deviation value of a position sensor, a motor driving method, a system and a device.
- the present application provides a position deviation calibration method, the method comprising: obtaining a preset electrical angle value corresponding to the rotational position of the motor; applying a torque corresponding to the electrical angle value to the motor; reading the position The mechanical angle of the motor rotor output by the sensor; according to the electrical angle value and the mechanical angle, a position deviation value between the position sensor and the motor is obtained.
- the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle it also includes: under open-loop control, making the motor rotate
- the magnitudes of the forward current and the reverse current fed back during rotation are basically equal and the forward current and the reverse current are the smallest, and are in a stable forward and reverse running state.
- before acquiring the preset electrical angle value corresponding to the rotational position of the motor it includes: acquiring the type of the position sensor;
- the obtaining the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle includes: obtaining the position deviation value according to the type of the position sensor, the electrical angle value and the mechanical angle The position deviation value between the sensor and the motor.
- the type of the position sensor is a Hall sensor; the position deviation value between the position sensor and the motor is obtained according to the type of the position sensor, the electrical angle value and the mechanical angle , comprising: recording the electrical angle value corresponding to the signal transition edge output by the Hall sensor as a position deviation value between the position sensor and the motor.
- the type of the position sensor is an encoder; the position deviation value between the position sensor and the motor is obtained according to the type of the position sensor, the electrical angle value and the mechanical angle,
- the method includes: obtaining the electrical angle value corresponding to the zero position signal output by the encoder as a position deviation value between the position sensor and the motor.
- the type of the position sensor is an encoder, and the electrical angle value is set to 0; the position deviation between the position sensor and the motor is obtained according to the electrical angle value and the mechanical angle
- the value includes: reading the output angle of the position sensor; calculating the position deviation value between the position sensor and the motor according to the output angle of the position sensor.
- the method further includes: calibrating the position sensor to obtain counting direction and/or line number information of the position sensor.
- the verifying the position sensor to obtain the counting direction and/or line number information of the position sensor includes: judging whether the increase or decrease direction of the mechanical angle of the position sensor is consistent with the The direction of increase and decrease of the electrical angle value is consistent; when the direction of increase and decrease of the mechanical angle of the position sensor is inconsistent with the direction of increase and decrease of the electrical angle value, configure the counting direction of the position sensor and the direction of the electrical angle value The direction of increase and decrease is the same.
- the verifying the position sensor to obtain the counting direction and/or line number information of the position sensor includes: obtaining the adjacent zero position signal output by the position sensor, counting The increment of the mechanical angle between adjacent zero position signals is used as the line number information.
- the position sensor is a Hall sensor; after reading the mechanical angle of the motor rotor output by the position sensor, it also includes: judging whether the output value of the position sensor meets the preset requirements; when the If the output value of the position sensor does not meet the requirements, it is determined that the position sensor is faulty.
- the motor driving method includes: reading the position deviation value obtained according to the position deviation calibration method described in any one of the above embodiments; reading the position sensor output value; calculate the motor rotation position according to the position deviation value and the output value; process the motor rotation position to obtain a pulse width modulation signal for driving the motor to run.
- a motor drive system the system includes a motor, a position sensor and a motor driver; the position sensor is respectively connected to the motor and the motor driver, and the motor is connected to the motor driver connected; the motor driver is used to execute the steps in the method in any one of the above embodiments.
- Another aspect of the present application provides a robot joint, and the shutdown of the robot adopts the above-mentioned motor drive system.
- Another aspect of the present application provides a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method in any one of the above embodiments when executing the computer program.
- Another aspect of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method in any one of the above-mentioned embodiments are implemented.
- Fig. 1 is the schematic diagram of motor drive system in an embodiment
- Fig. 2 is a schematic flow chart of a position deviation calibration method in an embodiment
- Fig. 3 is a schematic diagram when the torque is perpendicular to the rotor of the motor in one embodiment
- Fig. 4 is a schematic diagram when the torque overlaps with the rotor of the motor in one embodiment
- Fig. 5 is a schematic diagram of the acquisition process of the forward and reverse smooth running state in an embodiment
- Fig. 6 is a flow chart of obtaining the position deviation value of the Hall sensor in one embodiment
- Fig. 7 is a schematic flow chart of a position deviation calibration method in another embodiment
- Fig. 8 is a schematic flow chart of a motor driving method in an embodiment
- Figure 9 is an internal block diagram of a computer device in one embodiment.
- a counter-drag device is used to drive the motor under test to rotate through a shaft coupling.
- the motor winding will generate a counter electromotive force
- the zero-crossing signal of the position encoder will generate a pulse waveform
- the U phase of the Hall sensor will generate high and low level jumps.
- the conventional alignment strategy is to align the zero signal of the sensor with the zero-crossing point of the back EMF by adjusting the relative position of the sensor and the motor. If there is an independent Hall sensor and the angle needs to be adjusted, the same method is used to align the rising edge of the sensor U signal with the zero-crossing point of the back electromotive force.
- each motor Before leaving the factory, each motor adopts this method for pair-to-drag calibration, and uniformly compiles the difference. Only in this way can the fixed deviation value inside the driver be adapted to each motor. However, because each motor manufacturer aligns the position of the back electromotive force is not uniform, the driver and the motor need to be used together. As long as the fixed deviation value parameter inside the driver does not match the position deviation value of the motor, the motor will not operate normally.
- the above calibration methods use the tow motor, the tow driver, the oscilloscope, and certain tooling to complete.
- each step requires human participation, and the possibility of error is high.
- the standard of calibration completion is judged by the waveform of the oscilloscope, which has a certain degree of subjectivity.
- the driver does not have the function of identifying the bias, the motors it can adapt to will be limited.
- the position deviation calibration method and the motor driving method provided by the present application can be applied to the motor drive system shown in Figure 1, the motor drive system includes a motor, a position sensor and a motor driver; the position sensor is connected to the motor and the motor driver respectively, The motor is connected with the motor driver. Among them, the position sensor and the motor can be separated, and the transmission device is connected in the middle, so that the freedom of space utilization of the engineer will be greater.
- the motor driver does not need tow motors and tow drivers, nor does it need an oscilloscope or some tooling. It only needs to connect the driver and the motor to be dragged normally, and start the drive through the host computer interface. Automatically configure the program, you can get the position deviation value of the motor and position sensor and store it. In addition, the motor driver can also identify and correct the parameters of the position sensor and judge whether there is a signal failure according to the basic parameters such as the type of the position sensor. For details, please refer to the following.
- a method for calibrating position deviation is provided, and the method is applied to the motor driver in Figure 1 as an example, including the following steps:
- the electrical angle value is pre-set, and different mechanical positions correspond to certain regularly changing electrical angle values.
- the direction of change of the motor’s rotational position can be preset, so that the incremental motor’s rotational position can be configured according to a certain Regularly varying electrical angle values.
- the electrical angle value is the angle value of the artificially given excitation signal, that is, the rotation angle value corresponding to the given rotation voltage under open-loop control. Taking the ring motor as an example, its rotor rotates once to generate different incremental positions. The user pre-configures these incremental positions with electrical angle values that change according to a certain rule.
- the torque configured according to the electrical angle value can be seen in Figure 3 and Figure 4.
- One of the torques is the torque shown in Figure 3, where the torque is perpendicular to the rotor of the motor.
- the maximum speed state that is, the motor is in the state of smooth forward and reverse operation. In this state, the torque and the rotor of the motor are perpendicular to each other.
- the vertical state; the other is the torque in Figure 4.
- the torque overlaps with the rotor of the motor.
- the position of the rotor remains unchanged, and the electrical angle value is fixed at 0 at this time.
- a torque corresponding to the electrical angle value when applying a torque corresponding to the electrical angle value to the motor, preferably, first output the torque that makes the rotor of the motor rotate, and make the torque and the rotor always in a vertical state, and adjust the size of the torque value, so that the motor In a stable state, and then collect the readings of the position sensor, etc., to avoid errors.
- the position sensor can be selected according to the actual situation, wherein the position sensor includes a Hall sensor and/or an encoder, and the motor driver can collect the mechanical angle of the motor rotor output by the Hall sensor and/or encoder.
- the mechanical angle of the motor rotor output by the position sensor needs to be read after the motor is in a stable forward and reverse running state, or at least wait for the motor rotor to rotate once before reading.
- the output signal of the position sensor is zero, and increases sequentially until it reaches the zero position, corrects it, outputs the zero position signal, and then increases according to the encoding method. Therefore, in order to To ensure the accuracy of the mechanical angle of the position sensor, it is necessary to wait for the motor rotor to rotate once before reading it.
- the electrical angle value is always zero, the mechanical angle of the motor rotor output by the position sensor can be read again when the rotor is no longer rotating.
- the electrical angle value corresponds to the rotation position of the motor
- the mechanical angle output by the position sensor also corresponds to the rotation position of the motor, so the corresponding relationship between the electrical angle value and the mechanical angle can be obtained according to the rotation position of the motor, and then obtained The position deviation value between the position sensor and the motor.
- the motor driver since the calculation logic of the position deviation value of the position sensor and the motor is different when the rotor is in the rotating state and the non-rotating state, the motor driver calculates the electrical angle value and the mechanical angle value according to the calculation logic corresponding to the state of the rotor. The angle is processed to calculate the position deviation value.
- the electrical angle value corresponding to the preset rotation position of each motor is preset by the motor driver, that is, in the corresponding
- the mechanical position first corresponds to an electrical angle value, which is also the angle value of the artificially given excitation signal. Every time an electrical pulse is input, the motor rotates an angle and advances one step.
- the angular displacement output by the motor is proportional to the number of input pulses, and the rotational speed is proportional to the pulse frequency.
- the mechanical angle output by the position sensor is recorded, so as to establish the corresponding relationship between the output mechanical angle and the electrical angle value, so that the position sensor and the motor at each position can be known according to the corresponding relationship between the mechanical angle and the electrical angle value. positional deviation value.
- the above position deviation calibration method does not require the dragging motor and the dragging driver, nor does it require an oscilloscope and some tooling. It only needs to connect the motor driver and the motor, and then obtain the preset electrical angle value corresponding to the rotation position of the motor. In this way, the torque corresponding to the electrical angle value is applied to the motor to read the mechanical angle of the motor rotor output by the position sensor, and then the electrical angle value and the mechanical angle are processed to obtain the position deviation value between the position sensor and the motor, which is simpler and more convenient.
- the forward current and reverse before obtaining the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle, it also includes: under open-loop control, the forward current and reverse The magnitude of the current is basically equal, and the forward current and the reverse current are the smallest, and it is in a stable forward and reverse running state.
- the way to obtain the stable forward and reverse running state includes: first configuring the torque input to the motor so that the motor starts to rotate; collecting the sampled current output when the motor is clocked and reversed; Hours, the motor is running smoothly in forward and reverse directions.
- the smooth forward and reverse running state is when the motor has no load, given a certain torque and a certain rotation speed, the given positive and negative torque is automatically adjusted through the program (for example, the order is increased from small to large) , so that the magnitude of the feedback current is basically equal during forward and reverse rotation, and the motor runs smoothly.
- the magnitude of the given positive and negative torque changes, the magnitude of the feedback forward current and reverse current will also change,
- the motor is in the state of smooth forward and reverse operation.
- the minimum forward current and reverse current are mainly to ensure that the direction of the torque is basically perpendicular to the direction of the rotor, so that the direction of the torque can be calculated according to the preset electrical angle value and the direction of the rotor, and it is convenient to apply the torque.
- This state is the basis for obtaining the Hall sensor and the position parameters corresponding to the zero position of the encoder.
- the given torque must overcome the friction force of the motor itself to make the motor rotate.
- the rotation angle of the motor is consistent with the angle corresponding to the given incremental rotation position.
- the direction of the minimum torque vector to maintain normal rotation is perpendicular to the current electrical position of the motor rotor.
- the positive and negative friction forces are the same, the positive and negative minimum moments are also the same.
- FIG. 5 is a schematic diagram of the acquisition process of the forward and reverse smooth running state in an embodiment.
- the motor and the driver are connected correctly first, and then the motor outputs In this case, configure the torque applied to the motor based on the control architecture of SVPWM (Space Vector Pulse Width Debugging Method), so that the motor starts to rotate; collect the sampling current output when the motor is forward and reverse; when the sampling current is equal in magnitude and At the minimum, the motor is in the forward and reverse stable running state.
- SVPWM Space Vector Pulse Width Debugging Method
- the rotation angle corresponding to the incremental position information (that is, the given electrical angle value) is artificially given, and in order to ensure relative stability, preferably, an electrical angle signal with an incremental increase of about 20% of the rated frequency is injected, and then
- an electrical angle signal with an incremental increase of about 20% of the rated frequency is injected, and then
- the space vector control is used as the basic framework, and the rotation angle theta corresponding to the incremental position information is artificially given (that is, the given electrical angle), instead of the information actually fed back by the sensor, and the artificially given Cartesian coordinate system q
- the torque information on the shaft will cause the motor to rotate in an open loop.
- the program will collect the phase current of the motor, and after a series of transformations, the torque information feedback will be obtained; when the motor rotates forward and reverse, the sampled current of the motor is equal and can maintain normal operation when it is the smallest. This state is used as the running state of subsequent dynamic identification.
- the preset electrical angle value corresponding to the rotational position of the motor before obtaining the preset electrical angle value corresponding to the rotational position of the motor, it includes: obtaining the type of the position sensor; obtaining the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle, including: According to the type of the position sensor, the electrical angle value and the mechanical angle, the position deviation value between the position sensor and the motor is obtained.
- the types of position sensors here include Hall sensors and encoders. Before calibrating the position sensor, the type of the position sensor must be determined first, and then subsequent calibration is performed to avoid errors.
- the type of the position sensor is a Hall sensor; according to the type of the position sensor, the electrical angle value and the mechanical angle, the position deviation value between the position sensor and the motor is obtained, including: recording the signal jump output by the Hall sensor The corresponding electrical angle value is used as the position deviation value between the position sensor and the motor.
- Hall sensors are generally used to assist commutation, some are installed between the slots of the motor, some are made together with other sensors, and some are separate. Traditionally, the sensor is divided into 120-degree and 60-degree Hall.
- the position deviation value between the position sensor and the motor in this embodiment can be characterized by the given electrical angle information corresponding to the Hall auxiliary commutation signal, so the motor driver only needs to record the given electrical angle information corresponding to the Hall auxiliary commutation signal The electrical angle value is sufficient.
- the Hall sensor In servo applications, if there is a higher-precision incremental position sensor, the Hall sensor is only roughly positioned at startup to obtain the electrical angle corresponding to the startup position. Once started successfully, it will no longer be used before power off.
- Fig. 6 is a flow chart of obtaining the position deviation value of the Hall sensor in an embodiment.
- the motor is in a stable forward and reverse running state, and there is a Hall-assisted commutation Signal, when the rotation is greater than 1 revolution and in the rotation state, the electrical angle value corresponding to the signal transition edge output by the Hall sensor is recorded and stored.
- the given electrical angle is an artificially given excitation signal, that is, the rotation angle value corresponding to the given rotation voltage of the voltage open loop
- the auxiliary commutation signal is composed of 5, 1, 3, 2 in one electrical cycle , 6, and 4 cycle change, record the angle value of the above-mentioned given rotation voltage corresponding to the edge moment of the jump of the auxiliary commutation signal, as the position deviation value between the position sensor and the motor.
- the type of the position sensor is an encoder; according to the type of the position sensor, the electrical angle value and the mechanical angle, the position deviation value between the position sensor and the motor is obtained, including: obtaining the corresponding value of the zero position signal output by the encoder The electrical angle value is used as the position deviation value between the position sensor and the motor.
- the encoder as an incremental position sensor as an example to illustrate, to obtain its position offset, and calculate the offset angle of the motor encoder includes: in the above-mentioned smooth forward and reverse running state, when the Z signal (zero position) is detected signal), record the artificially given incremental position value at this time, which is the offset value of the position sensor.
- the torque is synthesized by the three-phase current vector, and the position information fed back by the position sensor has a fixed relationship with the position of the rotor.
- the given torque direction The direction of the rotor is 90 degrees perpendicular to it, 90 degrees ahead means forward rotation, and 90 degrees behind means reverse rotation.
- the motor can run smoothly in forward and reverse directions, and the speed is small and the current is the smallest, that is, the efficiency is the highest.
- the type of the position sensor is an encoder, and the electrical angle value is set to 0; according to the type of the position sensor, the electrical angle value and the mechanical angle, the position deviation value between the position sensor and the motor is obtained, including: reading the position The output angle of the sensor; calculate the position deviation value between the position sensor and the motor according to the output angle of the position sensor.
- the rotor direction coincides with the given torque direction at this time, and the motor remains stationary.
- the position corresponding to the angle plus the leading amount, and the required offset value can also be obtained.
- the electrical angle value and the mechanical angle before obtaining the position deviation value between the position sensor and the motor, it also includes: verifying the position sensor to obtain the counting direction and/or or thread count information.
- the checking method of the counting direction includes: judging whether the increasing or decreasing direction of the mechanical angle of the position sensor is consistent with the increasing or decreasing direction of the electrical angle value; when the increasing or decreasing direction of the mechanical angle of the position sensor is consistent with the electrical angle value When the increasing and decreasing direction of the position sensor is inconsistent, the counting direction of the position sensor is consistent with the increasing and decreasing direction of the electrical angle value.
- Fig. 7 is the flow chart of the checking method of the counting direction in an embodiment, in this embodiment, first keep motor in above-mentioned forward steady running state, judge whether the counting direction of encoder is increasing Counting, where when the motor is running forward, the value obtained from the encoder changes from small to large, which is counting up, and when the data obtained from the encoder changes from large to small, it is counting down count.
- This method of increasing and decreasing counting can be set during peripheral verification. Setting, counting cycle setting, zero-crossing signal interrupt configuration and other parameter verification.
- the configuration parameters can be modified to reconfigure the peripheral.
- the verification method of the line number information includes: acquiring adjacent zero position signals output by the position sensor, and counting increments of mechanical angles between adjacent zero position signals as the line number information.
- the calibration line number is mainly to check whether the line number information of the position sensor is correct. Regardless of whether it is an incremental encoder or an absolute position encoder, when the motor physically rotates one revolution, the change in the count value can be calculated. The change is compared with the set line number of the position sensor through conversion. If the deviation is not large (In particular, the photoelectric sensor that counts the number of pulses may have a missing number or a majority due to interference), so the set value can be considered correct. Specifically, when the motor rotates, the zero position signal of the incremental encoder is triggered once when it rotates once, and the number of counts between two trigger signals is the counting period of the encoder. Use this value and the preset counting period value Proofread.
- the incremental rotary encoder is taken as an example for illustration.
- the incremental rotary encoder has a code disc with a shaft in the center, and the engraved lines of the code disc are read by photoelectric transmitting and receiving devices when rotating. Obtain a signal with a 90-degree phase difference between A and B phases; at the same time, output a Z-phase pulse per revolution to represent the zero reference position. Since the phase difference between A and B is 90 degrees, the forward rotation and reverse rotation of the encoder can be judged by comparing whether the A phase is in front or the B phase is in front, and the zero reference position of the encoder can be obtained through the zero pulse.
- the Z signal refers to the signal output by the Z-phase pulse of the incremental encoder, which represents the zero reference, that is, the zero signal.
- the position sensor is a Hall sensor; after reading the output value of the position sensor, it also includes: judging whether the output value of the position sensor meets the preset requirements; when the output value of the position sensor does not meet the requirements, then Determine the position sensor failure.
- the position sensor When the position sensor is a Hall sensor, it can also detect whether the signal of the Hall sensor is correct.
- the three-way signal is combined in bits, and the range is 0-7, but the electrical characteristics determine that the values of 0 and 7 must not appear (normally 120 degrees In the case of Hall), once it appears, it indicates that the input signal of the sensor is faulty, and there is a possibility of short circuit or open circuit. Therefore, it can be used as a judgment condition for error detection. That is, it is judged whether there are two values of 0 and 7 in the output value of the Hall sensor, and if so, a fault is judged.
- the position sensor includes a Hall sensor and an encoder as an example for illustration, which can be specifically shown in Figure 8, Figure 8
- Figure 8 It is a flowchart of a position deviation calibration method in another embodiment. In this embodiment, it mainly includes the following steps:
- the voltage of the motor driver is controlled open-loop, so that the motor runs smoothly in forward and reverse directions and the feedback current is consistent. That is, if the three-phase rotating voltage is given directly, the rotating voltage will generate a rotating magnetic field, and the rotating magnetic field will drive the motor rotor to rotate. Open loop means not going through PID closed loop.
- correct the encoder including checking the encoder, that is, to judge the counting direction of the encoder; the number of pulses obtained by the interval between the two zero position signals of the encoder, check the line number information of the encoder, and re-check the counting of the encoder configuration.
- obtain the position parameter corresponding to the zero position of the encoder after the driver runs stably, obtain the given electrical angle value corresponding to the jump edge of the zero position signal of the encoder and store it, and obtain the electrical angle corresponding to the zero position signal moment of the encoder value, which is the motor encoder bias angle; or fix the given electrical angle to 0, at this time the motor remains locked at a certain position, record and store the electrical angle fed back by the encoder, and calculate the motor encoder bias angle.
- the configuration of the driver and the motor sensor is completed.
- a motor driving method is provided, and the method is applied to the motor driver in FIG. 1 as an example for illustration, including the following steps:
- S806 Calculate the motor rotation position according to the position deviation value and the output value.
- the driver can calculate the motor rotation position by reading the feedback position of the position sensor and adding the corrected relative position offset.
- S808 Process the rotational position of the motor to obtain a pulse width modulation signal used to drive the motor to run.
- the acquisition of motor phase current is mainly used for current closed-loop applications.
- the pulse width adjustment may include CLARK transformation, PARK transformation, control loop, IPARK transformation and ICLARK transformation, etc.
- the CLARK transformation converts from a three-phase rotating coordinate system to a two-phase rotating coordinate system.
- the PARK transformation is the transformation from a two-phase rotating coordinate system to a stationary Cartesian coordinate system.
- IPARK transform and ICLARK transform are inverse operations of CLARK transform and PARK transform. In the process of control, the transfer parameters of each module are per unit values.
- the above-mentioned motor driving method can be applied to robot joints.
- the motor and encoder can also be designed separately and installed independently, thereby improving the flexibility of structural design, further reducing the volume and reducing the cost.
- the production steps of the motor are reduced, that is, the registration steps of the motor and the encoder are reduced, the production process of the motor is optimized, and the efficiency is improved.
- the driver can be adapted to motors from different manufacturers. It solves the problem of mismatching of the offset angle of the drive and the motor encoder, and increases the chances of the drive user to choose the motor supplier. This breaks the monopoly of bundled sales of drivers and motors.
- steps in the flow charts of FIG. 2 and FIG. 8 are shown sequentially as indicated by the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in FIG. 2 and FIG. 8 may include multiple steps or stages. These steps or stages are not necessarily executed at the same time, but may be executed at different times. The execution sequence is not necessarily performed sequentially, but may be performed alternately or alternately with other steps or at least a part of steps or stages in other steps.
- a computer device is provided.
- the computer device may be a terminal, and its internal structure may be as shown in FIG. 9 .
- the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Wherein, the processor of the computer device is used to provide calculation and control capabilities.
- the memory of the computer device includes a non-volatile storage medium and an internal memory.
- the non-volatile storage medium stores an operating system and computer programs.
- the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
- the communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, an operator network, NFC (Near Field Communication) or other technologies.
- the computer program is executed by the processor, a position deviation calibration method and a motor driving method are realized.
- the display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a button, a trackball or a touch pad provided on the casing of the computer device , and can also be an external keyboard, touchpad, or mouse.
- FIG. 9 is only a block diagram of a part of the structure related to the solution of this application, and does not constitute a limitation on the computer equipment on which the solution of this application is applied.
- the specific computer equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
- a computer device including a memory and a processor, a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining a preset electrical angle corresponding to the rotational position of the motor value; apply the torque corresponding to the electrical angle value to the motor; read the mechanical angle of the motor rotor output by the position sensor; obtain the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle.
- the processor before the position deviation value between the position sensor and the motor is obtained according to the electrical angle value and the mechanical angle, which is realized when the processor executes the computer program, it also includes: under open-loop control, making the motor rotate in forward and reverse directions
- the magnitudes of the forward current and the reverse current of the feedback are basically equal and the forward current and the reverse current are the smallest, and are in a smooth forward and reverse running state.
- the processor before obtaining the preset electrical angle value corresponding to the rotational position of the motor when the processor executes the computer program, it includes: obtaining the type of the position sensor; The angle value and the mechanical angle obtain the position deviation value of the position sensor and the motor, including: according to the type of the position sensor, the electrical angle value and the mechanical angle, obtain the position deviation value of the position sensor and the motor.
- the type of the position sensor involved when the processor executes the computer program is a Hall sensor; when the processor executes the computer program, according to the type of the position sensor, the electrical angle value and the mechanical angle, the position sensor and the The position deviation value of the motor includes: recording the electrical angle value corresponding to the jump edge of the signal output by the Hall sensor as the position deviation value between the position sensor and the motor.
- the type of the position sensor involved when the processor executes the computer program is an encoder; when the processor executes the computer program, the position sensor and the motor are obtained according to the type of the position sensor, the electrical angle value and the mechanical angle.
- the position deviation value includes: obtaining the electrical angle value corresponding to the zero position signal output by the encoder as the position deviation value between the position sensor and the motor.
- the type of the position sensor involved when the processor executes the computer program is an encoder, and the electrical angle value is set to 0; Angle, obtaining the position deviation value between the position sensor and the motor, including: reading the output angle of the position sensor; calculating the position deviation value between the position sensor and the motor according to the output angle of the position sensor.
- the processor when the processor executes the computer program, according to the type of the position sensor, the electrical angle value and the mechanical angle, before obtaining the position deviation value between the position sensor and the motor, it also includes: verifying the position sensor to Get count direction and/or line count information from position sensors.
- the checking method of the counting direction involved when the processor executes the computer program includes: judging whether the increasing or decreasing direction of the mechanical angle of the position sensor is consistent with the increasing or decreasing direction of the electrical angle value; when the mechanical angle of the position sensor When the increasing and decreasing direction of the position sensor is inconsistent with the increasing and decreasing direction of the electrical angle value, the counting direction of the position sensor is consistent with the increasing and decreasing direction of the electrical angle value.
- the verification method of the line number information involved when the processor executes the computer program includes: obtaining adjacent zero position signals output by the position sensor, and counting the increase of the mechanical angle between the adjacent zero position signals. amount, as the line number information.
- a computer device including a memory and a processor, a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: read the position deviation obtained according to the above-mentioned position deviation calibration method value; read the output value of the position sensor; calculate the motor rotation position according to the position deviation value and output value; process the motor rotation position to obtain the pulse width modulation signal for driving the motor.
- the position sensor realized when the processor executes the computer program is a Hall sensor; after reading the output value of the position sensor, it also includes: judging whether the output value of the position sensor meets the preset requirements; when the position sensor When the output value does not meet the requirements, it is determined that the position sensor is faulty.
- a computer-readable storage medium on which a computer program is stored.
- the computer program is executed by a processor, the following steps are implemented: obtaining a preset electrical angle value corresponding to the rotational position of the motor; The motor applies a torque corresponding to the electrical angle value; reads the mechanical angle of the motor rotor output by the position sensor; obtains the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle.
- the computer program when executed by the processor, before obtaining the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle, it also includes: under open-loop control, making the motor rotate in the forward and reverse directions
- the magnitudes of the forward current and the reverse current fed back are basically equal and the forward current and the reverse current are the smallest, and the forward and reverse running state is stable.
- obtaining the preset electrical angle value corresponding to the rotational position of the motor when the computer program is executed by the processor includes: obtaining the type of the position sensor; Obtaining the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle includes: obtaining the position deviation value between the position sensor and the motor according to the type of the position sensor, the electrical angle value and the mechanical angle.
- the type of the position sensor involved is a Hall sensor
- the position sensor is obtained according to the type of the position sensor, the electrical angle value and the mechanical angle.
- the position deviation value between the sensor and the motor includes: recording the electrical angle value corresponding to the jump edge of the signal output by the Hall sensor as the position deviation value between the position sensor and the motor.
- the type of the position sensor involved is an encoder; when the computer program is executed by the processor, according to the type of the position sensor, the electrical angle value and the mechanical angle, the position sensor is obtained
- the position deviation value with the motor includes: obtaining the electrical angle value corresponding to the zero position signal output by the encoder as the position deviation value between the position sensor and the motor.
- the type of the position sensor involved is an encoder, and the electrical angle value is set to 0; and the mechanical angle to obtain the position deviation value between the position sensor and the motor, including: reading the output angle of the position sensor; calculating the position deviation value between the position sensor and the motor according to the output angle of the position sensor.
- the computer program when executed by the processor, according to the type of the position sensor, the electrical angle value and the mechanical angle, before obtaining the position deviation value between the position sensor and the motor, it also includes: verifying the position sensor, To obtain the counting direction and/or line number information of the position sensor.
- the checking method of the counting direction involved when the computer program is executed by the processor includes: judging whether the increasing or decreasing direction of the mechanical angle of the position sensor is consistent with the increasing or decreasing direction of the electrical angle value; When the increase and decrease direction of the angle is not consistent with the increase and decrease direction of the electrical angle value, the counting direction of the position sensor is consistent with the increase and decrease direction of the electrical angle value.
- the method of verifying the line number information involved includes: obtaining adjacent zero position signals output by the position sensor, and counting the mechanical angle between adjacent zero position signals Increment, as line count information.
- a computer-readable storage medium on which a computer program is stored.
- the computer program is executed by a processor, the following steps are implemented: reading the position deviation value obtained according to the above position deviation calibration method; reading The output value of the position sensor is taken; the rotational position of the motor is calculated according to the position deviation value and the output value; the rotational position of the motor is processed to obtain a pulse width modulation signal for driving the motor.
- the position sensor implemented when the computer program is executed by the processor is a Hall sensor; after reading the output value of the position sensor, it also includes: judging whether the output value of the position sensor meets the preset requirements; when the position sensor When the output value of the sensor does not meet the requirements, it is determined that the position sensor is faulty.
- any references to memory, storage, database or other media used in the various embodiments provided in the present application may include at least one of non-volatile memory and volatile memory.
- Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory or optical memory, etc.
- Volatile memory can include Random Access Memory (RAM) or external cache memory.
- RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Control Of Motors That Do Not Use Commutators (AREA)
Abstract
A position deviation calibration method, comprising: acquiring a preset electrical angle value corresponding to a rotation position of an electric motor (S202); outputting to the electric motor a torque corresponding to the electrical angle value (S204); reading a mechanical angle, which is output by a position sensor, of a rotor of the electric motor (S206); and according to the electrical angle value and the mechanical angle, obtaining a position deviation value between the position sensor and the electric motor (S208).
Description
本申请要求2021年12月22日申请的申请号为202111583018.5的中国专利申请的优先权,在此将其全文引入作为参考。This application claims the priority of the Chinese patent application No. 202111583018.5 filed on December 22, 2021, which is hereby incorporated by reference in its entirety.
本申请涉及电机控制技术领域,特别是涉及一种位置偏差标定方法、电机驱动方法、***和设备。The present application relates to the technical field of motor control, in particular to a position deviation calibration method, a motor driving method, system and equipment.
电机及其驱动器是机器人的动力执行器,是机器人***中的核心部件。传统的电机及其编码器的相对位置是出厂前固定在一起,且校正好的。The motor and its driver are the power actuators of the robot and the core components of the robot system. The relative position of the traditional motor and its encoder is fixed and calibrated before leaving the factory.
而在永磁同步电机驱动器中,有一关键参数配置是与电机及其位置传感器安装的相对位置相匹配对应的。现在常用的方法是在出厂时,把电机和位置传感器安装的相对位置关系,通过工装及工序使之固定且一致。同时,电机驱动器与之对应的配置参数也是固定不变的值。In the permanent magnet synchronous motor driver, there is a key parameter configuration that matches the relative position of the motor and its position sensor installation. The commonly used method now is to fix the relative positional relationship between the motor and the position sensor when leaving the factory, and make it fixed and consistent through tooling and processes. At the same time, the corresponding configuration parameters of the motor driver are also fixed values.
然而,电机驱动器和电机有匹配关系,而不同厂家/国家出厂的电机和位置传感器安装的相对位置关系又不统一,所以用户必须成套采购电机驱动器和电机。However, the motor driver and the motor have a matching relationship, and the relative position relationship between the installation of the motor and the position sensor of different manufacturers/countries is not uniform, so the user must purchase the motor driver and the motor as a set.
发明内容Contents of the invention
本申请提供一种能够标定位置传感器的位置偏差值的位置偏差标定方法、电机驱动方法、***和设备。The present application provides a position deviation calibration method capable of calibrating a position deviation value of a position sensor, a motor driving method, a system and a device.
本申请一方面提供一种位置偏差标定方法,所述方法包括:获取预先设置的与电机的旋转位置对应的电气角度值;向所述电机施加与所述电气角度值对应的力矩;读取位置传感器输出的电机转子的机械角度;根据所述电气角度值和所述机械角度,得到所述位置传感器与电机的位置偏差值。On the one hand, the present application provides a position deviation calibration method, the method comprising: obtaining a preset electrical angle value corresponding to the rotational position of the motor; applying a torque corresponding to the electrical angle value to the motor; reading the position The mechanical angle of the motor rotor output by the sensor; according to the electrical angle value and the mechanical angle, a position deviation value between the position sensor and the motor is obtained.
在其中一个实施例中,所述根据所述电气角度值和所述机械角度,得到所述位置传感器与电机的位置偏差值之前,还包括:在开环控制下,使得所述电机在正反转时反馈的正向电流和反向电流大小基本相等且所述正向电流和反向电流最小,并处于正反转平稳运行状态。In one of the embodiments, before obtaining the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle, it also includes: under open-loop control, making the motor rotate The magnitudes of the forward current and the reverse current fed back during rotation are basically equal and the forward current and the reverse current are the smallest, and are in a stable forward and reverse running state.
在其中一个实施例中,所述获取预先设置的与所述电机的旋转位置对应的电气角度值之前,包括:获取位置传感器的类型;In one of the embodiments, before acquiring the preset electrical angle value corresponding to the rotational position of the motor, it includes: acquiring the type of the position sensor;
所述根据所述电气角度值和所述机械角度得到所述位置传感器与电机的位置偏差值,包括:根据所述位置传感器的类型、所述电气角度值和所述机械角度,得到所述位置传感器与电机的位置偏差值。The obtaining the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle includes: obtaining the position deviation value according to the type of the position sensor, the electrical angle value and the mechanical angle The position deviation value between the sensor and the motor.
在其中一个实施例中,所述位置传感器的类型为霍尔传感器;所述根据所述位置传感器的类型、所述电气角度值和所述机械角度,得到所述位置传感器与电机的位置偏差值,包括:记录所述霍尔传感器输出的信号跳变沿对应的所述电气角度值,作为所述位置传感器与电机的位置偏差值。In one of the embodiments, the type of the position sensor is a Hall sensor; the position deviation value between the position sensor and the motor is obtained according to the type of the position sensor, the electrical angle value and the mechanical angle , comprising: recording the electrical angle value corresponding to the signal transition edge output by the Hall sensor as a position deviation value between the position sensor and the motor.
在其中一个实施例中,所述位置传感器的类型为编码器;所述根据所述位置传感器的类型、所述电气角度值和所述机械角度,得到所述位置传感器与电机的位置偏差值,包括:获取所述编码器输出的零位信号对应的所述电气角度值,作为所述位置传感器与电机的位置偏差值。In one of the embodiments, the type of the position sensor is an encoder; the position deviation value between the position sensor and the motor is obtained according to the type of the position sensor, the electrical angle value and the mechanical angle, The method includes: obtaining the electrical angle value corresponding to the zero position signal output by the encoder as a position deviation value between the position sensor and the motor.
在其中一个实施例中,所述位置传感器的类型为编码器,所述电气角度值设为0;所述根据所述电气角度值和所述机械角度,得到所述位置传感器与电机的位置偏差值,包括:读取所述位置传感器的输出角度;根据所述位置传感器的输出角度计算得到所述位置传感器与电机的位置偏差值。In one of the embodiments, the type of the position sensor is an encoder, and the electrical angle value is set to 0; the position deviation between the position sensor and the motor is obtained according to the electrical angle value and the mechanical angle The value includes: reading the output angle of the position sensor; calculating the position deviation value between the position sensor and the motor according to the output angle of the position sensor.
在其中一个实施例中,所述方法还包括:对所述位置传感器进行校验,以得到所述位置传感器的计数方向和/或线数信息。In one embodiment, the method further includes: calibrating the position sensor to obtain counting direction and/or line number information of the position sensor.
在其中一个实施例中,所述对所述位置传感器进行校验,以得到所述位置传感器的计数方向和/或线数信息包括:判断所述位置传感器的机械角度的增减方向是否与所述电气角度值的增减方向一致;当所述位置传感器的机械角度的增减方向与所述电气角度值的增减方向不一致时,配置所述位置传感器的计数方向与所述电气角度值的增减方向一致。In one of the embodiments, the verifying the position sensor to obtain the counting direction and/or line number information of the position sensor includes: judging whether the increase or decrease direction of the mechanical angle of the position sensor is consistent with the The direction of increase and decrease of the electrical angle value is consistent; when the direction of increase and decrease of the mechanical angle of the position sensor is inconsistent with the direction of increase and decrease of the electrical angle value, configure the counting direction of the position sensor and the direction of the electrical angle value The direction of increase and decrease is the same.
在其中一个实施例中,所述对所述位置传感器进行校验,以得到所述位置传感器的计数方向和/或线数信息包括:获取所述位置传感器输出的相邻的零位信号,统计相邻的所述零位信号之间的机械角度的增量,作为所述线数信息。In one of the embodiments, the verifying the position sensor to obtain the counting direction and/or line number information of the position sensor includes: obtaining the adjacent zero position signal output by the position sensor, counting The increment of the mechanical angle between adjacent zero position signals is used as the line number information.
在其中一个实施例中,所述位置传感器为霍尔传感器;所述读取位置传感器输出的电机转子的机械角度之后,还包括:判断所述位置传感器的输出值是否满足预设要求;当所述位 置传感器的输出值不满足要求时,则判定所述位置传感器故障。In one of the embodiments, the position sensor is a Hall sensor; after reading the mechanical angle of the motor rotor output by the position sensor, it also includes: judging whether the output value of the position sensor meets the preset requirements; when the If the output value of the position sensor does not meet the requirements, it is determined that the position sensor is faulty.
本申请另一方面提供一种电机驱动方法,所述电机驱动方法包括:读取根据上述任意一个实施例中所述的位置偏差标定方法得到的所述位置偏差值;读取所述位置传感器的输出值;根据所述位置偏差值和所述输出值计算得到电机旋转位置;对所述电机旋转位置进行处理得到用于驱动所述电机运行的脉冲宽度调制信号。Another aspect of the present application provides a motor driving method, the motor driving method includes: reading the position deviation value obtained according to the position deviation calibration method described in any one of the above embodiments; reading the position sensor output value; calculate the motor rotation position according to the position deviation value and the output value; process the motor rotation position to obtain a pulse width modulation signal for driving the motor to run.
本申请另一方面提供一种电机驱动***,所述***包括电机、位置传感器以及电机驱动器;所述位置传感器分别与所述电机和所述电机驱动器相连接,所述电机与所述电机驱动器相连接;所述电机驱动器用于执行上述任意一个实施例中的方法中的步骤。Another aspect of the present application provides a motor drive system, the system includes a motor, a position sensor and a motor driver; the position sensor is respectively connected to the motor and the motor driver, and the motor is connected to the motor driver connected; the motor driver is used to execute the steps in the method in any one of the above embodiments.
本申请另一方面提供一种机器人关节,所述机器人关机采用上述的电机驱动***。Another aspect of the present application provides a robot joint, and the shutdown of the robot adopts the above-mentioned motor drive system.
本申请另一方面提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述任意一个实施例中的方法的步骤。Another aspect of the present application provides a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method in any one of the above embodiments when executing the computer program.
本申请另一方面提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任意一个实施例中的方法的步骤。Another aspect of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method in any one of the above-mentioned embodiments are implemented.
本发明的一个或多个实施例的细节在下面的附图和描述中提出。本发明的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。The details of one or more embodiments of the invention are set forth in the accompanying drawings and the description below. Other features, objects and advantages of the invention will be apparent from the description, drawings and claims.
为了更好地描述和说明本申请的实施例,可参考一幅或多幅附图,但用于描述附图的附加细节或示例不应当被认为是对本申请的发明创造、目前所描述的实施例中任何一者的范围的限制。In order to better describe and illustrate the embodiments of the application, reference may be made to one or more drawings, but additional details or examples used to describe the drawings should not be regarded as an invention of the application, the presently described implementation Limits on the scope of any of the examples.
图1为一个实施例中电机驱动***的示意图;Fig. 1 is the schematic diagram of motor drive system in an embodiment;
图2为一个实施例中位置偏差标定方法的流程示意图;Fig. 2 is a schematic flow chart of a position deviation calibration method in an embodiment;
图3为一个实施例中力矩与电机的转子垂直时的示意图;Fig. 3 is a schematic diagram when the torque is perpendicular to the rotor of the motor in one embodiment;
图4为一个实施例中力矩与电机的转子重叠时的示意图;Fig. 4 is a schematic diagram when the torque overlaps with the rotor of the motor in one embodiment;
图5为一个实施例中的正反转平稳运行状态的获取流程的示意图;Fig. 5 is a schematic diagram of the acquisition process of the forward and reverse smooth running state in an embodiment;
图6为一个实施例中的霍尔传感器的位置偏差值的获取流程图;Fig. 6 is a flow chart of obtaining the position deviation value of the Hall sensor in one embodiment;
图7为另一个实施例中位置偏差标定方法的流程示意图;Fig. 7 is a schematic flow chart of a position deviation calibration method in another embodiment;
图8为一个实施例中电机驱动方法的流程示意图;Fig. 8 is a schematic flow chart of a motor driving method in an embodiment;
图9为一个实施例中计算机设备的内部结构图。Figure 9 is an internal block diagram of a computer device in one embodiment.
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.
申请人已知的一种位置偏差标定方法中,采用对拖装置,通过连轴器带动被测电机旋转,在旋转状态下,电机绕组会产生反电动势,位置编码器过零信号会产生脉冲波形,霍尔传感器的U相会产生高低电平跳变。常规对齐策略是通过调整传感器和电机的相对位置,把传感器零信号对齐反电动势的过零点。如果带有独立霍尔传感器,且需要调整角度的话,也同样的方法,使传感器U信号的上升沿对齐反电动势的过零点。每台电机出厂前都采用此方法做对拖校正,统一编差值。这样才能保证驱动器内部固定的偏差值差数适配每台电机。然而,又因为各个电机厂家对齐反电动势的位置不统一,导致驱动器和电机需要配套使用才可以,只要驱动器内部固定的偏差值参数和电机的位置偏差值不适配,电机就不能正常运行。In a position deviation calibration method known by the applicant, a counter-drag device is used to drive the motor under test to rotate through a shaft coupling. In the rotating state, the motor winding will generate a counter electromotive force, and the zero-crossing signal of the position encoder will generate a pulse waveform , the U phase of the Hall sensor will generate high and low level jumps. The conventional alignment strategy is to align the zero signal of the sensor with the zero-crossing point of the back EMF by adjusting the relative position of the sensor and the motor. If there is an independent Hall sensor and the angle needs to be adjusted, the same method is used to align the rising edge of the sensor U signal with the zero-crossing point of the back electromotive force. Before leaving the factory, each motor adopts this method for pair-to-drag calibration, and uniformly compiles the difference. Only in this way can the fixed deviation value inside the driver be adapted to each motor. However, because each motor manufacturer aligns the position of the back electromotive force is not uniform, the driver and the motor need to be used together. As long as the fixed deviation value parameter inside the driver does not match the position deviation value of the motor, the motor will not operate normally.
以上校正方法中用到了对拖电机及对拖驱动器,还有示波器,及一定的工装才可以完成,再加上工人的操作,每一步骤都需要人为参与,出错的可能性较大。另外,校正完成的标准是通过示波器波形判断出来的,有一定的主观性。另外,如果驱动器不具备识别偏置的功能,其适配的电机就会受限。The above calibration methods use the tow motor, the tow driver, the oscilloscope, and certain tooling to complete. In addition to the operation of the workers, each step requires human participation, and the possibility of error is high. In addition, the standard of calibration completion is judged by the waveform of the oscilloscope, which has a certain degree of subjectivity. In addition, if the driver does not have the function of identifying the bias, the motors it can adapt to will be limited.
本申请提供的位置偏差标定方法以及电机驱动方法,可以应用于如图1所示的电机驱动***,该电机驱动***包括电机、位置传感器以及电机驱动器;位置传感器分别与电机和电机驱动器相连接,电机与电机驱动器相连接。其中位置传感器与电机可以是分开的,中间采用传动装置连接,这样使得工程师的空间利用自由度会更大一些。The position deviation calibration method and the motor driving method provided by the present application can be applied to the motor drive system shown in Figure 1, the motor drive system includes a motor, a position sensor and a motor driver; the position sensor is connected to the motor and the motor driver respectively, The motor is connected with the motor driver. Among them, the position sensor and the motor can be separated, and the transmission device is connected in the middle, so that the freedom of space utilization of the engineer will be greater.
结合图1所示,其中,该电机驱动器不需要对拖电机和对拖驱动器,也不需要示波器及一些工装,只需要把驱动器和要拖动的电机按正常连接起来,通过上位机界面,启动自动配置的程序,就可以得到电机和位置传感器的位置偏差值并存储。此外,电机驱动器还可以根据位置传感器的类型等基本参数,识别并校正位置传感器参数及判断是否有信号故障等,具体可以参见下文。As shown in Figure 1, the motor driver does not need tow motors and tow drivers, nor does it need an oscilloscope or some tooling. It only needs to connect the driver and the motor to be dragged normally, and start the drive through the host computer interface. Automatically configure the program, you can get the position deviation value of the motor and position sensor and store it. In addition, the motor driver can also identify and correct the parameters of the position sensor and judge whether there is a signal failure according to the basic parameters such as the type of the position sensor. For details, please refer to the following.
在一个实施例中,如图2所示,提供了一种位置偏差标定方法,以该方法应用于图1中 的电机驱动器为例进行说明,包括以下步骤:In one embodiment, as shown in Figure 2, a method for calibrating position deviation is provided, and the method is applied to the motor driver in Figure 1 as an example, including the following steps:
S202:获取预先设置的与电机的旋转位置对应的电气角度值。S202: Obtain a preset electrical angle value corresponding to the rotation position of the motor.
电气角度值是预先设置的,不同的机械位置对应一定规律变化的电气角度值,在一个实施例中,可以预先设置电机的旋转位置的变化方向,这样按照递增的电机的旋转位置来配置按照一定规律变化的电气角度值。其中实际应用中,该电气角度值即人为给定的激励信号的角度值,即在开环控制下,给定的旋转电压对应的旋转的角度值。其中以环形电机为例,其转子旋转一周,产生不同的递增的位置,用户预先给这些递增的位置配置按照一定规律变化的电气角度值。The electrical angle value is pre-set, and different mechanical positions correspond to certain regularly changing electrical angle values. In one embodiment, the direction of change of the motor’s rotational position can be preset, so that the incremental motor’s rotational position can be configured according to a certain Regularly varying electrical angle values. In practical applications, the electrical angle value is the angle value of the artificially given excitation signal, that is, the rotation angle value corresponding to the given rotation voltage under open-loop control. Taking the ring motor as an example, its rotor rotates once to generate different incremental positions. The user pre-configures these incremental positions with electrical angle values that change according to a certain rule.
S204:向电机施加与电气角度值对应的力矩。S204: Apply a torque corresponding to the electrical angle value to the motor.
根据电气角度值配置的力矩可以参见图3和图4所示,其中一种力矩为图3中所示的力矩,其中力矩与电机的转子相互垂直,此时即为在一定力矩下,转速最大的状态,也即电机处于正反转平稳运行状态,在该状态下,力矩与电机的转子相互垂直,随着电气角度值的变化,力矩的方向也变化,但是力矩与电机的转子始终处于相互垂直的状态;另外一种是图4中的力矩,力矩与电机的转子相互重叠,此时即在一定力矩下,转子的位置不变,此时电气角度值固定为0。The torque configured according to the electrical angle value can be seen in Figure 3 and Figure 4. One of the torques is the torque shown in Figure 3, where the torque is perpendicular to the rotor of the motor. At this time, under a certain torque, the maximum speed state, that is, the motor is in the state of smooth forward and reverse operation. In this state, the torque and the rotor of the motor are perpendicular to each other. With the change of the electrical angle value, the direction of the torque also changes, but the torque and the rotor of the motor are always in mutual relationship. The vertical state; the other is the torque in Figure 4. The torque overlaps with the rotor of the motor. At this time, under a certain torque, the position of the rotor remains unchanged, and the electrical angle value is fixed at 0 at this time.
可选地,在向电机施加与电气角度值对应的力矩的时候,优选地,先输出使得电机的转子转动的力矩,并使得力矩与转子一直处于垂直状态,调试力矩值的大小,从而使得电机处于稳定状态下,然后再进行采集位置传感器的读数等,以避免误差。Optionally, when applying a torque corresponding to the electrical angle value to the motor, preferably, first output the torque that makes the rotor of the motor rotate, and make the torque and the rotor always in a vertical state, and adjust the size of the torque value, so that the motor In a stable state, and then collect the readings of the position sensor, etc., to avoid errors.
S206:读取位置传感器输出的电机转子的机械角度。S206: Read the mechanical angle of the motor rotor output by the position sensor.
在一个实施例中,位置传感器可以根据实际情况来选择,其中位置传感器包括霍尔传感器和/或编码器,电机驱动器可以采集得到霍尔传感器和/或编码器输出的电机转子的机械角度。In one embodiment, the position sensor can be selected according to the actual situation, wherein the position sensor includes a Hall sensor and/or an encoder, and the motor driver can collect the mechanical angle of the motor rotor output by the Hall sensor and/or encoder.
其中,位置传感器输出的电机转子的机械角度需要在电机处于正反转稳定运行状态后读取,或者是至少要等待电机转子旋转一周后再读取。以增量式旋转位置传感器为例,其中在上电后,位置传感器输出的信号为零,并依次增加,直至到达零位后,进行矫正,输出零位信号,再按照编码方式增加,因此为了保证位置传感器的机械角度的准确性,需要等待电机转子旋转一周后再读取。在其他的实施例中,当电气角度值一直为零时,可以在转子不再旋转的时候,再读取位置传感器输出的电机转子的机械角度。Among them, the mechanical angle of the motor rotor output by the position sensor needs to be read after the motor is in a stable forward and reverse running state, or at least wait for the motor rotor to rotate once before reading. Take the incremental rotary position sensor as an example. After power-on, the output signal of the position sensor is zero, and increases sequentially until it reaches the zero position, corrects it, outputs the zero position signal, and then increases according to the encoding method. Therefore, in order to To ensure the accuracy of the mechanical angle of the position sensor, it is necessary to wait for the motor rotor to rotate once before reading it. In other embodiments, when the electrical angle value is always zero, the mechanical angle of the motor rotor output by the position sensor can be read again when the rotor is no longer rotating.
S208:根据电气角度值和机械角度得到位置传感器与电机的位置偏差值。S208: Obtain a position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle.
其中,由于电气角度值与电机的旋转位置是对应的,位置传感器输出的机械角度与电机的旋转位置也是对应的,因此根据电机的旋转位置可以得到电气角度值和机械角度的对应关系,进而得到位置传感器与电机的位置偏差值。Among them, since the electrical angle value corresponds to the rotation position of the motor, the mechanical angle output by the position sensor also corresponds to the rotation position of the motor, so the corresponding relationship between the electrical angle value and the mechanical angle can be obtained according to the rotation position of the motor, and then obtained The position deviation value between the position sensor and the motor.
在一个实施例中,由于转子在旋转状态和不旋转状态时,位置传感器与电机的位置偏差值的计算逻辑存在不同,因此电机驱动器根据转子的状态所对应的计算逻辑来对电气角度值和机械角度进行处理以计算得到位置偏差值。In one embodiment, since the calculation logic of the position deviation value of the position sensor and the motor is different when the rotor is in the rotating state and the non-rotating state, the motor driver calculates the electrical angle value and the mechanical angle value according to the calculation logic corresponding to the state of the rotor. The angle is processed to calculate the position deviation value.
其中为了使得本领域的技术人员能充分理解上述技术方案,下面对本技术方案的原理进行说明,其中预先设置的各个电机的旋转位置对应的电气角度值是电机驱动器预先设置的,也即在对应的机械位置处首先对应有一电气角度值,该电气角度值也即人为给定的激励信号的角度值,每输入一个电脉冲,电机转动一个角度前进一步。电机输出的角位移与输入的脉冲数成正比、转速与脉冲频率成正比。因此在转子旋转一周期间,记录位置传感器输出的机械角度,从而建立输出的机械角度与电气角度值的对应关系,这样后续根据机械角度与电气角度值的对应关系可以知道各个位置下位置传感器与电机的位置偏差值。In order to enable those skilled in the art to fully understand the above technical solution, the principle of this technical solution will be described below, wherein the electrical angle value corresponding to the preset rotation position of each motor is preset by the motor driver, that is, in the corresponding The mechanical position first corresponds to an electrical angle value, which is also the angle value of the artificially given excitation signal. Every time an electrical pulse is input, the motor rotates an angle and advances one step. The angular displacement output by the motor is proportional to the number of input pulses, and the rotational speed is proportional to the pulse frequency. Therefore, during one revolution of the rotor, the mechanical angle output by the position sensor is recorded, so as to establish the corresponding relationship between the output mechanical angle and the electrical angle value, so that the position sensor and the motor at each position can be known according to the corresponding relationship between the mechanical angle and the electrical angle value. positional deviation value.
上述位置偏差标定方法,不需要对拖电机和对拖驱动器,也不需要示波器及一些工装,仅需要将电机驱动器和电机连接起来,然后获取预先设置的与电机的旋转位置对应的电气角度值,这样向电机施加与电气角度值对应的力矩以读取位置传感器输出的电机转子的机械角度,进而对电气角度值和机械角度进行处理得到位置传感器与电机的位置偏差值,更加简单方便。The above position deviation calibration method does not require the dragging motor and the dragging driver, nor does it require an oscilloscope and some tooling. It only needs to connect the motor driver and the motor, and then obtain the preset electrical angle value corresponding to the rotation position of the motor. In this way, the torque corresponding to the electrical angle value is applied to the motor to read the mechanical angle of the motor rotor output by the position sensor, and then the electrical angle value and the mechanical angle are processed to obtain the position deviation value between the position sensor and the motor, which is simpler and more convenient.
在其中一个实施例中,根据电气角度值和机械角度,得到位置传感器与电机的位置偏差值之前,还包括:在开环控制下,使得电机在正反转时反馈的正向电流和反向电流大小基本相等且所述正向电流和反向电流最小,并处于正反转平稳运行状态。In one of the embodiments, before obtaining the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle, it also includes: under open-loop control, the forward current and reverse The magnitude of the current is basically equal, and the forward current and the reverse current are the smallest, and it is in a stable forward and reverse running state.
在其中一个实施例中,正反转平稳运行状态的获取方式包括:首先配置输入电机的力矩,以使得电机开始旋转;采集电机正反转时输出的采样电流;当采样电流的大小相等且最小时,电机处于正反转平稳运行状态。In one of the embodiments, the way to obtain the stable forward and reverse running state includes: first configuring the torque input to the motor so that the motor starts to rotate; collecting the sampled current output when the motor is clocked and reversed; Hours, the motor is running smoothly in forward and reverse directions.
具体地,正反转平稳运行状态是在电机无负载的情况下,给一定的力矩和一定的旋转速度,通过程序自动调整给定的正反力矩大小(例如,由小到大的顺序递增),使之在正反转时反馈的电流大小基本相等,且电机平稳运行,其中随着给定的正反力矩的大小的改变,其反 馈的正向电流和反向电流的大小也会改变,当正向电流和反向电流的大小基本相等且最小时,电机处于正反转平稳运行状态。其中,最小正向电流和反向电流主要是为了保证力矩的方向基本与转子的方向垂直,这样可以根据预先设置的电气角度值以及转子的方向来计算得到力矩的方向,便于施加力矩。此状态是获取霍尔传感器及获取编码器零位对应位置参数的基础。Specifically, the smooth forward and reverse running state is when the motor has no load, given a certain torque and a certain rotation speed, the given positive and negative torque is automatically adjusted through the program (for example, the order is increased from small to large) , so that the magnitude of the feedback current is basically equal during forward and reverse rotation, and the motor runs smoothly. As the magnitude of the given positive and negative torque changes, the magnitude of the feedback forward current and reverse current will also change, When the magnitudes of forward current and reverse current are basically equal and minimum, the motor is in the state of smooth forward and reverse operation. Among them, the minimum forward current and reverse current are mainly to ensure that the direction of the torque is basically perpendicular to the direction of the rotor, so that the direction of the torque can be calculated according to the preset electrical angle value and the direction of the rotor, and it is convenient to apply the torque. This state is the basis for obtaining the Hall sensor and the position parameters corresponding to the zero position of the encoder.
其中,给定力矩要克服电机自身的摩擦力才能使电机旋转,根据同步电机的特性,电机的旋转角度和给定的递增旋转位置对应的角度一致。那么,在给定的恒定转速下,维持正常旋转的最小力矩矢量方向和当前电机转子电气位置垂直。正反摩擦力一样的情况下,正反最小力矩也一样。基于上述推导,根据电流采样反馈的数据大小即可判定电机是否达到需要的状态。Among them, the given torque must overcome the friction force of the motor itself to make the motor rotate. According to the characteristics of the synchronous motor, the rotation angle of the motor is consistent with the angle corresponding to the given incremental rotation position. Then, at a given constant speed, the direction of the minimum torque vector to maintain normal rotation is perpendicular to the current electrical position of the motor rotor. When the positive and negative friction forces are the same, the positive and negative minimum moments are also the same. Based on the above derivation, it can be determined whether the motor has reached the required state according to the data size of the current sampling feedback.
具体地,结合图5所示,图5为一个实施例中的正反转平稳运行状态的获取流程的示意图,在该实施例中,先将电机和驱动器正确连接,然后在电机输出无负载的情况下,基于SVPWM(空间矢量脉宽调试的方法)的控制架构,来配置施加到电机的力矩,以使得电机开始旋转;采集电机正反转时输出的采样电流;当采样电流的大小相等且最小时,电机处于正反转平稳运行状态,例如配置ipark变换算法的输入参数为Id=0,Iq=0.2(标幺值),其中需要说明的是Id表征的是处于d轴上的电流,Iq表征的是处于q轴上的电流,其中由于d轴上的电流在转子转动时并没有切割磁感线,所以感应电流id并不会产生洛伦兹力;q轴上的电流在转子转动时切割磁感线,从而产生洛伦兹力,进而产生力矩,因此通过配置q轴上的电流可以配置产生不同的力矩值。Specifically, as shown in FIG. 5, FIG. 5 is a schematic diagram of the acquisition process of the forward and reverse smooth running state in an embodiment. In this embodiment, the motor and the driver are connected correctly first, and then the motor outputs In this case, configure the torque applied to the motor based on the control architecture of SVPWM (Space Vector Pulse Width Debugging Method), so that the motor starts to rotate; collect the sampling current output when the motor is forward and reverse; when the sampling current is equal in magnitude and At the minimum, the motor is in the forward and reverse stable running state. For example, the input parameters of the configuration ipark transformation algorithm are Id=0, Iq=0.2 (per unit value), where it should be noted that Id represents the current on the d-axis, Iq represents the current on the q-axis, where the induced current id does not generate a Lorentz force because the current on the d-axis does not cut the magnetic field line when the rotor rotates; the current on the q-axis is in the rotor rotation When cutting the magnetic induction line, the Lorentz force is generated, and then the torque is generated. Therefore, different torque values can be generated by configuring the current on the q-axis.
这样在配置了力矩后,通过人为给定递增的位置信息对应的旋转角度(即给定电气角度值),且为了保证相对稳定,优选地,注入约20%额定频率递增的电气角度信号,进而通过调整上述的力矩,主要是Iq的大小和方向,使得转速平稳,且在输入电流正反转一致的时候达到正反转平稳运行状态。In this way, after the torque is configured, the rotation angle corresponding to the incremental position information (that is, the given electrical angle value) is artificially given, and in order to ensure relative stability, preferably, an electrical angle signal with an incremental increase of about 20% of the rated frequency is injected, and then By adjusting the above torque, mainly the size and direction of Iq, the speed is stable, and the forward and reverse running state is achieved when the input current is consistent with the forward and reverse directions.
上述实施例中,以空间矢量控制为基础框架,通过人为给定递增的位置信息对应的旋转角度theta(即给定电气角度),替代传感器实际反馈的信息,通过人为给定的直角坐标系q轴上的力矩信息,电机便会开环的旋转起来。程序内部会采集电机相电流,通过一系列的变换后,得到力矩信息反馈;当正转和反转时,电机的采样电流大小相等且最小时还能保持正常运行。此状态作为后续动态辨识的运行状态。In the above-mentioned embodiment, the space vector control is used as the basic framework, and the rotation angle theta corresponding to the incremental position information is artificially given (that is, the given electrical angle), instead of the information actually fed back by the sensor, and the artificially given Cartesian coordinate system q The torque information on the shaft will cause the motor to rotate in an open loop. The program will collect the phase current of the motor, and after a series of transformations, the torque information feedback will be obtained; when the motor rotates forward and reverse, the sampled current of the motor is equal and can maintain normal operation when it is the smallest. This state is used as the running state of subsequent dynamic identification.
在其中一个实施例中,获取预先设置的与电机的旋转位置对应的电气角度值之前,包括: 获取位置传感器的类型;根据电气角度值和机械角度得到位置传感器与电机的位置偏差值,包括:根据位置传感器的类型、电气角度值和机械角度,得到位置传感器与电机的位置偏差值。In one of the embodiments, before obtaining the preset electrical angle value corresponding to the rotational position of the motor, it includes: obtaining the type of the position sensor; obtaining the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle, including: According to the type of the position sensor, the electrical angle value and the mechanical angle, the position deviation value between the position sensor and the motor is obtained.
此处的位置传感器的类型包括霍尔传感器和编码器,其中在对位置传感器进行标定之前,先确定位置传感器的类型,然后再进行后续标定,避免出现错误。The types of position sensors here include Hall sensors and encoders. Before calibrating the position sensor, the type of the position sensor must be determined first, and then subsequent calibration is performed to avoid errors.
即根据不同的位置传感器得到不同的参数,需要在配置启动前,通过参数设置的方式,选择实际使用的传感器。否则报错。That is, to obtain different parameters according to different position sensors, it is necessary to select the actual sensor to be used through parameter setting before the configuration is started. Otherwise report an error.
在其中一个实施例中,位置传感器的类型为霍尔传感器;根据位置传感器的类型、电气角度值和机械角度,得到位置传感器与电机的位置偏差值,包括:记录霍尔传感器输出的信号跳变沿对应的电气角度值,作为位置传感器与电机的位置偏差值。In one of the embodiments, the type of the position sensor is a Hall sensor; according to the type of the position sensor, the electrical angle value and the mechanical angle, the position deviation value between the position sensor and the motor is obtained, including: recording the signal jump output by the Hall sensor The corresponding electrical angle value is used as the position deviation value between the position sensor and the motor.
霍尔传感器一般是用于辅助换相的,有安装在电机的槽间的,也有和其它传感器做在一起的,也有分立的。传统该传感器分为120度和60度霍尔。Hall sensors are generally used to assist commutation, some are installed between the slots of the motor, some are made together with other sensors, and some are separate. Traditionally, the sensor is divided into 120-degree and 60-degree Hall.
其中本实施例中的位置传感器与电机的位置偏差值可以通过霍尔辅助换相信号所对应的给定电气角度信息来表征,因此电机驱动器仅需要记录霍尔辅助换相信号所对应的给定电气角度值即可。The position deviation value between the position sensor and the motor in this embodiment can be characterized by the given electrical angle information corresponding to the Hall auxiliary commutation signal, so the motor driver only needs to record the given electrical angle information corresponding to the Hall auxiliary commutation signal The electrical angle value is sufficient.
在伺服应用中,如果有更高精度的增量式的位置传感器时,该霍尔传感器只在启动时粗定位,得到启动位置对应的电气角度。一旦启动成功后,断电前便不再使用。In servo applications, if there is a higher-precision incremental position sensor, the Hall sensor is only roughly positioned at startup to obtain the electrical angle corresponding to the startup position. Once started successfully, it will no longer be used before power off.
结合图6所示,图6为一个实施例中的霍尔传感器的位置偏差值的获取流程图,在该实施例中,首先保证电机处于正反转平稳运行状态,且存在霍尔辅助换相信号,旋转大于1周且旋转状态下时,记录霍尔传感器输出的信号跳变沿对应的电气角度值,并存储。As shown in Fig. 6, Fig. 6 is a flow chart of obtaining the position deviation value of the Hall sensor in an embodiment. In this embodiment, firstly, it is ensured that the motor is in a stable forward and reverse running state, and there is a Hall-assisted commutation Signal, when the rotation is greater than 1 revolution and in the rotation state, the electrical angle value corresponding to the signal transition edge output by the Hall sensor is recorded and stored.
在实际应用中,给定电气角度为人为给定的激励信号,即电压开环给定的旋转电压对应的旋转的角度值,辅助换相信号在一个电气周期内由5、1、3、2、6、4循环变化,记录该辅助换相信号跳变的边沿时刻对应的上述给定的旋转电压的角度值,作为位置传感器与电机的位置偏差值。In practical applications, the given electrical angle is an artificially given excitation signal, that is, the rotation angle value corresponding to the given rotation voltage of the voltage open loop, and the auxiliary commutation signal is composed of 5, 1, 3, 2 in one electrical cycle , 6, and 4 cycle change, record the angle value of the above-mentioned given rotation voltage corresponding to the edge moment of the jump of the auxiliary commutation signal, as the position deviation value between the position sensor and the motor.
在其中一个实施例中,位置传感器的类型为编码器;根据位置传感器的类型、电气角度值和机械角度,得到位置传感器与电机的位置偏差值,包括:获取编码器输出的零位信号对应的电气角度值,作为位置传感器与电机的位置偏差值。In one of the embodiments, the type of the position sensor is an encoder; according to the type of the position sensor, the electrical angle value and the mechanical angle, the position deviation value between the position sensor and the motor is obtained, including: obtaining the corresponding value of the zero position signal output by the encoder The electrical angle value is used as the position deviation value between the position sensor and the motor.
具体地,结合图3所示,其中力矩与电机的转子角度垂直时输出力矩,转子旋转。其中 以编码器为增量式位置传感器为例进行说明,获取其的位置偏置,推算出电机编码器偏置角度包括:在上述正反转平稳运行状态下,当检测到Z信号(零位信号)时,记录此时人为给定的增递位置值,该值即为位置传感器的偏置值。Specifically, as shown in FIG. 3 , when the torque is perpendicular to the rotor angle of the motor, the torque is output, and the rotor rotates. Taking the encoder as an incremental position sensor as an example to illustrate, to obtain its position offset, and calculate the offset angle of the motor encoder includes: in the above-mentioned smooth forward and reverse running state, when the Z signal (zero position) is detected signal), record the artificially given incremental position value at this time, which is the offset value of the position sensor.
具体地,在SVPWM电机驱动控制算法中,力矩由三相电流矢量合成,位置传感器反馈的位置信息和转子的位置是固定的关系,而要使电机最大效率的运行,即,给定的力矩方向和转子的方向是90度垂直,超前90度即正转,滞后90度即反转。Specifically, in the SVPWM motor drive control algorithm, the torque is synthesized by the three-phase current vector, and the position information fed back by the position sensor has a fixed relationship with the position of the rotor. To make the motor operate with maximum efficiency, that is, the given torque direction The direction of the rotor is 90 degrees perpendicular to it, 90 degrees ahead means forward rotation, and 90 degrees behind means reverse rotation.
所以通过人为给定力矩的角度(即文档所讲的递增的位置值对应的电气角度值)电机可以正反转平稳运行,且该转速小电流最小,即效率最高。Therefore, by artificially setting the angle of the torque (that is, the electrical angle value corresponding to the incremental position value mentioned in the document), the motor can run smoothly in forward and reverse directions, and the speed is small and the current is the smallest, that is, the efficiency is the highest.
在其中一个实施例中,位置传感器的类型为编码器,电气角度值设为0;根据位置传感器的类型、电气角度值和机械角度,得到位置传感器与电机的位置偏差值,包括:读取位置传感器的输出角度;根据位置传感器的输出角度计算得到位置传感器与电机的位置偏差值。In one of the embodiments, the type of the position sensor is an encoder, and the electrical angle value is set to 0; according to the type of the position sensor, the electrical angle value and the mechanical angle, the position deviation value between the position sensor and the motor is obtained, including: reading the position The output angle of the sensor; calculate the position deviation value between the position sensor and the motor according to the output angle of the position sensor.
结合图4所示,在力矩与电机的转子重叠时,给定的Iq的力不变,此时人为给定的位置反馈值设为0,电机固定不动。此时读取编码器反馈过来的数据,在此基础上换算成电气角度(标幺),然后再加上实际应用时需要超前的90度,即0.25(标幺),此值即为该编码器偏置的位置对应的电气角度值,记录并保存。As shown in Figure 4, when the torque overlaps with the rotor of the motor, the force of the given Iq remains unchanged. At this time, the artificially given position feedback value is set to 0, and the motor is fixed. At this time, read the data fed back by the encoder, convert it into electrical angle (per unit) on this basis, and then add the 90 degrees that need to be advanced in actual application, that is, 0.25 (per unit), this value is the code Record and save the electrical angle value corresponding to the offset position of the sensor.
具体地,根据上述的SVPWM控制算法,通过给定的Iq力矩角度为0且保持不变,此时转子方向和给定的力矩方向重合,电机保持不动,该角度对应的位置再加上超前量,也可以得到需要的偏置值。Specifically, according to the above-mentioned SVPWM control algorithm, if the given Iq torque angle is 0 and remains unchanged, the rotor direction coincides with the given torque direction at this time, and the motor remains stationary. The position corresponding to the angle plus the leading amount, and the required offset value can also be obtained.
其中,需要说明的是,在本实施例中,为了保证准确性,在电机平稳运行后,才进行位置传感器的数据读取。Wherein, it should be noted that, in this embodiment, in order to ensure accuracy, the data reading of the position sensor is performed after the motor runs smoothly.
在其中一个实施例中,根据位置传感器的类型、电气角度值和机械角度,得到位置传感器与电机的位置偏差值之前,还包括:对位置传感器进行校验,以得到位置传感器的计数方向和/或线数信息。In one of the embodiments, according to the type of the position sensor, the electrical angle value and the mechanical angle, before obtaining the position deviation value between the position sensor and the motor, it also includes: verifying the position sensor to obtain the counting direction and/or or thread count information.
在其中一个实施例中,计数方向的校验方式包括:判断位置传感器的机械角度的增减方向是否与电气角度值的增减方向一致;当位置传感器的机械角度的增减方向与电气角度值的增减方向不一致时,配置位置传感器的计数方向与电气角度值的增减方向一致。In one of the embodiments, the checking method of the counting direction includes: judging whether the increasing or decreasing direction of the mechanical angle of the position sensor is consistent with the increasing or decreasing direction of the electrical angle value; when the increasing or decreasing direction of the mechanical angle of the position sensor is consistent with the electrical angle value When the increasing and decreasing direction of the position sensor is inconsistent, the counting direction of the position sensor is consistent with the increasing and decreasing direction of the electrical angle value.
结合图7所示,图7为一个实施例中的计数方向的校验方式的流程图,在该实施例中,首先保持电机处于上述正向平稳运行状态,判断编码器的计数方向是否为增计数,其中当电 机正向运行时,从编码器获取的数值是从小向大的方向变化的,即为增计数,当从编码器获取的数据是从大向小的方向变化的,即为减计数。Shown in conjunction with Fig. 7, Fig. 7 is the flow chart of the checking method of the counting direction in an embodiment, in this embodiment, first keep motor in above-mentioned forward steady running state, judge whether the counting direction of encoder is increasing Counting, where when the motor is running forward, the value obtained from the encoder changes from small to large, which is counting up, and when the data obtained from the encoder changes from large to small, it is counting down count.
此增减计数的方式在外设校验时可以设定例如以ST单片机为例,编码器对应单片机外设为定时器,校验过程即对定时器相关寄存器的参数配置,比如:计数的方向设定,计数周期设定,过零信号中断配置等参数校验。This method of increasing and decreasing counting can be set during peripheral verification. Setting, counting cycle setting, zero-crossing signal interrupt configuration and other parameter verification.
如果位置传感器的机械角度的增减方向与电气角度值的增减方向不一致,可以修改配置参数,重新配置该外设。If the increase and decrease direction of the mechanical angle of the position sensor is inconsistent with the increase and decrease direction of the electrical angle value, the configuration parameters can be modified to reconfigure the peripheral.
同样的方法,也可以判断绝对式类型的编码器的增减方向是否一致,如果不一致,则通过选择参数或修改逻辑,使保持一致。In the same way, it is also possible to judge whether the increasing and decreasing directions of the absolute encoders are consistent. If not, select parameters or modify the logic to make them consistent.
在其中一个实施例中,线数信息的校验方式包括:获取位置传感器输出的相邻的零位信号,统计相邻的零位信号之间的机械角度的增量,作为线数信息。In one embodiment, the verification method of the line number information includes: acquiring adjacent zero position signals output by the position sensor, and counting increments of mechanical angles between adjacent zero position signals as the line number information.
其中校验线数主要是为了检验位置传感器的线数信息是否正确的。不管是增量式编码器还是绝对位置编码器,在电机物理旋转一周时,可以算出计数值的变化量,该变化量通过换算和设定的位置传感器的线数作比较,如果偏差不大(特别是数脉冲个数的光电传感器有可能因存在干扰产生漏数或多数的情况),即可认为设定值正确。具体地,电机旋转时,增量式编码器的零位信号转一周才触发一次,两次触发信号间的计数个数即为编码器的计数周期,用此值和事先设定的计数周期值进行校对。Among them, the calibration line number is mainly to check whether the line number information of the position sensor is correct. Regardless of whether it is an incremental encoder or an absolute position encoder, when the motor physically rotates one revolution, the change in the count value can be calculated. The change is compared with the set line number of the position sensor through conversion. If the deviation is not large ( In particular, the photoelectric sensor that counts the number of pulses may have a missing number or a majority due to interference), so the set value can be considered correct. Specifically, when the motor rotates, the zero position signal of the incremental encoder is triggered once when it rotates once, and the number of counts between two trigger signals is the counting period of the encoder. Use this value and the preset counting period value Proofread.
其中,以增量型旋转编码器为例进行说明,增量型旋转编码器具有一个中心有轴的码盘,旋转时通过光电发射和接收器件读取码盘的刻线。获得A、B两相相位差90度的信号;同时每转输出一个Z相脉冲以代表零位参考位。由于A、B两相相位差90度,可通过比较A相在前还是B相在前,以判别编码器的正转与反转,通过零位脉冲,可获得编码器的零位参考位。Among them, the incremental rotary encoder is taken as an example for illustration. The incremental rotary encoder has a code disc with a shaft in the center, and the engraved lines of the code disc are read by photoelectric transmitting and receiving devices when rotating. Obtain a signal with a 90-degree phase difference between A and B phases; at the same time, output a Z-phase pulse per revolution to represent the zero reference position. Since the phase difference between A and B is 90 degrees, the forward rotation and reverse rotation of the encoder can be judged by comparing whether the A phase is in front or the B phase is in front, and the zero reference position of the encoder can be obtained through the zero pulse.
Z信号指的是增量式编码器Z相脉冲输出的信号,代表零位参考,即零位信号。The Z signal refers to the signal output by the Z-phase pulse of the incremental encoder, which represents the zero reference, that is, the zero signal.
在其中一个实施例中,位置传感器为霍尔传感器;读取位置传感器的输出值之后,还包括:判断位置传感器的输出值是否满足预设要求;当位置传感器的输出值不满足要求时,则判定位置传感器故障。In one of the embodiments, the position sensor is a Hall sensor; after reading the output value of the position sensor, it also includes: judging whether the output value of the position sensor meets the preset requirements; when the output value of the position sensor does not meet the requirements, then Determine the position sensor failure.
在位置传感器为霍尔传感器时,还可以检测霍尔传感器信号是否正确,三路信号按位组合,范围在0-7,但电气特性决定一定不会出现0和7这两数值(常规120度霍尔情况下), 一旦出现,则表明该传感器输入信号故障,有短路或断路的可能。因此其可以作为检错的判断条件。即,判断霍尔传感器的输出值是否存在0和7这两数值,若是,则判定故障。When the position sensor is a Hall sensor, it can also detect whether the signal of the Hall sensor is correct. The three-way signal is combined in bits, and the range is 0-7, but the electrical characteristics determine that the values of 0 and 7 must not appear (normally 120 degrees In the case of Hall), once it appears, it indicates that the input signal of the sensor is faulty, and there is a possibility of short circuit or open circuit. Therefore, it can be used as a judgment condition for error detection. That is, it is judged whether there are two values of 0 and 7 in the output value of the Hall sensor, and if so, a fault is judged.
在其中一个实施例中,为了使得本领域技术人员充分理解本申请中的位置偏差标定方法,其中以位置传感器包括霍尔传感器和编码器为例进行说明,具体可以结合图8所示,图8为另一个实施例中的位置偏差标定方法的流程图,在该实施例中,主要包括以下步骤:In one of the embodiments, in order to enable those skilled in the art to fully understand the position deviation calibration method in this application, the position sensor includes a Hall sensor and an encoder as an example for illustration, which can be specifically shown in Figure 8, Figure 8 It is a flowchart of a position deviation calibration method in another embodiment. In this embodiment, it mainly includes the following steps:
首先电机驱动器电压开环控制,使得电机正反转平稳运行且反馈电流大小一致。即直接给定三相旋转电压,旋转电压会产生旋转磁场,旋转磁场就会带动电机转子旋转。开环即不经过PID闭环。Firstly, the voltage of the motor driver is controlled open-loop, so that the motor runs smoothly in forward and reverse directions and the feedback current is consistent. That is, if the three-phase rotating voltage is given directly, the rotating voltage will generate a rotating magnetic field, and the rotating magnetic field will drive the motor rotor to rotate. Open loop means not going through PID closed loop.
其次,校正编码器,包括对编码器进行校验,即判断编码器计数方向;通过编码器的两次零位信号间隔得到的脉冲数,校验编码器线数信息,重新校验编码器计数配置。Secondly, correct the encoder, including checking the encoder, that is, to judge the counting direction of the encoder; the number of pulses obtained by the interval between the two zero position signals of the encoder, check the line number information of the encoder, and re-check the counting of the encoder configuration.
第三,获取霍尔传感器信号(电机辅助换相信号)的对应位置参数:采集电机辅助换相信号跳变沿对应的给定电气角度值,并存储;获取到的霍尔传感器不同信号对应的电气角度值,即为传感器在不同信号时的偏置角度。Third, obtain the corresponding position parameters of the Hall sensor signal (motor auxiliary commutation signal): collect the given electrical angle value corresponding to the transition edge of the motor auxiliary commutation signal, and store it; The electrical angle value is the offset angle of the sensor under different signals.
第四,获取编码器零位对应位置参数:在驱动器稳定运行后,获取编码器零位信号跳变沿对应的给定电气角度值并存储,获取到的编码器零位信号时刻对应的电气角度值,即为电机编码器偏置角度;或者把给定电气角度固定为0,此时电机保持锁在某一位置不动,记录编码器反馈的电气角度并存储,推算出电机编码器偏置角度。Fourth, obtain the position parameter corresponding to the zero position of the encoder: after the driver runs stably, obtain the given electrical angle value corresponding to the jump edge of the zero position signal of the encoder and store it, and obtain the electrical angle corresponding to the zero position signal moment of the encoder value, which is the motor encoder bias angle; or fix the given electrical angle to 0, at this time the motor remains locked at a certain position, record and store the electrical angle fed back by the encoder, and calculate the motor encoder bias angle.
根据霍尔传感器的偏置角度和电机编码器偏置角度,完成驱动器和电机传感器的配置。According to the offset angle of the Hall sensor and the offset angle of the motor encoder, the configuration of the driver and the motor sensor is completed.
在一个实施例中,如图8所示,提供了一种电机驱动方法,以该方法应用于图1中的电机驱动器为例进行说明,包括以下步骤:In one embodiment, as shown in FIG. 8 , a motor driving method is provided, and the method is applied to the motor driver in FIG. 1 as an example for illustration, including the following steps:
S802:读取根据上述位置偏差标定方法得到的位置偏差值。S802: Read the position deviation value obtained according to the above position deviation calibration method.
位置偏差值的计算可以参见上述任意一个实施例中位置偏差标定方法的限定,在此不再赘述。For the calculation of the position deviation value, reference may be made to the limitation of the position deviation calibration method in any of the foregoing embodiments, and details are not repeated here.
S804:读取位置传感器的输出值。S804: Read the output value of the position sensor.
S806:根据位置偏差值和输出值计算得到电机旋转位置。S806: Calculate the motor rotation position according to the position deviation value and the output value.
读位置传感器信息即得到对应的电机旋转角度。驱动器通过读位置传感器的反馈位置,再加上校正后的相对位置偏置,即可求出电机旋转位置。Read the position sensor information to get the corresponding motor rotation angle. The driver can calculate the motor rotation position by reading the feedback position of the position sensor and adding the corrected relative position offset.
S808:对电机旋转位置进行处理得到用于驱动电机运行的脉冲宽度调制信号。S808: Process the rotational position of the motor to obtain a pulse width modulation signal used to drive the motor to run.
采集电机相电流,主要是用来做电流闭环时应用。其中脉冲宽度调整可以包括CLARK变换、PARK变换、控制环路以及IPARK变换和ICLARK变换等。The acquisition of motor phase current is mainly used for current closed-loop applications. The pulse width adjustment may include CLARK transformation, PARK transformation, control loop, IPARK transformation and ICLARK transformation, etc.
CLARK变换是从三相旋转的坐标系转换到二相旋转的坐标系。PARK变换是从二相旋转的坐标系转换到静止的迪卡尔坐标系。IPARK变换和ICLARK变换是CLARK变换、PARK变换的逆运算。在控制的过程中,各模块的传递参数均为标幺值。The CLARK transformation converts from a three-phase rotating coordinate system to a two-phase rotating coordinate system. The PARK transformation is the transformation from a two-phase rotating coordinate system to a stationary Cartesian coordinate system. IPARK transform and ICLARK transform are inverse operations of CLARK transform and PARK transform. In the process of control, the transfer parameters of each module are per unit values.
其中,需要说明的一点是上述的电机驱动方法可以应用于机器人关节中,通过此方法也可以把电机和编码器分体设计,独立安装,提高结构设计灵活性,及进一步缩小体积,降低成本。减化电机生产步骤,即减少了电机和编码器的配准步骤,优化了电机的生产工艺,提高了效率。最后促使驱动器可以适配不同厂家的电机。解决了驱动器和电机编码器偏置角度不匹配的问题,增加驱动器用户选择电机供应商的机会。打断了驱动器和电机捆绑销售垄断的局面。Among them, one point that needs to be explained is that the above-mentioned motor driving method can be applied to robot joints. Through this method, the motor and encoder can also be designed separately and installed independently, thereby improving the flexibility of structural design, further reducing the volume and reducing the cost. The production steps of the motor are reduced, that is, the registration steps of the motor and the encoder are reduced, the production process of the motor is optimized, and the efficiency is improved. Finally, the driver can be adapted to motors from different manufacturers. It solves the problem of mismatching of the offset angle of the drive and the motor encoder, and increases the chances of the drive user to choose the motor supplier. This breaks the monopoly of bundled sales of drivers and motors.
应该理解的是,虽然图2和图8的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2和图8中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flow charts of FIG. 2 and FIG. 8 are shown sequentially as indicated by the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in FIG. 2 and FIG. 8 may include multiple steps or stages. These steps or stages are not necessarily executed at the same time, but may be executed at different times. The execution sequence is not necessarily performed sequentially, but may be performed alternately or alternately with other steps or at least a part of steps or stages in other steps.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图9所示。该计算机设备包括通过***总线连接的处理器、存储器、通信接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作***和计算机程序。该内存储器为非易失性存储介质中的操作***和计算机程序的运行提供环境。该计算机设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、运营商网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时以实现一种位置偏差标定方法、电机驱动方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure may be as shown in FIG. 9 . The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Wherein, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, an operator network, NFC (Near Field Communication) or other technologies. When the computer program is executed by the processor, a position deviation calibration method and a motor driving method are realized. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a button, a trackball or a touch pad provided on the casing of the computer device , and can also be an external keyboard, touchpad, or mouse.
本领域技术人员可以理解,图9中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 9 is only a block diagram of a part of the structure related to the solution of this application, and does not constitute a limitation on the computer equipment on which the solution of this application is applied. The specific computer equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现以下步骤:获取预先设置的与电机的旋转位置对应的电气角度值;向电机施加与电气角度值对应的力矩;读取位置传感器输出的电机转子的机械角度;根据电气角度值和机械角度得到位置传感器与电机的位置偏差值。In one embodiment, a computer device is provided, including a memory and a processor, a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining a preset electrical angle corresponding to the rotational position of the motor value; apply the torque corresponding to the electrical angle value to the motor; read the mechanical angle of the motor rotor output by the position sensor; obtain the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle.
在一个实施例中,处理器执行计算机程序时所实现的根据电气角度值和机械角度,得到位置传感器与电机的位置偏差值之前,还包括:在开环控制下,使得电机在正反转时反馈的正向电流和反向电流大小基本相等且所述正向电流和反向电流最小,并处于正反转平稳运行状态。In one embodiment, before the position deviation value between the position sensor and the motor is obtained according to the electrical angle value and the mechanical angle, which is realized when the processor executes the computer program, it also includes: under open-loop control, making the motor rotate in forward and reverse directions The magnitudes of the forward current and the reverse current of the feedback are basically equal and the forward current and the reverse current are the smallest, and are in a smooth forward and reverse running state.
在一个实施例中,处理器执行计算机程序时所实现的获取预先设置的与电机的旋转位置对应的电气角度值之前,包括:获取位置传感器的类型;处理器执行计算机程序时所实现的根据电气角度值和机械角度得到位置传感器与电机的位置偏差值,包括:根据位置传感器的类型、电气角度值和机械角度,得到位置传感器与电机的位置偏差值。In one embodiment, before obtaining the preset electrical angle value corresponding to the rotational position of the motor when the processor executes the computer program, it includes: obtaining the type of the position sensor; The angle value and the mechanical angle obtain the position deviation value of the position sensor and the motor, including: according to the type of the position sensor, the electrical angle value and the mechanical angle, obtain the position deviation value of the position sensor and the motor.
在一个实施例中,处理器执行计算机程序时所涉及的位置传感器的类型为霍尔传感器;处理器执行计算机程序时所实现的根据位置传感器的类型、电气角度值和机械角度,得到位置传感器与电机的位置偏差值,包括:记录霍尔传感器输出的信号跳变沿对应的电气角度值,作为位置传感器与电机的位置偏差值。In one embodiment, the type of the position sensor involved when the processor executes the computer program is a Hall sensor; when the processor executes the computer program, according to the type of the position sensor, the electrical angle value and the mechanical angle, the position sensor and the The position deviation value of the motor includes: recording the electrical angle value corresponding to the jump edge of the signal output by the Hall sensor as the position deviation value between the position sensor and the motor.
在一个实施例中,处理器执行计算机程序时所涉及的位置传感器的类型为编码器;处理器执行计算机程序时所实现的根据位置传感器的类型、电气角度值和机械角度,得到位置传感器与电机的位置偏差值,包括:获取编码器输出的零位信号对应的电气角度值,作为位置传感器与电机的位置偏差值。In one embodiment, the type of the position sensor involved when the processor executes the computer program is an encoder; when the processor executes the computer program, the position sensor and the motor are obtained according to the type of the position sensor, the electrical angle value and the mechanical angle. The position deviation value includes: obtaining the electrical angle value corresponding to the zero position signal output by the encoder as the position deviation value between the position sensor and the motor.
在一个实施例中,处理器执行计算机程序时所涉及的位置传感器的类型为编码器,电气角度值设为0;处理器执行计算机程序时所实现的根据位置传感器的类型、电气角度值和机械角度,得到位置传感器与电机的位置偏差值,包括:读取位置传感器的输出角度;根据位置传感器的输出角度计算得到位置传感器与电机的位置偏差值。In one embodiment, the type of the position sensor involved when the processor executes the computer program is an encoder, and the electrical angle value is set to 0; Angle, obtaining the position deviation value between the position sensor and the motor, including: reading the output angle of the position sensor; calculating the position deviation value between the position sensor and the motor according to the output angle of the position sensor.
在一个实施例中,处理器执行计算机程序时所实现的根据位置传感器的类型、电气角度 值和机械角度,得到位置传感器与电机的位置偏差值之前,还包括:对位置传感器进行校验,以得到位置传感器的计数方向和/或线数信息。In one embodiment, when the processor executes the computer program, according to the type of the position sensor, the electrical angle value and the mechanical angle, before obtaining the position deviation value between the position sensor and the motor, it also includes: verifying the position sensor to Get count direction and/or line count information from position sensors.
在一个实施例中,处理器执行计算机程序时所涉及的计数方向的校验方式包括:判断位置传感器的机械角度的增减方向是否与电气角度值的增减方向一致;当位置传感器的机械角度的增减方向与电气角度值的增减方向不一致时,配置位置传感器的计数方向与电气角度值的增减方向一致。In one embodiment, the checking method of the counting direction involved when the processor executes the computer program includes: judging whether the increasing or decreasing direction of the mechanical angle of the position sensor is consistent with the increasing or decreasing direction of the electrical angle value; when the mechanical angle of the position sensor When the increasing and decreasing direction of the position sensor is inconsistent with the increasing and decreasing direction of the electrical angle value, the counting direction of the position sensor is consistent with the increasing and decreasing direction of the electrical angle value.
在一个实施例中,处理器执行计算机程序时所涉及的线数信息的校验方式包括:获取位置传感器输出的相邻的零位信号,统计相邻的零位信号之间的机械角度的增量,作为线数信息。In one embodiment, the verification method of the line number information involved when the processor executes the computer program includes: obtaining adjacent zero position signals output by the position sensor, and counting the increase of the mechanical angle between the adjacent zero position signals. amount, as the line number information.
在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现以下步骤:读取根据上述的位置偏差标定方法得到的位置偏差值;读取位置传感器的输出值;根据位置偏差值和输出值计算得到电机旋转位置;对电机旋转位置进行处理得到用于驱动电机运行的脉冲宽度调制信号。In one embodiment, a computer device is provided, including a memory and a processor, a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: read the position deviation obtained according to the above-mentioned position deviation calibration method value; read the output value of the position sensor; calculate the motor rotation position according to the position deviation value and output value; process the motor rotation position to obtain the pulse width modulation signal for driving the motor.
在一个实施例中,处理器执行计算机程序时所实现的位置传感器为霍尔传感器;读取位置传感器的输出值之后,还包括:判断位置传感器的输出值是否满足预设要求;当位置传感器的输出值不满足要求时,则判定位置传感器故障。In one embodiment, the position sensor realized when the processor executes the computer program is a Hall sensor; after reading the output value of the position sensor, it also includes: judging whether the output value of the position sensor meets the preset requirements; when the position sensor When the output value does not meet the requirements, it is determined that the position sensor is faulty.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:获取预先设置的与电机的旋转位置对应的电气角度值;向电机施加与电气角度值对应的力矩;读取位置传感器输出的电机转子的机械角度;根据电气角度值和机械角度得到位置传感器与电机的位置偏差值。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining a preset electrical angle value corresponding to the rotational position of the motor; The motor applies a torque corresponding to the electrical angle value; reads the mechanical angle of the motor rotor output by the position sensor; obtains the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle.
在一个实施例中,计算机程序被处理器执行时所实现的根据电气角度值和机械角度,得到位置传感器与电机的位置偏差值之前,还包括:在开环控制下,使得电机在正反转时反馈的正向电流和反向电流大小基本相等且所述正向电流和反向电流最小,并处于正反转平稳运行状态。In one embodiment, when the computer program is executed by the processor, before obtaining the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle, it also includes: under open-loop control, making the motor rotate in the forward and reverse directions The magnitudes of the forward current and the reverse current fed back are basically equal and the forward current and the reverse current are the smallest, and the forward and reverse running state is stable.
在一个实施例中,计算机程序被处理器执行时所实现的获取预先设置的与电机的旋转位置对应的电气角度值之前,包括:获取位置传感器的类型;计算机程序被处理器执行时所实现的根据电气角度值和机械角度得到位置传感器与电机的位置偏差值,包括:根据位置传感器的类型、电气角度值和机械角度,得到位置传感器与电机的位置偏差值。In one embodiment, before obtaining the preset electrical angle value corresponding to the rotational position of the motor when the computer program is executed by the processor, it includes: obtaining the type of the position sensor; Obtaining the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle includes: obtaining the position deviation value between the position sensor and the motor according to the type of the position sensor, the electrical angle value and the mechanical angle.
在一个实施例中,计算机程序被处理器执行时所涉及的位置传感器的类型为霍尔传感器;计算机程序被处理器执行时所实现的根据位置传感器的类型、电气角度值和机械角度,得到位置传感器与电机的位置偏差值,包括:记录霍尔传感器输出的信号跳变沿对应的电气角度值,作为位置传感器与电机的位置偏差值。In one embodiment, when the computer program is executed by the processor, the type of the position sensor involved is a Hall sensor; when the computer program is executed by the processor, the position sensor is obtained according to the type of the position sensor, the electrical angle value and the mechanical angle. The position deviation value between the sensor and the motor includes: recording the electrical angle value corresponding to the jump edge of the signal output by the Hall sensor as the position deviation value between the position sensor and the motor.
在一个实施例中,计算机程序被处理器执行时所涉及的位置传感器的类型为编码器;计算机程序被处理器执行时所实现的根据位置传感器的类型、电气角度值和机械角度,得到位置传感器与电机的位置偏差值,包括:获取编码器输出的零位信号对应的电气角度值,作为位置传感器与电机的位置偏差值。In one embodiment, when the computer program is executed by the processor, the type of the position sensor involved is an encoder; when the computer program is executed by the processor, according to the type of the position sensor, the electrical angle value and the mechanical angle, the position sensor is obtained The position deviation value with the motor includes: obtaining the electrical angle value corresponding to the zero position signal output by the encoder as the position deviation value between the position sensor and the motor.
在一个实施例中,计算机程序被处理器执行时所涉及的位置传感器的类型为编码器,电气角度值设为0;计算机程序被处理器执行时所实现的根据位置传感器的类型、电气角度值和机械角度,得到位置传感器与电机的位置偏差值,包括:读取位置传感器的输出角度;根据位置传感器的输出角度计算得到位置传感器与电机的位置偏差值。In one embodiment, when the computer program is executed by the processor, the type of the position sensor involved is an encoder, and the electrical angle value is set to 0; and the mechanical angle to obtain the position deviation value between the position sensor and the motor, including: reading the output angle of the position sensor; calculating the position deviation value between the position sensor and the motor according to the output angle of the position sensor.
在一个实施例中,计算机程序被处理器执行时所实现的根据位置传感器的类型、电气角度值和机械角度,得到位置传感器与电机的位置偏差值之前,还包括:对位置传感器进行校验,以得到位置传感器的计数方向和/或线数信息。In one embodiment, when the computer program is executed by the processor, according to the type of the position sensor, the electrical angle value and the mechanical angle, before obtaining the position deviation value between the position sensor and the motor, it also includes: verifying the position sensor, To obtain the counting direction and/or line number information of the position sensor.
在一个实施例中,计算机程序被处理器执行时所涉及的计数方向的校验方式包括:判断位置传感器的机械角度的增减方向是否与电气角度值的增减方向一致;当位置传感器的机械角度的增减方向与电气角度值的增减方向不一致时,配置位置传感器的计数方向与电气角度值的增减方向一致。In one embodiment, the checking method of the counting direction involved when the computer program is executed by the processor includes: judging whether the increasing or decreasing direction of the mechanical angle of the position sensor is consistent with the increasing or decreasing direction of the electrical angle value; When the increase and decrease direction of the angle is not consistent with the increase and decrease direction of the electrical angle value, the counting direction of the position sensor is consistent with the increase and decrease direction of the electrical angle value.
在一个实施例中,计算机程序被处理器执行时所涉及的线数信息的校验方式包括:获取位置传感器输出的相邻的零位信号,统计相邻的零位信号之间的机械角度的增量,作为线数信息。In one embodiment, when the computer program is executed by the processor, the method of verifying the line number information involved includes: obtaining adjacent zero position signals output by the position sensor, and counting the mechanical angle between adjacent zero position signals Increment, as line count information.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:读取根据上述的位置偏差标定方法得到的位置偏差值;读取位置传感器的输出值;根据位置偏差值和输出值计算得到电机旋转位置;对电机旋转位置进行处理得到用于驱动电机运行的脉冲宽度调制信号。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: reading the position deviation value obtained according to the above position deviation calibration method; reading The output value of the position sensor is taken; the rotational position of the motor is calculated according to the position deviation value and the output value; the rotational position of the motor is processed to obtain a pulse width modulation signal for driving the motor.
在一个实施例中,计算机程序被处理器执行时所实现的位置传感器为霍尔传感器;读取位置传感器的输出值之后,还包括:判断位置传感器的输出值是否满足预设要求;当位置传 感器的输出值不满足要求时,则判定位置传感器故障。In one embodiment, the position sensor implemented when the computer program is executed by the processor is a Hall sensor; after reading the output value of the position sensor, it also includes: judging whether the output value of the position sensor meets the preset requirements; when the position sensor When the output value of the sensor does not meet the requirements, it is determined that the position sensor is faulty.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above-mentioned embodiments can be completed by instructing related hardware through computer programs, and the computer programs can be stored in a non-volatile computer-readable memory In the medium, when the computer program is executed, it may include the processes of the embodiments of the above-mentioned methods. Wherein, any references to memory, storage, database or other media used in the various embodiments provided in the present application may include at least one of non-volatile memory and volatile memory. Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered to be within the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several implementation modes of the present application, and the description thereof is relatively specific and detailed, but it should not be construed as limiting the scope of the patent for the invention. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the scope of protection of the patent application should be based on the appended claims.
Claims (15)
- 一种位置偏差标定方法,所述方法包括:A position deviation calibration method, the method comprising:获取预先设置的与电机的旋转位置对应的电气角度值;Obtain the preset electrical angle value corresponding to the rotation position of the motor;向所述电机施加与所述电气角度值对应的力矩;applying a torque corresponding to the electrical angle value to the motor;读取位置传感器输出的电机转子的机械角度;Read the mechanical angle of the motor rotor output by the position sensor;根据所述电气角度值和所述机械角度,得到所述位置传感器与电机的位置偏差值。According to the electrical angle value and the mechanical angle, a position deviation value between the position sensor and the motor is obtained.
- 根据权利要求1所述的位置偏差标定方法,其中,所述根据所述电气角度值和所述机械角度,得到所述位置传感器与电机的位置偏差值之前,还包括:The position deviation calibration method according to claim 1, wherein, before obtaining the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle, further comprising:在开环控制下,使得所述电机在正反转时反馈的正向电流和反向电流大小基本相等且所述正向电流和反向电流最小,并处于正反转平稳运行状态。Under the open-loop control, the magnitudes of the forward current and the reverse current fed back by the motor during forward and reverse rotation are substantially equal, and the forward and reverse currents are the smallest, and the motor is in a stable forward and reverse running state.
- 根据权利要求2所述的位置偏差标定方法,其中,所述获取预先设置的与所述电机的旋转位置对应的电气角度值之前,包括:The method for calibrating position deviation according to claim 2, wherein, before obtaining the preset electrical angle value corresponding to the rotational position of the motor, it includes:获取位置传感器的类型;Get the type of position sensor;所述根据所述电气角度值和所述机械角度得到所述位置传感器与电机的位置偏差值,包括:The obtaining the position deviation value between the position sensor and the motor according to the electrical angle value and the mechanical angle includes:根据所述位置传感器的类型、所述电气角度值和所述机械角度,得到所述位置传感器与电机的位置偏差值。According to the type of the position sensor, the electrical angle value and the mechanical angle, a position deviation value between the position sensor and the motor is obtained.
- 根据权利要求3所述的位置偏差标定方法,其中,所述位置传感器的类型为霍尔传感器;所述根据所述位置传感器的类型、所述电气角度值和所述机械角度,得到所述位置传感器与电机的位置偏差值,包括:The position deviation calibration method according to claim 3, wherein the type of the position sensor is a Hall sensor; the position is obtained according to the type of the position sensor, the electrical angle value and the mechanical angle The position deviation value between the sensor and the motor, including:记录所述霍尔传感器输出的信号跳变沿对应的所述电气角度值,作为所述位置传感器与电机的位置偏差值。The electrical angle value corresponding to the signal transition edge output by the Hall sensor is recorded as the position deviation value between the position sensor and the motor.
- 根据权利要求3所述的位置偏差标定方法,其中,所述位置传感器的类型为编码器;所述根据所述位置传感器的类型、所述电气角度值和所述机械角度,得到所述位置传感器与电机的位置偏差值,包括:The position deviation calibration method according to claim 3, wherein the type of the position sensor is an encoder; the position sensor is obtained according to the type of the position sensor, the electrical angle value and the mechanical angle The position deviation value from the motor, including:获取所述编码器输出的零位信号对应的所述电气角度值,该电气角度值用于表征所述位置传感器与电机的位置偏差值。The electrical angle value corresponding to the zero position signal output by the encoder is acquired, and the electrical angle value is used to represent a position deviation value between the position sensor and the motor.
- 根据权利要求1所述的位置偏差标定方法,其中,所述位置传感器的类型为编码器, 所述电气角度值设为0;所述根据所述电气角度值和所述机械角度,得到所述位置传感器与电机的位置偏差值,包括:The method for calibrating position deviation according to claim 1, wherein the type of the position sensor is an encoder, and the electrical angle value is set to 0; according to the electrical angle value and the mechanical angle, the obtained The position deviation value between the position sensor and the motor, including:读取所述位置传感器的输出角度;reading the output angle of the position sensor;根据所述位置传感器的输出角度计算得到所述位置传感器与电机的位置偏差值。The position deviation value between the position sensor and the motor is calculated according to the output angle of the position sensor.
- 根据权利要求5或6所述的位置偏差标定方法,其中,所述方法还包括:The position deviation calibration method according to claim 5 or 6, wherein the method further comprises:对所述位置传感器进行校验,以得到所述位置传感器的计数方向和/或线数信息。The position sensor is calibrated to obtain the counting direction and/or line number information of the position sensor.
- 根据权利要求7所述的位置偏差标定方法,其中,所述对所述位置传感器进行校验,以得到所述位置传感器的计数方向和/或线数信息包括:The position deviation calibration method according to claim 7, wherein said verifying said position sensor to obtain counting direction and/or line number information of said position sensor comprises:判断所述位置传感器的机械角度的增减方向是否与所述电气角度值的增减方向一致;judging whether the increase or decrease direction of the mechanical angle of the position sensor is consistent with the increase or decrease direction of the electrical angle value;当所述位置传感器的机械角度的增减方向与所述电气角度值的增减方向不一致时,配置所述位置传感器的计数方向与所述电气角度值的增减方向一致。When the increase and decrease direction of the mechanical angle of the position sensor is not consistent with the increase and decrease direction of the electrical angle value, the counting direction of the position sensor is configured to be consistent with the increase and decrease direction of the electrical angle value.
- 根据权利要求7所述的位置偏差标定方法,其中,所述对所述位置传感器进行校验,以得到所述位置传感器的计数方向和/或线数信息包括:The position deviation calibration method according to claim 7, wherein said verifying said position sensor to obtain counting direction and/or line number information of said position sensor comprises:获取所述位置传感器输出的相邻的零位信号,统计相邻的所述零位信号之间的机械角度的增量,作为所述线数信息。The adjacent zero position signals output by the position sensor are acquired, and the increment of the mechanical angle between the adjacent zero position signals is counted as the line number information.
- 根据权利要求1所述的电机驱动方法,其中,所述位置传感器为霍尔传感器;所述读取位置传感器输出的电机转子的机械角度之后,还包括:The motor driving method according to claim 1, wherein the position sensor is a Hall sensor; after reading the mechanical angle of the motor rotor output by the position sensor, further comprising:判断所述位置传感器的输出值是否满足预设要求;judging whether the output value of the position sensor meets a preset requirement;当所述位置传感器的输出值不满足要求时,则判定所述位置传感器故障。When the output value of the position sensor does not meet the requirements, it is determined that the position sensor is faulty.
- 一种电机驱动方法,包括:A motor driving method, comprising:读取根据权利要求1至10中任意一项所述的位置偏差标定方法得到的所述位置偏差值;Reading the position deviation value obtained according to the position deviation calibration method described in any one of claims 1 to 10;读取所述位置传感器的输出值;read the output value of the position sensor;根据所述位置偏差值和所述输出值计算得到电机旋转位置;calculating the rotational position of the motor according to the position deviation value and the output value;对所述电机旋转位置进行处理得到用于驱动所述电机运行的脉冲宽度调制信号。The rotational position of the motor is processed to obtain a pulse width modulation signal used to drive the motor to run.
- 一种电机驱动***,包括电机、位置传感器以及电机驱动器;所述位置传感器分别与所述电机和所述电机驱动器相连接,所述电机与所述电机驱动器相连接;A motor drive system, comprising a motor, a position sensor, and a motor driver; the position sensor is respectively connected to the motor and the motor driver, and the motor is connected to the motor driver;所述电机驱动器用于执行权利要求1至10中任意一项或权利要求11所述的方法中的步骤。The motor driver is used to execute the steps in any one of claims 1 to 10 or the method of claim 11.
- 一种机器人关节,包括权利要求12所述的电机驱动***。A robot joint, comprising the motor drive system according to claim 12.
- 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现权利要求1至10中任意一项或权利要求11所述的方法的步骤。A computer device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the steps of any one of claims 1 to 10 or the method of claim 11 when executing the computer program.
- 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至10中任意一项或权利要求11所述的方法的步骤。A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of claims 1 to 10 or the method of claim 11 are implemented.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111583018.5 | 2021-12-22 | ||
CN202111583018.5A CN114499290A (en) | 2021-12-22 | 2021-12-22 | Position deviation calibration method, motor driving method, system and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023116626A1 true WO2023116626A1 (en) | 2023-06-29 |
Family
ID=81494407
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/140015 WO2023116626A1 (en) | 2021-12-22 | 2022-12-19 | Position deviation calibration method, electric motor driving method and system, and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114499290A (en) |
WO (1) | WO2023116626A1 (en) |
Families Citing this family (2)
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 |
TWI800453B (en) * | 2022-08-31 | 2023-04-21 | 茂達電子股份有限公司 | Motor driver using correcting mechanism on sensed motor position |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001103784A (en) * | 1999-09-30 | 2001-04-13 | Mitsubishi Electric Corp | Method for detecting difference in angle between motor magnetic pole position and encoder reference position and motor controller |
CN102097988A (en) * | 2010-12-17 | 2011-06-15 | 北京和利时电机技术有限公司 | Method and system for measuring position compensation angles of permanent magnet synchronous motor rotor |
CN109004875A (en) * | 2018-07-26 | 2018-12-14 | 联创汽车电子有限公司 | Permanent-magnet synchronous motor rotor position sensing device zero degree calculation method and scaling method |
CN109842329A (en) * | 2018-11-13 | 2019-06-04 | 浙江航驱汽车科技有限公司 | Method for electric direction varying device brushless DC motor offset angular measurement |
CN110752808A (en) * | 2019-10-21 | 2020-02-04 | 中国第一汽车股份有限公司 | Motor position sensor error compensation method and device, vehicle and storage medium |
CN112889213A (en) * | 2019-09-30 | 2021-06-01 | 深圳市大疆创新科技有限公司 | Motor control method, motor and movable platform |
CN114499290A (en) * | 2021-12-22 | 2022-05-13 | 上海微创医疗机器人(集团)股份有限公司 | Position deviation calibration method, motor driving method, system and equipment |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20050067914A (en) * | 2003-12-29 | 2005-07-05 | 엘지전자 주식회사 | Method for compensating deviation of location in washing machine with bldc motor directly connected |
JP5602901B2 (en) * | 2013-03-11 | 2014-10-08 | 三菱電機株式会社 | Electric angle adjustment method for motor and shaft vibration inspection method |
KR101655297B1 (en) * | 2015-02-13 | 2016-09-08 | 주식회사 만도 | Apparatus for correcting position of linear hole sensor and control method of thereof |
GB201806202D0 (en) * | 2018-04-16 | 2018-05-30 | Trw Ltd | A method of determining an angular offset of a position sensor |
CN113418544B (en) * | 2021-06-30 | 2024-03-08 | 重庆渝凌晶科智能控制技术研究院有限公司 | Automatic calibration method for initial position of encoder based on QEP |
-
2021
- 2021-12-22 CN CN202111583018.5A patent/CN114499290A/en active Pending
-
2022
- 2022-12-19 WO PCT/CN2022/140015 patent/WO2023116626A1/en unknown
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001103784A (en) * | 1999-09-30 | 2001-04-13 | Mitsubishi Electric Corp | Method for detecting difference in angle between motor magnetic pole position and encoder reference position and motor controller |
CN102097988A (en) * | 2010-12-17 | 2011-06-15 | 北京和利时电机技术有限公司 | Method and system for measuring position compensation angles of permanent magnet synchronous motor rotor |
CN109004875A (en) * | 2018-07-26 | 2018-12-14 | 联创汽车电子有限公司 | Permanent-magnet synchronous motor rotor position sensing device zero degree calculation method and scaling method |
CN109842329A (en) * | 2018-11-13 | 2019-06-04 | 浙江航驱汽车科技有限公司 | Method for electric direction varying device brushless DC motor offset angular measurement |
CN112889213A (en) * | 2019-09-30 | 2021-06-01 | 深圳市大疆创新科技有限公司 | Motor control method, motor and movable platform |
CN110752808A (en) * | 2019-10-21 | 2020-02-04 | 中国第一汽车股份有限公司 | Motor position sensor error compensation method and device, vehicle and storage medium |
CN114499290A (en) * | 2021-12-22 | 2022-05-13 | 上海微创医疗机器人(集团)股份有限公司 | Position deviation calibration method, motor driving method, system and equipment |
Also Published As
Publication number | Publication date |
---|---|
CN114499290A (en) | 2022-05-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2023116626A1 (en) | Position deviation calibration method, electric motor driving method and system, and device | |
CN106787995B (en) | Method for testing initial position angle of motor rotor | |
CN107086835B (en) | Permanent magnet synchronous motor rotation initial zero-potential angle calibration system and calibration method | |
WO2018145647A1 (en) | Calibration method for magnetic encoder and system | |
JP2014507109A (en) | Method and system for calibrating rotor position offset of a motor | |
CN105048921B (en) | Current phasor measurement diagnoses | |
CN109217758B (en) | Online identification method for rotary transformer zero point, motor controller and storage medium | |
CN110601633A (en) | Permanent magnet synchronous motor initial phase detection system | |
CN112394312B (en) | Fault diagnosis method for current sensor of three-phase motor driving system | |
JP2022028237A (en) | Motor control system | |
CN111355412A (en) | Self-checking method and system for initial angle of rotary transformer zero position of permanent magnet synchronous motor | |
JP2021129440A (en) | Control device and control method of permanent magnet motor | |
US10992243B2 (en) | System and computer-implemented method for reducing angle error in electric motors | |
JP2009195087A (en) | Rotation angle position detection device | |
CN116155170B (en) | Servo diagnosis method, apparatus, device and readable storage medium | |
CN108933551A (en) | Driving equipment for Oil pump electrical machinery and the drive control method for Oil pump electrical machinery | |
CN115811260A (en) | Rotary transformer zero point identification method and device of motor and computer storage medium | |
CN112671296B (en) | Method for detecting zero position of rotor of permanent magnet synchronous motor | |
JP2001336951A (en) | Rotational position detecting apparatus and method | |
JP2013138559A (en) | Method and device for calibrating angle sensor attached to synchronous motor | |
JP4206374B2 (en) | Synchronous motor control device and initial phase setting method thereof | |
WO2024004474A1 (en) | Angle detection device and angle detection method | |
KR101754446B1 (en) | Rpt signal offset learning system | |
CN112104287A (en) | Method for correcting offset angle of rotary transformer and inverter | |
CN116566268A (en) | Motor zero initial angle calibration method, device, motor controller and system |
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: 22909938 Country of ref document: EP Kind code of ref document: A1 |