-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotWithNp.py
More file actions
executable file
·56 lines (45 loc) · 1 KB
/
Copy pathplotWithNp.py
File metadata and controls
executable file
·56 lines (45 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# -*- coding: utf-8 -*-
"""
@author: vharavu
"""
import sys
import os
from os import listdir
from os.path import isfile, join
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import matplotlib.lines as mlines
plt.close("all")
current = []
voltage = []
soc = []
vOcv = []
file1 = '../../log/smplLogs/cITech3Ah.txt'
file2 = '../../log/smplLogs/jITech3Ah.txt'
with open(file2, mode='rt') as f:
f.readline()
for line in f:
current.append(line.split()[13])
voltage.append(line.split()[12])
soc.append(line.split()[1])
vOcv.append(line.split()[8])
#voltage.remove('vBt')
#current.remove('iBt')
#soc.remove('soc')
#vOcv.remove('vOcv')
plt.figure(1)
plt.subplot(411)
plt.plot(voltage, ':')
plt.ylabel("vBt")
plt.subplot(412)
plt.plot(current)
plt.axis([0, 2500, -2.1, 0.6])
plt.ylabel("iBt")
plt.subplot(413)
plt.plot(soc, '--')
plt.ylabel("SoC")
plt.subplot(414)
plt.plot(vOcv)
plt.ylabel("vOcv")
plt.show()