Motor angle error correction method and device, computer equipment and storage medium

文档序号:1314215 发布日期:2020-07-10 浏览:3次 中文

阅读说明:本技术 电机角度误差矫正方法、装置、计算机设备和存储介质 (Motor angle error correction method and device, computer equipment and storage medium ) 是由 骆鹏 黎国才 王剑卿 于 2020-03-09 设计创作,主要内容包括:本申请涉及一种电机角度误差矫正方法、装置、计算机设备和存储介质,所述方法包括:获取转子角度;根据所述转子角度微分转换生成直流角速度;对所述直流角速度进行滤波处理,得到滤波角速度;根据所述滤波角速度积分转换生成滤波角度;根据所述转子角度与所述滤波角度的差值,生成当前误差量;根据所述当前误差量对所述滤波角度进行误差补偿,得到滤波和误差矫正后的最终角度。根据上述方法对获取的转子角度进行了滤波处理和矫正补偿处理,既提升了获取角度信号的抗干扰能力,也保证角度误差在控制范围内,提高了电机控制时的稳定性。(The application relates to a motor angle error correction method, a motor angle error correction device, computer equipment and a storage medium, wherein the method comprises the following steps: obtaining a rotor angle; generating a direct current angular velocity according to the rotor angle differential conversion; filtering the direct current angular velocity to obtain a filtering angular velocity; generating a filtering angle according to the filtering angular velocity integral conversion; generating a current error amount according to the difference value of the rotor angle and the filtering angle; and carrying out error compensation on the filtering angle according to the current error amount to obtain a final angle after filtering and error correction. According to the method, the obtained rotor angle is subjected to filtering processing and correction compensation processing, so that the anti-interference capacity of the obtained angle signal is improved, the angle error is ensured to be within a control range, and the stability of the motor during control is improved.)

1. A method of correcting an angular error of a motor, the method comprising:

obtaining a rotor angle;

generating a direct current angular velocity according to the rotor angle differential conversion;

filtering the direct current angular velocity to obtain a filtering angular velocity;

generating a filtering angle according to the filtering angular velocity integral conversion;

generating a current error amount according to the difference value of the rotor angle and the filtering angle;

and carrying out error compensation on the filtering angle according to the current error amount to obtain a final angle after filtering and error correction.

2. The method according to claim 1, wherein the error compensating the filtered angle according to the current error amount to obtain a final filtered and error-corrected angle comprises:

summing the current error amount and the error total amount of the previous round to generate the current error total amount;

generating an error correction quantity according to the comparison between the current error total quantity and a preset error range;

generating a total error amount for error superposition in the next round according to the error correction amount and the current total error amount;

and carrying out error compensation on the filtering angle according to the error correction quantity to obtain a final angle after filtering and error correction.

3. The method of claim 2, wherein generating the error correction amount according to the comparison of the current total error amount and the preset error range comprises:

when the current error total amount exceeds the preset error range, generating an error amount according to the current error total amount and an upper limit value of the preset error range;

and carrying out amplitude limiting processing on the error quantity to generate an error correction quantity.

4. The method of claim 3, wherein generating the error correction amount according to the comparison of the current total error amount and the preset error range comprises:

and when the total error amount is within the preset error range, the error correction amount is zero.

5. An apparatus for correcting angular error of a motor, the apparatus comprising:

the encoder module is used for acquiring a rotor angle;

the conversion module is used for generating a direct current angular speed according to the rotor angle differential conversion;

the filtering module is used for carrying out filtering processing on the direct current angular velocity to obtain a filtering angular velocity;

the inverse conversion module is used for generating a filtering angle according to the filtering angular velocity integral conversion;

the difference value generating module is used for generating a current error amount according to the difference value of the rotor angle and the filtering angle;

and the error compensation module is used for carrying out error compensation on the filtering angle according to the current error amount to obtain a final angle after filtering and error correction.

6. The apparatus of claim 5, wherein the error compensation module comprises:

the difference value superposition unit is used for summing the current error amount and the error total amount of the previous round to generate the current error total amount;

the difference value judging unit is used for generating an error correction amount according to the comparison between the current error total amount and a preset error range;

the difference value accumulation unit is used for generating the error total amount for error superposition in the next round according to the error correction amount and the current error total amount;

and the error compensation unit is used for carrying out error compensation on the filtering angle according to the error correction quantity to obtain a final angle after filtering and error correction.

7. The apparatus according to claim 6, wherein the difference value judging unit includes:

the error over-value unit is used for generating an error amount according to the current error total amount and an upper limit value of the preset error range when the current error total amount exceeds the preset error range;

and the amplitude limiting unit is used for carrying out amplitude limiting processing on the error quantity to generate an error correction quantity.

8. The apparatus according to claim 6, wherein the difference value judging unit further comprises:

and the non-exceeding unit is used for enabling the error correction quantity to be zero when the total error quantity is within the preset error range.

9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 4 are implemented when the computer program is executed by the processor.

10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 4.

Technical Field

The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for correcting an angle error of a motor, a computer device, and a storage medium.

Background

In a high-performance alternating current permanent magnet motor driving system, a stator current coordinate is transformed according to a rotor angle to obtain a torque and an exciting current component, and the method is a very important ring in motor closed-loop control. If the angle is deviated, the control performance of the motor is directly influenced, the running performance of the motor is reduced if the angle is slight, and the control system is disordered and unstable if the angle is serious.

The common angle detection sensor mainly comprises a photoelectric encoder and a rotary transformer, an angle signal is a time variable in the rotating operation process of a motor, and finally the signal is a sawtooth wave in a digital system due to the limited number of bits of the variable, so that the factors causing the deviation between the angle of the encoder and the position of a motor shaft are as follows: poor encoder installation, external signal interference, quantization errors due to limited number of encoder bits.

The existing processing mode for reducing the external signal interference is median value filtering plus differential amplitude limiting at present, the filtering mode directly limits the error amount of the angle obtained by an encoder within a certain range, and the error amount exceeding the range is directly discarded, so that the loss of a position signal is inevitably brought.

Disclosure of Invention

In order to solve the technical problem, the application provides a motor angle error correction method, a motor angle error correction device, computer equipment and a storage medium.

In a first aspect, the present embodiment provides a method for correcting an angle error of a motor, where the method includes:

obtaining a rotor angle;

generating a direct current angular velocity according to the rotor angle differential conversion;

filtering the direct current angular velocity to obtain a filtering angular velocity;

generating a filtering angle according to the filtering angular velocity integral conversion;

generating a current error amount according to the difference value of the rotor angle and the filtering angle;

and carrying out error compensation on the filtering angle according to the current error amount to obtain a final angle after filtering and error correction.

Optionally, the performing error compensation on the filtering angle according to the current error amount to obtain a final angle after filtering and error correction includes:

summing the current error amount and the error total amount of the previous round to generate the current error total amount;

generating an error correction quantity according to the comparison between the current error total quantity and a preset error range;

generating a total error amount for error superposition in the next round according to the error correction amount and the current total error amount;

and carrying out error compensation on the filtering angle according to the error correction quantity to obtain a final angle after filtering and error correction.

Optionally, the generating an error correction amount according to the comparison between the current total error amount and a preset error range includes:

when the current error total amount exceeds the preset error range, generating an error amount according to the current error total amount and an upper limit value of the preset error range;

and carrying out amplitude limiting processing on the error quantity to generate an error correction quantity.

Optionally, the generating an error correction amount according to the comparison between the current total error amount and a preset error range includes:

and when the total error amount is within the preset error range, the error correction amount is zero.

In a second aspect, the present embodiment provides a motor angle error correction apparatus, including:

the encoder module is used for acquiring a rotor angle;

the conversion module is used for generating a direct current angular speed according to the rotor angle differential conversion;

the filtering module is used for carrying out filtering processing on the direct current angular velocity to obtain a filtering angular velocity;

the inverse conversion module is used for generating a filtering angle according to the filtering angular velocity integral conversion;

the difference value generating module is used for generating a current error amount according to the difference value of the rotor angle and the filtering angle;

and the error compensation module is used for carrying out error compensation on the filtering angle according to the current error amount to obtain a final angle after filtering and error correction.

Optionally, the error compensation module comprises:

the difference value superposition unit is used for summing the current error amount and the error total amount of the previous round to generate the current error total amount;

the difference value judging unit is used for generating an error correction amount according to the comparison between the current error total amount and a preset error range;

the difference value accumulation unit is used for generating the error total amount for error superposition in the next round according to the error correction amount and the current error total amount;

