CN100514068C - Method for measuring rotating speed of rotating shaft by sliding time window method - Google Patents

Method for measuring rotating speed of rotating shaft by sliding time window method Download PDF

Info

Publication number
CN100514068C
CN100514068C CNB200610125106XA CN200610125106A CN100514068C CN 100514068 C CN100514068 C CN 100514068C CN B200610125106X A CNB200610125106X A CN B200610125106XA CN 200610125106 A CN200610125106 A CN 200610125106A CN 100514068 C CN100514068 C CN 100514068C
Authority
CN
China
Prior art keywords
pulse
pulsecount
time window
lastread
pulsetime
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
CNB200610125106XA
Other languages
Chinese (zh)
Other versions
CN1975435A (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.)
Dongfeng Motor Corp
Original Assignee
Dongfeng Motor Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongfeng Motor Co Ltd filed Critical Dongfeng Motor Co Ltd
Priority to CNB200610125106XA priority Critical patent/CN100514068C/en
Publication of CN1975435A publication Critical patent/CN1975435A/en
Application granted granted Critical
Publication of CN100514068C publication Critical patent/CN100514068C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measuring Frequencies, Analyzing Spectra (AREA)
  • Measurement Of Unknown Time Intervals (AREA)

Abstract

The invention provides a method for measuring the rotating speed of a rotating shaft by a sliding time window method. The invention adopts a sliding time window to define the starting point and the end point of the time window, accurately measures the speed by recording the pulse number and the pulse accumulation time of an instant time window, and records the latest pulse number and the latest pulse time by utilizing an interrupt function as the initial value of the next time window to prepare for the next time window. The system effectively solves the problems of rapidity and accuracy of speed measurement.

Description

