Methods, apparatus, equipment and media for generating ADC output curves

CN110784222BActive Publication Date: 2026-08-14GEEHY SEMICON CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-11-21
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

就现有技术而言,由于ADC和信号发生器采用不同的时钟,导致ADC采样点与采样信号的时间对应关系难以确定,因此无法确定每个采样点对应的具体电压

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110784222B_ABST
    Figure CN110784222B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, device, and medium for generating an ADC output curve. The method involves first sending an instantaneous pulse signal to the ADC, and then sending an input voltage signal to the ADC after a preset time interval. The ADC sequentially samples the instantaneous pulse signal and the input voltage signal to obtain first sampled data. From the first sampled data, a data segment corresponding to the instantaneous pulse signal is determined. The sampling point with the largest amplitude in the data segment, after a preset time interval, is taken as the sampling starting point of the input voltage signal. After determining the sampling starting point, based on the correspondence between voltage and time in the input voltage signal, the sampling voltage of each subsequent sampling point of the input voltage signal is determined. The first sampled data is smoothed using a window function, and an output curve is generated based on the smoothed second sampled data. This application embodiment can accurately determine the voltage of the sampling points and obtain an accurate output curve.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of signal processing technology, and in particular to a method, apparatus, device and medium for generating ADC output curves. Background Technology

[0002] An analog-to-digital converter (ADC) converts a continuous-time, continuous-amplitude analog signal into a discrete-time, discrete-amplitude digital signal through four processes: sampling, holding, quantization, and encoding. The sampling rate refers to the number of points the ADC collects per unit of time. The analog-to-digital conversion process is as follows: Figure 1 and Figure 2 As shown, Figure 1 The waveform of the ramp voltage signal sent by the signal generator (the period of the ramp voltage signal t2-t1 or t5-t4, and the linear relationship between voltage and time can all be set by the signal generator). Figure 2 The output of the 12-bit ADC is shown as a stepped line graph of "digital output value k - sampling point n" (the sampling rate of the ADC can be set); when the ramp signal voltage range sent by the signal generator is "0~3.3V", the ADC output value range is "0~4095".

[0003] In routine ADC data analysis, it is necessary to obtain the specific voltage corresponding to each sampling point, as well as an accurate "voltage V - digital output value k" curve. Currently, because the ADC and signal generator use different clocks, the time correspondence between the ADC sampling points and the sampled signal is difficult to determine, making it impossible to determine the specific voltage corresponding to each sampling point. Furthermore, during the ADC conversion output process, due to factors such as ADC accuracy and the implementation environment, ADC sampling usually has errors, leading to corresponding errors in the ADC output value, thus making it impossible to obtain an accurate "voltage V - digital output value k" curve. Therefore, a method is needed that can generate an accurate "voltage V - digital output value k" curve based on obtaining the specific voltage corresponding to each sampling point. Summary of the Invention

[0004] This application provides a method, apparatus, device, and medium for generating an ADC output curve, which can obtain an accurate ADC output curve based on accurately determining the sampling voltage of the ADC sampling point.

[0005] The first aspect of this application provides a method for generating an ADC output curve, the method comprising:

[0006] The system receives an analog signal input from a signal generating device, the analog signal including an instantaneous pulse signal and an input voltage signal transmitted at a preset time interval after the instantaneous pulse signal; it acquires the correspondence between voltage and time in the input voltage signal and acquires first sampling data obtained by the ADC from the analog signal; it determines the data segment corresponding to the instantaneous pulse signal from the first sampling data, and takes the sampling point corresponding to the sampling point with the largest amplitude in the data segment after the preset time interval as the sampling starting point of the input voltage signal; it determines the sampling voltage of each sampling point of the input voltage signal after the sampling starting point according to the correspondence; it smooths the first sampling data using a window function to obtain second sampling data; and it generates an output curve based on the second sampling data and the sampling voltage corresponding to each sampling point.

[0007] In one feasible implementation, determining the data segment corresponding to the instantaneous pulse signal from the first sampled data includes: determining the data segment in the first sampled data whose amplitude jump range is greater than a preset threshold and whose signal duration is less than or equal to a preset signal duration as the data segment corresponding to the instantaneous pulse signal.

[0008] In one feasible implementation, the step of smoothing the first sampled data using a window function to obtain the second sampled data includes:

[0009] Based on the preset correspondence between input signal waveform types and window functions, a window function corresponding to the waveform type of the input voltage signal is selected to smooth the first sampled data to obtain the third sampled data. After determining the selected window function, based on the correspondence between the window function type and the correction function, the corresponding correction function is selected to correct the sampled data at the sampling start point and sampling end point in the third sampled data to obtain the second sampled data.

[0010] In one feasible implementation, the input voltage signal is a ramp voltage signal.

[0011] In one feasible implementation, the instantaneous pulse signal is any one of the following: an instantaneous rising pulse signal and an instantaneous falling pulse signal.

[0012] In one feasible implementation, the instantaneous pulse signal is input into the ADC after the previous input voltage signal has ended.

[0013] A second aspect of this application provides an output curve generation apparatus, the apparatus comprising:

[0014] The receiving module is used to receive analog signals input from the signal generating device. The analog signals include instantaneous pulse signals and input voltage signals sent after the instantaneous pulse signals at a preset time interval.