and the error compensation unit is used for carrying out error compensation on the filtering angle according to the error correction quantity to obtain a final angle after filtering and error correction.

Optionally, the difference determining unit includes:

the error over-value unit is used for generating an error amount according to the current error total amount and an upper limit value of the preset error range when the current error total amount exceeds the preset error range;

and the amplitude limiting unit is used for carrying out amplitude limiting processing on the error quantity to generate an error correction quantity.

Optionally, the difference determining unit further includes:

and the non-exceeding unit is used for enabling the error correction quantity to be zero when the total error quantity is within the preset error range.

A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:

obtaining a rotor angle;

generating a direct current angular velocity according to the rotor angle differential conversion;

filtering the direct current angular velocity to obtain a filtering angular velocity;

generating a filtering angle according to the filtering angular velocity integral conversion;

generating a current error amount according to the difference value of the rotor angle and the filtering angle;

and carrying out error compensation on the filtering angle according to the current error amount to obtain a final angle after filtering and error correction.

A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:

obtaining a rotor angle;

generating a direct current angular velocity according to the rotor angle differential conversion;

filtering the direct current angular velocity to obtain a filtering angular velocity;

generating a filtering angle according to the filtering angular velocity integral conversion;

generating a current error amount according to the difference value of the rotor angle and the filtering angle;

and carrying out error compensation on the filtering angle according to the current error amount to obtain a final angle after filtering and error correction.

The motor angle error correction method, the motor angle error correction device, the computer equipment and the storage medium comprise the following steps: obtaining a rotor angle; generating a direct current angular velocity according to the rotor angle differential conversion; filtering the direct current angular velocity to obtain a filtering angular velocity; generating a filtering angle according to the filtering angular velocity integral conversion; generating a current error amount according to the difference value of the rotor angle and the filtering angle; and carrying out error compensation on the filtering angle according to the current error amount to obtain a final angle after filtering and error correction. According to the method, the obtained rotor angle is subjected to filtering processing and correction compensation processing, so that the anti-interference capacity of the obtained angle signal is improved, the angle error is ensured to be within a control range, and the stability of the motor during control is improved.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.

FIG. 1 is a schematic flow chart illustrating a method for correcting an angle error of a motor according to an embodiment;

FIG. 2 is a waveform illustrating encoder feedback rotor angle in one embodiment;

FIG. 3 is a schematic diagram of a motor angle error correction method according to an embodiment;

FIG. 4 is a comparison of waveforms before and after error compensation in one embodiment;

FIG. 5 is a waveform illustrating the effect of interference glitches on the rotor angle signal in one embodiment;

FIG. 6 is a waveform illustrating the effect of eliminating interference spikes in a rotor angle signal according to an embodiment;

FIG. 7 is a block diagram of an embodiment of a motor angle error correction apparatus;

FIG. 8 is a diagram illustrating an internal structure of a computer device according to an embodiment.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

In an embodiment, fig. 1 is a schematic flow chart of a motor angle error correction method in an embodiment, and referring to fig. 1, the embodiment provides a motor angle error correction method, which specifically includes the following steps:

step S210, a rotor angle is acquired.

In this embodiment, FIG. 2 is a waveform diagram of the feedback rotor angle of the encoder according to an embodiment, and the rotor angle θ is obtained according to the encoderencRotor angle theta during the rotation of the motorencThe output signal is sawtooth wave-shaped in a digital system due to the limited number of bits of the encoder variable, as shown in fig. 2, wherein the abscissa is time and the ordinate is the rotor angle (amplified by 1000 times), so that the accuracy of the output rotor angle is not high and quantization error exists.

And step S220, generating a direct current angular velocity according to the rotor angle differential conversion.

In this embodiment, in order to improve the anti-interference capability of the encoder for feeding back the rotor angle, the rotor angle signal needs to be filtered, but since the rotor angle is a time-varying signal of a sawtooth wave, the direct filtering thereof may generate attenuation of a phase and an amplitude, and particularly, a position where a numerical range overflows is subjected to an abrupt change of inversion, as shown in fig. 2, a large deviation before and after the filtering results in a serious distortion of the signal, which cannot be used.

Using rotor angle thetaencWith a direct angular velocity omegaencA differential relationship between them, a rotor angle theta of a sawtooth wave shapeencPerforming differential calculation to convert into DC angular velocity omega capable of being filteredenc

