CN112104270B - Motor position obtaining method and motor control system - Google Patents

Motor position obtaining method and motor control system Download PDF

Info

Publication number
CN112104270B
CN112104270B CN202010884505.4A CN202010884505A CN112104270B CN 112104270 B CN112104270 B CN 112104270B CN 202010884505 A CN202010884505 A CN 202010884505A CN 112104270 B CN112104270 B CN 112104270B
Authority
CN
China
Prior art keywords
motor
sine
cosine
sampling
rotary transformer
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.)
Active
Application number
CN202010884505.4A
Other languages
Chinese (zh)
Other versions
CN112104270A (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.)
China Oilfield Services Ltd
China National Offshore Oil Corp CNOOC
Original Assignee
China Oilfield Services Ltd
China National Offshore Oil Corp CNOOC
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 China Oilfield Services Ltd, China National Offshore Oil Corp CNOOC filed Critical China Oilfield Services Ltd
Priority to CN202010884505.4A priority Critical patent/CN112104270B/en
Publication of CN112104270A publication Critical patent/CN112104270A/en
Application granted granted Critical
Publication of CN112104270B publication Critical patent/CN112104270B/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
    • H02P6/00Arrangements for controlling synchronous motors or other dynamo-electric motors using electronic commutation dependent on the rotor position; Electronic commutators therefor
    • H02P6/14Electronic commutators
    • H02P6/16Circuit arrangements for detecting position
    • 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
    • H02P23/00Arrangements or methods for the control of AC motors characterised by a control method other than vector control
    • H02P23/14Estimation or adaptation of motor parameters, e.g. rotor time constant, flux, speed, current or voltage

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

The embodiment of the application discloses a motor position obtaining method and a motor control system, wherein the method comprises the following steps: for each preset acquisition time period, performing the following operations: acquiring sine signals and cosine signals output by the rotary transformer by using N sampling points of the data acquisition card in the acquisition time period to obtain a sampling result, wherein N is determined by the length of the preset time period and the sampling frequency; respectively carrying out linear fitting by using the acquired N sampling results to obtain fitting functions of sine signals and cosine signals output by the rotary transformer; respectively determining the amplitudes of the sine signal and the cosine signal output by the corresponding rotary transformer according to the fitting function; and performing arc tangent calculation according to the determined amplitude to obtain the position information of the motor at the current moment. Through the scheme disclosed by the invention, the data acquisition card is utilized to acquire data and perform linear fitting on the acquired data, so that more accurate real-time position of the motor can be obtained.

Description

