CN111313785A - Automatic correction method for electrical angle offset - Google Patents
Automatic correction method for electrical angle offset Download PDFInfo
- Publication number
- CN111313785A CN111313785A CN201911395197.2A CN201911395197A CN111313785A CN 111313785 A CN111313785 A CN 111313785A CN 201911395197 A CN201911395197 A CN 201911395197A CN 111313785 A CN111313785 A CN 111313785A
- Authority
- CN
- China
- Prior art keywords
- axis
- current
- motor
- electrical angle
- ref
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
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
- H02P21/00—Arrangements or methods for the control of electric machines by vector control, e.g. by control of field orientation
- H02P21/22—Current control, e.g. using a current control loop
-
- 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
- H02P21/00—Arrangements or methods for the control of electric machines by vector control, e.g. by control of field orientation
- H02P21/14—Estimation or adaptation of machine parameters, e.g. flux, current or voltage
- H02P21/18—Estimation of position or speed
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Control Of Ac Motors In General (AREA)
Abstract
The invention discloses an automatic correction method of electrical angle offset, which specifically comprises the following steps: setting the electrical angle e _ Theta to be 0; converting the collected three-phase currents Ia, Ib and Ic of the motor into d-axis feedback current Id _ fb and q-axis feedback current Iq _ fb through CLARKE conversion and PARK conversion; the target current Id _ ref and the feedback current Id _ fb of a d axis pass through a proportional integral PI regulator of a d axis current, the target current Iq _ ref and the feedback current Iq _ fb of a q axis pass through a proportional integral PI regulator of a q axis current to respectively obtain a d axis voltage Ud and a q axis voltage Uq, and the d axis voltage Ud and the q axis voltage Uq are subjected to PARK inverse transformation and RKCLAE inverse transformation to obtain three-phase voltages Ua, Ub and Uc to be applied to the motor; when the motor stops running, the value of the motor rotor position sensor is taken as the electrical angle offset after being negative. The invention does not need to add extra equipment, has simple operation and good correction effect.
Description
Technical Field
The invention belongs to the technical field of motor control, and particularly relates to an automatic correction method for electrical angle offset.
Background
When Space Vector Pulse Width Modulation (SVPWM) control is performed on a three-phase brushless motor, a controller (motor driver) matched with the motor needs to accurately know position information of a motor rotor, namely, an electrical angle (e _ Theta), so that the motor can be controlled to normally rotate. The position sensor of the motor rotor can provide electrical angle raw information, and because the position sensor is usually not calibrated at zero position when being installed, the raw information cannot be directly used for controlling the motor, so that the difference value between the actual electrical angle of the motor rotor and the raw electrical angle provided by the position sensor of the motor rotor, namely the electrical angle offset, needs to be determined (corrected), and the obtained actual electrical angle is used for controlling the motor. In the existing motor control technology, an electrical angle offset correction method comprises the following steps: the motor three-phase line U, V, W is disconnected from the driver, another direct current power supply is used, the U-phase line of the motor is connected with the positive pole of the direct current power supply, the V, W-phase line of the motor is connected with the negative pole of the direct current power supply, the direct current power supply is turned on, the current which does not exceed the rated current of the motor is injected into the motor, the motor rotor can stop at the 0 electrical angle position, the value of the motor rotor position sensor is read by the driver, the value is taken as the electrical angle offset, and the value is stored in the driver. The method is time-consuming and labor-consuming, and has high correction cost.
Disclosure of Invention
The invention aims to provide an automatic correction method for electrical angle offset.
The technical solution for realizing the purpose of the invention is as follows: an automatic correction method for electrical angle offset specifically comprises the following steps:
setting a d-axis target current Id _ ref and a q-axis target current Iq _ ref, and setting an electrical angle e _ Theta to 0;
converting the collected three-phase currents Ia, Ib and Ic of the motor into d-axis feedback current Id _ fb and q-axis feedback current Iq _ fb through CLARKE conversion and PARK conversion;
the target current Id _ ref and the feedback current Id _ fb of a d axis pass through a proportional integral PI regulator of a d axis current, the target current Iq _ ref and the feedback current Iq _ fb of a q axis pass through a proportional integral PI regulator of a q axis current to respectively obtain a d axis voltage Ud and a q axis voltage Uq, and the d axis voltage Ud and the q axis voltage Uq are subjected to PARK inverse transformation and RKCLAE inverse transformation to obtain three-phase voltages Ua, Ub and Uc to be applied to the motor;
when the motor stops running, the value of the motor rotor position sensor is taken as the electrical angle offset after being negative.
Preferably, the d-axis target current Id _ ref is greater than 0 and not greater than the motor rated current.
Preferably, the q-axis target current Iq _ ref is set to 0.
Preferably, this is done by a motor driver:
converting the collected three-phase currents Ia, Ib and Ic of the motor into d-axis feedback current Id _ fb and q-axis feedback current Iq _ fb through CLARKE conversion and PARK conversion;
the target current Id _ ref and the feedback current Id _ fb of the d axis are subjected to proportional integral PI regulation of d axis current, the target current Iq _ ref and the feedback current Iq _ fb of the q axis are subjected to proportional integral PI regulation of q axis current, d axis voltage Ud and q axis voltage Uq are obtained respectively, and after the d axis voltage Ud and the q axis voltage Uq are subjected to PARK inverse transformation and CLARKE inverse transformation, three-phase voltages Ua, Ub and Uc are obtained and applied to the motor.
Preferably, the obtained electrical angle offset is saved in the EEPROM of the driver.
Compared with the prior art, the invention has the advantages that: the invention does not need to increase the hardware resource of the motor driver and equipment except the driver, after the method of the invention is fused in the driver, the correcting command $ FG is input to the driver, the electric angle offset correction can be conveniently, reliably and automatically carried out, the correcting result is stored in the driver, and the correcting effect can meet the actual use requirement.
The present invention is described in further detail below with reference to the attached drawing figures.
Drawings
FIG. 1 is a flow chart of an embodiment.
Detailed Description
When the motor is controlled by using the SVPWM technology, a two-phase rotating coordinate system d-q is established on a motor rotor, the coordinate system d-q and the rotor rotate synchronously, the d axis is the direction of a rotor magnetic field, and the q axis is the direction vertical to the rotor magnetic field. And controlling the d-axis current and the q-axis current simultaneously, and operating the motor.
An automatic correction method for electrical angle offset specifically comprises the following steps:
setting a d-axis target current Id _ ref and a q-axis target current Iq _ ref, setting an electrical angle e _ Theta to be 0, converting actually acquired three-phase currents Ia, Ib and Ic of the motor into a d-axis feedback current Id _ fb and a q-axis feedback current Iq _ fb through CLARKE conversion and PARK by a motor driver, respectively obtaining a d-axis voltage Ud and a q-axis voltage Uq by a proportional integral PI regulator of the d-axis current through the d-axis target current Id _ ref and the feedback current Id _ fb, and respectively obtaining three-phase voltages Ua, Ub and Uc which are actually applied to the motor after the d-axis voltage Ud and the q-axis voltage Uq are subjected to PARK inverse transformation and CLARKE inverse transformation when the motor stops operating, and taking the value of a rotor position sensor of the motor after taking negative as an electrical angle offset. The above process can be viewed as two current control loops (a d-axis current control loop and a q-axis current control loop). Of the above four transforms, both the PARK transform and the PARK inverse transform are used to the electrical angle e _ Theta. After the correction is finished, the power is supplied again after the power is cut off, the numerical value of the electrical angle offset is read and added into the electrical angle operation, and the motor is controlled to normally operate.
In a further embodiment, the d-axis target current Id _ ref is greater than 0 and not greater than the motor rated current, and the offset is corrected more accurately the larger the value.
The principle of the invention is as follows:
the electrical angle e _ Theta is equal to the position sensor raw electrical angle RDC + the electrical angle offset com _ offset, and in order to obtain the electrical angle offset com _ offset, com _ offset is equal to-RDC assuming that e _ Theta on the left side of the equation is equal to 0. If it is possible to try to rotate the rotor of the motor to a position where e _ Theta is equal to 0, the electrical angular offset com _ offset is obtained. Therefore, when the electrical angle offset correction is started, the electrical angle e _ Theta in the motor driver control algorithm is set to be 0, the d-axis target current Id _ ref is set to be a proper value, the q-axis target current Iq _ ref is set to be 0, the motor rotor is finally rotated to the position with the electrical angle being 0 under the control of the two current control loops, and the electrical angle offset is obtained when the value of the motor rotor position sensor is negative. The current is maintained for a suitable time to ensure that the rotor is rotated in place.
Examples
The invention is fused to a motor driver matched with a motor for specific implementation.
The motor driver has debugging serial port for connecting PC and motor driver, and can send various commands to the driver and display various information to the PC. The correction start command $ FG is input to the driver to start correction of the electrical angle offset, and the offset is displayed to the PC personal computer during correction.
The motor driver generally has three control modes, a position loop mode, a speed loop mode, and a current loop mode.
In the offset correction process, a current with a set time length is injected into the motor to enable the motor rotor to stably stop at the 0 electrical angle position, so a timer is needed. In addition, for clarity, the correction process is refined into a wait for correction state (state 0) and an in-progress correction state (state 1), which together with the previous timer, act as a state machine (StateMachine), referred to as the correction state machine, running in a 1ms periodic interrupt service routine.
As shown in fig. 1, an automatic correction method for electrical angle offset includes the following steps:
step 1: a start correction command $ FG is input to the driver, which is followed by a d-axis target current Id _ ref to start correcting the electrical angle offset amount. Id _ ref is required to be larger than 0, the current represented by the numerical value is preferably not larger than the rated current of the motor, and the offset is corrected more accurately when the numerical value is larger; setting the electrical angle e _ Theta to 0, the d-axis target current to Id _ ref, and the q-axis target current Iq _ ref to 0;
step 2: the correction state machine, in which a timer (countdown) is managed, runs in a periodic interrupt service routine with a frequency of 1kHz and a period of 1 ms. The initial state of the state machine is 0;
and step 3: the current control mode of the motor driver, i.e. one of the position loop mode, the speed loop mode and the current loop mode, is saved, the control mode is set to the current loop mode, then the timer time is set to 2 seconds (as required, it may be, for example, 0.2 to 5 seconds), finally the driver is enabled (to start applying current to the motor), and the motor rotor will start rotating towards 0 electrical angle. The state of the state machine is changed to 1;
and 4, step 4: when the motor rotor stops rotating, the value of the rotor position sensor is read, and the negative value of the value is the electrical angle offset com _ offset. When the 2 second timer in step 3 is timed out, the drive enable is turned off (to stop applying current to the motor) and the drive control mode saved in step 3 is resumed. The state of the state machine is changed to 0; the electrical angle offset com _ offset is saved in a parameter storage area (EEPROM) of the driver, and the current value of the electrical angle offset com _ offset is displayed through a driver debugging serial port;
after the correction is finished, the driver is powered on again after being powered off, the driver reads the numerical value of the electrical angle offset from the EEPROM and adds the numerical value into the electrical angle operation to control the normal operation of the motor.
Claims (5)
1. An automatic correction method for electrical angle offset is characterized by comprising the following steps:
setting a d-axis target current Id _ re f and a q-axis target current Iq _ ref, and setting an electrical angle e _ Theta to be 0;
converting the collected three-phase currents Ia, Ib and Ic of the motor into d-axis feedback current Id _ fb and q-axis feedback current Iq _ fb through CLARKE conversion and PARK conversion;
the target current Id _ ref and the feedback current Id _ fb of a d axis pass through a proportional integral PI regulator of a d axis current, the target current Iq _ ref and the feedback current Iq _ fb of a q axis pass through a proportional integral PI regulator of a q axis current to respectively obtain a d axis voltage Ud and a q axis voltage Uq, and the d axis voltage Ud and the q axis voltage Uq are subjected to PARK inverse transformation and RKCLAE inverse transformation to obtain three-phase voltages Ua, Ub and Uc to be applied to the motor;
when the motor stops running, the value of the motor rotor position sensor is taken as the electrical angle offset after being negative.
2. The automatic correction method of electrical angle offset according to claim 1, characterized in that the d-axis target current Id _ ref is greater than 0 and not greater than the motor rated current.
3. The automatic correction method of electrical angle offset according to claim 1, characterized in that the q-axis target current Iq _ ref is set to 0.
4. The automatic correction method of electrical angle offset according to claim 1, characterized in that it is performed by a motor driver:
converting the collected three-phase currents Ia, Ib and Ic of the motor into d-axis feedback current Id _ fb and q-axis feedback current Iq _ fb through CLARKE conversion and PARK conversion;
the target current Id _ ref and the feedback current Id _ fb of the d axis are subjected to proportional integral PI regulation of d axis current, the target current Iq _ ref and the feedback current Iq _ fb of the q axis are subjected to proportional integral PI regulation of q axis current, d axis voltage Ud and q axis voltage Uq are obtained respectively, and after the d axis voltage Ud and the q axis voltage Uq are subjected to PARK inverse transformation and CLARKE inverse transformation, three-phase voltages Ua, Ub and Uc are obtained and applied to the motor.
5. The automatic correction method of electrical angle offset according to claim 1, characterized in that the obtained electrical angle offset is stored in an EEPROM of the driver.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911395197.2A CN111313785A (en) | 2019-12-30 | 2019-12-30 | Automatic correction method for electrical angle offset |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911395197.2A CN111313785A (en) | 2019-12-30 | 2019-12-30 | Automatic correction method for electrical angle offset |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111313785A true CN111313785A (en) | 2020-06-19 |
Family
ID=71161449
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911395197.2A Withdrawn CN111313785A (en) | 2019-12-30 | 2019-12-30 | Automatic correction method for electrical angle offset |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111313785A (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104836506A (en) * | 2015-05-29 | 2015-08-12 | 许继集团有限公司 | Zero-position correction system and method of PMSM rotor |
-
2019
- 2019-12-30 CN CN201911395197.2A patent/CN111313785A/en not_active Withdrawn
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104836506A (en) * | 2015-05-29 | 2015-08-12 | 许继集团有限公司 | Zero-position correction system and method of PMSM rotor |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10008970B2 (en) | Control apparatus for AC motor | |
US8446114B2 (en) | Control apparatus for electric rotating machine | |
US7592765B2 (en) | Method and system for controlling synchronous motor drive systems | |
CN105490609B (en) | The method and its system of servo Self-tuning System motor encoder zero point | |
US7042190B2 (en) | Motor control apparatus and motor control method | |
US9847744B2 (en) | Controller and control method for rotary electric machine | |
KR101272955B1 (en) | Method for controlling motor of green car | |
US10090788B2 (en) | Optimal torque ripple reduction through current shaping | |
JP4566100B2 (en) | Electric motor drive | |
CN105610380B (en) | The method and apparatus for controlling motor with six-step mode | |
CN108923468B (en) | Seamless smooth switching method and system for virtual synchronous motor | |
CN109245653B (en) | Motor starting method and device, motor controller and refrigerator compressor | |
JP2019097341A (en) | Motor controller and motor system | |
JP3726713B2 (en) | Electric motor control device | |
CN111313785A (en) | Automatic correction method for electrical angle offset | |
CN110995062A (en) | Motor starting control method and device, motor and compressor | |
CN113037158B (en) | AC-DC shaft decoupling control method and device for permanent magnet synchronous motor electric driving system | |
CN114844402A (en) | Vector control system of high-power permanent magnet synchronous motor | |
CN115398794A (en) | Motor control device, motor system, and motor control method | |
CN115246323A (en) | Parking method and system during battery failure during vehicle running | |
CN111969920B (en) | Permanent magnet synchronous motor starting method and device | |
CN113541558B (en) | Motor initial position identification method, device, equipment and readable storage medium | |
WO2019227813A1 (en) | Motor starting method and device, electronic speed regulator, and unmanned aerial vehicle | |
CN110071671B (en) | Motor driving method for directly controlling three-phase current | |
US20230137395A1 (en) | Method for controlling a rectifier connected to a permanent-magnet synchronous electric generator to provide a direct voltage, corresponding device and computer program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20200619 |
|
WW01 | Invention patent application withdrawn after publication |