0

I have battery voltage data for one month I need to find out the cycle count for how many cycles the battery fully charged and discharged when the peak voltage value is grater than 53v and valley has to be inbetween 43 and 44 it has to detect one full cycle since I used peak detection algorithm it is not detecting correctly here is y data https://docs.google.com/spreadsheets/d/1K0XspcrpO94mv2wFgW45DzSjAO0Af1uSwmoHHVxDJwI/edit?usp=sharing

Script I used:

import numpy as np
op_col = []
for i in df["voltage"]:
 op_col.append(i)
np.set_printoptions(threshold=np.inf)
x = np.array(op_col)
from scipy.signal import find_peaks
peak, _ = find_peaks(x, width=800,prominence=1,height=51)
fig= plt.figure(figsize=(19,8))
plt.plot(x)
plt.xlim(0,45000)
plt.plot(peak, x[peak], "x", color = 'r')

This cycles count I need to get it how can I do that:

enter image description here

  • i don't think your current criteria (peak greater than 53) would be very good at detecting cycles. Observe the fourth and fifth peak; those would be missed. Probably better to base your charge times off of a numeric differential. – Reinderien Dec 08 '22 at 02:41

0 Answers0