Process and device for acquisition of data of a counting device measuring pulses delivered by a sensor

10352733 ยท 2019-07-16

Assignee

Inventors

Cpc classification

International classification

Abstract

A process for the acquisition of data of a counting device measuring pulses delivered by a sensor can include reading a first datum value of the counting device. The first datum value corresponds to the pulse emitted by the sensor. The process can also include storing in memory the first datum value as a source value. The process can also include measuring a time-interval between said reading and an incremental change of the first datum value of the counting device to a second datum value. The process can also include obtaining a first adjustment value Vx in response to the measured time interval.

Claims

1. A process for the acquisition of data of a counting device measuring pulses delivered by a sensor associated with a mobile unit comprising: reading a first datum value from a data output of the counting device through a read-input port of a data acquisition device, wherein the first datum value corresponds to a first number of digital pulses emitted by the sensor and corresponds to a sensed position of the mobile unit; storing a second datum value with the counting device, wherein the second datum value corresponds to a second number of digital pulses emitted by the sensor, and wherein the second datum value is greater than the first datum value; storing a third datum value with the counting device, wherein the third datum value corresponds to a third number of digital pulses emitted by the sensor, and wherein the third datum value is less than the first datum value; storing in memory of the data acquisition device the first datum value as a first source value; measuring, with a chronometer of the data acquisition device, a first time interval between said reading the first datum value from the data output through the read-input port and said storing the second datum value with the counting device; obtaining, with the data acquisition device, a first adjustment value V.sub.x based on the first source value stored in the memory of the data acquisition device adjusted in response to the measured first time interval; and outputting, from the data acquisition device, the first adjustment value V.sub.x as representative of a position of the mobile unit rather than the first source value.

2. The process of claim 1 wherein said obtaining is further defined as: V x = ( C x - 1 + 1 ) + [ C x - C x - 1 ] ( N p - D 1 ) N p - D 1 + D 2 where: x is a current index value, V.sub.x is the adjustment value at the current index value, C.sub.x is the first datum value of the counting device and is sampled at the current index value, D.sub.2 is the first time interval lasting between the sampling of C.sub.x and the first incremental change of the counting device to the second datum value, C.sub.x1 is the third datum value of the counting device at a first index value that precedes the current index value x and is also itself representative of a change of increment of the counting device, D.sub.1 is a second time interval lasting between the sampling of C.sub.x1 and a next change of increment of the counting device, p is a period between two consecutive samplings of the counting device, and N is a number of changes increment of the counting device between C.sub.x1 and C.sub.x.

3. The process of claim 2 wherein said obtaining is further defined as obtaining first and second adjustment values V.sub.xi and V.sub.x+M each at a different index values from the current index value.

4. The process of claim 3 wherein said obtaining is further defined as obtaining a third adjustment value by linear interpolation of the first and second adjustment values V.sub.xi and V.sub.x+M.

5. The process of claim 1 further comprising: obtaining a frequency of increments of the counting device.

6. The process of claim 1 wherein said obtaining is further defined as: obtaining the first adjustment value V.sub.x as a decimal number.

7. A data acquisition device for acquisition of data from a counting device operating at a first frequency and measuring pulses delivered by a sensor associated with a mobile unit and comprising: a sampling clock outputting pulses according to a second frequency; at least one read-input port configured to connect to a data output of the counting device; a processing unit configured to repeatedly sample a datum value stored by the counting device through said at least one read-input port and store in memory each of the sampled datum value as a source value at each pulse of said sampling clock, wherein each stored source value corresponds to a sensed position of the mobile unit; a chronometer measuring a time-interval between a sampling of a first datum value by said processing unit and a change of the first datum value stored by the counting device to a second datum value stored at the counting device; and wherein said processing unit is also configured to calculate an adjustment value based on the first source value adjusted at least partially in response to the measured time-interval, and said processing unit also configured to output the adjustment value as a position of the mobile unit instead of the stored first source value.

8. The data acquisition device of claim 7 wherein the first frequency of the counting device is independent of said second frequency of said sampling clock.

9. The data acquisition device of claim 8 wherein said processing device is further defined as configured to assign a timestamp to the adjustment value equal to an instant of acquisition of the source value associated with the adjustment value.

10. The process of claim 1 further comprising: allocating the adjustment value to an instant of sampling of the counting device on the basis of a measured calculation time interval between the sampling and the end of the calculation of the adjustment value.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) Other objectives, characteristics and advantages of the present disclosure will become apparent from the following description which has been given by way of non-limiting example and which refers to the appended Figures in which:

(2) FIG. 1 is a sequential diagram of an exemplary operation for the acquisition and processing of the data,

(3) FIG. 2 is a diagram illustrating the interactions between the various elements of an exemplary data acquisition device enabling the various steps to be realized, according to an embodiment of this device,

(4) FIG. 3 is a timing diagram illustrating a first example of acquisition and processing of the acquired data,

(5) FIG. 4 is a timing diagram illustrating a second example of acquisition and processing of the acquired data, and

(6) FIG. 5 is a graph to illustrate frequency calculation.

DETAILED DESCRIPTION

(7) An embodiment of the process according to the present disclosure, represented in FIG. 1, enables each source value of a counting device to be adjusted by a data acquisition device in order to obtain values that are representative of the positioning of a mobile unit associated with the sensor. The process includes a step 18 of sampling of a datum value C of the counting device, named current sampling C.sub.x, by the data acquisition device. The sampling is carried out in accordance with a sampling frequency corresponding to a sampling period. Then, a test 19 is carried out, in order to determine whether the value C.sub.x is representative of an incrementation of the counting devicethat is to say, if this value has not already been read or sampled previously. If the value C.sub.x is not representative of an incrementation, the process is repeated, beginning by a sampling of a new source value in step 18.

(8) It is noted that C is a count value wherein C.sub.y is the value held by the counting device at the index value y associated with the counting device and C.sub.x is the value sampled and read by the data acquisition device at the index value x. The index value x corresponds to the rising edge of the step function of the exemplary sampling clock of the data acquisition device.

(9) Datum value C.sub.y of the counting device present at index value x is recorded as C.sub.x by the data acquisition device at a step 20 and an adjustment value is calculated if C.sub.x is representative of an incrementation of the counting device (C.sub.xC.sub.x1). A step 21 of measurement of the time-interval D.sub.2 between the sampling of the source value C.sub.x sampled by the data acquisition device and the next incrementation of the counting device is also initiated after the test 19 initiated. Afterwards, in the course of a calculation step 22, an adjustment value V.sub.x is calculated on the basis of:

(10) the source value C.sub.x,

(11) the measured time-interval D.sub.2,

(12) a source value C.sub.x1 obtained at the time of a preceding sampling, that is itself representative of a change of value of the counting device preceding the sampling of value C.sub.x,

(13) the time-interval D.sub.1 between this preceding sampling and the change of value of the counting device that follows it,

(14) the period p between two samplings (the sampling frequency of the sampling clock of the data acquisition device).

(15) The formula that is used takes the following form:

(16) V x = ( C x - 1 + 1 ) + [ C x - C x - 1 ] ( N p - D 1 ) N p - D 1 + D 2

(17) where:

(18) N is the number of pulses emitted by the sensor (the number of physical events detected by the sensor) and therefore the number of changes of value of the counting device, occurring between the preceding sampling C.sub.x1 and the current sampling C.sub.x,

(19) x is an index associated to the sampling of C.sub.x by the data acquisition device,

(20) This calculation is carried out when all the parameters necessary for the calculation have been acquiredthat is to say, after the end of the step of measurement of the elapsed time-interval D.sub.2.

(21) A test 23 is carried out, in order to determine whether a value (such as C.sub.x), non-representative of an incrementation of the counting device, has been detected, at test 19, between the last two calculations of adjustment values of source values representative of an incrementation (such as C.sub.x1 and C.sub.x+i). If a value C.sub.x, non-representative of an incrementation of the counting device, has not been detected, the process is repeated, beginning by a sampling of a new source value in step 18. Otherwise, if a value C.sub.x, non-representative of an incrementation of the counting device, has been detected, a step 24 has to be carried out.

(22) A step 24 is therefore carried out to adjust the source value (such as C.sub.x) that is not representative of an incrementation of the counting device. In fact, the three steps 20, 21 and 22 only enable an adjustment value to be calculated for the sampling that follows an incrementation of the counting device in one or more exemplary embodiments of the present disclosure. Now, since the calculation of the adjustment value derived from the first sampling can only be carried out after a new incrementation of the counting device, and since a single calculation cannot be carried out at the same time, because a measurement of the time-interval and a calculation are only carried out after the end of the calculation of the preceding adjustment value, some source values retained by the data acquisition device are not adjusted, hereby named missing adjustment values. The missing adjustment values can be viewed as not representative of an incrementation of the counting device. At least one missing adjustment value V.sub.x is then determined by linear interpolation of two adjacent, calculated adjustment values V.sub.xi and V.sub.x+M resulting from the three steps 20, 21, 22. The adjustment values V.sub.xi and V.sub.x+M are adjacent along the index x, separated along the index x by one or more missing adjustment values. V.sub.xi is the calculated adjustment value immediately preceding the missing adjustment value V.sub.x of interest. V.sub.x+M is the calculated adjustment value immediately proceeding the missing adjustment value V.sub.x of interest. Each missing adjustment value V.sub.x can be calculated on the basis:

