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
58e7eb24
Commit
58e7eb24
authored
1 year ago
by
Carl Philipp Klemm
Browse files
Options
Downloads
Patches
Plain Diff
Randomize temperature charge is preformed
parent
5c428f2e
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
coincell.cpp
+10
-0
10 additions, 0 deletions
coincell.cpp
coincell.h
+3
-0
3 additions, 0 deletions
coincell.h
expiramentimpl.h
+46
-6
46 additions, 6 deletions
expiramentimpl.h
with
59 additions
and
6 deletions
coincell.cpp
+
10
−
0
View file @
58e7eb24
...
@@ -34,6 +34,16 @@ bool CoinCell::measureOcv(float& ocv)
...
@@ -34,6 +34,16 @@ bool CoinCell::measureOcv(float& ocv)
return
ret
;
return
ret
;
}
}
void
CoinCell
::
setLastKnownCapacity
(
double
cap
)
{
lastKnownCap
=
cap
;
}
double
CoinCell
::
getLastKnownCapacity
()
{
return
lastKnownCap
;
}
bool
CoinCell
::
getTemperature
(
float
&
temperature
)
bool
CoinCell
::
getTemperature
(
float
&
temperature
)
{
{
bool
ret
=
heaters
->
getTemperature
(
heaterId
,
temperature
);
bool
ret
=
heaters
->
getTemperature
(
heaterId
,
temperature
);
...
...
This diff is collapsed.
Click to expand it.
coincell.h
+
3
−
0
View file @
58e7eb24
...
@@ -16,6 +16,7 @@ private:
...
@@ -16,6 +16,7 @@ private:
int
multiplexerCh
;
int
multiplexerCh
;
Heaters
*
heaters
;
Heaters
*
heaters
;
Multiplexers
*
multiplexers
;
Multiplexers
*
multiplexers
;
double
lastKnownCap
=
-
1
;
static
BioControl
biocontrol
;
static
BioControl
biocontrol
;
...
@@ -34,6 +35,8 @@ public:
...
@@ -34,6 +35,8 @@ public:
bool
isShorted
(
bool
&
detected
);
bool
isShorted
(
bool
&
detected
);
bool
measureEis
(
std
::
filesystem
::
path
path
,
std
::
string
userStr
=
""
);
bool
measureEis
(
std
::
filesystem
::
path
path
,
std
::
string
userStr
=
""
);
bool
setEnabled
(
bool
enable
);
bool
setEnabled
(
bool
enable
);
double
getLastKnownCapacity
();
void
setLastKnownCapacity
(
double
cap
);
static
void
setBiocontrol
(
const
BioControl
&
biocontrol
);
static
void
setBiocontrol
(
const
BioControl
&
biocontrol
);
};
};
This diff is collapsed.
Click to expand it.
expiramentimpl.h
+
46
−
6
View file @
58e7eb24
#include
"expirament.h"
#include
"expirament.h"
#include
<memory>
#include
<memory>
#include
<algorithm>
#include
"randomgen.h"
bool
Expirament
::
step
(
size_t
startsubstep
)
bool
Expirament
::
step
(
size_t
startsubstep
)
{
{
...
@@ -11,6 +14,8 @@ bool Expirament::step(size_t startsubstep)
...
@@ -11,6 +14,8 @@ bool Expirament::step(size_t startsubstep)
saveStep
(
startsubstep
);
saveStep
(
startsubstep
);
std
::
vector
<
double
>
steps
=
createStepSequence
(
3
,
2
,
0
,
1
);
std
::
vector
<
double
>
steps
=
createStepSequence
(
3
,
2
,
0
,
1
);
std
::
vector
<
double
>
chargeThermalSteps
(
5
);
std
::
for_each
(
chargeThermalSteps
.
begin
(),
chargeThermalSteps
.
end
(),
[](
double
&
in
){
in
=
rd
::
rand
(
1
,
0
);});
bool
ret
=
true
;
bool
ret
=
true
;
switch
(
globalstep
%
STEP_COUNT
)
switch
(
globalstep
%
STEP_COUNT
)
...
@@ -19,36 +24,71 @@ bool Expirament::step(size_t startsubstep)
...
@@ -19,36 +24,71 @@ bool Expirament::step(size_t startsubstep)
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"
;
setTemperatures
(
chargeThermalSteps
[
0
]);
ret
=
heaters
->
allReady
();
if
(
!
ret
)
{
Log
(
Log
::
ERROR
)
<<
"Not all heaters moved to ready state in globalstep"
<<
globalstep
;
break
;
}
ret
=
charge
(
steps
[
0
]);
ret
=
charge
(
steps
[
0
]);
ret
&=
takeMesurements
();
break
;
break
;
case
2
:
case
2
:
ret
=
thermalCycle
(
CYCLES_PER_STEP
,
startsubstep
);
ret
=
thermalCycle
(
CYCLES_PER_STEP
,
startsubstep
);
break
;
break
;
case
3
:
case
3
:
Log
(
Log
::
INFO
)
<<
"Charing for globalstep "
<<
globalstep
<<
" will be executed at "
<<
chargeThermalSteps
[
0
]
<<
" temperature"
;
setTemperatures
(
chargeThermalSteps
[
1
]);
ret
=
heaters
->
allReady
();
if
(
!
ret
)
{
Log
(
Log
::
ERROR
)
<<
"Not all heaters moved to ready state in globalstep"
<<
globalstep
;
break
;
}
ret
=
charge
(
steps
[
1
]);
ret
=
charge
(
steps
[
1
]);
ret
&=
takeMesurements
();
break
;
break
;
case
4
:
case
4
:
ret
=
thermalCycle
(
CYCLES_PER_STEP
,
startsubstep
);
ret
=
thermalCycle
(
CYCLES_PER_STEP
,
startsubstep
);
break
;
break
;
case
5
:
case
5
:
Log
(
Log
::
INFO
)
<<
"Charing for globalstep "
<<
globalstep
<<
" will be executed at "
<<
chargeThermalSteps
[
0
]
<<
" temperature"
;
setTemperatures
(
chargeThermalSteps
[
2
]);
ret
=
heaters
->
allReady
();
if
(
!
ret
)
{
Log
(
Log
::
ERROR
)
<<
"Not all heaters moved to ready state in globalstep"
<<
globalstep
;
break
;
}
ret
=
charge
(
steps
[
2
]);
ret
=
charge
(
steps
[
2
]);
ret
&=
takeMesurements
();
break
;
break
;
case
6
:
case
6
:
ret
=
thermalCycle
(
CYCLES_PER_STEP
);
ret
=
thermalCycle
(
CYCLES_PER_STEP
,
startsubstep
);
break
;
break
;
case
7
:
case
7
:
Log
(
Log
::
INFO
)
<<
"Charing for globalstep "
<<
globalstep
<<
" will be executed at "
<<
chargeThermalSteps
[
0
]
<<
" temperature"
;
setTemperatures
(
chargeThermalSteps
[
3
]);
ret
=
heaters
->
allReady
();
if
(
!
ret
)
{
Log
(
Log
::
ERROR
)
<<
"Not all heaters moved to ready state in globalstep"
<<
globalstep
;
break
;
}
ret
=
charge
(
steps
[
3
]);
ret
=
charge
(
steps
[
3
]);
ret
&=
takeMesurements
();
break
;
break
;
case
8
:
case
8
:
ret
=
thermalCycle
(
CYCLES_PER_STEP
,
startsubstep
);
ret
=
thermalCycle
(
CYCLES_PER_STEP
,
startsubstep
);
break
;
break
;
case
9
:
case
9
:
Log
(
Log
::
INFO
)
<<
"Charing for globalstep "
<<
globalstep
<<
" will be executed at "
<<
chargeThermalSteps
[
0
]
<<
" temperature"
;
setTemperatures
(
chargeThermalSteps
[
4
]);
ret
=
heaters
->
allReady
();
if
(
!
ret
)
{
Log
(
Log
::
ERROR
)
<<
"Not all heaters moved to ready state in globalstep"
<<
globalstep
;
break
;
}
ret
=
charge
(
steps
[
4
]);
ret
=
charge
(
steps
[
4
]);
ret
&=
takeMesurements
();
break
;
break
;
case
10
:
case
10
:
ret
=
thermalCycle
(
CYCLES_PER_STEP
,
startsubstep
);
ret
=
thermalCycle
(
CYCLES_PER_STEP
,
startsubstep
);
...
...
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