CN111404435A - Motor angle error correction method and device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN111404435A
CN111404435A CN202010158267.9A CN202010158267A CN111404435A CN 111404435 A CN111404435 A CN 111404435A CN 202010158267 A CN202010158267 A CN 202010158267A CN 111404435 A CN111404435 A CN 111404435A
Authority
CN
China
Prior art keywords
error
filtering
angle
amount
current
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.)
Granted
Application number
CN202010158267.9A
Other languages
Chinese (zh)
Other versions
CN111404435B (en
Inventor
骆鹏
黎国才
王剑卿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Weichuang Electrical Technology Co ltd
Original Assignee
Suzhou Weichuang Electrical Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Weichuang Electrical Technology Co ltd filed Critical Suzhou Weichuang Electrical Technology Co ltd
Priority to CN202010158267.9A priority Critical patent/CN111404435B/en
Publication of CN111404435A publication Critical patent/CN111404435A/en
Application granted granted Critical
Publication of CN111404435B publication Critical patent/CN111404435B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Control Of Motors That Do Not Use Commutators (AREA)
  • Control Of Ac Motors In General (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

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.

Description

Motor angle error correction method and device, computer equipment and storage medium
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 angle
Figure BDA0002404865170000061
Thereby adjusting the rotor angle thetaencThe signal is filtered to obtain a filtered filtering angle
Figure BDA0002404865170000062
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
Figure BDA0002404865170000063
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 angle
Figure BDA0002404865170000064
Error 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 angle
Figure BDA0002404865170000071
Thereby adjusting the rotor angle thetaencThe signal is filtered to obtain a filtered filtering angle
Figure BDA0002404865170000072
And generating the current error amount according to the difference value of the rotor angle and the filtering angle. I.e. the current error amount is
Figure BDA0002404865170000073
According to the current error amount thetaerFor the filtering angle
Figure BDA0002404865170000074
Error 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 amount
Figure BDA0002404865170000081
And using said current error total thetaerrAnd error correction amount
Figure BDA0002404865170000082
Calculating 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 is
Figure BDA0002404865170000083
According to the error correction amount
Figure BDA0002404865170000084
For the filtering angle
Figure BDA0002404865170000085
Error compensation is carried out to obtain a final angle after filtering and error correction, namely the final angle is
Figure BDA0002404865170000086
And (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 amount
Figure BDA0002404865170000087
The error correction amount
Figure BDA0002404865170000088
The maximum value of (A) is theta obtained by calculating the maximum angular speed of the rotor of the systemmaxTo correct the error
Figure BDA0002404865170000089
To the angle of filtering
Figure BDA00024048651700000810
To obtain the final angle of
Figure BDA00024048651700000811
To ensure the final angle thetaestRotor angle theta fed back from encoderencIs within the control range.
Error correction amount
Figure BDA00024048651700000812
With 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 correction
Figure BDA0002404865170000091
The strength of the anti-interference capability is adjusted by the increase and decrease speed of the speed. Error correction amount
Figure BDA0002404865170000092
The 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 amount
Figure BDA0002404865170000093
The 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 increased
Figure BDA0002404865170000094
The smaller the increase and decrease speed is, the stronger the anti-interference capability of the feedback angle of the encoder is. The error correction amount
Figure BDA0002404865170000095
It 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 quantity
Figure BDA0002404865170000096
The 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.

Claims (10)

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.
CN202010158267.9A 2020-03-09 2020-03-09 Motor angle error correction method and device, computer equipment and storage medium Active CN111404435B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010158267.9A CN111404435B (en) 2020-03-09 2020-03-09 Motor angle error correction method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010158267.9A CN111404435B (en) 2020-03-09 2020-03-09 Motor angle error correction method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111404435A true CN111404435A (en) 2020-07-10
CN111404435B CN111404435B (en) 2022-05-10

Family

ID=71430613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010158267.9A Active CN111404435B (en) 2020-03-09 2020-03-09 Motor angle error correction method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111404435B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101433887A (en) * 2008-12-16 2009-05-20 奇瑞汽车股份有限公司 Glue coating apparatus for glass of entire vehicle and method for producing glue
CN104682786A (en) * 2013-11-27 2015-06-03 罗伯特·博世有限公司 Method And Device For Determining Position Data Of Rotor Of Motor
CN106415209A (en) * 2014-08-08 2017-02-15 日本精工株式会社 Angle detection device, and motor, torque sensor, electric power steering apparatus, and automobile provided with said angle detection device
CN108435856A (en) * 2018-04-13 2018-08-24 吉林长光启元自动化控制有限公司 Slider of bender location compensation method, system, equipment and digital control system
CN108631679A (en) * 2017-03-24 2018-10-09 湖南中车时代电动汽车股份有限公司 A kind of position signal filtering method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101433887A (en) * 2008-12-16 2009-05-20 奇瑞汽车股份有限公司 Glue coating apparatus for glass of entire vehicle and method for producing glue
CN104682786A (en) * 2013-11-27 2015-06-03 罗伯特·博世有限公司 Method And Device For Determining Position Data Of Rotor Of Motor
CN106415209A (en) * 2014-08-08 2017-02-15 日本精工株式会社 Angle detection device, and motor, torque sensor, electric power steering apparatus, and automobile provided with said angle detection device
CN108631679A (en) * 2017-03-24 2018-10-09 湖南中车时代电动汽车股份有限公司 A kind of position signal filtering method and system
CN108435856A (en) * 2018-04-13 2018-08-24 吉林长光启元自动化控制有限公司 Slider of bender location compensation method, system, equipment and digital control system

Also Published As

Publication number Publication date
CN111404435B (en) 2022-05-10

Similar Documents

Publication Publication Date Title
JP4502734B2 (en) Origin offset amount calculation method for motor rotational position detection device and motor control device using this calculation method
US5309075A (en) Digital servo-control apparatus for preventing torque variations
JP5660381B2 (en) Rotation angle detector
WO2002038332A1 (en) Servocontrol device
CN107769653B (en) Apparatus and method for estimating rotor angle in electric machine
CN111295832B (en) Motor control device and electric power steering device
JP4940411B2 (en) Analog angle sensor accuracy correction program, correction method, recording medium, and servo driver
CN111404435B (en) Motor angle error correction method and device, computer equipment and storage medium
JP7066306B2 (en) A rotation angle detection device and an electric power steering device including the rotation angle detection device.
JP4940720B2 (en) Road reaction force estimation device
JP5523414B2 (en) AC motor control device
CN113196643B (en) Motor control device, electric actuator product, and electric power steering device
JP2005257565A (en) Resolver digital angle conversion device, method, and program
JP6854841B2 (en) Angle detector
JP4144018B2 (en) Torque ripple reduction device
CN111224599B (en) Control method of permanent magnet auxiliary synchronous reluctance motor
CN109724335B (en) Method and device for suppressing fluctuation of rotation speed of compressor
WO2020194637A1 (en) Control method and control device for electric vehicle
JP3818237B2 (en) Control device for synchronous motor
US11837979B2 (en) Electric motor control device and electric power steering apparatus using the same
JP2018029414A (en) Motor control device, motor control system, image forming apparatus, and conveying device
JP7200560B2 (en) Servo controller and servo system
JP2008209967A (en) Feedback controller and feedback control method
CN113691169A (en) Motor rotor position detection method and device and motor controller
JP2634333B2 (en) Induction motor control device

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
GR01 Patent grant
GR01 Patent grant