Você está na página 1de 12

Three Phase Power Meter Simulation with Dummy ADC Values

User supplied inputs are in BLUE


Ouputs are YELLOW
Meter Rating
Maximum Current (ARMS)
Maximum Voltage (VRMS)
Calibrate other phases to phase (A, B, or C):
Output Pulse CF for Active Power
Meter Constant (imp/kWh)
Max CF Output (imp/s)

100
220
A
6400
39.111

CF Pulse Width (sec)


Current Transformer Phase Error (degrees)

0.09
1.0

Calibration Frequency (Hz)


Calibration Current (ARMS)
Calibration Voltage (VRMS)
Calibration Power Factor
Calibration Power Factor to Degrees
Calibration Line Cycles (1, 2, 4, 8, , 256)
CF Output (imp/s)
Phase A
ADC RMS Value at Maximum Current (LSB)
ADC Current Offset (LSB)
ADC RMS Value at Maximum Voltage (LSB)
ADC Voltage Offset (LSB)
Phase B
ADC RMS Value at Maximum Current (LSB)
ADC Current Offset (LSB)
ADC RMS Value at Maximum Voltage (LSB)
ADC Voltage Offset (LSB)
Phase C
ADC RMS Value at Maximum Current (LSB)
ADC Current Offset (LSB)
ADC RMS Value at Maximum Voltage (LSB)
ADC Voltage Offset (LSB)
Resolution Adjuistment
Current A/LSB Size
Voltage V/LSB Size
Active Power WHr/LSB
Apparent Power VAHr/LSB

55
10
220

16510
0
16232
0
16510
0
16232
0
16510
0
16232
0

Min (sec)
0.0011363636

DC Values

Max (sec)
0.2897727273
Cal Step 1
Value

Cal Step 2
Value

Cal Step 3
Cal Step 4
Value
Value
0.1
1
220
22
0.9998476952 0.9998476952
1
1
128
16
0.0391111111 0.0391111111

10
220
0.9998476952
1
16
3.9111111111

10
220
0.4848096202
61
16
3.9111111111

1651
1651
16232
16232

800
800
16232
16232

17
17
16232
16232

165
165
1623
1623

1651
1651
16232
16232

800
800
16232
16232

17
17
16232
16232

165
165
1623
1623

1651
1651
16232
16232
Method
Calculated
Calculated
Calculated
Calculated

800
800
16232
16232
Calculated
0.1
0.1
0.001
0.001

17
17
16232
16232
Manual
0.01
0.1
1
1

165
165
1623
1623
Final
0.10
0.10
0.001
0.001

Calibration Registers
Registers shown in gray are not implemented for now
Register
Name

PIC
Address

Size
(bits)

Default
Value

Calculated
Value

PHA_DELAY

0x140

46

PHB_DELAY

0x141

46

PHC_DELAY
Reserved

0x142
0x143

8
8

0
0

46
0

PHA_I_RMS_OFF

0x144

16

33

PHA_V_RMS_OFF

0x146

16

655

PHB_I_RMS_OFF

0x148

16

33

PHB_V_RMS_OFF

0x14A

16

655

PHC_I_RMS_OFF

0x14C

16

33

PHC_V_RMS_OFF
PHA_I_RMS_GAIN
PHA_V_RMS_GAIN
PHB_I_RMS_GAIN
PHB_V_RMS_GAIN
PHC_I_RMS_GAIN
PHC_V_RMS_GAIN
NEUT_I_RMS_GAIN
NEUT_V_RMS_GAIN

0x14E
0x150
0x152
0x154
0x156
0x158
0x15A
0x15C
0x15E

16
16
16
16
16
16
16
16
16

0
16384
16384
16384
16384
16384
16384
16384
16384

655
16384
16384
16384
16384
16384
16384
16384
16384

PHA_I_RMS_GLSB

0x160

16

32767

1985

PHA_V_RMS_GLSB

0x162

16

32767

4441

PHB_I_RMS_GLSB

0x164

16

32767

1985

PHB_V_RMS_GLSB

0x166

16

32767

4441

PHC_I_RMS_GLSB

0x168

16

32767

1985

PHC_V_RMS_GLSB
NEUT_I_RMS_GLSB
NEUT_V_RMS_GLSB

0x16A
0x16C
0x16E

16
16
16

32767
32767
32767

4441
32767
32767

PHA_W_OFF

0x170

32

-1018072

PHB_W_OFF