The method of measuring rotary shaft rotating speed by sliding time window method
Technical field
The present invention relates to a kind of method of measuring rotary shaft rotating speed by sliding time window method, be used in time accurately measuring of turning axle speed such as the engine speed or the speed of a motor vehicle.
Background technology
In the detection of the many parameters of Hyundai Motor, the detection of turning axle such as the engine speed or speed of a motor vehicle speed to driver and vehicle electrically controlling unit effectively Control of Automobile very big meaning is arranged, judge because will make rapidly and accurately, must obtain engine and vehicle speed value timely and accurately the ruuning situation of car.The turning axle velocity survey generally is that magnetoelectric transducer or Hall element are installed on axle, and shaping circuit is handled sensor signal and obtained pulse train, and microprocessor is by calculating present speed then.At present microprocessor tests the speed two kinds of methods is generally arranged: fixed time method and decide the pulse timing method.Fixed time method is meant a fixed sample in the time, the pulse number that sensor for countering produces, the long more precision that the fixed sample time establishes is just high more, but ECU (Electrical Control Unit) need be measured the result fast, so that control in time, therefore the fixed sample time must be shorter, when the speed of needs measurement was higher, the measuring accuracy and the rapidity of this algorithm were better, but when speed is low, the pulse that produces is less, and the precision of measurement is lower; Decide the pulse timing method and be meant that the pulse that adds up fixed qty comes computing velocity, this method precision is better, and when tested speed was high, the time of adding up was short, and velocity survey is more timely, but when tested speed was low, the time of adding up was long, and velocity survey is untimely.Because during vehicle operating, turning axle velocity variations such as engine or wheel box are very big,, all there are the accuracy of detection and the contradiction of rapidity no matter adopt that a kind of speed-measuring method all can not be suitable for all operating modes.
Summary of the invention
The objective of the invention is to solve the contradiction of existing speed-measuring method accuracy and rapidity, propose a kind of method of measuring rotary shaft rotating speed by sliding time window method.
Technical scheme of the present invention: the method for measuring rotary shaft rotating speed by sliding time window method comprises the measurement of the count pulse relevant with rotating speed and the treatment conversion of paired pulses, and speed-measuring method is as follows:
1) initialization, set: actual step-by-step counting PulseCount=0, rising edge of a pulse is PulseTime=0 constantly, the umber of pulse PulseCount_LastRead=0 the when last time effectively reads, pulse when the last time effectively reads is PulseTime_LastRead=0 constantly, present speed n=0;
2) first rising edge of a pulse after the initialization, interrupt function are set PulseCount=0, the zero hour PulseTime=T0, PulseCount_LastRead=0, PulseTime_LastRead=T0, present speed n=0;
3) second pulse arrives, and interrupt function is set PulseCount=PulseCount+1=0+1=1, PulseTime=T1.
Each pulse of 4) arriving soon after, interrupt function is set PulseCount_=PulseCount+1, PulseCount=N-1 when N pulse arrives, and write down current time PulseTime=T (N-1), umber of pulse N-1 that system log (SYSLOG) is up-to-date and rising edge of a pulse be T (N-1) constantly;
5) master routine requires computing velocity, this moment the last rising edge of a pulse T (N-1) before first rising edge of a pulse T0 and the current time is defined as the starting point and the terminal point of time window, the pulse number of time window is PulseCount=N-1, the pulse accumulation time is PulseTime=T (N-1)-T0, if the turning axle revolution produces k pulse, current rotating speed is represented with n, unit is rev/min (rpm), utilize pulse number and pulse accumulation Time Calculation present speed n=(N-1) * 60*1000000/{T (N-1)-T0}/k, and set PulseCount_LastRead=N-1, PulseTime_LastRead=T (N-1) is the starting point of next time window;
6) master routine requires computing velocity, method is with 5), the time window starting point of this moment is T (N-1), the time window terminal point is TM, pulse number is M-N-1, the pulse accumulation time is TM-T (N-1), present speed n={ (M-N-1) * 60*1000000}/{ TM-T (N-1) }/k, and set PulseCount_LastRead=M and PulseTime_LastRead=TM is the starting point of next time window; Each instantaneous velocity constantly of stochastic calculation repeatedly like this;
7) master routine requires computing velocity, if PulseCount=PulseCount_LastRead, showing does not also have pulse to arrive in the time window, and current computing velocity keeps previous computing velocity.
Advantage of the present invention: accurately test the speed by the pulse number and the pulse accumulation time of writing down an instant time window, and write down nearest pulse number and constantly as the initial value of next time window, for next time window is prepared.It has solved the contradiction of test the speed rapidity and accuracy effectively.
Description of drawings
Fig. 1 is sliding time window measuring principle figure.
Fig. 2 carries out interpret table to different programs constantly among Fig. 1.
Embodiment
The method of measuring rotary shaft rotating speed by sliding time window method of the present invention comprises the measurement of the count pulse relevant with rotating speed and the treatment conversion of paired pulses, and speed-measuring method is as follows:
1) initialization, set: actual step-by-step counting PulseCount=0, rising edge of a pulse is PulseTime=0 constantly, the umber of pulse PulseCount_LastRead=0 the when last time effectively reads, pulse when the last time effectively reads is PulseTime_LastRead=0 constantly, present speed n=0;
2) first rising edge of a pulse after the initialization, interrupt function are set PulseCount=0, the zero hour PulseTime=T0, PulseCount_LastRead=0, PulseTime_LastRead=T0, present speed n=0;
3) second pulse arrives, and interrupt function is set PulseCount=PulseCount+1=0+1=1, PulseTime=T1.
Each pulse of 4) arriving soon after, interrupt function is set PulseCount_=PulseCount+1, PulseCount=N-1 when N pulse arrives, and write down current time PulseTime=T (N-1), umber of pulse N-1 that system log (SYSLOG) is up-to-date and rising edge of a pulse be T (N-1) constantly;
5) master routine requires computing velocity, this moment the last rising edge of a pulse T (N-1) before first rising edge of a pulse T0 and the current time is defined as the starting point and the terminal point of time window, the pulse number of time window is PulseCount=N-1, the pulse accumulation time is PulseTime=T (N-1)-T0, if the turning axle revolution produces k pulse, current rotating speed is represented with n, unit is rev/min (rpm), utilize pulse number and pulse accumulation Time Calculation present speed n=(N-1) * 60*1000000)/{ T (N-1)-T0}/k, and set PulseCount_LastRead=N-1, PulseTime_LastRead=T (N-1) is the starting point of next time window;
6) master routine requires computing velocity, method is with 5), the time window starting point of this moment is T (N-1), the time window terminal point is TM, pulse number is M-N-1, the pulse accumulation time is TM-T (N-1), present speed n={ (M-N-1) * 60*1000000}/{ TM-T (N-1) }/k, and set PulseCount_LastRead=M and PulseTime_LastRead=TM is the starting point of next time window; Each instantaneous velocity constantly of stochastic calculation repeatedly like this;
7) master routine requires computing velocity, if PulseCount=PulseCount_LastRead, showing does not also have pulse to arrive in the time window, and current computing velocity keeps previous computing velocity.
Time window of the present invention (pulse accumulation time) can be set, revise, and also can produce at random, can change setting at any time.
Now describe the sliding time window speed-measuring method in detail in conjunction with Fig. 1, Fig. 2:
See indicating impulse rising edges such as accompanying drawing 1:T0, T1 constantly, 1., 2., 3. indicating impulse chain countings such as 0,1,2 wait the action of expression microprocessor.The configuration timer interrupts catching pulse during microprocesser initialization, it can be rising edge and also can be negative edge, use rising edge in this explanation, program is provided with 4 global variable: PulseCount (actual step-by-step counting), PulseTime (rising edge of a pulse constantly), PulseCount_LastRead (umber of pulse the when last time effectively reads), PulseTime_LastRead (pulse the when last time effectively reads constantly).The unit of supposing PulseTime, PulseTime_LastRead is microsecond (us), and the turning axle revolution produces k pulse, and current rotating speed represents that with n unit is rev/min (rpm).Test the speed and form by two parts: the one, interrupt function is caught pulse, corresponding in the accompanying drawing 1 2., 4., 5. the isopulse rising edge is constantly; The 2nd, the function that tests the speed is irregularly carried out (carry out when microprocessor is idle, the time can be very short, guarantees to test the speed in time fast), corresponding to 1., 3., 6., 7., 8., 9. waiting constantly in the accompanying drawing 1.
Specifically as Fig. 2:
1. initialization is set PulseCount=0, PulseTime=0, PulseCount_LastRead=0, PulseTime_LastRead=0, present speed n=0.
2. first rising edge of a pulse after the initialization, interrupt function is set PulseCount=0, PulseTime=T0, PulseCount_LastRead=0, PulseTime_LastRead=T0, present speed n=0.
3. master routine required computing velocity before second pulse came, because PulseCount=PulseCount_LastRead, PulseCount_LastRead, PulseTime_LastRead value are constant, and present speed n is constant, and=0.
4. second pulse arrives, and interrupt function is set PulseCount=PulseCount+1=0+1=1, PulseTime=T1.
Each pulse of 5. arriving soon after, interrupt function is set PulseCount=PulseCount+1, and writes down current time PulseTime.The benefit of doing like this is that system only writes down the up-to-date umber of pulse and the rising edge of a pulse moment, and interrupt function is very little, the operation of not influence system.
6. master routine requires computing velocity, this moment the last rising edge of a pulse T4 before first rising edge of a pulse T0 and the current time is defined as the starting point and the terminal point of time window, the pulse number of time window is PulseCount_LastRead-PulseCount=4-0=4, the pulse accumulation time is PulseTime_LastRead-PulseTime=T4-T0, utilizes pulse number and pulse accumulation Time Calculation present speed n=4*60*1000000)/(T4-T0)/k.And set PulseCount_LastRead=PulseCount=4, PulseTime_LastRead=PulseTime=T4 is for next time window is set starting point.
7. master routine requires computing velocity, and method is same 6., and this moment, the time window starting point was T4, and terminal point is T6, and pulse number is 6-4=2, and the pulse accumulation time is T6-T4.Present speed n=(2*60*1000000)/(T6-T4)/k, and set PulseCount_LastRead=PulseCount=6, PulseTime_LastRead=PulseTime=T6 is for next time window is set starting point.
8. master routine requires computing velocity, because PulseCount=PulseCount_LastRead=6, showing does not also have pulse to arrive in the time window, this moment sets PulseCount_LastRead and the PulseTime_LastRead value is constant, computing velocity before current computing velocity keeps.
9. method together 6..Present speed n=((8-6) * 60*1000000)/(T8-T6)/k.
Core of the present invention is accurately to test the speed by the pulse number and the pulse accumulation time of an instant time window of time slip-window record.Therefore, every pulse number and pulse accumulation time by a time window of time slip-window record tests the speed, and all belongs to protection scope of the present invention.

