Automatic range adjusting method, medium, program, electronic terminal and system based on gain-adjustable sampling front end

By automatically adjusting the range at the sampling front end and using positive and negative correction factors, the problem of inaccurate range setting in the prior art is solved, enabling automatic, fast, and accurate setting of the sampling range without changing the measurement parameters, thus improving measurement accuracy.

CN120811380APending Publication Date: 2025-10-17SHANGHAI YOUHEMEI MEDICAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510920966.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-10-17

Smart Images

  • Figure CN120811380A_ABST
    Figure CN120811380A_ABST
Patent Text Reader

Abstract

The invention provides an automatic measuring range adjusting method based on a gain adjustable sampling front end, a medium, a program, an electronic terminal and a system, and the method comprises the steps: calculating an excessive range proportion through obtaining the total number of sampling points and the number of excessive range sampling points, comparing the excessive range proportion with a preset threshold value, automatically carrying out the measuring range extension, and after the measuring range extension, carrying out the automatic adjustment of the measuring range. Whether the measuring range is too large or not is judged through another threshold value comparison algorithm, and when the measuring range is too large, the measuring range is reduced, so that the most appropriate measuring range is finally obtained. Therefore, the sampling range of the measured signal can be automatically, quickly and accurately set in a reasonable range even in an application scene that the signal amplitude fluctuates severely or comprises an accidental peak.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of electronic test measurement and signal sampling control, in particular to an automatic range adjustment method based on a gain-adjustable sampling front end, a medium, a program, an electronic terminal and a system. BACKGROUND

[0002] In the sampling front end of an oscilloscope, a digital acquisition card or a data acquisition card, etc., a reasonable setting of the sampling range can make the measured signal neither excessively saturated nor excessively blank in the screen or the storage buffer, so as to facilitate manual observation and maximize the utilization of the resolution of the ADC and improve the test accuracy.

[0003] Currently, users mainly complete the range setting in two ways: one is manual knob or menu adjustment, and repeated trial sampling according to whether the waveform is saturated; the other is the "Auto" mode of the instrument, which can automatically match the range according to the waveform once, but at the same time, it will cause the linkage change of the measurement parameters such as sampling period, sampling point number and sampling rate, thereby affecting the subsequent data processing and analysis.

[0004] In order to overcome the linkage change of the measurement parameters in the "Auto" mode, the existing solution is to calculate the peak-to-peak value in the current buffer by software and multiply it by a fixed coefficient (such as 1.25x) to set the range. When the signal amplitude fluctuates sharply or contains occasional spikes, it is easy to set inaccurately, and often needs to be manually reset several times to approach the optimal range. SUMMARY

[0005] In view of the above-mentioned shortcomings of the prior art, the purpose of the present application is to provide an automatic range adjustment method based on a gain-adjustable sampling front end, a medium, a program, an electronic terminal and a system, which is used to solve the problem of automatically adjusting the sampling range of the sampling front end without changing the measurement parameters.

[0006] To achieve the above-mentioned purpose and other related purposes, the first aspect of the present application provides an automatic range adjustment method based on a gain-adjustable sampling front end, the steps of which include: S1: acquiring the current sampling range [U min , U max ] of the sampling front end and the sampling data obtained by sampling once under the sampling range; S2: counting the quantity parameters of the sampling data; wherein the quantity parameters include the total number of sampling points N0, the number of sampling points with voltage value greater than or equal to U max N1 and the number of sampling points with voltage value less than or equal to U min N2; S3: calculating the current over-range ratio K according to the quantity parameters; wherein, S4: comparing the size relationship between the over-range ratio K and a preset first threshold K0, if K>K0, adjusting the adjustable gain module of the sampling front end to expand the range of the sampling range [U min , U max ] and repeating steps S1-S4 until K≤K0.

[0007] In an embodiment of the first aspect of the present application, the range of the sampling range [U min , U max ] is expanded according to a positive correction factor Q1; wherein the calculation function of the positive correction factor Q1 comprises: Q1=min((1+K×B1), B2); at this time, the sampling range [U min , U max ] is: wherein B1 is a preset first multiplier, B2 is a preset second multiplier, B1>1 and B2≥1+K×B1.

[0008] In an embodiment of the first aspect of the present application, the steps of the method further comprise: S5: calculating a second threshold J0 according to a preset first ratio P1 and the sampling range [U min , U max ] obtained after the last expansion by step S4; wherein J0=U min +(U max -U min )×P1; S6: comparing the size relationship between the maximum absolute value J of the sampling point voltage in the sampling data obtained after the last sampling by step S1 and the second threshold J0, if J≤J0, adjusting the adjustable gain module of the sampling front end to reduce the range of the sampling range [U min , U max ].