[0015] The acquisition module is used to acquire the correspondence between voltage and time in the input voltage signal, and to acquire the first sampling data obtained by the ADC from the analog signal.

[0016] The first determining module is used to determine the data segment corresponding to the instantaneous pulse signal from the first sampled data, and to take the sampling point corresponding to the sampling point with the largest amplitude in the data segment after an interval of the preset time as the sampling starting point of the input voltage signal.

[0017] The second determining module is used to determine the sampling voltage of each sampling point of the input voltage signal after the sampling starting point according to the correspondence.

[0018] The processing module is used to smooth the first sampled data using a window function to obtain the second sampled data.

[0019] The generation module is used to generate an output curve based on the second sampled data and the sampled voltage corresponding to each sample point.

[0020] In one feasible implementation, the first determining module includes:

[0021] The first determining submodule is used to determine the data segment in the first sampled data whose amplitude jump range is greater than a preset threshold and whose signal duration is less than a preset signal duration as the data segment corresponding to the instantaneous pulse signal.

[0022] In one feasible implementation, the first determining module includes:

[0023] The second determining submodule is used to determine the data segment in the first sampled data whose signal duration is less than or equal to a preset signal duration and whose time interval with the next data segment is greater than or equal to the preset time as the data segment corresponding to the instantaneous pulse signal.

[0024] In one feasible implementation, the processing module includes:

[0025] The first processing submodule is used to select a window function corresponding to the waveform type of the input voltage signal to smooth the first sampled data based on a preset correspondence between the input signal waveform type and the window function, so as to obtain the third sampled data.

[0026] The second processing submodule is used to, after determining the selected window function, select the corresponding correction function based on the correspondence between the window function type and the correction function to perform correction processing on the sampling data at the sampling start point and sampling end point in the third sampling data, so as to obtain the second sampling data.

[0027] In one feasible implementation, the input voltage signal is a ramp voltage signal.

[0028] In one feasible implementation, the instantaneous pulse signal is any one of the following: an instantaneous rising pulse signal and an instantaneous falling pulse signal.

[0029] In one feasible implementation, the instantaneous pulse signal is input into the ADC after the previous input voltage signal has ended.

[0030] A third aspect of this application provides an analog-to-digital converter, including a processor and a memory; the memory stores instructions that, when executed by the processor, are used to perform the method described in the first aspect above.

[0031] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect above.

[0032] Based on the above aspects, the ADC output curve generation method, apparatus, device, and medium provided in this application embodiment first send an instantaneous pulse signal to the ADC, and then send an input voltage signal to the ADC after a preset time interval. This allows the ADC to sequentially sample the instantaneous pulse signal and the input voltage signal to obtain first sampled data. Since the duration of the instantaneous pulse signal is very short, the point with the largest amplitude in the corresponding first sampled data is unique, and the sampling time of this sampling point can uniquely correspond to the sending time of the instantaneous pulse signal. Therefore, after determining the data segment corresponding to the instantaneous pulse signal from the first sampled data, the sampling point corresponding to the sampling point with the largest amplitude in the data segment after a preset time interval can be used as the sampling starting point of the input voltage signal. Then, based on the correspondence between voltage and time in the input voltage signal, the voltage corresponding to each sampling point of the input voltage signal after the sampling starting point can be accurately determined. Furthermore, on this basis, using a window function to smooth the first sampled data can eliminate the error data caused by environmental noise and other factors in the first sampled data, obtaining more accurate second sampled data. Then, based on the second sampled data, a high-accuracy output curve can be generated.

[0033] It should be understood that the content described in the foregoing summary section is not intended to limit the key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0034] Figure 1 Waveform of the ramp voltage signal sent by the signal generator;

[0035] Figure 2 A stepped line graph showing the "digital output value k - sampling point n" of a 12-bit ADC output;

[0036] Figure 3 This is a schematic diagram of an analog-to-digital conversion scenario provided in an embodiment of this application;

[0037] Figure 4 This is a flowchart of a method for determining the sampling voltage of an ADC sampling point, provided in an embodiment of this application.

[0038] Figure 5 This is a schematic diagram of an exemplary analog signal;

[0039] Figure 6 This is a comparison chart of an ideal and an actual A / D conversion curve provided in an embodiment of this application;

[0040] Figure 7 This is a schematic diagram illustrating a smoothing process using a window function, as provided in an embodiment of this application.

[0041] Figure 8 This is a flowchart of a method for generating an ADC output curve provided in an embodiment of this application;

[0042] Figure 9 For 12-bit ADC based Figure 5 The diagram shows the correspondence between the digital output value k obtained from the analog signal and the sampling point n.

[0043] Figure 10 This is a flowchart of a method for generating an ADC output curve provided in an embodiment of this application;

[0044] Figure 11 This is a schematic diagram of the structure of an output curve generation device provided in an embodiment of this application;

[0045] Figure 12 This is a schematic diagram of the structure of a processing module 115 provided in an embodiment of this application. Detailed Implementation

[0046] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While some embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this application. It should be understood that the drawings and embodiments of this application are for illustrative purposes only and are not intended to limit the scope of protection of this application.