And step S230, filtering the direct current angular velocity to obtain a filtered angular velocity.

In the present embodiment, the differentiated dc angular velocity ω is measuredencLow-pass filtering is carried out to eliminate interference burrs in the rotor angle signal and avoid the phenomenon of signal distortion caused by overlarge deviation before and after filtering, and the filtering angular velocity omega is obtainedenc_fit

And step S240, generating a filtering angle according to the filtering angular velocity integral conversion.

In this embodiment, the filtered angular velocity ω obtained after the filtering process is further processedenc_fitThe integral is converted into a filtered filtering angle corresponding to the rotor angleThereby adjusting the rotor angle thetaencThe signal is filtered to obtain a filtered filtering angle

And step S250, generating a current error amount according to the difference value of the rotor angle and the filtering angle.

In the present embodiment, i.e. the current error amount is

And step S260, carrying out error compensation on the filtering angle according to the current error amount to obtain a final angle after filtering and error correction.

In the present embodiment, the current error amount θ is usederFor the filtering angleError compensation is carried out to ensure that the angle error is within the control range, and the final angle theta after the filtering error correction is obtainedest

Specifically, fig. 3 is a schematic diagram illustrating a principle of a motor angle error correction method according to an embodiment, as shown in fig. 3, for obtaining a rotor angle θ according to an encoderencRotor angle theta during the rotation of the motorencThe variable is a variable which changes along with time, and in a digital system, because the number of bits of the variable is limited, the output signal is in a sawtooth wave shape, so the accuracy of the output rotor angle is not high, and a quantization error exists. And generating the direct current angular speed according to the rotor angle differential conversion. Using rotor angle thetaencWith a direct angular velocity omegaencA differential relationship between them, a rotor angle theta of a sawtooth wave shapeencPerforming a differential calculationConverted into a DC angular velocity omega capable of being filteredencAnd interference burrs exist in the obtained direct current angular velocity signal. For the differentiated DC angular velocity omegaencLow-pass filtering is carried out to eliminate interference burrs in the rotor angle signal and avoid the phenomenon of signal distortion caused by overlarge deviation before and after filtering, and the filtering angular velocity omega is obtainedenc_fit. Then the filtering angular velocity omega obtained after filtering processingenc_fitThe integral is converted into a filtered filtering angle corresponding to the rotor angleThereby adjusting the rotor angle thetaencThe signal is filtered to obtain a filtered filtering angleAnd generating the current error amount according to the difference value of the rotor angle and the filtering angle. I.e. the current error amount isAccording to the current error amount thetaerFor the filtering angleError compensation is carried out to ensure that the angle error is within the control range, and the final angle theta after the error correction of the filter is obtainedest

Fig. 4 is a comparison graph of waveforms before and after error compensation in an embodiment, fig. 4 is a graph of a waveform obtained by cutting one of the sections from 0 to 360 ° in fig. 2 and amplifying the cut section, fig. 4 is a graph of a waveform with obvious step change in fig. 4, which is a feedback angle value of an encoder without filtering and error compensation.

In one embodiment, the current error amount is summed with the total error amount of the previous round to generate a current total error amount; generating an error correction quantity according to the comparison between the current error total quantity and a preset error range; generating a total error amount for error superposition in the next round according to the error correction amount and the current total error amount; and carrying out error compensation on the filtering angle according to the error correction quantity to obtain a final angle after filtering and error correction.

Specifically, the current error amount θ is seterTotal error amount theta 'generated from the previous wheel'errOverlapping to generate the total error thetaerrI.e. thetaerr=θ′errerThen, the current error total amount theta is calculatederrWithin a predetermined error range of [ -theta [ ]min,θmin]Comparing the data to generate error correction amountAnd using said current error total thetaerrAnd error correction amountCalculating the difference value to generate the total error amount for the error superposition of the next round, namely the total error amount for the error superposition of the next round isAccording to the error correction amountFor the filtering angleError compensation is carried out to obtain a final angle after filtering and error correction, namely the final angle isAnd (4) superposing the errors obtained in each round, and then performing correction compensation to eliminate the quantization error and improve the accuracy of the encoder for feeding back the rotor angle.

