Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CoincellExperimentController
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Klemm, Carl Philipp
CoincellExperimentController
Commits
c0cbda92
Commit
c0cbda92
authored
Dec 12, 2023
by
Carl Philipp Klemm
Browse files
Options
Downloads
Patches
Plain Diff
add capacy mesure cycle
parent
5ef32fc1
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
coincell.cpp
+10
-0
10 additions, 0 deletions
coincell.cpp
coincell.h
+2
-0
2 additions, 0 deletions
coincell.h
expirament.cpp
+29
-3
29 additions, 3 deletions
expirament.cpp
expirament.h
+3
-1
3 additions, 1 deletion
expirament.h
expiramentimpl.h
+8
-1
8 additions, 1 deletion
expiramentimpl.h
with
52 additions
and
5 deletions
coincell.cpp
+
10
−
0
View file @
c0cbda92
...
@@ -105,5 +105,15 @@ bool CoinCell::setEnabled(bool enable)
...
@@ -105,5 +105,15 @@ bool CoinCell::setEnabled(bool enable)
return
heaters
->
setHeaterEnabled
(
heaterId
,
enable
);
return
heaters
->
setHeaterEnabled
(
heaterId
,
enable
);
}
}
double
CoinCell
::
getFullVoltage
()
{
return
4.2
;
}
double
CoinCell
::
getEmptyVoltage
()
{
return
3.0
;
}
BioControl
CoinCell
::
biocontrol
;
BioControl
CoinCell
::
biocontrol
;
This diff is collapsed.
Click to expand it.
coincell.h
+
2
−
0
View file @
c0cbda92
...
@@ -37,6 +37,8 @@ public:
...
@@ -37,6 +37,8 @@ public:
bool
setEnabled
(
bool
enable
);
bool
setEnabled
(
bool
enable
);
double
getLastKnownCapacity
();
double
getLastKnownCapacity
();
void
setLastKnownCapacity
(
double
cap
);
void
setLastKnownCapacity
(
double
cap
);
double
getFullVoltage
();
double
getEmptyVoltage
();
static
void
setBiocontrol
(
const
BioControl
&
biocontrol
);
static
void
setBiocontrol
(
const
BioControl
&
biocontrol
);
};
};
This diff is collapsed.
Click to expand it.
expirament.cpp
+
29
−
3
View file @
c0cbda92
...
@@ -307,11 +307,11 @@ bool Expirament::charge(float fraction, bool all)
...
@@ -307,11 +307,11 @@ bool Expirament::charge(float fraction, bool all)
return
ret
;
return
ret
;
}
}
bool
Expirament
::
chargeCellToVoltage
(
int
id
,
float
voltage
)
bool
Expirament
::
chargeCellToVoltage
(
int
id
,
float
voltage
,
const
std
::
string
&
prefix
)
{
{
bool
ret
;
bool
ret
;
std
::
string
filename
=
"voltage_equalization_"
+
std
::
to_string
(
id
)
+
".csv"
;
std
::
string
filename
=
prefix
+
std
::
to_string
(
id
)
+
".csv"
;
std
::
filesystem
::
path
path
=
outdir
/
filename
;
std
::
filesystem
::
path
path
=
outdir
/
filename
;
ret
=
coinCells
->
at
(
id
)
->
connectExclusive
();
ret
=
coinCells
->
at
(
id
)
->
connectExclusive
();
if
(
!
ret
)
if
(
!
ret
)
...
@@ -332,6 +332,32 @@ bool Expirament::chargeCellToVoltage(int id, float voltage)
...
@@ -332,6 +332,32 @@ bool Expirament::chargeCellToVoltage(int id, float voltage)
return
ret
;
return
ret
;
}
}
bool
Expirament
::
capacityMesureCycle
()
{
bool
ret
=
true
;
for
(
size_t
i
=
0
;
i
<
coinCells
->
size
();
++
i
)
{
switch
(
i
)
{
case
0
...
3
:
case
12
...
15
:
case
16
...
19
:
ret
=
chargeCellToVoltage
(
i
,
coinCells
->
at
(
i
)
->
getFullVoltage
(),
"single_cell_charge_"
+
std
::
to_string
(
getGlobalstep
())
+
"_"
);
if
(
!
ret
)
return
ret
;
ret
=
chargeCellToVoltage
(
i
,
coinCells
->
at
(
i
)
->
getEmptyVoltage
(),
"single_cell_discharge_"
+
std
::
to_string
(
getGlobalstep
())
+
"_"
);
if
(
!
ret
)
return
ret
;
break
;
default:
break
;
}
}
return
ret
;
}
bool
Expirament
::
startup
()
bool
Expirament
::
startup
()
{
{
Log
(
Log
::
INFO
)
<<
"Runnin startup sequence"
;
Log
(
Log
::
INFO
)
<<
"Runnin startup sequence"
;
...
@@ -373,7 +399,7 @@ bool Expirament::startup()
...
@@ -373,7 +399,7 @@ bool Expirament::startup()
else
if
(
std
::
abs
(
leadOcv
-
ocv
)
>
0.2
)
else
if
(
std
::
abs
(
leadOcv
-
ocv
)
>
0.2
)
{
{
Log
(
Log
::
WARN
)
<<
"Cell "
<<
i
<<
" has a voltage delta of "
<<
std
::
abs
(
leadOcv
-
ocv
)
<<
" compeared to Cell 0, cell equalization needed"
;
Log
(
Log
::
WARN
)
<<
"Cell "
<<
i
<<
" has a voltage delta of "
<<
std
::
abs
(
leadOcv
-
ocv
)
<<
" compeared to Cell 0, cell equalization needed"
;
ret
=
chargeCellToVoltage
(
i
,
leadOcv
);
ret
=
chargeCellToVoltage
(
i
,
leadOcv
,
"voltage_equlaization_"
);
if
(
!
ret
)
if
(
!
ret
)
{
{
Log
(
Log
::
ERROR
)
<<
"Unable to equalize cell "
<<
i
;
Log
(
Log
::
ERROR
)
<<
"Unable to equalize cell "
<<
i
;
...
...
This diff is collapsed.
Click to expand it.
expirament.h
+
3
−
1
View file @
c0cbda92
...
@@ -39,10 +39,12 @@ private:
...
@@ -39,10 +39,12 @@ private:
bool
charge
(
float
fraction
,
bool
all
=
false
);
bool
charge
(
float
fraction
,
bool
all
=
false
);
bool
chargeCellToVoltage
(
int
id
,
float
voltage
);
bool
chargeCellToVoltage
(
int
id
,
float
voltage
,
const
std
::
string
&
prefix
);
void
saveStep
(
size_t
substep
=
0
);
void
saveStep
(
size_t
substep
=
0
);
bool
capacityMesureCycle
();
std
::
filesystem
::
path
createCsvPath
(
const
std
::
filesystem
::
path
&
filename
);
std
::
filesystem
::
path
createCsvPath
(
const
std
::
filesystem
::
path
&
filename
);
static
std
::
vector
<
double
>
createStepSequence
(
size_t
upSteps
,
size_t
downSteps
,
double
low
=
0
,
double
high
=
1
);
static
std
::
vector
<
double
>
createStepSequence
(
size_t
upSteps
,
size_t
downSteps
,
double
low
=
0
,
double
high
=
1
);
...
...
This diff is collapsed.
Click to expand it.
expiramentimpl.h
+
8
−
1
View file @
c0cbda92
...
@@ -21,7 +21,14 @@ bool Expirament::step(size_t startsubstep)
...
@@ -21,7 +21,14 @@ bool Expirament::step(size_t startsubstep)
switch
(
globalstep
%
STEP_COUNT
)
switch
(
globalstep
%
STEP_COUNT
)
{
{
case
0
:
case
0
:
if
((
globalstep
/
STEP_COUNT
)
==
20
)
{
ret
=
capacityMesureCycle
();
}
else
{
ret
=
thermalCycle
(
CYCLES_PER_STEP
,
startsubstep
);
ret
=
thermalCycle
(
CYCLES_PER_STEP
,
startsubstep
);
}
break
;
break
;
case
1
:
case
1
:
Log
(
Log
::
INFO
)
<<
"Charing for globalstep "
<<
globalstep
<<
" will be executed at "
<<
chargeThermalSteps
[
0
]
<<
" temperature"
;
Log
(
Log
::
INFO
)
<<
"Charing for globalstep "
<<
globalstep
<<
" will be executed at "
<<
chargeThermalSteps
[
0
]
<<
" temperature"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment