1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Úng dụng ví dụ pdf

150 177 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 150
Dung lượng 758,75 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

4.1.2 The Measurement Principle The principle used Reduced Scan Principle measures current and voltage in regular time intervals and multiplies the current and voltage samples.. While th

Trang 1

Application Examples

Several MSP430 application examples are given in the following sections.Common to nearly all of them is the storage of calibration data, tables,constants, etc in the external EEPROMs External EEPROMs are used forsafety reasons If the microcomputer fails completely, it is still relatively easy

to read out the accumulated consumption values This is usually impossible

if these values reside in internal EEPROMs

These EEPROMs can also store tables that describe the principal errors of agiven measurement principle that is dependent on the input value (current,flow, heat etc.) The MSP430, with its excellent table processing capabilities,can determine the right starting value out of these tables and calculate the lin-ear, quadratic or cubic approximation value The following figure shows theprincipal error of a meter The complete range starting at 1% up to 200% is di-vided into sub ranges of different length A stored table would contain the start-ing point, the different distances and the inherent error at the beginning of eachrange With this information, the MSP430 can calculate the error at any point

of the measurement range

Chapter 4

Trang 2

4.1 Electricity Meters

4.1.1 Overview

The MSP430 can be used in two completely different kinds of electronic tricity meters The difference between the two methods is mainly where theelectrical energy

elec-W + ŕU I dt

is measured:

- The electrical energy is measured in a front-end separated from theMSP430 Several methods exist for doing that: Hall effect sensors, Ferra-ris wheel pick-ups, analog multipliers, etc The interface to the MSP430

is normally a train of pulses, where every pulse represents a definedamount of energy (Ws, kWs, Wh) All family members can be used for thispurpose

- The electrical energy is calculated by the MSP430 itself, using its 14-bitanalog-to-digital converter (ADC) for the measurement of current and volt-age Only the MSP430C32x can be used for this purpose

The two different methods are shown in Figure 4–1

32 kHz

32 kHz

Error ms kWh

COM SEL

P0.x P0.y

Figure 4–1 Two Measurement Methods for Electronic Electricity Meters

The second method is mainly used with the electricity meters described in thischapter The unnecessary front end gives a cost advantage when compared

Trang 3

to the two-chip solution An example for the 1st method that uses a front end

is shown at the end of this chapter

4.1.2 The Measurement Principle

The principle used (Reduced Scan Principle) measures current and voltage

in regular time intervals and multiplies the current and voltage samples Themultiplication results are summed up, with the sum representing the con-sumed energy (Ws, kWh) While the method normally used measures voltageand current at exactly the same time, the Reduced Scan Principle (a protected

TI method) alternately measures voltage and current samples Every sample

is used twice; once it is multiplied with the value measured before and oncewith the value measured afterwards To further reduce the required multiplica-tions, these two multiplications are reduced to one by using the sum of the twovoltage samples This measurement principle is shown in Figure 4–3.The following shows the measurement sequence for a single-phase measure-ment Current and voltage are measured alternately The time, α, representsthe angle between related voltage and current samples

Voltage Current Voltage Current

Time 1/ARR

Note:

The Reduced Scan Principle is intellectual property of Texas Instruments.This measurement principle may be used only with the microcomputers pro-duced by Texas Instruments

Trang 4

∆t φ

Figure 4–3 Reduced Scan Measurement Principle

The measured energy W (for a single phase) is:

∆t Sampling interval between appertaining voltage

Trang 5

4.1.2.1 The Inherent Error of the Reduced Scan Principle

The Reduced Scan Principle has a small inherent error caused by the phaseshift ∆t, once inductive and once capacitive, due to the time interval betweenvoltage and current measurements Any calculated energy sample shows thiserror, it is independent of the phase angle ϕ between voltage and current Thevalue, e, of this error is:

Derivation of the inherent error

The flawless equation (except the quantization error) for the electric energy Wis:

Trang 6

un = U × sinωt Voltage sample at time t

in = I × sin(ωt+ϕ) Current sample at time t

un–1 = U × sin(ωt–α) Voltage sample at time t – ∆t

un+1 = U × sin(ωt+α) Voltage sample at time t + ∆t

α Angle in radians between current and voltage samples (α = ω∆t = 2π×f×∆t)

The error e of an energy sample due to the Reduced Scan Principle is:

e + erroneouscorrect * 1

e + 0.5 I sin(ωt) fU )sin(Uωt sin(I ωsin(t*ωαt) f))U) sin(ωt)α) )* 1

e + 0.5 (sin(ωt* asin)ωt sin(ωt)α) )* 1

e + 0.5 (sinωt cosα*sinα cossinωωt)t sinωt cosα)sinα cosωt)* 1

e + 0.5 (2 sinsinωωtt cosα)* 1 + cos α * 1

e + (cos α * 1) 100 + (cos(2 p f ∆ t) * 1) 100

or in percent

This result means that the error of each energy sample calculated with the duced Scan Principle shows a constant value e This inherent error dependsonly on the angle α between the current and the voltage samples; it is indepen-dent of the phase angle ϕ and of the sample point of the measurement insidethe sine wave So for all samples, the same correction can be used

Re-4.1.2.2 The Advantages of the Reduced Scan Principle

1) Only 50% of the measurements are necessary because every measuredcurrent or voltage sample is used twice

2) Only 50% of the multiplications are necessary because two voltage ples are added before the multiplication

sam-3) Only one ADC is needed compared to up to six with the usual method

Trang 7

4) The computing power gained by reducing the number of multiplicationscan be used by the microcomputer for other system tasks The MSP430

is able to do the task of the front-end and of the host computer

5) The Reduced Scan Principle is nearly independent of frequency ations of the ac See Section 4.1.2.4 for results

devi-6) The Reduced Scan Principle is also nearly independent of the interrupt tency time of the microcomputer See Section 4.1.2.5 for results.The Reduced Scan Measurement Principle is implemented in an evaluationboard for a 3-phase meter, which shows a typical error of 0.2%

la-4.1.2.3 Measurement Errors for Some Sampling Frequencies

Table 4–1 gives an overview for the measurement errors dependent on thesampling frequency The inherent error shows the error for the ac frequency(50 Hz or 60 Hz) The 3rd harmonics error shows the corrected measurementerror for the 3rd harmonic of the ac frequency (150 Hz or 180 Hz) The 5th har-monics error shows the corrected measurement error for the 5th harmonic ofthe ac frequency (250 Hz or 300 Hz) For any number of measurements (cur-rent and voltage samples together) for a full period, a rough error estimationcan be made with this table

Trang 8

Table 4–1 Errors Dependent on the Sampling Frequency

Meas rements Sample Frequencies Errors

Measurements

per Full Period Single Phase

(50Hz)

Two Phase (60Hz)

Three Phase (50Hz)

Inherent Error

3rd Harmonic †

5th Harmonic †

† The errors of the harmonics are corrected by the value of the inherent error

‡ Sampling frequencies above 10000Hz are not possible due to the speed of the ADC

(132 ADCLKs/conversion @ ADCLK = 1.5MHz)

4.1.2.4 Measurement Error for Deviations of the AC Frequency

If the ac frequency deviates from the nominal value used during the calibration,then a small error is generated Table 4–2 shows this error dependent on thesample frequency and the ac frequency deviation The introduced error, Fmd,is:

F

md + ǒcos( ∆ t (f ) ∆ f) 2 p )

cos( ∆ t f 2 p ) * 1Ǔ 100

Trang 9

Fmd Error due to the ac frequency deviation from the

∆t Time between related current and voltage samples [s]

f Nominal ac frequency (used during calibration) [Hz]

∆f Frequency deviation of the ac frequency during runtime [Hz]

Table 4–2 Errors dependent on the AC Frequency Deviation

Sample Frequencies Errors Measurement

per full Period Single Phase

(50Hz)

Two Phase (60Hz)

Three Phase (50Hz)f/f = +0.5%f/f = +1.0%f/f = +5.0%

The additional error due to the deviation of the ac frequency can be reduced

to nearly zero by the measurement of the actual ac frequency and an ate correction of the calculated energy

appropri-4.1.2.5 Measurement Error Dependent on the Interrupt Latency Time

The calibration of an electricity meter is made normally in an environment out interrupt activity This can be completely different to the real time environ-ment where the meter has to measure the electric energy later Therefore theinterrupt latency time (here the time the interrupt request of the sampling timebase is delayed by other interrupts) can have an influence on the accuracy ofthe measurement Table 4–3 shows the errors introduced by different interruptlatency times The calibration is made with a maximum interrupt latency time

with-of 5µs (due to missing interrupt activities): this is the maximum delay caused

by the completion of the current instruction (indexed,indexed mode) withMCLK = 1MHz The conditions used for the simulations of Table 4–3 are:

- The simulation conditions are the same ones as described in section 4.1.3except where noted otherwise

- The given interrupt latency times are the maximum values; each voltageand current sample is delayed by a random time interval ranging betweenzero and this maximum value

- The ADC is assumed to be error-free (except the range transition error),this way only the influence of the interrupt latency time is shown

Trang 10

- For other values of MCLK than 1MHz , the shown latency times are notgiven in microseconds but CPU cycles.

- The used current is 100% except for the last line (1%)

- The measurement time is 20 seconds

Table 4–3 Errors dependent on the Interrupt Latency Time

Meas rement Single Maximum Interrupt Latency Time

Measurement

per Full Period

Single Phase (50 Hz)

5 µs (Calibr.) 20 µs 40 µs 80 µs 160 µs

† Interrupt latency time is greater than sampling interval

Table 4–3 shows the extreme low influence of the interrupt latency time: evennon-realistic high latency times like 160 µs result in negligible influence Thismeans that the Reduced Scan Principle is not sensitive to the interrupt latencytime of the system

Note:

The errors shown in Table 4–3 are won by the use of random values for theinterrupt latency time Despite the relatively long simulation time (20 sec-onds) every simulation made under exactly the same conditions returnedtherefore a slightly different error

4.1.2.6 Measurement Error Due to Overvoltage and Overcurrent

With the simulation conditions described in Section 4.1.3, The tal Converter of the MSP430C32x, the ADC measures up to 111% of the maxi-mum current or voltage without additional error It is important to know how theelectricity meter behaves if the input values are above these limits: there must

Analog-to-Digi-be a smooth transition and no oscillations or sudden changes Due to the ration the ADC shows for overflow and underflow, the errors shown in Table4–4 result The ADC is assumed to be error-free (with the exception of therange transition error), so only the effect of the overflow is shown

Trang 11

satu-Table 4–4 Errors dependent on Overvoltage and Overcurrent

Load Current 100% Vnom 110% Vnom 120% Vnom 130% Vnom

4.1.3 The Analog-to-Digital Converter of the MSP430C32x

The analog-to-digital converter (ADC) of the MSP430 measures the voltagebetween its AVss and SVcc connections with a resolution of 14 bits Thesigned voltages coming from the current and voltage interfaces are shifted intothe unsigned range of the ADC by simple interfaces described below TheMSP430 subtracts the measured or calculated offset value from every mea-sured current or voltage sample: this enables signed, offset corrected mea-surements

Time

95% SVCC

100% Current

5% SVCC 100% SVCC

AVSS

3FFFh

0000h

100% Voltage

ADC Value (Steps)

Figure 4–4 Allocation of the ADC Range

Figure 4–4 shows the placement of the current and voltage coming from thevoltage dividers and the current interfaces into the analog-to-digital convert-er’s range All calculations and proposals base on a use of 90% of the ADCrange for nominal (100%) values of current and voltage This means up to111% of the nominal values are still measured correctly This allocation may

be changed if necessary

Table 4–5 shows the influence of the analog-to-digital converter’s mance to the accuracy of the measurement of the electric energy Two in-fluences are involved:

perfor-1) The deviation of the ADC from the linearity Each one of the four ranges

A, B, C and D has calculated deviations up to 20 ADC steps compared tothe two ranges bordering on it

Trang 12

2) The saturation effect at the range limits: if the sample for the definition ofthe range is taken in another range than the sample for the 12-bit conver-sion (36 ADCLKs later) than the result is xFFFh for increasing input signalsand x000h for decreasing input signals (x denotes the number of the rangewhere the range sample was taken) As the results show, the two satura-tion effects compensate nearly to zero.

Note:

The deviations of the analog-to-digital converter used with the examples low (±20 steps) are greater than the specified ones These large deviationsare used only to show the relative independence of the overall accuracy fromthe ADC error The actual, specified deviations are ±10 steps

be-It is recommended not to use the exact midpoint of the supply voltage Vcc(Vcc/2) for the common reference point This is due to the possible slightslope deviation at the border of two ADC ranges (here B and C) This mayinfluence the accuracy for the lowest currents

Table 4–5 shows also the influence for some extreme deviations of the to-digital converter characteristic Figure 4–5 explains the meaning of the usedgraphics: it shows the second deviation curve of Table 4–5 in detail

analog-Range C Range D

ADC Value Range A Range B

20

–20

ADC Error (Steps)

Figure 4–5 Explanation of ADC Deviation (2nd Column of Table 4–5)

Trang 13

The function shows the deviation at any point of the four ADC ranges Due tothe monotony of the ADC the errors at the range limits are always equal Theerrors shown in Table 4–5 were calculated with a PASCAL program The fol-lowing steps were taken:

1) Measurement and calculation of the error at 5% of the nominal current.2) Measurement and calculation of the error at 100% of the nominal current3) Calculation of the slope and offset for the correction (calibration)4) Simulation of voltage and current samples: any sample is modified withthe ADC error (exactly like during calibration)

5) Correction of all measured values with the calculated slope and offset6) Calculation of the resulting error

The saturation effect at the range limits is always included The first column

of Table 4–5 with an ideal ADC characteristic (zero deviation) shows only thiseffect and the finite ADC resolution This column can be used as a referencefor the errors of the other five columns

The calculations are made with the following conditions:

- Virtual Ground location in the ADC range: 8190 steps (1FFEh) 49.98% of full ADC range

- Measurement time for calibration points: 5s (calibration points are measured this time)

- Measurement time for different loads: 9s

Note:

The drawings on top of the columns of Table 4–5 indicate the ADC error independence of the ADC value Figure 4–5 shows the drawing above the sec-ond column in a magnified form

Trang 14

Table 4–5 Errors With One Current Range and Single Calibration Range

4.1.3.1 Methods to reduce the Error of the Energy Measurement

Three relatively simple methods are given to reduce the error of the energymeasurement In any case, the values used for the correction are stored in theEEPROM and are loaded into the RAM during the initialization

Using a Second Hardware Range

This method is shown with all hardware examples An analog switch like theTLC4016 switches a second resistor in parallel to the one used for the low cur-rent range Both ranges uses its own set of calibration constants (slope andoffset) that are measured during two independent calibration runs for everyphase The advantage of this method is the real increase of resolution for thelow current range

Using a Second Calibration Range

This method only uses a second set of calibration constants (slope and offset)without additional hardware for the low current range (e.g., from 0.1% to 5%

of the nominal current) This method needs two calibrations per phase, butuses only three measurements (one measurement is used for both ranges)

Trang 15