[0009] In an embodiment of the first aspect of the present application, the range of the sampling range [U min , U max ] is reduced according to a preset negative correction factor Q2, wherein the calculation function of the negative correction factor Q2 comprises: At this time, the sampling range [U min , U max ] is: wherein B3 is a preset third multiplier and B3<1.

[0010] In an embodiment of the first aspect of the present application, the function type of the calculation formula of the positive correction factor Q1 and the negative correction factor Q2 comprises a linear function and a nonlinear function.

[0011] In an embodiment of the first aspect of the present application, the sampling range [U min , U max ] is the actual sampling range [U min_1 , U max_1 ] or the effective sampling range [U min_2 , U max_2 ]; wherein U max_1 , U min_1 are upper limit value and lower limit value of the sampling range actually configured by the sampling front end, U max_2 , U min_2 are upper limit value and lower limit value of the sampling range calculated according to the actual sampling range [U min_1 , U max_1 ] and the preset second ratio P2, wherein U max_2 = U max_1 -(U max_1 -U min_1 )×P2, U min_2 = U min_1 +(U max_1 -U min_1 )×P2.

[0012] To achieve the above object and other related objects, the second aspect of the present application provides an automatic range adjustment method based on a gain-adjustable sampling front end, applied to a sound field scanning system, the steps of the method comprising: using any of the above methods to achieve automatic range adjustment of the sampling front end in the sound field scanning system; wherein the sampling front end is used to collect sound wave signals, and the sampling front end is arranged in the analog input channel of an oscilloscope, a data acquisition card or a digitizer.

[0013] To achieve the above object and other related objects, the third aspect of the present application provides a computer storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement any of the above methods.

[0014] To achieve the above object and other related objects, the fourth aspect of the present application provides a computer program product, which comprises computer program code, and when the computer program code is run on a computer, the computer is caused to implement any of the above methods.

[0015] To achieve the above object and other related objects, the fifth aspect of the present application provides an electronic terminal, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement any of the above methods.

[0016] To achieve the above object and other related objects, the sixth aspect of the present application provides an automatic range adjustment system based on a gain-adjustable sampling front end, comprising: a data acquisition, calculation and control module, configured to acquire a current sampling range [U min , U max ] of the sampling front end and sampling data obtained by sampling once under the sampling range; count a quantity parameter of the sampling data; wherein the quantity parameter comprises a total number of sampling points N0, a number of sampling points with a voltage value greater than or equal to U max N1 and a number of sampling points with a voltage value less than or equal to U min N2; calculate a current over-range ratio K according to the quantity parameter; wherein, compare the over-range ratio K and a preset first threshold K0, if K>K0, adjust an adjustable gain module of the sampling front end to expand a range of the sampling range [U min , U max ], and repeat steps S1-S4 until K≤K0; and a sampling front end, configured to provide data parameters required by the data acquisition, calculation and control module, and receive and execute control instructions thereof.

[0017] To achieve the above object and other related objects, the seventh aspect of the present application provides an automatic range adjustment system based on a gain-adjustable sampling front end, applied to a sound field scanning system, comprising: a data acquisition, calculation and control module, configured to realize automatic range adjustment of a sampling front end in the sound field scanning system by using any of the above methods; and a sampling front end, configured to provide data parameters required by the data acquisition, calculation and control module, and receive and execute control instructions thereof; wherein the sampling front end is configured to collect sound wave signals, and the sampling front end is arranged in an analog input channel of an oscilloscope, a data acquisition card or a digitizer.

[0018] As described above, the present application has the following beneficial effects:

[0019] The over-sampling range proportion of the measured signal is determined by calculating the proportion of the number of sampling points in the over-sampling range relative to the total number of sampling points, and the size relationship between the over-sampling range proportion K and a preset first threshold K0 is compared. If the over-sampling range proportion is greater than the preset first threshold, the sampling range is automatically expanded, and it is determined again whether there is an over-sampling range. Until the current sampling range can completely display the upper and lower peak values of the measured signal waveform. And next, on the basis of the current expanded sampling range, a second threshold is calculated by the current sampling range, and the size of the measured signal under the current sampling range and the second threshold is compared to determine whether the measured signal waveform under the current sampling range has "white space", that is, whether the sampling range after the last expansion is too large. If the current sampling range is too large, the range of the sampling range is reduced according to the negative correction factor. Thus, even in the application scenario where the signal amplitude fluctuates sharply or contains occasional sharp peaks, the sampling range of the measured signal can be automatically, quickly and accurately set within a reasonable range. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 A flowchart of an automatic range adjustment method based on a gain-adjustable sampling front end is shown.

[0021] Figure 2 A flowchart of an automatic range adjustment method based on a gain-adjustable sampling front end is shown.

[0022] Figure 3 A flowchart of an automatic range adjustment method based on a gain-adjustable sampling front end is shown.

