A method for calibrating digital quantity output from analog signal acquisition and encoding equipment
By performing digital calibration and normalization conversion on the analog signal acquisition and encoding equipment, the output inconsistency caused by resistance value error is solved, and a unified conversion of signals of the same amplitude is achieved, which reduces hardware costs and simplifies the use process.
Patent Information
- Application Number
- CN201910256827.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-04-01
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2039-04-01
AI Technical Summary
When the existing analog signal acquisition and encoding equipment processes the same amplitude signal, the output digital quantity is inconsistent due to the resistance value error, and different conversion equations are needed for each signal, which increases the difficulty and high cost.
By outputting digital calibration for each analog signal, fitting the correction equation Y=AnXbefore+Bn, determining the normalized conversion equation Y=A0X+B0, and adding configuration files to the digital signal processing circuit to realize the digital quantity Unified conversion.
A unified conversion formula for signals of the same amplitude is realized, which reduces hardware costs and reduces equipment costs without changing hardware performance.
Smart Images

Figure CN111769834B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of analog signal acquisition and conversion, and relates to an analog signal acquisition and coding method, and in particular to an acquisition and coding device or system with a large number of acquisition paths and a high requirement for the consistency of output digital quantity results. Background Art
[0002] In modern wired or wireless communication systems, the efficiency of direct transmission of analog signals is very low. Generally, analog signals are collected, quantized and encoded by analog signal acquisition and encoding equipment, and then converted into digital signals for output.
[0003] Analog signal acquisition and encoding equipment is generally composed of power supply circuit, signal input interface circuit, signal isolation circuit, digital signal processing circuit (MCU) and RS422 output interface. Its principle block diagram is as follows Figure 1 shown.
[0004] The signal input interface circuit is mainly used to uniformly convert input voltages of different amplitudes into a voltage range that can be accepted by the signal isolation chip and the ADC sampling chip. It is generally implemented using a differential amplifier circuit. The schematic diagram is as follows Figure 2 By arranging the circuit in parallel and adjusting the resistance values of R16 and R8, it is possible to achieve a uniform amplitude output for multiple input signals with different amplitudes.
[0005] But in Figure 2 In the circuit shown, since the resistance value has a certain error range (industrial-grade resistance is generally within 1%), the output voltage value of the input signal with the same voltage will change greatly after passing through the input interface circuit. After the converted voltage is isolated, sampled, encoded and output, there will be a certain gap between the output value and the true value.
[0006] In order to reduce this error, the output calibration method is generally used to refit a correction equation for each analog signal, that is, Y = A n X+B n (Wherein, Y is the input voltage value, X is the output digital quantity, n is the analog quantity acquisition path number, n=1, 2...). However, due to the difference in the resistance values of R8 and R16, for different n, An and Bn are different. This requires the user to configure different conversion equations according to different analog quantity path numbers, which brings great trouble to use.
[0007] The existing solution is generally to use higher precision resistors (within one thousandth). This can reduce the output error to a negligible level. However, using higher precision resistors will increase the price of components exponentially, causing greater cost pressure. Summary of the invention
[0008] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a method for normalizing analog signals of the same amplitude according to a unified equation to collect and output digital quantities.
[0009] In order to solve the above technical problems, the present invention provides a method for calibrating the digital quantity output by an analog signal acquisition and encoding device, comprising the following steps.
[0010] Step 1: calibrate the output digital quantity of each analog quantity acquisition output signal in the input interface circuit of the analog signal acquisition and editing equipment, and fit the correction equation Y=A n X before +B n , where Y is the input voltage value, X is the output digital quantity, n is the analog quantity acquisition path number, n = 1, 2...;
[0011] Step 2: For different analog signals of the same amplitude, determine the normalized conversion equation Y = A0X after +B0;
[0012] Step 3: Add a configuration file to the digital signal processing circuit so that before each digital quantity is output, the configuration parameters in the digital signal processing circuit are read and the digital quantity to be output X is before The conversion is performed according to the following formula:
[0013]
[0014] Step 4: After the conversion in step 3 is completed, the output digital quantity is calibrated according to the normalized conversion equation in step 2.
[0015] Beneficial Effects
[0016] (1) This method provides a normalized conversion formula, so that analog quantities with the same amplitude can be used according to the same conversion formula, which provides convenience for users. (2) The different conversion formulas for analog signal outputs with the same amplitude are caused by the hardware circuit characteristics of the editing equipment. This method achieves the unification of conversion formulas through software without changing the hardware performance, which greatly saves the hardware cost of the equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is the principle block diagram of the editing equipment.
[0018] Figure 2 This is the standard circuit diagram of the signal input interface circuit.
[0019] Figure 3 This is a flow chart of the digital quantity calibration method outputted by the present invention. DETAILED DESCRIPTION
[0020] like Figure 1As shown in FIG. 1 , the analog signal acquisition and encoding device of the present invention is composed of a power supply circuit, a signal input interface circuit, a signal isolation circuit, a digital signal processing circuit (MCU) and an RS422 output interface. The signal input interface circuit uniformly converts input voltages of different amplitudes into a voltage range acceptable to the signal isolation chip and the ADC sampling chip, and is implemented using a differential amplifier circuit. The schematic diagram is shown in FIG. Figure 2 shown.
[0021] The present invention provides a method for calibrating the output digital quantity of an analog signal acquisition and encoding device, and the specific implementation method includes the following steps (such as Figure 3 shown).
[0022] first step:
[0023] Encode and output normally according to the original editing equipment.
[0024] Step 2:
[0025] The output digital quantity is calibrated for each analog quantity acquisition output signal, and the correction equation is fitted. Y=A n X before +B n (Wherein, Y is the input voltage value, X is the output digital quantity, n is the analog quantity acquisition path number, n=1, 2...).
[0026] Step 3:
[0027] For different analog quantity acquisition output signals of the same amplitude, a normalized conversion equation Y=A0X+B0 is determined. A0 and B0 are generally determined according to the use requirements of the digital quantity.
[0028] For example, if the maximum amplitude of multiple channels is Y0 and the digital output is m bytes, the normalization equation can be defined as Right now B0=0, which can ensure that the maximum output amplitude is Y0 without reducing the conversion accuracy.
[0029] Step 4:
[0030] Add a configuration file in the MCU so that before each digital quantity is output, the configuration parameters in the MCU can be read and the digital quantity to be output X before Perform the conversion according to the following formula.
[0031]
[0032] Step 5:
[0033] After the conversion is completed, X afterRound off and implement output digital quantity calibration according to step 2. At this point, for analog signals of the same amplitude, even through different analog quantity acquisition channels, there can be a unified digital quantity output conversion equation.
[0034] The present invention is described in detail below with reference to specific examples.
[0035] The 4-channel analog signal with a maximum amplitude of 35V is processed and output as a single byte (0 to 255). Since the maximum input voltage of the back-end isolation chip is 2.5V, Figure 1 R16 is designed to be 510KΩ and R8 is designed to be 36KΩ, so that the 35V voltage can be adjusted to 2.3V to protect the subsequent chip.
[0036] Example:
[0037] Before using this method.
[0038] According to the traditional method, the output digital quantity X before Without any processing, 4 fitting equations are obtained.
[0039] Y1=0.14934X1+0.10054
[0040] Y2=0.15040X2+0.11118
[0041] Y3=0.14883X3+0.12487
[0042] Y4=0.15762X4+0.13200
[0043] Take X=180, and the analog quantities calculated according to the above equation are 26.98174V, 27.18318V, 26.91427V and 28.5036V respectively. The difference between the maximum and minimum values is about 1.5V.
[0044] If the subsequent user needs to use these four analog data, the voltage values must be calculated separately according to the above fitting equations, which is rather troublesome to use.
[0045] After using this method.
[0046] It is required that all four channels of analog data be calculated using Y=0.137255X.
[0047] According to the fourth step in the invention content, at X before Convert to X before output after The transformation formulas are
[0048]
[0049] After the transformation, the digital quantity output by the editing and compiling equipment is uniformly transformed into Y=0.137255X.
[0050] Parts of the present invention that are not described in detail are well known to those skilled in the art.
Claims
1. A method for calibrating the digital quantity output by an analog signal acquisition and encoding device, comprising the following steps: Step 1: calibrate the output digital quantity of each analog quantity acquisition output signal in the input interface circuit of the analog signal acquisition and editing equipment, and fit the correction equation Y=A n X before +B n ,in, Y is the input voltage value, X is the output digital value, n is the analog quantity acquisition path number, n = 1, 2...; Step 2: For different analog signals of the same amplitude, determine the normalized conversion equation Y = A0X after +B0; Step 3: Add a configuration file to the digital signal processing circuit so that before each digital quantity is output, the configuration parameters in the digital signal processing circuit are read and the digital quantity to be output X is before The conversion is performed according to the following formula: Step 4: After the conversion in step 3 is completed, the output digital quantity is calibrated according to the normalized conversion equation in step 2.
Citation Information
Patent Citations
Control method for pressure meter calibration for petroleum transmission pipelines in petroleum industry
CN106610331A
Method and system for accelerated analog to digital conversion
US20110037628A1