Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VILLASdataprocessing
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ACS
Public
VILLASframework
VILLASdataprocessing
Commits
f7c1019a
Commit
f7c1019a
authored
6 years ago
by
Junjie Zhang
Browse files
Options
Downloads
Patches
Plain Diff
add converting dpsim ts to modelica ts
parent
20fee08f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.vscode/settings.json
+3
-0
3 additions, 0 deletions
.vscode/settings.json
villas/dataprocessing/validationtools.py
+15
-1
15 additions, 1 deletion
villas/dataprocessing/validationtools.py
with
18 additions
and
1 deletion
.vscode/settings.json
0 → 100644
+
3
−
0
View file @
f7c1019a
{
"python.pythonPath"
:
"D:
\\
Anaconda3
\\
python.exe"
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
villas/dataprocessing/validationtools.py
+
15
−
1
View file @
f7c1019a
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
import
os
import
os
from
readtools
import
*
from
.
readtools
import
*
"""
"""
The validationtools are used to validate the simulate results from the model.
The validationtools are used to validate the simulate results from the model.
...
@@ -83,6 +83,20 @@ def convert_simulink_to_modelica_timeseries(simseri):
...
@@ -83,6 +83,20 @@ def convert_simulink_to_modelica_timeseries(simseri):
res
.
append
(
simseri
[
check
])
res
.
append
(
simseri
[
check
])
return
res
return
res
def
convert_dpsim_to_modelica_timeseries
(
dpsim_timeseries
):
"""
Convert the steady-state results timeseries from dpsim to modelica timeseries
:param dpsim_timeseries: dict of dpsim timeseries, generated by the csv result file from dpsim
:return: a list of dpsim timeseries
"""
ts_dpsimList
=
[]
for
ts
,
values
in
dpsim_timeseries
.
items
():
ts_abs
=
values
.
abs
(
ts
+
'
.Vpp
'
)
ts_phase
=
values
.
phase
(
ts
+
'
.Vangle
'
)
ts_phase
.
values
*=
np
.
pi
/
180
ts_dpsimList
.
append
(
ts_abs
)
ts_dpsimList
.
append
(
ts_phase
)
return
ts_dpsimList
def
compare_timeseries
(
ts1
,
ts2
):
def
compare_timeseries
(
ts1
,
ts2
):
"""
"""
...
...
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