Table 4–6 shows the enhancement of the accuracy when a second calibrationrun is made for the low current range, 0.1% to 5% of the nominal value Thecalculations are made with the same conditions used with Table 4–5 The en-hancement can be seen with a comparison of the two tables The errors, forthe range 5% to 100% of the nominal current, are the same as shown inTable 4–5.

Table 4–6 Errors With One Current Range and Two Calibration Ranges

Measurement of the ADCs Characteristic

This method uses the actual deviations of the ADC for a rough correction ofthe measurement results During a first run, the ADC characteristic is mea-sured and correction constants are calculated for any of 8 to 32 software sub-ranges of the ADC These correction constants are written into the EEPROMand loaded into the RAM for use For every subrange, one byte is needed,which allows corrections up to ±127 steps The correction for the samplesneeds only seven instructions per 14-bit value The advantage of this method

is the adaptation to the actual deviation of the individual ADC Figure 4–6shows the correction with the ADC characteristic using only 8 correction val-ues The deviations reduce to one quarter of the original ones If the correctionshows a step near the virtual zero point like shown in Figure 4–6, the sub-ranges B1 and C0 can be corrected in a way that omits this step Chapter 2,The Analog-To-Digital Converters gives more information

Trang 16

Subrange D1

Correction Values For The Subranges

Correction Value Subrange D1

Figure 4–6 Use of the Actual ADC Characteristic for Corrections (8 Subranges Used)

4.1.3.2 Dependence on the Voltage and the Phase Angle ϕ

Table 4–7 shows the dependence of the MSP430 using the Reduced ScanPrinciple on the load current, the ac voltage and the phase angle, ϕ, betweencurrent and voltage The ADC is assumed to be error-free; the saturation effect

at the range limits is included Single calibration with only one range is used.Nominal voltage is used for the load current dependence and nominal current(100%) is used with the voltage dependence The calculations are made withthe same conditions used for the calculations in Table 4–5

Table 4–7 Errors in Dependence on Current, Voltage and Phase Angle

4.1.3.3 Derivation of the Measurement Formulas

The electronic meter equivalent of the meter constant of a Ferraris wheel ter (revolutions per kWh) is the meter constant, CZ, that defines (ADC steps)2per Ws The corrected equation used for the electric energy W is:

Trang 17

With the ADC results ADCi (current sample) ADCu (voltage sample) andADC0u and ADC0i (zero volt samples) the previous equation gets:

W + cos(2p 1 f ∆t) tȍ+R

t + 0

ki ǒADCin*ADC0iǓ ku ǒADCun* 1 ) ADCun) 1 * 2 ADC0uǓ ∆ t

Separation into variable and constant values results in:

∆t Sampling interval between appertaining

See Section 4.1.4.5 for more details

See section 4.1.4.6 for more detailsADCin ADC value of current sample taken at time tnADCun–1 ADC value of voltage sample taken at

time tn–1 (tn – ∆t)ADCun+1 ADC value of voltage sample taken at time

tn+1 (tn + ∆t)ADC0u ADC value of voltage zero point (measured or calculated)ADC0i ADC value of current zero point (measured or calculated)

The first, constant part of the equation is the inverse value of the meterconstant ,CZ:

Trang 18

Rsec Load resistor (secondary) of the current

wsec Secondary windings of the current transformer

wprim Primary windings of the current transformer

SVCC Voltage at terminal SVCC (AVCC or external

Rm Voltage divider: resistor between ac connection

Rc Voltage divider: resistor between analog input

The first, constant part of the equation is the inverse value of the meterconstant CZ:

2 wsec (Rm ) Rc)

4.1.4 Analog Interfaces to the MSP430

This chapter describes some important topics that can affect the overall racy of the electricity meter

accu-4.1.4.1 Analog and Digital Grounding

The following schematics are drawn in a simplified manner to make them

easi-er to undeasi-erstand In reality, it is necessary to decouple the analog and the tal part as shown in Figure 4–7 This is to avoid digital noise on the analog sig-nals to be measured

Trang 19

A1 A0 Current

AVSS AVCC

MSP430C323 REXT

To Other Digital Parts

Figure 4–7 MSP430 14-Bit ADC Grounding

4.1.4.2 ADC Input Considerations

The ADC accurately operates up to 1.5 MHz If the processor clock MCLK ishigher than this frequency, it is recommended that one of the prescaled ADCclocks (ADCLK) be used The possible prescaled frequencies for the ADCLKare MCLK, MCLK/2, MCLK/3 and MCLK/4

The sampling of the ADC to get the range information takes 12 ADCLK cycles.This means, the sampling gate is open during this time (12 µs at ADCLK = 1MHz) The input of an ADC terminal can be seen as an RC low-pass filter, 2

kΩ together with 42 pF The 42-pF capacitor must be charged during the 12ADCLK cycles to the final value in order to be measured This means chargedwithin 2–14 of this value This time limits the internal resistance RI of the source

to be measured:

(Ri ) 2 k W ) 42 pF t 12

In 214 ADCLK

Solved for RI, the result is 27.4 kΩ This means, to get the full 14-bit resolution

of the ADC, the internal resistance of the input signal must be lower than 27.4