In one embodiment, when the current error total amount exceeds the preset error range, an error amount is generated according to the current error total amount and an upper limit value of the preset error range; and carrying out amplitude limiting processing on the error quantity to generate an error correction quantity.

Specifically, the current error total amount θerrWithin a predetermined error range of [ -theta [ ]min,θmin]Comparing, if the current error total thetaerrOut of a predetermined error range [ -theta ]min,θmin]Then sum the current error amount θerrOut of a predetermined error range [ -theta ]min,θmin]As the error amount Δ θerrI.e. Delta thetaerr=θerrminThe error amount Delta thetaerrIs limited to [ -theta ]max,θmax]Within the range, for the error amount Delta thetaerrPerforming amplitude limiting processing to obtain error correction amountThe error correction amountThe maximum value of (A) is theta obtained by calculating the maximum angular speed of the rotor of the systemmaxTo correct the errorTo the angle of filteringTo obtain the final angle ofTo ensure the final angle thetaestRotor angle theta fed back from encoderencIs within the control range.

Error correction amountWith the current error sum thetaerrIncrease but not more than theta at maximummax(ii) a With the current error sum thetaerrReduced to a minimum of not less than thetamin. By adjusting the amount of error correctionThe strength of the anti-interference capability is adjusted by the increase and decrease speed of the speed. Error correction amountThe increase/decrease speed of the error correction unit is determined according to a preset deviation range set by the system, and when the preset deviation range set by the system is smaller, the current error total theta needs to be accelerated and offseterrWithin the preset deviation range, the error correction amountThe larger the increasing and decreasing speed is, the better the ability of the encoder to feed back the angle is, and the weaker the anti-interference ability of the encoder to feed back the angle is; when the preset deviation range set by the system is larger, the error correction quantity is increasedThe smaller the increase and decrease speed is, the stronger the anti-interference capability of the feedback angle of the encoder is. The error correction amountIt should be the result of the preset deviation range and the equalization of the anti-interference capability.

In one embodiment, when the current total error amount is within the preset error range, the error correction amount is zero.

Specifically, if the current error total amount θerrWithin a preset error range of [ -theta [ ]min,θmin]When the error is within the range, the error compensation process is not needed, and the error compensation quantityThe total error amount for the next round of error superposition is equal to the current total error amount.

Figure 5 is a waveform diagram illustrating the effect of interference spikes on the rotor angle signal in one embodiment,

FIG. 6 is a waveform diagram illustrating the effect of eliminating interference glitches in the rotor angle signal according to an embodiment, and comparing FIG. 5 with FIG. 6, it can be seen that the filtering process attenuates the interference signal to the final angle θestAccording to the method, the anti-interference capability of the encoder for feeding back the rotor angle signal is improved, and the stability of motor control is improved.

Fig. 1 is a schematic flow chart of a motor angle error correction method in an embodiment. It should be understood that, although the steps in the flowchart of fig. 1 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 1 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

In an embodiment, fig. 7 is a block diagram illustrating a structure of an apparatus for correcting an angle error of a motor according to an embodiment, and referring to fig. 7, the embodiment provides an apparatus for correcting an angle error of a motor, the apparatus including:

an encoder module 310 for obtaining a rotor angle;

a conversion module 320, configured to generate a dc angular velocity according to the rotor angle differential conversion;

the filtering module 330 is configured to perform filtering processing on the direct current angular velocity to obtain a filtered angular velocity;

the inverse conversion module 340 is configured to generate a filtering angle according to the filtering angular velocity integral conversion;

a difference generating module 350, configured to generate a current error amount according to a difference between the rotor angle and the filtering angle;

and an error compensation module 360, configured to perform error compensation on the filtering angle according to the current error amount, so as to obtain a final angle after filtering and error correction.

In one embodiment, the error compensation module 360 includes:

the difference value superposition unit is used for summing the current error amount and the error total amount of the previous round to generate the current error total amount;

the difference value judging unit is used for generating an error correction amount according to the comparison between the current error total amount and a preset error range;

the difference value accumulation unit is used for generating the error total amount for error superposition in the next round according to the error correction amount and the current error total amount;

and the error compensation unit is used for carrying out error compensation on the filtering angle according to the error correction quantity to obtain a final angle after filtering and error correction.

In one embodiment, the difference value judging unit includes:

the error over-value unit is used for generating an error amount according to the current error total amount and an upper limit value of the preset error range when the current error total amount exceeds the preset error range;