[0047] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0048] Figure 3 This is a schematic diagram illustrating an analog-to-digital conversion scenario provided in an embodiment of this application. For example, in... Figure 3 In the analog-to-digital conversion scenario, a signal generating device 11 and an ADC 12 are included. The signal generating device 11 generates an analog voltage signal and inputs it into the ADC 12. After receiving the analog voltage signal from the signal generating device 11, the ADC 12 performs sampling, holding, quantization, and encoding on the analog voltage signal to convert it into a corresponding digital signal and outputs a curve showing the relationship between the voltage V and the digital output value k. During the processing of the ADC 12, sampling and holding, quantization, and encoding can be performed simultaneously during the conversion process.

[0049] To aid in understanding this application, the sampling, holding, quantization, and encoding processes of the ADC12 are described below:

[0050] Sampling: The amplitude of the analog voltage signal is extracted at fixed time intervals, and the acquired amplitude of the analog voltage signal is used as the sample value. The shorter the time interval for extracting the amplitude of the analog voltage signal (or sampling interval), the more accurately the signal can be reproduced. However, shortening the sampling interval will increase the amount of data, so in practical applications, the sampling interval can be set as needed.

[0051] Hold: In practice, converting the sampled signal into a digital signal often takes a certain amount of time. In order to provide a stable value for the subsequent quantization and encoding process, the amplitude of the sampled voltage signal must be held for a period of time. In related technologies, the sampling and holding processes are generally completed simultaneously.

[0052] Quantization: Although sampling converts a continuous signal on the time axis into a discontinuous (discrete) signal, the amplitude of the sampled voltage signal remains a continuous value (analog quantity). At this point, the amplitude direction can be divided at certain intervals to determine which interval each sample value belongs to, and the value recorded in its interval is assigned to that sample value. This operation is called quantization. The quantization process requires a certain time τ. For analog voltage signals that vary with time, the instantaneous sampled value must remain unchanged within time τ to ensure the correctness and accuracy of the conversion. This process is called holding. It is precisely because of the holding process that the sampled signal is actually a step-shaped continuous function.

[0053] Encoding: The process of converting a quantized signal into binary numbers, that is, representing the quantized signal using combinations of 0s and 1s, is called encoding. "1" represents the presence of a pulse, and "0" represents the absence of a pulse. When the quantization level is 64, the binary representation of these values ​​must be 6 bits; when the quantization level is 256, it must be represented by 8 binary numbers.

[0054] After the above four processes, the analog voltage signal can be converted into a digital signal. However, since the ADC and the signal generating device use different clocks, it is difficult to determine the correspondence between each sampling point of the ADC and the time point on the analog voltage signal. Therefore, it is impossible to determine the specific voltage corresponding to each sampling point. Furthermore, due to the influence of factors such as ADC accuracy and implementation environment, the sampling of the ADC usually has errors, which will also cause the output value of the ADC to have corresponding errors. Therefore, the ADC cannot output an accurate "voltage V - digital output value k" curve.

[0055] To address the aforementioned problems in the existing technology, this application provides a scheme for generating an ADC output curve. The innovative concept of this scheme is to first input a short-duration instantaneous pulse signal into the ADC, and then input a voltage signal after a preset time interval. Since the instantaneous pulse signal has the characteristics of concentrated energy and easy identification, the sampling point corresponding to the instantaneous pulse signal can be easily identified from the ADC's sampling data. Furthermore, the sampling point corresponding to the point with the largest amplitude among the sampling points after a preset time interval can be used as the sampling starting point of the input voltage signal. After determining the sampling starting point, the sampling voltage of each sampling point of the input voltage signal after the sampling starting point can be determined according to the correspondence between voltage and time in the input voltage signal. Based on this, in order to obtain an accurate "voltage V-digital output value k" relationship curve, this embodiment of the application also smooths the sampling data acquired by the ADC through a window function. The "voltage V-digital output value k" relationship curve is generated based on the smoothed sampling data and the sampling voltage corresponding to each sampling point obtained above. Since the window function can eliminate the error data caused by environmental interference and other factors in the sampling data, the accuracy of the "voltage V-digital output value k" relationship curve can be improved by using the data smoothed by the window function.

[0056] The solutions of the embodiments of this application will be described in detail below with reference to exemplary embodiments.

[0057] Figure 4 This is a flowchart illustrating a method for determining the sampling voltage of an ADC sampling point, as provided in an embodiment of this application. Figure 4 As shown, the method includes:

[0058] Step 401: Receive the analog signal input from the signal generating device. The analog signal includes an instantaneous pulse signal and an input voltage signal sent after the instantaneous pulse signal at a preset time interval.

[0059] Example, Figure 5 This is a schematic diagram of an exemplary analog signal. The analog signal includes an input voltage signal and a transient pulse signal, wherein, in Figure 5The input voltage signal is specifically referred to as a ramp voltage signal. A ramp voltage signal is a voltage signal with a certain slope that linearly increases from zero over time to a certain amplitude. A linear relationship between the input voltage V and time t, expressed as a mathematical function, is pre-set. Before the signal generating device sends a ramp voltage signal, sampling of that signal is performed. Since the entire ramp voltage signal needs to be sampled, the sampling start time is usually earlier than the time the ramp voltage signal is sent. Therefore, there are multiple sampling points with a voltage value of 0 before the sampling point corresponding to the starting point of the ramp voltage signal. If the sampling start point is considered to be the point with a voltage value of 0, it is impossible to determine which of the multiple sampling points with a voltage value of 0 is the actual sampling point corresponding to the starting point of the ramp voltage signal.

