Method for stabilizing digital signal data
By setting boundaries and correction coefficients and dynamically adjusting the center value, the problem of signal jumping in ambient light sensors in low-light environments is solved, and the signal output and high signal-to-noise ratio are achieved, which are suitable for ambient light sensors and proximity sensors.
Patent Information
- Application Number
- CN202110461372.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-04-20
- Filing Date
- 2021-04-27
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2041-04-27
AI Technical Summary
In the case of weak ambient light, the intensity of the light signal sensed by the ambient light sensor and the proximity sensor will jump with time, resulting in poor signal-to-noise ratio and misleading the user's judgment.
By setting the boundary coefficient and correction coefficient, the difference of the digital data is calculated, and the center value is dynamically adjusted to stabilize the output signal, including setting the positive and negative boundary coefficients, and updating the center value when the difference exceeds the boundary.
It realizes stable output of the signal, reduces signal-to-noise ratio, and is suitable for environments with weak and low noise intensity, reduces calculation time, saves buffer space, and can be combined with other digital signal processing modules.
Smart Images

Figure CN115219017B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to digital signals, and particularly to a method for stabilizing digital signal data. Background Art
[0002] In the case of weak ambient light, the intensity of the light signals sensed by sensors such as an Ambient Light Sensor (ALS) and a Proximity Sensor (PS) will have slight fluctuations over time. When the user reads a constantly fluctuating light intensity value from the sensor, the user may think that the fluctuating value is caused by noise and misunderstand that the sensor has poor noise removal ability. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method for stabilizing digital signal data in view of the deficiencies of the prior art, which includes the following steps: (a) setting a boundary coefficient; (b) reading a piece of digital data; (c) defining the value of the read digital data as the central value; (d) outputting the value of the read digital data; (e) reading the next piece of digital data; (f) subtracting the value of the next piece of digital data just read from the output value of the previous piece to calculate a signed difference, which is positive or negative; and (g) determining whether the absolute value of the signed difference is greater than the boundary coefficient. If not, output the value equal to the central value as the output value, and then return to step (e) to read the next piece of digital data. If so, update the central value to be equal to the value of the currently read piece of digital data, output the value equal to the updated central value as the output value, and then return to step (e) to read the next piece of digital data.
[0004] In an embodiment, the method for stabilizing digital signal data further includes the following steps: (h) setting a positive boundary coefficient included in the boundary coefficient; (i) setting a negative boundary coefficient included in the boundary coefficient; (j) subtracting the output value of the previous piece from the value of the next piece of digital data currently read to calculate a difference; and (k) determining whether the difference is greater than the positive boundary coefficient or less than the negative boundary coefficient. If not, output the value equal to the central value as the output value, and then return to step (e). If so, update the central value to be equal to the value of the currently read piece of digital data, output the value equal to the updated central value as the output value, and then return to step (e).
[0005] In an embodiment, the method for stabilizing digital signal data further includes the following step: (l) setting the absolute value of the negative boundary coefficient to be equal to the absolute value of the positive boundary coefficient.
[0006] In one embodiment, the method for stabilizing digital signal data further comprises the following steps: (m) calculating the change amplitude of the central value; and (n) dynamically adjusting the positive limit coefficient and the negative limit coefficient according to the change amplitude of the central value.
[0007] In one embodiment, the method for stabilizing digital signal data further comprises the following steps: (o) setting a positive limit coefficient, which is included in the limit coefficient; (p) setting a negative limit coefficient, which is included in the limit coefficient; (q) setting a correction coefficient; (r) subtracting the value of the previous output value from the value of the next digital data read currently to calculate the difference value; (s) determining whether the difference value is greater than the positive limit coefficient. If so, subtracting the correction coefficient from the value of the next digital data read currently to calculate the first central value, updating the central value to be equal to the first central value, and then performing the next step (u). If not, performing the next step (t); (t) determining whether the difference value is less than the negative limit coefficient. If so, adding the correction coefficient to the value of the next digital data read currently to calculate the second central value, updating the central value to be equal to the second central value, and then performing the next step (u). If not, performing the next step (u); and (u) outputting the value equal to the central value as the output value.
[0008] In one embodiment, the method for stabilizing digital signal data further comprises the following steps: (v) calculating the change amplitude of the central value; and (w) dynamically adjusting any one or more of the correction coefficient, the positive limit coefficient, and the negative limit coefficient according to the change amplitude of the central value.
[0009] As described above, the present invention provides a method for stabilizing digital signal data, which has the following advantages:
[0010] 1. By setting the limit coefficient and the correction coefficient, the target signal-to-noise ratio is achieved, and the stability of the output signal is increased;
[0011] 2. The method of the present invention is applied to the situation of weak ambient light intensity and low noise, and can achieve the best optimization effect with almost no signal jitter;
[0012] 3. When the difference between the values of two consecutive digital data exceeds the limit coefficient, it can be reacted in real time without extra calculation time.
[0013] 4. Each digital data only needs to be compared with the previous digital data, and does not occupy too much buffer space;
[0014] 5. It can be processed in combination with other digital signal processing blocks, such as digital filters, averagers, etc.;
[0015] 6. This function can be developed using software or hardware circuits.
[0016] To enable a further understanding of the features and technical content of the present invention, please refer to the following detailed description and diagrams of the present invention. However, the provided diagrams are only for reference and illustration, and are not used to limit the present invention. Description of the Drawings
[0017] Figure 1 It is a flowchart of the steps of the method for stabilizing digital signal data according to the first embodiment of the present invention.
[0018] Figure 2 It is a flowchart of the steps of the method for stabilizing digital signal data according to the second embodiment of the present invention.
[0019] Figure 3 It is a flowchart of the steps of the method for stabilizing digital signal data according to the third embodiment of the present invention.
[0020] Figure 4 It is a flowchart of the steps of the method for stabilizing digital signal data according to the fourth embodiment of the present invention.
[0021] Figure 5 It is a schematic diagram of setting the limit coefficient to 2 and the correction coefficient to 0 for the method of stabilizing digital signal data according to the second embodiment of the present invention.
[0022] Figure 6 It is a schematic table diagram of the central value when setting the limit coefficient to 2 and the correction coefficient to 0 or not setting the correction coefficient for the method of stabilizing digital signal data according to the first and second embodiments of the present invention.
[0023] Figure 7 It is a schematic diagram of setting the central value and the correction coefficient for the method of stabilizing digital signal data according to the third embodiment of the present invention.
[0024] Figure 8 It is a schematic diagram of setting both the central value and the correction coefficient to 2 for the method of stabilizing digital signal data according to the third embodiment of the present invention.
[0025] Figure 9 It is a schematic table diagram of the central value when setting both the limit coefficient and the correction coefficient to 2 for the method of stabilizing digital signal data according to the third embodiment of the present invention.
[0026] Figure 10 It is a histogram of the values output by a sensor that does not adopt the method of stabilizing digital signal data according to the embodiments of the present invention. [[ID=4,3]]
[0027] Figure 11 It is a histogram of the values output by a sensor that adopts the method of stabilizing digital signal data according to the embodiments of the present invention.
[0028] Figure 12Histogram of the values output by a sensor that does not adopt the method for stabilizing digital signal data according to the embodiments of the present invention.
[0029] Figure 13 Histogram of the values output by a sensor that adopts the method for stabilizing digital signal data according to the embodiments of the present invention.
[0030] Figure 14 Schematic diagram of the application of the system for stabilizing digital signal data according to the fifth embodiment of the present invention to a distance sensor.
[0031] Figure 15 Schematic diagram of the system for stabilizing digital signal data according to the sixth embodiment of the present invention. Detailed implementation manners
[0032] The following are specific embodiments to illustrate the implementation manners of the present invention. Those skilled in the art can understand the advantages and effects of the present invention from the content disclosed in this specification. The present invention can be implemented or applied through other different specific embodiments, and various details in this specification can also be modified and changed based on different viewpoints and applications without departing from the concept of the present invention. Additionally, the drawings of the present invention are only for simple schematic illustration and are not drawn according to actual dimensions, and this is stated in advance. The following embodiments will further detail the related technical content of the present invention, but the disclosed content is not used to limit the protection scope of the present invention. In addition, the term "or" used herein should, depending on the actual situation, possibly include any one or a combination of more of the related listed items.
[0033] Please refer to Figure 1 and Figure 5 and Figure 6 wherein Figure 1 is the flowchart of the steps of the method for stabilizing digital signal data according to the first embodiment of the present invention; Figure 5 is the schematic diagram of setting the boundary coefficient to 2 and the correction coefficient to 0 for the method for stabilizing digital signal data according to the second embodiment of the present invention; Figure 6 is the table schematic diagram of the central value when setting the boundary coefficient to 2 and the correction coefficient to 0 for the method for stabilizing digital signal data according to the first and second embodiments of the present invention.
[0034] The method for stabilizing digital signal data in this embodiment may include steps S101 to S119 as shown in Figure 1 and may be applicable to the examples of Figure 5 and Figure 6 but the present invention is not limited thereto. It should be understood that the order and content of any steps described herein can be adjusted according to actual needs.
[0035] In step S101, set the boundary coefficient, for example but not limited to in Figure 5 andFigure 6 In the example, the boundary coefficient is set to "2".
[0036] In step S103, a piece of digital data is read. For example, Figure 5 and Figure 6 as shown, the value of the first piece of digital data read at time point T1 is "0".
[0037] In step S105, the value of this piece of digital data is defined as the central value. For example, based on the value of the first piece of digital data being "0", the central value is set to "0".
[0038] In step S107, the value "0" of the first piece of digital data is output.
[0039] In step S109, the next piece of digital data is read. For example, Figure 5 and Figure 6 as shown, the value of the second piece of digital data read at time point T2 is "+1".
[0040] In step S111, the value of the next piece of digital data read is subtracted from the previous output value. For example, the value "+1" of the second piece of digital data is subtracted from the value "0" of the first piece of digital data to calculate the signed difference "+1" or "-1".
[0041] In step S113, the absolute value of the difference is taken.
[0042] In step S115, it is determined whether the absolute value of the difference, for example "1", is greater than the boundary coefficient. If the absolute value of the difference is not greater than the boundary coefficient, then step S119 is executed next, and the value equal to the central value is output as the output value of the next piece of digital data (i.e., the second piece of digital data).
[0043] For example, as Figure 5 and Figure 6 shown, the difference between the value "0" of the first piece of digital data read at time point T1 and the value "+1" of the second piece of digital data read at the next time point T2 is "1", which is not greater than the boundary coefficient of "2". Therefore, step S119 is executed next, and the value "0" equal to the central value is output as the output value of the next piece of digital data (i.e., the second piece of digital data).
[0044] Next, the third piece of digital data read at time point T3 is "+2", and the absolute value of the difference from the previous (i.e., the second piece of digital data) output value "0" is "2", which is not greater than the boundary coefficient "2". Then step S119 is executed next, and the value "0" equal to the central value is used as the output value after reading the third piece of digital data at time point T3.
[0045] Next, when the value of the fourth digital data read at time point T4 is “+1” and the absolute value of the difference from the output value “0” of the previous (i.e., the third) digital data is “1” and not greater than the threshold coefficient “2”, then step S119 is executed. Then, step S119 is executed to use the value “0” equal to the central value as the output value after reading the fourth digital data at time point T4.
[0046] Conversely, if it is determined in step S115 that the absolute value of the difference is greater than the threshold coefficient, step S117 is executed to update the central value to be equal to the value of this digital data currently read. Then, step S119 is executed to output the value equal to the updated central value as the output value.
[0047] After executing step S119, the process returns to step S109 to read the next digital data, and then steps S111 to S119, or S111 to S115 and S119 are sequentially executed for the next digital data.
[0048] For example, as Figure 5 and Figure 6 show, the value of the fifth digital data read at time point T5 is “-3”, and the absolute value of the difference from the output value “0” of the previous (i.e., the fourth) digital data is “3”, which is greater than the threshold coefficient “2”. Then, steps S117 and S119 are sequentially executed to update the central value to be equal to the value of this digital data “-3”, and the value “-3” equal to the updated central value is output as the output value.
[0049] Next, the value of the sixth digital data read at time point T6 is “-2”, and the absolute value of the difference from the previous output value “-3” is “1”, which is not greater than the threshold coefficient “2”. Then, step S119 is executed to use the value “-3” equal to the updated central value as the output value after reading the sixth digital data at time point T6.
[0050] Next, the value of the seventh digital data read at time point T7 is “-1”, and the absolute value of the difference from the previous output value -3 is “1”, which is not greater than the threshold coefficient “2”. Step S119 is executed to output the value “-3” equal to the central value as the output value.
[0051] The value of the eighth digital data read at time point T8 is “0”, and the absolute value of the difference from the previous output value “-3” is “3”, which is greater than the threshold coefficient “2”. Then, steps S117 and S119 are sequentially executed to update the central value to “0”, and the value “0” equal to the updated central value is output as the output value.
[0052] As Figure 5 and Figure 6As shown, multiple digital data are read at time points T1 to T10. If the read values are output directly, the output values seen by the user will have a large fluctuation amplitude. After executing steps S101 to S119 of the method for stabilizing digital signal data of this embodiment, the fluctuation amplitude of the output values output to the user is significantly reduced.
[0053] See also Figure 2 、 Figure 5 and Figure 6 ,in Figure 2 A flowchart of the steps of a method for stabilizing digital signal data according to a second embodiment of the present invention; Figure 5 A schematic diagram illustrating a method for stabilizing digital signal data according to a second embodiment of the present invention, wherein a limit coefficient is set to 2 and a correction coefficient is set to 0; Figure 6 A table showing the center value when the limit coefficient is set to 2 and the correction coefficient is set to 0 for the method for stabilizing digital signal data according to the first and second embodiments of the present invention.
[0054] The method for stabilizing digital signal data according to an embodiment of the present invention may include: Figure 2 Steps S201 to S221 shown in FIG. 1 may be applied to Figure 5 and Figure 6 but the present invention is not limited thereto.
[0055] In step S201, a positive limit coefficient is set, for example, to "+2.
[0056] In step S203, a negative limit coefficient is set, for example, to "-2." In this embodiment, the absolute value of the negative limit coefficient is equal to the absolute value of the positive limit coefficient, but this is only an example and the present invention is not limited thereto.
[0057] In step S205 , the first digital data is read.
[0058] In step S207 , the value of the first digital data is defined as a center value.
[0059] In step S209 , the value of the first digital data is output.
[0060] In step S211, the next piece of digital data is read.
[0061] In step S213, the value of the next digital data currently read is subtracted from the previous output value to calculate a difference value. The difference value is positive or negative, which are hereinafter referred to as a positive difference value and a negative difference value, respectively.
[0062] In step S215, it is determined whether the value calculated by subtracting the previous output value from the value of the current next digital data read is greater than the positive limit coefficient. If not, step S217 is then executed. If so, steps S219 and S221 are then sequentially executed.
[0063] In step S217, it is determined whether the positive or negative difference calculated by subtracting the previous output value from the current read value is less than the negative limit coefficient. When the positive or negative difference calculated by subtracting the previous output value from the current read value is not greater than the positive limit coefficient and not less than the negative limit coefficient, the value equal to the central value is directly used as the output value after reading the next digital data.
[0064] Conversely, when the positive or negative difference calculated by subtracting the previous output value from the current read value is greater than the positive limit coefficient or less than the negative limit coefficient, step S219 is executed to update the central value to be equal to the value of the next digital data, and step S221 is executed to output the value equal to the updated central value as the output value.
[0065] For example, as Figure 5 and Figure 6 show, when the value of the digital data read at time point T7 is "-1", subtracting the previous output value "-3" to calculate the positive difference "+2", which is not greater than the positive limit coefficient "+2" and not less than the negative limit coefficient "-2", the output value is equal to the central value "-3". And when the value of the digital data read at time point T8 is "0", subtracting the previous output value "-3" to calculate the positive difference "+3", which is greater than the positive limit coefficient "+2", step S219 is executed to update the central value to be equal to the value of the digital data read at time point T8, which is "0", and step S221 is executed to output the value equal to the updated central value as the output value "0".
[0066] Please refer to Figure 3 、 Figures 7 to 9 where Figure 3 is the flowchart of the steps of the method for stabilizing digital signal data according to the third embodiment of the present invention, Figure 7 is the schematic diagram of setting the central value and the correction coefficient of the method for stabilizing digital signal data according to the third embodiment of the present invention, Figure 8 is the schematic diagram of setting both the central value and the correction coefficient to 2 in the method for stabilizing digital signal data according to the third embodiment of the present invention, Figure 9 is the table schematic diagram of the central value when setting both the limit coefficient and the correction coefficient to 2 in the method for stabilizing digital signal data according to the third embodiment of the present invention.
[0067] The method for stabilizing digital signal data according to the embodiment of the present invention may further include steps S301 to S307 as Figure 3 shown, and may be applicable toFigures 7 to 9 Examples, but the present invention is not limited thereto.
[0068] In addition to setting the positive limit coefficient (denoted as +Cb in Figure 7 and the negative limit coefficient (denoted as -Cb in Figure 7 as in the above steps S201 and S203, a correction coefficient (denoted as Cm in Figure 7 can be set in step S301. For example, in the examples of Figure 8 and Figure 9 the correction coefficient is set to "2", the positive limit coefficient is set to "+2", and the negative limit coefficient is set to "-2". It should be understood that when the correction coefficient is set to "0", it is equivalent to not setting the correction coefficient as in the first and second embodiments.
[0069] After performing step S301, the aforementioned steps S205 to S213 are sequentially executed. Then, in step S215, when it is determined that the positive difference or negative difference calculated by subtracting the previous output value from the current reading value is greater than the positive limit coefficient, step S303 is executed to subtract the correction coefficient from the value of the next digital data to calculate the first central value, and then step S307 is executed to update the central value to be equal to this first central value. Then, in step S221, the value equal to the updated central value is output as the output value.
[0070] Conversely, in step S215, when it is determined that the positive difference or negative difference calculated by subtracting the previous output value from the current reading value is not greater than the positive limit coefficient, step S217 is executed. In step S217, when it is determined that the positive difference or negative difference calculated by subtracting the previous output value from the current reading value is less than the negative limit coefficient, step S305 is executed to add the correction coefficient to the value of the next digital data to calculate the second central value, and then step S307 is executed to update the central value to be equal to this second central value. Then, in step S221, the value equal to the updated central value is output as the output value.
[0071] Conversely, in steps S215 and S217, when it is determined that the positive difference or negative difference calculated by subtracting the previous output value from the current reading value is not greater than the positive limit coefficient and not less than the negative limit coefficient, the central value does not need to be updated, and step S221 is directly executed to output the unupdated central value as the output value.
[0072] For example, as in Figure 8 and Figure 9As shown, the value of the digital data read at time point T5 is "-3". The difference calculated by subtracting the previous output value "0" is "-3", which is less than the negative limit coefficient of "-2". Then, steps S305 and S307 are executed. The value "-3" of the digital data read at time point T5 is added to the correction coefficient "+2" to calculate the value "-1" as the updated central value "-1".
[0073] Please refer to Figure 4 , which is the flowchart of the steps of the method for stabilizing digital signal data according to the fourth embodiment of the present invention.
[0074] The method for stabilizing digital signal data according to the embodiment of the present invention may further include steps S401 to S405 as shown in Figure 4 . These steps can be executed after the above step S119 or S221. It should be understood that some steps can be appropriately omitted according to actual requirements in sequence.
[0075] In step S401, calculate the change range of the central value.
[0076] In step S403, dynamically adjust the limit coefficient according to the change range of the central value, including adjusting the positive limit coefficient, the negative limit coefficient, or both.
[0077] In step S405, dynamically adjust the correction coefficient according to the change range of the central value.
[0078] If necessary, the method for stabilizing digital signal data according to the embodiment of the present invention may further include the step of: determining whether the number of pens of the read digital data reaches the data threshold. If not, continuously read the next pen of digital data. If so, sequentially execute steps S40I to S405.
[0079] In addition, if necessary, the method for stabilizing digital signal data according to the embodiment of the present invention may further include the step of: determining whether the change range of the central value is greater than the amplitude threshold or falls within the amplitude threshold range. If not, do not change the limit coefficient and the correction coefficient. If so, execute one or both of steps S403 and S405.
[0080] Please refer to Figure 10 and Figure 11 , where Figure 10 is the histogram of the values output by the sensor that does not adopt the method for stabilizing digital signal data according to the embodiment of the present invention; Figure 11 is the histogram of the values output by the sensor that adopts the method for stabilizing digital signal data according to the embodiment of the present invention.
[0081] As shown in Figure 10 and Figure 11As shown, assuming the central value is 1000, the digital data changes within the range of the central value + / - 5, the boundary coefficient is set to "2", and the correction coefficient is set to "2".
[0082] As Figure 10 shown, when the sensor does not adopt the method of stabilizing digital signal data in the embodiment of the present invention, the user reads multiple different sensing codes from the sensor at different time points, and different sensing codes represent different light intensities respectively. For example, 11 different values are read, and they are represented by 11 long bars in the histogram respectively.
[0083] In contrast, as Figure 11 shown, when the sensor is adopting the method of stabilizing digital signal data in this embodiment, the user only reads 7 different values from the sensor within a time interval, and they are represented by 7 long bars in the histogram respectively.
[0084] Obviously, when the sensor is adopting the method of stabilizing digital signal data in the embodiment of the present invention, the fluctuation range of the values read by the user is effectively reduced.
[0085] Please refer to Figure 12 and Figure 13 , where Figure 12 is the histogram of the values output by the sensor that does not adopt the method of stabilizing digital signal data in the embodiment of the present invention; Figure 13 is the histogram of the values output by the sensor that adopts the method of stabilizing digital signal data in the embodiment of the present invention.
[0086] As Figure 12 and Figure 13 shown, assuming the central value is 500, the digital data changes within the range of the central value + / - 2, the boundary coefficient is set to "2", and the correction coefficient is set to "2".
[0087] As Figure 12 shown, when the sensor does not adopt the method of stabilizing digital signal data in the embodiment of the present invention, the user reads multiple different sensing codes from the sensor at different time points, and different sensing codes represent different light intensities respectively. For example, 5 different values are read, and they are represented by 5 long bars in the histogram respectively.
[0088] In contrast, as Figure 13 shown, when the sensor is adopting the method of stabilizing digital signal data in this embodiment, the user only reads 1 value from the sensor within a time interval, and it is represented by 1 long bar in the histogram.
[0089] Please refer to Figure 14 and Figure 15 , where Figure 14 is a schematic diagram of the stable digital signal data system according to the fifth embodiment of the present invention applied to a distance sensor; Figure 15Schematic diagram of the stable digital signal data system according to the sixth embodiment of the present invention.
[0090] As Figure 14 shown, the digital correction circuit DN of the stable digital signal data system of this embodiment can be applied to a sensor SR as shown in Figure 15 shown, which is a proximity sensor (PS) or a distance sensor, but the present invention is not limited thereto. In practice, it can be applied to an ambient light sensor or other sensors.
[0091] After the transmitter TX emits an optical signal in the direction of the object OB, this optical signal will be reflected by the object OB to the optical receiver RX. The analog-to-digital converter AD can convert the reflected optical signal from analog to digital signal.
[0092] As Figure 15 shown, the stable digital signal data system of this embodiment can read multiple digital data DI1 to DIn of the digital signal from the sensor SR, and can perform the methods of the stable digital signal data of the first to fourth embodiments on this digital signal to output uncorrected or corrected digital data DU1 to DUn, representing the current ambient light intensity, and provide it for display on the display component of the sensor or the electronic device of the user.
[0093] For example, the digital correction circuit DN of the stable digital signal data system of this embodiment may include a coefficient setting circuit 10, a data reading circuit 20, an arithmetic circuit 30, and a correction output circuit 40. The arithmetic circuit 30 is connected to the coefficient setting circuit 10, the data reading circuit 20, and the correction output circuit 40.
[0094] The data reading circuit 20 can be configured to read the output values of the sensor SR or other sensors, such as the above steps S103, S109, S205, S211. The coefficient setting circuit 10 can be configured to set and dynamically adjust one or more of the above boundary coefficients, positive boundary coefficients, negative boundary coefficients, and correction coefficients according to the change range of the center value, such as performing the above steps S101, S201, S203, S301, S403, S405.
[0095] The arithmetic circuit 30 can be configured to define and update the above center value, and perform the above addition and subtraction operations, correct the read digital data DI1 to DIn, and calculate the change range of the center value, such as performing the above steps S105, S111, S113, S207, S213, S219, S303 to S307, S401.
[0096] The calibration output circuit 40 can be configured to compare the value calculated by the arithmetic circuit 30 with a limit coefficient, a positive limit coefficient, or a negative limit coefficient, indicate or not indicate that the arithmetic circuit 30 updates the center value and performs the above operations, and output uncalibrated or calibrated digital data DU1 to DUn, such as performing the above steps S115, S119, S209, S215, S217, S221.
[0097] In summary, the present invention provides a method for stabilizing digital signal data, which has the following advantages:
[0098] 1. By setting a limit coefficient and a correction coefficient, the target signal-to-noise ratio is achieved, and the stability of the output signal is increased;
[0099] 2. The method of the present invention is applied to the situation of weak ambient light intensity and low noise, and can achieve the best optimization effect with almost no signal jitter;
[0100] 3. When the difference between the values of two consecutive digital data exceeds the limit coefficient, it can be reacted in real time without the need for extra calculation time.
[0101] 4. Each digital data only needs to be compared with the previous digital data, without occupying too much buffer space;
[0102] 5. It can be processed in combination with other digital signal processing blocks, such as digital filters, averagers, etc.;
[0103] 6. This function can be developed using software or hardware circuits.
[0104] The above-disclosed content is only the preferred feasible embodiment of the present invention, and does not limit the claims of the present invention. Therefore, all equivalent technical changes made by using the content of the specification and drawings of the present invention are included in the claims of the present invention.
Claims
1. A method for stabilizing digital signal data, characterized in that, The method for stabilizing digital signal data includes the following steps: (a) Set boundary coefficients, where the boundary coefficients include a positive boundary coefficient and a negative boundary coefficient, the positive boundary coefficient is a positive value and the negative boundary coefficient is a negative value; (b) Set a correction coefficient; (c) Read a piece of digital data; (d) Define the value of the read digital data as the central value; (e) Output the value of the read digital data; (f) Read the next piece of digital data; (g) Subtract the value of the currently read next piece of digital data from the output value of the previous piece to calculate a difference, the difference being positive or negative; and (h) Determine whether the absolute value of the difference is greater than the positive boundary coefficient. If so, subtract the correction coefficient from the value of the currently read next piece of digital data to calculate a first central value, update the central value to be equal to the first central value, and output the value equal to the central value as the output value, then return to step (f) to read the next piece of digital data. If not, execute the next step (i); (i) Determine whether the difference is less than the negative boundary coefficient. If so, add the correction coefficient to the value of the currently read next piece of digital data to calculate a second central value, update the central value to be equal to the second central value, and output the value equal to the updated central value as the output value, and then return to step (f) to read the next piece of digital data. If not, output the value equal to the central value as the output value, and then return to step (f) to read the next piece of digital data.
2. The method for stabilizing digital signal data according to claim 1, wherein The method for stabilizing digital signal data further includes the following steps: (j) Set the absolute value of the negative boundary coefficient to be equal to the absolute value of the positive boundary coefficient.
3. The method for stabilizing digital signal data according to claim 1, wherein The method for stabilizing digital signal data further includes the following steps: (k) Calculate the change amplitude of the central value; and (l) Dynamically adjust the positive boundary coefficient and the negative boundary coefficient according to the change amplitude of the central value.
4. The method for stabilizing digital signal data according to claim 3, wherein The method for stabilizing digital signal data further includes the following steps: (m) Calculate the change amplitude of the central value and dynamically adjust the correction coefficient.
Citation Information
Patent Citations
Sensor, sensing method thereof, and filter therefor
CN102160290A
Adaptive signal threshold for triggering kick detection
CN107925405A