A low power consumption electronic counter and counting method thereof
By collecting and processing pulse induction signals in an electronic counter and dynamically adjusting the quantification range of the ADC module, the problem of counting errors in the existing technology is solved and the accuracy of counting is improved.
Patent Information
- Application Number
- CN202411204155.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-08-30
AI Technical Summary
During the analog-to-digital conversion process of existing electronic counters, improper quantization range setting leads to counting errors, especially when the induced signal voltage change information exceeds the quantization range, the ADC module cannot accurately capture the pulse signal information.
By collecting each pulse induction signal and real-time induction signal during the historical operation of the electronic counter, filtering and mutation point detection are performed to determine the noise amplitude and basic quantization length, construct a pulse mapping function, and dynamically adjust the quantization range of the ADC module to adapt to different times. Sensing signal change rate.
It effectively avoids counting errors caused by improper setting of the quantization range of the electronic counter, improves the accuracy of counting, and ensures that the ADC module is not sensitive to noise signals.
Smart Images

Figure CN118740145B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic digital processing, and in particular to a low-power electronic counter and a counting method thereof. Background Art
[0002] An electronic counter is a device that counts electrical digital signals with low power consumption. It can be widely used in the fields of timing and counting such as elevators, machinery, packaging, and switch cabinets. Compared with traditional counters, electronic counters are characterized by low power consumption and high durability due to their small size, high integration, and no mechanical wear. During the use of an electronic counter, when a pulse signal appears in the induction signal, the count value of the electronic counter will increase by one. The induction signal is an analog signal, and the electronic counter needs to convert the analog signal into a digital signal through the built-in ADC module, and then use the digital signal to determine whether a pulse occurs. Therefore, the more accurate the analog-to-digital conversion of the ADC module, the more accurate the counting result of the electronic counter.
[0003] In the process of analog-to-digital conversion, the ADC module needs to set the quantization range, so that the ADC module converts the voltage within the quantization range into the corresponding digital, and the ADC module directly ignores the voltage outside the quantization range. In the actual working field, the voltage of the sensing signal may change greatly. When the voltage change information of the sensing signal is outside the quantization range, the ADC module will not be able to capture the accurate pulse signal information, resulting in the final counting error. Therefore, in the electronic counter, improper setting of the quantization range of the built-in ADC module of the electronic counter will lead to counting errors. Summary of the invention
[0004] In order to solve the above technical problems, a low-power electronic counter and a counting method thereof are provided to solve the existing problems.
[0005] The solution to the technical problem of the present application is to provide a low-power electronic counter and a counting method thereof, comprising the following steps:
[0006] In a first aspect, an embodiment of the present application provides a low-power electronic counter counting method, the method comprising the following steps:
[0007] Collect each pulse induction signal during the historical operation of the electronic counter, as well as the real-time induction signal at each moment;
[0008] Filtering each pulse induction signal to obtain each smooth pulse signal, extracting the mutation point of each smooth pulse signal; dividing each smooth pulse signal into a plurality of signal segments with the mutation point as a segmentation point;
[0009] Analyze the changes of elements in different signal segments and the differences between elements in the signal segments in each smooth pulse signal to determine the noise amplitude; obtain the basic quantization length;
[0010] Determine the historical pulse slope of each smooth pulse signal according to the change rate between the maximum mutation point and other mutation points in each smooth pulse signal, and construct a pulse mapping function in combination with the basic quantization length;
[0011] The real-time pulse slope at each moment is determined according to the change rate between adjacent elements in the real-time sensing signal at each moment; the real-time pulse slope is used as the independent variable of the pulse mapping function, combined with the basic quantization length, to determine the quantization range of the built-in ADC module of the electronic counter at each moment, and count the pulse signal.
[0012] Preferably, the determining of the noise amplitude comprises:
[0013] Calculate the mean of all elements in each signal segment of each smoothed pulse signal, and record it as the signal mean;
[0014] The signal segment corresponding to the minimum value of the signal mean is recorded as a non-pulse signal segment; according to the time period corresponding to the non-pulse signal segment, the signal of the same time period is intercepted from the pulse sensing signal and recorded as a noise signal segment;
[0015] The range of all elements in the noise signal segment of each pulse induction signal is taken as the signal amplitude of each pulse induction signal;
[0016] The average value of the signal amplitudes of all pulse induction signals during the historical operation is taken as the noise amplitude.
[0017] Preferably, the basic quantization length is calculated as follows: ,in, is the basic quantization length, is the noise amplitude, It is the preset resolution of the ADC module.
[0018] Preferably, determining the historical pulse slope of each smoothed pulse signal comprises:
[0019] The maximum value of all elements in each smooth pulse signal is recorded as the pulse vertex of each smooth pulse signal;
[0020] Analyze the difference between the mutation point before the pulse peak of each smooth pulse signal and the signal mean value of the non-pulse signal segment to determine the pulse starting point of each smooth pulse signal;
[0021] Record the difference between the pulse starting point and the pulse apex as the first difference;
[0022] Calculate the interval duration between the pulse start point and the pulse apex; and use the ratio of the first difference to the interval duration as the historical pulse slope of each smoothed pulse signal.
[0023] Preferably, the step of determining the pulse starting point of each smooth pulse signal comprises:
[0024] The product of the signal mean value of the non-pulse signal segment in each smooth pulse signal and the preset judgment threshold is recorded as the jump point judgment value;
[0025] All mutation points are traversed forward from the pulse vertex of each smooth pulse signal in turn, and the mutation point that is less than or equal to the jump point judgment value for the first traversal is recorded as the pulse starting point of each smooth pulse signal.
[0026] Preferably, the constructing of the pulse mapping function comprises:
[0027] The pulse peak of the smooth pulse signal corresponding to each pulse induction signal is recorded as the optimal pulse voltage of each pulse induction signal;
[0028] Taking the ratio of the optimal pulse voltage to the basic quantization length as the optimal multiple of each pulse induction signal;
[0029] The historical pulse slope and the optimal multiple of each pulse induction signal form a two-dimensional data pair; the two-dimensional data pairs of all pulse induction signals during the historical operation are curve fitted, and the fitting function is recorded as a pulse mapping function.
[0030] Preferably, the determining of the real-time pulse slope at each moment includes:
[0031] The difference between each element in the real-time sensing signal at each moment and the previous element is recorded as the second difference;
[0032] Calculate the time interval between each element and the previous element in the real-time sensing signal at each moment; record the ratio of the second difference to the time interval as the signal change rate of each element;
[0033] The average value of the signal change rate of all elements in the real-time sensing signal at each moment is taken as the real-time pulse slope at each moment.
[0034] Preferably, the quantization range of the built-in ADC module of the electronic counter at each moment is ,in, is the optimal high voltage at each moment.
[0035] Preferably, the optimal high voltage at each moment includes:
[0036] The real-time pulse slope at each moment is used as the independent variable of the pulse mapping function to obtain the best multiple at each moment;
[0037] The product of the best multiple at each moment and the basic quantization length is taken as the best high voltage at each moment.
[0038] In a second aspect, an embodiment of the present application further provides a low-power electronic counter, wherein the counting of the counter is implemented by using any of the above-mentioned low-power electronic counter counting methods.
[0039] This application has at least the following beneficial effects:
[0040] The present application analyzes the changes of elements in different signal segments in each smooth pulse signal and the differences between elements in the signal segments to determine the noise amplitude; obtains the basic quantization length, which has the beneficial effect of considering the pulse component and high-frequency noise component in the pulse induction signal, distinguishing the noise signal segment without pulse component, and obtaining the basic quantization length to ensure that the ADC module is not sensitive to the noise signal and avoid electronic counter counting errors; constructs a pulse mapping function according to the change rate of the maximum mutation point and other mutation points in each smooth pulse signal, and the difference between the maximum mutation point and the basic quantization length, which has the beneficial effect of analyzing the mapping relationship between the slope of the change of the pulse signal and the pulse voltage; determines the real-time pulse slope at each moment according to the change rate between adjacent elements in the real-time induction signal at each moment; uses the real-time pulse slope as the independent variable of the pulse mapping function, combined with the basic quantization length, determines the quantization range of the built-in ADC module of the electronic counter at each moment, and counts the pulse signal, which has the beneficial effect of considering the change rate of the induction signal at different moments, adjusting the quantization range of the built-in ADC module of the electronic counter, so that the quantization range includes the pulse voltage change range as much as possible, and can more accurately obtain the analog-to-digital conversion result, thereby improving the accuracy of the electronic counter counting. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] A low-power electronic counter counting method of the present application is further described in detail below in conjunction with the accompanying drawings.
[0042] Figure 1 A flowchart of a low-power electronic counter counting method provided in an embodiment of the present application;
[0043] Figure 2 A schematic diagram of a change curve of a pulse induction signal provided in an embodiment of the present application;
[0044] Figure 3 A schematic diagram of a change curve of a smooth pulse signal provided in an embodiment of the present application;
[0045] Figure 4 A schematic diagram of the position of the mutation point of the smooth pulse signal provided in the embodiment of the present application;
[0046] Figure 5 A flowchart of the steps of the method for obtaining noise amplitude provided in an embodiment of the present application;
[0047] Figure 6 A flowchart of the steps of the method for constructing a pulse mapping function provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the following is a further detailed description of a low-power electronic counter and a counting method thereof proposed in the present application in combination with the accompanying drawings and implementation examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0050] See also Figure 1 , which shows a step flow chart of a low-power electronic counter counting method provided by an embodiment of the present application, the method comprising the following steps:
[0051] Step 1: collect each pulse induction signal during the historical operation of the electronic counter and the real-time induction signal at each moment.
[0052] The electronic counter is an important component of the digital circuit. It is used to count pulse signals in the signal processing circuit. When the electronic counter is used in the working scenario of the switch cabinet, the switch action will generate a pulse signal in the induced current emitted by the induction device on the switch cabinet. The switch cabinet counter counts by detecting the pulse signal.
[0053] Due to the different switching speeds of the cabinet, the voltage variation range of the pulse will also be different. When the voltage variation of the pulse exceeds the quantization range of the built-in ADC module in the electronic counter, it will cause the electronic counter to count incorrectly, such as:
[0054] When the quantization range of the ADC module (Analog-to-Digital Converter) is set too small, the ADC module is too sensitive and may mistakenly identify noise signals as pulse signals;
[0055] When the quantization range of the ADC module is set too large, the ADC module is too slow, resulting in missed detection of pulse signals.
[0056] Therefore, according to the voltage change of the induced current generated at each moment, the quantization range of the ADC module is dynamically adjusted to avoid counting errors caused by improper setting of the quantization range.
[0057] Connect the input of the electronic counter to the output of the sensing device. The quantization range of the built-in ADC module in the electronic counter is set to , the switch cabinet is continuously switched on and off at different speeds, and a voltmeter is used to directly measure the voltage when the induction device emits an induced current. The voltage at each moment is collected at a time interval of , for example, in At this moment, when the electronic counter counts up to 1, The voltage data measured by the voltmeter at multiple moments in the time neighborhood form a vector as a pulse induction signal; using the above method, the pulse induction signal when the count value of the electronic counter at any moment is increased by 1 is obtained, thereby obtaining M pulse induction signals;
[0058] Preferably, in this embodiment, the quantization range of the ADC module in the electronic counter is set to ; The sampling interval is 1ms. For example, when When the electronic counter value at the moment is increased by 1, All the measured voltage data within 2s before and after the moment form a vector, which is a pulse induction signal. The pulse induction signal is a vector with a length of 2000, in which the 1001th element represents The voltage data at the moment, thus, according to the change of the count value of the electronic counter, the electronic counter changes at a certain moment, and its count value is increased by 1, and a pulse induction signal is obtained, where M takes a value of 50. As other implementation methods, the implementer can set it according to the actual situation.
[0059] Furthermore, the schematic diagram of the change curve of the pulse induction signal provided in this embodiment is as follows: Figure 2 As shown, the horizontal axis represents time and the vertical axis represents the voltage measured by the voltmeter at the corresponding moment.
[0060] When the electronic counter is running, the voltage data at each moment is collected in real time, and the vector composed of the voltage data of multiple moments before each moment is used as the real-time sensing signal at each moment.
[0061] Preferably, in this embodiment, a vector composed of voltage data of 20 moments before each moment is used as the real-time sensing signal at each moment, and the real-time sensing signal is a vector with a length of 20. As other implementation methods, the implementer can set it according to the actual situation.
[0062] At this point, each pulse induction signal during the historical operation of the electronic counter and the real-time induction signal at each moment are obtained.
[0063] Step 2, analyzing the changes of elements in different signal segments in each smooth pulse signal and the differences between elements in the signal segments, determining the noise amplitude; and obtaining the basic quantization length.
[0064] The quantization range is an adjustable parameter in the ADC module, which includes low voltage and high voltage. When the voltage of the induced current is below the low voltage or above the high voltage, the voltage change of the induced current corresponding to the ADC module will be completely ignored. Therefore, by adjusting the quantization range of the ADC module, the pulse voltage change range is included in the quantization range to obtain a better analog-to-digital conversion effect and improve the counting accuracy of the electronic counter. In this embodiment, the low voltage LV of the quantization range is set to 0, so it is necessary to determine the high voltage value of the quantization range.
[0065] Preset the ADC module medium resolution;
[0066] Preferably, in this embodiment, the ADC module sets the resolution parameter to 4, that is, the number of sampling bits is 4, which means that the ADC can represent different analog signal values, that is, this embodiment evenly divides the quantization range into 16 intervals, recorded as quantization intervals, corresponding to 16 digital signals.
[0067] It should be noted that, assuming the quantization range of the ADC module is , which means that the low voltage is 0 volts and the high voltage is 1.6 volts, then the quantization range is divided into 16 intervals, that is, the first interval is When the voltage of the induced current is in the first interval, the induced current is digitized to 0000; the second interval is When the voltage of the induced current is in the second interval, the induced current is digitized to 0001. The third interval is , when the voltage of the induced current is in the third interval, the induced current at this time is digitized to 0010, and so on, the fifteenth interval is When the voltage of the induced current is in the fifteenth interval, the induced current is digitized as 1110, and the sixteenth interval is When the voltage of the induced current is within the sixteenth interval, the induced current at this time is digitized to 1111.
[0068] Furthermore, the difference between the high voltage and the low voltage in the quantization range is recorded as the quantization length. The longer the quantization length is, the longer the length of each quantization interval is when the quantization range is divided into intervals. When performing analog-to-digital conversion, it is necessary to avoid recording noise changes in the digital signal. Therefore, the range of the quantization interval should be set to exceed the amplitude value variation range in the noise signal so that the digital signal will not follow the noise amplitude change. Secondly, after the number of sampling bits is fixed, the quantization length is directly related to the quantization range. The noise amplitude is calculated for the pulse induction signal to adjust the quantization range of the ADC module so that the ADC module will not be sensitive to the noise signal.
[0069] Based on the above analysis, the pulse induction signal contains pulse components and high-frequency noise components, and the pulse components last for a short time in the pulse induction signal. Therefore, this embodiment identifies the signal segment without pulses according to the change of the pulse induction signal, which is the high-frequency noise component, and calculates the noise amplitude through the signal segment without pulses.
[0070] First, analyze the changes of each pulse induction signal to determine the position of the signal change mutation, specifically:
[0071] Using a filtering algorithm to filter each pulse induction signal to obtain a smooth pulse signal of each pulse induction signal;
[0072] Preferably, in this embodiment, a mean filtering algorithm is used to filter each pulse induction signal, and the filtering window size is 20, wherein the mean filtering algorithm is a well-known technology and will not be described in detail here. As other implementation methods, the implementer can adopt other methods of the prior art, such as the median filtering algorithm, etc. This embodiment does not impose any special restrictions on this.
[0073] Furthermore, the schematic diagram of the change curve of the smooth pulse signal provided in this embodiment is as follows: Figure 3 As shown, the horizontal axis represents time and the vertical axis represents voltage.
[0074] It should be noted that the smoothed pulse signal is obtained by smoothing and filtering the pulse induction signal, mainly to eliminate the influence of noise in the pulse signal.
[0075] The mutation point detection algorithm is used to obtain the mutation point of each smooth pulse signal;
[0076] Preferably, in this embodiment, the Bayesian change point detection algorithm is adopted, wherein the number of change points in the Bayesian change point detection algorithm is set to 10, and the implementer can set it according to the actual situation; wherein, the Bayesian change point detection algorithm is a well-known technology and will not be described here. As other implementation methods, the implementer can adopt other methods of the existing technology, for example, the Pettitt mutation point detection algorithm, the Pelt mutation point detection algorithm, etc., and this embodiment does not impose any special restrictions on this.
[0077] Furthermore, the schematic diagram of the position of the mutation point of the smooth pulse signal provided in this embodiment is as follows: Figure 4 As shown, the horizontal axis represents time and the vertical axis represents voltage. After detecting the mutation points of the smooth pulse signal in the figure, 10 mutation points at the positions where the signal changes dramatically are obtained, indicating that the position where the signal mutates is likely to be the beginning or end of the pulse signal.
[0078] Furthermore, in the smooth pulse signal, multiple mutation points are detected. The mutation point is the position where the signal amplitude suddenly changes. The signal amplitude suddenly changes when the pulse occurs in the signal. Therefore, the pulse component and the component without pulse can be identified by the mutation point. Specifically:
[0079] Taking the mutation point as a segmentation point, each smooth pulse signal is divided into a plurality of signal segments;
[0080] Calculate the mean of all elements in each signal segment of each smoothed pulse signal, and record it as the signal mean;
[0081] The signal segment corresponding to the minimum value of the signal mean is recorded as a non-pulse signal segment; according to the time period corresponding to the non-pulse signal segment, the signal of the same time period is intercepted from the pulse sensing signal and recorded as a noise signal segment;
[0082] The range of all elements in the noise signal segment of each pulse induction signal is taken as the signal amplitude of each pulse induction signal;
[0083] The average of the signal amplitudes of all pulse induction signals is taken as the noise amplitude.
[0084] It should be noted that since the noise signal segment that does not contain pulses usually has a stable signal value and a small signal strength, it is approximately determined that the signal segment corresponding to the minimum signal mean value of the signal segment in each smoothed pulse signal is the noise signal segment that does not contain pulses.
[0085] Furthermore, the step flow chart of the method for obtaining the noise amplitude provided in the embodiment of the present application is as follows: Figure 5 shown.
[0086] Furthermore, in order to make the ADC module insensitive to noise signals, the quantization length of the quantization range of the ADC module should be no less than the noise amplitude, and the basic quantization length is determined, specifically:
[0087] The calculation method of the basic quantization length is: ,in, is the basic quantization length, is the noise amplitude, It is the preset resolution of the ADC module;
[0088] It should be noted that when setting the quantization range, the range of the quantization range, that is, the difference between the high voltage and the low voltage in the quantization range, should be greater than the basic quantization length. Otherwise, the ADC module will be sensitive to noise, resulting in a decrease in the quality of analog-to-digital conversion. Therefore, when the low voltage value is 0, the basic quantization range is .
[0089] At this point, the basic quantization length is obtained.
[0090] Step 3: determine the historical pulse slope of each smooth pulse signal according to the change rate between the maximum mutation point and other mutation points in each smooth pulse signal, and construct a pulse mapping function in combination with the basic quantization length.
[0091] In working equipment scenarios such as switchgear, the voltage range of the induced current is usually related to the movement speed of the mechanical structure that generates the induced current. The faster the movement speed of the mechanical structure, the larger the pulse voltage of the current sensing signal, and the quantization range should be set in the high voltage range to capture complete pulse information. When the movement speed of the mechanical structure is faster, the voltage of the induced current rises quickly. Therefore, the pulse slope is constructed to reflect the movement speed of the mechanical structure, specifically:
[0092] The maximum value of all elements in each smooth pulse signal is recorded as the pulse vertex of each smooth pulse signal;
[0093] The product of the signal mean value of the non-pulse signal segment in each smooth pulse signal and the preset judgment threshold is recorded as the jump point judgment value;
[0094] Preferably, in this embodiment, the preset judgment threshold value is 1.2. As other implementation modes, the implementer can set it according to the actual situation.
[0095] Traverse all mutation points from the pulse vertex of each smooth pulse signal in turn, and record the mutation point that is less than or equal to the jump point judgment value for the first traversal as the pulse starting point of each smooth pulse signal;
[0096] Record the difference between the pulse starting point and the pulse apex as the first difference;
[0097] Calculate the interval between the pulse starting point and the pulse apex;
[0098] Using the ratio of the first difference to the interval duration as the historical pulse slope of each smoothed pulse signal;
[0099] It should be noted that the difference between the pulse starting point and the pulse apex is recorded as the first difference.
[0100] It should be noted that if the value of a mutation point is close to the signal mean of the non-pulse signal segment, then this mutation point can be regarded as being in a non-pulse position; by traversing from the pulse apex to the first mutation point in a non-pulse position, it can be determined that the traversal has reached the pulse start time.
[0101] It should be noted that the larger the historical pulse slope is, the faster the voltage rise rate of the induced current at the corresponding moment is, the faster the movement speed of the mechanical structure is, and the larger the final pulse signal voltage range may be.
[0102] Since the historical pulse slope corresponds to the movement speed of the mechanical structure, and the movement speed of the mechanical structure determines the voltage range of the pulse, a mapping relationship can be constructed between the pulse slope and the pulse voltage range to reflect the impact of the change in the pulse slope on the pulse voltage, specifically:
[0103] Recording the pulse vertex of the smooth pulse signal corresponding to each pulse induction signal as the optimal pulse voltage of each pulse induction signal; and taking the ratio of the optimal pulse voltage to the basic quantization length as the optimal multiple of each pulse induction signal;
[0104] The historical pulse slope and the optimal multiple of each pulse induction signal form a two-dimensional data pair; curve fitting is performed on the two-dimensional data pairs of all pulse induction signals to obtain a fitting function which is recorded as a pulse mapping function;
[0105] Preferably, in this embodiment, the optimal multiple of the mth pulse induction signal during the historical operation of the electronic counter is: ,in, is the optimal multiple of the mth pulse induction signal, is the optimal pulse voltage of the mth pulse induction signal, and BV is the basic quantization length.
[0106] Preferably, in this embodiment, the optimal multiple is used as the dependent variable, the historical pulse slope is used as the independent variable, and the least squares method is used for curve fitting to obtain a fourth-order polynomial function , denoted as pulse mapping function, wherein the least square method is a well-known technology and will not be described in detail here.
[0107] Further, the step flow chart of the method for constructing the pulse mapping function provided in the embodiment of the present application is as follows: Figure 6 shown.
[0108] It should be noted that since there is a stable mapping relationship between the pulse slope and the optimal multiple, the pulse mapping function can be used to sense the pulse slope of the signal in real time. , predict the best multiple at the corresponding time ; Then determine the voltage range of the induced current, so as to adjust the quantization range of the ADC module in real time and obtain better analog-to-digital conversion results.
[0109] At this point, the pulse mapping function is obtained.
[0110] Step 4, determining the real-time pulse slope at each moment according to the rate of change between adjacent elements in the real-time sensing signal at each moment; using the real-time pulse slope as the independent variable of the pulse mapping function, combined with the basic quantization length, determining the quantization range of the built-in ADC module of the electronic counter at each moment, and counting the pulse signal.
[0111] Furthermore, the real-time pulse slope at each moment is determined through the real-time sensing signal at each moment, specifically:
[0112] The difference between each element in the real-time sensing signal at each moment and the previous element is recorded as the second difference;
[0113] Calculate the time interval between each element and the previous element in the real-time sensing signal at each moment; record the ratio of the second difference to the time interval as the signal change rate of each element;
[0114] The average value of the signal change rate of all elements in the real-time sensing signal at each moment is taken as the real-time pulse slope at each moment;
[0115] Preferably, in this embodiment, the absolute value of the difference between each element in the real-time sensing signal at each moment and the previous element is recorded as the second difference.
[0116] In this embodiment, for the real-time sensing signal at time t, it is assumed that the r+1th element in the real-time sensing signal is , the rth element is , the real-time pulse slope at time t is: ,in, is the real-time pulse slope at time t, is the interval between adjacent elements. In this embodiment, the collection time interval is is 1, is the number of all elements in the real-time sensing signal at time t. In this embodiment The value is 20. The second difference.
[0117] It should be noted that the larger the real-time pulse slope is, the faster the voltage rise speed of the induced current at the corresponding moment is, the faster the movement speed of the mechanical structure is, and the larger the final pulse signal voltage range may be.
[0118] Further, based on the real-time pulse slope, the optimal quantization range of the built-in ADC module of the electronic counter at each moment is determined, specifically:
[0119] The real-time pulse slope at each moment is used as the independent variable of the pulse mapping function to obtain the best multiple at each moment;
[0120] The product of the best multiple at each moment and the basic quantization length is used as the best high voltage at each moment;
[0121] The quantization range of the built-in ADC module of the electronic counter at each moment is ,in, It is the best high voltage at each moment; based on the quantization range of the built-in ADC module of the electronic counter at each moment, the pulse signal is detected to complete the counting of the electronic counter.
[0122] It should be noted that if the optimal multiple at each moment is less than 1, the optimal multiple at the corresponding moment is set to 1 to ensure that the ADC module is not sensitive to noise, resulting in errors in the counting of the electronic counter.
[0123] It should be noted that at time t, the quantization range of the built-in ADC module of the electronic counter is set to , assuming that the quantization range at time t is set to ,Right now Since the resolution of the ADC module in this embodiment is set to 4, that is, 4 sampling bits are used, the quantization range is divided into quantization intervals, then the first quantization interval is , the second quantization interval is , , the 15th quantization interval is , the 16th quantization interval is , thereby obtaining 16 quantization intervals.
[0124] If the voltage of the real-time induced current at time t is 1.7 volts, it is in the 4th quantization interval, and its corresponding digital signal is the binary number 0011; if the voltage of the real-time induced current at time t is 3.2 volts, it is in the 7th quantization interval, and its corresponding digital signal is the binary number 0110. Finally, the same processing is performed on the voltage of the real-time induced current at each moment to convert it into a digital signal.
[0125] Further, the digital signal is processed according to a preset counting condition to obtain a counting result, wherein the counting condition in this embodiment is: assuming that the counter is in a pulse detection state at the beginning, then:
[0126] In the pulse detection state: when the digital signal jumps from 1010 to 1011, the electronic counter detects a pulse, at which time the count value of the electronic counter is increased by 1, and the electronic counter enters the pulse end detection state.
[0127] In the pulse end detection state: when the digital signal jumps from 0101 to 0100, the electronic counter re-enters the pulse detection state;
[0128] It should be noted that the pulse detection state is detecting whether a pulse occurs. When the digital signal jumps from 1010 to 1011, it indicates that a pulse phenomenon occurs in the voltage of the real-time induced current. It is detected that a pulse has occurred, and the count value of the electronic counter is increased by one. The pulse end detection state is detecting whether the pulse that has occurred this time has ended. When the digital signal jumps from 0101 to 0100, it indicates that the pulse has ended. Only after the current pulse ends, the next pulse will be detected.
[0129] Based on the same inventive concept as the above method, an embodiment of the present application further provides a low-power electronic counter, and the counting of the counter is implemented by using any one of the above-mentioned low-power electronic counter counting methods.
[0130] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0131] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0132] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the present application. It should be pointed out that, for those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present application without departing from the content of the technical solution of the present application, shall fall within the protection scope of the technical solution of the present application.
Claims
1. A low-power electronic counter counting method, characterized in that: The method comprises the following steps: Collect each pulse induction signal during the historical operation of the electronic counter, as well as the real-time induction signal at each moment; Filtering each pulse induction signal to obtain each smooth pulse signal, extracting the mutation point of each smooth pulse signal; taking the mutation point as a segmentation point, dividing each smooth pulse signal into a plurality of signal segments; Analyze the changes of elements in different signal segments and the differences between elements in the signal segments in each smooth pulse signal to determine the noise amplitude; obtain the basic quantization length; Determine the historical pulse slope of each smooth pulse signal according to the change rate between the maximum mutation point and other mutation points in each smooth pulse signal, and construct a pulse mapping function in combination with the basic quantization length; Determine the real-time pulse slope at each moment according to the change rate between adjacent elements in the real-time sensing signal at each moment; use the real-time pulse slope as the independent variable of the pulse mapping function, combine with the basic quantization length, determine the quantization range of the built-in ADC module of the electronic counter at each moment, and count the pulse signal; The calculation method of the basic quantization length is: ,in, is the basic quantization length, is the noise amplitude, It is the preset resolution of the ADC module; The constructing of the pulse mapping function comprises: The pulse peak of the smooth pulse signal corresponding to each pulse induction signal is recorded as the optimal pulse voltage of each pulse induction signal; Taking the ratio of the optimal pulse voltage to the basic quantization length as the optimal multiple of each pulse induction signal; The historical pulse slope and the optimal multiple of each pulse induction signal form a two-dimensional data pair; the two-dimensional data pairs of all pulse induction signals during the historical operation are curve fitted, and the fitting function is recorded as a pulse mapping function.
2. A low power consumption electronic counter counting method as claimed in claim 1, characterized in that: The determining of the noise amplitude comprises: Calculate the mean of all elements in each signal segment of each smoothed pulse signal, and record it as the signal mean; The signal segment corresponding to the minimum value of the signal mean is recorded as a non-pulse signal segment; according to the time period corresponding to the non-pulse signal segment, the signal of the same time period is intercepted from the pulse sensing signal and recorded as a noise signal segment; The range of all elements in the noise signal segment of each pulse induction signal is taken as the signal amplitude of each pulse induction signal; The average value of the signal amplitudes of all pulse induction signals during the historical operation is taken as the noise amplitude.
3. A low power consumption electronic counter counting method as claimed in claim 1, characterized in that: The step of determining the historical pulse slope of each smoothed pulse signal comprises: The maximum value of all elements in each smooth pulse signal is recorded as the pulse vertex of each smooth pulse signal; Analyze the difference between the mutation point before the pulse peak of each smooth pulse signal and the signal mean value of the non-pulse signal segment to determine the pulse starting point of each smooth pulse signal; Record the difference between the pulse starting point and the pulse apex as the first difference; Calculate the interval duration between the pulse start point and the pulse apex; and use the ratio of the first difference to the interval duration as the historical pulse slope of each smoothed pulse signal.
4. A low power consumption electronic counter counting method as claimed in claim 3, characterized in that: Determining the pulse starting point of each smooth pulse signal includes: The product of the signal mean value of the non-pulse signal segment in each smooth pulse signal and the preset judgment threshold is recorded as the jump point judgment value; All mutation points are traversed forward from the pulse vertex of each smooth pulse signal in turn, and the mutation point that is less than or equal to the jump point judgment value for the first traversal is recorded as the pulse starting point of each smooth pulse signal.
5. A low power consumption electronic counter counting method as claimed in claim 1, characterized in that: Determining the real-time pulse slope at each moment includes: The difference between each element in the real-time sensing signal at each moment and the previous element is recorded as the second difference; Calculate the time interval between each element and the previous element in the real-time sensing signal at each moment; record the ratio of the second difference to the time interval as the signal change rate of each element; The average value of the signal change rate of all elements in the real-time sensing signal at each moment is taken as the real-time pulse slope at each moment.
6. A low power consumption electronic counter counting method as claimed in claim 1, characterized in that: The quantization range of the built-in ADC module of the electronic counter at each moment is ,in, is the optimal high voltage at each moment.
7. A low power consumption electronic counter counting method as claimed in claim 6, characterized in that: The optimal high voltage at each moment includes: The real-time pulse slope at each moment is used as the independent variable of the pulse mapping function to obtain the best multiple at each moment; The product of the best multiple at each moment and the basic quantization length is taken as the best high voltage at each moment.
8. A low power consumption electronic counter, characterized in that: The counting of the counter is implemented by a low-power electronic counter counting method as described in any one of claims 1-7.
Citation Information
Patent Citations
Processing methods and apparatus for multichannel energy spectroscopy measurements
CN102279408A
Pulse signal counting method, reconstruction method and chip
CN110061733A