[0060] Before each ramp voltage signal is transmitted, the signal generating device first transmits an instantaneous pulse signal (with a time interval of t1 minus t0). The relationship between the input voltage value V and time t of this ramp voltage signal can be expressed by a mathematical function. The next instantaneous pulse signal is transmitted only after the previous ramp voltage signal has recovered (i.e., t4 > t3). In other words, the instantaneous pulse signal is set to be transmitted again after each input voltage signal reaches its maximum voltage value and then recovers to zero (with a time interval of t4 minus t3). The time interval t4 minus t0 is the transmission period of one instantaneous pulse signal. The instantaneous pulse signal is a signal continuously transmitted at a certain voltage amplitude and time interval. The duration of the instantaneous pulse signal is less than or equal to the preset signal duration. The preset signal duration should be set as short as possible to quickly and accurately detect large jumps in the instantaneous pulse signal. The sampling point corresponding to the instantaneous pulse signal transmission time plus the time interval t1 minus t0 is used as the sampling starting point of the ramp voltage signal, thus ensuring that the voltage value corresponding to each sampling point of the subsequent ramp voltage signal can be accurately determined based on the sampling starting point.

[0061] The instantaneous pulse signal can be an instantaneously rising or falling pulse signal. That is, the amplitude of the pulse signal can be a positive voltage value that changes dramatically in an instant, or a negative voltage value that changes dramatically in an instant. Regardless of whether it is positive or negative, the maximum amplitude jump can be quickly detected to determine the transmission time of the signal. For example, in this embodiment, the instantaneous pulse signal can be understood as a unit impulse signal, which is an ideal signal with an infinitely short duration, an infinitely large instantaneous amplitude, and a coverage area that is always 1. Alternatively, it can be understood as other rectangular or triangular pulses with shorter durations and larger amplitudes, etc., as long as the pulse signal has a short duration and an amplitude jump range greater than a preset threshold within a short time.

[0062] certainly Figure 5This is merely an exemplary analog signal and is not the only limitation on the analog signal referred to in this application.

[0063] Step 402: Obtain the correspondence between voltage and time in the input voltage signal, and obtain the first sampling data obtained by the ADC from the analog signal.

[0064] In this embodiment, the correspondence between voltage and time in the input voltage signal can be understood as being pre-stored in a storage medium. When the method of this embodiment is executed, the correspondence between voltage and time in the input voltage signal is obtained from the storage medium.

[0065] In this embodiment, the ADC starts sampling at a constant sampling frequency before the analog signal (including instantaneous pulse signal and input voltage signal) is input to the ADC. Thus, after one cycle of analog signal input is completed, the data sampled by the ADC includes the sampling data corresponding to the instantaneous pulse signal and the sampling data corresponding to the input voltage signal.

[0066] Step 403: From the first sampled data, determine the data segment corresponding to the instantaneous pulse signal, and take the sampling point corresponding to the sampling point with the largest amplitude in the data segment after the preset time interval as the sampling starting point of the input voltage signal.

[0067] Because instantaneous pulse signals are characterized by short duration, concentrated energy, and rapid amplitude fluctuations within a short period of time, data that conforms to the characteristics of instantaneous pulse signals can be determined from the ADC's sampling data as the corresponding data segment of the instantaneous pulse signal. The sampling time of the sampling point with the largest amplitude in this data segment, plus a preset time, can be regarded as the transmission time of the input voltage signal. The sampling point corresponding to the transmission time of the input voltage signal is taken as the sampling starting point of the input voltage signal.

[0068] Step 404: Based on the correspondence, determine the sampling voltage of each sampling point of the input voltage signal after the sampling start point.

[0069] Still with Figure 5For example, since the time interval (t1 minus t0) between the instantaneous pulse signal and the ramp voltage signal, the period of the ramp voltage signal (t2 minus t1), and the linear relationship between voltage and time in the ramp voltage signal within (t2 minus t0) can all be preset, the voltage value corresponding to each time t within the range of (t2 minus t0) can be determined. Furthermore, since the sampling frequency of the ADC can be set, the sampling point n0 of the instantaneous pulse signal (i.e., the point corresponding to sampling time t0) can be calculated based on the sampling frequency. This allows determination of the time interval between each point of the input voltage signal and the sampling point n0, which is the time within the range of (t2 minus t0). Therefore, the specific voltage value corresponding to each ADC sampling point can be determined. The sampling rate or sampling frequency defines the number of samples extracted from a continuous signal per second to form a discrete signal. In simpler terms, the sampling frequency refers to how many signal samples a computer collects per second. The sampling frequency of the ADC can be set to a larger value to more easily acquire data segments with large jumps in the instantaneous pulse signal.

[0070] Of course, this embodiment is only an example. Figure 5 The example provided is for illustration purposes only and is not the only limitation of this application.

[0071] Step 405: Smooth the first sampled data using a window function to obtain the second sampled data.

