Smart test
Research and Analysis on the Selection Scheme of ADC for Electric Energy Measurement
In today's society, the requirements for power quality are getting higher and higher, and the country has also specially formulated national standards for power quality. Therefore, the measurement of power quality is getting more and more attention from power users. When measuring electric energy, the result of data collection from the power grid plays a crucial role in its accuracy, and what affects is the analog-to-digital converter (ADC) that converts analog signals into digital signals, often A/D chips The technical parameters and indicators determine the performance indicators of the entire data acquisition system. This article summarizes the choice of ADC for energy measurement.
1 Technical parameters of A/D converter
The technical parameters of the A/D converter reflect its performance characteristics, and its main indicators are as follows:
(1) Resolution: The resolution reflects the ability of the A/D converter to respond to small changes in the input, usually expressed by the level value of the analog input corresponding to the digital output bit (LSB).
(2) Accuracy: Accuracy can be expressed in two ways: accuracy and relative accuracy. Error: refers to the value of the difference between the actual analog input voltage and the ideal analog input voltage corresponding to a digital quantity, which is usually expressed by the fractional value of the effective bit (LSB) of the digital quantity. Relative error: refers to the difference between the actual value and the theoretical value of the analog input quantity corresponding to any digital quantity within the entire conversion range, expressed as a percentage of the full range of the analog voltage.
(3) Conversion time: Conversion time refers to the time required to complete A/D conversion, that is, the time interval from issuing the start conversion command signal to the beginning of the conversion end signal, and its reciprocal is called the conversion rate. For example, the conversion time of MAX125 is 3μs, and its conversion rate is about 330 kHz.
(4) Power supply sensitivity: Power supply sensitivity refers to the conversion error generated when the voltage of the power supply of the A/D conversion chip changes. It is generally expressed as the percentage of the corresponding analog quantity change when the power supply voltage changes 1%.
(5) Range: Range refers to the range of analog input voltage that can be converted, divided into two types: unipolar and bipolar.
When the A/D converter actually works, it will introduce some errors, mainly including: static error, aperture error and quantization error. Various errors are calculated with the effective bit (LSB) as the unit of calculation. 1 LSB is defined as VREF/2n, VREF in the definition refers to the reference voltage, and n is the resolution of the analog/digital converter. For example, 1 LSB of a 14-bit analog/digital converter is VREF/16384.
(1) Static error: When converting a DC signal, the static error can be represented by offset error, gain error, nonlinear error, and differential nonlinear error.
Offset error: Offset error is the offset between the actual ADC conversion function curve and the ideal conversion curve, that is, the actual curve has a translation phenomenon.
Gain error: The gain error is the difference between the full-scale error and the offset error.
Non-linear error: Non-linear error refers to the deviation between the actual transmission characteristic curve of the converter and its average transmission characteristic curve.
Differential non-linear error; it represents the interval between the output code and its adjacent codes. It is measured by the change of the input voltage and converted to LSB as the unit, which is what we usually call ±1LSB, ±0.5LSB and other indicators.
(2) Aperture error: The error caused by the delay between sampling and holding due to the noise of the sampling clock or input signal. (3) Quantization error: The quantization error of the A/D converter is determined by the conversion characteristics of the A/D converter. This error is caused by the conversion characteristics. It is a principle error and cannot be eliminated. After the A/D converter is selected, its quantization error is also determined. The quantization error and the resolution are unified, and the quantization error is the error caused by the discrete value (quantization) of the finite number on the analog number. Therefore, the quantization error is theoretically a unit resolution, that is, 1LSB. Increasing the resolution can reduce the quantization error.
The above-mentioned errors constitute the total error of the A/D converter. When considering the comprehensive influence of the above-mentioned various errors, the total error of the A/D converter should be expressed by the root mean square of the various errors.
2 Theoretical analysis of A/D converter selection
2.1 Overview
The sampling process is limited by ADC conversion accuracy and conversion rate. On the one hand, for a specific analog-to-digital converter, the accuracy that its data bits can represent is determined by the conversion bits of the ADC. On the other hand, the conversion data of each analog-to-digital converter must have a conversion time before being read. The more data bits, the longer the conversion time, and the slower the corresponding conversion rate. This requires a compromise solution between ADC conversion accuracy and conversion rate. The higher the requirements for conversion accuracy and conversion rate, the more difficult the analog-to-digital conversion will be. Based on the available and reasonably priced analog-to-digital converters on the market, a rough estimate has been made. As shown in Figure 1, it describes a relationship between ADC conversion accuracy and conversion rate.
Research and Analysis on the Selection Scheme of ADC for Electric Energy Measurement
The upper left area of Figure 1 represents easy access, and the bottom area on the right is almost impossible to achieve. The solid line in the middle represents the typical ADC performance that can be provided at a reasonable price in the current market. They are used as a representative of the existing ADC performance and can be used in power quality measurement, such as MAX125.
2.2 Conversion accuracy
For an ADC with a given number of conversion bits, it has a fixed level of data bits that can be discrete for the signal. A 14-bit ADC provides 16 384 discrete levels. If the signal is a bipolar AC signal, the total data bits are usually evenly divided between the positive polarity and the negative polarity. For ADCs, their discrete data levels must be sufficient to include the amplitude of the expected signal, and at the same time, in order of magnitude, uninterrupted, adjacent, and data bits must be small enough to ensure the required degree.
In harmonic measurement, the frequency component of the representative fundamental wave is the content component. Therefore, the dynamic range of the ADC is required to be set in the middle of the basic composition that can accommodate 100%. However, the required accuracy depends on the amplitude to be measured. For the measurement of the harmonic range, its amplitude is determined by the distortion rate. In the national harmonic measurement standards, for the specified distortion rate, the harmonic measurement requires an accuracy of ±5%.
2.3 Conversion rate
The higher the ADC conversion rate, the higher the price. Generally, only low-frequency transient phenomena can be measured by a general-purpose ADC. For ultra-high-frequency transient phenomena, only special equipment can be used for measurement. For the usual low-frequency transient phenomena, a converter with a conversion rate between 10 kHz and 100 kHz is sufficient.
2.4 Sampling method
In harmonic monitoring, several channels of signals are often sampled at the same time. I have done simultaneous sampling of 8 channels of signals. Generally there are the following 3 methods:
(1) Interval scanning method: It is a method of simulating simultaneous sampling. Figure 2 illustrates this interval scanning method.
Research and Analysis on the Selection Scheme of ADC for Electric Energy Measurement
For this method, there is a very small time error ts between sampling two channels. This time error ts is actually the sampling period of the ADC, which is determined by the conversion rate of the ADC. For example, when using an ADC with a sampling speed of 200 kHz, the sampling timing error is 5 μs.
T is the scan period, it is an adjustable value, and it is set according to the measured phenomenon. For the measurement of harmonics up to the 50th order, the scan rate is 5 kHz or T≤200 μs. If it is a 200 kHz ADC, the time error ts of each channel should be kept within 5μs. For the 50th harmonic (50 Hz×50=2.5 kHz, that is, the period is 400μs), its phase error is roughly :(5μs/400μs)×360°=45°. The higher the harmonic order, the greater the angle of error. If an ADC is shared by multiple channels, the timing error is different for each channel and one channel, and it is equal to N×ts, where N is equal to the total number of channels shared by the ADC.
(2) Alternate sampling method: the so-called alternate sampling method. It means to sample 256 points in one cycle of the measured signal during data acquisition, of which 128 odd-numbered points are voltage sampling points, and 128 even-numbered points are current sampling points. The time difference between the sampling voltage and the sampling current is △t=T/256 (T is the measured signal period), and the resulting phase error of the in-phase voltage and current is 360°×f×n×△t, where f is the Measure the signal frequency, n is the harmonic order. From this formula, it can be seen that the phase error increases with the time difference Δt and the harmonic order n.
(3) Synchronous sampling method: The author has adopted the method of synchronous sampling of 4 voltages and 4 currents of the same phase, and time-sharing transmission. This method does not have the problem of time difference, and the phase difference does not exist, but it requires a sample-and-hold circuit for each channel.
3 design examples
Here is a power harmonic monitor based on DSP (TMS320C545). According to the above analysis, the AD chip for data acquisition is a good choice for both Texas Instruments' ADS7864 and MAXIM's MAX125. The latter is used here. Because the three-phase voltage and current of A, B, C are sampled, there are a total of 6 analog input channels. In order to ensure the correct phase relationship between the 6 power frequency signals, the data should be sampled synchronously, and more than one MAX125 can only convert 4 channels Differential signal, so use two MAX125, its data acquisition interface block diagram is shown as in Fig. 3.
Research and Analysis on the Selection Scheme of ADC for Electric Energy Measurement
The two MAX125 a and b are set to 3-channel differential sequential sampling mode. Each MAX125 is connected to a signal conditioning circuit before the analog signal input. Its function is to isolate and anti-aliasing the high voltage of the power grid, and convert the input level to the voltage when the chip is working. This part is not shown in the figure. come out. When this device is performing harmonic analysis, in order to achieve the required measurement accuracy, the 6-channel analog input signal requires no less than 1,024 sampling points in each power frequency cycle, and then leave 512 points as uniform as possible, and then For fast Fourier transform, in order to ensure accuracy, only the first 50 harmonics are taken. This requires that the time for 6-channel signal conversion is less than 20 ms/1 024≈19.5 μs and sufficient margin should be left. Because the signal conversion of each channel of the MAX125 requires 3μs, it takes 3×3μs=9μs to convert the three channels of each MAX125 in turn. So here two MAX125s should be connected in parallel, and they should be activated at the same time, so that they can complete the sampling, holding and conversion of 3 voltages and 3 currents at the same time. It only needs 3×3μs=9μs time, plus the time to read the data. Compared with 19.5μs, there is still a lot of margin. Of course, if two MAX125s are used in "series" working mode, the A/D conversion time is 18μs and less than 19.5μs, but the margin is not enough.
The I/O operating voltage of TMS320C545 is 3.3 V, and the digital terminal operating voltage of MAX125 is 5 V, so a level conversion chip that converts from 5 V to 3.3 V must be added between them. In turn, the signal sent from TMS320C545 to MAX125 It is within the allowable range of MAX125 and will not cause damage, so there is no need to perform level conversion.
4 Conclusion
When measuring electric energy, the AD chip's influence on its accuracy plays an important role. The ADC that measures power quality must have enough dynamic range to meet the amplitude of the signal, while maintaining enough number of bits to obtain the necessary accuracy. Moreover, its sampling rate must be high enough to sample the frequency components in the signal.