kΩ The given examples use lower source resistances at the ADC inputs

Trang 20

4.1.4.3 Offset Treatment

If the voltage and current samples contain offsets, the equation for the sured energy W is:

mea-W + tȍ+R t+0

un Sum of the two voltage samples un–1 and un+1 [V]

The terms (un× Oi)and (in× Ou) get zero when summed-up over one full period(the integral of a sine curve from 0 to 2π is zero) but the term (Oi× Ou) is addederroneously to the sum buffer with each sample result If one of the two offsetscan be made zero then the error term (Oi × Ou) is eliminated: this is the casefor all proposals Two different ways are used:

- Voltage representing 0V is measured (see Sections 4.1.4.4.1 and4.1.4.4.2)

- Summed-up ADC value for a full period is used for this purpose (see tion 4.1.4.4.3)

Sec-4.1.4.4 Adaptation to the Range of the Analog-to-Digital Converter

The analog-to-digital converter of the MSP430 is able to measure unsignedvoltages ranging from AVss up to the reference voltage applied to the inputSVcc If signed measurements, as for electricity meters, are necessary then

a virtual zero point must be provided Voltages above this zero point aretreated as positive ones, voltages below it are treated as negative voltages

A few possibilities are shown how to provide this virtual zero point For moreinformation see Section 3.8, Power Supplies for the MSP430

Split Power Supply

To get a common reference voltage in the middle of the ADC’s voltage range,two voltage regulators with output voltages of +2.5 V and –2.5 V can be used

In this case, the common zero connection is the reference for all current andvoltage measurements This zero point is connected to one of the analog in-puts (A0 in Figure 4–8) The measured ADC value of this reference voltage is

Trang 21

subtracted from every voltage and current sample This way signed, offset rected measurement values are generated.

cor-The schematic is shown in Figure 4–8

Figure 4–8 Split Power Supply for Level Shifting

Use of a Virtual Ground IC

A virtual ground IC can be used to get a measurement reference in the middle

of the ADC range The TLE2426 is used for this purpose All current and age inputs are referenced to the virtual ground output of this circuit The mainadvantage is the ability to measure the ADC value of this reference without theneed to switch off the voltage and current inputs

volt-The measured value (at analog input A0), is subtracted from every measuredcurrent or voltage sample, which generates signed, offset corrected results(see Figure 4–9)

Typical electrical characteristics of the TLE2426:

Output Current Capability ±20 mA For sink and sourcePower Rating at 25_C 725 mW For the Small Outline PackageDerating Factor above 25_C 5.8 mW/_C

Trang 22

Figure 4–9 Virtual Ground IC for Level Shifting

Resistor Interface (Software Offset)

This method uses the fact that the integral of a sine curve is zero, if integratedover the angle 2π Two counters add up the ADC results separately for eachvoltage and current signal These counters contain the two offsets (in ADCsteps) after a full period of the ac frequency These offsets are subtracted fromthe appertaining ADC samples The results are signed, offset corrected sam-ples The current and voltage signals are shifted into the middle of the ADCrange by simple voltage dividers or with the help of the internal current source

Without A Current Source

The necessary shift of the signed voltage and current signals is made by tor dividers The resistor divider of the voltage part is also used for the adapta-tion of the ac voltage to the ADC range The current part allows two (or more)current ranges With the closed range switch, high currents can be measured.With the switchopen, a better resolution for the low currents is possible No dcflows through the current transformer due to the high input resistance of theADC inputs

Trang 23

A1 A0

AVSS DVSS DVCC

0 V 5 V MPS430C32x

AVCC

5 V

TLC4016i Range Switch

22 k

1.6 M

230 V Iload

0 V

22 k

Figure 4–10 Resistor Interface Without Current Source

With A Current Source

Four ADC inputs can be used with the internal current source A current, fined by an external resistor Rex, is switched to the ADC input and the voltagedrop at the external circuitry is measured with the ADC This current is relative

de-to the reference voltage SVcc and delivers constant results also with differentvalues of SVcc If a second current range is needed, a reed relay is needed

to switch the second load resistor of the current transformer

Trang 24

A0 REXT

AVSS DVSS DVCC

230 V Iload

0 V

A1 ICS

4.1.4.5 Current Measurement

The main problem of the current measurement is the large dynamic range ofthe input values; ranging from 0.1% up to 1000% of the nominal value Thecommon methods used to solve this problem are shown in Figure 4–12 andare explained in the following text If range switches are used, it is recom-mended that a hysteresis for the range selection criteria be used

Trang 25

put voltage VOut, which is proportional to the current IL, is measured by theMSP430 The amount of VOut is:

Vout + *I

load Rshunt

R2 R1

Vout + *I

load Rshunt

R2| | R3 R1

(open switch, low current)

(closed switch, high current)

The value ki [A/step], used for the calculation of the meter constant CZ (seeSection 4.1.3.3) is:

ki + *SVCC

214

R1 R shunt R2

(open switch, low current, see Figure 4–12)

(closed switch, high current)

ki + *SVCC

214

R1 R

J High losses with high currents

J Very low output voltage with small currents (amplifier necessary)