Motor position obtaining method and motor control system
Technical Field
The embodiment of the application relates to but is not limited to the field of well logging, in particular to a motor position obtaining method and a motor control system.
Background
The rotary transformer (which may be abbreviated as rotary transformer herein) has the advantages of vibration resistance, strong pollution resistance, and wide temperature working range as a position sensor, and can still stably work even in some severe environments such as deep sea and under oil wells. Therefore, in some extreme environments, more and more rotary transformers are used.
For this reason, many experts and scholars have conducted a great deal of research on how to read pulser motor position information from the resolver signal of the resolver. In some techniques, a method of acquiring the position of an unknown pulser motor: firstly, an RDC chip integration method is adopted, and secondly, data are acquired by using an acquisition card and then are processed and displayed by using a phase-locked loop.
The method comprises the following steps: the method for obtaining the position of the unknown pulser motor is to use an integrated rdc (resolver) chip.
The primary side of the motor integrated with the RDC chip inputs a sinusoidal signal generated by the chip, but the motor uses an internal self excitation signal, so that if the RDC chip is needed to measure and calculate the position of the motor, the self excitation signal of the synchronous motor and the signal generated by the RDC chip are needed, and the engineering difficulty of the signal synchronization problem is large.
The second method comprises the following steps: and after data acquisition is carried out by using the data acquisition card, data processing and display are carried out by using a phase-locked loop.
The phase-locked loop is adopted to carry out data calculation on the position, but the calculation mode of the phase-locked loop is quite sensitive to the phase difference of signals, and meanwhile, as the frequency of an excitation signal and the frequency of an output signal of a rotary transformer are higher, the phase difference is easy to influence the phase relation of the signals due to the problem of acquisition clock delay when the data acquisition card acquires the signals. Therefore, when data processing is performed, interpolation processing is performed on signals, which causes a problem that real-time processing is difficult and introduces a new error source to affect measurement accuracy.
Disclosure of Invention
The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
The disclosure provides a motor position acquisition method and a motor control system, which can acquire accurate real-time position information of a pulser motor.
The invention provides a motor position acquisition method, which is applied to an electrical system, wherein the electrical system comprises a motor and a rotary transformer, the rotary transformer is connected with a data acquisition card in parallel, and the method comprises the following steps:
for each preset acquisition time period, performing the following operations:
collecting sine signals and cosine signals output by the rotary transformer by using N sampling points of the data acquisition card in the current acquisition time period to obtain sampling results, wherein N is determined by the length of a preset time period and sampling frequency;
respectively carrying out linear fitting by using the acquired N sampling results to obtain fitting functions of sine signals and cosine signals output by the rotary transformer;
respectively determining the amplitudes of the sine signal and the cosine signal output by the corresponding rotary transformer according to the fitting function;
and performing arc tangent calculation according to the determined amplitude to obtain the position information of the motor at the current moment.
In an exemplary embodiment, the performing linear fitting by using the acquired N sampling results respectively to obtain a fitting function representing a sine signal and a cosine signal output by the resolver includes:
respectively utilizing the collected N sampling results, and performing linear fitting processing by adopting a generalized linear fitting algorithm and a preset fitting function;
respectively obtaining a fitting function of a corresponding sine signal and a fitting function of a corresponding cosine signal;
wherein the preset fitting function is as follows:
y=a0sin(ωt)+a1cos(ωt)+a2
wherein, in the fitting function, a0、a1And a2Is an unknown parameter; y denotes the Sampling result, ω denotes the frequency of the resolver excitation signal, Sampling rate denotes the Sampling frequency,
Figure BDA0002655145950000031
in an exemplary embodiment, the determining the amplitudes of the corresponding sine signal and cosine signal of the resolver output according to the fitting function includes:
respectively according to the parameters a of the determined fitting function0And a1Obtaining amplitudes of sine signals and cosine signals output by the rotary transformer according to an amplitude calculation formula;
wherein the amplitude calculation formula comprises:
Figure BDA0002655145950000032
or KTcos θ',
KTsin θ 'is the amplitude of the fitted resolver output sinusoidal signal, and KTcos θ' is the amplitude of the fitted resolver output sinusoidal signal.
In an exemplary embodiment, the performing an arc tangent calculation according to the determined amplitude to obtain the position information of the motor at the current time includes:
determining a quadrant of the position information theta of the current motor in a rectangular coordinate system according to the obtained positive and negative relations of the KTsin theta 'and the KTcos theta';
and performing arc tangent calculation on data obtained by dividing the KTsin theta 'and the KTcos theta', and determining the position information theta of the motor at the current moment.
In an exemplary embodiment, before the sampling result obtained by collecting the sine signal and the cosine signal output by the resolver by using the data collecting card at N sampling points in the present time period, the method further includes:
presetting acquisition parameters and an acquisition time period of the data acquisition card;
wherein the acquisition parameters include: sampling a clock source and sampling frequency;
the acquisition time period is five cycles of the resolver excitation signal.
The present disclosure also provides a motor control system, the control system including: the device comprises a motor, a rotary transformer, a data acquisition card and a processor, wherein the rotary transformer is connected with the acquisition card in parallel;
the motor is used for outputting sine waveform signals and cosine waveform signals;
the rotary transformer is used for monitoring sine waveform signals and cosine waveform signals output by the motor and outputting sine signals and cosine signals;
the data acquisition card is used for acquiring sine signals and cosine signals output by the rotary transformer according to a preset acquisition time period to obtain N sampling points in each acquisition time period as sampling results in the acquisition time period, wherein N is determined by the length of the preset time period and sampling frequency;
the processor is used for respectively executing the following operations aiming at each preset acquisition time period:
respectively carrying out linear fitting by utilizing the acquired N sampling results to obtain a fitting function representing sine signals and cosine signals output by the rotary transformer;
respectively determining the amplitudes of the sine signal and the cosine signal output by the corresponding rotary transformer according to the fitting function;
and performing arc tangent calculation according to the determined amplitude to obtain the position information of the motor at the current moment.
In an exemplary embodiment, the processor performs linear fitting using the acquired N sampling results to obtain a fitting function representing a sine signal and a cosine signal output by the resolver, and includes:
respectively utilizing the collected N sampling results, and performing linear fitting processing by adopting a generalized linear fitting algorithm and a preset fitting function;
respectively obtaining a fitting function of a corresponding sine signal and a fitting function of a corresponding cosine signal;
wherein the preset fitting function is as follows:
y=a0sin(ωt)+a1cos(ωt)+a2
wherein, in the fitting function, a0、a1And a2Is an unknown parameter; y denotes the Sampling result, ω denotes the frequency of the resolver excitation signal, Sampling rate denotes the Sampling frequency,
Figure BDA0002655145950000041
in an exemplary embodiment, the processor determines the amplitudes of the corresponding sine signal and cosine signal of the resolver output according to the fitting function, respectively, and includes:
respectively according to the parameters a of the determined fitting function0And a1Obtaining amplitudes of sine signals and cosine signals output by the rotary transformer according to an amplitude calculation formula;
wherein the amplitude calculation formula comprises:
Figure BDA0002655145950000051
or KTcos θ',
KTsin θ 'is the amplitude of the fitted resolver output sinusoidal signal, and KTcos θ' is the amplitude of the fitted resolver output sinusoidal signal.
In an exemplary embodiment, the performing an arc tangent calculation according to the determined amplitude to obtain the position information of the motor at the current time includes:
determining a quadrant of the position information theta of the current motor in a rectangular coordinate system according to the obtained positive and negative relations of the KTsin theta 'and the KTcos theta';
and performing arc tangent calculation on data obtained by dividing the KTsin theta 'and the KTcos theta', and determining the position information theta of the motor at the current moment.
In an exemplary embodiment, before the data acquisition card is configured to acquire the sine signal and the cosine signal output by the resolver according to a preset acquisition time period, the data acquisition card is further configured to:
presetting acquisition parameters and an acquisition time period of the data acquisition card;
wherein the acquisition parameters include: sampling a clock source and sampling frequency;
the acquisition time period is five cycles of the resolver excitation signal.
The embodiment of the application provides a motor position obtaining method and a motor control system, wherein the method comprises the following steps: for each preset acquisition time period, the following operations are performed: acquiring a sampling result obtained by acquiring sine signals and cosine signals output by the rotary transformer by using N sampling points of a data acquisition card in the acquisition time period, wherein N is determined by the length of a preset time period and sampling frequency; respectively carrying out linear fitting by using the acquired N sampling results to obtain fitting functions of sine signals and cosine signals output by the rotary transformer; respectively determining the amplitudes of the sine signal and the cosine signal output by the corresponding rotary transformer according to the fitting function; and performing arc tangent calculation according to the determined amplitude to obtain the position information of the motor at the current moment. Through the scheme disclosed by the invention, the data acquisition card is utilized to acquire data and perform linear fitting on the acquired data, so that more accurate real-time position of the motor can be obtained.
Other aspects will be apparent upon reading and understanding the attached drawings and detailed description.
Drawings
Fig. 1 is a flowchart of a motor position acquisition method according to an embodiment of the present application;
FIG. 2 is a schematic view of a motor control system according to an embodiment of the present application;
FIG. 3 is a flow chart of a motor position acquisition method in some example embodiments.
Detailed Description
Hereinafter, embodiments of the present application will be described in detail with reference to the accompanying drawings. It should be noted that the features of the embodiments and examples of the present application may be arbitrarily combined with each other without conflict.
The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
Logging while drilling refers to measuring and uploading underground engineering parameters and geological parameters when a logging instrument drills. In the drilling process, engineering parameters and stratum parameters are measured by the underground measuring sensor. These measured parameters, typically analog signals, are converted to digital signals by a data encoder. The digital signal is modulated by the control circuit, and the modulated control signal is transmitted to the drive circuit. The driving circuit drives the control motor to move, the motor moves according to a control signal given by the control circuit to drive the rotor of the swing valve slurry pulse generator to rotate or swing according to a corresponding track, and the stator and the rotor of the swing valve pulse generator shear a flowing fluid to generate a slurry pressure wave signal; the mud pressure wave signals are transmitted to a ground vertical pipe through mud in the drill pipe, and a data acquisition system acquires pressure signals of a pressure sensor on the ground vertical pipe; the pressure signal in the well is analyzed through a demodulation system, and the transmitted mud pulse signal is converted into the engineering parameter and the stratum parameter in the well.
The main technical features of this technique are as follows.
1) The control object is a servo motor, and the position detection is a rotary transformer.
2) The control information, i.e. the motion mode, output by the motor comprises: motion trajectory, frame structure.
3) The motion track, i.e. the output position waveform of the motor rotor, such as sine wave, square wave, triangular wave or half sine wave.
4) The frame structure, for the pulser, needs to be sent in a frame structure of a certain format in order to transmit the downhole data to the surface.
For downhole instruments, the transmission speed is high and exceeds 3bps, and for realizing stable decoding, the control system needs to meet the following indexes for controlling the motion of a rotor of a mud pulser:
1) the frame structure mainly comprises characteristic information, synchronous information, data information, verification and the like, and has great influence on waveform detection, synchronization and effective transmission efficiency.
2) The third generation of the swinging frequency mud pulser generally swings in a high-frequency reciprocating mode or continuously rotates, the swinging frequency can be as high as more than 40Hz generally, the swinging frequency determines the carrier frequency, the higher carrier frequency can provide possibility for rich modulation modes, in the modulation mode, frequency modulation can be used for multiple frequencies, and phase modulation can be used for single frequency.
3) The motor power movement locus determines the control motor power, the movement locus has square wave, triangular wave, sine wave and the like, and the execution power of different waveforms is different. For example, square waves have large torque requirements and consume large power.
4) Differences in the motion profile of the pressure wave amplitude will contribute differently to the pressure wave amplitude.
5) The error of the moving position and the actual position comprises an amplitude error and a phase error, which need to be analyzed, and the two errors need to be controlled within a certain range to accurately transmit the modulated signal to the ground.
The motor output torque in the high-speed mud pulse remote transmission system drives the pulser rotor to swing back and forth within a specific angle range, and the angle is generally not more than 45 degrees. The real-time position of the motor is important for the control of the motor. The accurate real-time position can be obtained, so that the motor can be effectively controlled, and analysis data can be provided for abnormal conditions occurring in the running process of the motor. For the mud pulse remote transmission system, the embodiment of the application provides a motor position obtaining method.
Fig. 1 is a flowchart of a motor position obtaining method according to an embodiment of the present application, as shown in fig. 1, including steps 100 and 103:
step 100, acquiring sine signals and cosine signals output by the rotary transformer by using N sampling points of the data acquisition card in the acquisition time period to obtain sampling results, wherein N is determined by the length of the preset time period and the sampling frequency;
step 101, respectively carrying out linear fitting by using the acquired N sampling results to obtain fitting functions of sine signals and cosine signals output by the rotary transformer;
step 102, determining amplitudes of sine signals and cosine signals output by corresponding rotary transformers according to the fitting functions respectively;
and 103, performing arc tangent calculation according to the determined amplitude to obtain the position information of the motor at the current moment.
In some exemplary embodiments, the motor position acquisition method is applied to an electrical system, the electrical system comprises a motor and a rotary transformer, the rotary transformer is connected with a data acquisition card in parallel, and differential signals output by the rotary transformer are input into the data acquisition card through a wiring port. In some embodiments, other types of data acquisition cards may be used, and the type of data acquisition card is not particularly limited.
The performance indexes of the NI USB-6351 comprise:
1) and (6) acquiring X series data.
2)16 analog input channels, 1.25MS/s (single channel), 1MS/s (multiple channel); 16 bit resolution, ± 10V 2 analog output, 2.86MS/s,16 bit resolution, ± 10V. 3)24 digital I/O lines (8 of which are 10MHz hardware timing lines).
4) 4-way 32-bit counter/timer for PWM, encoder, frequency, event count.
5) Advanced timing and triggering, with NI-STC3 timing and synchronization techniques.
6) Supports the Windows 7/Vista/XP operating system.
In step 100, acquiring the sine signal and the cosine signal output by the rotary transformer by using N sampling points of the data acquisition card in the current acquisition time period to obtain a sampling result, wherein N is determined by the length of a preset time period and a sampling frequency.
In some exemplary embodiments, before data acquisition is performed by using the data acquisition card, the acquisition parameters of the data acquisition card and the acquisition time period are preset; wherein, the acquisition parameters include: sampling a clock source and sampling frequency; the acquisition time period is five cycles of the resolver excitation signal. The setting of the acquisition time period can be set according to specific conditions, and the five periods set here are default parameters of the data acquisition card.
The setting of parameters of the data acquisition card comprises the following steps:
1. regarding the setting of the sampling clock source: the clock source provides a clock reference for the data acquisition card, and an onboard clock of the NI USB-6351 can be selected, wherein the frequency of the onboard clock is 10 MHz. In this embodiment, a multi-channel acquisition mode is adopted, and the data acquisition card performs sequential acquisition according to a sampling clock, that is, 3 channels of sampling are performed under a 10MHz clock, and the maximum sampling frequency is 3.3MHz theoretically. In practical tests, when the sampling rate of data sampling is greater than or equal to 3MHz, the data acquisition card cannot operate. In the present embodiment, the Sampling frequency Sampling rate is set to be less than 3 MHz.
2. Sampling frequency and number of samples: this setting will determine the Sampling frequency Sampling rate of the NI USB-6351 when performing acquisition and calculate the number of data acquired by a single Sampling according to a preset single Sampling time period.
3. Physical channel and terminal configuration: in the task of motor position acquisition, 3 paths of output signals of the motor are output in a differential mode, and therefore the wiring terminal configuration should also be set to be in a differential mode.
In some exemplary embodiments, since the frequency of the change of the deflection angle θ of the resolver from the zero position is much smaller than the frequency of the excitation signal of the ω resolver, the change of the deflection angle of the resolver from the zero position may be regarded as one constant within a period of 5 cycles of the excitation signal of the resolver. The acquisition time period is preset and can be set to five periods of the excitation signal. For example: the frequency of an excitation signal of the rotary transformer is 250khz, the maximum rotating speed of the motor is 400 revolutions per minute, the rotating frequency of the motor is 7hz, and when 5 periods of the excitation signal are read, the time period of the 5 periods of the excitation signal only accounts for 0.014% of the rotating period of the motor, and the error introduced in the time period is only 0.014%, so that the time period of the 5 periods of the excitation signal can be considered approximately, the motor can also be considered as motionless, namely, the change of the deflection angle of the rotary transformer relative to the zero position in the 5 periods is considered as a constant.
In step 101, linear fitting is performed by using the N collected sampling results, so as to obtain a fitting function representing a sine signal and a cosine signal output by the resolver.
In some exemplary embodiments, the acquired N sampling results are respectively utilized, and a generalized linear fitting algorithm and a preset fitting function are adopted to perform linear fitting processing;
respectively obtaining a fitting function of a corresponding sine signal and a fitting function of a corresponding cosine signal;
wherein the preset fitting function is as follows:
y=a0sin(ωt)+a1cos(ωt)+a2
wherein, in the fitting function, a0、a1And a2Is an unknown parameter; y denotes the Sampling result, ω denotes the frequency of the resolver excitation signal, i.e. the digital angular frequency of the Sampling result, Sampling rate denotes the Sampling frequency,
Figure BDA0002655145950000091
in some exemplary embodiments, the principle of the generalized linear fit is as follows:
assuming that the fitting function of the linear fitting is y ═ ax + b, a, b are relationships between the parametric fitting observation relationships (x, y).
In the generalized linear fit, the fitting function may not be limited to y ═ ax + b, and the fitting function is
Figure BDA0002655145950000101
Where n is the number of fitting functions. f. of0(x)f1(x) .. is the fitting function a0a1.., are the fitting result parameters that need to be calculated.
The generalized linear fit is performed through a set of observation points (x, y) assuming a relationship of
Figure BDA0002655145950000102
Finally, a set of results a of the relational parameters is obtained using a least squares method. In this embodiment, the linear fitting is performed according to the principle of the generalized linear fitting described above.
In step 102, determining amplitudes of a sine signal and a cosine signal output by the corresponding rotary transformer according to the fitting function;
the input to the resolver is:
INPUT=Ksinωt
the data of the two paths of sine signals and cosine signals output by the rotary transformer (the data are actually collected) are as follows:
OUTPUT1=KTsinωtsinθ
OUTPUT2=KTsinωtcosθ
in this embodiment, in the linear fitting process, the fixed value in the preset time period is regarded as a fixed value, and the linear fitting is performed, where the fitting result may be represented as:
OUTPUT1’=af(x)=KTsinθ’sinωt
OUTPUT2’=af(x)=KTcosθ’sinωt
in the above expression, KTsin θ 'and KTcos θ' are fitting results obtained by fitting operation.
It has been explained previously that θ within the acquisition period of the default parameter is considered to be constant, and therefore, at each acquisition set in advanceThe fitted KTsin θ 'and KTcos θ' within the interval may be considered constant values. In the process of fitting the function, the amplitude values of the output sine signal and cosine signal are obtained through the fitting function, but the data acquired by the data acquisition card is not an Asin ω t function with a zero phase, but is a trigonometric function with phase information, namely Asin (ω t + φ), in the function, the phase φ is an unknown number and is a non-fixed value, so that the fitting by adopting sin ω t when the fitting function is designed cannot be correctly fitted. In the present embodiment, y ═ a is designed in advance0sin(ωt)+a1cos(ωt)+a2Form of a combination of fitting functions, in which a2Is used for compensating and offsetting the direct current offset which can be generated, and a parameter a is set in the fitting function2The aim is to make the fitting result more accurate.
According to a calculation formula of a trigonometric function, calculating the amplitude of the function:
Figure BDA0002655145950000111
according to the above formula for trigonometric function calculation, the magnitude of the fitting function can be calculated as:
Figure BDA0002655145950000112
represents the Asin (ω t + φ) function A,
Figure BDA0002655145950000113
represents φ, i.e.:
Figure BDA0002655145950000114
in some exemplary embodiments, the determining the amplitudes of the corresponding sine signal and cosine signal output by the resolver according to the fitting function includes: respectively according to the parameters a of the determined fitting function0And a1Obtaining amplitudes of sine signals and cosine signals output by the rotary transformer according to an amplitude calculation formula; wherein, the amplitude calculation formula comprises:
fittingA sine or cosine signal function of the corresponding rotary transformer output0sin(ωt)+a1cos(ωt)+a2Obtaining the amplitude of the fitting function:
Figure BDA0002655145950000115
the amplitude value
Figure BDA0002655145950000116
Or KTcos θ'.
Wherein, KTsin theta' is the amplitude of the fitted sine signal output by the rotary transformer; KTcos θ' is the amplitude of the fitted cosine signal output by the resolver.
In step 103, an arc tangent calculation is performed according to the determined amplitude value, so as to obtain the position information of the motor at the current moment.
In some exemplary embodiments, the calculation is based on the sine signal and the cosine signal output by the resolver acquired in the preset acquisition time period, and although the calculation represents the position information of the motor in the acquisition time period, since the deflection angle of the resolver relative to the zero position is changed slightly in the acquisition time period, the motor can be regarded as still, and thus the calculation result can be regarded as the position information of the motor at the current time.
In some exemplary embodiments, performing an arc tangent calculation according to the determined amplitude to obtain the position information of the motor at the current time includes: determining a quadrant of the position information theta of the current motor in a rectangular coordinate system according to the obtained positive and negative relations of the KTsin theta 'and the KTcos theta'; and performing arc tangent calculation on data obtained by dividing the KTsin theta 'and the KTcos theta', and determining the position information theta of the motor at the current moment.
In some exemplary embodiments, after obtaining the amplitudes of the sine signal and the cosine signal fitted to the resolver, two parameters KTsin θ 'and KTcos θ' are obtained, and the two parameters are divided to obtain tan θ, and then an arctangent calculation is performed to obtain a value of θ. But the range of the arctangent function for calculating theta by tan theta is
Figure BDA0002655145950000121
Theta in this range cannot represent a 360 degree rotation condition of the motor. In the actual calculation process, arctan2 function is used to perform arc tangent calculation to obtain the position information of the motor at the current moment, and the process includes:
inputting KTsin theta 'and KTcos theta' obtained by fitting into an arctan2 function;
judging the positive and negative relations of two parameters of KTsin theta 'and KTcos theta' to determine which quadrant the position information theta of the motor is positioned at the current moment;
and thirdly, determining the value of theta through calculation to serve as the position information of the motor at the current moment.
In the embodiment, since the range of the arctan2 function is [ -pi, pi ], the 360-degree rotation condition of the motor can be represented by determining the value of theta through calculation.
In some exemplary embodiments, for each preset acquisition time period, after the operation is performed to obtain the value of θ in the preset acquisition time period, the operation of the above embodiments is repeatedly performed, so that a continuous variation curve of θ can be obtained. Connecting the curves to a line obtains the position curve of the motor.
The present disclosure also provides a motor control system, the control system comprising: the device comprises a motor, a rotary transformer, a data acquisition card and a processor, wherein the rotary transformer is connected with the acquisition card in parallel; the motor is used for outputting sine waveform signals and cosine waveform signals; the rotary transformer is used for monitoring sine waveform signals and cosine waveform signals output by the motor and outputting sine signals and cosine signals; the data acquisition card is used for acquiring sine signals and cosine signals output by the rotary transformer according to preset acquisition time periods to obtain N sampling points in each acquisition time period as sampling results in the acquisition time period, wherein N is determined by the length of the preset time period and sampling frequency; the processor is used for respectively executing the following operations aiming at each preset acquisition time period: respectively carrying out linear fitting by using the acquired N sampling results to obtain fitting functions of sine signals and cosine signals output by the rotary transformer; respectively determining the amplitudes of the sine signal and the cosine signal output by the corresponding rotary transformer according to the fitting function; and performing arc tangent calculation according to the determined amplitude to obtain the position information of the motor at the current moment.
In an exemplary embodiment, the processor performs linear fitting using the acquired N sampling results to obtain a fitting function representing a sine signal and a cosine signal output by the resolver, and includes: respectively utilizing the acquired N sampling results, and performing linear fitting processing by adopting a generalized linear fitting algorithm and a preset fitting function; respectively obtaining a fitting function of a corresponding sine signal and a fitting function of a corresponding cosine signal; wherein the preset fitting function is as follows:
y=a0sin(ωt)+a1cos(ωt)+a2
wherein, in the fitting function, a0、a1And a2Is an unknown parameter; y denotes the Sampling result, ω denotes the frequency of the resolver excitation signal, Sampling rate denotes the Sampling frequency,
Figure BDA0002655145950000131
in an exemplary embodiment, the processor determines the amplitudes of the corresponding sine signal and cosine signal of the resolver output according to the fitting function, respectively, and includes: respectively according to the parameters a of the determined fitting function0And a1Obtaining amplitudes of sine signals and cosine signals output by the rotary transformer according to an amplitude calculation formula; wherein the amplitude calculation formula comprises:
Figure BDA0002655145950000132
or a value of KTcos θ,
KTsin θ 'is the amplitude of the fitted resolver output sinusoidal signal, and KTcos θ' is the amplitude of the fitted resolver output sinusoidal signal.
In an exemplary embodiment, the performing an arc tangent calculation according to the determined amplitude to obtain the position information of the motor at the current time includes: determining a quadrant of the position information theta of the current motor in a rectangular coordinate system according to the obtained positive and negative relations of the KTsin theta 'and the KTcos theta'; and performing arc tangent calculation on data obtained by dividing the KTsin theta 'and the KTcos theta', and determining the position information theta of the motor at the current moment.
In an exemplary embodiment, before the data acquisition card is configured to acquire the sine signal and the cosine signal output by the resolver according to a preset acquisition time period, the data acquisition card is further configured to:
presetting acquisition parameters and an acquisition time period of the data acquisition card;
wherein the acquisition parameters include: sampling a clock source and sampling frequency;
the acquisition time period is five cycles of the resolver excitation signal.
The following description of the motor position obtaining method is given by way of example in one application, and as shown in fig. 3, includes the following steps S1-S5:
and S1, connecting the rotary transformer in parallel with a data acquisition card.
In this step, an acquisition card of NI-6351 type is adopted, and the signal output by the rotary transformer is input into the acquisition card through a differential port.
And S2, presetting parameters of the data acquisition card.
In the step, the acquisition parameters of the data acquisition card and the acquisition time period are preset; wherein the acquisition parameters include: sampling a clock source and a sampling rate; the acquisition time period is five cycles of the resolver excitation signal.
And S3, acquiring sine signals and cosine signals output by the rotary transformer by using the N sampling points of the data acquisition card in the acquisition time period to obtain sampling results.
In this step, N is determined by the length of the preset time period and the sampling frequency.
And S4, respectively carrying out linear fitting by using the acquired N sampling results.
In this step, the linear fitting process is performed by using the acquired N sampling results and using a generalized linear fitting algorithm and a preset fitting function, and the linear fitting process includes:
and S41, presetting a fitting function.
In this step, the principle of generalized linear fitting and the principle of operation of the resolver are combined, and a fitting function is designed in advance as follows:
y=a0sin(ωt)+a1cos(ωt)+a2
wherein, in the fitting pre-designed function, a0、a1And a2Is an unknown parameter; y represents the Sampling result collected by the acquisition card, ω represents the frequency of the excitation signal of the resolver, and ω can be calculated according to the Sampling frequency of the Sampling rate preset in advance, the Sampling rate represents the Sampling frequency preset in step S3,
Figure BDA0002655145950000141
and S42, fitting a fitting function of the sinusoidal signal output by the rotary transformer according to the N sampling results.
And S43, fitting a fitting function of the cosine signal output by the rotary transformer according to the N sampling results.
And S5, determining the amplitudes of the sine signal and the cosine signal output by the corresponding rotary transformer according to the fitting function respectively.
In this step, the parameters a of the fitting function are determined respectively0And a1Obtaining amplitudes of sine signals and cosine signals output by the rotary transformer according to an amplitude calculation formula;
wherein the amplitude calculation formula comprises:
Figure BDA0002655145950000151
or KTcos θ',
KTsin θ 'is the amplitude of the fitted resolver output sinusoidal signal, and KTcos θ' is the amplitude of the fitted resolver output sinusoidal signal.
And determining the amplitude of the sinusoidal signal output by the rotary transformer according to the fitted function of the step S42. And determining the amplitude of the cosine signal output by the rotary transformer according to the fitted function of the step S43.
And S6, performing arc tangent calculation according to the determined amplitude.
In the step, determining a quadrant of the current position information theta of the motor in a rectangular coordinate system according to the obtained positive and negative relations of the KTsin theta 'and the KTcos theta'; and performing arc tangent calculation on data obtained by dividing the KTsin theta 'and the KTcos theta'.
And S7, obtaining the position information of the motor at the current moment.
In this step, the motor position information θ at the current time is obtained by performing arc tangent calculation in step S6.
And S8, storing the data acquired by the acquisition card and the position information of the motor at the current moment acquired by calculation.
By repeating the steps S3-S7, a continuous variation curve of θ can be obtained, and the position curve of the motor can be obtained by connecting the curves into a line.
In the application example of the present application, an NI USB-6351 data acquisition card is connected in parallel to the resolver, and the data acquisition card acquires data and performs fitting processing on the acquired data, so that the following calculation effects can be achieved:
1) the real-time calculation of the motor position is realized;
2) the motor is conveniently controlled.
According to the application example, a more accurate real-time position can be obtained, the motor can be effectively controlled through the real-time position, and analysis data can be provided for abnormal conditions occurring in the running process of the motor.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, or suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as is well known to those skilled in the art.

