Disclosure of Invention
The invention provides a method for measuring the speed of a micro-nano satellite reaction flywheel at full speed and high precision by using a linear Hall sensor, and provides a micro-nano satellite reaction flywheel speed measuring method based on linear Hall, and the invention provides the following technical scheme:
a micro-nano satellite reaction flywheel speed measurement method based on linear Hall comprises the following steps:
step 1: collecting an output voltage signal of a linear Hall sensor;
step 2: carrying out normalization processing according to the collected Hall voltage value;
and step 3: calculating an arcsine from the normalized Hall voltage value by an indirect method, and determining an angular position;
and 4, step 4: and for each Hall signal, obtaining the speed of the flywheel according to the difference of the angular positions.
Preferably, the step 1 specifically comprises:
acquiring an output voltage signal of the linear Hall sensor through an ADC module of the DSP; the linear Hall output voltage signal is an analog quantity, the current collection of the motor and the collection of the three-phase linear Hall output voltage signal are realized through an ADC module of the DSP, and the winding current and the Hall output voltage signal are obtained after decoding.
Preferably, the step 2 specifically comprises:
according to the sampled Hall voltage values, the amplitudes are inconsistent, angle calculation is directly carried out, the amplitudes of all Hall output signals are the same, normalization is carried out by acquiring the maximum value and the minimum value of a linear Hall output sinusoidal signal, the Hall output signal is converted into a sinusoidal signal with the amplitude of 1, and at least one complete period Hall output signal is acquired.
Preferably, the step 3 specifically comprises:
directly performing an arc sine operation on the normalized Hall voltage value to obtain an angular position, converting the arc sine operation into an arc tangent operation contained in an FPU (field programmable gate array) mathematical library in a DSP (digital signal processor), judging a current corresponding interval according to a Hall state by taking the angular position obtained through calculation as an angular position value in a geometric sense, and increasing an angle offset value on the obtained angular position value in the geometric sense according to the interval to obtain an absolute angular position value of the motor in a physical sense;
according to the Hall switching mode, when the Hall output voltage signal is higher than the median value of the Hall output voltage signal, the Hall state is set to be 1, when the Hall output voltage signal is lower than the median value of the Hall output voltage signal, the Hall state is considered to be 0, and the three Hall signals correspond to 6 Hall states in total; the method comprises the steps of dividing 360 degrees of a circle into six sections by utilizing 6 Hall states, setting the first section to be 0-60 degrees of the absolute position of a motor, setting the second section to be 60-120 degrees of the absolute position of the motor, and setting the sixth section to be 300-360 degrees of the absolute position of the motor, and after the section is determined, converting an angular position obtained by an arcsine to obtain the angular position of the motor in a physical sense.
Preferably, the step 4 specifically includes: for each path of Hall signal, respectively calculating according to the step 3 to obtain the motor angular position of the previous control period and the motor angular position of the current control period, differentiating the motor angular positions of two adjacent control periods to obtain the variation of the motor angular position in one control period, wherein three paths of linear Hall correspond to the variation of three angular positions;
according to the interval, the angular position variation quantity corresponding to two paths of Hall sensors with larger output Hall signal curve slope in the interval is taken, arithmetic mean is taken, and final angular position difference value calculation is carried out;
and the interval division is carried out according to the Hall state, the angle calculation result of the Hall signal containing the extreme point in each interval depends on the other two Hall paths, the two Hall paths have installation phase errors, the position decoding is carried out at the position with the maximum slope of the sine signal curve, the decoding accuracy is ensured, and the flywheel speed is obtained by dividing the angular position difference value by the sampling time.
The invention has the following beneficial effects:
the invention carries out normalization processing on the amplitudes of three Hall output signals, thereby improving the position resolving precision; the position difference of two adjacent sampling moments is calculated by each Hall output signal, and the position difference calculated by two Hall signals with larger slope is selected according to the Hall state and then is averaged, so that the position resolving error can be reduced, and the speed resolving precision is improved; the invention converts the arc sine operation into the arc tangent operation in the processor high-speed mathematical operation library function FPU, so that the calculation time is greatly shortened, the angular position can be calculated by a real-time method according to the Hall output signal, and the real-time performance is higher than that of a table look-up method;
the real-time method does not need to store table data, does not occupy additional memory, saves cost, reduces the risk of single event upset in the flywheel on-orbit application environment, and improves the reliability of a reaction flywheel control system.
Detailed Description
The present invention will be described in detail with reference to specific examples.
The first embodiment is as follows:
according to the figures 1 to 7, the invention provides a micro-nano satellite reaction flywheel speed measurement method based on linear Hall, which comprises the following steps:
a micro-nano satellite reaction flywheel speed measurement method based on linear Hall comprises the following steps:
step 1: collecting an output voltage signal of a linear Hall sensor;
the step 1 specifically comprises the following steps:
acquiring an output voltage signal of the linear Hall sensor through an ADC module of the DSP; the linear Hall output voltage signal is an analog quantity, the current collection of the motor and the collection of the three-phase linear Hall output voltage signal are realized through an ADC module of the DSP, and the winding current and the Hall output voltage signal are obtained after decoding.
Step 2: carrying out normalization processing according to the collected Hall voltage value;
the step 2 specifically comprises the following steps:
according to the sampled Hall voltage values, the amplitude values are inconsistent, angle calculation is directly carried out, the amplitude values of all Hall output signals are the same, normalization is carried out by acquiring the maximum value and the minimum value of a linear Hall output sinusoidal signal, the Hall output signal is converted into a sinusoidal signal with the amplitude value of 1, and at least one complete period Hall output signal is acquired.
And step 3: calculating an arcsine from the normalized Hall voltage value by an indirect method, and determining an angular position;
the step 3 specifically comprises the following steps:
directly performing an arc sine operation on the normalized Hall voltage value to obtain an angular position, converting the arc sine operation into an arc tangent operation contained in an FPU (field programmable logic unit) mathematical library inside a DSP (digital signal processor), judging a current corresponding interval according to the calculated angular position as an angular position value in a geometric sense, and increasing an angle offset to the obtained angular position value in the geometric sense according to the interval to obtain an absolute angular position value of the motor in a physical sense;
according to a Hall switching mode, when the Hall output voltage signal is higher than the median value, the Hall state is set to be 1, when the Hall output voltage signal is lower than the median value, the Hall state is considered to be 0, and three Hall signals correspond to 6 Hall states in total; the method comprises the steps of dividing 360 degrees of a circle into six sections by utilizing 6 Hall states, setting the first section as 0-60 degrees of the absolute position of a motor, the second section as 60-120 degrees of the absolute position of the motor, and the sixth section as 300-360 degrees of the absolute position of the motor, and converting an angular position obtained by an arcsine after the section is determined to obtain the physical angular position of the motor.
And 4, step 4: and for each Hall signal, obtaining the speed of the flywheel according to the difference of the angular positions.
The step 4 specifically comprises the following steps: for each path of Hall signal, respectively calculating according to the step 3 to obtain the motor angular position of the previous control period and the motor angular position of the current control period, differentiating the motor angular positions of two adjacent control periods to obtain the variation of the motor angular position in one control period, wherein three paths of linear Hall correspond to the variation of three angular positions;
according to the interval, the angular position variation quantity corresponding to two paths of Hall sensors with larger output Hall signal curve slope in the interval is taken, arithmetic mean is taken, and final angular position difference value calculation is carried out;
and (3) carrying out interval division according to the Hall state, wherein the angle calculation result of the Hall signal containing the extreme point in each interval depends on the other two Hall circuits, the two Hall circuits have installation phase errors, the position decoding is carried out at the position with the maximum slope of the sine signal curve, the decoding accuracy is ensured, and the flywheel speed is obtained by dividing the angular position difference value by the sampling time.
The reaction flywheel is a main execution component for controlling the attitude of the satellite, and in order to improve the accuracy and the stability of the control of the attitude of the whole satellite, more rigorous requirements on the performance of the reaction flywheel are provided. The measurement is the basis for realizing the control, and the sensor is a necessary device for realizing the automatic control. In order to realize the control of the flywheel, firstly, the position and speed information of the rotor of the flywheel motor needs to be accurately measured, and the commonly used position sensors comprise a photoelectric encoder and a hall sensor. The encoder is large in size, high in cost and high in requirement on the external environment, and is generally applied to position acquisition of a large-torque flywheel with large size and mass. The Hall sensor has the advantages of small volume, low cost and high sensitivity, and is widely applied to a speed detection system of a microsatellite reaction flywheel with small volume and mass.
The hall sensor includes a switch type hall sensor and a linear hall sensor. The speed measurement of the switch Hall sensor is simple to realize, but because the switch Hall sensor outputs a digital signal, the feedback delay phenomenon of a rotor position signal is obvious when the rotating speed is low, so that the speed measurement precision of the low rotating speed is low, and the high-precision speed control effect under the low-speed state is difficult to achieve. Compared with the linear Hall sensor, the linear Hall sensor has continuous output signals and can completely feed back the rotor position information with the angle theta being the range of [0,2 pi ], so that the linear Hall sensor can realize the real-time measurement of the rotor position and further realize the high-precision control of the full-speed range as long as the sampling frequency is high enough, and the linear Hall sensor can realize the better speed measurement effect
When the reaction flywheel is installed by adopting three linear Hall spaces with the difference of 120 electrical angles, 1 pair of polar motors, 12 AD sampling digits and the maximum output torque of more than or equal to 2mNm are adopted, and the micro-nano satellite reaction flywheel speed measurement method based on the linear Hall comprises the following steps:
step one, three paths of linear Hall output voltage signals are filtered and then sent to an AD module of a controller, AD conversion is carried out to obtain code values of the three paths of Hall voltage signals, and sampling voltage values HalAVol, halBVol and HalCVol are obtained through calculation according to a formula (1), wherein: n is AD conversion digit, and HallAAdc, hallBAdc and HallCAdc are AD sampling code values.
Step two, carrying out normalization processing on the three Hall output signals; and sending a speed command to start the flywheel, recording the maximum value HallAAdcMax, hallBAdcMax, hallCAdcMax and the minimum value HallAAdcMin, hallBAdcMin and HallCAdcMin of all paths of Hall signal code values acquired by AD in a period of time (at least one whole-period Hall output) as shown in a table 1. And (3) obtaining the normalization coefficients HallAVolCof, hallBVolCof and HallCVolCof of the three paths of Hall ABCs and Hall median HallAVolMid, hallBVolMid and HallCVolMid through the formula (2) and the formula (3), wherein the normalization coefficients HallAVolCof, hallBVolCof and HallCVolMid are shown in the table 1. At each sampling time, according to the current Hall sampling values of CurrentHalA, currentHalB and CurrentHalC, normalized Hall voltages of HalANorm, hallBNorm and HallCNorm can be obtained by calculation according to a formula (4).
TABLE 1 Hall normalization data records
Thirdly, calculating the normalized Hall output signal to obtain an angular position;
the normalized hall voltage value is subjected to an arcsine operation by using formula (5) to obtain an angular position (radian), and the angular position is converted into an angle (degree) haladag, halbdeg and halcdeg.
In order to shorten the operation time and improve the control frequency of the control system, the operation of the arcsine in the formula (5) is converted into the operation of the arctan contained in the FPU mathematical library inside the DSP. The conversion relationship is shown in equation (6).
The calculation is radian. The angle HallADeg, hallBDeg and HallCDeg is converted, the operation time of the inverse trigonometric function is reduced from hundreds of machine periods to dozens of machine periods, and the control frequency of the control system can be improved.
The calculated angular positions HallADeg, hallBDeg and HallCDeg are only angular position values in a geometric sense, are not absolute angular position values of the motor in a specified physical sense, and the corresponding section where the motor is located currently as shown in fig. 1 needs to be judged according to the hall state. And converting HallADeg, hallBDeg and HallCDeg into absolute angular position values ThetaAPre, thetaBPre and ThetaCPre of the flywheel motors corresponding to the corresponding intervals. And calculating current angular positions ThetaAPre, thetaBPre and ThetaCPre according to the current Hall state, and calculating last-time angular positions ThetaAPri, thetaBPri and ThetaCPri according to the Hall state at the last time in the same way.
And step four, differentiating the angular position to obtain the speed.
And calculating position difference values Delta ThetaA, delta ThetaB and Delta ThetaC of the three Hall circuits according to a formula (8) by using the absolute position values of the three Hall circuits in the previous control period and the current control period which are obtained by calculation in the step three.
According to the flow chart shown in fig. 3, the angle difference DeltaTheta and DeltaTheta of two hall signals with larger slope in the current interval are selected to participate in calculation, and the angle difference DeltaTheta and the DeltaTheta are arithmetically averaged to obtain the final angle difference DeltaTheta.
DeltaTheta=(DeltaThetaP+DeltaThetaQ)/2 (9)
According to equation (10), the angular difference is divided by the sample time to obtain the flywheel speed in r/min, where SpdSampPeriod is the speed sample time interval in s.
Speed=DeltaTheta/(SpdSampPeriod*6) (10)
FIGS. 4 to 7 show the actual speed control effect of the reaction flywheel speed measurement method, and the rotation speed control precision is better than 1r/min in the rotation speed range of 0r/min to 3000 r/min. The invention solves the problems that the real-time difference table data of the linear Hall table look-up method occupies the storage space and has the risk of single event upset, improves the reliability of a reaction flywheel control system, provides a speed calculation method for the reaction flywheel based on the linear Hall speed measurement, and has engineering application significance.
The above is only a preferred embodiment of the micro-nano satellite reaction flywheel speed measurement method based on the linear hall, and the protection range of the micro-nano satellite reaction flywheel speed measurement method based on the linear hall is not limited to the above embodiments, and all technical schemes belonging to the idea belong to the protection range of the invention. It should be noted that modifications and variations which do not depart from the gist of the invention will be those skilled in the art to which the invention pertains and which are intended to be within the scope of the invention.