-
Notifications
You must be signed in to change notification settings - Fork 21
/
batterykarrak.cfg
133 lines (120 loc) · 4.73 KB
/
batterykarrak.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
[files]
logfile = '/media/sdcard/log'
summaryfile = '/media/sdcard/summary'
errfile = '/media/sdcard/baterrlog'
alarmfile = '/media/sdcard/alarmlog'
hoursummaryfile = '/media/sdcard/hoursummary'
daysummaryfile = '/media/sdcard/daysummary'
monthsummaryfile = '/media/sdcard/monthsummary'
yearsummaryfile = '/media/sdcard/yearsummary'
[logging]
data = "self.printtime+batdata.vbat+batdata.vdelta \
+batdata.iall+batdata.soctxt+batdata.socadjtxt+str(batdata.pip.rawdat)"
[battery]
name = 'Karrak'
numcells = 16
capacity = 180
maxchargerate = 50
targetsoc = 0.95 # target maximum SOC
overvoltage = 3.650
undervoltage = 2.900
float = 53.6 # battery float Voltage
bulk = 56.0 # battery bulk/CV voltage
ahloss = 0.26824555354228935
vreset = 55.6 # voltage to reset DOD counter
ireset = 5.0 # current to reset DOD counter
ilowcurrent = 9.0 # C/20 lowcurrent voltage logging current
[Inverters]
numinverters = 2 # number of phisical inverters
turnonslave = 3000.0 # power output to turn slave inverter on
minruntime = 1800.0 # mimimum runtime of slave inverter in seconds
[Interfaces]
pip = 'pip(92931805102299)' # number in brackets is SN of PIP)
pip2 = 'pip(92931906104223)' # number in brackets is SN of PIP)
bms = 'bms(LH-SP15S001-P15S-30A)' # string in brackets is harware name, from read command 05
[Ports]
pipport = '/dev/ttyU*' # where to look for pipport
bmsport = '/dev/ttyS1' # where to look for bmsport
[VoltageInputs]
v01 = 'self.bms.rawdat["V01"]'
v02 = 'self.bms.rawdat["V02"]'
v03 = 'self.bms.rawdat["V03"]'
v04 = 'self.bms.rawdat["V04"]'
v05 = 'self.bms.rawdat["V05"]'
v06 = 'self.bms.rawdat["V06"]'
v07 = 'self.bms.rawdat["V07"]'
v08 = 'self.bms.rawdat["V08"]'
v09 = 'self.bms.rawdat["V09"]'
v10 = 'self.bms.rawdat["V10"]'
v11 = 'self.bms.rawdat["V11"]'
v12 = 'self.bms.rawdat["V12"]'
v13 = 'self.bms.rawdat["V13"]'
v14 = 'self.bms.rawdat["V14"]'
v15 = 'self.bms.rawdat["V15"]'
v16 = 'self.bms.rawdat["V16"]'
vbat = 'self.bms.rawdat["V16"]'
vinv = 'self.pip.rawdat["BV"]'
[CurrentInputs]
iin1 = 'self.pip.rawdat["PVI"]'
iin2 = 'self.pip2.rawdat["PVI"]'
iin3 = 'self.bms.rawdat["Ibat"]'
iin4 = 'self.current[0]+self.current[1]'
iin5 = 'self.current[2]-self.current[3]'
[TemperatureInputs]
tin1 = 'self.bms.rawdat["T1"]'
tin2 = 'self.bms.rawdat["T2"]'
tin3 = 'self.bms.rawdat["T3"]'
tin4 = 'self.bms.rawdat["T4"]'
[BalanceFlags]
balf01 = 'self.bms.rawdat["Bal"] & 1'
balf02 = 'self.bms.rawdat["Bal"] >> 1 & 1'
balf03 = 'self.bms.rawdat["Bal"] >> 2 & 1'
balf04 = 'self.bms.rawdat["Bal"] >> 3 & 1'
balf05 = 'self.bms.rawdat["Bal"] >> 4 & 1'
balf06 = 'self.bms.rawdat["Bal"] >> 5 & 1'
balf07 = 'self.bms.rawdat["Bal"] >> 6 & 1'
balf08 = 'self.bms.rawdat["Bal"] >> 7 & 1'
balf09 = 'self.bms.rawdat["Bal"] >> 8 & 1'
balf10 = 'self.bms.rawdat["Bal"] >> 9 & 1'
balf11 = 'self.bms.rawdat["Bal"] >> 10 & 1'
balf12 = 'self.bms.rawdat["Bal"] >> 11 & 1'
balf13 = 'self.bms.rawdat["Bal"] >> 12 & 1'
balf14 = 'self.bms.rawdat["Bal"] >> 13 & 1'
balf15 = 'self.bms.rawdat["Bal"] >> 14 & 1'
balf16 = 'self.bms.rawdat["Bal"] >> 15 & 1'
[Status]
chargestate1 = "self.pip.rawdat['ChgStat']"
chargestate2 = "self.pip2.rawdat['ChgStat']"
[sampling]
sampletime = 10
samplesav = 1
[calibrate]
currentgain = [-1.0, -1.0, -0.01606, 1.0, 1.0]
currentoffset = [-0.0, -0.0, 0.0, 0.0, 0.0]
batvgain = 1
measured = [0.0, 3.0, 6.0, 9.0, 12.0, 15.0, 18.0, 21.0, 24.0, 27.0, 30.0, 33.0, 36.0, 39.0, 42.0, 45.0, 48.0, 48.0, 48.0]
displayed = [0.0, 3.0, 6.0, 9.0, 12.0, 15.0, 18.0, 21.0, 24.0, 27.0, 30.0, 33.0, 36.0, 39.0, 42.0, 45.0, 48.0, 48.0, 48.0]
measureddelta = [ 0.0, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000]
displayeddelta = [ 0.0, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000]
delta = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
[alarms]
overv = ['batdata.pip.setparamnoerror("PCVV" +str(config["battery"]["bulk"]))', \
'self.test=batdata.maxcellv>3.65', \
'batdata.pip.setparamnoerror("PCVV" +str(config["battery"]["float"]))', \
'self.test=batdata.maxcellv<3.40', \
'batdata.pip.setparamnoerror("PCVV" +str(config["battery"]["bulk"]))']
underv = ['batdata.pip.setparamnoerror("PSDV48.0")', \
'self.test=batdata.mincellv<2.90', \
'batdata.pip.setparamnoerror("MNCHGC0497")', \
'self.test=batdata.mincellv>3.20', \
'batdata.pip.setparamnoerror("MNCHGC0498")']
swapinverter = ['pass', \
'self.test=localtime().tm_hour==8', \
'batdata.pip.swapinverter()', \
'self.test=localtime().tm_hour==9', \
'pass']
acoverload = ['pass', \
'self.test=batdata.pip.acloadav+batdata.pip2.acloadav>config["Inverters"]["turnonslave"]', \
'batdata.pip.slaveinvon()', \
'self.test=batdata.pip.timeoverload==0.0', \
'batdata.pip.slaveinvoff()']