Claims (8)

1. A motor position acquisition method is applied to an electrical system, the electrical system comprises a motor and a rotary transformer, and the rotary transformer is connected with a data acquisition card in parallel, and the method comprises the following steps:
for each preset acquisition time period, performing the following operations:
collecting sine signals and cosine signals output by the rotary transformer by using N sampling points of the data acquisition card in the current acquisition time period to obtain sampling results, wherein N is determined by the length of a preset time period and sampling frequency;
respectively carrying out linear fitting by using the acquired N sampling results to obtain fitting functions of sine signals and cosine signals output by the rotary transformer;
respectively determining the amplitudes of the sine signal and the cosine signal output by the corresponding rotary transformer according to the fitting function;
performing arc tangent calculation according to the determined amplitude to obtain the position information of the motor at the current moment;
wherein, the linear fitting is carried out by respectively utilizing the acquired N sampling results to obtain a fitting function of a sine signal and a cosine signal which represent the output of the rotary transformer, and the fitting function comprises the following steps:
respectively utilizing the collected N sampling results, and performing linear fitting processing by adopting a generalized linear fitting algorithm and a preset fitting function;
respectively obtaining a fitting function of a corresponding sine signal and a fitting function of a corresponding cosine signal;
wherein the preset fitting function is as follows:
y=a0sin(ωt)+a1cos(ωt)+a2
wherein, in the fitting function, a0、a1And a2Is an unknown parameter; y denotes the sampling result, ω denotes the frequency of the resolver excitation signal, sampling rate denotes the sampling frequency,
Figure FDA0003549539620000011
2. the motor position obtaining method according to claim 1, wherein the determining the amplitudes of the sine signal and the cosine signal output by the corresponding resolver according to the fitting function respectively comprises:
respectively according to the parameters a of the determined fitting function0And a1Obtaining amplitudes of sine signals and cosine signals output by the rotary transformer according to an amplitude calculation formula;
wherein the amplitude calculation formula comprises:
Figure FDA0003549539620000021
or KTcos θ',
KTsin θ 'is the amplitude of the fitted sine signal output by the resolver, and KTcos θ' is the amplitude of the fitted cosine signal output by the resolver.
3. The motor position acquiring method according to claim 2, wherein the performing arc tangent calculation according to the determined amplitude value to obtain the position information of the motor at the current time includes:
determining a quadrant of the position information theta of the current motor in a rectangular coordinate system according to the obtained positive and negative relations of the KTsin theta 'and the KTcos theta';
and performing arc tangent calculation on data obtained by dividing the KTsin theta 'and the KTcos theta', and determining the position information theta of the motor at the current moment.
4. The motor position acquisition method according to claim 1, wherein before the sampling result obtained by acquiring the sine signal and the cosine signal output by the resolver using the N sampling points of the data acquisition card in the present time period, the method further comprises:
presetting acquisition parameters and an acquisition time period of the data acquisition card;
wherein the acquisition parameters include: sampling frequency;
the acquisition time period is five cycles of the resolver excitation signal.
5. A motor control system, characterized in that the control system comprises: the system comprises a motor, a rotary transformer, a data acquisition card and a processor, wherein the rotary transformer is connected with the acquisition card in parallel;
the motor is used for outputting sine waveform signals and cosine waveform signals;
the rotary transformer is used for monitoring sine waveform signals and cosine waveform signals output by the motor and outputting sine signals and cosine signals;
the data acquisition card is used for acquiring sine signals and cosine signals output by the rotary transformer according to preset acquisition time periods to obtain N sampling points in each acquisition time period as sampling results in the acquisition time period, wherein N is determined by the length of the preset time period and sampling frequency;
the processor is used for respectively executing the following operations aiming at each preset acquisition time period:
respectively carrying out linear fitting by using the acquired N sampling results to obtain fitting functions of sine signals and cosine signals output by the rotary transformer;
respectively determining the amplitudes of the sine signal and the cosine signal output by the corresponding rotary transformer according to the fitting function;
performing arc tangent calculation according to the determined amplitude to obtain the position information of the motor at the current moment;
the processor respectively utilizes the acquired N sampling results to perform linear fitting to obtain a fitting function representing sine signals and cosine signals output by the rotary transformer, and the fitting function comprises the following steps:
respectively utilizing the collected N sampling results, and performing linear fitting processing by adopting a generalized linear fitting algorithm and a preset fitting function;
respectively obtaining a fitting function of a corresponding sine signal and a fitting function of a corresponding cosine signal;
wherein the preset fitting function is as follows:
y=a0sin(ωt)+a1cos(ωt)+a2
wherein, in the fitting function, a0、a1And a2Is an unknown parameter; y denotes the sampling result, ω denotes the frequency of the resolver excitation signal, sampling rate denotes the sampling frequency,
Figure FDA0003549539620000031
6. the motor control system of claim 5, wherein the processor determines the amplitudes of the corresponding sine signal and cosine signal of the resolver output according to the fitting function, respectively, comprises:
respectively according to the parameters a of the determined fitting function0And a1Obtaining amplitudes of sine signals and cosine signals output by the rotary transformer according to an amplitude calculation formula;
wherein the amplitude calculation formula comprises:
Figure FDA0003549539620000032
or KTcos theta',
KTsin θ 'is the amplitude of the fitted sine signal output by the resolver, and KTcos θ' is the amplitude of the fitted cosine signal output by the resolver.
7. The motor control system of claim 6, wherein the performing an arc tangent calculation according to the determined magnitude to obtain the position information of the motor at the current time comprises:
determining a quadrant of the position information theta of the current motor in a rectangular coordinate system according to the obtained positive and negative relations of the KTsin theta 'and the KTcos theta';
and performing arc tangent calculation on data obtained by dividing the KTsin theta 'and the KTcos theta', and determining the position information theta of the motor at the current moment.
8. The motor control system according to claim 5, wherein the data acquisition card is configured to, before acquiring the sine signal and the cosine signal output by the resolver according to a preset acquisition time period, further:
presetting acquisition parameters and an acquisition time period of the data acquisition card;
wherein the acquisition parameters include: sampling frequency;
the acquisition time period is five cycles of the resolver excitation signal.
CN202010884505.4A 2020-08-28 2020-08-28 Motor position obtaining method and motor control system Active CN112104270B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010884505.4A CN112104270B (en) 2020-08-28 2020-08-28 Motor position obtaining method and motor control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010884505.4A CN112104270B (en) 2020-08-28 2020-08-28 Motor position obtaining method and motor control system