J Only usable with single-phase meters

Trang 26

2.5 V

R2 Wsec

Neutral

Load Load

RSHUNT

_ + R1

R1 –2.5 V

flows through a resistance Rsec (the resulting resistance of the two resistorsR2 and R3) and generates a voltage VOUT, which is measured by the MSP430:

Vout +

w prim wsec Iload Rsec

Where:

Rsec = R2 (switch open, low currents)Rsec = R2||R3 (switch closed, high currents)The value ki [A/step], used for the calculation of the meter constant CZ (seeSection 4.1.3.3) is:

ki + *SVCC

214

wsec Rsec w

Trang 27

J More than one range possible with switched resistors

Vfc + dIloaddt L

This means, the voltage Vfc has a leading phase shift of 90_ compared to Iload.This phase shift can be corrected by two methods:

1) Software shift: All current samples are delayed by the time representing

90_ of the ac frequency This is possible with a circulating buffer and acarefully chosen sampling frequency

2) Analog shift: An integrator combined with a pre-amplifier is used as shown

J Isolation from the ac

J No saturation possible by dc parts of the load current due to the air gap

- Disadvantages

J Low output voltage due to loose coupling

J Output voltage leads 90_ compared to load current

Trang 28

J Fast load current changes cause relatively high output voltages (di/dt)

J Circular buffering or amplification and integration necessary

_

+ WSENSE RSENSE

Ferrite

Core

Range

0 V RSEC

VIC

0 V

0 V

R1 2.5 V

–2.5 V

C1 R2

Ferrite Core

Ferrite Core

Air-Core Coil ILOAD

Wsec

Figure 4–13 Current Measurment With a Ferrite Core

Compensated Ferrite Core

The load current Iload flows through a closed ferrite core with a primary ing wprim (normally a single winding) The magnetic flux created by the primarywinding is sensed by the sensor winding wsense The voltage of the sensewinding is amplified and the output current of the amplifier is sent through thesecondary winding wsec in a way that compensates the primary flux to (nearly)zero This means that the driving of the resistor Rsec is made by the amplifierand not by the ferrite core The compensated ferrite core shows only negligibleerrors It is only necessary to distribute the two windings in a very equable wayover the entire core (not as it is shown in Figure 4–13 for simplicity) Additionalcurrent ranges are possible with switched resistors in parallel with Rsec Theoutput voltage Vout is:

wind-Vout + I

load Rsec

w prim wsec )wsensev Rsec

Rsense

The term wsense× Rsec/v × Rsense is the remaining error of the compensatedferrite core

Trang 29

The value ki [A/step], used for the calculation of the meter constant CZ (seeSection 4.1.3.3) is (the error term is not included due to its low value):

ki + *SVCC

214

1 Rsec

wsec w prim

PR

WSEC WPRIM

0 V VAC

Resistor Divider Voltage Transformer

Figure 4–14 Voltage Measurement

Trang 30

isola-The amount of Vsec is:

w prim wsec [V/step] (see Figure 4–14)

4.1.5 Single-Phase Electricity Meters

The next two electronic electricity meter proposals are made for the ment of European ac From the utility, one phase and ground are wired into thehouse In this way a nominal voltage of 230 V is available

measure-The reduced scan principle is applied exactly as described in Section 4.1

To measure the electric energy consumed, a current transformer or a shuntresistor is necessary, both solutions are shown The voltage of the phase isalso measured With this configuration, the energy consumption of the loadcan be measured exactly

The measurement sequence for a single-phase meter is shown in Figure 4–2.The ADC of the MSP430 measures the voltage between the AVss and SVccconnections with a resolution of 14 bits To shift the signed voltages coming

Trang 31

from the current transformer and voltage divider into the unsigned range of theADC, a split power supply with +2.5 V and –2.5 V is used The common ground

of the two power supplies has a voltage of one-half of the voltage SVcc Thisvoltage is used as a base for the ADC voltages The MSP430 measures thisbase voltage at regular intervals and subtracts it from every measured current

or voltage sample In this way, signed measurement is possible

To have a reference for the measurements a reference diode LM385–2.5 isused The voltage of this diode is measured in regular intervals and the mea-sured value is used as a base for the SVcc relative ADC measurements

4.1.5.1 Current Measurement With a Shunt

The solution which uses a shunt resistor for the measurement of the load rent is shown in Figure 4–15 The load current Iload flows through the shunt,which has a resistance of approximately 1.0 mΩ The voltage drop at the shunt

cur-is amplified and measured by the MSP430 The output voltage Vout seen at theADC of the MSP430 is like described in Section 4.1.4.5.1

If needed, additional current ranges can be implemented (three analogswitches of the TLC4016 are not used)

A backup battery allows the time information (provided by the basic timer) to

be kept and is also used during power-down periods All current-consumingperipherals may be switched off Therefore; the reference diode, the rangeswitch, and the amplifier are switched off by the SVcc output The EEPROM

is switched off with a TP–output

A prepayment interface is connected to the MSP430 It allows the ac to beswitched on after the insertion of a valid prepayment card

Trang 32

Error kW kWh

COM SEL

DATA

VCC EEPROM TP.2

P0.0

