Online self-tuning method and system for magnetic declination of motor
阅读说明:本技术 一种电机磁偏角的在线自整定方法及系统 (Online self-tuning method and system for magnetic declination of motor ) 是由 张敬良 于 2019-12-11 设计创作,主要内容包括:本发明公开了一种电机磁偏角的在线自整定方法及系统,所述方法包括如下步骤:步骤S1,在给定电流合成矢量参考下,给定与时间线性的旋转磁偏角补偿,在电流环矢量闭环控制下得到d-q旋转坐标系中<Image he="20" wi="18" file="DEST_PATH_IMAGE001.GIF" imgContent="drawing" imgFormat="GIF" orientation="portrait" inline="no"></Image>矢量幅值的周期变化,来实现平滑的力矩控制,使电机做平稳的微小运动;步骤S2,采集某一时间段的电机角速度,检测角加速度峰值时刻;步骤S3,根据获得的每个角加速度峰值时刻计算对应时刻的实际磁偏角,步骤S4,对获得的多个磁偏角测量值进行删选、均值优化获得实际磁偏角的整定值,通过本发明,可实现对电机磁偏角稳定精确地自整定目的。(The invention discloses an online self-tuning method and system for a magnetic declination of a motor, wherein the method comprises the following steps: step S1, under the reference of the given current composite vector, the rotation magnetic declination compensation linear with time is given, and the d-q rotation coordinate system is obtained under the current loop vector closed-loop control The periodic variation of the vector amplitude value realizes smooth torque control, so that the motor does stable micro motion; step S2, collecting the motor angular speed in a certain time period, and detecting the peak time of the angular acceleration; and step S3, calculating the actual declination of the corresponding moment according to the peak moment of each obtained angular acceleration, and step S4, deleting and selecting the obtained measured values of the declination, and optimizing the mean value to obtain the setting value of the actual declination.)
1. An online self-tuning method for a magnetic declination of a motor comprises the following steps:
step S1, under the reference of the given current composite vector, the rotation magnetic declination compensation linear with time is given, and the d-q rotation coordinate system is obtained under the current loop vector closed-loop control
step S2, collecting the motor angular speed in a certain time period, and detecting the peak time of the angular acceleration;
step S3, calculating the actual declination of the corresponding time according to the obtained angular acceleration peak time;
and step S4, deleting and selecting the obtained multiple magnetic declination measurement values, and optimizing the mean value to obtain the actual magnetic declination setting value.
2. The online self-tuning method of the magnetic declination of the motor according to claim 1, characterized in that: in step S2, the peak time of the angular acceleration is obtained by combining the angular acceleration threshold detection and the zero-crossing detection of the angular jerk.
3. The on-line self-tuning method for the declination of the motor according to claim 2, wherein the step S2 further comprises:
step S200, collecting the angular speed of the motor in a certain time period
Step S201, calculating angular acceleration of a motor;
step S202, calculating the angular acceleration of the motor according to the angular acceleration of the motor;
step S203, obtaining angular acceleration threshold detection output by using amplitude detection principle
Step S204, detecting each
4. The on-line self-tuning method of the magnetic declination of the motor according to claim 3, wherein in step S203, the angular acceleration threshold detection output
wherein the content of the first and second substances,
5. The online self-tuning method of the magnetic declination of the motor according to claim 4, characterized in that: detecting output in calculating angular acceleration threshold
6. The online self-tuning method of the magnetic declination of the motor according to claim 1, characterized in that: in step S3, the actual declination is calculated according to the following formula:
wherein the content of the first and second substances,for a given declination and sampling time
7. An online self-tuning system for a magnetic declination of a motor comprises:
a torque control unit for giving linear rotation magnetic declination compensation with time under given current synthetic vector reference and obtaining d-q rotation coordinate system under current loop vector closed-loop control
the angular acceleration peak moment detection unit is used for acquiring the angular speed of the motor within a certain time period and detecting the angular acceleration peak moment;
an actual declination calculation unit for calculating the peak time of angular acceleration
and the result optimization unit is used for deleting and selecting the obtained multiple magnetic declination measurement values and optimizing the mean value to obtain the setting value of the actual magnetic declination.
8. The on-line self-tuning system of the magnetic declination of the motor according to claim 7, characterized in that: the peak time of the angular acceleration is obtained by combining angular acceleration threshold detection and zero-crossing detection of angular jerk.
9. The on-line self-tuning system of the magnetic declination of the motor according to claim 8, wherein the angular acceleration peak moment detection unit comprises:
an angular velocity acquisition unit for acquiring angular velocity of the motor in a certain time period
An angular acceleration calculation unit for calculating an angular acceleration of the motor;
the angular acceleration computing unit is used for computing the angular acceleration of the motor according to the angular acceleration of the motor;
an amplitude detection unit for obtaining angular acceleration threshold detection output by using amplitude detection principle;
A zero-crossing point time detecting unit for detecting at each of the
10. The system of claim 9, wherein the angular acceleration threshold detection output is output
wherein the content of the first and second substances,
Technical Field
The invention relates to the field of servo drive control, in particular to an online self-tuning method and system for a magnetic declination of a servo motor or a linear motor.
Background
Industrial robot controllers, various numerical control devices, and automation lines are based on real-time motion control of various servo motors. The servo driver is a key device for realizing accurate control of the torque, speed and position of the servo motor and the linear motor. The most popular and most advanced servo drive algorithm at present is a vector control algorithm for Field-oriented control (FOC) to realize linear control on the output torque of the ac permanent magnet synchronous motor, so as to further realize accurate control on the speed and position of the motor.
The FOC method is to control the output torque of the motor by controlling the angle and amplitude of the resultant current vector of the coil (stator or mover). The angle of the resultant vector depends on the relative position of the rotor and the stator, so that an encoder is installed in both the servo motor and the linear motor to indirectly obtain the required position information. The encoder has both absolute and relative values: the absolute value encoder can not lose position information even if power is lost, namely the zero point of the position cannot be changed, if the encoder does not deflect, a magnetic declination (the offset between an electric rotating angle and the position information given by the encoder) is fixed, and only needs to be set once, but if the encoder deflects due to impact generated in the installation or operation process, the encoder needs to be set again; the zero point of the relative value encoder is the current position at each power-on, so that self-tuning is needed before each operation. The accuracy of the declination directly affects the efficiency of FOC servo control, and therefore, the self-tuning of the declination of the servo motor or the linear motor is particularly important.
The existing magnetic declination self-tuning methods have two types: (1) and (3) a mode of strong pulling of a current synthetic vector in a fixed direction, such as applying directional current smaller than the rated value of the motor to enter from the V phase and exit from the U phase of the motor, locking the rotor to a position with an electric rotation angle of-30 degrees, and reading position information output by an encoder so as to obtain a magnetic declination. (2) And the motor is locked at a position with an electric rotation angle of 180 degrees in a current injection mode under a rotor motionless or micro-motion mode, and the output of the encoder is read to complete the self-tuning of the magnetic declination.
However, the magnetic declination of the two modes is not optimized to be set, and the friction resistance torque directly influences the setting precision and is not suitable for setting under the condition of load; in addition, because the torque in the method (1) is not controlled linearly and smoothly, the torque is easy to vibrate at the position of an electric rotation angle of-30 degrees; in the method (2), because the common servo motor adopts a surface permanent magnet structure, the reluctance torque generated by the salient pole effect is not obvious, and the accuracy of setting the declination is also influenced.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention aims to provide an online self-tuning method and system for the magnetic declination angle of the motor, which aim to realize smooth torque control by giving a rotating magnetic declination angle, so that the motor does stable micro motion, thereby acquiring the running speeds of the motor under different preset magnetic declinations, further acquiring an accurate actual magnetic declination angle and realizing the purpose of stably and accurately self-tuning the magnetic declination angle of the motor.
In order to achieve the above and other objects, the present invention provides an online self-tuning method for a magnetic declination of a motor, comprising the following steps:
step S1, under the reference of the given current composite vector, the rotation magnetic declination compensation linear with time is given, and the d-q rotation coordinate system is obtained under the current loop vector closed-loop controlThe periodic variation of the vector amplitude value realizes smooth torque control, so that the motor does stable micro motion;
step S2, collecting the motor angular speed in a certain time period, and detecting the peak time of the angular acceleration;
step S3, calculating the actual declination of the corresponding time according to the obtained angular acceleration peak time;
and step S4, deleting and selecting the obtained multiple magnetic declination measurement values, and optimizing the mean value to obtain the actual magnetic declination setting value.
Preferably, in step S2, the peak time of the angular acceleration is obtained by combining angular acceleration threshold detection and zero-crossing detection of angular jerk.
Preferably, the step S2 further includes:
step S200, collecting the angular speed of the motor in a certain time period;
Step S201, calculating angular acceleration of a motor;
step S202, calculating the angular acceleration of the motor according to the angular acceleration of the motor;
step S203, theObtaining angular acceleration threshold detection output using amplitude detection principles
;Step S204, detecting each
During the window of =1, the zero-crossing point of the angular jerk of the motorSaid zero crossing point timeThat is, the peak time of the angular acceleration, and if a plurality of zero-crossing points occur within a window period, an optimal value is obtained through mean processing as the peak time of the angular acceleration.Preferably, in step S203, the angular acceleration threshold detection output
Comprises the following steps:
wherein the content of the first and second substances,
in order to sample the points of interest,in the case of an angular acceleration,respectively a down-hop threshold and an up-hop threshold.Preferably, the output is detected in calculating an angular acceleration threshold
Said up-jump threshold valueTaking 80 ~ 90 percent of the maximum value of the angular acceleration, and the jump-down threshold valueRatio of the corresponding toAnd 5% smaller.Preferably, in step S3, the actual declination is calculated according to the following formula:
wherein the content of the first and second substances,
for a given declination and sampling timeThe linear coefficient between the two linear coefficients,in the case of an angular acceleration,in order to control the tempo of the beat,to calculate the actual declinationThe intermediate variable in the process, round, is the rounding function.In order to achieve the above object, the present invention further provides an online self-tuning system for a magnetic declination of a motor, comprising:
a torque control unit for giving linear rotation magnetic declination compensation with time under given current synthetic vector reference and obtaining d-q rotation coordinate system under current loop vector closed-loop control
The periodic variation of the vector amplitude value realizes smooth torque control, so that the motor can make stable micro motion;the angular acceleration peak moment detection unit is used for acquiring the angular speed of the motor within a certain time period and detecting the angular acceleration peak moment;
an actual declination calculation unit for calculating the peak time of angular acceleration
Calculating the actual declination at the corresponding moment;and the result optimization unit is used for deleting and selecting the obtained multiple magnetic declination measurement values and optimizing the mean value to obtain the setting value of the actual magnetic declination.
Preferably, the peak time of the angular acceleration is obtained by combining angular acceleration threshold detection and zero-crossing detection of angular jerk.
Preferably, the angular acceleration peak time detecting unit includes:
an angular velocity acquisition unit for acquiring angular velocity of the motor in a certain time period
;An angular acceleration calculation unit for calculating an angular acceleration of the motor;
the angular acceleration computing unit is used for computing the angular acceleration of the motor according to the angular acceleration of the motor;
an amplitude detection unit for obtaining angular acceleration threshold detection output by using amplitude detection principle;
A zero-crossing point time detecting unit for detecting at each of the
During the window of =1, the zero-crossing point of the angular jerk of the motorSaid zero crossing point timeThat is, the peak time of the angular acceleration, and if a plurality of zero-crossing points occur within a window period, an optimal value is obtained through mean processing as the peak time of the angular acceleration.Preferably, the angular acceleration threshold detection output
Comprises the following steps:
wherein the content of the first and second substances,
in order to sample the points of interest,in the case of an angular acceleration,respectively a down-hop threshold and an up-hop threshold.Compared with the prior art, the on-line self-setting method and the system for the magnetic declination of the motor start current vector closed-loop control no matter the motor is under the condition of load or no load, smooth torque control is realized by giving the rotating magnetic declination under the reference of the given current synthetic vector, the motor is enabled to do stable micro motion, so that the running speeds of the motor under different preset magnetic declination are acquired, an accurate actual magnetic declination is further obtained through an optimization algorithm, and the aim of stably and accurately self-setting the magnetic declination of the motor is fulfilled.
Drawings
FIG. 1 shows an analytic model of a space vector of a conventional permanent magnet synchronous motor;
FIG. 2 is a flow chart illustrating the steps of an online self-tuning method for the magnetic declination of a motor according to the present invention;
FIG. 3 is a system architecture diagram of an on-line self-tuning system for the magnetic declination of a motor according to the present invention;
FIG. 4 is a detailed structure diagram of the angular acceleration peak time detection unit according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an actual signal of an optimal setting process of a magnetic declination of a certain motor in an embodiment of the present invention.
Detailed Description
Other advantages and capabilities of the present invention will be readily apparent to those skilled in the art from the present disclosure by describing the embodiments of the present invention with specific embodiments thereof in conjunction with the accompanying drawings. The invention is capable of other and different embodiments and its several details are capable of modification in various other respects, all without departing from the spirit and scope of the present invention.
Fig. 1 shows an analytic model of a space vector of a conventional permanent magnet synchronous motor (taking a pole pair as an example without loss of generality). In the figureThe actual motor electric rotation angle is the included angle between the d axis in the rotating coordinate system d-q and the U axis in the static coordinate system U-V-W;
the actual magnetic declination to be set is obtained;and setting a compensation value for the declination when the Park is changed. At the rotor position shown, according to the codeThe electric rotation angle obtained by the measured rotation angle of the motorCorresponding to the compensation value of declination set when Park changes, corresponding to the rotating coordinate system d '-q'Performing flux linkage decoupling through Clarke and Park transformation algorithms, and realizing the methodAfter the rotor flux linkage orientation control of =0, the method comprisesTo linearly control the motor torque.Transformation from the coordinate system d '-q' of fig. 1 to the coordinate system d-q yields:
(1)
(2)
due to current vector control:
=,=0, whereinGiven a reference value, therefore:(3)
(4)
actual motor torque receivingLinear control, as can be seen from equation (4), under vector control, if a time-varying set declination compensation value is given
The torque of the motor can be obtainedComprises the following steps:(5)
from equation (5) and the kinetic equation
Obtaining the following components:(6)
wherein:
is the torque constant of the motor and is,is the load torque (including friction torque),is the moment of inertia of the motor and,is the motor speed. Equation (6) givesThe angular acceleration and the actual magnetic declination of the motorThe relationship of (A) to (B), as can be seen(7)
When the angular acceleration amplitude of the motor is maximum, wherein when isIs positive when the acceleration is even times
The acceleration is negative when the odd number times, so that the actual magnetic declination can be obtained by equation (7) by only sampling the motor speed to obtain the angular acceleration of the motor and finding the moment with the maximum amplitude of the angular acceleration.It can also be known from equation (6):
(1) as long as
Large enough to always overcome the load torque and drive the motor to reciprocate.(2) The motor acceleration time depends on
。(3) At a certain given beat of declination variation,
determines the magnetic declinationAnd setting the resolution.(4) The range and maximum speed of the motor reciprocating motion depend on
Andthe motor can always be ensured to do small reciprocating motion as long as a proper value is selected, and the reciprocating period depends on。(5) The influence of measurement errors can be reduced by measuring multiple groups of actual declination angles through multiple reciprocating motions and carrying out averaging processing.
FIG. 2 is a flowchart illustrating steps of an online self-tuning method for a magnetic declination of a motor according to the present invention. As shown in fig. 2, the online self-tuning method for the magnetic declination of the motor of the present invention can be applied to a servo motor or a linear motor, and comprises the following steps:
step S1, under the reference of the given current composite vector, the rotation magnetic declination compensation linear with time is given, and the d-q rotation coordinate system is obtained under the current loop vector closed-loop control
The periodic variation of the vector amplitude value realizes smooth torque control, so that the motor can make stable micro motion.And step S2, collecting the angular speed of the motor in a certain time period, and detecting the peak time of the angular acceleration.
From the above analysis, in order to accurately measure the actual declination, the angular accelerationThe peak time of angular jerk can be accurately measured by combining angular acceleration threshold detection and zero-crossing detection of angular jerk, that is, the zero-crossing time of angular jerk is the peak time when the angular acceleration amplitude exceeds a set value. That is, obtaining sampling points meeting the following conditions in the acquisition time period
:(8)
(9)
Wherein
Is the angular acceleration threshold detection output, defined as follows:(10)
wherein the content of the first and second substances,
in order to sample the points of interest,in the case of an angular acceleration,in order to control the tempo of the beat,respectively a down-hop threshold and an up-hop threshold. The selection of different thresholds may effectively prevent a jump at the threshold limit.Specifically, step S2 further includes:
step S200, collecting the angular speed of the motor in a certain time period
;Step S201, according to the angular speed of the motor
Calculating angular acceleration of motorWhereinIn order to sample the points of interest,is a constant number of times, and is,the larger the size of the tube is,the smoother is;step S202, calculating angular acceleration of motor
,Is also a constant;step S203, obtaining angular acceleration threshold detection output by using amplitude detection principle
In a specific embodiment of the present invention, the angular acceleration threshold detection output is calculatedTime, jump thresholdThe maximum angular acceleration is taken as 80 ~ 90 percent, and the jump threshold is taken asThen correspondingly ratio5% less, thereby obtaining an angular acceleration threshold detection output;Step S204, detecting each
During the window of =1, the zero-crossing point of the angular jerk of the motorI.e. both (8) and (9) above, the zero-crossing point timeNamely the angular acceleration peak moment. If a plurality of zero-crossing points occur, an optimal value can be obtained through mean value processing and used as the angular acceleration peak value time.In step S3, an actual declination at the corresponding time is calculated from the obtained angular acceleration peak time.
Specifically, when the angular acceleration is obtained by step S2
Time of peak valueDue to the actual declinationToThe magnetic declination can be calculated according to the formula (7) as follows,
wherein the content of the first and second substances,
for a given declination and sampling timeThe linear coefficient between the two linear coefficients,in the case of an angular acceleration,in order to control the tempo of the beat,to calculate the actual declinationThe intermediate variable in the process, round, is the rounding function.And step S4, deleting the obtained actual declination, discarding the result far away from the expected value, and carrying out mean processing on a plurality of measurement results to obtain the final reliable and accurate setting value of the actual declination.
Fig. 3 is a system architecture diagram of an online self-tuning system of the magnetic declination of the motor. As shown in fig. 3, the online self-tuning system for the magnetic declination of the motor of the present invention can be applied to a servo motor or a linear motor, and comprises:
a torque control unit 301 for obtaining a d-q rotation coordinate system under current loop vector closed-loop control by giving linear rotation declination compensation under given current composite vector reference and obtaining
The periodic variation of the vector amplitude value realizes smooth torque control, so that the motor can make stable micro motion.The angular acceleration peak time detection unit 302 is configured to collect an angular velocity of the motor in a certain time period, and detect an angular acceleration peak time.
By the above analysis, in order to accurately measureMeasuring actual declination, angular acceleration peak time detection unit 302 obtains angular acceleration by combining angular acceleration threshold detection and zero-crossing detection of angular jerk
I.e. obtaining a sample point satisfying the following condition within the acquired time period:
Wherein
Is the angular acceleration threshold detection output, defined as follows:
wherein the content of the first and second substances,
in order to sample the points of interest,in the case of an angular acceleration,in order to control the tempo of the beat,respectively a down-hop threshold and an up-hop threshold. The selection of different thresholds may effectively prevent a jump at the threshold limit.Specifically, as shown in fig. 4, the angular acceleration peak time detecting unit 302 further includes:
an angular velocity acquisition unit 3021 for acquiring an angular velocity of the motor for a certain period of time
;An angular acceleration calculation unit 3022 for calculating an angular acceleration of the motor
WhereinIn order to sample the points of interest,is a constant number of times, and is,the larger the size of the tube is,the smoother is;an angular jerk calculation unit 3023 to calculate angular jerk of the motor
,Is also a constant;an amplitude detection unit 3024 for obtaining an angular acceleration threshold detection output using an amplitude detection principleIn an embodiment of the present invention, the amplitude detection unit 3024 calculates the threshold detection output
Time, jump thresholdThe maximum angular acceleration is taken as 80 ~ 90 percent, and the jump threshold is taken asThen correspondingly ratio5% less, thereby obtaining an angular acceleration threshold detection output。A zero-crossing point timing detecting unit 3025 for detecting at each of
Threshold detection output=1 window period, zero crossing point time of angular jerkSaid zero crossing point timeNamely the angular acceleration peak moment. If a plurality of zero-crossing points occur, an optimal value can be obtained through mean value processing and used as the angular acceleration peak value time.An actual declination calculation unit 303 for calculating the actual declination based on the peak time of the angular acceleration
And calculating the actual declination at the corresponding moment.Specifically, when the angular acceleration is obtained by the angular acceleration peak time detection unit 302
Time of peak valueDue to the actual declinationToThe actual declination can be calculated according to the formula (7) as follows,
wherein the content of the first and second substances,
for a given declination and sampling timeThe linear coefficient between the two linear coefficients,in the case of an angular acceleration,in order to control the tempo of the beat,to calculate the actual declinationThe intermediate variable in the process, round, is the rounding function.And the result optimization unit 304 is configured to delete the obtained actual declination, discard results far from the expected value, and perform mean processing on the multiple measurement results to obtain a final reliable and accurate setting value of the actual declination.
Fig. 5 shows actual signals of an optimal setting process of a certain motor magnetic declination in a specific embodiment of the present invention, and the following will further explain the online self-setting step of the motor magnetic declination of the present invention with reference to fig. 5:
Step 2, setting
Enabling current loop vector control to make the motor do slight reciprocating motion;step 3, collecting the angular speed of the motor in a certain time period;
Step 4, calculating the angular acceleration of the motor
,Is a constant number of times, and is,the larger the size of the tube is,the smoother the result, the better the result can be obtained by actually taking 40;step 5, calculating angular acceleration of the motor
,The same as above;step 6, obtaining by using an amplitude detection principle
,Taking 80 ~ 90% of the maximum value of the acceleration,ratio of the corresponding toAnd 5% smaller. Thereby obtainingLamda in fig. 5;step 7, detecting at each
=1 window period, zero crossing point time of angular jerkIf a plurality of zero-crossing points occur in a window period, as shown in ▽ in fig. 5, an optimal value can be obtained through an averaging process as the peak point of the angular acceleration;and 8, calculating a corresponding declination through each zero-crossing moment obtained in the previous step, deleting the obtained declination, discarding the result far away from the expected value, and further performing mean processing on the measurement result meeting the conditions to obtain the setting value of the actual declination.
In summary, the online self-tuning method and system for the magnetic declination of the motor of the invention realize smooth torque control by giving the rotating magnetic declination under the given current synthetic vector reference by starting current vector closed-loop control no matter the motor is under the condition of load or no load, so that the motor does stable micro motion, thereby acquiring the running speed of the motor under different preset magnetic declinations, further obtaining the accurate actual magnetic declination through an optimization algorithm, and realizing the purpose of stably and accurately self-tuning the magnetic declination of the motor.
Compared with the prior art, the invention has the following advantages:
1. the magnetic declination setting method of the invention obtains controllable amplitude and period in a d-q rotating coordinate system under the vector closed-loop control of a current loop
The vector is adopted, so that the motion process, including speed and output torque, of the motor in the setting process is stable and controllable in size.2. The magnetic declination is calculated by the moment of the maximum angular acceleration, the load torque (including friction torque) is constant in a small range, the magnitude of the maximum angular acceleration can be influenced, but the moment of the maximum angular acceleration is not influenced, so the magnetic declination setting value is not influenced by the load torque (including friction torque).
3. Because the invention adopts the accurate and stable peak value moment detection algorithm and the mean value optimization algorithm, the magnetic declination setting value obtained by the invention is more stable and accurate.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Modifications and variations can be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the present invention. Therefore, the scope of the invention should be determined from the following claims.
- 上一篇:一种医用注射器针头装配设备
- 下一篇:一种六相永磁容错轮缘推进电机拓扑控制方法