[0072] As mentioned earlier, due to ADC accuracy and noise interference, the ADC sampling data may contain error data. Although the preceding part of this embodiment determines the sampling start point of the input voltage signal and the sampling voltage of each sampling point after the sampling start point by adding instantaneous pulse signals, it does not process the error data in the sampling data. This error data will cause a deviation between the "voltage V - digital output value k" curve output by the ADC and the actual "voltage V - digital output value k" curve. Specifically, Figure 6 This is a comparison chart of ideal and actual A / D conversion curves provided in an embodiment of this application, such as... Figure 6 As shown, an ideal A / D conversion curve is a curve that is oriented towards the input curve (e.g., ...). Figure 5 The slope voltage signal in the image is represented by a stepped, undulating line centered around it. The center line of the actual sampling curve's undulations does not coincide with the ideal sampling curve, resulting in a deviation E. TAs a result, the actual A / D conversion curve cannot fully reflect the one-to-one correspondence between the input voltage of the analog-to-digital converter and the converted binary number, affecting the A / D conversion accuracy and leading to inaccurate A / D conversion results. Related technologies suggest that this deviation is caused by a difference between the signal amplitude before and after quantization; this difference manifests as noise when reproducing the signal. To reduce this noise, related technologies typically reduce the interval between quantization steps. However, reducing the quantization interval increases the number of steps, leading to a larger data volume. To reduce the impact of error data on the output result while avoiding an increase in data volume, this embodiment, after obtaining the sampling voltage of the sampling point corresponding to the input voltage signal, uses a window function to smooth the first sampled data acquired by the ADC from the input voltage signal, smoothing out the error data in the first sampled data and thus obtaining more accurate second sampled data.

[0073] In this embodiment, the role of the window function is to reduce spectral energy leakage. Different truncation functions can be used to truncate the signal; these truncation functions are called window functions, or simply windows. When truncating a signal, only a certain length of signal can be truncated, even if the original signal is infinitely long. Therefore, it is as if a "window" (more accurately, a "box") is used to perform this truncation. Windowing is essentially the process of multiplying a window function with the signal (which can be a time-domain signal or a frequency-domain signal) so that the multiplied signal can better meet the requirements of signal transformation (e.g., Fourier transform). Different window functions have different time-domain shapes and frequency-domain characteristics. The main differences in the spectral characteristics of various window functions are: main lobe width (also known as effective noise bandwidth, ENBW), amplitude distortion, maximum sidelobe height, and sidelobe attenuation rate. The main purpose of windowing is to use a relatively smooth window function to apply unequal weights to the truncated signal, making the abrupt changes in the truncated signal smoother, thereby reducing the sidelobes of the spectral window. Because the sidelobes have the largest leakage, smaller sidelobes result in reduced leakage. Different window functions have different spectral characteristics. The main lobe width primarily affects the signal energy distribution and frequency resolution. The actual frequency resolution is the effective noise bandwidth multiplied by the frequency resolution; therefore, the wider the main lobe, the wider the effective noise bandwidth, and the worse the frequency resolution for the same frequency resolution. The side lobe height and its attenuation rate affect the degree of energy leakage (spectral tailing effect). The higher the side lobes, the more severe the energy leakage, the slower the attenuation, and the more severe the spectral tailing. When applying a window function, the main lobe width of the window function spectrum should be as narrow as possible to obtain high frequency resolution; the side lobe attenuation should be as large as possible to reduce spectral tailing, but usually, these two requirements cannot be met simultaneously. The main difference between various window functions lies in the ratio of energy concentrated in the main lobe to energy dispersed in all side lobes. The choice of window function depends on the target of analysis and the type of signal being analyzed. Generally speaking, the wider the effective noise bandwidth, the worse the frequency resolution, and the more difficult it is to distinguish adjacent frequencies with the same amplitude. The improvement of selectivity (i.e., the ability to distinguish weak components adjacent to strong component frequencies) is related to the attenuation rate of the side lobes. A window function with a narrow effective noise bandwidth has a lower sidelobe attenuation rate, so the choice of window function is a compromise between the two.

[0074] In this embodiment, when smoothing the first sampled data using a window function, a window function corresponding to the waveform type of the input voltage signal can be selected based on a preset correspondence between the input signal waveform type and the window function to smooth the first sampled data. The correspondence between the input signal waveform type and the window function in this embodiment indicates the relationship between the input signal waveform type and the optimal window function. Using the window function in this correspondence to process the sampled data of the corresponding type of input signal can achieve the best smoothing effect. In this embodiment, the selectable window functions for the smoothing process include the following: Blackman window, Hanning window, Hamming window, flat-top window, Kaiser window, triangular window, and rectangular window.

[0075] For example, considering that the sampling start and end points are uniquely determined in this embodiment and are not affected by errors, the window function not only processes sampling points with errors but also those without errors, thus causing the originally correct sampling start and end points to become incorrect. Therefore, after smoothing the first sampled data using the window function, the sampling start and end points need to be corrected. The specific correction method may include: after smoothing the first sampled data using the window function to obtain the third sampled data, based on the correspondence between the window function type and the correction function, selecting the appropriate correction function to correct the sampling start and end points in the third sampled data to obtain the second sampled data. The correspondence between the window function type and the correction function mentioned in this embodiment can be preset as needed.