P0.2

TSS721 MBUS P0.1

TXD

RCV P0.3 IR-IF

P0.4

Key 2.5 V

P0.5 Pulse Ws DVSS DVCC

–2.5 V Backup Battery 2.5 V

–2.5 V

LMx85 Uref

I/Os Pre-Payment

Interface

TP.3 Power Relay

AVSS –2.5 V

A4 Reference

A5

82 kΩ

33 kΩ Current A0

A1 Voltage TP.0 SVCC

AVCC 2.5 V

Live

Neutral

Load ILOAD

RSHUNT

_ +

4.7 MΩ

1 kΩ SVCC Vout

–2.5 V

170 kΩ

Range Switch

0 V

1 kΩ

Figure 4–15 Single-Phase Electricity Meter With Shunt Resistor

4.1.5.2 Current Measurement With a Current Transformer

The solution, which uses a current transformer for the measurement of theload current, is shown in Figure 4–16 The secondary current Isec of the trans-former flows through two paralleled resistors and generates a voltage Vsecwhich is measured by the MSP430 For currents greater than a certain value,the resistor with the lower value is switched on by the analog switch TLC4016.For low currents, this switch is opened to get a higher voltage and, therefore,

a better resolution The range switch algorithm uses a certain hysteresis toavoid too much switching

Trang 33

If needed, additional current ranges can be implemented with the three analogswitches of the TLC4016 that are not used.

An AC Down signal out of the power supply connected to the interrupt I/O minal P0.6 allows the MSP430 to save important values (i.e., energy con-sumption) in the EEPROM in case of a power-fail See Section 5.7, BatteryCheck and Power Fail Detection

ter-The RF-readout module is connected to free outputs; this can be an unusedsegment line, a TP output, or an I/O pin of Port0 The timing for the RF readout

is made by the internal Basic Timer It delivers the needed interrupt cies The supply voltage needed for the RF interface is done with a step-upvoltage supply It transforms the available 5 V to 6 V or more

frequen-Error kW kWh

COM SEL

DATA

VCC EEPROM P0.0

P0.2

TSS721 MBUS P0.1

TXD

RCV P0.3 IR-IF

P0.4

Key 2.5 V P0.5 Pulse Ws DVSS DVCC

2.5 V –2.5 V

LMx85 Uref

P0.6

Ac Down

AVSS –2.5 V

A4 Reference

A5

82 kΩ

A1 Voltage TP.0 SVCC

AVCC 2.5 V

–2.5 V

Set-Up-Frequency RF-Interface

RF-Antenna 3.5 V

Figure 4–16 Single-Phase Electricity Meter With Current Transformer and RF Readout

Trang 34

4.1.5.3 Calculations

For four single-phase versions, the typical values are calculated:

- Version with minimum current consumption (low CPU and ADC speed)

- Compromise between current consumption and resolution (medium CPUspeed, medium ADC speed) The basic timer is used for the time base

- Compromise similar to 2, but with the use of the universal timer/port ule for the time base

mod Version with high resolution due to sampling speed If necessary, the ADCClock can be up to 1.5 MHz

Table 4–8 Typical Values for a Single-Phase Meter

ITEM CONSUMPTION MINIMUM COMPROMIZE 1 COMPROMIZE 2 RESOLUTION HIGH

Phase Repetition Time (2/ARR) 1098.63 µ s 976.56 µ s 549.32 µ s 305.18 µ s

Approx Icc (nominal) for

† ADC conversions per complete mains period (voltage and current samples)

‡ The Inherent Error—a constant value—is compensated with the calibration values

§ Time from ADC interrupt acknowledge until next conversion is started (after 22 MCLKs)

¶ One signed multiplication per phase repetition time; 160 cycles for each one

Trang 35

4.1.6 Dual-Phase Electricity Meters

The measurement sequence for a dual-phase electricity meter is shown in Figure 4–17

Time

1/ARR Repetition Time

α

Figure 4–17 Timing for the Reduced Scan Principle (Dual-Phase Meter)

Where:

Repetition Time 1/Phase Repetition Rate

Length of a Complete Measurement Cycle

Two electronic electricity meters are shown, designed for the measurement of

US domestic ac As power connections, two phases and a neutral line are ledinto the house This enables the use of two voltages: 120 V and 240 V

To measure the electric energy used, two current transformers are necessary.The voltage of each phase is measured directly With this configuration, theenergy consumption of any load connection can be measured exactly Loadsfrom any phase to neutral (120 V) are measured as well as loads connectedbetween the two phases (240 V)

4.1.6.1 Current Measurement With Current Transformers and Virtual Ground IC

A solution which uses two current transformers for the measurement of theload currents is shown in Figure 4–18 The secondary current Isec of the trans-former flows through two parallel resistors and generates a voltage Vsec, which

is measured by the MSP430 For currents greater than a certain value, the sistor with the lower value is switched on by the analog switch TLC4016I Forlow currents this switch is opened to get a higher voltage and, therefore, a bet-ter resolution The range switch algorithm used has a certain hysteresis toavoid too much switching

re-The virtual ground IC delivers a voltage exactly in the middle between SVccand AVss All measurements refer to this potential The virtual ground voltage

