A kind ofly obtain motor rotor position, the method for speed and device
Technical field
The present invention relates to the control technology field of permagnetic synchronous motor.Specifically, relate to and a kind ofly obtain motor rotor position, the method for speed and device.
Background technology
Along with modern power electronics technology, microelectric technique, the raising of motor process technology and the develop rapidly of modern control theory, the permagnetic synchronous motor (PMSM, PermanentMagnet Synchronous Motor) of high power density, high reliability is applied to the every field such as military affairs, industry and daily life more and more.In the control system of permagnetic synchronous motor, need position and the rotating speed of Real-time Obtaining rotor, to realize the oriented control in magnetic field.
In prior art, Hall element or resolver is normally utilized to detect in real time motor rotor position, as shown in Figure 1, but because the signal that Hall element or resolver export is all the sinusoidal sin θ relevant to rotor position and cosine con θ, when carrying out rotor position and calculating, need to obtain rotor position according to above-mentioned sinusoidal sin θ and cosine con θ by arctangent computation; Then differential calculation is carried out to the motor rotor position θ calculated just can obtain rotor rotational speed omega then.But because arc tangent and differential calculation have, speed is slow, the defect of low precision, causes the control performance of current permagnetic synchronous motor and job stability all poor.
Summary of the invention
For this reason, technical problem to be solved by this invention is to need in prior art could obtain motor rotor position by arc tangent and differential calculation, computational speed is slow, low precision, cause the control performance of motor and job stability all poor, thus provide that a kind of speed is fast, precision is high, and the acquisition motor rotor position of Electric Machine Control performance and job stability and the method for speed can be improved.
For solving the problems of the technologies described above, technical scheme of the present invention is as follows:
Obtain a method for motor rotor position and speed, comprising:
Obtain rotor angular acceleration
calc;
Obtain rotor angle of electric machine acceleration bias α
err;
According to described rotor angular acceleration
calcwith described rotor angle of electric machine acceleration bias α
err, obtain rotor angle of electric machine acceleration correction value α
pll;
According to described rotor angle of electric machine acceleration correction value α
pllobtain motor rotor speed ω
pllwith motor rotor position θ
pll.
In said method, described acquisition rotor angular acceleration
calccomprise:
Obtain Motor torque Tq
calc;
Obtain motor speed moment of inertia J;
By described Motor torque Tq
calcbe divided by with described motor speed moment of inertia J, obtain rotor angular acceleration
calc.
In said method, described acquisition Motor torque Tq
calc, comprise,
Following formulae discovery is adopted to obtain Motor torque:
Wherein, i
dand i
qbe respectively d-axis actual current and quadrature axis actual current, Tq
calcfor the actual torque of motor, L
dand L
qbe respectively d-axis inductance and quadrature axis inductance, p is the number of pole-pairs of motor, ψ
mfor rotor permanent magnet flux linkage.
In said method, described acquisition rotor angle of electric machine acceleration bias α
errcomprise:
Obtained the motor rotor position θ in a upper cycle
pll, and calculate cos (θ
pLL) and sin (θ
pLL) value;
Obtain the sin (θ of sensor measurement
mean) and cos (θ
mean) value;
According to cos (θ
pLL), sin (θ
pLL), sin (θ
mean), cos (θ
mean) obtain the first deviation θ
err;
To described first deviation θ
errcarry out PID control, obtain rotor angle of electric machine acceleration bias α
err.
In said method, described according to cos (θ
pLL), sin (θ
pLL), sin (θ
mean), cos (θ
mean) obtain the first deviation θ
errcomprise:
Following formulae discovery is adopted to obtain the first deviation θ
err:
θ
err=sin(θ
mean)*cos(θ
PLL)-cos(θ
mean)*sin(θ
PLL)。
In said method, the motor rotor position θ in a cycle in described acquisition
pll, and calculate cos (θ
pLL) and sin (θ
pLL) value, comprise and calculate cos (θ by phase-locked loop
pLL) and sin (θ
pLL) value.
In said method, described according to described rotor angular acceleration
calcwith described rotor angle of electric machine acceleration bias α
err, obtain rotor angle of electric machine acceleration correction value α
pllcomprise:
By described rotor angular acceleration
calcwith described rotor angle of electric machine acceleration bias α
errbe added;
To α
calc+ α
errcarry out low-pass filtering treatment, obtain rotor angle of electric machine acceleration correction value α
pll.
In said method, described according to described rotor angle of electric machine acceleration correction value α
pllobtain motor rotor speed ω
pllwith motor rotor position θ
pllcomprise:
To described rotor angle of electric machine acceleration correction value α
pllcarry out integration, obtain motor rotor speed ω
pll;
To described motor rotor speed ω
pllcarry out integration, obtain motor rotor position θ
pll.
Obtain a device for motor rotor position and speed, comprising:
Angular acceleration acquiring unit, for obtaining rotor angular acceleration
calc;
Deviation acquiring unit, for obtaining rotor angle of electric machine acceleration bias α
err;
Correction value acquiring unit, for according to described rotor angular acceleration
calcwith described rotor angle of electric machine acceleration bias α
err, obtain rotor angle of electric machine acceleration correction value α
pll;
Velocity location acquiring unit, for according to described rotor angle of electric machine acceleration correction value α
pllobtain motor rotor speed ω
pllwith motor rotor position θ
pll.
In said apparatus, described angular acceleration acquiring unit comprises:
Moment of torsion obtains subelement, for obtaining Motor torque Tq
calc;
Inertia obtains subelement, for obtaining motor speed moment of inertia J;
Angular acceleration computation subunit, for by described Motor torque Tq
calcbe divided by with described motor speed moment of inertia J, obtain rotor angular acceleration
calc.
In said apparatus, described moment of torsion obtains subelement, adopts following formulae discovery to obtain Motor torque Tq
calc:
Wherein, i
dand i
qbe respectively d-axis actual current and quadrature axis actual current, Tq
calcfor the actual torque of motor, L
dand L
qbe respectively d-axis inductance and quadrature axis inductance, p is the number of pole-pairs of motor, ψ
mfor rotor permanent magnet flux linkage.
In said apparatus, described deviation acquiring unit comprises:
Rotor-position introduces subelement, for obtaining the motor rotor position θ in a upper cycle
pll, and calculate cos (θ
pLL) and sin (θ
pLL) value;
Sensor values introduces subelement, for obtaining the sin (θ of sensor measurement
mean) and cos (θ
mean) value;
First deviation obtains subelement, for according to cos (θ
pLL), sin (θ
pLL), sin (θ
mean), cos (θ
mean) obtain the first deviation θ
err;
Deviation computation subunit, for described first deviation θ
errcarry out PID control, obtain rotor angle of electric machine acceleration bias α
err.
In said apparatus, described first deviation obtains subelement, adopts following formulae discovery to obtain the first deviation θ
err:
θ
err=sin(θ
mean)*cos(θ
PLL)-cos(θ
mean)*sin(θ
PLL)。
In said apparatus, described correction value acquiring unit comprises:
Superposition subelement, for by described rotor angular acceleration
calcwith described rotor angle of electric machine acceleration bias α
errbe added;
Filtering subelement, for α
calc+ α
errcarry out low-pass filtering treatment, obtain rotor angle of electric machine acceleration correction value α
pll.
In said apparatus, described velocity location acquiring unit comprises:
First integral subelement, for described rotor angle of electric machine acceleration correction value α
pllcarry out integration, obtain motor rotor speed ω
pll;
Second integral subelement, for described motor rotor speed ω
pllcarry out integration, obtain motor rotor position θ
pll.
Technique scheme of the present invention has the following advantages compared to existing technology:
(1) method of acquisition motor rotor position of the present invention, speed and device, by obtaining rotor angular acceleration, obtaining rotor angle of electric machine acceleration bias, afterwards according to rotor angular acceleration and rotor angle of electric machine acceleration bias, just can obtain rotor angle of electric machine acceleration correction value, just can obtain motor rotor speed and motor rotor position according to rotor angle of electric machine acceleration correction value.Without the need to obtaining motor rotor position by arc tangent and differential calculation, computational speed is fast, and precision is high, makes the control performance of motor more stable.
(2) method of acquisition motor rotor position of the present invention, speed and device, to α
calc+ α
erradopt low-pass filtering treatment, reduce noise effect, therefore the input of sine, consine signal there is no need directly to carry out low pass filtered process again, This further reduces the time that execution algorithm consumes.
(3) method of acquisition motor rotor position of the present invention, speed and device, because the calculating of speed have employed identical sampling rate with position signalling, therefore phase shifts when speed calculates will be reduced, make the synchronism of motor speed and position better, the control effects of whole system is also better.
(4) method of acquisition motor rotor position of the present invention, speed and device, do not relate to and differentiate, although therefore employ high speed acquisition speed, noise effect when speed calculates also can significantly reduce.
Accompanying drawing explanation
In order to make content of the present invention be more likely to be clearly understood, below according to a particular embodiment of the invention and by reference to the accompanying drawings, the present invention is further detailed explanation, wherein
Fig. 1 is the involved whole control scheme schematic diagram of existing acquisition motor rotor position, speed method;
Fig. 2 is the whole control scheme schematic diagram that the present invention obtains involved by motor rotor position, speed method;
Fig. 3 the present invention obtains the flow chart of method of motor rotor position, speed;
Fig. 4 is that the present invention obtains the flow chart obtaining rotor angular acceleration in the method for motor rotor position, speed;
Fig. 5 is that the present invention obtains the flow chart obtaining rotor angle of electric machine acceleration bias in the method for motor rotor position, speed;
Fig. 6 is that the present invention obtains the flow chart obtaining rotor angle of electric machine acceleration correction value in the method for motor rotor position, speed according to rotor angular acceleration and rotor angle of electric machine acceleration bias;
Fig. 7 is that the present invention obtains the flow chart obtaining motor rotor speed and motor rotor position in the method for motor rotor position, speed according to rotor angle of electric machine acceleration correction value;
Fig. 8 be the present invention obtain motor rotor position, speed method entirety control schematic diagram;
Fig. 9 is the structured flowchart of device that the present invention obtains motor rotor position, speed.
In figure, Reference numeral is expressed as: 1-angular acceleration acquiring unit, 2-deviation acquiring unit, 3-correction value acquiring unit, 4-velocity location acquiring unit, 11-moment of torsion obtains subelement, and 12-inertia obtains subelement, 13-angular acceleration computation subunit, 21-rotor-position introduces subelement, and 22-sensor values introduces subelement, 23-first deviation obtains subelement, 24-deviation computation subunit, 31-superposes subelement, 32-filtering subelement, 41-first integral subelement, 42-second integral subelement.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
As shown in Figure 2, be obtain motor rotor position, whole control scheme schematic diagram involved by speed method.In fig. 2, i
aand i
ca phase current and C phase current respectively; i
dand i
qd-axis actual current and quadrature axis actual current respectively.
Present embodiments provide a kind of method obtaining motor rotor position, speed, as shown in Figure 3, comprising:
S1. rotor angular acceleration is obtained
calc;
S2. rotor angle of electric machine acceleration bias α is obtained
err;
S3. according to described rotor angular acceleration
calcwith described rotor angle of electric machine acceleration bias α
err, obtain rotor angle of electric machine acceleration correction value α
pll;
S4. according to described rotor angle of electric machine acceleration correction value α
pllobtain motor rotor speed ω
pllwith motor rotor position θ
pll.
Preferably, as shown in Fig. 4, Fig. 8, described acquisition rotor angular acceleration
calccan comprise:
S11. Motor torque Tq is obtained
calc;
S12. motor speed moment of inertia J is obtained;
S13. by described Motor torque Tq
calcbe divided by with described motor speed moment of inertia J, obtain rotor angular acceleration
calc.
Preferably, described acquisition Motor torque Tq
calc, can comprise:
Following formulae discovery is adopted to obtain Motor torque:
Wherein, i
dand i
qbe respectively d-axis actual current and quadrature axis actual current, Tq
calcfor the actual torque of motor, L
dand L
qbe respectively d-axis inductance and quadrature axis inductance, p is the number of pole-pairs of motor, ψ
mfor rotor permanent magnet flux linkage.
Particularly, above-mentioned i
d, i
q, L
d, L
q, p and ψ
mall can from entire car controller Real-time Obtaining, motor speed moment of inertia J can calculate according to inertia calculation formula.
Preferably, as shown in Figure 5, Figure 8, described acquisition rotor angle of electric machine acceleration bias α
errcan comprise:
S21. the motor rotor position θ in a upper cycle was obtained
pll, and calculate cos (θ
pLL) and sin (θ
pLL) value;
S22. sin (the θ of sensor measurement is obtained
mean) and cos (θ
mean) value;
S23. according to cos (θ
pLL), sin (θ
pLL), sin (θ
mean), cos (θ
mean) obtain the first deviation θ
err;
S24. to described first deviation θ
errcarry out PID control, obtain rotor angle of electric machine acceleration bias α
err.
Particularly, the motor rotor position θ in a upper cycle
pllcan obtain from phase-locked loop, because the negative-sequence current that the electric current flowing into phase-locked loop obtains after filtering process is the rotatory current vector of rotor-position angle function, by heterodyne method structure rotor-position angle error, by phase-locked loop adjusting position angle error to 0, just can make observation bit angle setting tracking motor rotor position angle always, thus extract motor rotor position θ
pll, by the motor rotor position θ in a upper cycle
pllcirculation substitutes into the calculating in next cycle, just can Real-time Obtaining to new rotor angle of electric machine acceleration bias α
err, afterwards according to rotor angular acceleration
calcwith rotor angle of electric machine acceleration bias α
err, just can be real-time obtain rotor angle of electric machine acceleration correction value α
pll, and accordingly Real-time Obtaining to motor rotor speed ω
pllwith motor rotor position θ
pll.
Cos (θ
pLL) and sin (θ
pLL) value calculated by phase-locked loop, sin (θ
mean) and cos (θ
mean) can directly obtain, then according to cos (θ from transducer
pLL), sin (θ
pLL), sin (θ
mean), cos (θ
mean) just can obtain the first deviation θ
err, to described first deviation θ
errcarry out PID control, just can obtain rotor angle of electric machine acceleration bias α
err.
To described first deviation θ
errpID (ratio (Proportion), integration (Integration), differential (Differentiation)) controller can be passed through and PID control is carried out to it, therefrom by PID controller output motor rotor angle acceleration bias α
err.
Preferably, as shown in Figure 8, described according to cos (θ
pLL), sin (θ
pLL), sin (θ
mean), cos (θ
mean) obtain the first deviation θ
errcan comprise:
Following formulae discovery is adopted to obtain the first deviation θ
err:
θ
err=sin(θ
mean)*cos(θ
PLL)-cos(θ
mean)*sin(θ
PLL)。The amount of calculation of above-mentioned calculating is very little, can obtain the first deviation θ very efficiently
err.
Preferably, as shown in Fig. 6, Fig. 8, described according to described rotor angular acceleration
calcwith described rotor angle of electric machine acceleration bias α
err, obtain rotor angle of electric machine acceleration correction value α
pllcan comprise:
S31. by described rotor angular acceleration
calcwith described rotor angle of electric machine acceleration bias α
errbe added;
S32. to α
calc+ α
errcarry out low-pass filtering treatment, obtain rotor angle of electric machine acceleration correction value α
pll.
Particularly, by by rotor angular acceleration
calcwith rotor angle of electric machine acceleration bias α
errcarry out low-pass filtering treatment after superposition, can filtering noise, make the rotor angle of electric machine acceleration correction value α obtained
pllmore accurate.
Preferably, as shown in Figure 7, Figure 8, described according to described rotor angle of electric machine acceleration correction value α
pllobtain motor rotor speed ω
pllwith motor rotor position θ
pllcan comprise:
S41. to described rotor angle of electric machine acceleration correction value α
pllcarry out integration, obtain motor rotor speed ω
pll;
S42. to described motor rotor speed ω
pllcarry out integration, obtain motor rotor speed ω
pll.
Particularly, just by rotor angle acceleration correction value α
pllcarry out integration, just can obtain motor rotor speed ω
pll, just by motor rotor speed ω
pllcarry out integration, just can obtain motor rotor position θ
pll, without the need to carrying out the calculating of arc tangent and differential, greatly reducing amount of calculation, improve computational speed and precision.
By the motor rotor speed ω obtained
pllwith motor rotor speed ω
pllfeed back to entire car controller, the rotating speed of motor is adjusted accordingly, the oriented control in magnetic field can well be realized, ensure that the even running of permagnetic synchronous motor, be conducive to the running efficiency improving permagnetic synchronous motor, reduce energy consumption.
The present embodiment additionally provides a kind of device obtaining motor rotor position and speed, as shown in Figure 9, comprising:
Angular acceleration acquiring unit 1, for obtaining rotor angular acceleration
calc;
Deviation acquiring unit 2, for obtaining rotor angle of electric machine acceleration bias α
err;
Correction value acquiring unit 3, for according to described rotor angular acceleration
calcwith described rotor angle of electric machine acceleration bias α
err, obtain rotor angle of electric machine acceleration correction value α
pll;
Velocity location acquiring unit 4, for according to described rotor angle of electric machine acceleration correction value α
pllobtain motor rotor speed ω
pllwith motor rotor position θ
pll.
Preferably, described angular acceleration acquiring unit 1 can comprise:
Moment of torsion obtains subelement 11, for obtaining Motor torque Tq
calc;
Inertia obtains subelement 12, for obtaining motor speed moment of inertia J;
Angular acceleration computation subunit 13, for by described Motor torque Tq
calcbe divided by with described motor speed moment of inertia J, obtain rotor angular acceleration
calc.
Preferably, described moment of torsion obtains subelement 11, and following formulae discovery can be adopted to obtain Motor torque Tq
calc:
Wherein, i
dand i
qbe respectively d-axis actual current and quadrature axis actual current, Tq
calcfor the actual torque of motor, L
dand L
qbe respectively d-axis inductance and quadrature axis inductance, p is the number of pole-pairs of motor, ψ
mfor rotor permanent magnet flux linkage.
Preferably, described deviation acquiring unit 2 can comprise:
Rotor-position introduces subelement 21, for obtaining the motor rotor position θ in a upper cycle
pll, and calculate cos (θ
pLL) and sin (θ
pLL) value;
Sensor values introduces subelement 22, for obtaining the sin (θ of sensor measurement
mean) and cos (θ
mean) value;
First deviation obtains subelement 23, for according to cos (θ
pLL), sin (θ
pLL), sin (θ
mean), cos (θ
mean) obtain the first deviation θ
err;
Deviation computation subunit 24, for described first deviation θ
errcarry out PID control, obtain rotor angle of electric machine acceleration bias α
err.
Preferably, described first deviation obtains subelement 23, and following formulae discovery can be adopted to obtain the first deviation θ
err:
θ
err=sin(θ
mean)*cos(θ
PLL)-cos(θ
mean)*sin(θ
PLL)。
Preferably, described correction value acquiring unit 3 can comprise:
Superposition subelement 31, for by described rotor angular acceleration
calcwith described rotor angle of electric machine acceleration bias α
errbe added;
Filtering subelement 32, for α
calc+ α
errcarry out low-pass filtering treatment, obtain rotor angle of electric machine acceleration correction value α
pll.
Preferably, described velocity location acquiring unit 4 can comprise:
First integral subelement 41, for described rotor angle of electric machine acceleration correction value α
pllcarry out integration, obtain motor rotor speed ω
pll;
Second integral subelement 42, for described motor rotor speed ω
pllcarry out integration, obtain motor rotor position θ
pll.
Obtain the device of motor rotor position speed and speed described in the present embodiment, without the need to obtaining motor rotor position by arc tangent and differential calculation, computational speed is fast, and precision is high, makes the control performance of motor more stable.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the flow chart of the method for the embodiment of the present invention, equipment (system) and computer program and/or block diagram.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can being provided to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computer or other programmable data processing device produce device for realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices is provided for the step realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
Although describe the preferred embodiments of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the scope of the invention.