(23) of the number M samplings of the counting device by the data acquisition device between the current index value x and the sampling of the calculated adjustment value V.sub.x+M,

(24) of the number i of samplings of the counting device by the data acquisition device between the current index value x and the calculated adjustment value V.sub.xi,

(25) where:

(26) x is an index associated to the sampling of the source value of V.sub.x, the sampling frequency of the sampling clock.

(27) The calculation of each adjustment value V.sub.i is realized in accordance with the formula:

(28) V x = V x - i + ( i ) V x + M - V x - i M + i

(29) These adjustment values are then recorded. The process is then repeated, beginning by a sampling of a new source value in step 18.

(30) This process enables, on the one hand, the lack of precision of the counting device, resulting from the temporal discretisation, to be rectified, but also enables the sampling to be made asynchronous in relation to the operating frequency of the counting device.

(31) Since the calculated and determined adjustment values can be represented by a decimal number, this process enables results to be obtained that are representative of the positioning of the mobile unit on the basis of a sampling frequency lower than the operating frequency of the counting device. In consequence, this brings about a higher precision, CPU gains and a lowering of the volume, and therefore of the cost of storage, of the data.

(32) In one or more operating environments for embodiments of the present disclosure, the output information desired can be a frequency associated with the mobile unit. It is noted that in one or more other operating environments, an embodiment of the present disclosure may not be outputting a value of frequency. The present disclosure is not limited to embodiments and/or operating environments in which a value for frequency is an output. In order to know the speed of the mobile unit, for example its angular velocity in the case of a rotary encoder, it is necessary to know the frequency of the events occurring at the sensorthat is to say, the frequency of the pulses of the train of pulses. This frequency F can be calculated in accordance with the following formula:
F=T1/T2

(33) where:
T1=(C.sub.xC.sub.xn).Math.p.Math.sr, and
T2=(N.Math.p)D.sub.1+D.sub.2,

(34) where:

(35) C.sub.x is the current source value,

(36) C.sub.xn is a prior source value sampled n sampling periods before the current index value x,

(37) sr is the sampling frequency of the data acquisition device,

(38) N is the number of changes of value of the counting device between C.sub.xn and C.sub.x,

(39) T1 represents the number of incrementations of the counting device during a sampling period,

(40) T2 represents the number of incrementations of the counting device between the end of the measurement of D.sub.1 and the end of the measurement of D.sub.2.

(41) For each adjustment value calculation, a step of synchronization of the adjustment value in relation to its source value is carried out on the basis of a measured calculation duration representing the duration necessary for the calculation of the adjustment value, and therefore, in part, on the basis of the duration necessary to know all the parameters of the calculations. For example, the calculation of an adjustment value in the course of steps 20, 21, 22 necessitates the acquisition of time-interval D.sub.2. This calculation therefore involves a delay between the sampling of the source value of the counting device and its associated adjustment value.

(42) The calculation duration also enables the adjustment values to be reordered in relation to the order of their source values. In fact, the order of calculation of the adjustment values is not necessarily the order of acquisition of the source values. For example, a missing adjustment value is calculated after the calculation of the adjustment value that follows the incrementation of the counting device following the sampling of the source value of this missing adjustment value. Now, the acquisition of the source value of the missing adjustment value precedes that of the source value of the adjustment value that follows.

(43) A data acquisition device 25 designed for the implementation of a process for acquisition of data of a counting device as described above is represented in FIG. 2. The data acquisition device 25 has one read-input port that is suitable to be able to be connected to a data output of the counting device 27 measuring pulses delivered by a sensor 26 cooperating with a mobile unit 43 to obtain information on the mobile unit 43 such as the position of the mobile unit 43 and/or its speed and/or its acceleration. The counting device 27 is able to increment a value for each change of state of the sensor 26.

