Signal conditioning circuit, analog-to-digital conversion system, gain adjusting method and device
By using switching modules and multiple signal conditioning modules in the analog-to-digital conversion system, the problem of data unavailability in the existing technology is solved by using switching modules and multiple signal conditioning modules, and high-precision analog-to-digital conversion is realized.
Patent Information
- Application Number
- CN202510145858.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-06-13
AI Technical Summary
Before the ADC starts to perform analog-to-digital conversion, the existing analog-to-digital conversion system needs to configure the amplification of the signal conditioning circuit. Due to the limited bandwidth of the amplifier, it takes a long time to establish the process after adjusting the gain, resulting in some data being unavailable during the sampling process.
By setting up a switching module and multiple signal conditioning modules in the signal conditioning circuit, switching instructions are generated based on the predicted gain gear and the predicted signal, and the working signal conditioning module is quickly switched to reduce the switching time and ensure that data is available.
It realizes fast and accurate gear switching during analog-to-digital conversion, reducing data unavailability time and improving conversion accuracy.
Smart Images

Figure CN120150704A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of analog-to-digital conversion, and particularly to a signal conditioning circuit, an analog-to-digital conversion system, a gain adjustment method, a gain adjustment device, an analog-to-digital conversion chip, a machine-readable storage medium, and an electronic device. Background Art
[0002] An analog-to-digital conversion system performs analog-to-digital conversion through an analog-to-digital converter (ADC) chip. In front of the ADC, a signal conditioning circuit (usually composed of an amplifier) is generally added to condition the input signal to an amplitude suitable for the ADC to perform conversion. In the current analog-to-digital conversion system, before the ADC starts to perform analog-to-digital conversion, the amplification factor of the signal conditioning circuit needs to be configured; or the amplification factor of the signal conditioning circuit can be adjusted so that the signal chain can maintain high precision when processing different signals. Specifically, by setting an automatic gain control (AGC) circuit, the automatic adjustment of the gain of the signal conditioning circuit is realized. By analyzing the amplitude of the data output by the ADC, it can be determined whether the input signal exceeds the full scale of the ADC chip at this time or whether the input signal is much smaller than the full scale of the ADC chip, so as to determine whether to reduce or increase the gain of the signal conditioning circuit.
[0003] However, since the bandwidth of the amplifier in the existing signal conditioning circuit is limited, after the gain is adjusted, the amplifier requires a long establishment process, which will cause some points to exceed or be much smaller than the full scale of the ADC, resulting in some data being unavailable during the sampling process. As Figure 3 shown, Figure 3 schematically shows a signal diagram before and after gear switching according to the prior art. During the process of switching from the 10V gear to the 5V gear, the red part of the signal is unavailable just after the switching is completed. Summary of the Invention
[0004] The purpose of the embodiments of the present invention is to provide a signal conditioning circuit, an analog-to-digital conversion system, a gain adjustment method, a gain adjustment device, an analog-to-digital conversion chip, a machine-readable storage medium, and an electronic device. When gain switching is required, the signal conditioning circuit switches the working signal conditioning module through a switching module, so that the switching time is shortened, and a conversion circuit with high precision can be quickly established without waiting, ensuring the availability of data during the sampling process, thereby improving the conversion precision.
[0005] To achieve the above object, a first aspect of the present application provides a signal conditioning circuit, including: a switching module and a plurality of signal conditioning modules, each signal conditioning module is respectively connected to the switching module;
[0006] The switching module is configured to switch the signal conditioning module connected to the analog-to-digital converter in the analog-to-digital conversion system according to a switching instruction, so that in each analog-to-digital conversion, there is exactly one signal conditioning module connected to the analog-to-digital converter as the working signal conditioning module. The switching instruction is generated according to a predicted gain gear and a predicted signal. The predicted signal is used to determine whether to perform gear switching, and the predicted gain gear is used to determine which gear to switch to;
[0007] The signal conditioning module is configured to acquire a signal to be converted, adjust the signal to be converted to obtain an adjusted signal, and input the adjusted signal into the analog-to-digital converter for analog-to-digital conversion.
[0008] In an embodiment of the present application, the switching module includes multiple groups of switches, each group of switches corresponds to a signal conditioning module. One end of the switch is connected to the output end of the signal conditioning module, and the other end is connected to the input end of the analog-to-digital converter. Each group of switches is configured to open or close according to a switching instruction to switch the signal conditioning module connected to the analog-to-digital converter.
[0009] In an embodiment of the present application, the signal conditioning module includes multiple stages of amplifier circuit units, and the amplifier circuit units of each stage are cascaded. At least one stage of the amplifier circuit unit adopts a gain enhancement technique.
[0010] In an embodiment of the present application, it further includes a pre-charge module. The input end of the pre-charge module is connected to the output ends of each signal conditioning module, and the output end of the pre-charge module is connected to the analog-to-digital converter. The pre-charge module is configured to pre-charge the analog-to-digital converter in the sampling stage of each analog-to-digital conversion.
[0011] In an embodiment of the present application, the pre-charge module includes a pre-charge amplifier, a first pre-charge switch, and a second pre-charge switch. The input end of the pre-charge amplifier is connected to the output end of the working signal conditioning module, the output end of the pre-charge amplifier is connected to the input end of the analog-to-digital converter. One end of the first pre-charge switch is connected to the input end of the pre-charge amplifier, and the other end is connected to the output end of the pre-charge amplifier. One end of the second perturbation switch is connected to the output end of the pre-charge amplifier, and the other end is connected to the input end of the analog-to-digital converter.
[0012] A second aspect of the present application provides an analog-to-digital conversion system, including an analog-to-digital converter, a controller, and the above-mentioned signal conditioning circuit;
[0013] The controller is used to obtain a predicted gain gear and a predicted signal, generate a switching instruction according to the predicted gain gear and the predicted signal, and send the switching instruction to the signal conditioning circuit;
[0014] The signal conditioning circuit is used to obtain a signal to be converted, and adjust the signal to be converted according to the switching instruction to obtain an adjusted signal;
[0015] The analog-to-digital converter is used to perform analog-to-digital conversion on the adjusted signal to obtain a conversion result.
[0016] In the embodiment of the present application, a verification module is further included;
[0017] The controller is used to generate a verification switching instruction according to the predicted signal and the predicted gain gear, and send the verification switching instruction to the verification module; and is further used to generate a switching instruction according to the verification result and the predicted gain gear, and send the switching instruction to the signal conditioning circuit;
[0018] The verification module is used to verify the gear of the corresponding signal conditioning module in the signal conditioning circuit according to the verification switching instruction, obtain a verification result, and send the verification result to the controller.
[0019] In the embodiment of the present application, the verification module includes a switching switch, a first comparator and a second comparator. The output ends of the first comparator and the second comparator are respectively connected to the input end of the controller. The positive input end of the first comparator is connected to one end of the switching switch, and the negative input end of the second comparator is connected to one end of the switching switch. The negative input end of the first comparator is connected to a first reference voltage, and the positive input end of the second comparator is connected to a second reference voltage. The other end of the switching switch is connected to the output ends of each signal conditioning module in the signal conditioning circuit. The switching switch is used to switch the signal conditioning module connected to the first comparator and the second comparator according to the verification switching instruction.
[0020] A third aspect of the present application provides a gain adjustment method for the above-mentioned analog-to-digital conversion system. The gain adjustment method includes:
[0021] Obtain a predicted gain gear and a predicted signal;
[0022] Generate a switching instruction according to the predicted gain gear and the predicted signal;
[0023] Send the switching instruction to the signal conditioning circuit in the analog-to-digital conversion system, so that the signal conditioning circuit switches the signal conditioning module connected to the analog-to-digital converter in the analog-to-digital conversion system according to the switching instruction.
[0024] In the embodiment of the present application, obtaining the predicted gain gear includes:
[0025] Determining a signal change trend based on the historical conversion results of the analog-to-digital converter;
[0026] Determining the predicted gain gear based on the signal change trend.
[0027] In the embodiment of the present application, obtaining the predicted signal includes:
[0028] Determining the predicted signal according to the historical conversion results of the analog-to-digital converter according to a preset prediction model, where the prediction model is:
[0029] data(n)_predict = data(n - 1) + data(n - 1) - data(n - 2),
[0030] where data(n)_predict is the predicted signal, data(n - 1) is the conversion result of the analog-to-digital converter in the previous time, and data(n - 2) is the conversion result of the analog-to-digital converter in the time before the previous time.
[0031] In the embodiment of the present application, generating a switching instruction according to the predicted gain gear and the predicted signal includes:
[0032] Determining the signal conditioning module to be switched from multiple signal conditioning modules in the analog-to-digital conversion system according to the predicted gain gear;
[0033] Judging whether to perform a gain gear switching according to the predicted signal;
[0034] In the case of determining that a gain gear switching is to be performed, generating a switching instruction according to the signal conditioning module to be switched.
[0035] In the embodiment of the present application, after determining the signal conditioning module to be switched, it further includes:
[0036] Adjusting the gear of the signal conditioning module to be switched based on the predicted gain gear.
[0037] In the embodiment of the present application, judging whether to perform a gain gear switching according to the predicted signal includes:
[0038] Judging whether to perform a gain gear switching based on the historical conversion results of the analog-to-digital converter and the predicted signal.
[0039] In the embodiment of the present application, judging whether to perform a gain gear switching based on the historical conversion results of the analog-to-digital converter and the predicted signal includes:
[0040] Determine whether the predicted signal reaches a preset gear shifting threshold;
[0041] When it is determined that the predicted signal reaches the preset gear shifting threshold, based on the historical conversion results of the analog-to-digital converter, obtain the signal change, and determine whether the signal change reaches a preset threshold;
[0042] When it is determined that the historical conversion results of the analog-to-digital converter reach the preset threshold, determine to perform a gain gear shift.
[0043] In the embodiment of the present application, when it is determined to perform a gain gear shift, generating a switching instruction according to the signal conditioning module to be switched includes:
[0044] When it is determined to perform a gain gear shift, generate a verification switching instruction based on the current gear and the predicted gain gear, and send the verification switching instruction to the verification module in the analog-to-digital conversion system;
[0045] Obtain the verification result sent by the verification module;
[0046] Generate a switching instruction based on the verification result and the signal conditioning module to be switched.
[0047] In the embodiment of the present application, it further includes:
[0048] At the start of each sampling stage of analog-to-digital conversion, control the output end of the working signal conditioning module to be disconnected from the analog-to-digital converter, and control one end of the precharging module in the signal conditioning circuit to be connected to the working signal conditioning module and the other end to be connected to the analog-to-digital converter;
[0049] After a preset time, control the output end of the working signal conditioning module to be connected to the analog-to-digital converter, and control the precharging module to be disconnected from the analog-to-digital converter.
[0050] The fourth aspect of the present application provides a gain adjustment device for the above-mentioned analog-to-digital conversion system. The gain adjustment device includes:
[0051] An acquisition module, configured to acquire a predicted gain gear and a predicted signal;
[0052] An instruction module, configured to generate a switching instruction according to the predicted gain gear and the predicted signal;
[0053] A sending module, configured to send the switching instruction to the signal conditioning circuit in the analog-to-digital conversion system, so that the signal conditioning circuit switches the signal conditioning module connected to the analog-to-digital converter in the analog-to-digital conversion system according to the switching instruction.
[0054] In an embodiment of the present application, the obtaining module includes:
[0055] A first determination sub-module, configured to determine a signal change trend according to historical conversion results of an analog-to-digital converter;
[0056] A second determination sub-module, configured to determine a predicted gain gear based on the signal change trend.
[0057] In an embodiment of the present application, the obtaining module includes:
[0058] A third determination sub-module, configured to determine a predicted signal according to historical conversion results of an analog-to-digital converter according to a preset prediction model, where the prediction model is:
[0059] data(n)_predict = data(n - 1)+data(n - 1)-data(n - 2),
[0060] where data(n)_predict is the predicted signal, data(n - 1) is the conversion result of the analog-to-digital converter in the previous time, and data(n - 2) is the conversion result of the analog-to-digital converter in the time before the previous time.
[0061] In an embodiment of the present application, the instruction module includes:
[0062] A fourth determination sub-module, configured to determine a signal conditioning module to be switched from multiple signal conditioning modules in the analog-to-digital conversion system according to the predicted gain gear;
[0063] A judgment sub-module, configured to judge whether to perform a gain gear switching according to the predicted signal;
[0064] An instruction generation sub-module, configured to generate a switching instruction according to the signal conditioning module to be switched in the case of determining that a gain gear switching is to be performed.
[0065] In an embodiment of the present application, it further includes:
[0066] An adjustment module, configured to adjust the gear of the signal conditioning module to be switched based on the predicted gain gear.
[0067] In an embodiment of the present application, the judgment sub-module includes:
[0068] A first judgment unit, configured to judge whether to perform a gain gear switching based on historical conversion results of an analog-to-digital converter and the predicted signal.
[0069] In an embodiment of the present application, the first judgment unit includes:
[0070] A threshold judgment sub-unit, configured to judge whether the prediction signal reaches a preset gear shifting threshold;
[0071] A threshold value judgment sub-unit, configured to, when determining that the prediction signal reaches the preset gear shifting threshold, obtain a signal change according to the historical conversion result of the analog-to-digital converter, and judge whether the signal change reaches a preset threshold value;
[0072] A determination sub-unit, configured to determine to perform a gain gear shift when determining that the historical conversion result of the analog-to-digital converter reaches the preset threshold value.
[0073] In an embodiment of the present application, the instruction generation sub-module includes:
[0074] A verification instruction unit, configured to, when determining to perform a gain gear shift, generate a verification switching instruction based on the current gear and the predicted gain gear, and send the verification switching instruction to a verification module in the analog-to-digital conversion system;
[0075] An acquisition unit, configured to acquire a verification result sent by the verification module;
[0076] An instruction generation unit, configured to generate a switching instruction based on the verification result and the signal conditioning module to be switched.
[0077] In an embodiment of the present application, it further includes:
[0078] A first control module, configured to, at the beginning of each sampling stage of analog-to-digital conversion, control the output end of the working signal conditioning module to be disconnected from the analog-to-digital converter, and control one end of a pre-charging module in the signal conditioning circuit to be connected to the working signal conditioning module, and the other end to be connected to the analog-to-digital converter;
[0079] A second control module, configured to, after a preset time, control the output end of the working signal conditioning module to be connected to the analog-to-digital converter, and control the pre-charging module to be disconnected from the analog-to-digital converter.
[0080] A fifth aspect of the present application provides an analog-to-digital conversion chip, including an analog-to-digital converter core, a controller, and the above-mentioned signal conditioning circuit;
[0081] The controller is configured to acquire a predicted gain gear and a prediction signal, generate a switching instruction according to the predicted gain gear and the prediction signal, and send the switching instruction to the signal conditioning circuit;
[0082] The signal conditioning circuit is configured to acquire a signal to be converted, and adjust the signal to be converted according to the switching instruction to obtain an adjusted signal;
[0083] The analog-to-digital converter core is used to perform analog-to-digital conversion on the adjusted signal to obtain a conversion result.
[0084] In an embodiment of the present application, a verification module is further included;
[0085] The controller is configured to generate a verification switching instruction according to the prediction signal and the predicted gain gear, and send the verification switching instruction to the verification module; it is also configured to generate a switching instruction according to the verification result and the predicted gain gear, and send the switching instruction to the signal conditioning circuit;
[0086] The verification module is configured to verify the gear of the corresponding signal conditioning module in the signal conditioning circuit according to the verification switching instruction, obtain a verification result, and send the verification result to the controller.
[0087] In an embodiment of the present application, the verification module includes a switching switch, a first comparator, and a second comparator. The output ends of the first comparator and the second comparator are respectively connected to the input end of the controller. The positive input end of the first comparator is connected to one end of the switching switch. The negative input end of the second comparator is connected to one end of the switching switch. The other end of the switching switch is connected to the output ends of each signal conditioning module in the signal conditioning circuit. The switching switch is configured to switch the signal conditioning module connected to the first comparator and the second comparator according to the verification switching instruction.
[0088] A sixth aspect of the present application provides an electronic device, which includes:
[0089] At least one processor;
[0090] A memory connected to the at least one processor;
[0091] Wherein, the memory stores instructions executable by the at least one processor, and the at least one processor realizes the above-mentioned gain adjustment method by executing the instructions stored in the memory.
[0092] A seventh aspect of the present application provides a machine-readable storage medium, on which instructions are stored, and when the instructions are executed by a processor, the processor is configured to execute the above-mentioned gain adjustment method.
[0093] Through the above technical solution, by setting a switching module and a plurality of signal conditioning modules, each signal conditioning module is respectively connected to the switching module; the switching module switches the signal conditioning module connected to the analog-to-digital converter in the analog-to-digital conversion system according to a switching instruction, so that in each analog-to-digital conversion, there is and only one signal conditioning module connected to the analog-to-digital converter as the working signal conditioning module, and the switching instruction is generated according to the predicted gain gear and the predicted signal; the signal conditioning module acquires the signal to be converted, adjusts the signal to be converted to obtain an adjusted signal, and inputs the adjusted signal into the analog-to-digital converter for analog-to-digital conversion. For the plurality of signal conditioning modules, when one of them is used as the working signal conditioning module, the other signal conditioning modules serve as standby conditioning modules. When gain switching is required, the working signal conditioning module is switched through the switching module, so that the switching time is shortened, and a conversion circuit with high precision can be quickly established without waiting, ensuring the availability of data during the sampling process, thereby improving the conversion accuracy.
[0094] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent specific implementation part. BRIEF DESCRIPTION OF THE DRAWINGS
[0095] The drawings are used to provide a further understanding of the embodiments of the present invention, and constitute a part of the specification. Together with the following specific implementation manners, they are used to explain the embodiments of the present invention, but do not constitute a limitation to the embodiments of the present invention. In the drawings:
[0096] Figure 1 Schematically shows a connection diagram of a signal conditioning circuit and an analog-to-digital conversion system according to an embodiment of the present application;
[0097] Figure 2 Schematically shows a structural diagram of an analog-to-digital conversion system according to an embodiment of the present application;
[0098] Figure 3 Schematically shows a signal diagram before and after gear switching according to the prior art;
[0099] Figure 4 Schematically shows a connection diagram of a precharge module according to an embodiment of the present application;
[0100] Figure 5 Schematically shows a gear switching threshold diagram according to an embodiment of the present application;
[0101] Figure 6 Schematically shows a relationship diagram of the signal-to-noise ratio with respect to the amplitude of the input signal according to an embodiment of the present application;
[0102] Figure 7Schematically shows a flowchart of a gain adjustment method according to an embodiment of the present application;
[0103] Figure 8 Schematically shows a structural diagram of a gain adjustment device according to an embodiment of the present application;
[0104] Figure 9 Schematically shows the internal structure diagram of a computer device according to an embodiment of the present application.
[0105] Description of the reference numerals
[0106] 410 - Acquisition module; 420 - Instruction module; 430 - Transmission module; A01 - Processor; A02 - Network interface; A03 - Internal memory; A04 - Display screen; A05 - Input device; A06 - Non - volatile storage medium; B01 - Operating system; B02 - Computer program. Detailed implementation manners
[0107] The following will detail the specific implementation manners of the embodiments of the present invention with reference to the accompanying drawings. It should be understood that the specific implementation manners described herein are only for explaining and illustrating the embodiments of the present invention, and are not used to limit the embodiments of the present invention.
[0108] It should be noted that if there are directional indications (such as up, down, left, right, front, back...) involved in the embodiments of the present application, the directional indications are only used to explain the relative positional relationship and movement conditions between components in a specific posture (as shown in the drawings). If the specific posture changes, the directional indications will also change accordingly.
[0109] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions between various embodiments can be combined with each other, but it must be based on the ability of those of ordinary skill in the art to implement. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope required by the present application.
[0110] It should be noted that when giving examples in this embodiment, all data are recorded as signed numbers. Taking the decimal data corresponding to 16 - bit binary numbers as an example: when the signal is the positive maximum value, it is 32767; when the signal is the negative maximum value, it is - 32767.
[0111] Please refer to Figure 1 , Figure 1Schematically shown is a connection diagram of a signal conditioning circuit and an analog-to-digital conversion system according to an embodiment of the present application. This embodiment provides a signal conditioning circuit, including: a switching module and a plurality of signal conditioning modules, each signal conditioning module is respectively connected to the switching module;
[0112] The switching module is configured to switch the signal conditioning module connected to the analog-to-digital converter in the analog-to-digital conversion system according to a switching instruction, so that in each analog-to-digital conversion, there is exactly one signal conditioning module connected to the analog-to-digital converter as the working signal conditioning module. The switching instruction is generated according to a predicted gain gear and a predicted signal. The predicted signal is used to determine whether to perform a gear switching, and the predicted gain gear is used to determine which gear to switch to;
[0113] The signal conditioning module is configured to acquire a signal to be converted, adjust the signal to be converted to obtain an adjusted signal, and input the adjusted signal into the analog-to-digital converter for analog-to-digital conversion.
[0114] In this embodiment, the signal conditioning module can be an amplifier, which is used to condition the signal to an amplitude suitable for conversion by the ADC (analog-to-digital converter). The amplification factor of each signal conditioning module is adjustable. By adjusting the amplification factor of the signal conditioning module, high precision can be maintained when the signal chain processes different signals. The amplification factors of the above-mentioned signal conditioning modules can also be fixed at different values, or different amplification factors can be set for each signal conditioning module in advance before switching. The above-mentioned switching module is mainly used to switch the signal conditioning module. In each analog-to-digital conversion, there is exactly one signal conditioning module connected to the analog-to-digital converter. The predicted signal is used to determine whether to perform a gear switching, and the predicted gain gear is used to determine which gear to switch to. Generating a switching instruction according to the predicted gain gear and the predicted signal can enable the signal conditioning circuit to perform a fast and accurate gear switching. The above-mentioned switching module can be a switch, a relay, etc., which can control the connection and disconnection of each signal conditioning module and the analog-to-digital converter. When the switching module switches the signal conditioning module, the switched signal conditioning module is used as the working signal conditioning module to adjust the signal to be converted. Here, the adjustment means conditioning the signal to be converted to an amplitude suitable for conversion by the ADC. After switching, the non-working signal conditioning module is in a standby state. It should be noted that the number of signal conditioning modules can be set according to requirements, at least 2. For the convenience of explaining the solution, in this embodiment, mainly two signal conditioning modules are taken as an example for explanation.
[0115] In some embodiments, the switching module includes multiple groups of switches, each group of switches corresponding to a signal conditioning module. One end of the switch is connected to the output end of the signal conditioning module, and the other end is connected to the input end of the analog-to-digital converter. Each group of switches is used to open or close according to a switching instruction to switch the signal conditioning module connected to the analog-to-digital converter.
[0116] In this embodiment, one group of switches corresponds to one signal conditioning module. The switch is arranged between the signal conditioning module and the analog-to-digital converter to control the on / off of the signal circuit between the signal conditioning module and the analog-to-digital converter, so as to realize the switching of the signal conditioning module connected to the analog-to-digital converter. As Figure 2 shown, amplifier 1 and amplifier 2 are two signal conditioning modules respectively. Switch SW1 and switch SW2 are a group of switches, and switch SW3 and switch SW4 are a group of switches. Switch SW1 and switch SW2 correspond to amplifier 1, and switch SW3 and switch SW4 correspond to amplifier 2.
[0117] By setting the switching module as multiple groups of switches, each group of switches can correspond to a signal conditioning module and be opened or closed according to a switching instruction, so that the signal conditioning module connected to the analog-to-digital converter can be switched quickly and accurately, and the control is simple and convenient.
[0118] In some embodiments, the signal conditioning module includes multiple stages of amplifier circuit units, and the amplifier circuit units of each stage are cascaded, and at least one stage of amplifier circuit unit adopts a gain enhancement technique.
[0119] In this embodiment, in a high-precision signal link, in order to improve its total harmonic distortion (THD) performance, the gain of the signal conditioning module can be designed to be very large. Specifically, the gain of the key amplifier can be set very large. For example: Figure 2 amplifier 1 and amplifier 2 in. In order to achieve high gain, usually multiple stages of amplifiers need to be used, and at the same time, a gain enhancement technique needs to be used, that is, at least one stage of amplifier circuit unit is used for gain enhancement to achieve high gain. The above gain enhancement technique belongs to the prior art and will not be elaborated here.
[0120] By setting multiple stages of amplifier circuit units, the amplifier circuit units of each stage are cascaded, and at least one stage of amplifier circuit unit adopts a gain enhancement technique, so that the gain can be improved.
[0121] For example: As Figure 2 shown, amplifier 1 and amplifier 2 can set the gain to ±20V ± 12.5V ± 10V ± 6.25V ± 5V ± 2.5V by adjusting Rf1 and Rf2. It should be noted that amplifier 1 and amplifier 2 above can also achieve gain through passive devices such as capacitors.
[0122] Amplifier 1 is being connected to the subsequent circuit. Switch SW1 and switch SW2 are closed, and switch SW3 and switch SW4 are open. Taking the case where amplifier 1 operates in the ±10V range as an example, at this time, amplifier 2 is in a standby state, and its gain may be set to a range adjacent to that of amplifier 1, that is, it may be set to the ±12.5V range or the ±6.25V range. After receiving the switching instruction, switch SW1 and switch SW2 are opened, and switch SW3 and switch SW4 are closed, so that amplifier 2 operates. After the signal is adjusted by amplifier 2, it is input to the subsequent analog-to-digital converter for conversion, and amplifier 1 is in a standby state.
[0123] In the above implementation process, by setting a switching module and multiple signal conditioning modules, each signal conditioning module is respectively connected to the switching module; the switching module switches the signal conditioning module connected to the analog-to-digital converter in the analog-to-digital conversion system according to the switching instruction, so that in each analog-to-digital conversion, there is and only one signal conditioning module connected to the analog-to-digital converter as the working signal conditioning module. The switching instruction is generated according to the predicted gain range and the predicted signal; the working signal conditioning module acquires the signal to be converted, adjusts the signal to be converted to obtain an adjusted signal, and inputs the adjusted signal to the analog-to-digital converter for analog-to-digital conversion. Among the multiple signal conditioning modules, when one of them is used as the working signal conditioning module, the other signal conditioning modules serve as standby conditioning modules. When gain switching is required, the working signal conditioning module is switched by the switching module. In this way, compared with directly switching the gain of the amplifier, the switching time is shortened, and a conversion circuit with high precision can be quickly established without waiting, ensuring the availability of data during the sampling process, thereby improving the conversion accuracy.
[0124] In some embodiments, a pre-charging module is further included. The input end of the pre-charging module is connected to the output ends of each signal conditioning module, and the output end of the pre-charging module is connected to the analog-to-digital converter. The pre-charging module is used to pre-charge the analog-to-digital converter during the sampling stage of each analog-to-digital conversion.
[0125] In this embodiment, in actual implementation, directly connecting the output in the signal conditioning circuit to the ADC will also cause disturbances to the signal conditioning module. That is, when each sampling starts, the sampling capacitor of the ADC will cause a step disturbance to the voltage of the signal conditioning module. Therefore, in order to reduce the disturbance to the signal conditioning module, a pre-charge module is provided between the signal conditioning module and the ADC. The pre-charge module is used to pre-charge the analog-to-digital converter at the initial stage of the sampling phase of each analog-to-digital conversion, especially when the gain of the signal conditioning module is adjusted, so that its voltage quickly approaches the target value. Specifically, at the beginning of a period of each analog-to-digital conversion sampling, the capacitor of the analog-to-digital converter is charged. After the capacitor is charged for a period of time, the signal conditioning module and the ADC are then connected for conversion. In this way, when the ADC is connected, it does not disturb the signal conditioning module, but disturbs the pre-charge module. In this way, when switching the signal conditioning module, the switching speed will also be faster.
[0126] Wherein, the pre-charge module includes a pre-charge amplifier, a first pre-charge switch and a second pre-charge switch. The input end of the pre-charge amplifier is connected to the output end of the working signal conditioning module. The output end of the pre-charge amplifier is connected to the input end of the analog-to-digital converter. One end of the first pre-charge switch is connected to the input end of the pre-charge amplifier, and the other end is connected to the output end of the pre-charge amplifier. One end of the second pre-charge switch is connected to the output end of the pre-charge amplifier, and the other end is connected to the input end of the analog-to-digital converter.
[0127] In this embodiment, at the start of sampling, the first pre-charge switch is disconnected and the second pre-charge switch is closed. The pre-charge amplifier is connected to the analog-to-digital converter. At this time, the pre-charge amplifier charges the capacitor of the analog-to-digital converter. When the analog-to-digital converter is connected, it does not disturb the output of the signal conditioning module, but will disturb the output voltage of the pre-charge amplifier. After charging the capacitor of the analog-to-digital converter for a period of time, and then connecting the signal conditioning module, it will greatly reduce the disturbance to the output voltage of the signal conditioning module. That is, after a period of time, the first pre-charge switch is closed and the second pre-charge switch is disconnected. The signal conditioning module is connected to the analog-to-digital converter to allow the signal conditioning module to complete the charging of the analog-to-digital converter. In this way, the final voltage on the analog-to-digital converter is determined by the signal conditioning module, so the accuracy will not decrease; and due to the existence of the pre-charge amplifier, when the capacitor of the analog-to-digital converter is connected, it will not cause great disturbance to the signal conditioning module, and the voltage establishment time will not be too long.
[0128] For example, please refer to Figure 4 , Figure 4Schematically shows a schematic connection diagram of a pre - charge module according to an embodiment of the present application. The pre - charge amplifiers are amplifier 3 and amplifier 4, the first pre - charge switches are SW6 and SW8, the second pre - charge switches are SW7 and SW9, and amplifier 1 is a signal conditioning module. Before the ADC enters sampling, SW6, SW8, SW7, SW9, and SW_ADC are all in the off state.
[0129] When sampling starts, SW6 and SW8 are still in the off state. Then, in the first step, SW7 and SW9 are connected first, and in the second step, SW_ADC is connected. In this way, when the ADC is connected, it does not disturb the output of amplifier 1, but disturbs the output voltages of amplifier 3 and amplifier 4.
[0130] In the circuit, for amplifier 3 and amplifier 4, high gain is not required, and complex gain enhancement techniques do not need to be used. Moreover, the working time of amplifier 3 and amplifier 4 is very short, and the power consumption during operation can be designed to be very large. Therefore, the speed of amplifier 3 and amplifier 4 is much faster than that of amplifier 1. After amplifier 3 and amplifier 4 charge the capacitor of the ADC core for a period of time, for example, until the voltage builds up to 95%, and then the main amplifier is connected, the disturbance to the output voltage of amplifier 1 can be greatly reduced.
[0131] Therefore, after a period of time after completing the second step above, in the third step, SW7 and SW9 are disconnected, and SW6 and SW8 are connected to allow amplifier 1 to complete the charging of the ADC core. In this way, the final voltage on the ADC core is determined by amplifier 1, so the accuracy will not decrease; and due to the existence of amplifier 3 and amplifier 4, when the capacitor of the ADC core is connected, it will not cause great disturbance to amplifier 1, and the voltage build - up time will not be too long.
[0132] By setting the pre - charge module, at the start of sampling, the pre - charge module charges the analog - to - digital converter, and after a period of time, it is then connected to the signal conditioning module, thereby reducing the disturbance of the analog - to - digital converter to the signal conditioning module and improving the accuracy.
[0133] This embodiment provides an analog - to - digital conversion system, including an analog - to - digital converter, a controller, and the above - mentioned signal conditioning circuit;
[0134] The controller is used to obtain a predicted gain gear and a predicted signal, generate a switching instruction according to the predicted gain gear and the predicted signal, and send the switching instruction to the signal conditioning circuit;
[0135] The signal conditioning circuit is used to obtain a signal to be converted and adjust the signal to be converted according to the switching instruction to obtain an adjusted signal;
[0136] The analog-to-digital converter is used to perform analog-to-digital conversion on the adjustment signal to obtain a conversion result.
[0137] In this embodiment, the analog-to-digital converter performs analog-to-digital conversion on a signal. The signal conditioning circuit conditions the signal to be converted to an amplitude suitable for conversion by the analog-to-digital converter. The controller can adjust the amplification factor of the signal conditioning circuit so that the signal chain can maintain high precision when processing different signals. The controller generates a switching instruction according to the predicted gain gear and the predicted signal, and sends the switching instruction to the signal conditioning circuit. The signal conditioning circuit adjusts the signal to be converted after adjusting the gain according to the predicted gain gear. The above-mentioned predicted gain gear refers to the gain gear required for the next predicted conversion, which can be input by the user or predicted according to historical conversion data. The predicted signal can be obtained according to the historical conversion signal. The predicted signal is used to determine whether to perform gear switching, and the predicted gain gear is used to determine which gear to switch to. Generating a switching instruction according to the predicted gain gear and the predicted signal can enable the signal conditioning circuit to perform fast and accurate gear switching. The signal conditioning circuit switches the internal signal conditioning module according to the switching instruction to quickly complete the gain switching, and then adjusts the signal to be converted to an amplitude suitable for conversion by the analog-to-digital converter, and then the analog-to-digital converter performs analog-to-digital conversion.
[0138] In the above implementation process, an analog-to-digital converter, a controller, and the above-mentioned signal conditioning circuit are provided; the controller obtains the predicted gain gear and the predicted signal, generates a switching instruction according to the predicted gain gear and the predicted signal, and sends the switching instruction to the signal conditioning circuit; the signal conditioning circuit obtains the signal to be converted and adjusts the signal to be converted according to the switching instruction to obtain an adjustment signal; the analog-to-digital converter performs analog-to-digital conversion on the adjustment signal to obtain a conversion result. When performing gain gear switching, the switching time of the signal conditioning circuit becomes shorter, and it is not necessary to wait to quickly establish a conversion circuit with high precision, ensuring the availability of data during the sampling process, thereby improving the conversion precision. It can automatically detect the signal input amplitude and automatically adjust the gain of the analog-to-digital converter, so as to better utilize the dynamic range of the analog-to-digital converter, reduce quantization noise, and improve the precision of analog-to-digital conversion.
[0139] In some embodiments, a verification module is further included;
[0140] The controller is used to generate a verification switching instruction according to the predicted signal and the predicted gain gear, and send the verification switching instruction to the verification module; it is also used to generate a switching instruction according to the verification result and the predicted gain gear, and send the switching instruction to the signal conditioning circuit;
[0141] The verification module is used to verify the gear position of the corresponding signal conditioning module in the signal conditioning circuit according to the verification switching instruction, obtain a verification result, and send the verification result to the controller.
[0142] In this embodiment, for the ADC, when the signal exceeds the range, the performance will deteriorate very sharply. Considering that the predicted signal is obtained from the historical conversion signal and has a certain lag; the predicted signal is used to determine whether to perform gear switching. Therefore, in order to avoid errors in judging whether to perform gear switching based on the predicted information caused by noise, etc., a verification module can be set. The verification module is used to verify whether the judgment is correct when it is determined to perform gear switching. Specifically, it can be to first judge whether to switch to the predicted gain gear according to the predicted signal, and then generate a gear verification instruction. The verification module further judges whether to perform switching according to the gear verification instruction. Specifically, it verifies the gear position of the corresponding signal conditioning module in the signal conditioning circuit to obtain a verification result. Here, the corresponding signal conditioning module refers to the signal conditioning module corresponding to the predicted gain gear, that is, the signal conditioning module to be switched to. If the verification result is successful, a switching instruction is generated according to the verification result and the predicted gain gear, and the switching instruction is sent to the signal conditioning circuit. If the verification result is failed, no switching is performed.
[0143] By setting the verification module, it can be confirmed again whether to switch the gain gear, ensuring the correctness of the switching, avoiding the phenomenon of errors in switching judgment based on the predicted signal caused by noise, etc., and improving the accuracy of conversion.
[0144] In some embodiments, the verification module includes a switching switch, a first comparator, and a second comparator. The output ends of the first comparator and the second comparator are respectively connected to the input end of the controller. The positive input end of the first comparator is connected to one end of the switching switch, and the negative input end of the second comparator is connected to one end of the switching switch. The negative input end of the first comparator is connected to a first reference voltage, and the positive input end of the second comparator is connected to a second reference voltage. The other end of the switching switch is connected to the output ends of each signal conditioning module in the signal conditioning circuit. The switching switch is used to switch the signal conditioning module connected to the first comparator and the second comparator according to the verification switching instruction.
[0145] In this embodiment, the verification process can be finally confirmed by two confirmation comparators. Such as Figure 2As shown, the calibration module includes two comparators and a switch SW_switch. If it is determined to switch according to the prediction signal, and amplifier 1 is in the 10V range while amplifier 2 is in the 12.5V range, then the switch is directly made. If it is decided to switch according to the prediction signal, and amplifier 1 is in the 10V range while amplifier 2 is in the 6.25V range, then a gear calibration instruction is generated. The calibration module switches SW_switch to 2 according to the gear calibration instruction. H_alarm and L_alarm are respectively the outputs of the two comparators. If either H_alarm or L_alarm is high, then the switch is not made and amplifier 1 is still used; otherwise, it is confirmed that a switch is needed. Among them, VREF_H and VREF_L are respectively the reference values of the two comparators, that is, the first reference voltage and the second reference voltage, which can be specifically set according to needs. For example, they can be respectively set to 0.95*(VCM + VREF / 2) and 1.05*(VCM - VREF / 2), where VCM is the common-mode voltage of the input signal and VREF is the full-scale voltage of the ADC.
[0146] By setting the switching switch, the first comparator and the second comparator as the final confirmation circuit for gain switching, the gain switching can be calibrated, thereby improving the robustness of the system.
[0147] The signal conditioning circuit has a large gain. By using this method, when the input signal is small, the gain can be automatically increased, making full use of the dynamic range of the ADC core and reducing the influence of the quantization noise and thermal noise of the ADC core on the performance of the signal link. As follows Figure 6 shown Figure 6 Schematically shows a schematic diagram of the relationship between the signal-to-noise ratio and the amplitude of the input signal according to an embodiment of the present application. If there is no such method, the relationship between its signal-to-noise ratio and the amplitude of the input signal is as shown by the blue line; if this method is used, as shown by the red line, when the amplitude of the input signal is small, the overall performance can be greatly improved.
[0148] Please refer to Figure 7 , Figure 7 Schematically shows a flowchart of a gain adjustment method according to an embodiment of the present application. This embodiment provides a gain adjustment method for the above-mentioned analog-to-digital conversion system, which can specifically be a controller applied to the analog-to-digital conversion system. The gain adjustment method includes the following steps:
[0149] Step 210: Obtain the predicted gain gear and the prediction signal;
[0150] In this embodiment, the above-mentioned predicted gain gear refers to the gain gear required for the next conversion predicted, which can be predicted based on historical conversion data, and the prediction signal can be obtained based on historical conversion signals.
[0151] In some embodiments, obtaining the predicted gain gear includes the following steps:
[0152] First, determine the signal change trend according to the historical conversion results of the analog-to-digital converter;
[0153] In this embodiment, the historical conversion results of the above analog-to-digital converter can be the conversion results of the most recent two times. For example, if the current is the nth conversion, that is, the conversion result is recorded as data(n), the historical conversion results of the analog-to-digital converter can include data(n - 1) and data(n - 2) data. data(n - 1) and data(n - 2) are the previous conversion result data and the conversion result data two times before respectively. Which gear to specifically select is determined by data(n - 1) - data(n - 2). If data(n - 1)>0 and data(n - 1) - data(n - 2)>0, it means that the signal is changing towards the positive full scale; or, if data(n - 1)<0 and data(n - 1) - data(n - 2)<0, it means that the signal is changing towards the negative full scale; on the contrary, if data(n - 1)>0 and data(n - 1) - data(n - 2)<0, or, if data(n - 1)<0 and data(n - 1) - data(n - 2)>0, it means that the signal is changing towards the zero point.
[0154] Then, based on the signal change trend, determine the predicted gain gear.
[0155] In this embodiment, the predicted gain gear can be determined according to the signal change trend.
[0156] For example: Please refer to Figure 2, the gains of Amplifier 1 and Amplifier 2 can be set to the following levels by adjusting Rf1 and Rf2: ±20V, ±12.5V, ±10V, ±6.25V, ±5V, ±2.5V. Amplifier 1 is connected to the subsequent circuit. Taking the case where Amplifier 1 operates in the ±10V range as an example, at this time, Amplifier 2 is in a standby state, and its gain may be set to a level adjacent to that of Amplifier 1, that is, it may be set to the ±12.5V range or the ±6.25V range. Which specific range to choose can be determined by data(n - 1) - data(n - 2). If data(n - 1) > 0 and data(n - 1) - data(n - 2) > 0, it indicates that the signal is changing towards the positive full scale; or, if data(n - 1) < 0 and data(n - 1) - data(n - 2) < 0, it indicates that the signal is changing towards the negative full scale; at this time, Amplifier 2 in the standby state selects ±12.5V; on the contrary, if data(n - 1) > 0 and data(n - 1) - data(n - 2) < 0, or, if data(n - 1) < 0 and data(n - 1) - data(n - 2) > 0, it indicates that the signal is changing towards zero, and Amplifier 2 in the standby state selects ±6.25V.
[0157] By relying on the historical conversion results of the analog-to-digital converter, the signal change trend can be determined, and thus the predicted gain level can be quickly and accurately predicted.
[0158] In some embodiments, obtaining the predicted signal includes the following steps: according to the historical conversion results of the analog-to-digital converter, determining the predicted signal according to a preset prediction model, and the prediction model is:
[0159] data(n)_predict = data(n - 1) + data(n - 1) - data(n - 2),
[0160] where data(n)_predict is the predicted signal, data(n - 1) is the previous conversion result of the analog-to-digital converter, and data(n - 2) is the conversion result of the analog-to-digital converter before the previous one.
[0161] In this embodiment, the historical conversion results of the above-mentioned analog-to-digital converter may be the conversion results of the most recent two times. Predict data(n - 1) - data(n - 2) as the overflow of signal change. When the signal frequency is slow, for example, far lower than the sampling rate. (Generally, the signal frequency in the industrial field is 50Hz - 1kHz), and the sampling rate can reach 1Msps. The local sine wave can be equivalently a straight line. Then the predicted value of the current signal is data(n)_predict = data(n - 1) + data(n - 1) - data(n - 2). Substitute the conversion results of the most recent two times into the above prediction model, and the predicted signal can be obtained.
[0162] According to the historical conversion results of the analog-to-digital converter, the predicted signal can be quickly and accurately determined according to the preset prediction model.
[0163] Step 220: Generate a switching instruction according to the predicted gain gear and the predicted signal;
[0164] In this embodiment, the predicted signal is used to determine whether to perform gear switching, and the predicted gain gear is used to determine which gear to switch to, so that a switching instruction can be generated to enable the signal conditioning circuit in the analog-to-digital conversion system to perform gain adjustment.
[0165] In some embodiments, the generating a switching instruction according to the predicted gain gear and the predicted signal includes the following steps:
[0166] First, according to the predicted gain gear, determine the signal conditioning module to be switched from multiple signal conditioning modules in the analog-to-digital conversion system;
[0167] In this embodiment, after obtaining the predicted gain gear, the signal conditioning module to be switched can be determined among multiple signal conditioning modules, and this signal conditioning module to be switched is the working signal conditioning module for the next conversion. When determining the above, it can be determined according to the pre-set rules. For example, the pre-set rule is that gear 1 is executed by signal conditioning module A, gear 2 is executed by signal conditioning module B, and gear 3 is executed by signal conditioning module C. If the predicted gain gear is gear 2, then the signal conditioning module to be switched can be determined as signal conditioning module B.
[0168] Then, according to the predicted signal, determine whether to perform gain gear switching;
[0169] In this embodiment, the above determination can be obtained by determining whether the predicted signal is within the preset switching threshold, or can be further combined with the historical conversion results while determining whether the predicted signal is within the preset switching threshold for judgment.
[0170] In some embodiments, determining whether to perform a gain gear shift according to the prediction signal includes: determining whether to perform a gain gear shift based on the historical conversion results of the analog-to-digital converter and the prediction signal.
[0171] Wherein, determining whether to perform a gain gear shift based on the historical conversion results of the analog-to-digital converter and the prediction signal includes the following steps:
[0172] First step, determining whether the prediction signal reaches a preset gear shift threshold;
[0173] In this embodiment, the preset gear shift threshold can be set in advance according to the actual situation. There can be multiple gear shift thresholds, and different gear thresholds can be set for different gears. For example, Figure 2 in, for the case where amplifier 1 operates in the 10V gear, 4 switching thresholds can be set, namely +32767*0.95, -32767*0.95, +32767*0.65*0.95, -32767*0.65*0.95, as Figure 5 shown, Figure 5 schematically shows a schematic diagram of the gear shift threshold according to an embodiment of the present application. The above-mentioned reaching the preset gear shift threshold may mean that the amplitude of the prediction signal exceeds the preset gear shift threshold. For example, in the above example, reaching the preset gear shift threshold may be when the prediction signal data(n)_predict is greater than +32767*0.95 or less than -32767*0.95, or when the prediction signal data(n)_predict is greater than +32767*0.65*0.95 or less than -32767*0.65*0.95.
[0174] Second step, when it is determined that the prediction signal reaches the preset gear shift threshold, obtaining a signal change according to the historical conversion results of the analog-to-digital converter, and determining whether the signal change reaches a preset threshold;
[0175] In this embodiment, the preset threshold can be set in advance. For example, the threshold can be set to 0. Even if the signal does not change, the signal change can be obtained from data(n - 1) - data(n - 2). In the above example, when data(n)_predict is greater than +32767 * 0.95, it is also necessary to determine whether data(n - 1) - data(n - 2) is greater than 0. Or when data(n)_predict is less than -32767 * 0.95, it is also necessary to determine whether data(n - 1) - data(n - 2) is less than 0. When data(n)_predict is greater than +32767 * 0.65 * 0.95, it is also necessary to determine whether data(n - 1) - data(n - 2) is less than 0. Or when data(n)_predict is less than -32767 * 0.65 * 0.95, it is also necessary to determine whether data(n - 1) - data(n - 2) is greater than 0.
[0176] Thirdly, in the case where it is determined that the historical conversion result of the analog-to-digital converter reaches the preset threshold, it is determined that a gain gear shift needs to be performed.
[0177] In this embodiment, when the above two conditions are satisfied simultaneously, it is determined that a gain gear shift needs to be performed. In the above example, when data(n)_predict is greater than +32767 * 0.95 and data(n - 1) - data(n - 2) > 0, or when data(n)_predict is less than -32767 * 0.95 and data(n - 1) - data(n - 2) < 0, at this time, it is ready to switch to the amplifier 2 in the standby state. At this time, the amplifier 2 is in the 12.5V gear. When data(n)_predict is greater than +32767 * 0.65 * 0.95 and data(n - 1) - data(n - 2) < 0, or when data(n)_predict is less than -32767 * 0.65 * 0.95 and data(n - 1) - data(n - 2) > 0, at this time, it is ready to switch to the amplifier 2 in the standby state. At this time, the amplifier 2 is in the 6.25V gear.
[0178] By judging whether the predicted signal reaches the preset gear shift threshold, in the case where it is determined that the predicted signal reaches the preset gear shift threshold, according to the historical conversion result of the analog-to-digital converter, the signal change is obtained, and it is judged whether the signal change reaches the preset threshold, so that it can be more accurately judged whether a gear shift needs to be performed, thereby improving the conversion accuracy.
[0179] Finally, in the case where it is determined that a gain gear shift needs to be performed, a switching instruction is generated according to the signal conditioning module to be switched.
[0180] In this embodiment, when it is determined that a gain gear shift is to be performed, a switching instruction is generated according to the signal conditioning module to be switched.
[0181] In some embodiments, in the case of determining that a gain gear shift is to be performed, generating a switching instruction according to the signal conditioning module to be switched includes the following steps:
[0182] First step, in the case of determining that a gain gear shift is to be performed, based on the current gear and the predicted gain gear, generate a verification switching instruction, and send the verification switching instruction to the verification module in the analog-to-digital conversion system;
[0183] In this embodiment, for an ADC, when a signal exceeds the range, the performance will deteriorate very sharply. Considering that the predicted signal is obtained from the historical conversion signal and the predicted signal is used to determine whether to perform a gear shift, therefore, in order to avoid errors in judging whether to perform a gear shift according to the predicted information caused by noise, etc., a verification module can be set. This verification module is used to further verify whether the judgment is correct in the case of determining that a gear shift is to be performed. Based on the current gear and the predicted gain gear, it can be determined whether the gain gear becomes larger or smaller. Only in the case of becoming smaller, a verification switching instruction is generated and sent to the verification module for further verification.
[0184] Second step, obtain the verification result sent by the verification module;
[0185] In this embodiment, after receiving the verification switching instruction, the verification module responds to the instruction, that is, switches SW_switch to the signal conditioning module to be switched according to the gear verification instruction, then performs verification comparison, obtains the verification result, and sends it to the controller to obtain the verification result.
[0186] Third step, generate a switching instruction based on the verification result and the signal conditioning module to be switched.
[0187] In this embodiment, if the verification result is successful, a switching instruction is generated according to the signal conditioning module to be switched. Otherwise, no switching instruction is generated.
[0188] By further determining with a verification module in the case of determining that a gain gear shift is to be performed, the robustness of the system is improved, thereby ensuring the accuracy of the gain gear shift, avoiding the situation where the performance of the ADC deteriorates very sharply when a signal exceeds the range, and improving the conversion accuracy.
[0189] Step 230: Send the switching instruction to the signal conditioning circuit in the analog-to-digital conversion system, so that the signal conditioning circuit switches the signal conditioning module connected to the analog-to-digital converter in the analog-to-digital conversion system according to the switching instruction.
[0190] In this embodiment, a switching instruction is sent to a signal conditioning circuit. The signal conditioning circuit switches a signal conditioning module connected to an analog-to-digital converter in the analog-to-digital conversion system according to the switching instruction, so that the gain of analog-to-digital conversion can be automatically adjusted according to a predicted gain gear.
[0191] In the above implementation process, by obtaining a predicted gain gear and a predicted signal, a switching instruction is generated according to the predicted gain gear and the predicted signal, and the switching instruction is sent to the signal conditioning circuit in the analog-to-digital conversion system, so that the signal conditioning circuit switches a signal conditioning module connected to an analog-to-digital converter in the analog-to-digital conversion system according to the switching instruction, adjusts the gain of the signal conditioning circuit according to a predicted value, so that the analog-to-digital conversion system can automatically adjust the gain of analog-to-digital conversion according to the predicted gain gear, thereby making better use of the dynamic range of the ADC, reducing quantization noise, and improving the accuracy of analog-to-digital conversion. Compared with traditional automatic gain control, the signal conditioning circuit of the present application adopts multiple signal conditioning modules. When one of them is used as a working signal conditioning module, the other signal conditioning modules are used as standby conditioning modules. When gain switching is required, the working signal conditioning module is switched by a switching module, so that the switching time is shortened, and a conversion circuit with high accuracy can be quickly established without waiting, ensuring the availability of data during the sampling process, thereby improving the conversion accuracy. The entire system does not require a period of time when the conversion result is unavailable after switching the gain as in traditional automatic gain control.
[0192] In some embodiments, after determining the signal conditioning module to be switched, it further includes: adjusting the gear of the signal conditioning module to be switched based on the predicted gain gear.
[0193] In this embodiment, after determining the signal conditioning module to be switched, the gear of the signal conditioning module corresponding to the signal conditioning module to be switched can be adjusted first. For example: Please refer to Figure 2 , Amplifier 1 and Amplifier 2 can set the gain to ±20V, ±12.5V, ±10V, ±6.25V, ±5V, ±2.5V by adjusting Rf1 and Rf2. Amplifier 1 is connected to the subsequent circuit. Taking Amplifier 1 working in the ±10V gear as an example. At this time, Amplifier 2 is in a standby state, and the gear of Amplifier 2 can be adjusted to the predicted gain gear by adjusting Rf1 and Rf2 in Amplifier 2, thereby reducing the establishment time.
[0194] In some embodiments, it further includes the following steps:
[0195] First, at the start of each sampling stage of the analog-to-digital conversion, disconnect the output terminal of the working signal conditioning module from the analog-to-digital converter, and control one end of the pre-charge module in the signal conditioning circuit to be connected to the working signal conditioning module and the other end to be connected to the analog-to-digital converter;
[0196] Then, after a preset time, control the output terminal of the working signal conditioning module to be connected to the analog-to-digital converter, and control the pre-charge module to be disconnected from the analog-to-digital converter.
[0197] In this embodiment, the above preset time can be set according to experience, generally when the capacitor voltage in the analog-to-digital converter is built up to 95%. By disconnecting the output terminal of the working signal conditioning module from the analog-to-digital converter at the start of each sampling stage of the analog-to-digital conversion, and controlling one end of the pre-charge module in the signal conditioning circuit to be connected to the working signal conditioning module and the other end to be connected to the analog-to-digital converter; after the preset time, controlling the output terminal of the working signal conditioning module to be connected to the analog-to-digital converter and controlling the pre-charge module to be disconnected from the analog-to-digital converter to set up the pre-charge module, at the start of sampling, the pre-charge module charges the analog-to-digital converter, and after a period of time, it is then connected to the signal conditioning module, thus reducing the disturbance of the analog-to-digital converter to the signal conditioning module and improving the accuracy.
[0198] Figure 7 It is a schematic flowchart of the gain adjustment method in the embodiment. It should be understood that although Figure 7 the steps in the flowchart are shown in sequence according to the arrows, these steps do not necessarily execute in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, Figure 7 at least a part of the steps in
[0199] This embodiment provides an analog-to-digital conversion chip, including an analog-to-digital converter core, a controller, and the above signal conditioning circuit;
[0200] The controller is configured to obtain a predicted gain gear and a predicted signal, generate a switching instruction according to the predicted gain gear and the predicted signal, and send the switching instruction to the signal conditioning circuit;
[0201] The signal conditioning circuit is used to acquire the signal to be converted, and adjust the signal to be converted according to the switching instruction to obtain an adjusted signal;
[0202] The analog-to-digital converter core is used to perform analog-to-digital conversion on the adjusted signal to obtain a conversion result.
[0203] In some embodiments, a verification module is further included;
[0204] The controller is used to generate a verification switching instruction according to the prediction signal and the predicted gain gear, and send the verification switching instruction to the verification module; it is also used to generate a switching instruction according to the verification result and the predicted gain gear, and send the switching instruction to the signal conditioning circuit;
[0205] The verification module is used to verify the gear of the corresponding signal conditioning module in the signal conditioning circuit according to the verification switching instruction, obtain a verification result, and send the verification result to the controller.
[0206] In some embodiments, the verification module includes a switching switch, a first comparator and a second comparator. The output ends of the first comparator and the second comparator are respectively connected to the input end of the controller. The positive input end of the first comparator is connected to one end of the switching switch. The negative input end of the second comparator is connected to one end of the switching switch. The other end of the switching switch is connected to the output ends of each signal conditioning module in the signal conditioning circuit. The switching switch is used to switch the signal conditioning module connected to the first comparator and the second comparator according to the verification switching instruction.
[0207] It should be noted that the analog-to-digital converter core is the core part of the analog-to-digital converter, and the analog-to-digital converter is a more complete concept, including the analog-to-digital converter core and possible other auxiliary circuits. Here, considering it is integrated into a chip, mainly the core part is used. In the embodiments of the analog-to-digital conversion chip, it is the same as the embodiments of the analog-to-digital conversion system. The analog-to-digital converter in the analog-to-digital conversion system is equivalent to the analog-to-digital conversion core in the analog-to-digital conversion chip. The difference is that each module in the analog-to-digital conversion system is integrated in a chip to obtain the analog-to-digital conversion chip. Therefore, the analog-to-digital conversion chip will not be elaborated here.
[0208] Please refer to Figure 8 , Figure 8 which schematically shows a structural diagram of a gain adjustment device according to an embodiment of the present application. This embodiment provides a gain adjustment device for the above-mentioned analog-to-digital conversion system. The gain adjustment device includes an acquisition module 410, an instruction module 420 and a sending module 430, where:
[0209] An acquisition module 410, configured to acquire a prediction gain gear and a prediction signal;
[0210] An instruction module 420, configured to generate a switching instruction according to the prediction gain gear and the prediction signal;
[0211] A sending module 430, configured to send the switching instruction to a signal conditioning circuit in the analog-to-digital conversion system, so that the signal conditioning circuit switches a signal conditioning module connected to an analog-to-digital converter in the analog-to-digital conversion system according to the switching instruction.
[0212] Wherein, the acquisition module 410 includes:
[0213] A first determination sub-module, configured to determine a signal change trend according to historical conversion results of an analog-to-digital converter;
[0214] A second determination sub-module, configured to determine a prediction gain gear based on the signal change trend.
[0215] Wherein, the acquisition module 410 includes:
[0216] A third determination sub-module, configured to determine a prediction signal according to historical conversion results of an analog-to-digital converter according to a preset prediction model, and the prediction model is:
[0217] data(n)_predict = data(n - 1) + data(n - 1) - data(n - 2),
[0218] Wherein, data(n)_predict is the prediction signal, data(n - 1) is the conversion result of the analog-to-digital converter last time, and data(n - 2) is the conversion result of the analog-to-digital converter the time before last.
[0219] Wherein, the instruction module 420 includes:
[0220] A fourth determination sub-module, configured to determine a signal conditioning module to be switched from multiple signal conditioning modules in the analog-to-digital conversion system according to the prediction gain gear;
[0221] A judgment sub-module, configured to judge whether to perform a gain gear switch according to the prediction signal;
[0222] An instruction generation sub-module, configured to generate a switching instruction according to the signal conditioning module to be switched in the case of determining that a gain gear switch is to be performed.
[0223] Wherein, it further includes:
[0224] An adjustment module, configured to adjust the gear of the signal conditioning module to be switched based on the prediction gain gear.
[0225] Among them, the judgment sub-module includes:
[0226] A first judgment unit, configured to judge whether to perform a gain gear shift based on the historical conversion result of the analog-to-digital converter and the prediction signal.
[0227] Among them, the first judgment unit includes:
[0228] A threshold judgment sub-unit, configured to judge whether the prediction signal reaches a preset gear shift threshold;
[0229] A threshold value judgment sub-unit, configured to, when it is determined that the prediction signal reaches the preset gear shift threshold, obtain a signal change according to the historical conversion result of the analog-to-digital converter, and judge whether the signal change reaches a preset threshold value;
[0230] A determination sub-unit, configured to determine to perform a gain gear shift when it is determined that the historical conversion result of the analog-to-digital converter reaches the preset threshold value.
[0231] Among them, the instruction generation sub-module includes:
[0232] A verification instruction unit, configured to, when it is determined to perform a gain gear shift, generate a verification switch instruction based on the current gear and the predicted gain gear, and send the verification switch instruction to a verification module in the analog-to-digital conversion system;
[0233] An acquisition unit, configured to acquire a verification result sent by the verification module;
[0234] An instruction generation unit, configured to generate a switch instruction based on the verification result and the signal conditioning module to be switched.
[0235] Among them, it further includes:
[0236] A first control module, configured to, at the beginning of each sampling stage of analog-to-digital conversion, control the output end of the working signal conditioning module to be disconnected from the analog-to-digital converter, and control one end of a pre-charging module in the signal conditioning circuit to be connected to the working signal conditioning module and the other end to be connected to the analog-to-digital converter;
[0237] A second control module, configured to, after a preset time, control the output end of the working signal conditioning module to be connected to the analog-to-digital converter, and control the pre-charging module to be disconnected from the analog-to-digital converter.
[0238] The gain adjustment device includes a processor and a memory. The above-mentioned acquisition module 410, instruction module 420, sending module 430, etc. are all stored in the memory as program units, and the corresponding functions are implemented by the processor executing the above program units stored in the memory.
[0239] The processor contains a kernel, which retrieves corresponding program units from the memory. One or more kernels can be set. By adjusting the kernel parameters, the gain adjustment device can quickly establish a highly accurate conversion circuit, ensuring the availability of data during the sampling process and thus improving the conversion accuracy.
[0240] The memory may include non-permanent memory in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. The memory includes at least one memory chip.
[0241] An embodiment of the present invention provides a machine-readable storage medium, on which a program is stored. When the program is executed by a processor, the gain adjustment method is implemented.
[0242] An embodiment of the present invention provides a processor, which is used to run a program. When the program runs, the gain adjustment method is executed.
[0243] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 9 shown. The computer device includes a processor A01, a network interface A02, a display screen A04, an input device A05, and a memory (not shown in the figure) connected through a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A06. The non-volatile storage medium A06 stores an operating system B01 and a computer program B02. The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A06. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor A01, a gain adjustment method is implemented. The display screen A04 of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device A05 of the computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad set on the shell of the computer device, or an external keyboard, a touchpad, or a mouse, etc.
[0244] Those skilled in the art can understand that Figure 9 the structure shown in
[0245] In one embodiment, the gain adjustment method and apparatus provided by the present application can be implemented in the form of a computer program, and the computer program can run on a computer device as shown in Figure 9 . The memory of the computer device can store each program module that constitutes the gain adjustment method and apparatus. For example, Figure 8 the acquisition module 410, the instruction module 420, and the sending module 430 shown in. The computer program composed of each program module enables the processor to execute the steps in the gain adjustment method of each embodiment of the present application described in this specification.
[0246] Figure 9 The computer device shown in can execute step 210 through the acquisition module 410 in the gain adjustment method and apparatus as shown in Figure 8 . The computer device can execute step 220 through the instruction module 420. The computer device can execute step 230 through the sending module 430.
[0247] An embodiment of the present application provides an electronic device, which includes: at least one processor; a memory connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the at least one processor realizes the above-mentioned gain adjustment method by executing the instructions stored in the memory. The method is used for the above-mentioned analog-to-digital conversion system. When the processor executes the instructions, the following steps are realized:
[0248] Acquire a predicted gain gear and a predicted signal;
[0249] Generate a switching instruction according to the predicted gain gear and the predicted signal;
[0250] Send the switching instruction to the signal conditioning circuit in the analog-to-digital conversion system, so that the signal conditioning circuit switches the signal conditioning module connected to the analog-to-digital converter in the analog-to-digital conversion system according to the switching instruction.
[0251] In one embodiment, the acquiring of the predicted gain gear includes:
[0252] Determine the signal change trend according to the historical conversion results of the analog-to-digital converter;
[0253] Determine the predicted gain gear based on the signal change trend.
[0254] In one embodiment, acquiring the predicted signal includes:
[0255] Determine the predicted signal according to the historical conversion results of the analog-to-digital converter according to a preset prediction model. The prediction model is:
[0256] data(n)_predict = data(n - 1)+data(n - 1)-data(n - 2),
[0257] where data(n)_predict is the predicted signal, data(n - 1) is the conversion result of the previous analog-to-digital converter, and data(n - 2) is the conversion result of the analog-to-digital converter from the time before last.
[0258] In one embodiment, generating a switching instruction according to the predicted gain level and the predicted signal includes:
[0259] Determining the signal conditioning module to be switched from multiple signal conditioning modules in the analog-to-digital conversion system according to the predicted gain level;
[0260] Judging whether to perform a gain level switch according to the predicted signal;
[0261] In the case of determining that a gain level switch is to be performed, generating a switching instruction according to the signal conditioning module to be switched.
[0262] In one embodiment, after determining the signal conditioning module to be switched, it further includes:
[0263] Adjusting the level of the signal conditioning module to be switched based on the predicted gain level.
[0264] In one embodiment, judging whether to perform a gain level switch according to the predicted signal includes:
[0265] Judging whether to perform a gain level switch based on the historical conversion results of the analog-to-digital converter and the predicted signal.
[0266] In one embodiment, judging whether to perform a gain level switch based on the historical conversion results of the analog-to-digital converter and the predicted signal includes:
[0267] Judging whether the predicted signal reaches a preset level switching threshold;
[0268] In the case of determining that the predicted signal reaches the preset level switching threshold, obtaining a signal change according to the historical conversion results of the analog-to-digital converter, and judging whether the signal change reaches a preset threshold;
[0269] In the case of determining that the historical conversion results of the analog-to-digital converter reach the preset threshold, determining that a gain level switch is to be performed.
[0270] In one embodiment, generating a switching instruction according to the signal conditioning module to be switched in the case of determining that a gain level switch is to be performed includes:
[0271] When it is determined that the gain gear needs to be switched, a verification switching instruction is generated based on the current gear and the predicted gain gear, and the verification switching instruction is sent to the verification module in the analog-to-digital conversion system;
[0272] Obtain the verification result sent by the verification module;
[0273] Generate a switching instruction based on the verification result and the signal conditioning module to be switched.
[0274] In one embodiment, it further includes:
[0275] At the beginning of each sampling stage of analog-to-digital conversion, control the output end of the working signal conditioning module to be disconnected from the analog-to-digital converter, and control one end of the pre-charging module in the signal conditioning circuit to be connected to the working signal conditioning module, and the other end to be connected to the analog-to-digital converter;
[0276] After a preset time, control the output end of the working signal conditioning module to be connected to the analog-to-digital converter, and control the pre-charging module to be disconnected from the analog-to-digital converter.
[0277] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0278] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0279] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction means that implements the function specified in one or more of the blocks and / or processes. Figure 1 in one or more of the processes and / or blocks Figure 1 specified in the block or blocks.
[0280] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing steps for implementing the function specified in one or more of the processes and / or blocks Figure 1 in one or more of the processes and / or blocks Figure 1 specified in the block or blocks.
[0281] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0282] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM) and / or non-volatile memory such as read only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
[0283] Computer-readable media includes both permanent and non-permanent, removable and non-removable media implemented by any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technologies, compact disc read only memory (CD-ROM), digital versatile discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0284] It should also be noted that the term "comprise", "include" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, commodity or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, commodity or device comprising the element.
[0285] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. A signal conditioning circuit, characterized in that: include: A switching module and a plurality of signal conditioning modules, each signal conditioning module being respectively connected to the switching module; The switching module is used to switch the signal conditioning module connected to the analog-to-digital converter in the analog-to-digital conversion system according to the switching instruction, so that during each analog-to-digital conversion, there is only one signal conditioning module connected to the analog-to-digital converter as a working signal conditioning module, the switching instruction is generated according to the predicted gain gear and the predicted signal, the predicted signal is used to determine whether to perform gear switching, and the predicted gain gear is used to determine which gear to switch to; The signal conditioning module is used to obtain a signal to be converted, adjust the signal to be converted to obtain an adjusted signal, and input the adjusted signal to the analog-to-digital converter for analog-to-digital conversion.
2. The signal conditioning circuit according to claim 1, characterized in that: The switching module includes multiple groups of switches, each group of switches corresponds to a signal conditioning module, one end of the switch is connected to the output end of the signal conditioning module, and the other end is connected to the input end of the analog-to-digital converter. Each group of switches is used to open or close according to a switching instruction to switch the signal conditioning module connected to the analog-to-digital converter.
3. The signal conditioning circuit according to claim 1, characterized in that: The signal conditioning module comprises a plurality of amplifier circuit units, each amplifier circuit unit is cascaded, and at least one amplifier circuit unit adopts a gain enhancement technology.
4. The signal conditioning circuit according to claim 1, characterized in that: It also includes a pre-charging module, the input end of the pre-charging module is connected to the output end of each signal conditioning module, the output end of the pre-charging module is connected to the analog-to-digital converter, and the pre-charging module is used to pre-charge the analog-to-digital converter in the sampling stage of each analog-to-digital conversion.
5. The signal conditioning circuit according to claim 4, characterized in that: The pre-charging module includes a pre-charging amplifier, a first pre-charging switch and a second pre-charging switch. The input end of the pre-charging amplifier is connected to the output end of the working signal conditioning module, and the output end of the pre-charging amplifier is connected to the input end of the analog-to-digital converter. One end of the first pre-charging switch is connected to the input end of the pre-charging amplifier, and the other end is connected to the output end of the pre-charging amplifier. One end of the second pre-charging switch is connected to the output end of the pre-charging amplifier, and the other end is connected to the input end of the analog-to-digital converter.
6. An analog-to-digital conversion system, characterized in that: A method comprising an analog-to-digital converter, a controller and a signal conditioning circuit according to any one of claims 1 to 5; The controller is used to obtain the predicted gain gear and the predicted signal, generate a switching instruction according to the predicted gain gear and the predicted signal, and send the switching instruction to the signal conditioning circuit; The signal conditioning circuit is used to obtain the signal to be converted, and adjust the signal to be converted according to the switching instruction to obtain an adjusted signal; The analog-to-digital converter is used to perform analog-to-digital conversion on the adjustment signal to obtain a conversion result.
7. The analog-to-digital conversion system according to claim 6, characterized in that: Also includes a verification module; The controller is used to generate a verification switching instruction according to the prediction signal and the prediction gain gear, and send the verification switching instruction to the verification module; and is also used to generate a switching instruction according to the verification result and the prediction gain gear, and send the switching instruction to the signal conditioning circuit; The verification module is used to verify the gear position of the corresponding signal conditioning module in the signal conditioning circuit according to the verification switching instruction, obtain the verification result, and send the verification result to the controller.
8. The analog-to-digital conversion system according to claim 7, characterized in that: The verification module includes a switching switch, a first comparator and a second comparator, the output ends of the first comparator and the second comparator are respectively connected to the input ends of the controller, the positive input end of the first comparator is connected to one end of the switching switch, the negative input end of the second comparator is connected to one end of the switching switch, the negative input end of the first comparator is connected to a first reference voltage, the positive input end of the second comparator is connected to a second reference voltage, the other end of the switching switch is connected to the output ends of each signal conditioning module in the signal conditioning circuit, and the switching switch is used to switch the signal conditioning module connected to the first comparator and the second comparator according to the verification switching instruction.
9. A gain adjustment method, characterized in that: For the analog-to-digital conversion system according to any one of claims 6 to 8, the gain adjustment method comprises: Obtaining predicted gain gear and predicted signal; generating a switching instruction according to the predicted gain gear and the predicted signal; The switching instruction is sent to the signal conditioning circuit in the analog-to-digital conversion system, so that the signal conditioning circuit switches the signal conditioning module connected to the analog-to-digital converter in the analog-to-digital conversion system according to the switching instruction.
10. The gain adjustment method according to claim 9, characterized in that: The obtaining of the predicted gain gear comprises: According to the historical conversion results of the analog-to-digital converter, the signal change trend is determined; Based on the signal change trend, a predicted gain gear is determined.
11. The gain adjustment method according to claim 9, characterized in that: Get prediction signals, including: According to the historical conversion results of the analog-to-digital converter, the prediction signal is determined according to the preset prediction model, and the prediction model is: data(n)_predict=data(n-1)+data(n-1)-data(n-2), Among them, data(n)_predict is the prediction signal, data(n-1) is the previous analog-to-digital converter conversion result, and data(n-2) is the previous analog-to-digital converter conversion result.
12. The gain adjustment method according to claim 9, characterized in that: The step of generating a switching instruction according to the predicted gain gear and the predicted signal comprises: According to the predicted gain gear, determining a signal conditioning module to be switched from a plurality of signal conditioning modules in the analog-to-digital conversion system; Determining whether to switch the gain gear according to the prediction signal; When it is determined that the gain gear is to be switched, a switching instruction is generated according to the signal conditioning module to be switched.
13. The gain adjustment method according to claim 12, characterized in that: After determining the signal conditioning module to be switched, the method further includes: Based on the predicted gain gear, the gear of the signal conditioning module to be switched is adjusted.
14. The gain adjustment method according to claim 12, characterized in that: The step of judging whether to switch the gain gear according to the prediction signal includes: Based on the historical conversion results of the analog-to-digital converter and the prediction signal, it is determined whether to perform gain gear switching.
15. The gain adjustment method according to claim 14, characterized in that: The determining whether to perform gain gear switching based on the historical conversion result of the analog-to-digital converter and the prediction signal includes: Determining whether the prediction signal reaches a preset gear switching threshold; When it is determined that the predicted signal reaches the preset gear switching threshold, a signal change is obtained according to the historical conversion result of the analog-to-digital converter, and it is determined whether the signal change reaches the preset threshold; When it is determined that the historical conversion result of the analog-to-digital converter reaches a preset threshold, it is determined that a gain gear switch is to be performed.
16. The gain adjustment method according to claim 12, characterized in that: In the case where it is determined that the gain gear is to be switched, generating a switching instruction according to the signal conditioning module to be switched includes: In the case where it is determined that the gain gear is to be switched, generating a verification switching instruction based on the current gear and the predicted gain gear, and sending the verification switching instruction to a verification module in the analog-to-digital conversion system; Obtaining a verification result sent by the verification module; A switching instruction is generated based on the verification result and the signal conditioning module to be switched.
17. The gain adjustment method according to claim 9, characterized in that: Also includes: At the beginning of each sampling phase of analog-to-digital conversion, the output end of the working signal conditioning module is controlled to be disconnected from the analog-to-digital converter, and one end of the pre-charging module in the signal conditioning circuit is controlled to be connected to the working signal conditioning module, and the other end is controlled to be connected to the analog-to-digital converter; After a preset time, the output end of the working signal conditioning module is controlled to be connected to the analog-to-digital converter, and the pre-charging module is controlled to be disconnected from the analog-to-digital converter.
18. A gain adjustment device, characterized in that: For the analog-to-digital conversion system according to any one of claims 6 to 8, the gain adjustment device comprises: An acquisition module, used for acquiring a predicted gain gear and a predicted signal; An instruction module, used for generating a switching instruction according to the predicted gain gear and the predicted signal; The sending module is used to send the switching instruction to the signal conditioning circuit in the analog-to-digital conversion system, so that the signal conditioning circuit switches the signal conditioning module connected to the analog-to-digital converter in the analog-to-digital conversion system according to the switching instruction.
19. The gain adjustment device according to claim 18, characterized in that: The acquisition module comprises: A first determination submodule is used to determine a signal change trend according to a historical conversion result of the analog-to-digital converter; The second determination submodule is used to determine the predicted gain gear based on the signal change trend.
20. The gain adjustment device according to claim 18, characterized in that: The acquisition module comprises: The third determination submodule is used to determine a prediction signal according to a preset prediction model based on the historical conversion result of the analog-to-digital converter, wherein the prediction model is: data(n)_predict=data(n-1)+data(n-1)-data(n-2), Among them, data(n)_predict is the prediction signal, data(n-1) is the previous analog-to-digital converter conversion result, and data(n-2) is the previous analog-to-digital converter conversion result.
21. The gain adjustment device according to claim 18, characterized in that: The instruction module includes: A fourth determination submodule, configured to determine a signal conditioning module to be switched from a plurality of signal conditioning modules in the analog-to-digital conversion system according to the predicted gain gear; A judgment submodule, used to judge whether to switch the gain gear according to the prediction signal; The instruction generation submodule is used to generate a switching instruction according to the signal conditioning module to be switched when it is determined that the gain gear is to be switched.
22. The gain adjustment device according to claim 21, characterized in that: Also includes: The adjustment module is used to adjust the gear position of the signal conditioning module to be switched based on the predicted gain gear position.
23. The gain adjustment device according to claim 21, characterized in that: The judgment submodule includes: The first judgment unit is used to judge whether to perform gain gear switching based on the historical conversion result of the analog-to-digital converter and the prediction signal.
24. The gain adjustment device according to claim 23, characterized in that: The first judging unit comprises: A threshold judgment subunit, used to judge whether the prediction signal reaches a preset gear switching threshold; A threshold judgment subunit is used to obtain a signal change according to a historical conversion result of the analog-to-digital converter when it is determined that the predicted signal reaches a preset gear switching threshold, and to judge whether the signal change reaches a preset threshold; The determination subunit is used to determine whether to perform gain gear switching when it is determined that the historical conversion result of the analog-to-digital converter reaches a preset threshold.
25. The gain adjustment device according to claim 21, characterized in that: The instruction generation submodule includes: A verification instruction unit, for generating a verification switching instruction based on the current gear and the predicted gain gear when it is determined that the gain gear is to be switched, and sending the verification switching instruction to a verification module in the analog-to-digital conversion system; An acquisition unit, used to acquire the verification result sent by the verification module; An instruction generating unit is used to generate a switching instruction based on the verification result and the signal conditioning module to be switched.
26. The gain adjustment device according to claim 18, characterized in that: Also includes: A first control module, used for controlling the output end of the working signal conditioning module to be disconnected from the analog-to-digital converter at the beginning of each sampling phase of analog-to-digital conversion, and controlling one end of the pre-charging module in the signal conditioning circuit to be connected to the working signal conditioning module and the other end to be connected to the analog-to-digital converter; The second control module is used to control the output end of the working signal conditioning module to be connected to the analog-to-digital converter after a preset time, and to control the pre-charging module to be disconnected from the analog-to-digital converter.
27. An analog-to-digital conversion chip, characterized in that: comprising an analog-to-digital converter core, a controller and a signal conditioning circuit as described in any one of claims 1-5; The controller is used to obtain the predicted gain gear and the predicted signal, generate a switching instruction according to the predicted gain gear and the predicted signal, and send the switching instruction to the signal conditioning circuit; The signal conditioning circuit is used to obtain the signal to be converted, and adjust the signal to be converted according to the switching instruction to obtain an adjusted signal; The analog-to-digital converter core is used to perform analog-to-digital conversion on the adjustment signal to obtain a conversion result.
28. The analog-to-digital conversion chip according to claim 27, characterized in that: Also includes a verification module; The controller is used to generate a verification switching instruction according to the prediction signal and the prediction gain gear, and send the verification switching instruction to the verification module; and is also used to generate a switching instruction according to the verification result and the prediction gain gear, and send the switching instruction to the signal conditioning circuit; The verification module is used to verify the gear position of the corresponding signal conditioning module in the signal conditioning circuit according to the verification switching instruction, obtain the verification result, and send the verification result to the controller.
29. The analog-to-digital conversion chip according to claim 28, characterized in that: The verification module includes a switching switch, a first comparator and a second comparator. The output ends of the first comparator and the second comparator are respectively connected to the input ends of the controller, the positive input end of the first comparator is connected to one end of the switching switch, the negative input end of the second comparator is connected to one end of the switching switch, and the other end of the switching switch is connected to the output ends of each signal conditioning module in the signal conditioning circuit. The switching switch is used to switch the signal conditioning module connected to the first comparator and the second comparator according to the verification switching instruction.
30. An electronic device, characterized in that: The electronic device includes: at least one processor; a memory connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the at least one processor implements the gain adjustment method according to any one of claims 9 to 17 by executing the instructions stored in the memory.
31. A machine-readable storage medium having instructions stored thereon, characterized in that: When the instruction is executed by a processor, the processor is configured to perform the gain adjustment method according to any one of claims 9 to 17.
Citation Information
Cited By
Signal conditioning circuit, analog-to-digital conversion system, and gain adjustment method and apparatus
WO2026166158A1