foxBMS - Unit Tests  1.3.0
The foxBMS Unit Tests API Documentation
battery_cell_cfg.c
Go to the documentation of this file.
1 /**
2  *
3  * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright notice, this
12  * list of conditions and the following disclaimer.
13  *
14  * 2. Redistributions in binary form must reproduce the above copyright notice,
15  * this list of conditions and the following disclaimer in the documentation
16  * and/or other materials provided with the distribution.
17  *
18  * 3. Neither the name of the copyright holder nor the names of its
19  * contributors may be used to endorse or promote products derived from
20  * this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  *
33  * We kindly request you to use one or more of the following phrases to refer to
34  * foxBMS in your hardware, software, documentation or advertising materials:
35  *
36  * - ″This product uses parts of foxBMS®″
37  * - ″This product includes parts of foxBMS®″
38  * - ″This product is derived from foxBMS®″
39  *
40  */
41 
42 /**
43  * @file battery_cell_cfg.c
44  * @author foxBMS Team
45  * @date 2020-10-08 (date of creation)
46  * @updated 2022-05-30 (date of last update)
47  * @version v1.3.0
48  * @ingroup BATTERY_CELL_CONFIGURATION
49  * @prefix BC
50  *
51  * @brief Configuration of the battery cell
52  *
53  * @details This files contains battery cell lookup tables
54  *
55  */
56 
57 /*========== Includes =======================================================*/
58 #include "battery_cell_cfg.h"
59 
60 /*========== Macros and Definitions =========================================*/
61 
62 /*========== Static Constant and Variable Definitions =======================*/
63 
64 /*========== Extern Constant and Variable Definitions =======================*/
65 
67  {4123, 100.0f}, {4088, 99.0f}, {4072, 98.0f}, {4060, 97.0f}, {4052, 96.0f}, {4045, 95.0f}, {4040, 94.0f},
68  {4036, 93.0f}, {4032, 92.0f}, {4028, 91.0f}, {4024, 90.0f}, {4020, 89.0f}, {4015, 88.0f}, {4009, 87.0f},
69  {4001, 86.0f}, {3992, 85.0f}, {3982, 84.0f}, {3972, 83.0f}, {3961, 82.0f}, {3950, 81.0f}, {3939, 80.0f},
70  {3927, 79.0f}, {3916, 78.0f}, {3905, 77.0f}, {3895, 76.0f}, {3885, 75.0f}, {3876, 74.0f}, {3867, 73.0f},
71  {3857, 72.0f}, {3849, 71.0f}, {3840, 70.0f}, {3831, 69.0f}, {3822, 68.0f}, {3812, 67.0f}, {3802, 66.0f},
72  {3791, 65.0f}, {3780, 64.0f}, {3769, 63.0f}, {3757, 62.0f}, {3746, 61.0f}, {3735, 60.0f}, {3724, 59.0f},
73  {3713, 58.0f}, {3703, 57.0f}, {3693, 56.0f}, {3683, 55.0f}, {3673, 54.0f}, {3663, 53.0f}, {3653, 52.0f},
74  {3644, 51.0f}, {3636, 50.0f}, {3628, 49.0f}, {3620, 48.0f}, {3613, 47.0f}, {3606, 46.0f}, {3599, 45.0f},
75  {3592, 44.0f}, {3586, 43.0f}, {3580, 42.0f}, {3574, 41.0f}, {3568, 40.0f}, {3563, 39.0f}, {3557, 38.0f},
76  {3551, 37.0f}, {3544, 36.0f}, {3538, 35.0f}, {3532, 34.0f}, {3525, 33.0f}, {3518, 32.0f}, {3510, 31.0f},
77  {3501, 30.0f}, {3493, 29.0f}, {3483, 28.0f}, {3472, 27.0f}, {3461, 26.0f}, {3448, 25.0f}, {3435, 24.0f},
78  {3422, 23.0f}, {3410, 22.0f}, {3400, 21.0f}, {3392, 20.0f}, {3383, 19.0f}, {3374, 18.0f}, {3363, 17.0f},
79  {3351, 16.0f}, {3334, 15.0f}, {3310, 14.0f}, {3287, 13.0f}, {3261, 12.0f}, {3234, 11.0f}, {3202, 10.0f},
80  {3167, 9.0f}, {3129, 8.0f}, {3087, 7.0f}, {3046, 6.0f}, {3003, 5.0f}, {2957, 4.0f}, {2901, 3.0f},
81  {2825, 2.0f}, {2716, 1.0f},
82 };
83 
84 /* SOE Lookup table in 1% steps starting with 100% */
86  {4163, 100.0f}, {4145, 99.0f}, {4131, 98.0f}, {4121, 97.0f}, {4113, 96.0f}, {4106, 95.0f}, {4101, 94.0f},
87  {4096, 93.0f}, {4092, 92.0f}, {4089, 91.0f}, {4085, 90.0f}, {4081, 89.0f}, {4077, 88.0f}, {4072, 87.0f},
88  {4066, 86.0f}, {4058, 85.0f}, {4050, 84.0f}, {4041, 83.0f}, {4032, 82.0f}, {4022, 81.0f}, {4011, 80.0f},
89  {4001, 79.0f}, {3991, 78.0f}, {3980, 77.0f}, {3970, 76.0f}, {3961, 75.0f}, {3951, 74.0f}, {3942, 73.0f},
90  {3934, 72.0f}, {3926, 71.0f}, {3918, 70.0f}, {3910, 69.0f}, {3902, 68.0f}, {3895, 67.0f}, {3887, 66.0f},
91  {3878, 65.0f}, {3870, 64.0f}, {3860, 63.0f}, {3851, 62.0f}, {3841, 61.0f}, {3831, 60.0f}, {3821, 59.0f},
92  {3811, 58.0f}, {3800, 57.0f}, {3789, 56.0f}, {3778, 55.0f}, {3767, 54.0f}, {3756, 53.0f}, {3746, 52.0f},
93  {3736, 51.0f}, {3726, 50.0f}, {3717, 49.0f}, {3708, 48.0f}, {3699, 47.0f}, {3691, 46.0f}, {3683, 45.0f},
94  {3675, 44.0f}, {3668, 43.0f}, {3661, 42.0f}, {3655, 41.0f}, {3648, 40.0f}, {3642, 39.0f}, {3636, 38.0f},
95  {3630, 37.0f}, {3624, 36.0f}, {3618, 35.0f}, {3612, 34.0f}, {3605, 33.0f}, {3599, 32.0f}, {3592, 31.0f},
96  {3585, 30.0f}, {3578, 29.0f}, {3569, 28.0f}, {3561, 27.0f}, {3551, 26.0f}, {3540, 25.0f}, {3528, 24.0f},
97  {3516, 23.0f}, {3504, 22.0f}, {3492, 21.0f}, {3482, 20.0f}, {3471, 19.0f}, {3460, 18.0f}, {3449, 17.0f},
98  {3437, 16.0f}, {3423, 15.0f}, {3406, 14.0f}, {3390, 13.0f}, {3373, 12.0f}, {3354, 11.0f}, {3332, 10.0f},
99  {3307, 9.0f}, {3276, 8.0f}, {3244, 7.0f}, {3212, 6.0f}, {3176, 5.0f}, {3126, 4.0f}, {3050, 3.0f},
100  {2929, 2.0f}, {2572, 1.0f},
101 };
102 
105 
106 /*========== Static Function Prototypes =====================================*/
107 
108 /*========== Static Function Implementations ================================*/
109 
110 /*========== Extern Function Implementations ================================*/
111 
112 /*========== Externalized Static Function Implementations (Unit Test) =======*/
uint16_t bc_stateOfChargeLookupTableLength
uint16_t bc_stateOfEnergyLookupTableLength
const BC_LUT_s bc_stateOfEnergyLookupTable[]
const BC_LUT_s bc_stateOfChargeLookupTable[]
Configuration of the battery cell (e.g., minimum and maximum cell voltage)