and the amplitude limiting unit is used for carrying out amplitude limiting processing on the error quantity to generate an error correction quantity.

In one embodiment, the difference determining unit further includes:

and the non-exceeding unit is used for enabling the error correction quantity to be zero when the total error quantity is within the preset error range.

In one embodiment, the motor angle error correction apparatus provided in the present application may be implemented in the form of a computer program that is executable on a computer device such as the one shown in fig. 8. The computer device may be embodied as, but not limited to, an embedded device including an embedded system and an execution apparatus, or an industrial personal computer device. The computer device shown includes an input device, an output device, a processor, and a memory. Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components. The memory of the computer device may store various program modules constituting the motor angle error correction apparatus, such as an encoder module 310, a conversion module 320, a filtering module 330, an inverse conversion module 340, a difference value generation module 350, and an error compensation module 360 shown in fig. 7. The respective program modules constitute computer programs that cause the processor to execute the steps in the motor angle error correction methods of the respective embodiments of the present application described in the present specification.

For example, the computer apparatus shown in fig. 8 may perform the obtaining of the rotor angle by the encoder module 310 in the motor angle error correction apparatus shown in fig. 7. The computer device may generate the dc angular velocity by performing a differential conversion from the rotor angle by a conversion module 320. The computer device may perform filtering processing on the direct current angular velocity through the filtering module 330 to obtain a filtering angular velocity. The computer device may perform an integral transformation from the filtered angular velocity to generate a filtered angle by the inverse transformation module 340. The computer device may perform generating a current error amount according to the difference of the rotor angle and the filtering angle through the difference generation module 350. The computer device may perform error compensation on the filtering angle according to the current error amount through the error compensation module 360 to obtain a final angle after filtering and error correction.

In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:

obtaining a rotor angle;

generating a direct current angular velocity according to the rotor angle differential conversion;

filtering the direct current angular velocity to obtain a filtering angular velocity;

generating a filtering angle according to the filtering angular velocity integral conversion;

generating a current error amount according to the difference value of the rotor angle and the filtering angle;

and carrying out error compensation on the filtering angle according to the current error amount to obtain a final angle after filtering and error correction.

In one embodiment, the processor, when executing the computer program, further performs the steps of: summing the current error amount and the error total amount of the previous round to generate the current error total amount; generating an error correction quantity according to the comparison between the current error total quantity and a preset error range; generating a total error amount for error superposition in the next round according to the error correction amount and the current total error amount; and carrying out error compensation on the filtering angle according to the error correction quantity to obtain a final angle after filtering and error correction.

In one embodiment, the processor, when executing the computer program, further performs the steps of: when the current error total amount exceeds the preset error range, generating an error amount according to the current error total amount and an upper limit value of the preset error range; and carrying out amplitude limiting processing on the error quantity to generate an error correction quantity.

In one embodiment, the processor, when executing the computer program, further performs the steps of: and when the total error amount is within the preset error range, the error correction amount is zero.

In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:

obtaining a rotor angle;

generating a direct current angular velocity according to the rotor angle differential conversion;

filtering the direct current angular velocity to obtain a filtering angular velocity;

generating a filtering angle according to the filtering angular velocity integral conversion;

generating a current error amount according to the difference value of the rotor angle and the filtering angle;

and carrying out error compensation on the filtering angle according to the current error amount to obtain a final angle after filtering and error correction.

In one embodiment, the computer program when executed by the processor further performs the steps of: summing the current error amount and the error total amount of the previous round to generate the current error total amount; generating an error correction quantity according to the comparison between the current error total quantity and a preset error range; generating a total error amount for error superposition in the next round according to the error correction amount and the current total error amount; and carrying out error compensation on the filtering angle according to the error correction quantity to obtain a final angle after filtering and error correction.

In one embodiment, the computer program when executed by the processor further performs the steps of: when the current error total amount exceeds the preset error range, generating an error amount according to the current error total amount and an upper limit value of the preset error range; and carrying out amplitude limiting processing on the error quantity to generate an error correction quantity.

In one embodiment, the computer program when executed by the processor further performs the steps of: and when the total error amount is within the preset error range, the error correction amount is zero.

It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:双电枢绕组多重电磁转矩单定子单转子磁阻电机控制器及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!