0x174

32

-1018072

PHC_W_OFF

0x178

32

-1018072

PHA_W_GAIN

0x17C

16

16384

16384

PHB_W_GAIN

0x17E

16

16384

16384

PHC_W_GAIN

0x180

16

16384

16384

PHA_W_GLSB

0x182

16

32767

1345

PHB_W_GLSB

0x184

16

32767

1345

PHC_W_GLSB

0x186

16

32767

1345

PHA_VA_GAIN

0x188

16

16384

16384

PHB_VA_GAIN

0x18A

16

16384

16384

Limit
Error

PHC_VA_GAIN

0x18C

16

16384

16384

PHA_VA_GLSB

0x18E

16

32767

1345

PHB_VA_GLSB

0x190

16

32767

1345

PHC_VA_GLSB
PHA_VAR_GAIN
PHB_VAR_GAIN
PHC_VAR_GAIN
PHA_VAR_GLSB
PHB_VAR_GLSB
PHC_VAR_GLSB
ENERGY_W_GLSB
ENERGY_VA_GLSB
ENERGY_VAR_GLSB
CREEP_THESH
CF_PULSE_WIDTH
Reserved

0x192
0x194
0x196
0x198
0x19A
0x19C
0x19E
0x1A0
0x1A2
0x1A4
0x1A6
0x1AA
0x1AB

16
16
16
16
16
16
16
16
16
16
32
8
8

32767
16384
16384
16384
32767
32767
32767
32767
32767
32767
0
111
0

1345
16384
16384
16384
32767
32767
32767
32767
32767
32767
0
79
0

CFDEN
Reserved

0x1AC
0x1AD

8
8

0
0

2
0

CFNUM
MODE1_DEF
PHA_CAL_STATUS
PHB_CAL_STATUS
PHC_CAL_STATUS
STAND_W_RAW

0x1AE
0x1B0
0x1B2
0x1B4
0x1B6
0x1B8

16
16
16
16
16
48

32767
0

16826
0

In Line
Formula