Claims (2)

1. the method for a measuring rotary shaft rotating speed by sliding time window method comprises the measurement of the count pulse relevant with rotating speed and the treatment conversion of paired pulses, and it is characterized in that: speed-measuring method is as follows:
1) initialization, set: actual step-by-step counting PulseCount=0, rising edge of a pulse is PulseTime=0 constantly, the umber of pulse PulseCount_LastRead=0 the when last time effectively reads, pulse when the last time effectively reads is PulseTime_LastRead=0 constantly, present speed n=0;
2) first rising edge of a pulse after the initialization, interrupt function are set PulseCount=0, the zero hour PulseTime=T0, PulseCount_LastRead=0, PulseTime_LastRead=T0, present speed n=0;
3) second pulse arrives, and interrupt function is set PulseCount=PulseCount+1=0+1=1, PulseTime=T1;
Each pulse of 4) arriving soon after, interrupt function is set PulseCount=PulseCount+1, PulseCount=N-1 when N pulse arrives, and write down current time PulseTime=T (N-1), umber of pulse N-1 that system log (SYSLOG) is up-to-date and rising edge of a pulse be T (N-1) constantly;
5) master routine requires computing velocity, this moment the last rising edge of a pulse T (N-1) before first rising edge of a pulse T0 and the current time is defined as the starting point and the terminal point of time window respectively, the pulse number of time window is PulseCount=N-1, the pulse accumulation time is T (N-1)-T0, current rotating speed is represented with n, utilize pulse number N-1 and pulse accumulation time T (N-1)-T0 to calculate present speed n, and setting PulseCount_LastRead=N-1, PulseTime_LastRead=T (N-1) are the starting point of next time window;
6) master routine requires computing velocity, method is with 5), the time window starting point of this moment is T (N-1), the time window terminal point is TM, pulse number is M-N-1, the pulse accumulation time is TM-T (N-1), utilizes pulse number M-N-1 and pulse accumulation time T M-T (N-1) to calculate present speed n, and sets PulseCount_LastRead=M and PulseTime_LastRead=TM is the starting point of next time window; Each instantaneous velocity constantly of stochastic calculation repeatedly like this;
7) master routine requires computing velocity, if PulseCount=PulseCount_LastRead, showing does not also have pulse to arrive in the time window, and current computing velocity keeps previous computing velocity.
2. the method for measuring rotary shaft rotating speed by sliding time window method according to claim 1, it is characterized in that: establish the turning axle revolution and produce k pulse, the unit of current rotation speed n is a rev/min rpm, utilizes pulse number N-1 and pulse accumulation time T (N-1)-T0 to calculate present speed n=(N-1) * 60*1000000/{T (N-1)-T0}/k.
CNB200610125106XA 2006-11-23 2006-11-23 Method for measuring rotating speed of rotating shaft by sliding time window method Active CN100514068C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB200610125106XA CN100514068C (en) 2006-11-23 2006-11-23 Method for measuring rotating speed of rotating shaft by sliding time window method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB200610125106XA CN100514068C (en) 2006-11-23 2006-11-23 Method for measuring rotating speed of rotating shaft by sliding time window method