[0076] For example, Figure 7 This is a schematic diagram illustrating a smoothing process using a window function, as provided in an embodiment of this application. Figure 7 In the processing scenario shown, the signal generating device sends a complete ramp voltage signal at once. The ADC samples before the signal generating device sends the ramp voltage signal and stops sampling after the signal generating device sends the complete ramp voltage signal to obtain complete sampled data (this sampled data is a continuous linear voltage signal). Due to noise interference, the sampled data obtained from the ramp voltage signal sampling has errors. It is necessary to smooth the sampled data using a window function to remove most of the noise and obtain more accurate sampled data. After windowing, within one sampling period, the data at the sampling start and end points are introduced with errors due to the window function processing. It is necessary to select the appropriate correction function according to the window function type to correct the data at the sampling start and end points. Quantization processing of the smoothed and corrected sampled data can clearly determine the decision level of the sampled data, thereby obtaining an A / D conversion curve close to the theoretical value.

[0077] Step 406: Based on the second sampling data and the sampling voltage corresponding to each sampling point, generate an output curve.

[0078] In this embodiment, an instantaneous pulse signal is first sent to the ADC, and then the input voltage signal is sent to the ADC after a preset time interval. This allows the ADC to sequentially sample the instantaneous pulse signal and the input voltage signal to obtain first sampled data. Since the instantaneous pulse signal has a very short duration, the point with the maximum amplitude in the first sampled data is unique, and the sampling time of this sampling point can uniquely correspond to the transmission time of the instantaneous pulse signal. Therefore, after determining the data segment corresponding to the instantaneous pulse signal from the first sampled data, the sampling point corresponding to the sampling point with the maximum amplitude in the data segment after a preset time interval can be used as the sampling starting point of the input voltage signal. Then, based on the correspondence between voltage and time in the input voltage signal, the voltage corresponding to each sampling point of the input voltage signal after the sampling starting point can be accurately determined. Furthermore, on this basis, using a window function to smooth the first sampled data can eliminate the error data caused by environmental noise and other factors in the first sampled data, resulting in more accurate second sampled data. Then, based on the second sampled data, a highly accurate output curve can be generated.

[0079] Figure 8 This is a flowchart of a method for generating an ADC output curve provided in an embodiment of this application, as shown below. Figure 8 As shown, the method includes:

[0080] Step 801: Receive an analog signal input from a signal generating device, wherein the analog signal includes an instantaneous pulse signal and an input voltage signal sent after the instantaneous pulse signal at a preset time interval.

[0081] Step 802: Obtain the correspondence between voltage and time in the input voltage signal, and obtain the first sampling data obtained by the ADC from the analog signal.

[0082] Step 803: Determine the data segment in the first sampled data whose amplitude jump range is greater than a preset threshold and whose signal duration is less than or equal to a preset signal duration as the data segment corresponding to the instantaneous pulse signal, and take the sampling point corresponding to the sampling point with the largest amplitude in the data segment after the preset time interval as the sampling starting point of the input voltage signal.

[0083] Example, Figure 9 For 12-bit ADC based Figure 5 The diagram shown illustrates the correspondence between the digital output value k obtained from the analog signal and the sampling point n. Figure 9As shown, after the ADC completes sampling, the sampled data obtained by the ADC is analyzed. The data segment where the digital output value jumps within a short time (less than or equal to the preset signal duration) with a range greater than a preset threshold (e.g., 0, 5, 600, 4, 0) is identified. The sampling point with the largest amplitude within this data segment is set as the sampling point n0 of the instantaneous pulse signal. This is based on the ADC principle and... Figure 5 It can be seen that the time point corresponding to the sampling point n0 of the instantaneous pulse signal is the time t0 when the instantaneous pulse signal is sent. The sampling point corresponding to the sampling point n0 after a preset time interval t1-t0 is taken as the sampling starting point of the ramp voltage signal. According to the correspondence between voltage and time in the ramp voltage signal, the sampling voltage corresponding to each sampling point after the sampling starting point of the ramp voltage signal can be determined.

[0084] certainly Figure 9 This is for illustrative purposes only and is not the only limitation on ADC input signals.

[0085] Based on the characteristics of instantaneous pulse signals—short duration, concentrated energy, and large amplitude jump range within a short time—this embodiment can quickly and accurately determine the data segment corresponding to the instantaneous pulse signal. By taking the sampling point corresponding to the point with the largest amplitude in the data segment after a preset time interval as the sampling starting point of the ramp voltage signal, the correspondence between the sampling starting point and the original analog signal can be accurately and uniquely determined. Thus, the sampling voltage corresponding to each subsequent sampling point of the ramp voltage signal can be accurately obtained based on this sampling starting point.

[0086] Step 804: Based on the correspondence, determine the sampling voltage of each sampling point of the input voltage signal after the sampling start point.

[0087] Step 805: Smooth the first sampled data using a window function to obtain the second sampled data.

[0088] Step 806: Based on the second sampling data and the sampling voltage corresponding to each sampling point, generate an output curve.

[0089] The beneficial effects of this embodiment and Figure 4 The implementation examples are similar and will not be repeated here.

[0090] Figure 10 This is a flowchart of a method for generating an ADC output curve provided in an embodiment of this application, as shown below. Figure 10 As shown, the method includes:

[0091] Step 1001: Receive an analog signal input from a signal generating device, wherein the analog signal includes an instantaneous pulse signal and an input voltage signal sent after the instantaneous pulse signal at a preset time interval.