PHy_DELAY = 8_BIT_SIGNED_INT((((ACOS((W2 / LINE_CYC_NUM_2) / (W1 / LINE_CYC_NUM_1)) * (18


PHy_DELAY = 8_BIT_SIGNED_INT((((ACOS((W2 / LINE_CYC_NUM_2) / (W1 / LINE_CYC_NUM_1)) * (18
PHy_DELAY = 8_BIT_SIGNED_INT((((ACOS((W2 / LINE_CYC_NUM_2) / (W1 / LINE_CYC_NUM_1)) * (18
PHy_I_RMS_OFF = 16-bit_signed_int(((IR1 IR2) / (IG * IG 1) IR2) / 65536)
PHy_V_RMS_OFF = 16-bit_signed_int(((VR1 VR2) / (VG * VG 1) VR2) / 65536)
PHy_I_RMS_OFF = 16-bit_signed_int(((IR1 IR2) / (IG * IG 1) IR2) / 65536)
PHy_V_RMS_OFF = 16-bit_signed_int(((VR1 VR2) / (VG * VG 1) VR2) / 65536)
PHy_I_RMS_OFF = 16-bit_signed_int(((IR1 IR2) / (IG * IG 1) IR2) / 65536)
PHy_V_RMS_OFF = 16-bit_signed_int(((VR1 VR2) / (VG * VG 1) VR2) / 65536)

PHy_I_RMS_GLSB = 16-bit_signed_int(32,768 * ((I1 / ILSB) / sqrt(IR1 / 65536 + PHy_I_RMS_OFF)))


PHy_V_RMS_GLSB = 16-bit_signed_int(32,768 * ((V1 / VLSB) / sqrt(VR1 / 65536 + PHy_V_RMS_OFF)))
PHy_I_RMS_GLSB = 16-bit_signed_int(32,768 * ((I1 / ILSB) / sqrt(IR1 / 65536 + PHy_I_RMS_OFF)))
PHy_V_RMS_GLSB = 16-bit_signed_int(32,768 * ((V1 / VLSB) / sqrt(VR1 / 65536 + PHy_V_RMS_OFF)))
PHy_I_RMS_GLSB = 16-bit_signed_int(32,768 * ((I1 / ILSB) / sqrt(IR1 / 65536 + PHy_I_RMS_OFF)))
PHy_V_RMS_GLSB = 16-bit_signed_int(32,768 * ((V1 / VLSB) / sqrt(VR1 / 65536 + PHy_V_RMS_OFF)))
PHy_W_OFF = 32_BIT_SIGNED_INT(((W1 / 100) / LINE_CYC_NUM_W1) - (W2 / LINE_CYC_NUM_W2))
PHy_W_OFF = 32_BIT_SIGNED_INT(((W1 / 100) / LINE_CYC_NUM_W1) - (W2 / LINE_CYC_NUM_W2))
PHy_W_OFF = 32_BIT_SIGNED_INT(((W1 / 100) / LINE_CYC_NUM_W1) - (W2 / LINE_CYC_NUM_W2))
PH<u1>_W_GAIN = 16-bit_signed_int((PH<s>_W_RAW / PH<u1>_W_RAW) * 16384)
PH<u1>_W_GAIN = 16-bit_signed_int((PH<s>_W_RAW / PH<u1>_W_RAW) * 16384)
PH<u1>_W_GAIN = 16-bit_signed_int((PH<s>_W_RAW / PH<u1>_W_RAW) * 16384)
PHy_W_GLSB = 16-bit_signed_int((((V1 * I1) / PLSB) / (PHy_W_RAW / (64 * LINE_CYC_NUM))) * 32768)
PHy_W_GLSB = 16-bit_signed_int((((V1 * I1) / PLSB) / (PHy_W_RAW / (64 * LINE_CYC_NUM))) * 32768)
PHy_W_GLSB = 16-bit_signed_int((((V1 * I1) / PLSB) / (PHy_W_RAW / (64 * LINE_CYC_NUM))) * 32768)
PHy_VA_GAIN = 16-bit_signed_int((PH<s>_W_RAW / PHy_VA_RAW) * 16384)
PHy_VA_GAIN = 16-bit_signed_int((PH<s>_W_RAW / PHy_VA_RAW) * 16384)

PHy_VA_GAIN = 16-bit_signed_int((PH<s>_W_RAW / PHy_VA_RAW) * 16384)


PHy_VA_GLSB = 16-bit_signed_int((((V1 * I1) / PLSB) / (PHy_VA_RAW / (64 * LINE_CYC_NUM))))
PHy_VA_GLSB = 16-bit_signed_int((((V1 * I1) / PLSB) / (PHy_VA_RAW / (64 * LINE_CYC_NUM))))
PHy_VA_GLSB = 16-bit_signed_int((((V1 * I1) / PLSB) / (PHy_VA_RAW / (64 * LINE_CYC_NUM))))

CFDEN = 8_BIT_SIGNED_INT(LOG(((2^32 * CF_IMP_S) / (LINE_FREQ * 128)) / ((ENERGY_W_L_RAW / L

CFNUM = 16_BIT_SIGNED_INT(((2^32 * CF_IMP_S) / (LINE_FREQ * 128)) / (((ENERGY_W_L_RAW / LINE

* (180 / PI)) 60) / 2.8125) * 128)


* (180 / PI)) 60) / 2.8125) * 128)
* (180 / PI)) 60) / 2.8125) * 128)

W / LINE_CYC_NUM) / 256)) / LOG(2) + 1)

LINE_CYC_NUM) / 256) * 2^CFDEN) * 32768)

Internal Registers
Registers shown in dark gray are either not used in the simulation or are defined on the setup page
Registers shown in gray are not implemented for now
Do not type in values here!

Register Name
MODE1
Reserved
STATUS1
Reserved
CAL_CONTROL
LINE_CYC
LINE_CYC_CNT
Reserved
PHA_I_RMS_RAW2
PHA_I_RMS_RAW
PHA_I_RMS
PHA_V_RMS_RAW2
PHA_V_RMS_RAW
PHA_V_RMS
PHB_I_RMS_RAW2
PHB_I_RMS_RAW
PHB_I_RMS
PHB_V_RMS_RAW2
PHB_V_RMS_RAW
PHB_V_RMS
PHC_I_RMS_RAW2
PHC_I_RMS_RAW
PHC_I_RMS
PHC_V_RMS_RAW2
PHC_V_RMS_RAW
PHC_V_RMS
I_RMS
Reserved
NEUT_I_RMS_RAW2
NEUT_I_RMS_RAW
NEUT_I_RMS
NEUT_V_RMS_RAW2
NEUT_V_RMS_RAW
NEUT_V_RMS
PHA_W_RAW
PHB_W_RAW
PHC_W_RAW
PHA_W
PHB_W
PHC_W
PHA_VA_RAW
PHB_VA_RAW
PHC_VA_RAW

Address
0x000
0x002
0x004
0x006
0x008
0x00A
0x00C
0x00E
0x010
0x016
0x018
0x01A
0x020
0x022
0x024
0x02A
0x02C
0x02E
0x034
0x036
0x038
0x03E
0x040
0x042
0x048
0x04A
0x04C
0x04F
0x050
0x056
0x058
0x05A
0x060
0x062
0x064
0x06A
0x070
0x076
0x07A
0x07E
0x082
0x088
0x08E

Size
(bits)

Cal Step 1
Value

Cal Step 2
Value

16
16
16
16
16
8
16
16
48 178638094336
41943040000
16
1651
800
16
100
48
48 17267282673664 17267282673664
16
16232
16232
16
2199
2199
48 178638094336
41943040000
16
1651
800
16
100
48
48 17267282673664 17267282673664
16
16232
16232
16
2199
2199
48 178638094336
41943040000
16
1651
800
16
100
48
48 17267282673664 17267282673664
16
16232
16232
16
2199
2199
24
300
144
8
48
16
16
48
16
16
48
54884417536
26594508800
48
54884417536
26594508800
48
54884417536
26594508800
32
2199952
1065976
32
2199952
1065976
32
2199952
1065976
48
54884417536
26594508800
48
54884417536
26594508800
48
54884417536
26594508800

PHA_VA
PHB_VA
PHC_VA
PHA_VAR_RAW
PHB_VAR_RAW
PHC_VAR_RAW
PHA_VAR
PHB_VAR
PHC_VAR
Reserved
Period
ENERGY_W
ENERGY_W_Z
ENERGY_W_L_RAW
ENERGY_W_L
ENERGY_VA
ENERGY_VA_Z
ENERGY_VA_L_RAW
ENERGY_VA_L
PHA_I_ABS_MAX
PHA_V_ABS_MAX
PHB_I_ABS_MAX
PHB_V_ABS_MAX
PHC_I_ABS_MAX
PHC_V_ABS_MAX
Reserved
ENERGY_VA
ENERGY_VA_Z
ENERGY_VA_L_RAW
ENERGY_VA_L
Reserved
Phase A
DUMMY_VAL_I
DUMMY_VAL_V
Phase B
DUMMY_VAL_I
DUMMY_VAL_V
Phase C
DUMMY_VAL_I
DUMMY_VAL_V

0x094
0x098
0x09C
0x0A0
0x0A6
0x0AC
0x0B2
0x0B6
0x0BA
0x0BE
0x0C0
0x0C4
0x0CC
0x0D4
0x0DA
0x0DE
0x0E6
0x0EE
0x0F4
0x0F8
0x0F9
0x0FA
0x0FB
0x0FC
0x0FD
0x0FE
0x100
0x108
0x110
0x116
0x11A

32
32
32
48
48
48
32
32
32
16
32
64
64
48
32
64
64
48
32
8
8
8
8
8
8
16
64
64
48
32
272

2199993
2199993
2199993

1066017
1066017
1066017

11363
4758084384
4758084384
4758084384

11363
2305552700
2305552700
2305552700

14274253152
14274253152
14274253152

6916658100
6916658100
6916658100

6
63
6
63
6
63

3
63
3
63
3
63

0x13C
0x13E

16
16

1651
16232

800
16232

0x13C
0x13E

16
16

1651
16232

800
16232

0x13C
0x13E

16
16

1651
16232

800
16232

on the setup page

Cal Step 3
Value

Cal Step 4
Value

18939904
17
1
17267282673664
16232
2199
18939904
17
1
17267282673664
16232
2199
18939904
17
1
17267282673664
16232
2199
3

1784217600
165
9
172630278144
1623
219
1784217600
165
9
172630278144
1623
219
1784217600
165
9
172630278144
1623
219
27

4521066496
4521066496
4521066496
22647
22647
22647
4521066496
4521066496
4521066496

548444160
548444160
548444160
21943
21943
21943
548444160
548444160
548444160

22652
22652
22652

21983
21983
21983

11363
391943959
391943959
391943959

11363
47546165
47546165
47546165

1175831877
1175831877
1175831877

142638495
142638495
142638495

0
63
0
63
0
63

0
6
0
6
0
6

17
16232

165
1623

17
16232

165
1623

17
16232

165
1623

Você também pode gostar