(44) Such a data acquisition device 25 includes a processing unit 28, a sampling clock 29 and a chronometer 30. The processing unit 28 enables the values of the counting device to be read at each rising edge of pulses that are output by the sampling clock 29 according to the sampling frequency, and enables the adjustment values to be calculated. The processing unit 28 also enables the adjustment values to be synchronized. This processing unit 28 includes, in particular, an arithmetic logic unit enabling the calculations to be carried out, and a memory in which the source values and the results of the calculations are recorded. The chronometer 30 operating at a frequency preferably higher than 10 MHz, for example of the order of 100 MHz, enables the time-interval between a rising edge of the sampling clock 29 and the first incrementation of the counting device 27 that follows it to be measured. The calculation duration is measured by the processing unit, by counting the number of pulses of the sampling clock 29.

(45) It is noted that in one or more embodiments of the present disclosure, the sampling clock 29 and the chronometer 30 can be embodied in a XILINX, Spartan-6 FPGA. It is noted that in one or more other embodiments of the present disclosure, the sampling clock 29 and the chronometer 30 can be embodied in one or more other devices. The present disclosure is not limited to embodiments incorporating a XILINX, Spartan-6 FPGA. In one or more embodiments of the present disclosure, the processing unit 28 can be embodied in an Intel i7 processor. It is noted that in one or more other embodiments of the present disclosure, the processing unit 28 can be embodied in another device. The present disclosure is not limited to embodiments incorporating an Intel i7.

(46) In some embodiments, the counting device can be included in the data acquisition device or assembled to the sensor.

(47) In one embodiment, when a mobile unit 43 is subjected to a test, the processing unit can also acquire other data, named subsidiary data, stemming from other sensors or from other counting devices. In this case the measurement of the calculation duration enables these subsidiary data to be synchronized with the adjustment values. Indeed, the acquisition of these subsidiary data may be faster than the time for calculation of the adjustment values. Now, it may be necessary to synchronize each subsidiary datum with the adjustment value of a source value acquired at the same instant, in order to link them. The data acquisition device is able to assign a timestamp to an adjustment value equal to an instant of acquisition of the source value of the adjustment value. Then the adjustment value can be synchronized with the other data.

(48) Two examples of acquisition and processing of data of a counting device according to the present disclosure are represented in FIGS. 3 and 4 by timing diagrams. In these two examples:

(49) curve 31 represents the pulses of the sampling clock 29, exhibiting rising edgesrising edges 36, 37 in FIG. 3, and 38, 39 and 40 in FIG. 4and falling edges,

(50) curve 32 represents the pulses that are output by the sensor 26 corresponding to the changes of state of the sensor 26,

(51) curve 33 represents the counting device 27 incrementing with each pulse which is output by the sensor 26 (each exemplary C value along curve 33 has a value of 1 greater than the preceding value in the exemplary embodiment),

(52) curve 34 represents a sampling process by the data acquisition device 25 without adjustment, the source values C.sub.x. In such a process, the processing unit 28 will simply read the value of the counting device 27 at each rising edge of the sampling clock 29 and will record it without complementary processing,

(53) curve 35 represents the adjustment values derived from the acquisition and processing of the source values realized by a device according to one or more embodiments of the present disclosure.

(54) It is noted that the points designated with V on curve 35 represent values that will be read by a user, or output values. It is further noted that the points designated with C on curve 33 represent values generated internally and not necessarily output.

(55) The first example, represented in FIG. 3, corresponds to an acquisition in the course of which the counting device 27 increments more than once during a sampling periodthat is to say, three times between a rising edge 36 and a rising edge 37 of the sampling clock 29. In this example, the aim is to calculate adjustment value V3, the source value of which is C3. The first rising edge of the sampling clock 29 that follows an incrementation of the counting device and precedes index value 3 is rising edge 36. Rising edge 36 comes into being after the counting device 27 takes value C2. The processing unit 28 then records the value C2, and the chronometer 30 begins to measure the elapsed time-interval D1 until the next incrementation 41 of the counting device 27 is that taking value C3. It is noted that C2 and C2 are equal to one another and are equal to 2. The rising edge of the sampling clock 29 that follows another incrementation of the counting device 27 is rising edge 37. The processing unit 28 then samples value C5 along curve 33 of the counting device 27 as C3 and the chronometer 30 begins to measure the elapsed time-interval D2 until the next incrementation 42 of the counting device 27, that being C6. It is noted that C5 and C3 are equal to one another and are equal to 5. C5 is an exemplary first datum value, C6 is an exemplary second datum value and is a proceeding and upward incremental change relative to the first datum value C5, and C3 is an exemplary third datum value and a preceding and downward incremental change relative to the first datum value C5. The processing unit 28 then calculates said adjustment value V3 as a function of the elapsed time-intervals D1 and D2 and of values C2 and C5 in accordance with the formula:

(56) V 3 = ( C 2 + 1 ) + [ C 3 - C 2 ] ( 3 p - D 1 ) 3 p - D 1 + D 2

(57) where p is constant and equal to the period of the sampling clock. N=3 as FIG. 3 shows three physical events detected by the sensor 26 between index values 2 and 3 of the sampling clock 29. The calculation is carried out at instant S.sub.1 when all the parameters necessary for the calculation of V.sub.3 have been acquired. Adjustment value V.sub.3 is then stored in memory. In parallel, the processing unit 28 counts the number of periods between the sampling of C.sub.5 and instant S.sub.1, in order to measure the calculation time-interval D.sub.3, afterwards enabling the adjustment values to be synchronized with the subsidiary data that may be acquired.

(58) The second example, represented in FIG. 4, corresponds to an acquisition in the course of which the counting device increments after a duration longer than a sampling period. Two adjustment values V.sub.5 and V.sub.7 have already been previously calculated and allocated respectively to rising edges 38 and 40 in the same way as for the first example, by measuring the elapsed time-intervals D.sub.4 and D.sub.5. However, time-interval D.sub.6 for calculation of V.sub.6 is longer than a sampling period p. As a consequence, no calculated adjustment value V.sub.6 is yet allocated to rising edge 39. This missing adjustment value V.sub.6 will then be calculated by the processing unit 28 by using said adjustment values V.sub.5 and V.sub.7 in order to apply a linear interpolation to obtain said missing adjustment value V.sub.6 in accordance with the following formula:

(59) V 6 = V 5 + ( 1 ) V 7 - V 5 2

(60) In the exemplary application of the general equation, i is equal to one since the immediately preceding adjustment value was calculated and not determined by interpolation. M is also equal to one since the immediately proceeding adjustment value was calculated and not determined by interpolation. The calculation is carried out at instant S.sub.2 when all the parameters necessary for the calculation of V.sub.6 have been acquired. Adjustment value V.sub.6 is then stored. In parallel, the processing unit 28 counts the number of periods between the sampling of C.sub.9 and instant S.sub.2, in order to measure the calculation time-interval D.sub.7 enabling the missing adjustment value V.sub.6 to be reordered afterwards in accordance with the order of acquisition of the source values of adjustment values V.sub.5, V.sub.6 and V.sub.7 and enabling the adjustment values to be synchronized with the subsidiary data that may be acquired.

(61) FIG. 5 is a graph to illustrate frequency calculation. It is again noted that the present disclosure is not limited to embodiments and/or operating environments in which frequency is calculated. Curve 31 represents the pulses of the sampling clock 29. For example, assume that rising edge 44 corresponds to index value x=3 and that rising edge 46 corresponds to index value x=4. Curve 33 represents the counting device 27 incrementing with each pulse which is output by the sensor 26. The frequency of the mobile unit 43 at index value x=3, is found by:
F.sub.3=T1/T2

(62) where:
T1=(C.sub.4C.sub.3).Math.p.Math.sr, and
T2=(N.Math.p)D.sub.1+D.sub.2,

(63) where:

(64) C.sub.4 is the current source value and equals 5,

(65) n=1 since the source values are immediately adjacent to one another along the index,

(66) C.sub.3 is a prior source value sampled n sampling periods before the current index value x and equals 2,

(67) sr is the sampling frequency of the data acquisition device,

(68) N is the number of changes of value of the counting device between C.sub.3 and C.sub.4 and equals 3,

(69) T1 corresponds to number of incrementations of the counting device during a sampling period,

(70) T2 corresponds to the number of incrementations of the counting device between the end of the measurement of D.sub.1 and the end of the measurement of D.sub.2.

(71) One or more embodiments of the present disclosure may form the subject of numerous embodiment variants in comparison with the embodiment described above. In particular, in the embodiment described previously the values of the counting device are read at rising edges of the sampling clock. However, there is nothing to prevent this sampling from being carried out at the falling edges of the sampling clock. Likewise, a value of the counting device may be read at each rising edge and falling edge, in order to increase the precision of the acquisition.

(72) The device may possess several counting devices and several chronometers.

(73) One application of such a process consists in measuring the positioning and/or speed and/or acceleration of an object. For example, such a process may be applied in order to measure the speed of rotation of a motor, or that of the wheels of a robot, or in order to measure the speed of displacement of an elevator. The process may also be applied for harmonic tracking where phase and frequency are needed and also in order to measure torsional vibration of a shaft.