Signal gain adjusting circuit and method, electric equipment and storage medium
By designing the signal gain adjustment circuit in the electrical equipment and using the DSP control chip to adjust the filter parameters and gain according to the frequency of the interference signal, the problem of noise interference introduced by the sampling signal is solved, the signal quality and system robustness are improved, and the maintenance cost is reduced. .
Patent Information
- Application Number
- CN202410886587.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-09-06
AI Technical Summary
In the existing technology, the sampling signal introduces variable environmental noise and source interference, resulting in sampling inaccuracy, which in turn leads to incorrect operation of electrical equipment, and there is a lack of effective solutions.
Design a signal gain adjustment circuit, including a signal conditioning module and a gain adjustment module. The DSP control chip adjusts the filter parameters and gain according to the frequency of the interference signal to achieve dynamic adaptive filtering of environmental noise and improve signal quality and system robustness.
Effectively filter out interference signals, improve signal quality, enhance system control accuracy, and reduce after-sales maintenance costs of electrical equipment.
Smart Images

Figure CN118611609A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic circuits, and in particular to a signal gain adjustment circuit, method, electrical equipment and storage medium. Background Art
[0002] In electronic circuit systems (such as various electrical equipment), signal sampling is an indispensable part, and the sampling signal will serve as an important parameter for the subsequent operation, constantly affecting the operation accuracy and control stability of the entire electronic circuit system. Once the sampling signal processing link is not in place, with the accumulation of errors and losses in the transmission and operation at each level, the subsequent adjustment system and application system will not be able to achieve accurate calculation and logical control. The combined effects of electromagnetic coupling generated by the operation of components, the adverse effects of the operating environment of components, component aging and corrosion, etc., will introduce variable environmental noise and signal source interference to the sampling signal, which will lead to inaccurate sampling and report faults and even cause the electrical equipment to operate incorrectly.
[0003] Currently, no effective solution has been proposed to the problem that in the prior art, sampling signals are introduced with variable environmental noise and signal source interference, resulting in inaccurate sampling, reporting faults, and even causing electrical equipment to operate incorrectly. Summary of the invention
[0004] The embodiments of the present invention provide a signal gain adjustment circuit, method, electrical equipment and storage medium to solve the problem in the prior art that sampling signals are introduced with variable environmental noise and signal source interference, resulting in inaccurate sampling and reporting of faults, and even causing electrical equipment to operate incorrectly.
[0005] In order to solve the above technical problems, the present invention provides a signal gain adjustment circuit, which includes:
[0006] A signal conditioning module, whose input end is input with the original sampling signal, whose output end is connected with the gain adjustment module, for filtering out the interference signal in the original sampling signal, and then outputting the original sampling signal to the gain adjustment module;
[0007] The gain adjustment module is used to amplify the original sampling signal and then output it;
[0008] The DSP control chip is connected to the signal conditioning module and the gain adjustment module respectively, and is used to adjust the filtering parameters of the signal conditioning module and the gain of the gain adjustment module according to the frequency of the interference signal in the original sampling signal.
[0009] Furthermore, the signal conditioning module includes:
[0010] A filter resistor unit, whose input end is input with the original sampling signal, whose output end is connected with the filter capacitor unit, and whose control end is connected with the DSP control chip, wherein the DSP control chip is used to adjust the resistance value of the filter resistor unit according to the frequency of the interference signal in the original sampling signal;
[0011] The filter capacitor unit is controlled and connected to the DSP control chip, and its output end is connected to the input end of the gain adjustment module. The DSP control chip is used to adjust the capacitance of the filter capacitor unit according to the frequency of the interference signal in the original sampling signal.
[0012] Furthermore, the filter capacitor unit comprises:
[0013] At least two capacitor branches, each capacitor branch includes a filter capacitor and a switch arranged in series.
[0014] Furthermore, the filter resistor unit comprises:
[0015] A digital potentiometer, wherein the first and third pins thereof are connected to the DSP control chip and are used to control the enabling of the digital potentiometer, the second pin thereof is connected to the DSP control chip and is the control end of the filter resistor unit, and the resistance value between the fourth and fifth pins thereof is the adjusted resistance value of the filter resistor unit.
[0016] Furthermore, the gain adjustment module includes:
[0017] A first gain unit, whose input end is connected to the output end of the signal conditioning module, and whose output end is connected to the operational amplifier;
[0018] The second gain unit has an input end connected to the output end of the operational amplifier and an output end outputting a sampling signal after gain adjustment.
[0019] The present invention also provides an electrical device, comprising the above-mentioned signal gain adjustment circuit.
[0020] The present invention also provides a signal gain adjustment method, which is applied to the above-mentioned signal gain adjustment circuit, and the method comprises:
[0021] determining the frequency of the interfering signal in the original sampled signal;
[0022] The filtering parameters of the signal conditioning module are adjusted according to the frequency of the interference signal, and the gain of the gain adjustment module is adjusted according to the frequency of the interference signal.
[0023] Further, adjusting the filtering parameters of the signal conditioning module according to the frequency of the interference signal includes:
[0024] If the frequency of the interference signal is high frequency, the capacitance of the filter capacitor unit of the control signal conditioning module is switched to the first capacitance, and the resistance of the filter resistor unit of the control signal conditioning module is increased by a preset step size;
[0025] If the frequency of the interference signal is low frequency, the capacitance of the filter capacitor unit of the signal conditioning module is controlled to switch to a second capacitance, and the resistance of the filter resistor unit of the signal conditioning module is controlled to decrease by a preset step size;
[0026] Wherein, the first capacitance is greater than the second capacitance.
[0027] Further, after controlling the resistance value of the filter resistor unit of the signal conditioning module to increase by a preset step length, or controlling the resistance value of the filter resistor unit of the signal conditioning module to decrease by a preset step length, the method further includes:
[0028] Determine a change trend of a deviation between a value of the sampled signal after gain adjustment and a value of an expected sampled signal; wherein the value of the expected sampled signal is the product of the value of the original sampled signal and a preset gain of the gain adjustment module;
[0029] The preset step length is adjusted according to the change trend, and the resistance value of the filter resistor unit is changed to provide an adjustment direction.
[0030] Further, adjusting the preset step size according to the change trend and determining the resistance adjustment direction of the filter resistor unit include:
[0031] If the deviation becomes larger, the preset step size is controlled to decrease, and the resistance adjustment direction of the filter resistor unit is changed;
[0032] If the deviation becomes smaller, the preset step size is controlled to become larger, and the resistance adjustment direction of the filter resistor unit is changed.
[0033] Further, adjusting the gain of the gain adjustment module according to the frequency of the interference signal includes:
[0034] If the frequency of the interference signal is high frequency, adjusting the resistance values of the first gain unit and the second gain unit of the gain adjustment module to reduce the gain of the gain adjustment module;
[0035] If the frequency of the interference signal is low frequency, the resistance values of the first gain unit and the second gain unit of the gain adjustment module are adjusted to increase the gain of the gain adjustment module.
[0036] Further, after adjusting the filtering parameters of the signal conditioning module according to the frequency of the interference signal, and adjusting the gain of the gain adjustment module according to the frequency of the interference signal, the method further includes:
[0037] Determine whether the deviation between the value of the sampled signal after gain adjustment and the value of the expected sampled signal is less than a preset value; wherein the value of the expected sampled signal is the product of the value of the original sampled signal and the preset gain of the gain adjustment module;
[0038] If yes, the filtering parameters of the signal conditioning module and the gain of the gain adjustment module are locked, and the adjustment is stopped.
[0039] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the signal gain adjustment method is implemented.
[0040] The present invention further provides an electronic device, characterized in that it comprises:
[0041] one or more processors;
[0042] The storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned signal gain adjustment method.
[0043] By applying the technical solution of the present invention, a signal conditioning module is provided to filter out interference signals in the original sampling signal, and a gain adjustment module is provided to amplify the original sampling signal. The filtering parameters of the signal conditioning module and the gain of the gain adjustment module are adaptively adjusted according to the frequency of the interference signal in the original sampling signal, so as to realize dynamic adaptive filtering of environmental noise, improve the signal quality and enhance the robustness of the system, improve the control accuracy of the electrical equipment, and at the same time enhance the adjustment performance of the signal sampling, thereby reducing the after-sales maintenance cost of the electrical equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is a structural diagram of a signal gain adjustment circuit according to an embodiment of the present invention;
[0045] Figure 2 is a structural diagram of a signal gain adjustment circuit according to another embodiment of the present invention;
[0046] Figure 3 is a flow chart of a signal gain adjustment method according to an embodiment of the present invention;
[0047] Figure 4 is a flow chart of another signal gain adjustment method according to an embodiment of the present invention;
[0048] Figure 5 The figure is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two.
[0051] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0052] It should be understood that although the terms first, second, etc. may be used to describe the filter capacitors in the embodiments of the present invention, the filter capacitors should not be limited to these terms. These terms are only used to distinguish filter capacitors with different capacitance values. For example, without departing from the scope of the embodiments of the present invention, the first filter capacitor may also be referred to as the second filter capacitor, and similarly, the second filter capacitor may also be referred to as the first filter capacitor.
[0053] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0054] It should also be noted that the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the commodity or device including the elements.
[0055] The optional embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0056] Example 1
[0057] In electronic circuit systems, signal sampling is an indispensable part, and the sampling signal will serve as an important parameter for subsequent operations, constantly affecting the operating accuracy and control stability of the entire electronic circuit system. Once the sampling signal processing link is not in place, with the accumulation of errors and losses in the transmission and operation at each level, the subsequent adjustment system and application system will not be able to achieve accurate calculation and logical control. The combined effects of electromagnetic coupling generated by the operation of components, the adverse effects of the operating environment of components, component aging and corrosion, etc., will introduce variable environmental noise and signal source interference to the sampling signal, which will lead to inaccurate sampling and report faults, and even cause the electrical equipment to operate incorrectly.
[0058] In view of the above problems, this embodiment provides a signal gain adjustment circuit. Figure 1 is a structural diagram of a signal gain adjustment circuit according to an embodiment of the present invention, as shown in Figure 1 As shown, the signal gain adjustment circuit includes:
[0059] The signal conditioning module 10 has an input end receiving the original sampling signal and an output end connected to the gain adjustment module for filtering out interference signals in the original sampling signal and then outputting the original sampling signal to the gain adjustment module 20 .
[0060] The gain adjustment module 20 is used to amplify the original sampling signal and then output it.
[0061] The DSP control chip is connected to the signal conditioning module 10 and the gain adjustment module 20 respectively, and is used to adjust the filtering parameters of the signal conditioning module and the gain of the gain adjustment module according to the frequency of the interference signal in the original sampling signal.
[0062] The signal conditioning module is used to filter out interference signals in the sampled signals. However, there are two types of interference signals: high frequency and low frequency. Different filtering parameters can filter out different frequencies of signals. Therefore, it is necessary to adjust the filtering parameters of the signal conditioning module according to the frequency of the interference signal in the original sampled signal to improve the interference signal filtering effect and improve the signal quality.
[0063] After adjusting the filtering parameters, RC changes, so the corresponding time constant changes, and the signal delay to the subsequent stage will change accordingly. Therefore, the gain of the gain adjustment module also needs to be adjusted to compensate for this part of the delay, avoid excessive signal delay, and avoid affecting the timeliness of subsequent control. Therefore, after adjusting the filtering parameters according to the frequency of the interference signal, it is also necessary to adjust the gain of the gain adjustment module 20 in a targeted manner. Therefore, the DSP control chip also needs to adjust the gain of the gain adjustment module according to the frequency of the interference signal in the original sampling signal.
[0064] The signal gain adjustment circuit of this embodiment is provided with a signal conditioning module for filtering out interference signals in the original sampling signal Vsig0, and a gain adjustment module for amplifying the original sampling signal Vsig0, and adaptively adjusting the filtering parameters of the signal conditioning module and the gain of the gain adjustment module according to the frequency of the interference signal in the original sampling signal Vsig0, so as to realize dynamic adaptive filtering of environmental noise, improve the signal quality and enhance the robustness of the system, improve the control accuracy of the electrical equipment, and at the same time enhance the adjustment performance of the signal sampling, thereby reducing the after-sales maintenance cost of the electrical equipment.
[0065] In order to filter out the interference signal in the sampled signal, RC filtering can be used, that is, filtering is achieved through the joint action of resistors and capacitors. Therefore, Figure 1 As shown, the signal conditioning module 10 includes: a filter resistor unit 101, whose input end inputs the original sampling signal Vsig0, whose output end is connected to the filter capacitor unit 102, whose control end is connected to the DSP control chip, and the DSP control chip is used to adjust the resistance value of the filter resistor unit 101 according to the frequency of the interference signal in the original sampling signal Vsig0; a filter capacitor unit 102, whose control end is connected to the DSP control chip, and whose output end is connected to the input end of the gain adjustment module 20, and the DSP control chip is used to adjust the capacitance value of the filter capacitor unit 102 according to the frequency of the interference signal in the original sampling signal Vsig0. Figure 1 As shown, the DSP control chip controls the capacitance of the filter capacitor unit 102 through control signals S1 and S2, and controls the resistance of the filter resistor unit 101 through control signal S3.
[0066] Figure 2 FIG. 4 is a structural diagram of a signal gain adjustment circuit according to another embodiment of the present invention. Figure 2 As shown, the DSP control chip controls the resistance of the filter resistor unit 101 by inputting a control signal to the second pin U / D, and controls the capacitance of the filter capacitor unit 102 by outputting a control signal S1 and a control signal S2 to the first switch K1 and the second switch K2 respectively.
[0067] like Figure 2As shown, in order to achieve flexible adjustment of the capacitance of the filter capacitor unit 102 to achieve different filtering frequencies, the filter capacitor unit 102 includes: at least two capacitor branches, each capacitor branch includes a filter capacitor and a switch arranged in series. In one embodiment of the present invention, the filter capacitor unit may include: a first filter capacitor C1 and a second filter capacitor C2, the first filter capacitor C1 is connected in series with the first switch K1 to form a first branch, the second filter capacitor C2 is connected in series with the second switch K2 to form a second branch, and the first branch and the second branch are arranged in parallel; the capacitance of the first filter capacitor C1 is greater than the capacitance of the second filter capacitor C2.
[0068] In order to achieve flexible adjustment of the resistance value of the filter resistor unit to achieve different filtering frequencies, in one embodiment of the present invention, the filter resistor unit includes:
[0069] The digital potentiometer has a first pin INC and a third pin CS connected to the DSP control chip for controlling the digital potentiometer to be enabled, a second pin U / D is a control end of the filter resistor unit 101, connected to the DSP control chip, a fifth pin VW connected to the input end of the original sampling signal Vsig0, a fourth pin VL connected to the filter capacitor unit 102, and the resistance value output between the fourth pin VL and the fifth pin VW is the adjusted resistance value of the filter resistor unit 101, and the VH pin is suspended. The pins Vcc and VCC of the filter resistor unit 101 are connected to a voltage source, and the pins GND and VSS are grounded.
[0070] The working principle of the digital potentiometer is based on integrated circuit technology and MOSFET switch technology. It consists of a group of discrete resistor elements, each with a resistance value of R, a total of N elements, and a total resistance of RN. The digital potentiometer is actually equivalent to a network consisting of a group of switches and resistors in series, in which the switch is used to connect or disconnect each resistor element, thereby changing the size of the total resistance. The digital potentiometer mainly consists of two parts: a voltage divider and a controller. The voltage divider consists of a series of resistor elements that divide the input voltage according to a certain ratio. Each resistor element is connected to the input pin of the controller. The controller reads the control signal and opens or closes the corresponding switch according to the high or low signal, thereby changing the size of the total resistance. When the controller receives a binary signal, it will choose to open or close the switch according to the value of the signal. For example, when a specific binary bit is 1, the corresponding switch will be turned on and the resistor element will be incorporated into the circuit. On the contrary, if the binary bit is 0, the switch will be closed and the resistor element will be disconnected. In this way, different resistance values can be achieved through the combination of multiple binary signals.
[0071] The above-mentioned capacitance adjustment is a coarse adjustment, and the resistance adjustment is a fine adjustment, thereby achieving smooth adjustment of RC parameters.
[0072] In order to adjust the gain of the sampling signal, the above-mentioned gain adjustment module 20 includes: a first gain unit 201, i.e., a front-stage gain unit, whose input end is connected to the output end of the signal conditioning module, and whose output end is connected to the operational amplifier U; a second gain unit 201, i.e., a rear-stage gain unit 202, whose input end is connected to the output end of the operational amplifier U, and whose output end outputs the sampling signal Vsig1 after adjusting the gain.
[0073] like Figure 2 As shown, the DSP control chip adjusts the resistance of the first resistor R1 and the second resistor R2 in the first gain unit 201 through the control signal F1, thereby adjusting the gain of the first gain unit 201, and adjusts the resistance of the third resistor R3 in the second gain unit 202 through the control signal F2, thereby adjusting the gain of the second gain unit 202.
[0074] When the frequency of the interference signal is high frequency, the DSP control chip controls the capacitance of the filter capacitor unit 102 of the signal conditioning module to switch to the first capacitance, and controls the resistance of the filter resistor unit 101 of the signal conditioning module 10 to increase by a preset step size, and then adjusts the resistance values of the first gain unit 201 and the second gain unit 202 of the gain adjustment module 20 to reduce the gain of the gain adjustment module 20; when the frequency of the interference signal is low frequency, the DSP control chip controls the capacitance of the filter capacitor unit 102 of the signal conditioning module 10 to switch to the second capacitance, and controls the resistance of the filter resistor unit 101 of the signal conditioning module 10 to decrease by a preset step size, and then adjusts the resistance values of the first gain unit 201 and the second gain unit 202 of the gain adjustment module 20 to increase the gain of the gain adjustment module 20; wherein the above-mentioned first capacitance is greater than the second capacitance.
[0075] The signal gain adjustment circuit of this embodiment can filter out interference signals of different frequencies through the filtering parameters of the signal conditioning module, thereby improving the signal quality of the sampling source. At the same time, through the dynamic adaptive adjustment of the filtering parameters and the signal gain, the final sampling signal is close to the expected sampling signal, and the flexibility of processing source interference is improved. The hardware of the adaptive gain circuit is simplified, and the calculation complexity is reduced.
[0076] Example 2
[0077] This embodiment provides an electrical device, including the signal gain adjustment circuit of the above embodiment, which is used to achieve dynamic adaptive filtering of environmental noise, improve signal quality and enhance system robustness, improve the control accuracy of the electrical equipment, and at the same time enhance the adjustment performance of signal sampling and reduce the after-sales maintenance cost of the electrical equipment.
[0078] Example 3
[0079] This embodiment provides a signal gain adjustment method. Figure 3 : is a flow chart of a signal gain adjustment method according to an embodiment of the present invention. Figure 3 As shown, the method includes:
[0080] S101 , determining the frequency of the interference signal in the original sampling signal Vsig0 .
[0081] The signal conditioning module is used to filter out interference signals in the sampled signals. However, there are two types of interference signals: high frequency and low frequency. Different filtering parameters can filter out different frequencies of signals. Therefore, it is necessary to adjust the filtering parameters of the signal conditioning module according to the frequency of the interference signal in the original sampling signal Vsig0 to improve the interference signal filtering effect and improve the signal quality.
[0082] S102, adjusting the filtering parameters of the signal conditioning module according to the frequency of the interference signal, and adjusting the gain of the gain adjustment module according to the frequency of the interference signal.
[0083] After adjusting the filtering parameters according to the frequency of the interference signal, it is also necessary to adjust the gain of the gain adjustment module 20 in a targeted manner to amplify the original sampling signal Vsig0 to obtain the expected sampling signal. Therefore, the DSP control chip also needs to adjust the gain of the gain adjustment module according to the frequency of the interference signal in the original sampling signal Vsig0.
[0084] In order to match the filtering parameters with the frequency of the interference signal in the sampling signal so as to obtain a better filtering effect, the filtering parameters of the signal conditioning module are adjusted according to the frequency of the interference signal, including: if the frequency of the interference signal is high frequency, the capacitance of the filter capacitor unit of the control signal conditioning module is switched to the first capacitance, and the resistance of the filter resistor unit of the control signal conditioning module is increased by a preset step; if the frequency of the interference signal is low frequency, the capacitance of the filter capacitor unit of the control signal conditioning module is switched to the second capacitance, and the resistance of the filter resistor unit of the control signal conditioning module is reduced by a preset step; wherein the first capacitance is greater than the second capacitance.
[0085] In order to quickly lock the optimal resistance value, after adjusting the resistance of the filter resistor unit, it is necessary to further fine-tune the resistance according to the variation trend of the deviation between the signal and the expected sampling signal. Therefore, after controlling the resistance of the filter resistor unit of the signal conditioning module to increase the preset step length, or controlling the resistance of the filter resistor unit of the signal conditioning module to decrease the preset step length, the method further includes: determining the variation trend of the deviation between the value of the sampling signal Vsig1 after gain adjustment and the value of the expected sampling signal; wherein the value of the expected sampling signal is the product of the value of the original sampling signal Vsig0 and the preset gain A of the gain adjustment module; adjusting the preset step length according to the variation trend, and changing the resistance adjustment direction of the filter resistor unit. Specifically, if the deviation becomes larger, it indicates that the adjustment is transitional, the preset step length is controlled to decrease, and the resistance adjustment direction of the filter resistor unit is changed; if the deviation becomes smaller, it indicates that the adjustment is insufficient, the preset step length is controlled to increase, and the resistance adjustment direction of the filter resistor unit is changed to maintain.
[0086] After passing through the signal conditioning module 10, the signal enters the gain adjustment module 20 for adaptive adjustment. The gain adjustment link consists of a first gain unit, an operational amplifier, and a second gain unit. The first gain unit is mainly composed of the op amp in-phase terminal, the inverting terminal, the output terminal, and the resistors connected to each terminal; the second gain unit is composed of the op amp feedback resistor and the output resistor; the internal resistors of the two units are connected according to the actual required amplification circuit group; the DSP control chip controls the change of the gain resistance value in the first gain unit and the second gain unit through F1 and F2 respectively, and the gain resistance value can also be adjusted through a digital potentiometer like the filter resistor unit. The operational amplifier selects a high-precision op amp, and the power supply and ground supply are equipped with corresponding filter capacitors. The sampling signal Vsig1 after gain adjustment is used for the control of the subsequent circuit.
[0087] After adjusting the filter parameters, RC changes, so the corresponding time constant changes, and the signal delay to the subsequent link will change accordingly. Therefore, the gain of the gain adjustment module also needs to be adjusted to compensate for this part of the delay, avoid excessive signal delay, and avoid affecting the timeliness of subsequent control. Therefore, after adjusting the filter parameters according to the frequency of the interference signal, it is also necessary to adjust the gain of the gain adjustment module 20 in a targeted manner. In order to match the gain of the gain adjustment module with the adjusted filter parameters to compensate for the signal delay caused by the adjustment of the filter parameters, the gain of the gain adjustment module is adjusted according to the frequency of the interference signal, including: if the frequency of the interference signal is high frequency, then adjust the resistance values of the first gain unit and the second gain unit of the gain adjustment module to reduce the gain of the gain adjustment module; if the frequency of the interference signal is low frequency, then adjust the resistance values of the first gain unit and the second gain unit of the gain adjustment module to increase the gain of the gain adjustment module.
[0088] In practical applications, adjusting the gain can only make the sampling signal approach the expected sampling signal continuously. However, it may happen that no matter how the gain is adjusted, the expected sampling signal cannot be reached. If the gain is continued to be adjusted in this case, it will fall into an infinite loop of adjustment. In order to ensure that the sampling signal is as close to the expected sampling signal as possible and avoid falling into an infinite loop of adjustment, after adjusting the filtering parameters of the signal conditioning module according to the frequency of the interference signal and adjusting the gain of the gain adjustment module according to the frequency of the interference signal, the above method also includes: judging whether the deviation between the value of the sampling signal Vsig1 after the gain is adjusted and the value of the expected sampling signal is less than a preset value; wherein the value of the expected sampling signal is the product of the value of the original sampling signal Vsig0 and the preset gain A of the gain adjustment module; if yes, locking the filtering parameters of the signal conditioning module and the gain of the gain adjustment module, and stopping the adjustment; if not, continuing to adjust the gain of the gain adjustment module.
[0089] Example 4
[0090] This embodiment provides another signal gain adjustment method. Figure 4 FIG. 4 is a flow chart of another signal gain adjustment method according to an embodiment of the present invention. Figure 4 As shown, the method includes:
[0091] S1, determine whether I1-I1+t∈(α1, α2) is satisfied. If yes, execute step S2; if not, repeat step S1.
[0092] Among them, I1 is the current of the electric device at the starting moment, I1+t is the current of the electric device after t time from the starting moment, α1 is the first current threshold that characterizes the stable operation of the electric device, α2 is the second current threshold that characterizes the stable operation of the electric device, and It-It+1∈(α1, α2) is judged. If yes, it indicates that the electric device is running stably, if not, it indicates that the electric device has not reached stable operation. By comparing whether the current value after t time from the starting moment has a large increment, it is determined whether the electric device is in a stable operation stage. When the electric device enters the stable operation stage, the sampling signal will not change significantly in a short time, and subsequent signal conditioning and gain adjustment can be performed.
[0093] S2, determine whether the frequency of the interference signal in the original sampling signal Vsig0 is high frequency or low frequency, if it is low frequency, execute steps S3 to S5, if it is high frequency, execute steps S6 to S8.
[0094] S3, controlling the filter capacitor unit to switch to the small capacitor C2.
[0095] S4, controls the resistance of the filter resistor to decrease by ΔR.
[0096] S5, controlling the gain of the gain adjustment module to increase by ΔA.
[0097] S6, controlling the filter capacitor unit to switch to the large capacitor C1.
[0098] S7, controls the resistance of the filter resistor to increase by ΔR.
[0099] S8, controlling the gain of the gain adjustment module to decrease by ΔA.
[0100] The DSP control chip detects the interference type of the signal Vsig0. If it is low-frequency interference: the DSP controls the filter capacitor unit through S1 and S2 and switches to the small capacitor C2. At the same time, the DSP control chip controls the filter resistor unit through the potentiometer pin 2 (U / D) to control the resistance to decrease by ΔR. At the same time, the DSP control chip combines the RC parameter calculation of the signal conditioning module to adjust the resistance of the first and second gain units through F1 and F2 to increase the gain by ΔA. If it is high-frequency interference: the DSP control chip controls the filter capacitor unit through the network S1 and S2 and switches to the large capacitor C1. At the same time, the DSP control chip controls the filter resistor unit through the potentiometer pin 2 (U / D) to control the resistance to increase by ΔR. At the same time, the DSP control chip combines the RC parameter calculation of the signal conditioning module to control the resistance of the first and second gain units through F1 and F2 to reduce the gain by ΔA.
[0101] S9, determine whether |Vsig1-AVsig0|<δ is satisfied, if yes, execute step S10; if no, execute step S11.
[0102] Where A is the preset gain.
[0103] S10, lock the parameters and no longer adjust them.
[0104] S11, re-determine the adjustment step size and adjustment direction of the filter resistance according to the change of |Vsig1-AVsig0|, and then execute step S9.
[0105] After the first adjustment, the DSP control chip collects the values of the signals Vsig1 and Vsig0 at this moment, and judges: |Vsig1-AVsig0|<δ. If it is satisfied: the adjustment is completed, the adjusted parameter value is locked, and no adjustment is performed. After ΔT, the judgment of whether the electrical equipment is running stably is re-entered. If it is not satisfied, the resistance value of the filter resistor unit is re-adjusted. Specifically, if |Vsig1-AVsig0|t1>|Vsig1-AVsig0|t0 after this adjustment compared with the last adjustment, it means that the adjustment is excessive, and then the adjustment is reversed by 0.5ΔR; if |Vsig1-AVsig0|t1≤|Vsig1-AVsig0|t0, it means that the adjustment is insufficient, and then the adjustment is forward by 2ΔR; by analogy with this dichotomy, the optimal parameter value can be locked quickly in a few rounds.
[0106] Example 5
[0107] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the signal gain adjustment method of the above embodiment is implemented.
[0108] Example 6
[0109] This embodiment provides an electronic device, including:
[0110] one or more processors;
[0111] The storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned signal gain adjustment method.
[0112] Figure 5 FIG. 1 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Figure 5 As shown, the electronic device includes:
[0113] One or more processors 510 and memory 520, Figure 5 A processor 510 is taken as an example.
[0114] The electronic device implementing the signal gain adjustment method may further include: an input device 530 and an output device 540 .
[0115] The processor 510, the memory 520, the input device 530 and the output device 540 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.
[0116] The memory 520 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the signal gain adjustment method in the embodiment of the present invention. The processor 510 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 520, that is, implementing the above method embodiment.
[0117] The memory 520 may include a program storage area and a data storage area, wherein the program storage area may store an application required for operating the device and at least one function; the data storage area may store data created according to the use of the signal gain adjustment device, etc. In addition, the memory 520 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0118] The input device 530 can receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 540 can include a display device such as a display screen.
[0119] The one or more modules are stored in the memory 520, and when executed by the one or more processors 510, the signal gain adjustment method in any of the above method embodiments is executed.
[0120] The above product can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0121] The electronic devices of the embodiments of the present invention exist in various forms, including but not limited to:
[0122] (1) Mobile communication devices: These devices are characterized by their mobile communication functions and their main purpose is to provide voice and data communications. These terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
[0123] (2) Ultra-mobile personal computer devices: These devices fall into the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access features. These terminals include: PDA, MID and UMPC devices, such as iPad.
[0124] (3) Portable entertainment devices: These devices can display and play multimedia content. They include audio and video players (such as iPods), handheld game consoles, e-books, as well as smart toys and portable car navigation devices.
[0125] (4) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, device bus, etc. The server is similar to the general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, manageability, etc.
[0126] (5) Other electronic devices with data interaction functions, such as televisions, large-screen cars, etc.
[0127] The circuit embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical unit modules, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0128] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A signal gain adjustment circuit, characterized in that: The circuit comprises: A signal conditioning module, whose input end is input with the original sampling signal, whose output end is connected with the gain adjustment module, for filtering out the interference signal in the original sampling signal, and then outputting the original sampling signal to the gain adjustment module; The gain adjustment module is used to amplify the original sampling signal and then output it; The DSP control chip is connected to the signal conditioning module and the gain adjustment module respectively, and is used to adjust the filtering parameters of the signal conditioning module and the gain of the gain adjustment module according to the frequency of the interference signal in the original sampling signal.
2. The circuit according to claim 1, characterized in that The signal conditioning module comprises: A filter resistor unit, whose input end is input with the original sampling signal, whose output end is connected with the filter capacitor unit, and whose control end is connected with the DSP control chip, wherein the DSP control chip is used to adjust the resistance value of the filter resistor unit according to the frequency of the interference signal in the original sampling signal; The filter capacitor unit is controlled and connected to the DSP control chip, and its output end is connected to the input end of the gain adjustment module. The DSP control chip is used to adjust the capacitance of the filter capacitor unit according to the frequency of the interference signal in the original sampling signal.
3. The circuit according to claim 2, characterized in that The filter capacitor unit comprises: At least two capacitor branches, each capacitor branch includes a filter capacitor and a switch arranged in series.
4. The circuit according to claim 2, characterized in that The filter resistor unit comprises: A digital potentiometer, wherein the first pin and the third pin are connected to the DSP control chip and are used to control the enabling of the digital potentiometer, the second pin is connected to the DSP control chip and is the control end of the filter resistor unit, and the resistance value between the fourth pin and the fifth pin is the adjusted resistance value of the filter resistor unit.
5. The circuit according to claim 2, characterized in that The gain adjustment module comprises: A first gain unit, whose input end is connected to the output end of the signal conditioning module, and whose output end is connected to the operational amplifier; The second gain unit has an input end connected to the output end of the operational amplifier and an output end outputting a sampling signal after gain adjustment.
6. An electrical equipment, characterized in that: The invention comprises the signal gain adjustment circuit as described in any one of claims 1 to 5.
7. A signal gain adjustment method, applied to the signal gain adjustment circuit according to any one of claims 1 to 5, characterized in that: The method comprises: determining the frequency of the interfering signal in the original sampled signal; The filtering parameters of the signal conditioning module are adjusted according to the frequency of the interference signal, and the gain of the gain adjustment module is adjusted according to the frequency of the interference signal.
8. The method according to claim 7, characterized in that Adjusting the filtering parameters of the signal conditioning module according to the frequency of the interference signal includes: If the frequency of the interference signal is high frequency, the capacitance of the filter capacitor unit of the control signal conditioning module is switched to the first capacitance, and the resistance of the filter resistor unit of the control signal conditioning module is increased by a preset step size; If the frequency of the interference signal is low frequency, the capacitance of the filter capacitor unit of the signal conditioning module is controlled to switch to a second capacitance, and the resistance of the filter resistor unit of the signal conditioning module is controlled to decrease by a preset step size; Wherein, the first capacitance is greater than the second capacitance.
9. The method according to claim 8, characterized in that After controlling the resistance value of the filter resistor unit of the signal conditioning module to increase by a preset step length, or controlling the resistance value of the filter resistor unit of the signal conditioning module to decrease by a preset step length, the method further includes: Determine a change trend of a deviation between a value of the sampled signal after gain adjustment and a value of an expected sampled signal; wherein the value of the expected sampled signal is the product of the value of the original sampled signal and a preset gain of the gain adjustment module; The preset step length is adjusted according to the change trend, and the resistance value of the filter resistor unit is changed to provide an adjustment direction.
10. The method according to claim 9, characterized in that Adjusting the preset step size according to the change trend and determining the resistance adjustment direction of the filter resistor unit include: If the deviation becomes larger, the preset step size is controlled to decrease, and the resistance adjustment direction of the filter resistor unit is changed; If the deviation becomes smaller, the preset step size is controlled to become larger, and the resistance adjustment direction of the filter resistor unit is changed.
11. The method according to claim 7, characterized in that Adjusting the gain of the gain adjustment module according to the frequency of the interference signal includes: If the frequency of the interference signal is high frequency, adjusting the resistance values of the first gain unit and the second gain unit of the gain adjustment module to reduce the gain of the gain adjustment module; If the frequency of the interference signal is low frequency, the resistance values of the first gain unit and the second gain unit of the gain adjustment module are adjusted to increase the gain of the gain adjustment module.
12. The method according to claim 7, characterized in that After adjusting the filtering parameters of the signal conditioning module according to the frequency of the interference signal, and adjusting the gain of the gain adjustment module according to the frequency of the interference signal, the method further includes: Determine whether the deviation between the value of the sampled signal after gain adjustment and the value of the expected sampled signal is less than a preset value; wherein the value of the expected sampled signal is the product of the value of the original sampled signal and the preset gain of the gain adjustment module; If yes, the filtering parameters of the signal conditioning module and the gain of the gain adjustment module are locked, and the adjustment is stopped.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 7 to 12 is implemented.
14. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the method as claimed in any one of claims 7 to 12.