Publications (2)

Publication Number Publication Date
CN112104270A CN112104270A (en) 2020-12-18
CN112104270B true CN112104270B (en) 2022-06-14

Family

ID=73758203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010884505.4A Active CN112104270B (en) 2020-08-28 2020-08-28 Motor position obtaining method and motor control system

Country Status (1)

Country Link
CN (1) CN112104270B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115224988B (en) * 2022-09-20 2022-12-20 苏州英特模汽车科技有限公司 Detection method and detection equipment for rotary transformer zero point position, and vehicle

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103078571A (en) * 2013-01-04 2013-05-01 天津清源电动车辆有限责任公司 Rotary transformer system and control method thereof

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5241268A (en) * 1992-03-02 1993-08-31 Hughes Aircraft Company Method and apparatus for electromagnetically resolving the angle of a rotatable shaft
JP2004301806A (en) * 2003-04-01 2004-10-28 Minebea Co Ltd R/d converter
JP4455070B2 (en) * 2004-01-23 2010-04-21 株式会社東芝 Motor control device, motor control method, and computer program
CN102147619B (en) * 2011-03-02 2012-12-05 天津清源电动车辆有限责任公司 Virtual instrument-based motor control automatic testing system and method for electric automobile
CN102269657A (en) * 2011-03-22 2011-12-07 上海金脉电子科技有限公司 Simulator for simulating output signal of rotary transformer
CN103532556B (en) * 2013-10-28 2016-09-07 连云港杰瑞电子有限公司 A kind of single-chip shaft angle signal is to serial digital signal change-over circuit

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103078571A (en) * 2013-01-04 2013-05-01 天津清源电动车辆有限责任公司 Rotary transformer system and control method thereof