[0023] Figure 4 A structural diagram of an electronic terminal is shown.

[0024] Figure 5 A structural diagram of an automatic range adjustment system based on a gain-adjustable sampling front end is shown. DETAILED DESCRIPTION

[0025] The embodiments of the present application will be described in detail hereinafter with specific reference to the drawings. Those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in the specification. The present application can also be implemented or applied by different specific embodiments, and the details in the specification can be modified or changed based on different views and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0026] As Figure 1As shown, the first aspect of the present application provides an automatic range adjustment method based on a gain-adjustable sampling front end, the steps of the method comprising:

[0027] S1: obtaining the current sampling range [U min , U max ] of the sampling front end and the sampling data obtained by sampling once under the sampling range.

[0028] It should be understood that the sampling front end refers to an analog input circuit (AFE) with attenuation / amplification function and programmable gain switching between the input end of the measured signal and the analog-to-digital converter, which can be set in an oscilloscope, a data acquisition card, or a digitizer with an adjustable gain sampling channel.

[0029] Preferably, in an embodiment, the sampling range [U min , U max ] is the actual sampling range [U min_1 , U max_1 ], and U max_1 , U min_1 are the upper limit value and the lower limit value of the actual sampling range configured by the sampling front end. It should be understood that the actual sampling range refers to the complete voltage interval allowed to be input by the sampling front end under the condition of not clipping and maintaining linearity at the current gain level. Specifically, this range refers to the input signal voltage range actually configured by the sampling front end in the present application, which is usually determined according to the gain setting and hardware capability of the system.

[0030] Preferably, in an embodiment, the sampling range [U min , U max ] is the effective sampling range [U min_2 , U max_2 ], and U max_2 , U min_2 are the upper limit value and the lower limit value of the sampling range calculated according to the actual sampling range [U min_1 , U max_1 ] and a preset second ratio P2, wherein,

[0031] U max_2 = U max_1 -(U max_1 -U min_1 )×P2,

[0032] U min_2 = U min_1 +(U max_1 -U min_1 )×P2,

[0033] Preferably, in an embodiment, the second proportion P2 is in the range of (5%-10%).

[0034] It should be understood that the effective sampling range refers to a sub-interval obtained by equidistantly reducing the actual sampling range by a preset proportion, which is only used for subsequent statistics and threshold judgment, and is not used to limit the hardware input (signal acquisition). It is based on the adjustment of the actual sampling range, by reducing the range boundary according to the preset proportion, the effective range of the signal is limited in a smaller interval, this range is not used to limit the input signal of the hardware, but is used for subsequent statistics, analysis and threshold judgment. By effectively excluding signals close to the upper and lower limits, the influence of nonlinearity and distortion on measurement accuracy can be avoided, and the quantization error of the sampling points is minimized. Since the gain nonlinearity and clipping of the amplifier and ADC in the sampling front end are most serious when approaching ±FSR, therefore, when the actual sampling range is reduced by 5%-10%, the distorted sampling points at the upper and lower boundaries of the actual range can be removed. And, the wider the range, the larger the LSB step; after the range is reduced, the sample points participating in the calculation all fall in the middle zone with the smallest quantization error. Therefore, when the effective sampling range is used, the value of the measured sampling points is more accurate.

[0035] For example, assuming that the actual sampling range of the system is -5V to 5V, since the amplifier and ADC may produce nonlinearity or clipping phenomenon when approaching ±5V, the effective sampling range can be reduced to -4.5V to 4.5V. So that the signal acquisition will be concentrated in a more accurate area, thereby ensuring the accuracy of the measurement.

[0036] S2: counting the quantity parameter of the sampling data; wherein, the quantity parameter includes the total number of sampling points N0, the number of sampling points N1 with voltage value greater than or equal to U max , and the number of sampling points N2 with voltage value less than or equal to U min .

[0037] It should be understood that the total number of sampling points N0 is the number of all effective sampling points in the buffer after this time triggered sampling, which is used to regulate the base in the subsequent proportion calculation; the number of sampling points N1 with voltage value greater than or equal to U max is the number of sampling points falling on the upper boundary of the range or exceeding the upper limit of the current range, and the number of sampling points N2 with voltage value less than or equal to U min is the number of sampling points falling on the lower boundary of the range or exceeding the lower limit of the current range, N1 and N2 both directly reflect the severity of signal saturation or clipping, and the higher the proportion of N1 or N2, the smaller the range setting.

