Program-controlled amplifying circuit, electronic equipment and gain compensation determining method
By designing a program-controlled amplifier circuit and a gain compensation determination method, the problem of high gain calibration cost and high complexity of operational amplifiers in the prior art is solved, and high-precision gain correction is achieved and circuit complexity and cost are reduced.
Patent Information
- Application Number
- CN202411923795.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-08
AI Technical Summary
In existing signal detection equipment, the gain calibration method of the operational amplifier is costly and complex, and the calibration accuracy is not high enough.
A program-controlled amplifier circuit is designed, including a control module and an amplifier module. By setting different amplifier gears, multiple amplification stages are combined to form multiple cascaded amplification stages, and the amplifier gear corresponding to each amplification stage is determined based on the first control signal, and gain compensation is determined through the upper computer system.
High-precision correction of the gain of the amplifier circuit is achieved, reducing circuit complexity and cost, and improving calibration accuracy.
Smart Images

Figure CN119788012A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of signal detection equipment, and in particular to a programmable amplifier circuit, an electronic device and a gain compensation determination method. Background Art
[0002] As a key component in analog circuits, operational amplifiers have deviations in the size, performance and other parameters of internal components of operational amplifiers due to process conditions and uncontrollable factors during the production process, which in turn affects their gain characteristics. At the same time, the internal components of operational amplifiers (such as transistors, field effect tubes, etc.) will exhibit nonlinear characteristics in the nonlinear working area, which will also lead to gain deviation. In the relevant calibration method, for high-frequency signals, a voltage-controlled attenuation circuit with continuous and precise adjustment of RF signals is generally used; for the amplitude range of signal output, a conditioning circuit is designed using passive attenuation chips and power amplifier chips, and a combination of programmable attenuator coarse adjustment and power amplifier chip gain fine adjustment is used for calibration; the above two calibration methods are costly and complex. For the amplitude of the actual output data of the reconstructed DC signal, the relevant technology generally adopts a calibration method based on the least squares binary amplitude to obtain the calibration coefficient to achieve the calibration of the DC signal and the digital signal, but the relative error after calibration of this method is generally around 1%, and the calibration accuracy is not high enough. Summary of the invention
[0003] The present application provides a programmable amplifier circuit, an electronic device and a gain compensation determination method, which are used to solve the problems of high cost and high complexity of existing calibration methods.
[0004] Based on the above problems, in a first aspect, an embodiment of the present application provides a program-controlled amplifier circuit, including: a control module and an amplifier module; The control module is used to generate a first control signal according to a target gain corresponding to the signal to be amplified, and send the first control signal to the amplification module; The amplification module includes a plurality of amplification stages, each of which includes at least one amplifier and at least one amplification gear set for each amplifier, and the plurality of amplification stages are combined to form a plurality of cascade amplification stages by setting different amplification gears; The amplification module is used to determine the amplification gear corresponding to each amplification stage based on the first control signal; and input the signal to be amplified through the input end of the cascade amplification stage, and output the final gain signal through the output end of the cascade amplification stage.
[0005] In combination with the first aspect, in a possible implementation, the amplification module includes an input / output (I / O) expander module, multiple groups of relay circuits, and multiple operational amplifiers; The I / O expander module is connected to at least one group of relay circuits, and is used to determine a second control signal for controlling a relay in the connected relay circuit according to the first control signal, and send the second control signal to the relay circuit; Each group of relay circuits is connected to at least one operational amplifier, and the relays in the group of relay circuits are controlled to be turned on and off according to the second control signal to select the gear position of the corresponding operational amplifier; The multiple operational amplifiers are combined and connected in a preset manner, and the input port of the first operational amplifier in the combined connection serves as the input end of the cascade amplifier stage for receiving the signal to be amplified, and the output port of the last operational amplifier serves as the output end of the cascade amplifier stage for outputting the final gain signal; each operational amplifier is used to gain the input signal according to the gear position corresponding to the relay connected in the connected relay circuit.
[0006] In combination with the first aspect, in a possible implementation manner, the relay circuit includes: a relay controller and at least one relay channel controlled by the relay controller; The relay channel comprises: a relay and a resistor; the relay input end is connected to the relay controller, the relay output end is connected to one end of the resistor, and the other end of the resistor is connected to the inverting input end of the corresponding operational amplifier; In the case where the relay circuit includes at least two relay channels, the at least two relay channels are connected in parallel and include resistors with different resistance values, so that the operational amplifier and the relay channels with different resistance values are combined to form different amplification gears.
[0007] In combination with the first aspect, in a possible implementation manner, the device further includes: a digital isolator module; The input end of the digital isolator module is connected to the control module, and the output end is connected to the amplification module; the digital isolator module is used to transmit the first control signal to the amplification module and isolate the amplification module from the control module.
[0008] According to a second aspect of the embodiment of the present application, a method for determining gain compensation of a programmable amplifier circuit based on the first aspect is provided, comprising: a host computer system sends a first input signal to an input end of a cascade amplifier stage of the programmable amplifier circuit for various preset gain modes, and obtains actual gain signals corresponding to various preset gain modes, respectively; wherein different preset gain modes are used to obtain actual gains of corresponding amplifier stages; Determine the actual gain of the corresponding amplifier stage through the actual gain signal; For the amplifier stages corresponding to different preset gain modes, the correction factor of the corresponding amplifier stage is determined according to the corresponding relationship between the actual gain of the corresponding amplifier stage and the preset gain of the corresponding amplifier stage; For each cascade amplifier stage, a correction coefficient corresponding to the cascade amplifier stage is determined according to the correction factors of the amplifier stages included in the cascade amplifier stage.
[0009] In conjunction with the second aspect, in a possible implementation manner, before the host computer system sends the first input signal, the method further includes: After receiving the start signal, the host computer system triggers the calibration process, including: Fixing the amplification gear of the amplification stage corresponding to the preset amplification level at the maximum gain gear; respectively adjusting the amplification positions of the amplification levels corresponding to the other amplification levels except the preset amplification level to obtain different gain combinations; and Using second input signals corresponding to each gain combination to input the input end of the cascade amplifier stage of the programmable amplifier circuit to obtain an output signal; An offset value corresponding to the gain combination is determined according to the output signal, and the offset value is adjusted to zero.
[0010] In combination with the second aspect, in a possible implementation manner, the host computer system sends a first input signal to the input end of the cascade amplifier stage of the programmable amplifier circuit for various preset gain modes, and obtains actual gain signals corresponding to various preset gain modes, including: The host computer system sends a control instruction to the program-controlled amplifier circuit, controls the program-controlled amplifier circuit to adjust the corresponding amplifier stage to a preset gear position based on the control instruction, and obtains a preset gain mode of the program-controlled amplifier circuit; The preset gain mode includes: a zero gain mode and / or a single amplifier stage gain mode; the zero gain mode is used to obtain an actual gain signal when the amplification gear corresponding to each amplifier in each amplifier stage is at the zero gain gear; the single amplifier stage gain mode is used to obtain an actual gain signal for each amplifier stage, when the amplifier stage is set to a non-zero gain gear and the other amplifier stages except the amplifier stage in each amplifier stage are at the zero gain gear; The first input signal is respectively sent to the input end of the cascade amplifier stage of the programmable amplifier circuit for different preset gain modes to obtain an actual gain signal corresponding to the gain mode.
[0011] In combination with the second aspect, in a possible implementation, for amplifier stages corresponding to different preset gain modes, determining a correction factor of the corresponding amplifier stage according to a correspondence between an actual gain of the corresponding amplifier stage and a preset gain of the corresponding amplifier stage includes: For amplifier stages corresponding to different preset gain modes, the ratio between the preset gain of the corresponding amplifier stage and the actual gain of the corresponding amplifier stage is determined as the correction factor of the corresponding amplifier stage; For each cascade amplifier stage, a correction coefficient corresponding to the cascade amplifier stage is determined according to the correction factors of the amplifier stages included in the cascade amplifier stage, including: For each cascade amplifier stage, determining the number of amplifier stages that characterize a non-zero gain in the cascade amplifier stage; In the case where the number is zero, determining the correction factor of the corresponding amplifier stage in the zero gain mode as the correction coefficient corresponding to the cascade amplifier stage; In the case where the number is one, determining the correction factor corresponding to the one amplifier stage as the correction coefficient corresponding to the cascade amplifier stage; When the number is greater than one, the quotient of the product of the correction factors of the at least two corresponding amplifier stages and the Nth power of the corresponding correction factor in the zero gain mode is determined as the correction coefficient corresponding to the cascade amplifier stage, and N is the number minus one.
[0012] In combination with the second aspect, in a possible implementation manner, the signal to be amplified is a voltage signal; The method further comprises: Acquiring a first voltage value of the signal to be amplified; Determining a first correction coefficient corresponding to the first voltage value according to a preset correspondence relationship between a voltage value and a cascade amplifier stage; Inputting the signal to be amplified into the program-controlled amplifier circuit to obtain a first gain signal as an output; The first correction coefficient is used to correct the first gain signal to obtain a corrected first gain signal.
[0013] A third aspect of an embodiment of the present application provides an electronic device, comprising the programmable amplifier circuit as described in the first aspect.
[0014] The beneficial effects of the embodiments of the present application include: An embodiment of the present application provides a programmable amplifier circuit, comprising: a control module and an amplifier module; the control module is used to generate a first control signal according to a target gain corresponding to a signal to be amplified, and send the first control signal to the amplifier module; the amplifier module comprises a plurality of amplifier stages, each amplifier stage comprises at least one amplifier and at least one amplification gear set for each amplifier, and the plurality of amplifier stages are combined to form a plurality of cascade amplifier stages by setting different amplification gears; the amplifier module is used to determine the amplification gear corresponding to each amplifier stage based on the first control signal; and the signal to be amplified is input through the input end of the cascade amplifier stage, and a final gain signal is output through the output end of the cascade amplifier stage.
[0015] Based on the above-mentioned programmable amplifier circuit, an embodiment of the present application also provides a method for determining the gain compensation of the programmable amplifier circuit, including: the upper computer system sends a first input signal to the input end of the cascade amplifier stage of the programmable amplifier circuit for different preset gain modes, and obtains the corresponding actual gain signal; wherein the different preset gain modes are used to obtain the gain of the corresponding amplifier stage; the actual gain of the corresponding amplifier stage is determined by the actual gain signal; for the amplifier stages corresponding to the different preset gain modes, the correction factor of the corresponding amplifier stage is determined by the correspondence between the actual gain of the corresponding amplifier stage and the preset gain of the corresponding amplifier stage; for each cascade amplifier stage, the correction coefficient corresponding to the cascade amplifier stage is determined according to the correction factor of the amplifier stage included in the cascade amplifier stage.
[0016] The embodiment of the present application designs a cascade amplifier circuit including multiple amplifier stages, obtains the actual gain of the corresponding amplifier stage through different preset gain modes, and then determines the correction factor of the corresponding amplifier stage according to the preset gain corresponding to the corresponding amplifier stage, and finally determines the correction coefficient corresponding to the cascade amplifier stage according to the correction factor of the amplifier stage included in the cascade amplifier stage. Compared with the related art that uses a passive attenuation chip and a power amplifier chip to design a conditioning circuit, the amplifier circuit provided by the embodiment of the present application can not only effectively correct the gain of the amplifier circuit, but also has low circuit complexity and low device cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A schematic diagram of the structure of a program-controlled amplifier circuit provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of the amplification module provided in the embodiment of the present application; Figure 3 A schematic diagram of the relay circuit structure provided in an embodiment of the present application; Figure 4 A flow chart of a gain compensation determination method provided in an embodiment of the present application; Figure 5 A schematic diagram of the corresponding relationship between the preset gain mode and the actual magnification provided in the embodiment of the present application; Figure 6 An example of a programmable amplifier circuit provided in an embodiment of the present application; Figure 7 An example of the connection relationship of the cascade amplifier stages provided in the embodiment of the present application; Figure 8 The automatic calibration process flow chart provided in the embodiment of the present application; Fig. 9 A schematic diagram of the correspondence between voltage value levels and correction coefficients provided in an embodiment of the present application.
[0018] Reference numerals: Control module 1, amplification module 2, digital isolator module 3, I / O expander module 21, relay circuit 22, operational amplifier 23, relay controller 221, relay channel 222. DETAILED DESCRIPTION
[0019] The embodiments of the present application provide a program-controlled amplifier circuit, an electronic device, and a gain compensation determination method. The preferred embodiments of the present application are described below in conjunction with the drawings of the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments of the present application and the features in the embodiments can be combined with each other if there is no conflict.
[0020] The embodiment of the present application provides a program-controlled amplifier circuit, comprising: a control module and an amplifier module; The control module is used to generate a first control signal according to a target gain corresponding to the signal to be amplified, and send the first control signal to the amplification module; The amplification module includes a plurality of amplification stages, each of which includes at least one amplifier and at least one amplification gear set for each amplifier, and the plurality of amplification stages are combined to form a plurality of cascade amplification stages by setting different amplification gears; The amplification module is used to determine the amplification gear corresponding to each amplification stage based on the first control signal; and input the signal to be amplified through the input end of the cascade amplification stage, and output the final gain signal through the output end of the cascade amplification stage.
[0021] The programmable amplifier circuit provided in the embodiment of the present application can be applied to the input end of the phase-locked amplifier, and the signal to be amplified is calibrated to the final gain signal and then input to the input end of the phase-locked amplifier. In practical applications, the final gain signal needs to be as close as possible to the theoretical value of the signal to be amplified. The control module can be a field programmable gate array (FPGA, Field Programmable Gate Array), and an integrated circuit with programmable characteristics that can be pre-designed and implemented on it, and the user can reconfigure the resources inside the integrated circuit through software to achieve different functions.
[0022] A possible implementation is as follows Figure 1 As shown, Figure 1 Schematic diagram of the structure of a programmable amplifier circuit including four amplifier stages. The amplifier module 2 includes four amplifier stages, each amplifier stage includes an amplifier, and each amplifier corresponds to two amplifier gears. When a signal is input into an amplifier stage, the combination of the amplifier and the amplifier gear in the amplifier stage can gain the signal and output the gained signal through the amplifier output terminal. This is just an example, and the programmable amplifier circuit can also include other numbers of amplifier stages, each amplifier stage can also include multiple amplifiers, and each amplifier can also correspond to other numbers of amplifier gears, which is not limited here.
[0023] Furthermore, the cascade amplifier stage is composed of multiple amplifier stages connected in series, and the signal to be amplified is input to the first amplifier stage in the cascade amplifier stage, and is output to the input end of the next amplifier stage after the gain of the first amplifier stage. After a preset number of amplifier stage gains, the output end of the last amplifier stage in the cascade amplifier stage outputs a final gain signal.
[0024] The control module 1 can determine the cascade amplifier stage that can achieve the target gain according to the target gain, and determine the amplification gear of each amplifier stage in the cascade amplifier stage. A first control signal is generated according to the configuration of each amplification gear, and the first control signal is sent to the amplifier module 2, and the amplifier module 2 sets the amplifier stage to the corresponding amplification gear according to the first control signal. Thus, each amplifier stage is combined into a corresponding cascade amplifier stage, and the amplifier module 2 is set to the target gain. Among them, the target gain can be determined according to the theoretical voltage value of the signal to be amplified.
[0025] In another embodiment provided by the present application, the amplification module includes an I / O expander module, multiple groups of relay circuits, and multiple operational amplifiers; The I / O expander module is connected to at least one group of relay circuits, and is used to determine a second control signal for controlling a relay in the connected relay circuit according to the first control signal, and send the second control signal to the relay circuit; Each relay circuit is connected to at least one operational amplifier, and the relays in the relay circuit are controlled to be turned on and off according to the second control signal to select the gear position of the corresponding operational amplifier; A plurality of operational amplifiers are combined and connected in a preset manner, and the input port of the first operational amplifier in the combined connection serves as the input end of the cascade amplifier stage for receiving the signal to be amplified, and the output port of the last operational amplifier serves as the output end of the cascade amplifier stage for outputting a final gain signal; each operational amplifier is used to gain the input signal according to the gear position corresponding to the relay connected in the connected relay circuit.
[0026] A possible implementation is as follows Figure 2 As shown, Figure 2 Schematic diagram of the structure of an amplifier module including two groups of relay circuits. The amplifier stage in the amplifier module 2 can be a combination of an operational amplifier 23 and a relay circuit 22, and controlling the on and off of the relay in the relay circuit 22 can set the amplification gear for the amplifier stage. The operational amplifier 23 in the first amplifier stage in the amplifier module 2 receives the signal to be amplified, and after the operational amplifier 23 is amplified, the signal is output from the output end of the operational amplifier 23 to the operational amplifier 23 of the next amplifier stage. The final gain signal is output through the operational amplifier 23 in the last amplifier stage.
[0027] The I / O expander module 21 can receive the first control signal, and generate a second control signal for controlling the on / off of the relay in the relay circuit 22 connected to the I / O expander module 21 according to the amplification gear of each amplification stage in the cascade amplification stage determined in the first control signal, thereby changing the amplification gear of the amplification stage. The number of I / O expander modules 21 can be set according to actual needs. In this embodiment, each I / O expander module 21 can be connected to two groups of relay circuits. Here, there is no restriction on the number of groups of relay circuits connected to the I / O expander module 21 and the number of I / O expander modules 21.
[0028] In another embodiment provided by the present application, the relay circuit includes: a relay controller and at least one relay channel controlled by the relay controller; The relay channel comprises: a relay and a resistor; the relay input end is connected to the relay controller, the relay output end is connected to one end of the resistor, and the other end of the resistor is connected to the inverting input end of the corresponding operational amplifier; In the case where the relay circuit includes at least two relay channels, the at least two relay channels are connected in parallel and include resistors with different resistance values, so that the operational amplifier and the relay channels with different resistance values are combined to form different amplification gears.
[0029] A possible implementation is as follows Figure 3 As shown, combined Figure 2 , Figure 3 It is a structural diagram of a relay circuit provided with two relay channels. Different combinations of relay channels 222 and operational amplifiers 23 correspond to different amplification gears. A resistor is provided in the relay channel 222, and the resistor serves as the input resistor of the operational amplifier 23, which affects the amplification capability of the operational amplifier 23 to the signal. The relay controller 221 determines the on-off of the relay channel 222 controlled by it according to the second control signal, and performs corresponding control, thereby changing the input resistance value of the reverse input terminal of the operational amplifier 23 connected to the relay channel 222, and then changing the amplification factor of the operational amplifier 23 to the signal. Furthermore, the gain capability of the corresponding amplifier stage of the operational amplifier 23 to the signal is changed (i.e., different amplification gears are set for the amplifier stage). The relay circuit may also include other numbers of relay channels, which are not limited here.
[0030] In another embodiment provided by the present application, the program-controlled amplifier circuit further includes: a digital isolator module 3; The input end of the digital isolator module 3 is connected to the control module 1 , and the output end is connected to the amplification module 2 ; the digital isolator module 3 is used to transmit the first control signal to the amplification module 2 , and isolate the amplification module 2 from the control module 1 .
[0031] Continue to refer Figure 1 , the control module 1 and the amplification module 2 belong to different power domains, and the signal across the power domains may affect the signal integrity due to power noise and timing issues. Therefore, in this embodiment, a digital isolator module 3 is added between the control module 1 and the amplification module 2 to isolate the control module 1 and the amplification module 2 to ensure the integrity and security of the signal transmitted across the power domains.
[0032] In the embodiment of the present application, the digital isolator 3 may be a device that can isolate the circuits at both ends of the digital isolator module 3 while transmitting the target signal so that they do not interfere with each other. The digital isolator module 3 receives the first control signal from the control module 1 and transmits it to the amplification module 2. The communication protocol between the digital isolator module 3 and the control module 1 and the amplification module 2 may adopt an integrated circuit bus (IIC, Inter Integrated Circuit) communication protocol.
[0033] The present application embodiment provides a method for determining gain compensation of a programmable amplifier circuit, such as Figure 4 As shown, including: S401, the host computer system sends a first input signal to the input end of the cascade amplifier stage of the programmable amplifier circuit for various preset gain modes, and obtains actual gain signals corresponding to various preset gain modes; wherein different preset gain modes are used to obtain actual gains of corresponding amplifier stages; S402, determining the actual gain of the corresponding amplifier stage through the actual gain signal; S403, for the amplifier stages corresponding to different preset gain modes, determining the correction factor of the corresponding amplifier stage according to the corresponding relationship between the actual gain of the corresponding amplifier stage and the preset gain of the corresponding amplifier stage; S404 . For each cascade amplifier stage, determine a correction coefficient corresponding to the cascade amplifier stage according to the correction factors of the amplifier stages included in the cascade amplifier stage.
[0034] In the embodiment of the present application, the execution subject may be a host computer system having signal generation function, signal sampling function, control function and computing capability.
[0035] The above step S401 can be implemented as follows: the host computer system sends a control signal to the program-controlled amplifier circuit, and determines each amplifier stage in the amplifier module 2 as a corresponding amplifier gear through the control module 1, so that the gain of the cascade amplifier stage corresponds to the gain of the preset gain mode. And send the first input signal corresponding to the preset gain mode to the cascade amplifier stage. The host computer system inputs the first input signal, inputs the cascade amplifier stage through the input end of the cascade amplifier stage, and samples the actual gain signal after the cascade amplifier stage gain at the output end of the cascade amplifier stage. Repeat this step multiple times, and the number of repetitions is determined according to the number of situations corresponding to the preset gain mode, until the actual gain signals corresponding to each situation of all preset gain modes are sampled by the host computer system respectively.
[0036] In addition, different preset gain modes correspond to different amplifier stages, which may correspond to one amplifier stage or to multiple amplifier stages, depending on the purpose of the preset gain mode, which is not limited here. Usually, the purpose of the gain mode is to determine the gain of the amplifier in the corresponding amplifier stage, so as to compensate for the gain of the amplifier. For the case where an amplifier stage includes one amplifier (for example, multiple relay channels in a group of relay circuits are all connected to one amplifier), the gain of the amplifier stage may be the gain of the included amplifier. For the case where an amplifier stage includes at least two amplifiers (for example, multiple relay channels in a group of relay circuits are respectively connected to multiple amplifiers), the gain of the amplifier stage may correspond to the gains of multiple amplifiers, that is, corresponding gain compensation is determined for multiple amplifiers. In actual application, the corresponding amplifier is determined according to the relay channel used, and the gain compensation of the corresponding amplifier is used to correct the gain.
[0037] The above step S402 can be implemented as follows: the host computer system calculates the actual gain of the amplifier stage in the corresponding cascade amplifier stage in the gain mode according to the actual gain signal in different gain modes and the first input signal corresponding thereto. The gain can be calculated based on the actual gain signal and the signal value (for example, voltage value) of the first input signal, and the actual amplification factor of the amplifier stage is determined based on the gain. In another embodiment provided by the present application, before the above step S401, it also includes: Step 1: After receiving the start signal, the host computer system triggers the calibration process; Step 1, "After the host computer system receives the start signal, triggering the calibration process", can be implemented as follows: Step 1, fixing the amplification gear of the amplification stage corresponding to the preset amplification level at the maximum gain gear; Step 2, respectively adjusting the amplification gears of the amplification levels corresponding to the other amplification levels except the preset amplification level to obtain different gain combinations; and Step 3, using the second input signals corresponding to the respective gain combinations to input the input end of the cascade amplifier stage of the programmable amplifier circuit, and obtaining an output signal; Step 4: Determine the offset value of the corresponding gain combination according to the output signal, and adjust the offset value to zero.
[0038] In the embodiment of the present application, before the host computer system sends the first input signal to the program-controlled amplifier circuit, the program-controlled amplifier circuit can first perform a calibration process under the control of the host computer system. The main purpose of the calibration process is to adjust the bias voltage of the preset amplifier to zero.
[0039] The preset amplification level in the above step 1 can be any amplification level in the cascade amplification level, and in a possible implementation manner can be an amplification level close to the output end of the cascade amplification level. In actual application, the gain error of the amplification level close to the input end of the cascade amplification level will be introduced into the subsequent amplification level, so the gain error of the amplification level close to the input end has a greater impact on the superposition error of the cascade amplification level. Therefore, in the process of zeroing the bias voltage, the amplifier in the amplification level close to the input end can be mainly zeroed.
[0040] In a possible implementation, the amplification module 2 includes four amplification stages. Figure 1 As shown, the control module 1 fixes the third and fourth amplifier stages near the output end of the cascade amplifier stage in the amplifier module 2 at the maximum gain through a control signal, so as to amplify the gain error of the first and second amplifier stages, and can more accurately perform zero adjustment of the bias voltage.
[0041] Furthermore, corresponding amplification gears are selected for the first amplification stage and the second amplification stage to obtain different gain combinations. The gain combination can be a permutation combination of all amplification gears in the first amplification stage and the second amplification stage, which can provide a bias voltage zeroing result with higher accuracy; or it can be a combination of amplification gears corresponding to the first amplification stage and the second amplification stage according to the above target gain, which can improve the efficiency of the bias voltage zeroing process.
[0042] For different gain combinations, the host computer system sends the corresponding second input signal to the amplifier module 2. The second input signal can be a signal corresponding to the cascade amplifier stage with the largest gain capability (taking the signal as a voltage signal as an example, that is, the voltage value of the signal is the lower limit of the voltage value of the signal that can be gained by the programmable amplifier circuit). Using this signal for zeroing can provide a higher precision bias voltage zeroing result; it can also be a signal corresponding to the combination of the amplification gears corresponding to the first amplification stage and the second amplification stage in the above target gain. Using this signal for zeroing can improve the efficiency of the bias voltage zeroing process.
[0043] Furthermore, the host computer system monitors the signal output from the fourth amplifier stage, and executes a zeroing procedure according to the monitored output signal, selects appropriate calibration values for the first amplifier stage and the second amplifier stage, and adjusts their bias voltages to zero.
[0044] In another embodiment provided by the present application, in the above step S401, "the host computer system sends the first input signal to the input end of the cascade amplifier stage of the programmable amplifier circuit for various preset gain modes, and obtains the actual gain signal corresponding to the various preset gain modes respectively", can be implemented as follows: Step 1: The host computer system sends a control instruction to the program-controlled amplifier circuit, and controls the program-controlled amplifier circuit to adjust the corresponding amplifier level to a preset gear position based on the control instruction, thereby obtaining a preset gain mode of the program-controlled amplifier circuit; The preset gain mode includes: a zero gain mode and / or a single amplifier stage gain mode; the zero gain mode is used to obtain an actual gain signal when the amplification gear corresponding to each amplifier in each amplifier stage is at the zero gain gear; the single amplifier stage gain mode is used to obtain an actual gain signal for each amplifier stage, when the amplifier stage is set to a non-zero gain gear and the other amplifier stages except the amplifier stage in each amplifier stage are at the zero gain gear; Step 2: sending the first input signal to the input end of the cascade amplifier stage of the programmable amplifier circuit for different preset gain modes, and obtaining an actual gain signal corresponding to the gain mode.
[0045] In the embodiment of the present application, the host computer system controls the programmable amplifier circuit through the first control signal to adjust the amplification gear of the amplifier stage in the amplifier module 2 so that the amplification gear of each amplifier stage in the amplifier module 2 corresponds to the amplification gear of each amplifier stage in the preset gain mode.
[0046] As mentioned above, the purpose of the general gain mode is to determine the gain of the amplifier in the corresponding amplifier stage, so a zero gain mode and / or a single amplifier stage gain mode can be set. In the zero gain mode, the amplification gear of each amplifier stage is zero gain, and the theoretical total gain of the cascade amplifier stage composed of each amplifier stage is 0dB; in the single amplifier stage gain mode, the gain signal is obtained for each amplifier in each amplifier stage respectively. When implemented, the target amplifier in the target amplifier stage is set to a non-zero gain gear, and all amplifiers in other amplifier stages are set to zero gain gears, so that the actual gain of each amplifier in each amplifier stage can be obtained.
[0047] Continue to refer Figure 1 , Figure 1An amplification module including four amplification stages, each of which is provided with an amplifier, and each of which is provided with two amplification gears is provided as an example to illustrate the embodiments of the present application. Assume that the gains of the amplification gears in the amplification stages are: the gains of the amplification gears included in the first amplification stage are 0dB and 20dB respectively; the gains of the amplification gears included in the second amplification stage are 0dB and 20dB respectively; the gains of the amplification gears included in the third amplification stage are 0dB and -10dB respectively; the gains of the amplification gears included in the fourth amplification stage are 0dB and 20dB respectively.
[0048] In zero gain mode, the amplification gear of each amplifier stage is zero gain (that is, the amplification gear in each amplifier stage is 0dB), and the theoretical total gain of the cascade amplifier stage composed of each amplifier stage is 0dB. The first input signal is input to the input end of the amplifier module 2, and the actual gain signal is monitored at the output end of the amplifier module 2. The actual amplification factor of the cascade amplifier stage can be obtained. .
[0049] In the single amplifier stage gain mode, the first amplifier stage, the second amplifier stage, the third amplifier stage and the fourth amplifier stage are respectively set to non-zero gain positions. When a certain amplifier stage is set to a non-zero gain position, the other amplifier stages are determined to be zero gain positions to obtain the gain of the amplifier in the certain amplifier stage. In the single amplifier stage gain mode corresponding to the first amplifier stage, the gains of the amplifier positions of each amplifier stage in the cascade amplifier stage are 20dB, 0dB, 0dB, and 0dB, respectively. The first input signal is input to the input end of the amplifier module 2, and the actual gain signal is monitored at the output end of the amplifier module 2. According to the first input signal and the actual gain signal, the actual gain factor of the cascade amplifier stage can be obtained. Since only the first amplifier stage of the cascade amplifier stage has a non-zero gain, it can be considered that is the actual amplification factor of the first amplifying stage, that is, the actual amplification factor of the amplifier included in the first amplifying stage.
[0050] Furthermore, if Figure 5 As shown, the actual magnifications of the second amplification stage, the third amplification stage and the fourth amplification stage can be obtained respectively. , and , that is, the actual amplification factor of the amplifiers respectively included in the second amplifying stage, the third amplifying stage and the fourth amplifying stage.
[0051] In another embodiment provided by the present application, the above step S403 "for the amplifier stages corresponding to different preset gain modes, determining the correction factor of the corresponding amplifier stage through the correspondence between the actual gain of the corresponding amplifier stage and the preset gain of the corresponding amplifier stage" can be implemented as follows: Step 1: for amplifier stages corresponding to different preset gain modes, a ratio between a preset gain of the corresponding amplifier stage and an actual gain of the corresponding amplifier stage is determined as a correction factor of the corresponding amplifier stage; Then the above step S404 "for each cascade amplifier stage, according to the correction factors of the amplifier stages included in the cascade amplifier stage, determining the correction coefficient corresponding to the cascade amplifier stage" includes: Step 2: for each cascade amplifier stage, determining the number of amplifier stages representing non-zero gain in the cascade amplifier stage; Step 3: when the number is zero, the correction factor of the corresponding amplifier stage in the zero gain mode is determined as the correction coefficient corresponding to the cascade amplifier stage; Step 4: when the number is one, determine the correction factor corresponding to the one amplifier stage as the correction coefficient corresponding to the cascade amplifier stage; Step 5: when the number is greater than one, the quotient of the product of the correction factors of the at least two corresponding amplifier stages and the Nth power of the corresponding correction factor in the zero gain mode is determined as the correction coefficient corresponding to the cascade amplifier stage, where N is the above number minus one.
[0052] The above step 1 of "for the amplifier stages corresponding to different preset gain modes, determining the ratio between the preset gain of the corresponding amplifier stage and the actual gain of the corresponding amplifier stage as the correction factor of the corresponding amplifier stage" can be implemented by calculating the correction factor of the amplifier stage using the following calculation formula (1) for the correction factor of the amplifier stage: (1) in, A is the correction factor for this amplifier stage, is the theoretical magnification of this amplifier stage, R is the actual magnification of this magnification level.
[0053] In the embodiment of the present application, taking the amplification module 2 including four amplification stages as an example, the correction coefficient of the corresponding cascade amplification stage in the zero gain mode is obtained. .in, It is the actual amplification factor of the cascade amplifier stage in zero gain mode. In zero gain mode, the gain of each amplifier stage is 0dB, so in zero gain mode, the theoretical amplification factor is 1.
[0054] Furthermore, in the single amplifier stage gain mode, the correction factor corresponding to each amplifier stage is obtained. Taking the single amplifier stage gain mode corresponding to the third amplifier stage as an example, the correction factor of the third amplifier stage is .in, is the actual amplification factor of the cascaded amplifier stage in the single amplifier stage gain mode corresponding to the third amplifier stage, is the theoretical gain of the cascade amplifier stage in the single amplifier stage gain mode corresponding to the third amplifier stage. Similarly, in this way, the correction coefficient of the first amplifier stage can be obtained: , the correction factor of the second amplifier stage and the correction factor of the fourth amplifier stage .
[0055] Furthermore, the correction coefficients of different amplifier stages and the correction coefficients of the zero gain mode are substituted into the following formula (2) to obtain the correction factor of the cascade amplifier stage in the non-zero gain mode.
[0056] (2) in, C Characterizes the correction factor of the cascade amplifier stage, Characterize the correction coefficient in zero gain mode; Until , representing the correction coefficients of the amplifier stages corresponding to the amplifier stages representing the non-zero gain in the cascade amplifier stage, N The number of amplifier stages in the cascaded amplifier stages that exhibit non-zero gain minus one.
[0057] For example, in a cascade amplifier stage, the first and third amplifier stages have non-zero gain, and the second and fourth amplifier stages have zero gain. The correction factor of the cascade amplifier stage is Among them, the correction coefficient of the first amplifier stage is ; The correction coefficient of the third amplifier stage is ; Because the first and third amplifier stages in the cascade amplifier stage have non-zero gain, the number of corresponding non-zero gain amplifier stages is 2, N =2-1.
[0058] In another embodiment provided by the present application, the signal to be amplified is a voltage signal; The method further comprises: Step 1, obtaining a first voltage value of a signal to be amplified; Step 2: determining a first correction coefficient corresponding to the first voltage value according to a preset correspondence relationship between the voltage value and the cascade amplifier stage; Step 3, inputting the signal to be amplified into the program-controlled amplifier circuit to obtain an output first gain signal; Step 4: Use a first correction coefficient to correct the first gain signal to obtain a corrected first gain signal.
[0059] In the embodiment of the present application, the signal type can be selected as a voltage signal, and a suitable cascade amplifier stage can be selected for the input signal according to the voltage value. The cascade amplifier stage selected for the input signal can be determined according to the voltage value range and the corresponding relationship between the cascade amplifier stage pre-set in the host computer system. A signal with a small voltage value corresponds to a cascade amplifier stage with a large gain; a signal with a large voltage value corresponds to a cascade amplifier stage with a small gain.
[0060] After each startup of the host computer system, the calibration operation is performed. After the calibration operation is completed, the correction coefficient corresponding to each cascade amplifier stage is obtained, and the correction coefficient corresponding to different voltage value ranges is obtained accordingly. In the subsequent process, the program-controlled amplifier circuit determines the corresponding cascade amplifier stage according to the theoretical value of the signal to be amplified (i.e., the first voltage value), and corrects the signal with the first correction coefficient of the cascade amplifier stage to obtain the first gain signal, and outputs the first gain signal to the downstream device.
[0061] In a possible implementation, the lower-end device may be other devices in a lock-in amplifier, and the programmable amplifier circuit is applied to the input end of the lock-in amplifier.
[0062] This application also provides an example to illustrate the workflow of obtaining the correction coefficient corresponding to each voltage value level after each host computer system is started.
[0063] The programmable amplifier circuit used in this example is as follows Figure 6 As shown, the connection relationship of the cascade amplifier stage of the programmable amplifier circuit is as follows Figure 7 shown.
[0064] Here, a programmable amplifier circuit includes four amplifier stages, each of which corresponds to two amplifier gears. Assume that the gains of the amplifier gears included in the first amplifier stage are 0dB and 20dB respectively; the gains of the amplifier gears included in the second amplifier stage are 0dB and 20dB respectively; the gains of the amplifier gears included in the third amplifier stage are 0dB and -10dB respectively; the gains of the amplifier gears included in the fourth amplifier stage are 0dB and 20dB respectively, thus forming eight cascade amplifier stages. The gains and corresponding voltage value gears of each cascade amplifier stage formed in this way are: 3V gear target gain -10dB, the cascade amplifier stage is set to -10dB for the third amplifier stage, and 0dB for the other three amplifier stages; The target gain of 1V gear is 0dB, and the cascade amplifier stage is set to 0dB for all four amplifier stages; The target gain of the 300mV gear is 10dB, and the cascade amplifier stage is set to 20dB for the second amplifier stage, -10dB for the third amplifier stage, and 0dB for the other two amplifier stages; The target gain of the 100mV range is 20dB, the cascade amplifier stage is set to 20dB for the second amplifier stage, and 0dB for the other three amplifier stages; The target gain of the 30mV gear is 30dB, and the cascade amplifier stage is set to 20dB for the first amplifier stage, 20dB for the second amplifier stage, -10dB for the third amplifier stage, and 0dB for the fourth amplifier stage; The target gain of the 10mV gear is 40dB, and the cascade amplifier stage is set to 20dB for the first amplifier stage, 20dB for the second amplifier stage, and 0dB for the other two stages; The target gain of the 3mV gear is 50dB, and the cascade amplifier stage is set to 20dB for the first amplifier stage, 20dB for the second amplifier stage, -10dB for the third amplifier stage, and 20dB for the fourth amplifier stage; The target gain of the 1mV gear is 60dB, and the cascade amplifier stage is set to 20dB for the first amplifier stage, 20dB for the second amplifier stage, 0dB for the third amplifier stage, and 20dB for the fourth amplifier stage.
[0065] The upper computer initialization workflow (i.e. gain compensation determination workflow) of this example is as follows: Figure 8 As shown, it can be implemented as follows: S801, start the host computer system; the host computer system starts to execute the preset program.
[0066] S802, calibrate the corresponding bias of each amplifier stage; in this example, the gains of the third amplifier stage and the fourth amplifier stage can be fixed to 0dB and 20dB respectively (i.e., the maximum gains corresponding to the third amplifier stage and the fourth amplifier stage). Different gain combinations are configured for the first amplifier stage and the second amplifier stage, and the corresponding voltage value range is used to calibrate the bias of the corresponding amplifier stage.
[0067] S803, testing the actual magnification of each preset gain mode; obtaining the actual magnification of the first stage amplification stage according to the gain compensation determination method provided in the present application , the actual magnification of the second stage , the actual magnification of the third stage , the actual magnification of the fourth stage of magnification and the actual magnification in zero gain mode .
[0068] S804, recording the correction factor; according to the gain compensation determination method provided in the present application, the correction factor of each amplifier stage is determined by the corresponding relationship between the actual gain of each amplifier stage and the preset gain of the corresponding amplifier stage, and the correction factor of the first amplifier stage is obtained respectively. , the correction factor of the second amplifier stage , the correction factor of the third amplifier stage , the correction factor of the fourth amplifier stage Correction factor corresponding to the cascade amplifier stage corresponding to zero gain mode .
[0069] S805, record the correction coefficient of each gear; according to the gain compensation determination method provided in this application, obtain Fig. 9 The corresponding relationship between the voltage value level and the correction coefficient of this gain compensation process is shown.
[0070] S806, end; complete the initialization process, match the voltage value level with the correction coefficient, and subsequently use the correction coefficient to correct the signal.
[0071] The present application also provides the following example of using the correction coefficient to correct the input signal.
[0072] Step 1. Connect the external signal generator to the input channel of the lock-in amplifier. Here, the lock-in amplifier has two input channels, where channel 2 is the reference signal input channel and channel 1 is the signal input channel to be amplified. Here, the reference signal is a 100kHz, 3.3V square wave signal, and the signal to be amplified is an adjustable 100kHz sine wave signal.
[0073] Step 2: Input signals with different voltage values for testing, and record the values of these signals calibrated by the programmable amplifier circuit. The following table shows the test results provided in this example.
[0074]
[0075] It can be seen from the test results that before calibration, the actual voltage value of each input signal has different degrees of deviation from the theoretical value of the input signal, which directly affects the accuracy and reliability of signal processing. After calibration, the actual voltage value of each input signal is adjusted to near the theoretical value, and the relative error range is controlled within 6‰, achieving accurate adjustment of the input signal. Compared with the calibration method of 1% relative error provided in the related art, the calibration result provided by the embodiment of the present application is more accurate.
[0076] An embodiment of the present application provides an electronic device, including: a programmable amplifier circuit provided in an embodiment of the present application.
[0077] Through the description of the above implementation methods, those skilled in the art can clearly understand that the embodiments of the present application can be implemented by hardware, or by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0078] Those skilled in the art will appreciate that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes in the accompanying drawings are not necessarily required for implementing the present application.
[0079] Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed accordingly and located in one or more devices different from the present embodiment. The modules in the above embodiment can be combined into one module, or can be further divided into multiple sub-modules.
[0080] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0081] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A program-controlled amplifier circuit, characterized in that: include: Control module and amplification module; The control module is used to generate a first control signal according to a target gain corresponding to the signal to be amplified, and send the first control signal to the amplification module; The amplification module includes a plurality of amplification stages, each of which includes at least one amplifier and at least one amplification gear set for each amplifier, and the plurality of amplification stages are combined to form a plurality of cascade amplification stages by setting different amplification gears; The amplification module is used to determine the amplification gear corresponding to each amplification stage based on the first control signal; and input the signal to be amplified through the input end of the cascade amplification stage, and output the final gain signal through the output end of the cascade amplification stage.
2. The program-controlled amplifier circuit according to claim 1, characterized in that: The amplification module includes an I / O expander module, multiple groups of relay circuits and multiple operational amplifiers; The I / O expander module is connected to at least one group of relay circuits, and is used to determine a second control signal for controlling a relay in the connected relay circuit according to the first control signal, and send the second control signal to the relay circuit; Each group of relay circuits is connected to at least one operational amplifier, and the relays in the group of relay circuits are controlled to be turned on and off according to the second control signal to select the gear position of the corresponding operational amplifier; The multiple operational amplifiers are combined and connected in a preset manner, and the input port of the first operational amplifier in the combined connection serves as the input end of the cascade amplifier stage for receiving the signal to be amplified, and the output port of the last operational amplifier serves as the output end of the cascade amplifier stage for outputting the final gain signal; each operational amplifier is used to gain the input signal according to the gear position corresponding to the relay connected in the connected relay circuit.
3. The program-controlled amplifier circuit according to claim 2, characterized in that: The relay circuit comprises: a relay controller and at least one relay channel controlled by the relay controller; The relay channel comprises: a relay and a resistor; the relay input end is connected to the relay controller, the relay output end is connected to one end of the resistor, and the other end of the resistor is connected to the inverting input end of the corresponding operational amplifier; In the case where the relay circuit includes at least two relay channels, the at least two relay channels are connected in parallel and include resistors with different resistance values, so that the operational amplifier and the relay channels with different resistance values are combined to form different amplification gears.
4. The program-controlled amplifier circuit according to claim 1, characterized in that: Also includes: Digital isolator modules; The input end of the digital isolator module is connected to the control module, and the output end is connected to the amplification module; the digital isolator module is used to transmit the first control signal to the amplification module and isolate the amplification module from the control module.
5. A method for determining gain compensation of a programmable amplifier circuit according to claims 1 to 4, characterized in that: include: The host computer system sends the first input signal to the input end of the cascade amplifier stage of the programmable amplifier circuit for various preset gain modes, and obtains the actual gain signal corresponding to the various preset gain modes; wherein the different preset gain modes are used to obtain the actual gain of the corresponding amplifier stage; Determine the actual gain of the corresponding amplifier stage through the actual gain signal; For the amplifier stages corresponding to different preset gain modes, the correction factor of the corresponding amplifier stage is determined according to the corresponding relationship between the actual gain of the corresponding amplifier stage and the preset gain of the corresponding amplifier stage; For each cascade amplifier stage, a correction coefficient corresponding to the cascade amplifier stage is determined according to the correction factors of the amplifier stages included in the cascade amplifier stage.
6. The method according to claim 5, characterized in that Before the host computer system sends the first input signal, the method further includes: After receiving the start signal, the host computer system triggers the calibration process, including: Fixing the amplification gear of the amplification stage corresponding to the preset amplification level at the maximum gain gear; respectively adjusting the amplification positions of the amplification levels corresponding to the other amplification levels except the preset amplification level to obtain different gain combinations; and Using second input signals corresponding to each gain combination to input the input end of the cascade amplifier stage of the programmable amplifier circuit to obtain an output signal; An offset value corresponding to the gain combination is determined according to the output signal, and the offset value is adjusted to zero.
7. The method according to claim 5, characterized in that The host computer system sends the first input signal to the input end of the cascade amplifier stage of the programmable amplifier circuit for various preset gain modes, and obtains the actual gain signal corresponding to the various preset gain modes, including: The host computer system sends a control instruction to the program-controlled amplifier circuit, controls the program-controlled amplifier circuit to adjust the corresponding amplifier stage to a preset gear position based on the control instruction, and obtains a preset gain mode of the program-controlled amplifier circuit; The preset gain mode includes: a zero gain mode and / or a single amplifier stage gain mode; the zero gain mode is used to obtain an actual gain signal when the amplification gear corresponding to each amplifier in each amplifier stage is at the zero gain gear; the single amplifier stage gain mode is used to obtain an actual gain signal for each amplifier stage, when the amplifier stage is set to a non-zero gain gear and the other amplifier stages except the amplifier stage in each amplifier stage are at the zero gain gear; The first input signal is respectively sent to the input end of the cascade amplifier stage of the programmable amplifier circuit for different preset gain modes to obtain an actual gain signal corresponding to the gain mode.
8. The method according to claim 5, characterized in that For amplifier stages corresponding to different preset gain modes, the correction factor of the corresponding amplifier stage is determined according to the corresponding relationship between the actual gain of the corresponding amplifier stage and the preset gain of the corresponding amplifier stage, including: For amplifier stages corresponding to different preset gain modes, the ratio between the preset gain of the corresponding amplifier stage and the actual gain of the corresponding amplifier stage is determined as the correction factor of the corresponding amplifier stage; For each cascade amplifier stage, a correction coefficient corresponding to the cascade amplifier stage is determined according to the correction factors of the amplifier stages included in the cascade amplifier stage, including: For each cascade amplifier stage, determining the number of amplifier stages that characterize a non-zero gain in the cascade amplifier stage; In the case where the number is zero, determining the correction factor of the corresponding amplifier stage in the zero gain mode as the correction coefficient corresponding to the cascade amplifier stage; In the case where the number is one, determining the correction factor corresponding to the one amplifier stage as the correction coefficient corresponding to the cascade amplifier stage; When the number is greater than one, the quotient of the product of the correction factors of the at least two corresponding amplifier stages and the Nth power of the corresponding correction factor in the zero gain mode is determined as the correction coefficient corresponding to the cascade amplifier stage, and N is the number minus one.
9. The method according to claim 5, characterized in that The signal to be amplified is a voltage signal; The method further comprises: Acquiring a first voltage value of the signal to be amplified; Determining a first correction coefficient corresponding to the first voltage value according to a preset correspondence relationship between a voltage value and a cascade amplifier stage; Inputting the signal to be amplified into the program-controlled amplifier circuit to obtain a first gain signal as an output; The first correction coefficient is used to correct the first gain signal to obtain a corrected first gain signal.
10. An electronic device, characterized in that: include: A programmable amplifier circuit as claimed in any one of claims 1 to 4.