[0092] Step 1002: Obtain the correspondence between voltage and time in the input voltage signal, and obtain the first sampling data obtained by the ADC from the analog signal.

[0093] Step 1003: Determine the data segment in the first sampled data whose signal duration is less than or equal to the preset signal duration and whose time interval with the next data segment is greater than or equal to the preset time as the data segment corresponding to the instantaneous pulse signal, and take the sampling point corresponding to the sampling point with the largest amplitude in the data segment after the preset time interval as the sampling starting point of the input voltage signal.

[0094] like Figure 5 As shown, the duration of the instantaneous pulse signal and the time interval (t1 minus t0) between the instantaneous pulse signal and the input voltage signal can be preset. Therefore, when analyzing the ADC's sampled data, if there is a continuous data segment whose duration is less than or equal to the preset signal duration, and the interval between this data segment and the next continuous data segment is greater than or equal to the preset time interval (t1 minus t0) between the instantaneous pulse signal and the input voltage signal, then this data segment can be determined to be the sampled data of the instantaneous pulse signal. The time corresponding to the point with the largest amplitude is the transmission time of the instantaneous pulse signal. The sampling point corresponding to this point after a preset time interval is taken as the sampling starting point of the input voltage signal. Based on the sampling starting point, the sampling voltage of each subsequent sampling point of the input voltage signal can be determined. Of course, this is only an example and not the only limitation of this application.

[0095] This embodiment determines the data segment corresponding to the instantaneous pulse signal from the ADC's sampling data based on the characteristics of the short duration of the pulse signal and the preset time interval between it and the input voltage signal. Thus, the sampling point n0 corresponding to the instantaneous pulse signal transmission time t0 can be quickly and accurately determined based on this data segment. The sampling point corresponding to the sampling point n0 after a preset time interval t1-t0 is taken as the sampling starting point of the input voltage signal. This solves the problem that the existing technology cannot accurately determine the correspondence between the sampling starting point and the analog signal.

[0096] Step 1004: Based on the correspondence, determine the sampling voltage of each sampling point of the input voltage signal after the sampling start point.

[0097] Step 1005: Smooth the first sampled data using a window function to obtain the second sampled data.

[0098] Step 1006: Based on the second sampling data and the sampling voltage corresponding to each sampling point, generate an output curve.

[0099] The beneficial effects of this embodiment and Figure 4The implementation examples are similar and will not be repeated here.

[0100] Figure 11 This is a schematic diagram of the structure of an output curve generation device provided in an embodiment of this application, as shown below. Figure 11 As shown, the device 110 includes:

[0101] The receiving module 111 is used to receive an analog signal input from the signal generating device. The analog signal includes an instantaneous pulse signal and an input voltage signal sent after the instantaneous pulse signal at a preset time interval.

[0102] The acquisition module 112 is used to acquire the correspondence between voltage and time in the input voltage signal, and to acquire the first sampling data obtained by the ADC from the analog signal.

[0103] The first determining module 113 is used to determine the data segment corresponding to the instantaneous pulse signal from the first sampled data, and to take the sampling point corresponding to the sampling point with the largest amplitude in the data segment after an interval of the preset time as the sampling starting point of the input voltage signal.

[0104] The second determining module 114 is used to determine the sampling voltage of each sampling point of the input voltage signal after the sampling starting point according to the correspondence.

[0105] The processing module 115 is used to smooth the first sampled data using a window function to obtain the second sampled data.

[0106] The generation module 116 is used to generate an output curve based on the second sampling data and the sampling voltage corresponding to each sampling point.

[0107] In one feasible implementation, the first determining module includes:

[0108] The first determining submodule is used to determine the data segment in the first sampled data whose amplitude jump range is greater than a preset threshold and whose signal duration is less than a preset signal duration as the data segment corresponding to the instantaneous pulse signal.

[0109] In one feasible implementation, the first determining module includes:

[0110] The second determining submodule is used to determine the data segment in the first sampled data whose signal duration is less than or equal to a preset signal duration and whose time interval with the next data segment is greater than or equal to the preset time as the data segment corresponding to the instantaneous pulse signal.

[0111] Example, Figure 12 This is a schematic diagram of the structure of a processing module 115 provided in an embodiment of this application, as shown below. Figure 5 As shown, in one feasible implementation, the processing module 115 includes:

[0112] The first processing submodule 1151 is used to select a window function corresponding to the waveform type of the input voltage signal to smooth the first sampled data based on a preset correspondence between the input signal waveform type and the window function, so as to obtain the third sampled data.

[0113] The second processing submodule 1152 is used to, after determining the selected window function, select the corresponding correction function based on the correspondence between the window function type and the correction function to perform correction processing on the sampling data at the sampling start point and sampling end point in the third sampling data, so as to obtain the second sampling data.

[0114] In one feasible implementation, the input voltage signal is a ramp voltage signal.

[0115] In one feasible implementation, the instantaneous pulse signal is any one of the following: an instantaneous rising pulse signal and an instantaneous falling pulse signal.

[0116] In one feasible implementation, the instantaneous pulse signal is input into the ADC after the previous input voltage signal has ended.

[0117] The apparatus provided in this embodiment can execute the methods of the above-described method embodiments, and its execution mode and beneficial effects are similar to those of the above-described embodiments, so they will not be repeated here.

