The content of the invention
In view of this, the present invention proposes a kind of wind generator system and speed-position detection device and method, fixed to solve to test the speed
Position precision problem.
On the one hand, the invention provides a kind of method for locating speed measurement, comprise the following steps:
Step 1:It is distributed with n tooth on code-disc, the space width of one of tooth is A, the space width of other all teeth
For B;The ratio that space width A is more than space width B, space width A and space width B is R;By the tooth of detection means alignment code-disc;Work as inspection
When surveying the tooth edge of device alignment code-disc, the level of detection means, which is undergone mutation, produces pulse signal, in detection trigger chip
Disconnected processing module.
Step 2:Interruption processing module calculates code-disc and often encloses time-consuming s [x] in real time, and s [x] represents institute's used time of code-disc xth circle
Between.
Step 3:Comparing code-disc, currently whether the time-consuming s [x] of circle encloses time-consuming s [x-1] in certain error scope with code-disc one
It is interior;When s [x] values and s [x-1] values are within a certain error range, assert that code-disc enters at the uniform velocity state, and enter step 4, otherwise
Return to step 2;
Step 4:When code-disc enters at the uniform velocity state, the time ratios P used between adjacent teeth is calculated in real time;
Step 5:Compare P and R difference, when P and R difference is in preset range, it is code-disc physics to determine code-disc position
Zero-bit, into step 6, otherwise return to step 4;
Step 6:Angle J of the detection means relative to code-disc physics zero-bit is calculated in real time.
Further, in step 2:The continuous timing of timer T of detection chip, umber of pulse M is updated, if umber of pulse M
During=n+1, timer T=c [x] [1]=0 and umber of pulse M=1 is made;Calculate xth circle and take s [x], s [x]=c [x] [n+1]-c
[x][1];C [x] [n+1] represents the time of the (n+1)th tooth of xth circle.
Further, in step 4:CalculateC [x] [y] represents the y of xth circle
The time of tooth, y values are equal to umber of pulse M, when P and R difference is in preset range, make timer T=c [x] [1]=0 and pulse
Number M=1.
Further, in step 6:Angle J=(y-1) × q+ (T-c [x] [y]) × v, wherein q=360 ÷ (n+R-
1), v=360 ÷ s [x].
Further, space width A is space width B 2 times, R=2, q=360 ÷ (n+1).
Further, when s [x] values and s [x-1] values are in 5% error range, assert that code-disc enters at the uniform velocity state;
1.95≤p≤2.05。
Further, the tooth edge of code-disc is right angle.
In addition, present invention also offers a kind of speed-position detection device, including frame, detection means, code-disc, detection chip,
Detection means is fixed on frame, and detection means is directed at the tooth of code-disc;N tooth, the between cog of one of tooth are distributed with code-disc
It is B away from the space width for A, other all teeth;The ratio that space width A is more than space width B, space width A and space width B is R;Inspection
Device is surveyed to be used to detect the tooth of code-disc and produce pulse signal;Detection chip is used for the pulse signal of receiving detection device, in real time
Calculate code-disc and often enclose time-consuming s [x];And judge that code-disc is when front ring takes s [x] and the time-consuming s [x-1] of a circle on code-disc according to code-disc
It is no to enter at the uniform velocity state;And the time ratios P used between adjacent teeth is calculated in real time, the thing of code-disc is judged according to P and R difference
Zero-bit is managed, and calculates angle J of the detection means relative to code-disc physics zero-bit in real time.
Further, space width A is 2 times, R=2 of space width B, and the tooth edge of code-disc is right angle.
In addition, present invention also offers wind generator system, including above-mentioned speed-position detection device.
Wind generator system and speed-position detection device and method provided by the invention.Using high-frequency detection chip, in setting
Liter or trailing edge interrupt mode.Code-disc uses different space width structures, is tested the speed according to every circle institute is time-consuming, by working as front ring
Institute it is time-consuming it is time-consuming with upper one circle institute compared with, judge code-disc whether at the uniform velocity state.When at the uniform velocity state, calculate
By space width A and the time taking ratio P of space width B institutes, code-disc physics zero-bit is looked for by P values.Then detection is calculated in real time
Device relative to code-disc physics zero-bit angle J.The device and method reduces the error of speed and angle, improves speed-position detection
Precision.In addition, the tooth edge of code-disc is right angle, reduces speed and angular error, improve speed-position detection precision.
Embodiment
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the present invention can phase
Mutually combination.Describe the present invention in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
With reference to Fig. 1, the preferred embodiments of the present invention are described in further detail.
As shown in figure 1, a kind of speed-position detection device of this preferred embodiment, including frame, detection means, code-disc, detection
Chip, detection means are fixed on frame.N tooth is distributed with code-disc, the space width of one of tooth is A, other all
The space width of tooth is B;Space width A is R times of space width B, takes R=2, n=30 in the present embodiment.Space width is adjacent two tooth
Arc length between homonymy flank profil.The tooth edge of code-disc is right angle.
By the tooth of detection means alignment code-disc;When code-disc rotates, detection means produces high electricity in the tooth high spot of code-disc
It is flat, low level is produced in recess, when tooth passes through detection means from concave to convex, its level is changed into high from low, that is, when detection fills
When putting the tooth edge of alignment code-disc, the level of detection means, which is undergone mutation, produces pulse signal, and code-disc rotation is turned around, and umber of pulse is
M=30, that is to say, that M=n.Detection means can use and receive switch or electromagnetic induction element.
The pulse signal of detection chip receiving detection device, when the tooth edge of detection means alignment code-disc, detection means
Level undergo mutation the interruption processing module of detection trigger chip;Interruption processing module is exactly interrupt handling routine.Detect core
Piece is the high-frequency such as control chip such as DSP, ARM, single-chip microcomputer.In configuration, the pulse signal of detection means is input to detection
In chip, detection chip input signal is configured to rise or fall along mutation and interrupted.It is F to detect program and set interruption resolution ratio
Second.For code-disc under maximum speed state, the tooth that space width is B interrupts the two of resolution ratio F by being less than the time required to detection means
/ mono-.
As shown in Fig. 2 the method for locating speed measurement of speed-position detection device of the present invention is as follows:Comprise the following steps:
Step 1:When the tooth edge of detection means alignment code-disc, the level of detection means, which is undergone mutation, produces pulse letter
Number, the interruption processing module of detection trigger chip;
Step 2:Interruption processing module calculates code-disc and often encloses time-consuming s [x] in real time, and s [x] represents institute's used time of code-disc xth circle
Between;
Step 3:Comparing code-disc, currently whether the time-consuming s [x] of circle encloses time-consuming s [x-1] in certain error scope with code-disc one
It is interior;When s [x] values and s [x-1] values are within a certain error range, assert that code-disc enters at the uniform velocity state, and enter step 4, otherwise
Return to step 2;
Step 4:When code-disc enters at the uniform velocity state, the time ratios P used between adjacent teeth is calculated in real time;CalculateC [x] [y] represents the time of the y teeth of xth circle, and y values are equal to umber of pulse M, when P's and R
Difference makes timer T=c [x] [1]=0 and umber of pulse M=1 in preset range.
Step 5:Compare P and R difference, when P and R difference is in preset range, it is code-disc physics to determine code-disc position
Zero-bit, into step 6, otherwise return to step 4.In embodiment, space width A is 2 times of space width B, R=2.Namely 1.95
During≤p≤2.05, timer T=c [x] [1]=0 and umber of pulse M=1 is made, assert that now code-disc is relative to the position of detection means
It is set to code-disc physics zero-bit.
Step 6:Angle J of the detection means relative to code-disc physics zero-bit is calculated in real time.Angle J=(y-1) × q+ (T-c
[x] [y]) × v, wherein q=360 ÷ (n+R-1), v=360 ÷ s [x].In the present embodiment, R=2, q=360 ÷ (n+1).
The method for locating speed measurement of the present invention is specific as follows:
In initial position, code-disc optional position alignment detection means, code-disc starts to rotate, and first tooth edge passes through inspection
When surveying device, the mutation of detection means level, detection trigger chip interrupt processing routine, the timer T of detection chip is continuous meter
When, now count umber of pulse M=1, x=1, y=1, time c [1] [1]=T.When second tooth edge passes through detection means, inspection
The mutation of device level is surveyed, detection trigger chip interrupt processing routine now counts umber of pulse M+1=2, x=1, y=2, time c [1]
[2]=T-c [1] [1], so repeat, until code-disc rotates to first tooth edge meter umber of pulse M=n+1 again, calculate the
Lap time s [1]=c [1] [n+1]-c [1] [1].Rotating speed v=360 ÷ s [1].Make x add 1, now x=2, make timer T=c
[2] [1]=0 and umber of pulse M=1.When second tooth edge passes through detection means, the mutation of detection means level, detection trigger
Chip interrupt processing routine, now count umber of pulse M+1=2, read timer current time c [2] [2], so repeat.Again count
The next circle s [2] of number, rotating speed v=360 ÷ s [2].When often completing a circle since then, compare as front ring s [x] and upper one circle s [x-
1] whether value is within a certain error range, such as 5%.If think to come at the uniform velocity state within this range.
After judging to enter at the uniform velocity state, because wind-driven generator is a Great inertia system, its rotating speed will not wink
When be mutated, space width can be detected in real time and pass through time-consuming c [x] [the y]-c [x] [y-1] of detection means and a upper tooth for A
Time-consuming c [x] [y-1]-c [x] [y-2] the ratio p of spacing for B by detection means,
Because space width A is R times of space width B, for code-disc under at the uniform velocity state, P values are about R times or so.R=is taken in the present embodiment
2, if P be 1.95 to 2.05 between when, it is believed that be now code-disc physics zero-bit at the level mutation of detection means, can also manage
It is code-disc physics zero-bit to solve as now code-disc relative to the position of detection means, and code-disc physics zero-bit is exactly that space width is A and tooth
Tooth edge of the spacing between B.
After finding code-disc physics zero-bit, timer T=c [x] [1]=0 and umber of pulse M=1, that is, reclocking are made,
Umber of pulse M is recalculated.Angle J of the detection means relative to code-disc physics zero-bit is calculated in real time.Angle J=(y-1) × q+ (T-
C [x] [y]) × v, wherein q=360 ÷ (n+R-1), v=360 ÷ s [x].In the present embodiment, R=2, q=360 ÷ (n+1).
If:Y=1, now T=c [x] [1]=0, J=(1-1) × q+ (T-c [x] [1]) × v=0.If:Y=2, J=q+ (T-c
[x][2])×v。
The speed-position detection device and method of the present invention, using high-frequency detection chip, setting is risen or fallen along interrupt mode.
Code-disc uses different space width structures, is tested the speed according to every circle institute is time-consuming, by when front ring institute it is time-consuming with upper one circle institute
It is time-consuming to compare, judge code-disc whether at the uniform velocity state.When at the uniform velocity state, calculating passes through space width A and between cog
Away from the time taking ratio P of B institutes, code-disc physics zero-bit is looked for by P values.Then detection means is calculated in real time relative to code-disc physics
The angle J of zero-bit.The device and method reduces the error of speed and angle, improves speed-position detection precision.In addition, the tooth of code-disc
Edge is right angle, reduces speed and angular error, improves speed-position detection precision.
Present invention also offers a kind of wind generator system, including above-mentioned speed-position detection device.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
God any modification, equivalent substitution and improvements made etc., should be included in the scope of the protection with principle.