﻿<?xml version="1.0" encoding="utf-8"?>
<powermodel vid="0x46d" pid="0x407f">
  <battery>

    <!-- Discharge Curve
         "default"
         Time (minutes), CCV (volts), Discharge (mWh)
    -->
    <discharge format="default">
      <![CDATA[
0,4.186,1.34
1,4.172,2.73
2,4.166,4.13
3,4.163,5.52
4,4.160,6.90
5,4.157,8.28
6,4.156,9.67
7,4.153,11.06
8,4.152,12.43
9,4.150,13.80
10,4.148,15.17
11,4.146,16.56
12,4.144,17.93
13,4.143,19.32
14,4.141,20.70
15,4.139,22.07
16,4.138,23.46
17,4.136,24.83
18,4.135,26.21
19,4.133,27.58
20,4.131,28.95
21,4.130,30.33
22,4.128,31.71
23,4.127,33.08
24,4.125,34.45
25,4.124,35.84
26,4.122,37.21
27,4.121,38.57
28,4.119,39.95
29,4.117,41.33
30,4.116,42.69
31,4.115,44.06
32,4.113,45.43
33,4.112,46.81
34,4.110,48.18
35,4.109,49.55
36,4.108,50.91
37,4.106,52.28
38,4.105,53.63
39,4.103,54.99
40,4.102,56.36
41,4.100,57.73
42,4.099,59.07
43,4.098,60.44
44,4.096,61.81
45,4.095,63.18
46,4.094,64.55
47,4.092,65.90
48,4.091,67.24
49,4.090,68.61
50,4.088,69.96
51,4.087,71.32
52,4.086,72.68
53,4.084,74.05
54,4.082,75.41
55,4.081,76.76
56,4.080,78.12
57,4.079,79.49
58,4.077,80.86
59,4.076,82.23
60,4.075,83.59
61,4.074,84.93
62,4.073,86.29
63,4.071,87.65
64,4.070,88.99
65,4.069,90.35
66,4.067,91.69
67,4.066,93.04
68,4.065,94.40
69,4.064,95.75
70,4.062,97.12
71,4.061,98.48
72,4.060,99.84
73,4.059,101.19
74,4.057,102.54
75,4.056,103.87
76,4.055,105.21
77,4.054,106.55
78,4.052,107.88
79,4.051,109.22
80,4.050,110.56
81,4.049,111.91
82,4.048,113.25
83,4.046,114.58
84,4.045,115.91
85,4.044,117.27
86,4.043,118.61
87,4.042,119.96
88,4.040,121.31
89,4.039,122.66
90,4.038,124.01
91,4.036,125.34
92,4.036,126.69
93,4.034,128.03
94,4.033,129.37
95,4.032,130.70
96,4.031,132.03
97,4.030,133.38
98,4.028,134.70
99,4.027,136.05
100,4.026,137.38
101,4.025,138.73
102,4.024,140.08
103,4.022,141.42
104,4.021,142.76
105,4.021,144.09
106,4.019,145.44
107,4.018,146.76
108,4.017,148.10
109,4.016,149.45
110,4.015,150.79
111,4.013,152.12
112,4.012,153.46
113,4.011,154.81
114,4.010,156.14
115,4.009,157.48
116,4.008,158.79
117,4.007,160.14
118,4.005,161.47
119,4.004,162.81
120,4.003,164.14
121,4.002,165.47
122,4.001,166.80
123,4.000,168.11
124,3.999,169.45
125,3.998,170.79
126,3.997,172.13
127,3.996,173.47
128,3.995,174.81
129,3.993,176.14
130,3.993,177.47
131,3.991,178.80
132,3.991,180.14
133,3.989,181.45
134,3.988,182.79
135,3.987,184.12
136,3.986,185.43
137,3.985,186.76
138,3.984,188.09
139,3.983,189.42
140,3.982,190.73
141,3.981,192.05
142,3.980,193.37
143,3.979,194.70
144,3.978,196.03
145,3.977,197.34
146,3.976,198.67
147,3.975,199.98
148,3.974,201.31
149,3.973,202.62
150,3.972,203.94
151,3.971,205.26
152,3.970,206.59
153,3.969,207.92
154,3.967,209.25
155,3.967,210.58
156,3.966,211.89
157,3.965,213.22
158,3.964,214.55
159,3.962,215.87
160,3.961,217.18
161,3.961,218.51
162,3.960,219.83
163,3.959,221.15
164,3.958,222.47
165,3.957,223.79
166,3.956,225.08
167,3.955,226.39
168,3.954,227.71
169,3.953,229.02
170,3.952,230.34
171,3.951,231.67
172,3.950,232.98
173,3.949,234.28
174,3.948,235.58
175,3.947,236.90
176,3.946,238.21
177,3.945,239.53
178,3.944,240.85
179,3.943,242.15
180,3.942,243.48
181,3.941,244.78
182,3.940,246.10
183,3.939,247.41
184,3.938,248.73
185,3.937,250.02
186,3.936,251.33
187,3.935,252.62
188,3.934,253.94
189,3.933,255.26
190,3.933,256.56
191,3.931,257.85
192,3.931,259.16
193,3.930,260.44
194,3.929,261.73
195,3.928,263.04
196,3.927,264.36
197,3.926,265.67
198,3.925,266.98
199,3.924,268.28
200,3.923,269.58
201,3.922,270.89
202,3.921,272.19
203,3.920,273.49
204,3.919,274.79
205,3.919,276.10
206,3.918,277.39
207,3.917,278.68
208,3.916,279.97
209,3.915,281.25
210,3.914,282.54
211,3.913,283.85
212,3.912,285.14
213,3.911,286.42
214,3.910,287.73
215,3.909,289.03
216,3.908,290.34
217,3.907,291.65
218,3.906,292.95
219,3.905,294.24
220,3.904,295.54
221,3.903,296.82
222,3.902,298.12
223,3.901,299.43
224,3.901,300.73
225,3.899,302.02
226,3.899,303.30
227,3.898,304.61
228,3.897,305.91
229,3.896,307.22
230,3.895,308.53
231,3.894,309.83
232,3.893,311.11
233,3.892,312.41
234,3.891,313.69
235,3.890,314.98
236,3.890,316.29
237,3.889,317.58
238,3.887,318.88
239,3.887,320.17
240,3.886,321.45
241,3.885,322.75
242,3.884,324.04
243,3.883,325.34
244,3.882,326.63
245,3.881,327.93
246,3.880,329.23
247,3.879,330.52
248,3.879,331.81
249,3.877,333.10
250,3.877,334.38
251,3.875,335.68
252,3.874,336.97
253,3.874,338.25
254,3.873,339.53
255,3.872,340.81
256,3.871,342.09
257,3.870,343.37
258,3.870,344.67
259,3.868,345.96
260,3.868,347.24
261,3.867,348.53
262,3.866,349.82
263,3.865,351.11
264,3.865,352.40
265,3.864,353.69
266,3.863,354.98
267,3.862,356.27
268,3.861,357.57
269,3.860,358.86
270,3.859,360.15
271,3.859,361.43
272,3.858,362.70
273,3.857,363.97
274,3.857,365.24
275,3.855,366.51
276,3.855,367.78
277,3.854,369.05
278,3.853,370.34
279,3.852,371.63
280,3.851,372.90
281,3.851,374.19
282,3.850,375.47
283,3.849,376.76
284,3.848,378.02
285,3.848,379.31
286,3.847,380.60
287,3.846,381.88
288,3.846,383.17
289,3.845,384.43
290,3.844,385.70
291,3.843,386.99
292,3.842,388.25
293,3.842,389.54
294,3.841,390.82
295,3.840,392.10
296,3.839,393.38
297,3.839,394.65
298,3.838,395.91
299,3.837,397.20
300,3.837,398.48
301,3.836,399.75
302,3.835,401.04
303,3.835,402.30
304,3.834,403.58
305,3.833,404.84
306,3.833,406.12
307,3.832,407.40
308,3.831,408.69
309,3.831,409.97
310,3.830,411.26
311,3.829,412.54
312,3.829,413.82
313,3.828,415.09
314,3.828,416.36
315,3.827,417.63
316,3.826,418.91
317,3.826,420.18
318,3.825,421.44
319,3.824,422.72
320,3.824,423.97
321,3.823,425.24
322,3.823,426.52
323,3.822,427.79
324,3.821,429.05
325,3.821,430.32
326,3.820,431.59
327,3.819,432.86
328,3.819,434.13
329,3.818,435.39
330,3.818,436.64
331,3.817,437.91
332,3.817,439.18
333,3.816,440.45
334,3.815,441.72
335,3.815,443.00
336,3.814,444.27
337,3.814,445.53
338,3.813,446.78
339,3.813,448.05
340,3.812,449.33
341,3.811,450.60
342,3.811,451.85
343,3.811,453.12
344,3.810,454.39
345,3.809,455.67
346,3.809,456.94
347,3.808,458.20
348,3.808,459.47
349,3.807,460.73
350,3.807,461.99
351,3.806,463.25
352,3.806,464.50
353,3.805,465.78
354,3.805,467.05
355,3.804,468.31
356,3.804,469.57
357,3.803,470.83
358,3.803,472.10
359,3.802,473.37
360,3.801,474.64
361,3.801,475.90
362,3.800,477.17
363,3.800,478.42
364,3.799,479.68
365,3.799,480.95
366,3.798,482.22
367,3.798,483.48
368,3.798,484.75
369,3.797,486.02
370,3.796,487.27
371,3.796,488.52
372,3.796,489.77
373,3.795,491.01
374,3.794,492.28
375,3.794,493.53
376,3.793,494.79
377,3.793,496.06
378,3.793,497.33
379,3.792,498.57
380,3.792,499.84
381,3.791,501.11
382,3.791,502.38
383,3.790,503.64
384,3.790,504.90
385,3.789,506.17
386,3.789,507.44
387,3.789,508.69
388,3.788,509.95
389,3.788,511.22
390,3.787,512.48
391,3.787,513.73
392,3.787,514.98
393,3.786,516.24
394,3.786,517.49
395,3.785,518.76
396,3.784,520.02
397,3.784,521.28
398,3.784,522.54
399,3.783,523.81
400,3.783,525.08
401,3.782,526.33
402,3.782,527.59
403,3.781,528.85
404,3.781,530.12
405,3.781,531.37
406,3.780,532.63
407,3.780,533.88
408,3.780,535.15
409,3.779,536.39
410,3.779,537.65
411,3.778,538.91
412,3.778,540.17
413,3.778,541.44
414,3.777,542.70
415,3.777,543.94
416,3.777,545.21
417,3.776,546.46
418,3.776,547.71
419,3.775,548.95
420,3.775,550.22
421,3.774,551.48
422,3.774,552.74
423,3.774,554.00
424,3.773,555.25
425,3.773,556.50
426,3.773,557.74
427,3.772,558.99
428,3.772,560.24
429,3.771,561.49
430,3.771,562.74
431,3.771,563.99
432,3.770,565.25
433,3.770,566.50
434,3.770,567.76
435,3.769,569.02
436,3.769,570.29
437,3.768,571.54
438,3.768,572.79
439,3.768,574.04
440,3.767,575.30
441,3.767,576.55
442,3.766,577.81
443,3.766,579.06
444,3.766,580.31
445,3.765,581.56
446,3.765,582.82
447,3.765,584.07
448,3.764,585.31
449,3.764,586.56
450,3.764,587.80
451,3.763,589.04
452,3.763,590.28
453,3.763,591.53
454,3.762,592.77
455,3.762,594.02
456,3.762,595.26
457,3.761,596.52
458,3.761,597.78
459,3.761,599.03
460,3.760,600.28
461,3.760,601.54
462,3.759,602.79
463,3.759,604.03
464,3.759,605.27
465,3.758,606.52
466,3.758,607.78
467,3.758,609.04
468,3.757,610.29
469,3.757,611.55
470,3.757,612.79
471,3.756,614.04
472,3.756,615.30
473,3.755,616.55
474,3.755,617.80
475,3.754,619.05
476,3.754,620.31
477,3.754,621.54
478,3.753,622.80
479,3.753,624.05
480,3.752,625.29
481,3.752,626.54
482,3.752,627.77
483,3.751,629.02
484,3.751,630.25
485,3.751,631.50
486,3.750,632.76
487,3.750,634.01
488,3.749,635.26
489,3.749,636.51
490,3.749,637.75
491,3.748,638.98
492,3.748,640.23
493,3.747,641.49
494,3.747,642.73
495,3.746,643.98
496,3.745,645.22
497,3.745,646.46
498,3.744,647.71
499,3.744,648.93
500,3.744,650.19
501,3.743,651.44
502,3.743,652.70
503,3.742,653.95
504,3.742,655.17
505,3.741,656.41
506,3.741,657.66
507,3.740,658.90
508,3.739,660.12
509,3.739,661.37
510,3.739,662.61
511,3.738,663.87
512,3.738,665.10
513,3.737,666.35
514,3.736,667.58
515,3.736,668.81
516,3.736,670.06
517,3.735,671.30
518,3.735,672.54
519,3.734,673.78
520,3.734,675.03
521,3.733,676.28
522,3.733,677.53
523,3.732,678.77
524,3.732,680.01
525,3.731,681.27
526,3.731,682.51
527,3.730,683.76
528,3.730,685.01
529,3.729,686.26
530,3.729,687.49
531,3.728,688.73
532,3.728,689.96
533,3.728,691.20
534,3.727,692.44
535,3.726,693.68
536,3.726,694.92
537,3.725,696.16
538,3.725,697.40
539,3.725,698.65
540,3.724,699.90
541,3.724,701.13
542,3.724,702.37
543,3.723,703.60
544,3.722,704.83
545,3.722,706.07
546,3.722,707.32
547,3.721,708.54
548,3.721,709.77
549,3.720,711.02
550,3.720,712.25
551,3.720,713.50
552,3.719,714.74
553,3.719,715.98
554,3.718,717.22
555,3.718,718.47
556,3.717,719.69
557,3.717,720.91
558,3.717,722.15
559,3.716,723.38
560,3.715,724.62
561,3.715,725.84
562,3.715,727.08
563,3.714,728.32
564,3.714,729.55
565,3.713,730.79
566,3.713,732.03
567,3.712,733.27
568,3.712,734.50
569,3.711,735.74
570,3.711,736.96
571,3.710,738.20
572,3.709,739.44
573,3.709,740.66
574,3.709,741.90
575,3.708,743.13
576,3.707,744.37
577,3.707,745.59
578,3.706,746.82
579,3.706,748.05
580,3.705,749.28
581,3.705,750.52
582,3.704,751.74
583,3.704,752.97
584,3.703,754.21
585,3.702,755.44
586,3.702,756.68
587,3.701,757.90
588,3.701,759.11
589,3.700,760.34
590,3.699,761.57
591,3.699,762.79
592,3.698,764.02
593,3.697,765.25
594,3.697,766.47
595,3.697,767.70
596,3.696,768.91
597,3.695,770.15
598,3.695,771.39
599,3.694,772.62
600,3.693,773.86
601,3.693,775.08
602,3.692,776.31
603,3.692,777.53
604,3.691,778.76
605,3.690,780.00
606,3.690,781.22
607,3.689,782.45
608,3.688,783.68
609,3.688,784.90
610,3.687,786.13
611,3.686,787.36
612,3.686,788.60
613,3.685,789.83
614,3.684,791.05
615,3.683,792.28
616,3.683,793.49
617,3.682,794.70
618,3.681,795.93
619,3.680,797.16
620,3.679,798.37
621,3.678,799.60
622,3.677,800.83
623,3.677,802.06
624,3.676,803.29
625,3.675,804.50
626,3.674,805.73
627,3.673,806.94
628,3.673,808.15
629,3.671,809.38
630,3.671,810.61
631,3.670,811.83
632,3.669,813.05
633,3.669,814.26
634,3.668,815.49
635,3.667,816.71
636,3.667,817.94
637,3.666,819.16
638,3.666,820.38
639,3.665,821.61
640,3.665,822.83
641,3.664,824.06
642,3.663,825.29
643,3.663,826.50
644,3.662,827.72
645,3.662,828.95
646,3.662,830.17
647,3.661,831.40
648,3.661,832.62
649,3.660,833.84
650,3.659,835.06
651,3.659,836.27
652,3.658,837.48
653,3.658,838.70
654,3.657,839.90
655,3.657,841.11
656,3.656,842.34
657,3.655,843.56
658,3.654,844.75
659,3.654,845.97
660,3.653,847.19
661,3.652,848.41
662,3.651,849.61
663,3.650,850.83
664,3.649,852.05
665,3.648,853.27
666,3.647,854.48
667,3.646,855.70
668,3.644,856.90
669,3.643,858.10
670,3.641,859.32
671,3.639,860.54
672,3.637,861.76
673,3.635,862.98
674,3.633,864.18
675,3.631,865.39
676,3.628,866.58
677,3.625,867.78
678,3.622,868.99
679,3.619,870.21
680,3.615,871.43
681,3.612,872.63
682,3.608,873.85
683,3.604,875.05
684,3.600,876.26
685,3.596,877.47
686,3.592,878.67
687,3.588,879.86
688,3.583,881.06
689,3.579,882.26
690,3.574,883.46
691,3.569,884.65
692,3.564,885.84
693,3.559,887.02
694,3.554,888.22
695,3.548,889.40
696,3.543,890.58
697,3.537,891.77
698,3.531,892.95
699,3.525,894.14
700,3.519,895.32
701,3.513,896.49
702,3.506,897.66
703,3.500,898.83
704,3.493,900.01
705,3.486,901.17
706,3.479,902.34
  ]]>
    </discharge>

    <!-- Charging Curve
         "default"
         CCV (volts), SoC (%)
    -->
    <charging format="default">
      <![CDATA[
3.271,2
3.668,3
3.786,5
3.859,7
3.908,8
3.929,10
3.942,12
3.954,13
3.965,15
3.976,17
3.988,18
3.998,20
4.007,22
4.015,23
4.023,25
4.029,27
4.036,28
4.042,30
4.048,32
4.054,33
4.061,35
4.066,37
4.073,38
4.079,40
4.085,42
4.091,43
4.098,45
4.104,47
4.111,48
4.118,50
4.125,52
4.132,53
4.139,55
4.147,57
4.155,58
4.163,60
4.172,62
4.181,63
4.190,65
4.197,67
4.200,68
4.200,70
4.200,71
4.200,73
4.200,74
4.200,76
4.200,77
4.200,78
4.200,80
4.200,81
4.200,82
4.200,83
4.200,84
4.200,85
4.200,86
4.200,87
4.200,88
4.200,88
4.200,89
4.200,90
4.200,91
4.200,91
4.200,92
4.200,93
4.200,93
4.200,94
4.200,94
4.200,95
4.200,95
4.200,96
4.200,96
4.200,97
4.200,97
4.200,97
4.200,98
4.200,98
4.200,98
4.200,99
4.200,99
4.200,99
4.200,100
4.200,100
4.200,100
  ]]>
    </charging>
    <!-- charging_time_slots -- This is a time table mapping time slot to percentage
         time slot use 30 seconds as the timer period.
         "stable_state_detection_voltage" - (millivolts) If this field is present, then the timer only starts if stable state is detected.
                                            And we only check the stable state if voltage is above this value
         "stable_state_minimum_voltage_change" - (millivolts) The maximum voltage change between 2 samplings when stable state is reached.
         "stable_state_check_period_in_minute" - The time period for checking the stable_state_minimum_voltage_change, if omit, default is 1 minute
         "average_voltage_sample_count" - The number of samples needed to calculate the average voltage
         "average_voltage_sample_period_in_second" - The period for sampling the voltage for the average
         "equation_coefficiency" - (seconds) If this field is present, this is the time is takes for the battery percentage to increase 1%
         "gap_fill_speed" - Sometimes, the stable state is reached, but there is a gap between the current percentage and
                            the starting percentage of the charging_time_slots table. In this case, if the "gap_fill_speed"
                            is present, we will increase the percentage at this speed every 30 seconds untill the battery reaches
                            the starting percentage of the table -1. Then we start to update the percentage according to the table.
    -->
    <charging_time_slots stable_state_detection_voltage="4100" stable_state_minimum_voltage_change="3">
           <![CDATA[
1,66
2,68
3,70
5,72
8,74
11,75
14,76
18,79
20,80
23,81
25,82
28,83
30,85
32,86
34,87
36,88
38,89
40,90
44,92
50,93
55,94
60,95
68,96
75,97
80,98
88,99
  ]]>
    </charging_time_slots>
  </battery>

  <!-- Power Blocks -->
  <blocks default_unit="milliwatts" nominal_voltage="3.8">
    <sensor model="hero" power="4.28" />
    <mcu model="stm32" power="1.640666667" />
    <roller power="0" />
    <report_rate>
      <interval milliseconds="1" power="8.162673333" />
      <interval milliseconds="2" power="4.770892222" />
      <interval milliseconds="4" power="3.075001667" />
      <interval milliseconds="8" power="2.227056389" />
    </report_rate>
    <lighting proportionalToBrightness ="true" >
      <zone location="primary">
        <effect type="off" power="0.00" />
        <effect type="solid" power="16.8"/>
        <effect type="breathing" power="7.57"/>
        <effect type="cycling" power="17.88"/>
      </zone>
      <zone location="logo">
        <effect type="off" power="0.00" />
        <effect type="solid" power="4.01"/>
        <effect type="breathing" power="2.98"/>
        <effect type="cycling" power="3.87"/>
      </zone>
    </lighting>
  </blocks>

</powermodel>