[0038] It should be understood that in actual measurement, the sampling circuit of the sampling front end will be saturated and truncated when reaching the full range, that is, any signal exceeding the maximum input range of the hardware will be clamped at U max or Umin In general, there are no real sampling points with amplitude greater than U max or less than U min However, when the input signal has very sharp edges or high frequency components, the front-end filter or amplifier can have a short "overshoot" or "ringing", and the output voltage can slightly exceed the ideal full-scale peak value at the moment of A / D sampling, and then fall back to the clamping value. Moreover, some high-end ADCs not only return the full-scale code when overloaded, but also set one or two "reserved codes" to indicate the overflow state, and these codes can be interpreted as "slightly greater than" the full-scale value in numerical value. Therefore, the sampling point condition for setting the over-range is voltage greater than or equal to U max and voltage less than or equal to U min .

[0039] S3: Calculate the current over-range ratio K according to the quantity parameter; wherein,

[0040]

[0041] It should be understood that the over-range ratio K is used to quantify the overall severity of signal distortion under the current setting, taking into account the number of saturation cutoff points (the number of sampling points N1 with voltage greater than or equal to U max and the number of underflow clamping points (the number of sampling points N2 with voltage less than or equal to U min ), which can reflect the distortion of the signal at both ends of the given range.

[0042] S4: Compare the size relationship between the over-range ratio K and the first threshold K0, if K > K0, adjust the adjustable gain module of the sampling front-end to expand the range of the sampling range [U min , U max ], and repeat steps S1-S4 until K ≤ K0.

[0043] The first threshold K0 is preset by the user according to the amplitude variation characteristics of the measured signal and the tolerance of the truncation distortion, to quantify the maximum clamping sample ratio allowed in a sampling frame. For example, when K0 takes 0.02, i.e. at most 2% of the samples are clamped at the upper and lower limit boundaries, it is recognized that a small amount of truncation will not affect the overall signal structure, and it is avoided that too much distortion leads to the loss of key waveform information. After each sampling is completed, the system calculates the range exceeding ratio K by the ratio of the number of saturated or underflow clamped samples (N1+N2) to the total number of samples N0; if K>K0, it means that the current range is too narrow to completely capture the signal amplitude, and the programmable gain module needs to be expanded. After the range of the amplification is expanded, the new K is calculated by resampling; if K is still greater than K0, the range of the amplification is continuously expanded and sampled until K≤K0, and the adjustment is stopped. Through this iteration closed loop driven by the fault tolerance ratio, the system can not only ensure that the saturation and underflow distortion of the signal is controlled within the user acceptable range, but also can realize the accurate adaptive adjustment of the measured amplitude interval when the signal amplitude fluctuates sharply or contains occasional peaks.

[0044] For example, under the current range, the sampling front end obtains 100 sampling points after a sampling, which are M1, M2, M3... M100. 100 Among them, M 30 -M 39 is the sampling point exceeding the upper limit of the range, M 60 -M 70 is the sampling point exceeding the lower limit of the range, then N1 is 10, N2 is 11, and the current range exceeding ratio K is 0.1. Assuming that the first preset threshold K0 is 0.02, the current range is expanded once, and N1, N2 and K value are recalculated. Assuming that the recalculated K value is 0.15, the current range is expanded again, and N1, N2 and K value are recalculated. If the recalculated K value is still greater than the preset 0.02, the current range is expanded again until the K value is less than 0.02.

[0045] It should be understood that the expansion of the range [U min , U maxThe range of the sampling range [U min , U max ] includes three range expansion strategies, one is coarse adjustment, one is fine adjustment, and one is a combination of coarse adjustment and fine adjustment. The so-called coarse adjustment refers to using a larger step gain or gear jump to expand the range to cover the current measured peak-to-peak value range (or slightly redundant) at one time, thereby eliminating most saturation distortion in the least number of iterations. This mode can quickly bring the signal into the measurable area, and is especially suitable for situations where the initial range is unknown or the fluctuation range is extremely large. The so-called fine adjustment refers to using a smaller step gain or gear jump to adjust the range each time, so that K gradually converges to K0. The so-called combination of coarse adjustment and fine adjustment refers to first performing one or more coarse adjustments to quickly pull the range into the approximate range, and then switching to the fine adjustment mode to finely approach the target K0 with a small step, which can balance speed and accuracy, avoiding the "excessive waste" of pure coarse adjustment and shortening the convergence time of pure fine adjustment.

[0046] Preferably, the aforementioned fine adjustment can be realized by setting a forward correction factor. The range of the sampling range [U min , U max ] is expanded according to the forward correction factor Q1; wherein the calculation function of the forward correction factor Q1 includes: Q1 = min((1+K×B1), B2); wherein B1 is a preset first multiplier, B2 is a preset second multiplier, B1>1 and B2≥1+K×B1. At this time, the sampling range [U min , U max ] is:

[0047] Preferably, the function type of the calculation formula of the forward correction factor Q1 in the present application includes a linear function and a nonlinear function.

[0048] For example, assuming that the over-range ratio K under the current range is 0.21, the first threshold K0 is 0.02, and since K>K0, the current range is expanded once, assuming that B1 is 1.5 and B2 is 2, then min((1+K×B1), B2) = min((1+0.21×1.5), 2) = 1.315, that is, the forward correction factor Q1 is 1.315, then the expanded range this time is [(1.815U min -0.815U max ), (1.815U max -0.815U min )], if the K value under this range is still greater than K0, the range [(1.815U min -0.815U max ), (1.815U max -0.815U min) is expanded until K is less than or equal to K0, the range expansion is stopped, and the range obtained after the last expansion by step S4 is reserved.

[0049] As shown in Figure 2 Preferably, the steps of the automatic range adjustment method based on the gain-adjustable sampling front end of the present application further comprise:

[0050] S5: calculating a second threshold J0 according to a preset first ratio P1 and the sampling range [U min , U max ] obtained after the last expansion by step S4; wherein J0 = U min + (U max -U min ) x P1.

[0051] S6: comparing the maximum absolute value J of the sampling point voltage in the sampling data obtained after the last sampling by step S1 with the size of the second threshold J0, if J ≤ J0, adjusting the adjustable gain module of the sampling front end to reduce the range of the sampling range [U min , U max ].

[0052] It should be understood that the sampling data obtained after the last sampling by step S1 refers to the sampling data obtained after the last expansion of the range by step 4 and then sampling again.

[0053] For example, assuming that the first ratio P1 under the current range is 0.8, J0 is 2.4, and the maximum absolute value J after sampling is 1.2, since 1.2 < 2.4, it indicates that the margin of the current range exceeds 20% (1-0.8=0.2), and the range needs to be reduced.

[0054] Preferably, the function type of the calculation formula of the negative correction factor Q2 in the present application includes a linear function and a nonlinear function.

[0055] Preferably, the range of the sampling range [U min , U max ] is reduced according to a preset negative correction factor Q2, wherein the calculation function of the negative correction factor Q2 includes: At this time, the sampling range [U min , U max ] is: Wherein B3 is a preset third ratio and B3 < 1.

[0056] For example, assuming that the first ratio P1 is 0.8, J0 is 2.4, the maximum absolute value J after sampling is 1.2, and B3 is 0.9, then According to the negative correction factor Q2, the sampling range is reduced to [0.45U min +0.55U max , 0.55U min +0.45U max ].

[0057] like Figure 3 As shown, the entire process including both steps 1-4 and steps 5-6 in an automatic range adjustment method based on a gain-adjustable sampling front end according to the present invention is shown. It should be understood that steps 1-4 ensure that the amplitude of the measured signal can fully adapt to the current range by extending the range, or even if it cannot be fully accommodated, the over-range ratio of the signal will be kept within the user's allowable limit. Since when the signal amplitude exceeds the range, the excess part will be truncated or distorted, which means that the sampling system cannot accurately capture the complete information of the signal. By bringing the signal into the range, it can be ensured that the entire signal can be correctly collected, thereby avoiding data loss or distortion. Even in the case of a sudden increase in the signal amplitude, the signal can still be completely (or nearly completely) collected. However, setting the range too wide can cause the signal waveform to appear too flat, meaning the waveform is "squashed" or details are distorted. Since sampling accuracy is directly related to the sampling system's range, when the range is too large, changes in signal amplitude are mapped onto a wider range, resulting in a larger span between adjacent sampling points. Consequently, the system's quantization step size (i.e., the amplitude difference corresponding to each sampling point) increases, reducing the system's ability to resolve subtle signal changes and weakening its ability to capture subtle fluctuations. Furthermore, when the range is too large, smaller amplitude changes may be "smoothed out," making it impossible to effectively restore the details of the original signal after digitization. This error accumulates during subsequent signal processing, affecting the accuracy of the final measurement result. Therefore, when steps 5 and 6 are added, by determining whether the waveform is too flat and appropriately reducing the range if so, the amplitude of the measured signal is appropriately proportional to the overall range, thereby improving measurement accuracy. It should be understood that when the upper and lower peak values ​​of the measured signal are known, range adjustment based on these peak values ​​can usually adjust the range to the appropriate range in one go, without having to go through multiple iterative adjustments as with range expansion. In summary, the combination of steps 1-6 allows the sampling range of the measured signal to be automatically, quickly, and accurately set within a reasonable range, even in application scenarios where the signal amplitude fluctuates violently or contains occasional spikes, and achieves higher measurement accuracy.

[0058] The second aspect of the present application provides an automatic range adjustment method based on a gain-adjustable sampling front end, which is applied to a sound field scanning system. The steps of the method include: using any of the above-mentioned methods to realize automatic range adjustment of the sampling front end in the sound field scanning system; wherein the sampling front end is used to collect sound wave signals, and the sampling front end is arranged in the analog input channel of an oscilloscope, a data acquisition card or a digitizer.

[0059] It should be understood that the sound field scanning system is a technical system for measuring and analyzing the propagation, reflection and distribution of sound waves in space. Its application scenarios include acoustic environmental monitoring, ultrasonic testing, sound wave imaging and related experimental research. In this system, sound wave signals usually need to be collected by sensors (such as hydrophones) and transmitted to subsequent data acquisition modules for further processing. In the sound field scanning system, the sampling front end is responsible for receiving analog signals collected from the sensor. Because the intensity of sound wave signals can vary greatly (for example, the sound pressure level ranges from weak background noise to strong sound sources), the gain and range adjustment of the sampling front end is particularly important. Range adjustment helps to ensure that signals can adapt to signals of different intensities without losing important information. Therefore, the present application provides a range adjustment method for a gain-adjustable sampling front end, which can automatically adjust the range of sampling as needed to optimize the accuracy and dynamic range when collecting signals, and effectively avoid signal overload or loss when processing sound wave signals in complex environments (such as environmental noise, reflected waves, etc.).

[0060] The third aspect of the present application provides a computer storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement any of the above-mentioned methods.

[0061] The fourth aspect of the present application provides a computer program product, which includes computer program code, and when the computer program code runs on a computer, it makes the computer implement any of the above-mentioned methods.

[0062] The fifth aspect of the present application provides an electronic terminal, which includes a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement any of the above-mentioned methods.

[0063] As Figure 4As shown, the electronic terminal provided by the embodiment of the present application is a schematic block diagram. The electronic terminal comprises at least one processor 401, a memory 402, at least one network interface 403 and a user interface 405. The various components in the electronic terminal are coupled together through a bus system 404. It can be understood that the bus system 404 is used to realize the connection communication between the components. In addition to the data bus, the bus system 404 also comprises a power bus, a control bus and a status signal bus.

[0064] The user interface 405 can comprise a display, a keyboard, a mouse, a trackball, a click gun, a key, a button, a touchpad or a touch screen, etc.

[0065] It can be understood that the memory 402 can be a volatile memory or a non-volatile memory, and can also comprise both volatile and non-volatile memories. The non-volatile memory can be a read-only memory (ROM, Read Only Memory), a programmable read-only memory (PROM, Programmable Read-Only Memory), which is used as an external cache. By way of example but not limitation, many forms of RAM can be used, such as static random access memory (SRAM, Static Random Access Memory), synchronous static random access memory (SSRAM, Synchronous Static Random Access Memory). The memory described in the embodiment of the present application is intended to include but not limited to these and any other suitable categories of memory.

[0066] The memory 402 in the embodiment of the present application is used to store various categories of data to support the operation of the electronic terminal 400. Examples of these data include any executable programs for operating on the electronic terminal 400, such as an operating system 4021 and an application program 4022. The operating system 4021 comprises various system programs, such as a framework layer, a core library layer, a driver layer, etc., for realizing various basic services and processing hardware-based tasks. The application program 4022 can comprise various application programs, such as a media player (Media Player), a browser (Browser), etc., for realizing various application services. The method provided by the embodiment of the present application can be contained in the application program 4022.

[0067] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by processor 401. Processor 401 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in processor 401 or by software instructions. The above processor 401 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 401 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor 401 may be a microprocessor or any conventional processor. The steps of the accessory optimization method provided in conjunction with the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium located in a memory. The processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.

[0068] In an exemplary embodiment, the electronic terminal 400 may be configured to execute the aforementioned method using one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), or complex programmable logic devices (CPLDs).

[0069] like Figure 5 As shown, the sixth aspect of the present application provides an automatic range adjustment system based on a gain-adjustable sampling front end, comprising: a data acquisition, calculation and control module for obtaining the current sampling range of the sampling front end [U min , U max ] and the sampling data obtained by sampling once under the sampling range; counting the quantity parameters of the sampling data; wherein the quantity parameters include the total number of sampling points N0, the voltage value greater than or equal to U max The number of sampling points N1 and the voltage value is less than or equal to U min The number of sampling points N2; the current over-range ratio K is calculated according to the number parameter; wherein, Compare the magnitude relationship between the over-range ratio K and the preset first threshold K0. If K>K0, adjust the adjustable gain module of the sampling front end to expand the sampling range [U min , U maxthe range of K0, and repeating steps S1-S4 until K≤K0; a sampling front end to provide data parameters required by the data acquisition, calculation and control module and to receive and execute control instructions thereof.

[0070] It should be understood that the specific processes of the respective modules performing the above respective steps have been described in detail in the above method embodiments, and for the sake of brevity, will not be repeated here.

[0071] It should also be understood that the division of the modules in the embodiments of the present application is illustrative, and is merely a logical functional division. In actual implementation, there can be another division manner. In addition, the functional modules in each of the embodiments of the present application can be integrated in one processor, or can be physically separate, or two or more modules can be integrated in one module. The integrated modules can be realized in the form of hardware or in the form of software functional modules.

[0072] As shown in Figure 5 The seventh aspect of the present application provides an automatic range adjustment system based on a gain-adjustable sampling front end, applied to a sound field scanning system, comprising: a data acquisition, calculation and control module, configured to implement automatic range adjustment of a sampling front end in the sound field scanning system using any of the above methods; a sampling front end, configured to provide data parameters required by the data acquisition, calculation and control module and to receive and execute control instructions thereof; wherein the sampling front end is configured to collect sound wave signals, and the sampling front end is arranged in an analog input channel of an oscilloscope, a data acquisition card or a digitizer.

[0073] It should be understood that the specific processes of the respective modules performing the above respective steps have been described in detail in the above method embodiments, and for the sake of brevity, will not be repeated here.

[0074] It should also be understood that the division of the modules in the embodiments of the present application is illustrative, and is merely a logical functional division. In actual implementation, there can be another division manner. In addition, the functional modules in each of the embodiments of the present application can be integrated in one processor, or can be physically separate, or two or more modules can be integrated in one module. The integrated modules can be realized in the form of hardware or in the form of software functional modules.

[0075] In the embodiments of the present application, the same items or similar items with basically the same functions and effects are distinguished by using "first", "second", etc. For example, first XX and second XX are only used to distinguish different XXs, and do not limit the order. Those skilled in the art can understand that "first", "second", etc. do not limit the number and execution order, and "first", "second", etc. also do not necessarily mean different.

[0076] It should be noted that the terms "exemplary", "for example", or "e.g." as used herein indicate a non-limiting example, instance, or illustration. Any embodiment or design described herein as "exemplary", "for example", or "e.g." should not be construed as necessarily being preferable or advantageous over other embodiments or designs. Rather, the use of terms such as "exemplary", "for example", or "e.g." is merely intended to present certain concepts in a concrete manner.

[0077] In the embodiments of the present application, "at least one" means one or more, "multiple" means two or more, and "several" means one or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, A and / or B, which can represent the following three cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the front and rear associated objects. "At least one of the following" or similar expressions means any combination of these items, including single item or any combination of multiple items. For example, at least one of a, b or c can represent a, b, c, a-b, a-c, b-c or a-b-c, where a, b and c can be single or multiple.

[0078] The terms "component", "module", "system", and the like used in the present specification are used to represent computer-related entities, hardware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable, an execution thread, a program, and / or a computer. By way of illustration, both an application running on a computing device and the computing device can be a component. One or more components can reside within a process and / or an execution thread, and a component can be located on one computer and / or distributed between two or more computers. In addition, these components can be executed from various computer-readable media having various data structures stored thereon. Components can communicate via local and / or remote processes, for example, according to a signal having one or more data packets (e.g., data from a component that is transmitted to another component by way of a data signal in a network, such as the Internet, from a local system, a distributed system, and / or across various networks).

[0079] Those of ordinary skill in the art can realize that the various illustrative logical blocks and steps described in connection with the embodiments disclosed herein can be implemented or performed with an electronic hardware, or a combination of computer software and electronic hardware. The choice of hardware or software implementation depends on the specific application and design constraints of the technical solution. A skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0080] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the division of the above-described device embodiments is only a logical function division, and there can be another division manner for actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, or the among different units, can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.

[0081] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments of the present application.

[0082] In addition, each functional unit in the embodiments of the present application can be integrated in a processing unit, or each unit can exist physically as a separate unit, or two or more units can be integrated in one unit.

[0083] In the above embodiments, the functions of the various functional units can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, the functions can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, the whole or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. containing one or more available media. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as high-density digital video disc (digital video disc, DVD), or semiconductor media (such as solid state disk (solid state disk, SSD) and the like.

[0084] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of software products. The computer software product is stored in a storage medium and includes a number of instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the embodiments of the present application. The storage medium mentioned above includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and various media that can store program codes.

[0085] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0086] In summary, the present application effectively overcomes the shortcomings in the prior art and has a high industrial utilization value.

[0087] The above embodiments only illustrate the principles and effects of the present application, and are not intended to limit the present application. Any modification or change made by any person skilled in the art without departing from the spirit and scope of the present application shall be covered by the claims of the present application.

Claims

1. An automatic range adjustment method based on a gain-adjustable sampling front end, characterized in that: The steps of the method include: S1: Get the current sampling range of the sampling front end [U min , U max ] and the sampling data obtained by performing a single sampling under the sampling range; S2: Count the number parameters of the sampled data; wherein the number parameters include the total number of sampling points N0, the voltage value greater than or equal to U max The number of sampling points N1 and the voltage value is less than or equal to U min The number of sampling points N2; S3: Calculate the current over-range ratio K based on the quantity parameter; wherein, S4: Compare the over-range ratio K with the preset first threshold K0. If K>K0, adjust the adjustable gain module of the sampling front end to expand the sampling range [U min , U max ] and repeat steps S1-S4 until K≤K0.

2. The automatic range adjustment method based on a gain-adjustable sampling front end according to claim 1, characterized in that: The sampling range [U min , U max ] range; wherein the calculation function of the forward correction factor Q1 includes: Q1=min((1+K×B1),B2); At this time, the sampling range [U min , U max ]for: Wherein, B1 is a preset first magnification, B2 is a preset second magnification, B1>1 and B2≥1+K×B1.

3. The automatic range adjustment method based on a gain-adjustable sampling front end according to claim 1, characterized in that: The method further comprises the steps of: S5: According to the preset first ratio P1 and the sampling range obtained after the last expansion in step S4 [U min , U max ] Calculate the second threshold J0; wherein, J0=U min +(U max -U min )×P1; S6: Compare the maximum absolute value J of the sampling point voltage in the sampling data obtained after the last sampling in step S1 with the second threshold J0. If J≤J0, adjust the adjustable gain module of the sampling front end to reduce the sampling range [U min , U max ] range.

4. The automatic range adjustment method based on a gain-adjustable sampling front end according to claim 3, characterized in that: The sampling range is reduced according to the preset negative correction factor Q2 [U min , U max ] range, wherein the calculation function of the negative correction factor Q2 includes: At this time, the sampling range [U min , U max ]for: Wherein, B3 is a preset third magnification and B3<1.

5. The automatic range adjustment method based on a gain-adjustable sampling front end according to claim 4, characterized in that: The function types of the calculation formulas for the positive correction factor Q1 and the negative correction factor Q2 include linear functions and nonlinear functions.

6. The automatic range adjustment method based on a gain-adjustable sampling front end according to claim 1, characterized in that: The sampling range [U min , U max ] is the actual sampling range [U min_1 , U max_1 ] or effective sampling range [U min_2 , U max_2 ]; wherein, the U max_1 、U min_1 The upper limit and lower limit of the sampling range actually configured by the sampling front end are respectively max_2 、U min_2 According to the actual sampling range [U min_1 , U max_1 ] and the preset second ratio P2 are calculated to obtain the upper limit and lower limit of the sampling range, wherein, IN max_2 =U max_1 -(IN max_1 -IN min_1 )×P2, IN min_2 =U min_1 +(In max_1 -IN min_1 )×P2.

7. An automatic range adjustment method based on a gain-adjustable sampling front end, applied to a sound field scanning system, characterized in that: The steps of the method include: The method described in any one of claims 1 to 6 is used to realize automatic range adjustment of the sampling front end in the sound field scanning system; wherein, the sampling front end is used to collect sound wave signals, and the sampling front end is arranged in the analog input channel of an oscilloscope, a data acquisition card or a digitizer.

8. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

9. A computer program product, characterized in that The computer program product includes computer program code, which, when executed on a computer, enables the computer to implement the method according to any one of claims 1 to 6.

10. An electronic terminal comprising a memory, a processor, and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the method according to any one of claims 1 to 6.

11. An automatic range adjustment system based on a gain-adjustable sampling front end, characterized in that: include: Data acquisition, calculation and control module, used to obtain the current sampling range of the sampling front end [U min , U max ] and the sampling data obtained by performing a single sampling under the sampling range; Count the number parameters of the sampled data; wherein the number parameters include the total number of sampling points N0, the voltage value greater than or equal to U max The number of sampling points N1 and the voltage value is less than or equal to U min The number of sampling points N2; the current over-range ratio K is calculated according to the number parameter; wherein, Compare the magnitude relationship between the over-range ratio K and the preset first threshold K0. If K>K0, adjust the adjustable gain module of the sampling front end to expand the sampling range [U min , U max ] and repeat the steps S1-S4 until K≤K0; The sampling front end is used to provide the data parameters required by the data acquisition, calculation and control modules, and to receive and execute their control instructions.

12. An automatic range adjustment system based on a gain-adjustable sampling front end, applied to a sound field scanning system, characterized in that: include: A data acquisition, calculation and control module for implementing automatic range adjustment of the sampling front end in the sound field scanning system using the method described in any one of claims 1 to 6; A sampling front end is used to provide the data parameters required by the data acquisition, calculation and control module, and to receive and execute its control instructions; wherein, the sampling front end is used to collect acoustic wave signals, and the sampling front end is set in the analog input channel of an oscilloscope, data acquisition card or digitizer.