[0118] This application also provides an analog-to-digital converter, including a processor and a memory; the memory stores instructions, which, when executed by the processor, are used to perform the methods described in any of the above embodiments.

[0119] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the methods described in any of the above embodiments.

[0120] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload programmable logic devices (CPLDs), and so on.

[0121] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0122] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0123] Furthermore, although the operations are described in a specific order, this should be understood as requiring that such operations be performed in the specific order shown or in sequential order, or requiring that all illustrated operations be performed to achieve the desired result. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented individually or in any suitable sub-combination in multiple implementations.

[0124] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A method for generating an ADC output curve, characterized in that, The method includes: The system receives an analog signal input from a signal generating device. The analog signal includes an instantaneous pulse signal and an input voltage signal sent after the instantaneous pulse signal at a preset time interval. The instantaneous pulse signal is input into the ADC after the previous input voltage signal ends. Obtain the correspondence between voltage and time in the input voltage signal, and obtain the first sampling data obtained by the ADC from the analog signal; From the first sampled data, determine the data segment corresponding to the instantaneous pulse signal, and take the sampling point corresponding to the sampling point with the largest amplitude in the data segment after the preset time interval as the sampling starting point of the input voltage signal; Based on the correspondence, determine the sampling voltage of each sampling point of the input voltage signal after the sampling start point; The first sampled data is smoothed using a window function to obtain the second sampled data, including: Based on the preset correspondence between the input signal waveform type and the window function, a window function corresponding to the waveform type of the input voltage signal is selected to smooth the first sampled data to obtain the third sampled data; After determining the selected window function, based on the correspondence between the window function type and the correction function, the corresponding correction function is selected to correct the sampled data at the sampling start point and sampling end point in the third sampled data to obtain the second sampled data; Based on the second sampling data and the sampling voltage corresponding to each sampling point, an output curve is generated.

2. The method according to claim 1, characterized in that, Determining the data segment corresponding to the instantaneous pulse signal from the first sampled data includes: The data segment in the first sampled data whose amplitude jump range is greater than a preset threshold and whose signal duration is less than or equal to a preset signal duration is determined as the data segment corresponding to the instantaneous pulse signal.

3. The method according to any one of claims 1-2, characterized in that, The input voltage signal is a ramp voltage signal.

4. The method according to any one of claims 1-2, characterized in that, The instantaneous pulse signal is any one of the following: Instantaneous rising pulse signal and instantaneous falling pulse signal.

5. An output curve generation device, characterized in that, include: A receiving module is used to receive analog signals input from a signal generating device, the analog signals including instantaneous pulse signals and input voltage signals sent after the instantaneous pulse signals at a preset time interval; The instantaneous pulse signal is input into the ADC after the previous input voltage signal ends; The acquisition module is used to acquire the correspondence between voltage and time in the input voltage signal, and to acquire the first sampling data obtained by the ADC from the analog signal; The first determining module is used to determine the data segment corresponding to the instantaneous pulse signal from the first sampled data, and to take the sampling point corresponding to the sampling point with the largest amplitude in the data segment after an interval of the preset time as the sampling starting point of the input voltage signal. The second determining module is used to determine the sampling voltage of each sampling point of the input voltage signal after the sampling starting point according to the correspondence relationship; The processing module is used to smooth the first sampled data using a window function to obtain the second sampled data. The processing module includes: a first processing submodule, used to select a window function corresponding to the waveform type of the input voltage signal to smooth the first sampled data based on a preset correspondence between the waveform type of the input signal and the window function to obtain the third sampled data; The second processing submodule is used to, after determining the selected window function, select the corresponding correction function based on the correspondence between the window function type and the correction function to perform correction processing on the sampled data at the sampling start point and sampling end point in the third sampled data, so as to obtain the second sampled data; The generation module is used to generate an output curve based on the second sampled data and the sampled voltage corresponding to each sample point.

6. The apparatus according to claim 5, characterized in that, The first determining module includes: The first determining submodule is used to determine the data segment in the first sampled data whose amplitude jump range is greater than a preset threshold and whose signal duration is less than a preset signal duration as the data segment corresponding to the instantaneous pulse signal.

7. The apparatus according to claim 5, characterized in that, The first determining module includes: The second determining submodule is used to determine the data segment in the first sampled data whose signal duration is less than or equal to a preset signal duration and whose time interval with the next data segment is greater than or equal to the preset time as the data segment corresponding to the instantaneous pulse signal.

8. The apparatus according to any one of claims 5-7, characterized in that, The input voltage signal is a ramp voltage signal.

9. The apparatus according to any one of claims 5-7, characterized in that, The instantaneous pulse signal is any one of the following: Instantaneous rising pulse signal and instantaneous falling pulse signal.

10. An analog-to-digital converter, characterized in that, Including processor and memory; The memory stores instructions that, when executed by the processor, are used to perform the method of any one of claims 1-4.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Novel transient oscillation signal angular domain order tracking sampling and analytical method

    CN103278235A

  • Microcontroller based electromyogram signal processing and feature extraction method

    CN105686827A

  • Polynomial Kalman filtering method and filter

    CN108809272A

  • Analogue video signal processing circuit testing method

    CN101022566A

  • Circuit and method for achieving voltage transient signal detection based on FPGA

    CN109633253A