Trang 36

itself is measured with the analog input A5 and the measured value is tracted from each voltage and current sample.

sub-If needed, additional current ranges can be implemented with the two analogswitches of the TLC4016 that are not used

A backup battery allows the time information (provided by the basic timer) to

be kept during power-down periods All current-consuming peripherals can beswitched off; the reference diode, the range switches, the virtual ground withthe SVcc output, and the EEPROM with a TP output

Error kW kWh

COM SEL

DATA

VCC EEPROM P0.0

P0.2

TSS721 MBUS P0.1

TXD

RCV P0.3 IR-IF

P0.4

Key 2.5 V P0.5 Pulse Ws DVSS DVCC

5 V

0 V LMx85 Uref

TP.1

AVSS

0 V

A4 Reference A5

82 kΩ

A0 Current A1 Voltage

TP.3

A2 A3

32 kHz

Figure 4–18 Dual-Phase Electricity Meter With Current Transformers and Virtual Ground

Trang 37

4.1.6.2 Current Measurement With Current Transformers and Software Offset

Figure 4–19 shows a two-phase electricity meter that uses voltage dividers toget reference voltages in the middle of the supply voltage for current and volt-age inputs The resistors of this voltage dividers are chosen to be smaller thanthe maximum source impedance of the ADC (see Section 4.1.4.2, ADC InputConsiderations) To get the ADC value of the virtual midpoint of the ADC range,the software offset method is used (see Section 4.1.4.4.3, Resister Interface(Software Offset)) This value is subtracted from each voltage and currentsample to get signed, offset-corrected results

No backup battery is provided This means, that in regular time intervals, theactual amount of the energy consumption needs to be stored in the EEPROM

If the power supply used provides an ac down, this storage is only neededwhen this signal is activated

An ac down signal from the power supply connected to the interrupt I/O nal P0.6 allows the MSP430 to save important values (i.e., energy consump-tion) in the EEPROM in case of a power failure (see Section 5.7, Battery Checkand Power Fail Detection)

Trang 38

termi-Error kW kWh

COM SEL

DATA EEPROM P0.0

P0.2

TSS721 MBUS P0.1

TXD

RCV P0.3 IR-IF

P0.4

Key 2.5 V P0.5 Pulse Ws DVSS DVCC

5 V

0 V LMx85 Uref

TP.1

AVSS

0 V

A4 Reference

A2 A3 2x1.9 MΩ

For three dual-phase versions, the typical values are calculated:

- Version with minimum current consumption

- Compromise between current consumption and resolution

- Version with high resolution due to sampling speed If necessary, the ADCClock can be set up to 1.5 MHz (see Table 4–10)

Trang 39

Table 4–9 Typical Values for a Dual-Phase Meter

ITEM MINIMUM

CONSUMPTION COMPROMISE

HIGH RESOLUTION

Phase Repetition Time (4/ARR) 1098.63 µ s 854.5 µ s 610.35 µ s

Time between interrupts 1/ARR 274.7 µ s 213.6 µ s 152.6 µ s

† ADC conversions per complete ac cycle and phase (voltage and current samples)

‡ The Inherent Error, a constant value, is compensated with the calibration values

§ Time from ADC interrupt acknowledge until next conversion is started (after 22 MCLKs)

¶ Two signed multiplications per phase repetition time; 160 cycles for each one

4.1.7 Three-Phase Electricity Meters

Two electronic electricity meters are discussed and designed for the ment of European domestic ac As power connections, three phases and aneutral connection are led into the house This enables the use of two voltages:

measure-230 V (phase to neutral) and 400 V (phase to phase)

To measure the electric energy used, three current transformers or ferritecores are necessary The voltage of each phase is measured directly With thisconfiguration, the energy consumption of any load connection can be mea-sured exactly Loads from any phase to neutral (230 V) are measured as well

as loads connected between the phases (400 V)

Trang 40

The measurement sequence is shown in Figure 4–20.

Time

1/ARR Repetition Time

α

Figure 4–20 Normal Timing for the Reduced Scan Principle (Three-Phase Meters)

Where:

Repetition Time 1/Phase Repetition Rate

Length of a Complete Measurement Cycle

If a more evenly spaced sequence is desired (i.e., for better distribution of themultiplications), the following sequence can be used Current and voltagesamples are made alternating

Time

1/ARR Repetition Time

α

Figure 4–21 Evenly Spaced Timing for the Reduced Scan Principle (Three-Phase Meters)

4.1.7.1 Current Measurement With Ferrite Cores and Software Offset

Figure 4–22 shows a three-phase electricity meter that uses voltage dividers

to get reference voltages in the middle of the supply voltage for each voltageinput The resistors of these voltage dividers are chosen to be smaller than themaximum source impedance of the ADC (see Section 4.1.4.2, ADC Input Con-siderations) To get the ADC value of the virtual middle of the ADC range, thesoftware offset method is used This value is subtracted from each voltage andcurrent sample to get signed, offset-corrected results The range is selected

by different amplifications of the coil preamplifier

Ngày đăng: 24/07/2014, 04:20

🧩 Sản phẩm bạn có thể quan tâm

w