Also Published As

Publication number Publication date
CN112104270A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
EP1442320B1 (en) Relative drill bit direction measurement
Sweeney et al. Gear transmission error measurement using phase demodulation
CN108196213A (en) Zero-bit angle test device, the method and system of a kind of rotary transformer
CN101545915B (en) Motor speed measuring method based on Doppler effect of inductosyn
CN101852818A (en) Accelerometer error calibration and compensation method based on rotary mechanism
CN106092524A (en) A kind of method using vibration signal accurately to extract tach signal
CN111624671B (en) Method and device for determining gravity gradient demodulation phase angle of gravity gradiometer of rotating accelerometer
CN112104270B (en) Motor position obtaining method and motor control system
Wang et al. Rotating angle estimation for hybrid stepper motors with application to bearing fault diagnosis
Wang et al. A two-stage method using spline-kernelled chirplet transform and angle synchronous averaging to detect faults at variable speed
CN104459313A (en) Signal collecting device and method of double-resonance-element quartz crystal microbalance (QCM)
CN207780217U (en) A kind of zero-bit angle test device of rotary transformer
CN111650664B (en) Real-time gravity gradient demodulation method and device for aviation gravity gradiometer
CN107702731B (en) Method for testing gyroscope with unknown parameters
CN102269803B (en) Method for correcting low-frequency components in discrete spectrum based on time delay
CN103162614B (en) The online self-calibrating method of a kind of angular displacement sensor
CN104727807A (en) Angle position measurement method and system
CN102636664A (en) Method for dynamically estimating accelerometer resolution
CN102004165B (en) Method for measuring instantaneous rotation speed of synchronous generator
CN103607158A (en) Flux linkage estimator under low speed and based on PI regulator and phase-locked loop principle
CN104677486B (en) The aero-engine vibration signal Method for Phase Difference Measurement reconstructed based on tacho-pulse
CN107561306A (en) Winding motor rotating speed measurement method based on rotor current
KR20180114743A (en) Absolute encoder, method for generating look-up table of sinusoidal wave, and method for detecting absolute angle using the same
CN112665712B (en) Wide-area order tracking method and system for monitoring train running gear
CN113532474B (en) Method for resolving sine motion amplitude and frequency of low-frequency angular acceleration table

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