Publications (2)

Publication Number Publication Date
CN1975435A CN1975435A (en) 2007-06-06
CN100514068C true CN100514068C (en) 2009-07-15

Family

ID=38125647

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB200610125106XA Active CN100514068C (en) 2006-11-23 2006-11-23 Method for measuring rotating speed of rotating shaft by sliding time window method

Country Status (1)

Country Link
CN (1) CN100514068C (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101398439B (en) * 2007-09-30 2010-11-17 台达电子工业股份有限公司 Method for auto-setting starting estimation rotate speed for motor tachometric survey system
CN105403725A (en) * 2015-12-11 2016-03-16 重庆鸿引电子有限公司 Rotating speed measurement method and system, and tachometer
CN106645786B (en) * 2016-12-31 2019-11-15 深圳市优必选科技有限公司 Permanent magnet synchronous motor speed detection method and device
CN107725202B (en) * 2017-10-10 2019-10-29 中国第一汽车股份有限公司 The processing unit of tach signal
CN110081910B (en) * 2019-04-23 2021-06-22 福建睿能科技股份有限公司 Signal modulation method, modulation system, demodulation method, demodulation system and embroidery machine
CN111122897B (en) * 2019-12-23 2021-01-05 无锡物联网创新中心有限公司 Spindle rotating speed capturing method in magnetoelectric single spindle detection system and related device
CN114120699B (en) * 2021-11-23 2024-04-12 成都云创汇科科技有限公司 Vehicle detection method, device and medium based on sliding pane

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4281388A (en) * 1979-07-09 1981-07-28 Deere & Company Tachometer
DE19918542A1 (en) * 1999-04-23 2000-10-26 Zahnradfabrik Friedrichshafen Arrangement for accurate measurement of revolution rate of rotating component has measurement window variable in direction of passing markings as function of revolution rate
CN1580784A (en) * 2004-05-18 2005-02-16 桂林星辰电力电子有限公司 Method for measuring motor speed at low-speed operation by using pulse coder

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4281388A (en) * 1979-07-09 1981-07-28 Deere & Company Tachometer
DE19918542A1 (en) * 1999-04-23 2000-10-26 Zahnradfabrik Friedrichshafen Arrangement for accurate measurement of revolution rate of rotating component has measurement window variable in direction of passing markings as function of revolution rate
CN1580784A (en) * 2004-05-18 2005-02-16 桂林星辰电力电子有限公司 Method for measuring motor speed at low-speed operation by using pulse coder

Also Published As

Publication number Publication date
CN1975435A (en) 2007-06-06

Similar Documents

Publication Publication Date Title
CN100514068C (en) Method for measuring rotating speed of rotating shaft by sliding time window method
CN102998482B (en) Measuring method for errors of rotating speed sensor
CN100565241C (en) Ultrasonic echo frontier inspection based on modulation domain measurement
CN104569472B (en) A kind of velocity acquiring method based on photoelectric pulse coder
CN201594092U (en) Novel vehicular speed and range measuring equipment with multiple sensors
JPS63253221A (en) Method and device for computing fuel profitability corrected of vehicle
CN103698550B (en) Ship tail shaft speed measurement device with single Hall proximity type sensor
CN102053165B (en) Systems and method for measuring vehicle speed
CN204854761U (en) Odometer
CN105738642A (en) T-method motor speed measurement method of four-way parallel sampling
CN109283354A (en) A kind of change M/T speed-measuring method based on incremental optical-electricity encoder
CN103760376A (en) Engine rotating speed measuring instrument based on vibration principle and test method thereof
CN112697438B (en) Turboprop engine pitch-phase angle-rotating speed measuring device and method based on tone wheel
CN103308710A (en) Motor vehicle speed detection device and method based on piezoelectric transducers
CN103995144B (en) A kind of brshless DC motor high-performance speed-measuring method
CN103822641A (en) Vehicle mileage counting method
CN104136755B (en) Bad road decision maker
CN101881784B (en) Position and speed measuring device based on inductosyn or rotary transformer
CN104344865A (en) Automobile fuel signal processing method and automobile fuel signal processing system
CN114518782A (en) Micro control unit, motor rotating speed measuring method and system and storage medium
CN103292858B (en) A kind of accurate and effective measured automobiles fuel tank oil material method
CN101893467A (en) Method for measuring fuel consumption of medium and heavy vehicles
CN104655147A (en) Digital odometer
CN101592534B (en) Graphical recording method for force value tests
CN203909564U (en) Signal collection device suitable for multiple sensors

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: DONGFENG CAR CO.

Free format text: FORMER OWNER: DONGFENG AUTOMOBILE CO., LTD.

Effective date: 20130711

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20130711

Address after: 430056 Wuhan economic and Technological Development Zone, Hubei Province, Dongfeng Road, No. 1, No.

Patentee after: Dongfeng Motor Corporation

Address before: 430056 No. 10 Dongfeng Avenue, Zhuankou economic and Technological Development Zone, Wuhan, Hubei, Hanyang, Wuhan

Patentee before: DONGFENG MOTER Co.,Ltd.