2830 lines
1.7 MiB
Plaintext
2830 lines
1.7 MiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Initial Data Exploration"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 1,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import polars as pl\n",
|
||
|
"import pandas as pd\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"from io import StringIO\n",
|
||
|
"import math"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 2,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"df = pl.read_csv('output.csv')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 3,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"['',\n",
|
||
|
" 'time',\n",
|
||
|
" 'AVG_PACK_SOC',\n",
|
||
|
" 'AvgSOC',\n",
|
||
|
" 'AvgSOH',\n",
|
||
|
" 'BATT_PACK_1_DISCONN',\n",
|
||
|
" 'BATT_PACK_1_FAULT',\n",
|
||
|
" 'BATT_PACK_1_WARN',\n",
|
||
|
" 'BATT_PACK_2_DISCONN',\n",
|
||
|
" 'BATT_PACK_2_FAULT',\n",
|
||
|
" 'BATT_PACK_2_WARN',\n",
|
||
|
" 'BATT_PACK_3_DISCONN',\n",
|
||
|
" 'BATT_PACK_3_FAULT',\n",
|
||
|
" 'BATT_PACK_3_WARN',\n",
|
||
|
" 'BATT_PACK_4_DISCONN',\n",
|
||
|
" 'BATT_PACK_4_FAULT',\n",
|
||
|
" 'BATT_PACK_4_WARN',\n",
|
||
|
" 'BATT_PACK_5_DISCONN',\n",
|
||
|
" 'BATT_PACK_5_FAULT',\n",
|
||
|
" 'BATT_PACK_5_WARN',\n",
|
||
|
" 'BATT_PACK_6_DISCONN',\n",
|
||
|
" 'BATT_PACK_6_FAULT',\n",
|
||
|
" 'BATT_PACK_6_WARN',\n",
|
||
|
" 'BATT_PACK_7_DISCONN',\n",
|
||
|
" 'BATT_PACK_7_FAULT',\n",
|
||
|
" 'BATT_PACK_7_WARN',\n",
|
||
|
" 'BATT_ROOM_TEMP',\n",
|
||
|
" 'Current',\n",
|
||
|
" 'MAX_CELL_TEMP',\n",
|
||
|
" 'MAX_CELL_VOL',\n",
|
||
|
" 'MAX_PACK_SOC',\n",
|
||
|
" 'MAX_UNCONN_PACK_VOL',\n",
|
||
|
" 'MIN_CELL_TEMP',\n",
|
||
|
" 'MIN_CELL_VOL',\n",
|
||
|
" 'MIN_PACK_SOC',\n",
|
||
|
" 'MIN_UNCONN_PACK_VOL',\n",
|
||
|
" 'NUMBER_OF_PACKS_CONN',\n",
|
||
|
" 'NUMBER_OF_PACKS_FAULTED',\n",
|
||
|
" 'PACK1_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK1_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK1_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK1_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK1_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK1_CRIDATA_CURR',\n",
|
||
|
" 'PACK1_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK1_CRIDATA_SOC',\n",
|
||
|
" 'PACK1_CRIDATA_SOH',\n",
|
||
|
" 'PACK2_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK2_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK2_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK2_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK2_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK2_CRIDATA_CURR',\n",
|
||
|
" 'PACK2_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK2_CRIDATA_SOC',\n",
|
||
|
" 'PACK2_CRIDATA_SOH',\n",
|
||
|
" 'PACK3_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK3_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK3_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK3_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK3_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK3_CRIDATA_CURR',\n",
|
||
|
" 'PACK3_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK3_CRIDATA_SOC',\n",
|
||
|
" 'PACK3_CRIDATA_SOH',\n",
|
||
|
" 'PACK4_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK4_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK4_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK4_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK4_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK4_CRIDATA_CURR',\n",
|
||
|
" 'PACK4_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK4_CRIDATA_SOC',\n",
|
||
|
" 'PACK4_CRIDATA_SOH',\n",
|
||
|
" 'PACK5_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK5_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK5_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK5_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK5_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK5_CRIDATA_CURR',\n",
|
||
|
" 'PACK5_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK5_CRIDATA_SOC',\n",
|
||
|
" 'PACK5_CRIDATA_SOH',\n",
|
||
|
" 'PACK6_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK6_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK6_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK6_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK6_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK6_CRIDATA_CURR',\n",
|
||
|
" 'PACK6_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK6_CRIDATA_SOC',\n",
|
||
|
" 'PACK6_CRIDATA_SOH',\n",
|
||
|
" 'PACK7_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK7_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK7_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK7_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK7_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK7_CRIDATA_CURR',\n",
|
||
|
" 'PACK7_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK7_CRIDATA_SOC',\n",
|
||
|
" 'PACK7_CRIDATA_SOH',\n",
|
||
|
" 'PACK_1_STATUS',\n",
|
||
|
" 'PACK_2_STATUS',\n",
|
||
|
" 'PACK_3_STATUS',\n",
|
||
|
" 'PACK_4_STATUS',\n",
|
||
|
" 'PACK_5_STATUS',\n",
|
||
|
" 'PACK_6_STATUS',\n",
|
||
|
" 'PACK_7_STATUS',\n",
|
||
|
" 'RunningState',\n",
|
||
|
" 'Voltage',\n",
|
||
|
" 'valuestreamname']"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 3,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df.columns"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 25,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"s = df['PACK1_CRIDATA_BATT_VOL']\n",
|
||
|
"s1 = s.cast(pl.Float32)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 29,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.collections.PathCollection at 0x7fb2b99838b0>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 29,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAGdCAYAAAA44ojeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAA3T0lEQVR4nO3de3hUVYLu/zcJSRFiUiZcUpQkEhxa0KACIg0yDTa3ZsBLYw94GY/9jKdHW6A7LV7gOLZoH7nogP5+Q6Otp4/a7Sj0cxTH54it2CpKgy1yUUCkOQMSENIBJlTCLeGyzx+eVFNJ7aq9d3alVoXv53nyPLBqVdWq2re31l577SzLsiwBAAAYJDvdDQAAAGiJgAIAAIxDQAEAAMYhoAAAAOMQUAAAgHEIKAAAwDgEFAAAYBwCCgAAME6ndDfAizNnzmjfvn0qLCxUVlZWupsDAAAcsCxLDQ0NCofDys5O3EeSkQFl3759KisrS3czAACAB3v27FGvXr0S1snIgFJYWCjpmw9YVFSU5tYAAAAn6uvrVVZWFj2OJ5KRAaX5tE5RUREBBQCADONkeAaDZAEAgHEIKAAAwDgEFAAAYBwCCgAAMA4BBQAAGIeAAgAAjENAAQAAxiGgAAAA4xBQAACAcQgoAADAOBk51T0AnMs2Vtdp18GjquhWoIHlxeluDpAS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Hhzr6ZLORJwe/BMd0BOeSvGJl4N/fm6OjjTGP7B5/UXenj1vLeXkZOmMi3XGyWfsZLNcnfTWVHSLf3ooFZwMKHfLa0+CHz2ikhTM76RIktN2TsYCNcv
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.scatter(range(len(s1)), s1, marker='o', s=10)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 24,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"ename": "NameError",
|
||
|
"evalue": "name 's1' is not defined",
|
||
|
"output_type": "error",
|
||
|
"traceback": [
|
||
|
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
||
|
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
|
||
|
"Cell \u001b[0;32mIn[24], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m plt\u001b[39m.\u001b[39mscatter(s1\u001b[39m.\u001b[39mfill_null(strategy\u001b[39m=\u001b[39m\u001b[39m'\u001b[39m\u001b[39mbackward\u001b[39m\u001b[39m'\u001b[39m))\n",
|
||
|
"\u001b[0;31mNameError\u001b[0m: name 's1' is not defined"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.scatter(s1.fill_null(strategy='backward'))"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 26,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"size = len(s1)\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 45,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"start_index = 0\n",
|
||
|
"# end_index = math.floor(size/2)\n",
|
||
|
"end_index = 60000"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 48,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"[<matplotlib.lines.Line2D at 0x7feea4e44910>]"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 48,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjAAAAGdCAYAAAAMm0nCAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAArC0lEQVR4nO3de3RU5b3/8c/kNrk4jARIhpEYo42iBBGDPwSxoFytXE45q2BFK+dgiwvBk4racrDH6G8ZKK3IMRyx8KOIUqRntWLp0SqhRSonWDHUFlABBbmZkIohF41JIM/vD5rdzECAyWVm9p73a61Zkr2fmTz762TmM89+nj0uY4wRAACAjcRFugMAAAChIsAAAADbIcAAAADbIcAAAADbIcAAAADbIcAAAADbIcAAAADbIcAAAADbSYh0B9qjublZn376qTwej1wuV6S7AwAALoAxRrW1tfL7/YqL69gYii0DzKeffqqsrKxIdwMAALTD4cOH1adPnw49hi0DjMfjkXS6AN26dYtwbwAAwIWoqalRVlaW9T7eEbYMMC2njbp160aAAQDAZjpj+geTeAEAgO0QYAAAgO0QYAAAgO0QYAAAgO0QYAAAgO0QYAAAgO0QYAAAgO0QYAAAgO0QYAAAgO0QYAAAgO0QYAAAgO0QYAAAgO0QYIBOUPNVk5a9+bEOf/5lpLsCADGBAAN0gv/72/f149c/1D8vK410VwAgJhBggE7w5t6/SZIqaxsi3BMAiA0Jke4A4ASuVv/euLsiYF9iQpyGXN5DyYnx4e0UADgYAQboBGnuBOnvoy/fe7HsrG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figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.plot(s1.fill_null(strategy='forward')[100:end_index])"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 56,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"[<matplotlib.lines.Line2D at 0x7feea49b2680>]"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 56,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAGdCAYAAAA44ojeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAytUlEQVR4nO3df3TU1Z3/8ddkJpn8aDIJUBKyRIwuK7WwLgZXxR+wRUOtFHvYU7S6Vre0BxekTcWiLNs19XwLSityClVXDwUqi/jdVbqeta2GFagUbSliVXTRb6WIlWyObpgE8jtzv38kn0+YkAQmycznfibPxzlzhJk7k/s5n4S8vPd97w0YY4wAAAAskuF1BwAAAHojoAAAAOsQUAAAgHUIKAAAwDoEFAAAYB0CCgAAsA4BBQAAWIeAAgAArBPyugODEYvF9NFHHyk/P1+BQMDr7gAAgLNgjFFjY6NKS0uVkTHwGIkvA8pHH32ksrIyr7sBAAAG4ejRoxo/fvyAbXwZUPLz8yV1XWBBQYHHvQEAAGejoaFBZWVl7u/xgfgyoDjTOgUFBQQUAAB85mzKMyiSBQAA1iGgAAAA6xBQAACAdQgoAADAOgQUAABgHQIKAACwDgEFAABYh4ACAACsQ0ABAADWIaAAAADrEFAAAIB1CCgAAMA6vjwsMFk+P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WWLTV2d5FlBAUpREABAMu4S40tq0FhF1mkEgEFACzTM8VjSw0Kq3iQegQUALCMbXuhRDkoEB4goACAZSKW7SbLKh54gYACAJZxi2QtGUF
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"\n",
|
||
|
"plt.plot(s1.fill_null(strategy='zero')[57700:57720])"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"Analysis: The voltage drops from 800 to 0 in a very short span of time. I doubt that it is due to the battery discharge, since it quickly resumes to its normal voltage"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"What is the time?"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 60,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"2022-10-19T05:19:00Z\n",
|
||
|
"2022-10-19T05:20:00Z\n",
|
||
|
"2022-10-19T05:21:00Z\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"print(df['time'][57700])\n",
|
||
|
"print(df['time'][57701])\n",
|
||
|
"print(df['time'][57702])"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 66,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"40"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 66,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df.columns.index('PACK1_CRIDATA_BATT_VOL')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 82,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"['',\n",
|
||
|
" 'time',\n",
|
||
|
" 'AVG_PACK_SOC',\n",
|
||
|
" 'AvgSOC',\n",
|
||
|
" 'AvgSOH',\n",
|
||
|
" 'BATT_PACK_1_DISCONN',\n",
|
||
|
" 'BATT_PACK_1_FAULT',\n",
|
||
|
" 'BATT_PACK_1_WARN',\n",
|
||
|
" 'BATT_PACK_2_DISCONN',\n",
|
||
|
" 'BATT_PACK_2_FAULT',\n",
|
||
|
" 'BATT_PACK_2_WARN',\n",
|
||
|
" 'BATT_PACK_3_DISCONN',\n",
|
||
|
" 'BATT_PACK_3_FAULT',\n",
|
||
|
" 'BATT_PACK_3_WARN',\n",
|
||
|
" 'BATT_PACK_4_DISCONN',\n",
|
||
|
" 'BATT_PACK_4_FAULT',\n",
|
||
|
" 'BATT_PACK_4_WARN',\n",
|
||
|
" 'BATT_PACK_5_DISCONN',\n",
|
||
|
" 'BATT_PACK_5_FAULT',\n",
|
||
|
" 'BATT_PACK_5_WARN',\n",
|
||
|
" 'BATT_PACK_6_DISCONN',\n",
|
||
|
" 'BATT_PACK_6_FAULT',\n",
|
||
|
" 'BATT_PACK_6_WARN',\n",
|
||
|
" 'BATT_PACK_7_DISCONN',\n",
|
||
|
" 'BATT_PACK_7_FAULT',\n",
|
||
|
" 'BATT_PACK_7_WARN',\n",
|
||
|
" 'BATT_ROOM_TEMP',\n",
|
||
|
" 'Current',\n",
|
||
|
" 'MAX_CELL_TEMP',\n",
|
||
|
" 'MAX_CELL_VOL',\n",
|
||
|
" 'MAX_PACK_SOC',\n",
|
||
|
" 'MAX_UNCONN_PACK_VOL',\n",
|
||
|
" 'MIN_CELL_TEMP',\n",
|
||
|
" 'MIN_CELL_VOL',\n",
|
||
|
" 'MIN_PACK_SOC',\n",
|
||
|
" 'MIN_UNCONN_PACK_VOL',\n",
|
||
|
" 'NUMBER_OF_PACKS_CONN',\n",
|
||
|
" 'NUMBER_OF_PACKS_FAULTED',\n",
|
||
|
" 'PACK1_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK1_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK1_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK1_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK1_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK1_CRIDATA_CURR',\n",
|
||
|
" 'PACK1_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK1_CRIDATA_SOC',\n",
|
||
|
" 'PACK1_CRIDATA_SOH',\n",
|
||
|
" 'PACK2_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK2_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK2_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK2_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK2_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK2_CRIDATA_CURR',\n",
|
||
|
" 'PACK2_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK2_CRIDATA_SOC',\n",
|
||
|
" 'PACK2_CRIDATA_SOH',\n",
|
||
|
" 'PACK3_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK3_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK3_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK3_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK3_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK3_CRIDATA_CURR',\n",
|
||
|
" 'PACK3_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK3_CRIDATA_SOC',\n",
|
||
|
" 'PACK3_CRIDATA_SOH',\n",
|
||
|
" 'PACK4_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK4_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK4_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK4_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK4_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK4_CRIDATA_CURR',\n",
|
||
|
" 'PACK4_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK4_CRIDATA_SOC',\n",
|
||
|
" 'PACK4_CRIDATA_SOH',\n",
|
||
|
" 'PACK5_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK5_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK5_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK5_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK5_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK5_CRIDATA_CURR',\n",
|
||
|
" 'PACK5_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK5_CRIDATA_SOC',\n",
|
||
|
" 'PACK5_CRIDATA_SOH',\n",
|
||
|
" 'PACK6_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK6_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK6_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK6_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK6_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK6_CRIDATA_CURR',\n",
|
||
|
" 'PACK6_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK6_CRIDATA_SOC',\n",
|
||
|
" 'PACK6_CRIDATA_SOH',\n",
|
||
|
" 'PACK7_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK7_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK7_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK7_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK7_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK7_CRIDATA_CURR',\n",
|
||
|
" 'PACK7_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK7_CRIDATA_SOC',\n",
|
||
|
" 'PACK7_CRIDATA_SOH',\n",
|
||
|
" 'PACK_1_STATUS',\n",
|
||
|
" 'PACK_2_STATUS',\n",
|
||
|
" 'PACK_3_STATUS',\n",
|
||
|
" 'PACK_4_STATUS',\n",
|
||
|
" 'PACK_5_STATUS',\n",
|
||
|
" 'PACK_6_STATUS',\n",
|
||
|
" 'PACK_7_STATUS',\n",
|
||
|
" 'RunningState',\n",
|
||
|
" 'Voltage',\n",
|
||
|
" 'valuestreamname']"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 82,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df.columns"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 80,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"['PACK1_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK1_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK1_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK1_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK1_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK1_CRIDATA_CURR',\n",
|
||
|
" 'PACK1_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK1_CRIDATA_SOC',\n",
|
||
|
" 'PACK1_CRIDATA_SOH']"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 80,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df.columns[38:47]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 95,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<bound method DataFrame.melt of shape: (3, 9)\n",
|
||
|
"┌───────────┬───────────┬───────────┬───────────┬───┬───────────┬───────────┬───────────┬──────────┐\n",
|
||
|
"│ PACK1_CRI ┆ PACK1_CRI ┆ PACK1_CRI ┆ PACK1_CRI ┆ … ┆ PACK1_CRI ┆ PACK1_CRI ┆ PACK1_CRI ┆ PACK1_CR │\n",
|
||
|
"│ DATA_AVG_ ┆ DATA_AVG_ ┆ DATA_BATT ┆ DATA_BUS_ ┆ ┆ DATA_CURR ┆ DATA_DISC ┆ DATA_SOC ┆ IDATA_SO │\n",
|
||
|
"│ CELL_TEMP ┆ CELL_VOL ┆ _VOL ┆ VOL ┆ ┆ --- ┆ HARGE_CUR ┆ --- ┆ H │\n",
|
||
|
"│ --- ┆ --- ┆ --- ┆ --- ┆ ┆ str ┆ R_LIM… ┆ str ┆ --- │\n",
|
||
|
"│ str ┆ str ┆ str ┆ str ┆ ┆ ┆ --- ┆ ┆ str │\n",
|
||
|
"│ ┆ ┆ ┆ ┆ ┆ ┆ str ┆ ┆ │\n",
|
||
|
"╞═══════════╪═══════════╪═══════════╪═══════════╪═══╪═══════════╪═══════════╪═══════════╪══════════╡\n",
|
||
|
"│ 26.0 ┆ 3961.0 ┆ 904.0 ┆ 0.0 ┆ … ┆ 0.0 ┆ 471.0 ┆ 80.0 ┆ 100.0 │\n",
|
||
|
"│ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ … ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 │\n",
|
||
|
"│ 26.0 ┆ 3961.0 ┆ 904.0 ┆ 0.0 ┆ … ┆ 0.0 ┆ 471.0 ┆ 80.0 ┆ 100.0 │\n",
|
||
|
"└───────────┴───────────┴───────────┴───────────┴───┴───────────┴───────────┴───────────┴──────────┘>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 95,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df[57712:57715, 38:47].melt"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 96,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<bound method DataFrame.melt of shape: (3, 3)\n",
|
||
|
"┌─────────────────────┬───────────────────┬──────────────────┐\n",
|
||
|
"│ BATT_PACK_1_DISCONN ┆ BATT_PACK_1_FAULT ┆ BATT_PACK_1_WARN │\n",
|
||
|
"│ --- ┆ --- ┆ --- │\n",
|
||
|
"│ str ┆ str ┆ str │\n",
|
||
|
"╞═════════════════════╪═══════════════════╪══════════════════╡\n",
|
||
|
"│ True ┆ False ┆ False │\n",
|
||
|
"│ null ┆ null ┆ null │\n",
|
||
|
"│ True ┆ False ┆ False │\n",
|
||
|
"└─────────────────────┴───────────────────┴──────────────────┘>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 96,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df[57712:57715, 5:8].melt"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"Turns out it was just a missing data row"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 88,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<div><style>\n",
|
||
|
".dataframe > thead > tr > th,\n",
|
||
|
".dataframe > tbody > tr > td {\n",
|
||
|
" text-align: right;\n",
|
||
|
"}\n",
|
||
|
"</style>\n",
|
||
|
"<small>shape: (3, 2)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>BATT_PACK_1_DISCONN</th><th>counts</th></tr><tr><td>str</td><td>u32</td></tr></thead><tbody><tr><td>"False"</td><td>150260</td></tr><tr><td>"True"</td><td>51769</td></tr><tr><td>null</td><td>71932</td></tr></tbody></table></div>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"shape: (3, 2)\n",
|
||
|
"┌─────────────────────┬────────┐\n",
|
||
|
"│ BATT_PACK_1_DISCONN ┆ counts │\n",
|
||
|
"│ --- ┆ --- │\n",
|
||
|
"│ str ┆ u32 │\n",
|
||
|
"╞═════════════════════╪════════╡\n",
|
||
|
"│ False ┆ 150260 │\n",
|
||
|
"│ True ┆ 51769 │\n",
|
||
|
"│ null ┆ 71932 │\n",
|
||
|
"└─────────────────────┴────────┘"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 88,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df['BATT_PACK_1_DISCONN'].value_counts()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"A strategy we can employ is to try to convert all 0 values in voltage to their neighbor values (interpolate)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Finding anomalies"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 9,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<div><style>\n",
|
||
|
".dataframe > thead > tr > th,\n",
|
||
|
".dataframe > tbody > tr > td {\n",
|
||
|
" text-align: right;\n",
|
||
|
"}\n",
|
||
|
"</style>\n",
|
||
|
"<small>shape: (5, 2)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>PACK_1_STATUS</th><th>counts</th></tr><tr><td>str</td><td>u32</td></tr></thead><tbody><tr><td>null</td><td>66165</td></tr><tr><td>"1.0"</td><td>56</td></tr><tr><td>"274.0"</td><td>1</td></tr><tr><td>"100.0"</td><td>1</td></tr><tr><td>"0.0"</td><td>207738</td></tr></tbody></table></div>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"shape: (5, 2)\n",
|
||
|
"┌───────────────┬────────┐\n",
|
||
|
"│ PACK_1_STATUS ┆ counts │\n",
|
||
|
"│ --- ┆ --- │\n",
|
||
|
"│ str ┆ u32 │\n",
|
||
|
"╞═══════════════╪════════╡\n",
|
||
|
"│ null ┆ 66165 │\n",
|
||
|
"│ 1.0 ┆ 56 │\n",
|
||
|
"│ 274.0 ┆ 1 │\n",
|
||
|
"│ 100.0 ┆ 1 │\n",
|
||
|
"│ 0.0 ┆ 207738 │\n",
|
||
|
"└───────────────┴────────┘"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 9,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df['PACK_1_STATUS'].value_counts()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 11,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<div><style>\n",
|
||
|
".dataframe > thead > tr > th,\n",
|
||
|
".dataframe > tbody > tr > td {\n",
|
||
|
" text-align: right;\n",
|
||
|
"}\n",
|
||
|
"</style>\n",
|
||
|
"<small>shape: (3, 2)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>BATT_PACK_1_DISCONN</th><th>counts</th></tr><tr><td>str</td><td>u32</td></tr></thead><tbody><tr><td>"False"</td><td>150260</td></tr><tr><td>null</td><td>71932</td></tr><tr><td>"True"</td><td>51769</td></tr></tbody></table></div>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"shape: (3, 2)\n",
|
||
|
"┌─────────────────────┬────────┐\n",
|
||
|
"│ BATT_PACK_1_DISCONN ┆ counts │\n",
|
||
|
"│ --- ┆ --- │\n",
|
||
|
"│ str ┆ u32 │\n",
|
||
|
"╞═════════════════════╪════════╡\n",
|
||
|
"│ False ┆ 150260 │\n",
|
||
|
"│ null ┆ 71932 │\n",
|
||
|
"│ True ┆ 51769 │\n",
|
||
|
"└─────────────────────┴────────┘"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 11,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df['BATT_PACK_1_DISCONN'].value_counts()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 13,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<div><style>\n",
|
||
|
".dataframe > thead > tr > th,\n",
|
||
|
".dataframe > tbody > tr > td {\n",
|
||
|
" text-align: right;\n",
|
||
|
"}\n",
|
||
|
"</style>\n",
|
||
|
"<small>shape: (3, 2)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>BATT_PACK_1_FAULT</th><th>counts</th></tr><tr><td>str</td><td>u32</td></tr></thead><tbody><tr><td>"False"</td><td>137042</td></tr><tr><td>null</td><td>136820</td></tr><tr><td>"True"</td><td>99</td></tr></tbody></table></div>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"shape: (3, 2)\n",
|
||
|
"┌───────────────────┬────────┐\n",
|
||
|
"│ BATT_PACK_1_FAULT ┆ counts │\n",
|
||
|
"│ --- ┆ --- │\n",
|
||
|
"│ str ┆ u32 │\n",
|
||
|
"╞═══════════════════╪════════╡\n",
|
||
|
"│ False ┆ 137042 │\n",
|
||
|
"│ null ┆ 136820 │\n",
|
||
|
"│ True ┆ 99 │\n",
|
||
|
"└───────────────────┴────────┘"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 13,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df['BATT_PACK_1_FAULT'].value_counts()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 14,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<div><style>\n",
|
||
|
".dataframe > thead > tr > th,\n",
|
||
|
".dataframe > tbody > tr > td {\n",
|
||
|
" text-align: right;\n",
|
||
|
"}\n",
|
||
|
"</style>\n",
|
||
|
"<small>shape: (3, 2)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>BATT_PACK_1_WARN</th><th>counts</th></tr><tr><td>str</td><td>u32</td></tr></thead><tbody><tr><td>"True"</td><td>148</td></tr><tr><td>null</td><td>131051</td></tr><tr><td>"False"</td><td>142762</td></tr></tbody></table></div>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"shape: (3, 2)\n",
|
||
|
"┌──────────────────┬────────┐\n",
|
||
|
"│ BATT_PACK_1_WARN ┆ counts │\n",
|
||
|
"│ --- ┆ --- │\n",
|
||
|
"│ str ┆ u32 │\n",
|
||
|
"╞══════════════════╪════════╡\n",
|
||
|
"│ True ┆ 148 │\n",
|
||
|
"│ null ┆ 131051 │\n",
|
||
|
"│ False ┆ 142762 │\n",
|
||
|
"└──────────────────┴────────┘"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 14,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df['BATT_PACK_1_WARN'].value_counts()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 5,
|
||
|
"metadata": {},
|
||
|
"output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dok2bNrHffvvFZZddVqGunXPOObHTTjvFiy++GEOHDo327dvH0UcfHRGbfjp1wQUXxJ133hn77bdftG3bNj796U/H3//+96w+Kju9vDa1/uWXX46hQ4dG27ZtY5dddomvf/3rMXny5MjLy4tHH310W1chfOw40g3b2T//+c/47Gc/GwMHDox77703NmzYEDfccEMsWrSo2vFuuOGGGDt2bFx55ZUxZMiQWLduXbz66quxbNmy8jbPP/98fOYzn4nOnTvHddddF5/85CejuLg4HnjggVi7dm3k5+fHa6+9FoMGDYouXbrEL3/5y+jUqVPcddddcc4558SiRYviu9/9btZ0L7/88jjssMPi97//fZSVlcWll14aJ510UsydOzeaN29e3q6kpCTOOuusuPjii+Oaa66JSZMmxZgxY6J79+7xpS99KSI27Wk//PDD4+23347LL788DjzwwHj55Zfj6quvjhdffDEefvjh8t+1n3POOXHXXXfFueeeG9ddd120atUqnn322fJ/ACZNmhRf+MIXorCwMG666aaIiMjPz6/VdDKZTHzuc5+LGTNmxNVXXx2HHnpoPPnkk3H88cdv03sMAFXZf//9o1u3bvHwww/HF7/4xYiIePjhh6NNmzbxyiuvxLvvvhvdu3eP9evXx/Tp02P06NEREfH666/HCSecEBdeeGG0a9cuXn311fjRj34UTz31VPzrX//KmsbatWvj5JNPjvPPPz8uu+yyWL9+fflrkydPjqeffjquu+662GmnneKGG26IU045JV577bXYa6+9qp33XGp9cXFxHH744dGuXbu4+eabo0uXLjFhwoS44IIL6nM1wsdLBtiu+vfvn+nevXtm1apV5cPKysoyHTt2zGz5kdxzzz0zX/7yl8ufDx8+PHPQQQdV2/dRRx2V2XnnnTOLFy+uss3pp5+eyc/PzyxYsCBr+PHHH59p27ZtZtmyZZlMJpN55JFHMhGROeGEE7La/elPf8pERGbmzJnlww4//PBMRGT+/e9/Z7Xt1atX5rjjjit/Pm7cuEyzZs0yTz/9dFa7P//5z5mIyEyZMiWTyWQyjz32WCYiMldccUW1y7v//vtnDj/88ArDc53Ogw8+mImIzC9+8Yusdj/4wQ8yEZG55pprqp0+ANTF2Wefndlrr73Knx9zzDGZUaNGZTp06JD5wx/+kMlkMpknn3wyExGZhx56qML4GzduzKxbty4zffr0TERknn/++fLXvvzlL2ciInP77bdXGC8iMl27ds2UlZWVDyspKck0a9YsM27cuPJhd9xxRyYiMvPmzSsflmut/853vpPJy8vLvPzyy1ntjjvuuExEZB555JEa1g40PU4vh+3oww8/jKeffjpOPfXUaN26dfnw9u3bx0knnVTtuP369Yvnn38+vva1r8U//vGPKCsry3p95cqVMX369DjttNOq/R3Wv/71rzj66KNj9913zxp+zjnnxMqVK2PmzJlZw08++eSs5wceeGBERLz11ltZw4uKiqJfv34V2m7Z7u9//3v07t07DjrooFi/fn3547jjjss65ezBBx+MiIivf/3rVS5HdXKdziOPPBIREWeddVbW+GeeeWadpgsAuTj66KPjzTffjHnz5sXq1avjiSeeiGHDhsWRRx4Z06ZNi4hNR7/z8/PjM5/5TEREvPnmm3HmmWdGUVFRNG/ePFq2bBmHH354RETMnTu3wjQ+//nPVzrtI488Mtq3b1/+vGvXrtGlS5cKdb0yudT66dOnR+/evaNXr15Z7c4444wa+4emyunlsB0tXbo0Nm7cGEVFRRVeq2zYlsaMGRPt2rWLu+66K377299G8+bNY8iQIfGjH/0oDjnkkFi6dGls2LAhdtttt2r7WbJkSaVXI+3evXv561vq1KlT1vPNp3CvWrWq2nab227ZbtGiRfHf//43WrZsWem8vf/++xER8d5770Xz5s1rXCdVyXU6S5YsiRYtWlSY97pOFwByccwxx0TEpmDds2fPWLduXRx11FGxaNGi+N73vlf+2mGHHRZt2rSJFStWxODBg6N169bx/e9/Pz71qU9F27ZtY+HChXHqqadWqMlt27at8g4oudTrquQy7pIlS6Jnz54V2nXt2rXG/qGpErphO+rQoUPk5eVFSUlJhdcqG7alFi1axEUXXRQXXXRRLFu2LB5++OG4/PLL47jjjouFCxdGx44do3nz5vH2229X20+nTp2iuLi4wvB33303IiI6d+5ciyWqnc6dO0ebNm3i9ttvr/L1iE1XTd2wYUOUlJTU6XYluU6nU6dOsX79+liyZEnWPxI1vRcAsC122223+NSnPhUPP/xw9OjRIw455JDYeeed4+ijj46vfe1r8e9//ztmzZoV1157bURsOkvt3XffjUcffbT86HZEZF3XZUubr4/SEDp16lTpdWrUVnZkTi+H7ahdu3bRr1+/uP/++2P16tXlw5cvXx5/+9vfcu5n5513ji984Qvx9a9/PT744IOYP39+tGnTJg4//PD4v//7v/IjuZU5+uijy4v3lv74xz9G27ZtY8CAAbVfsBwNHz483njjjejUqVMccsghFR6brz6++UJmN998c7X9VbVnPtfpHHnkkRERcffdd2eNf88992zjkgJA9Y455pj417/+FdOmTYtjjz02IiI+9alPxR577BFXX311rFu3rvyI+OYQvflss81+97vfbd+ZzsHhhx8eL730UrzyyitZw++9994GmiNoeI50w3b2ve99L4YNGxbHHntsXHzxxbFhw4b40Y9+FO3atYsPPvigyvFOOumk6N27dxxyyCGxyy67xFtvvRU///nPY88994xPfvKTERFx4403xmc+85no379/XHbZZfGJT3wiFi1aFA888ED87ne/i/bt28c111wTf//73+PII4+Mq6++Ojp27Bh33313TJ48OW644YYoLCxMtuwXXnhh3HfffTFkyJD49re/HQceeGBs3LgxFixYEA899FBcfPHF0b9//xg
|
||
|
"text/plain": [
|
||
|
"<Figure size 1000x1600 with 4 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"\n",
|
||
|
"def convert_values(values):\n",
|
||
|
" numerical_values = []\n",
|
||
|
" for value in values:\n",
|
||
|
" if value == 'False':\n",
|
||
|
" numerical_values.append(0)\n",
|
||
|
" elif value == 'True':\n",
|
||
|
" numerical_values.append(1)\n",
|
||
|
" else:\n",
|
||
|
" numerical_values.append(-1)\n",
|
||
|
" return numerical_values\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"numerical_values1 = convert_values(df['BATT_PACK_1_DISCONN'])\n",
|
||
|
"numerical_values2 = convert_values(df['BATT_PACK_1_WARN'])\n",
|
||
|
"numerical_values3 = convert_values(df['BATT_PACK_1_FAULT'])\n",
|
||
|
"numerical_values4 = df['PACK1_CRIDATA_BATT_VOL'].cast(pl.Float32).fill_null(strategy='backward')\n",
|
||
|
"\n",
|
||
|
"fig, axs = plt.subplots(nrows=2, ncols=2, figsize=(10,10))\n",
|
||
|
"axs[0,0].scatter(range(len(numerical_values1)), numerical_values1)\n",
|
||
|
"axs[0,0].set_title(\"disconnected\")\n",
|
||
|
"axs[0,1].scatter(range(len(numerical_values2)), numerical_values2)\n",
|
||
|
"axs[0,1].set_title(\"warning\")\n",
|
||
|
"axs[1,0].scatter(range(len(numerical_values3)), numerical_values3)\n",
|
||
|
"axs[1,0].set_title(\"fault\")\n",
|
||
|
"axs[1,1].scatter(range(len(numerical_values4)), numerical_values4)\n",
|
||
|
"axs[1,1].set_title(\"voltage\")\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 56,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"(800.0, 1000.0)"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 56,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA08AAAUBCAYAAABUvLo8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAADltklEQVR4nOzde3gV1bk/8G8ISQgxhEBIQiAbAwJJA4VE8YK0gCJp6g2hB1BrrbVWD9SWipRQ66mXIijHWxFrz3l62v5UFFsuvViKgEpNoSaSQBHCHdnhEhJkk4QQkpDs3x90b7OzZ2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bU6ePIlPP/00uM11112H+vp6lJWVBbf5+OOPUV9fH9yGiIiIiIhIb7rOPJ07dw4HDx4Mfn3kyBHs2LED/fr1g8fjwbx58/DMM89g+PDhGD58OJ555hn07t0bd911FwAgJSUF999/P+bPn4/+/fujX79+ePTRRzF69GhMmTIFAJCXl4evfe1reOCBB/CrX/0KAPC9730Pt9xyCzPtERERERGRYXQdPH3yySeYPHly8OvAe0b33nsvfvvb3+LHP/4xmpubMWfOHPh8PlxzzTV47733QuILX3zxRfTs2RMzZ85Ec3MzbrzxRvz2t79FbGxscJs333wTP/jBD4JZ+W677TbZtaWIiIiIiIj0YNg6T3bW0NCAlJQU1NfX850nIiIiIiIX0zI2MO2dJyIiIiIiIpFx8ERERERERKQCB09EREREREQqcPBERERERESkAgdPREREREREKnDwREREREREpAIHT0RERERERCpw8ERERERERKQCB09EREREREQqcPBERERERESkAgdPREREREREKnDwREREREREpAIHT0RERERERCpw8ERERERERKQCB09EREREREQqcPBERERERESkAgdPREREREREKnDwREREREREpAIHT0RERERERCpw8ERERERERKQCB09EREREREQqcPBERERERESkAgdPREREREREKnDwREREREREpAIHT0RERERERCpw8ERERERERKQCB09EREREREQqcPBERERERESkAgdPREREREREKnDwREREREREpAIHT0RERERERCpw8ERERERERKQCB09EREREREQqcPBERERERESkAgdPREREREREKnDwREREREREpAIHT0RERERERCpw8ERERERERKQCB09EREREREQqcPBERERERESkAgdPREREREREKnDwREREREREpAIHT0RERERERCpw8ERERERERKQCB09EREREREQqcPBERERERESkAgdPREREREREKnDwREREREREpAIHT0RERERERCpw8ERERERERKQCB09EREREREQqcPBERERERESkAgdPREREREREKnDwREREREREpAIHT0RERERERCpw8ERERERERKQCB09EREREREQqcPBERERERESkAgdPREREREREKpg+eGpsbMS8efMwZMgQJCYmYvz48SgvLw9+PyYmRvLfsmXLgttMmjQp7PuzZ882+1CIiIiIiMhFepr9C7/73e/i008/xeuvv46srCy88cYbmDJlCvbs2YNBgwbh5MmTIduvX78e999/P2bMmBFS/sADD+Cpp54Kfp2YmGjK/hMRERERkTuZOnhqbm7G6tWr8cc//hFf/epXAQBPPPEE1q1bh1/+8pf4+c9/jszMzJCf+eMf/4jJkydj6NChIeW9e/cO25aIiIiIiMgopobtXbx4Ee3t7ejVq1dIeWJiIkpLS8O2P3XqFN59913cf//9Yd978803kZaWhvz8fDz66KNobGyU/b0tLS1oaGgI+UdERERERKSFqTNPycnJuO666/D0008jLy8PGRkZeOutt/Dxxx9j+PDhYdv/7ne/Q3JyMqZPnx5SfvfddyMnJweZmZn49NNPsWjRIuzcuRMbN26U/L1LlizBk08+acgxERERERGRO8T4/X6/mb/w0KFD+M53voO///3viI2NRWFhIUaMGIGKigrs2bMnZNvc3FzcdNNNWL58ueJnbt++HVdddRW2b9+OwsLCsO+3tLSgpaUl+HVDQwOys7NRX1+PPn366HNgREREREQknIaGBqSkpKgaG5iebW/YsGHYsmULzp07h+rqapSVlaGtrQ05OTkh23300UfYt28fvvvd70b8zMLCQsTFxeHAgQOS309ISECfPn1C/hEREREREWlh2TpPSUlJGDhwIHw+HzZs2IDbb7895Pu//vWvceWVV2LMmDERP2v37t1oa2vDwIEDjdpdIiIiIiJyOdNTlW/YsAF+vx8jR47EwYMHsWDBAowcORL33XdfcJuGhgb8/ve/x/PPPx/284cOHcKbb76Jr3/960hLS8OePXswf/58FBQU4PrrrzfzUIiIiIiIyEVMHzzV19dj0aJFOHbsGPr164cZM2Zg8eLFiIuLC27z9ttvw+/348477wz7+fj4eGzevBkvv/wyzp07h+zsbNx888342c9+htjYWDMPhYiIiIiIXMT0hBF2oOWlMCIiIiIici5bJ4wgIiIiIiISEQdPREREREREKnDwREREREREpAIHT0RERERERCpw8ERERERERKQCB09EREREREQqcPBERERERESkAgdPREREREREKnDwREREREREpAIHT0RERERERCpw8ERERERERKQCB09EREREREQqcPBERERERESkAgdPREREREREKnDwREREREREpAIHT0RERERERCpw8ERERERERKQCB09EREREREQqcPBERERERESkAgdPREREREREKnDwREREREREpAIHT0RERERERCpw8ERERERERKQCB09EREREREQqcPBERERERESkAgdPREREREREKnDwREREREREpAIHT0RERERERCpw8ERERERERKQCB09EREREREQqcPBERERERESkAgdPREREREREKnDwREREREREpAIHT0RERERERCpw8ERERER
|
||
|
"text/plain": [
|
||
|
"<Figure size 1000x1600 with 2 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"start = 125000\n",
|
||
|
"\n",
|
||
|
"fig, axs = plt.subplots(nrows=2, ncols=1, figsize=(10,16))\n",
|
||
|
"\n",
|
||
|
"numerical_values1 = df['PACK1_CRIDATA_BATT_VOL'].cast(pl.Float32).fill_null(strategy='mean')[start:start+100000]\n",
|
||
|
"numerical_values2 = convert_values(df['BATT_PACK_1_FAULT'])\n",
|
||
|
"axs[0].scatter(range(len(numerical_values1)), numerical_values1, s=10)\n",
|
||
|
"axs[1].scatter(range(len(numerical_values2)), numerical_values2, s=10)\n",
|
||
|
"axs[0].set_ylim(800,1000)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## charge discharge"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 60,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"[<matplotlib.lines.Line2D at 0x7fb3381abf10>]"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 60,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjMAAAGdCAYAAADnrPLBAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9h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AGA0wgyCgiWmagNAqCLMAAAAoxFmYCT6YQAAVQgzMBNpBgBwHmEGAAAYjTADAACMRpgBAABGI8wAAACjEWYAAIDRCDMAAMBohBkEBYup2gAQsggzAADAaIQZGImOGABAFcIMjGRxXAkAcB5hBgAAGI0wAwAAjEaYAQAARiPMAAAAoxFmAACA0QgzAADAaIQZBAUmagNA6CLMAAAAoxFmAACA0QgzMBKHlQAAVQgzMBJXMwAAVCHMAAAAoxFmAACA0QgzAADAaIQZAABgNMIMAAAwGmEGQYHZTQAQuggzAADAaIQZAABgNMIMjGRxDmAAwHk+DzPffvutfvGLX6hjx45q27atrrjiCuXk5LgetyxL8+bNU1JSkqKjozVkyBDt2rXLbR2lpaWaPn26EhISFBMTo3HjxunIkSO+rjoCGGNkAABVfBpmCgsLde211yoyMlJvv/22vvzySz399NO64IILXGUWLlyoRYsWaenSpdqyZYscDodGjhyp4uJiV5nMzEytXbtWa9as0caNG3Xy5EmNHTtWFRUVvqw+AAAwQIQvV/7EE08oOTlZK1ascC3r2bOn62/LsrR48WLNmTNH48ePlyStXLlSiYmJWr16tSZPniyn06nly5frpZde0ogRIyRJq1atUnJystavX6/Ro0f78i0AAIAA59OemTfeeEP9+vXTrbfeqs6dO+vKK6/U888/73r8wIEDys/P16hRo1zL7Ha7MjIytGnTJklSTk6OysvL3cokJSUpLS3NVaam0tJSFRUVud0AAEBw8mmY2b9/v5YtW6bU1FS9++67mjJlih544AG9+OKLkqT8/HxJUmJiotvzEhMTXY/l5+crKipK7du3r7dMTVlZWYqPj3fdkpOTvf3WAABAgPBpmKmsrNRVV12lBQsW6Morr9TkyZN13333admyZW7lbDab233Lsmotq6mhMrNnz5bT6XTdcnNzPXsjAAAgYPk0zHTp0kU/+clP3JZdcsklOnz4sCTJ4XBIUq0eloKCAldvjcPhUFlZmQoLC+stU5PdbldcXJzbDcGNqdoAELp8GmauvfZaff31127L9uzZox49ekiSUlJS5HA4lJ2d7Xq8rKxMGzZs0MCBAyVJ6enpioyMdCuTl5ennTt3usoAAIDQ5dPZTL/+9a81cOBALViwQBMmTNCnn36q5557Ts8995ykc4eXMjMztWDBAqWmpio1NVULFixQ27Ztdeedd0qS4uPjNWnSJM2cOVMdO3ZUhw4d9NBDD6lv376u2U0AACB0+TTMXH311Vq7dq1mz56t+fPnKyUlRYsXL9Zdd93lKjNr1iyVlJRo6tSpKiwsVP/+/bVu3TrFxsa6yjzzzDOKiIjQhAkTVFJSouHDh+uFF15QeHi4L6uPAMZBJQBAFZtlBf+5VIuKihQfHy+n08n4mSBx0Zy3VVZR6bo/6/qLNXXIhX6sEQDA25q6/+baTAAAwGiEGQAAYDTCDAAAMBphBgAAGI0wAwAAjEaYQVAI/jl5AID6EGYAAIDRCDMAAMBohBkYiQtLAgCqEGZgJMbIAACqEGYAAIDRCDMAAMBohBkAAGA0wgwAADAaYQYAABiNMAMAAIxGmAEAAEYjzAAAAKMRZmAkzpkHAKhCmIGRLE4BDAA4jzADAACMRpgBAABGI8wAAACjEWYAAIDRCDMAAMBohBkEBWY3AUDoIswAAACjEWYAAIDRCDMAAMBohBkYiRE
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.plot(df['PACK1_CRIDATA_CURR'].cast(pl.Float32).fill_null(0))"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 28,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'voltage')"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 28,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAz8AAAKoCAYAAABZQUEMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABp3UlEQVR4nO3de1zUVeL/8fdwG9BgvJAgCoptqSvmBe3iWma6mJfu+9OszKzdzcy8lam53dwMq83aWi+7reluptKu2rc2u2AZ5UqpCKZpWXkBFSINB7yECJ/fH8WsIwPMMAPD8Hk9H495POTM+Xw+5wOHy9tzPudYDMMwBAAAAABNXJC/GwAAAAAADYHwAwAAAMAUCD8AAAAATIHwAwAAAMAUCD8AAAAATIHwAwAAAMAUCD8AAAAATIHwAwAAAMAUCD8AAAAATIHwAwDwm7S0NHXr1k0RERGyWCzKycnx+TWuuuoqXXXVVY6PT548qccff1wfffSRz68FAGjcCD8AAL/4/vvvNWbMGF1wwQV69913lZmZqYsuuqjer3vy5Ek98cQThB8AMKEQfzcAAGBOe/bsUVlZmW6//XYNGDDA380BAJgAIz8AgAZ35513qn///pKkUaNGyWKx6KqrrtLWrVt1yy23qGPHjoqIiFDHjh01evRoHThwwOn4xx9/XBaLpcp5ly1bJovFov3797u87v79+3X++edLkp544glZLBZZLBbdeeedPr0/AEDjxMgPAKDBPfLII7rkkkt033336amnntLAgQMVFRWlXbt2qXPnzrrlllvUqlUr5efna9GiRerbt6927dql6Ohor67btm1bvfvuu7rmmmt0991367e//a0kOQIRAKBpI/wAABrcBRdcoF/+8peSpAsvvFCXXXaZJOmXv/ylfvOb3zjqlZeXa8SIEYqJidGKFSs0adIkr65rtVqVnJwsSWrfvr3jugAAc2DaGwCg0Th+/LhmzJihX/ziFwoJCVFISIjOO+88nThxQrt37/Z38wAAAY6RHwBAo3Hrrbfqgw8+0COPPKK+ffsqKipKFotFw4YN06lTp/zdPABAgCP8AAAaBbvdrv/85z967LHHNHPmTEd5aWmpfvjhB6e64eHhjvesVquj/MiRIw3TWABAQGLaGwCgUbBYLDIMwynMSNLf//53lZeXO5V17NhRkvT55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9d9vKavmzvtq0lD/O0Bz/hlwYO33npLu3btcpTde++9ysnJMc2CBxKrvbmL1d5qvw6rvbHaG6u9uYfV3gIHq72x2hurvcETnmQDr8PP8ePH9c0330iSevXqpfnz52vgwIFq1aqVEhISNGvWLB06dEj//Oc/Jf201HVSUpLuuece/e53v1NmZqbGjx+vlStXur3UdVMIPwAAAAC850k28Hqfn61bt2rgwIGOj6dNmyZJGjt2rJYtW6b8/Hzl5v5vhavExEStW7dOU6dO1YIFCxQXF6cXX3zRVHv8AAAAAGh4Pp321lAY+QEAAAAgNfJ9fgAAAADAHwg/AAAAAEyB8AMAAADAFAg/AAAAAEyB8AMAAADAFAg/AAAAAEyB8AMAAADAFAg/AAAAAEyB8AMAAADAFAg/AAAAAEyB8AMAAADAFAg/AAAAAEyB8AMAAADAFAg/AAAAAEyB8AMAAADAFAg/AAAAAEyB8AMAAADAFAg/AAAAAEyB8AMAAADAFAg/AAAAAEyB8AMAAADAFAg/AAAAAEyB8AMAAADAFAg/AAAAAEyB8AMAAADAFAg/AAAAAEyB8AMAAADAFAg/AAAAAEyB8AMAAADAFAg/AAAAAEyB8AMAAADAFAg/AAAAAEyB8AMAAADAFAg/AAAAAEyB8AMAAAD
|
||
|
"text/plain": [
|
||
|
"<Figure size 1000x800 with 2 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"start = 115000\n",
|
||
|
"end = start + 10000\n",
|
||
|
"\n",
|
||
|
"fig, axs = plt.subplots(nrows=2, ncols=1, figsize=(10,8))\n",
|
||
|
"\n",
|
||
|
"numerical_values0 = convert_values(df['BATT_PACK_1_FAULT'][start:end])\n",
|
||
|
"numerical_values1 = df['PACK1_CRIDATA_BATT_VOL'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"axs[0].scatter(range(len(numerical_values0)), numerical_values0, s=10)\n",
|
||
|
"axs[0].set_title(\"fault\")\n",
|
||
|
"axs[1].scatter(range(len(numerical_values2)), numerical_values2, s=10)\n",
|
||
|
"axs[1].set_title(\"voltage\")\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 46,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'voltage')"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 46,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAqQAAAIOCAYAAABuwR8hAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAA6qUlEQVR4nO3de3RU9b3//1euQxKTMRCTGEgguPgKJVhDQCpSg4JQC7XeKgJVa/2tigKa4gU49FjxVwlSRX+tAkeXBzylCKcVPNZLS7w0FcFCuSgXq+3hEhBiRMMkQEgg+fz+8Jupk8yeZEImn5nM87HWrAXv/ZmZz2TP7HnNZ+/92THGGCMAAADAkljbHQAAAEB0I5ACAADAKgIpAAAArCKQAgAAwCoCKQAAAKwikAIAAMAqAikAAACsIpACAADAKgIpAAAArCKQAkCIrVixQjExMdq/f7+3tmrVKj311FPW+gQA4YRACgAWEEgB4F8IpAAAALCKQAoALbz88suKiYnRW2+91WrZ0qVLFRMTow8//FCS9Morr+jSSy9VcnKyUlNTddVVV2nTpk0BH3/06NF67bXXdODAAcXExHhvzebPn68RI0aoZ8+eSktL09ChQ/X888/LGOPzOPX19brvvvuUnZ2t5ORkXX755dq6dav69eunH/3oRz5tKysrde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+G0PtpaD/tb7N5F9xXK9yUjpPAr0MYlnH4ldUfRsmGPltcZKc5mfbA96HzN6yOYv62/dRj
|
||
|
"text/plain": [
|
||
|
"<Figure size 800x600 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"start = 50000\n",
|
||
|
"end = start + 100000\n",
|
||
|
"plt.figure(figsize=(8, 6))\n",
|
||
|
"numerical_values = df['PACK1_CRIDATA_BATT_VOL'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"plt.scatter(range(len(numerical_values)), numerical_values, s=10)\n",
|
||
|
"plt.title(\"voltage\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 41,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'voltage')"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 41,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAqQAAAIOCAYAAABuwR8hAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAxFklEQVR4nO3de3SU1aH38d/kfjEZczEZBxIMPakggRoCUpEjVCCWQq2XFhTE61qFomhEyuXQY5WlCVIF32qFpcuCR4rwniNYa7El3nJEUHJCUAgWbAkkXGKEhkmAkECy3z98meOQCxlIsmfg+1lrlivPs2eyxw2TL8/M88RhjDECAAAALAmxPQEAAABc3AhSAAAAWEWQAgAAwCqCFAAAAFYRpAAAALCKIAUAAIBVBCkAAACsIkgBAABgFUEKAAAAqwhSAOhiy5cvl8Ph0J49e7zbVq5cqeeee87anAAgkBCkAGABQQoA/4sgBQAAgFUEKQCc4c0335TD4dB7773XYt+SJUvkcDj0+eefS5LeeustXXvttYqJiVFcXJxGjx6tTZs2tfv4I0aM0J///Gft3btXDofDezvtiSee0JAhQ5SYmKj4+HgNHDhQr7zyiowxPo/T0NCgRx99VC6XSzExMbr++utVUlKiK664Qvfcc4/P2KqqKk2ZMkU9e/ZURESEMjIy9MQTT+jUqVPn+H8JADpPmO0JAECgGTdunFJSUrRs2TKNHDnSZ9/y5cs1cOBADRgwQCtXrtSkSZOUm5ur119/XQ0NDVq4cKFGjBih9957T8OGDWv18V988UX9/Oc/1z/+8Q+tXbu2xf49e/ZoypQpSk9PlyR98sknmj59uvbv36/HHnvMO+7ee+/V6tWrNWvWLN1www3asWOHbrnlFtXW1vo8XlVVla655hqFhIToscce03e+8x1t2rRJTz75pPbs2aNly5ad7/8yADg/BgDQwowZM0x0dLQ5cuSId9uOHTuMJPP888+bpqYm43a7Tf/+/U1TU5N3TF1dnUlJSTFDhw71blu2bJmRZMrLy73bxo4da3r16nXWeTQ1NZmTJ0+a+fPnm6SkJNPc3GyMMaasrMxIMrNnz/YZ//rrrxtJ5u677/ZumzJlirnkkkvM3r17fcY+88wzRpIpKyvryP8SAOgyvGUPAK247777VF9fr9WrV3u3LVu2TJGRkZo4caJ27typAwcOaPLkyQoJ+d+X0ksuuUS33XabPvnkEx0/fvycvvf777+vUaNGyel0KjQ0VOHh4Xrsscd0+PBhVVdXS5KKiookSePHj/e5709/+lOFhfm++fX222/rBz/4gdxut06dOuW9jRkzxuexAMAWghQAWtGvXz8NHjzY+3Z2U1OTVqxYoZ/85CdKTEzU4cOHJUmXX355i/u63W41NzerpqbG7++7efNm5ebmSpJefvllffzxxyouLta8efMkSfX19ZLk/f6pqak+9w8LC1NSUpLPtq+++kp/+tOfFB4e7nPr16+fJOnQoUN+zxMAOhOfIQWANtx7772aNm2avvjiC+3evVsHDx7UvffeK0ne6Dt48GCL+x04c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xbfS7vU9hQuGkW7DgXcJZTmrvnc9hQAAOgSgXTQjSA9iwmD03V1mtP2NC4agXQJpUdWl+pvVUdb3ZfT61I9fVt/XXNFgvpdHqfBvS7VVZfHKSLU0c2zxMUmJS7C9hQAXCAC6aAbb9l3wJsPDLN6lv3hY42qqm2w9vy70+mzSG0rrajR2tIDbe7/1dirlJ2e0OpbHd8+w3v3oWM6fIy3NG2JCQ/RFcmxbf5dcsVHKjE2wvpnwjpyHxtn2fPnN/Cd/hxvMH3GsTsed9t+j06cCrpTZLpVdpozYN6ulzipKWic/gFUtOvrgIzTtl4U/fl
|
||
|
"text/plain": [
|
||
|
"<Figure size 800x600 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"start = 189000\n",
|
||
|
"end = start + 1000\n",
|
||
|
"plt.figure(figsize=(8, 6))\n",
|
||
|
"numerical_values = df['PACK1_CRIDATA_BATT_VOL'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"plt.scatter(range(len(numerical_values)), numerical_values, s=10)\n",
|
||
|
"plt.title(\"voltage\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'temperature')"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAz8AAAZECAYAAADMiL7mAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAADTyklEQVR4nOzdeXxTVcL/8W+6pQXbQCm0FEopDoNokaUIgiCiWAYBB3V+4DKijM5jRxQRF7YZF1yKOjqOPoLjqPC41xnAB7UqdVREqbIVRMCVJQVaECxpBSzQ3t8fSB5C09I0SdP0fN6vV14vcnLuuSfp6fLlnHuuzbIsSwAAAADQzEWEugMAAAAA0BgIPwAAAACMQPgBAAAAYATCDwAAAAAjEH4AAAAAGIHwAwAAAMAIhB8AAAAARiD8AAAAADAC4QcAAACAEQg/AICQycvL0xlnnKG4uDjZbDatXbs24Oc477zzdN5557mfHzhwQPfcc48++uijgJ8LANC0EX4AACHxww8/6Oqrr9app56qd999V4WFhfr1r38d9PMeOHBA9957L+EHAAwUFeoOAADM9M033+jw4cP6/e9/ryFDhoS6OwAAAzDzAwBodNdee60GDRokSRo3bpxsNpvOO+88rVq1Spdffrk6d+6suLg4de7cWVdccYW2bdvmcfw999wjm81Wo9358+fLZrNp69atXs+7detWtW3bVpJ07733ymazyWaz6dprrw3o+wMANE3M/AAAGt1f/vIX9evXTxMnTtSDDz6ooUOHKiEhQRs3blS3bt10+eWXKzExUSUlJZo7d67OOussbdy4UUlJSX6dt3379nr33Xf1m9/8Rtddd52uv/56SXIHIgBA80b4AQA0ulNPPVWnn366JKlr1646++yzJUmnn366fve737nrVVVVadSoUUpOTtYrr7yiSZMm+XVeu92urKwsSVLHjh3d5wUAmIFlbwCAJuOnn37S1KlT9atf/UpRUVGKiorSKaecov3792vTpk2h7h4AIMwx8wMAaDKuvPJK/ec//9Ff/vIXnXXWWUpISJDNZtNFF12kgwcPhrp7AIAwR/gBADQJLpdLb731lu6++25NmzbNXV5ZWakff/zRo25sbKz7Nbvd7i7fs2dP43QWABCWWPYGAGgSbDabLMvyCDOS9Oyzz6qqqsqjrHPnzpKkL774wqP8zTffPOl5jrXPTBIAmIeZHwBAk5CQkKBzzz1XjzzyiJKSktS5c2ctXbpUzz33nFq1auVR96KLLlJiYqKuu+46zZo1S1FRUZo/f76Ki4tPep74+Hilp6frf//3f3XBBRcoMTHRfT4AQPPG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S/ZwO/w89NPP+m7776TJPXu3VuPPfaYhg4dqsTERHXq1EnTp0/Xjh079MILL0g6utV1ZmambrjhBv3xj39UYWGhcnJy9Oqrr9Z7q+vmEH4AAAAA+M+XbOD3fX5WrVqloUOHup9PmTJFknTNNddo/vz5KikpkdP5fztcZWRkKD8/X7feequeeuoppaam6oknnjDqHj8AAAAAGl9Al701FmZ+AAAAAEhN/D4/AAAAABAKhB8AAAAARiD8AAAAADAC4QcAAACAEQg/AAAAAIxA+AEAAABgBMIPAAAAACMQfgAAAAAYgfADAAAAwAiEHwAAAABGIPwAAAAAMALhBwAAAIARCD8AAAAAjED4AQAAAGAEwg8AAAAAIxB+AAAAABiB8AMAAADACIQfAAAAAEYg/AAAAAAwAuEHAAAAgBEIPwAAAACMQPgBAAAAYATCDwAAAAAjEH4AAAAAGIHwAwAAAMAIhB8AAAAARiD8AAAAADAC4QcAAACAEQg/AAAAAIxA+AEAAABgBMIPAAAAACMQfgAAAAA
|
||
|
"text/plain": [
|
||
|
"<Figure size 1000x2000 with 4 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"end = start + 10000\n",
|
||
|
"\n",
|
||
|
"fig, axs = plt.subplots(nrows=4, ncols=1, figsize=(10,20))\n",
|
||
|
"\n",
|
||
|
"numerical_values0 = convert_values(df['BATT_PACK_1_FAULT'][start:end])\n",
|
||
|
"numerical_values1 = convert_values(df['BATT_PACK_1_DISCONN'][start:end])\n",
|
||
|
"numerical_values2 = df['PACK1_CRIDATA_BATT_VOL'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"numerical_values3 = df['PACK1_CRIDATA_AVG_CELL_TEMP'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"axs[0].scatter(range(len(numerical_values0)), numerical_values0, s=10)\n",
|
||
|
"axs[0].set_title(\"fault\")\n",
|
||
|
"axs[1].scatter(range(len(numerical_values1)), numerical_values1, s=10)\n",
|
||
|
"axs[1].set_title(\"disconnect\")\n",
|
||
|
"axs[2].scatter(range(len(numerical_values2)), numerical_values2, s=10)\n",
|
||
|
"axs[2].set_title(\"voltage\")\n",
|
||
|
"axs[3].scatter(range(len(numerical_values3)), numerical_values3, s=10)\n",
|
||
|
"axs[3].set_title(\"temperature\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'temperature')"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAz8AAAZECAYAAADMiL7mAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAADTyklEQVR4nOzdeXxTVcL/8W+6pQXbQCm0FEopDoNokaUIgiCiWAYBB3V+4DKijM5jRxQRF7YZF1yKOjqOPoLjqPC41xnAB7UqdVREqbIVRMCVJQVaECxpBSzQ3t8fSB5C09I0SdP0fN6vV14vcnLuuSfp6fLlnHuuzbIsSwAAAADQzEWEugMAAAAA0BgIPwAAAACMQPgBAAAAYATCDwAAAAAjEH4AAAAAGIHwAwAAAMAIhB8AAAAARiD8AAAAADAC4QcAAACAEQg/AICQycvL0xlnnKG4uDjZbDatXbs24Oc477zzdN5557mfHzhwQPfcc48++uijgJ8LANC0EX4AACHxww8/6Oqrr9app56qd999V4WFhfr1r38d9PMeOHBA9957L+EHAAwUFeoOAADM9M033+jw4cP6/e9/ryFDhoS6OwAAAzDzAwBodNdee60GDRokSRo3bpxsNpvOO+88rVq1Spdffrk6d+6suLg4de7cWVdccYW2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wAwAAAMAIhB8AAAAARiD8AAAAADAC4QcAAACAEQg/AAAAAIxA+AEAAABgBMIPAAAAACMQfgAAAAA
|
||
|
"text/plain": [
|
||
|
"<Figure size 1000x2000 with 4 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"start = 115000\n",
|
||
|
"end = start + 10000\n",
|
||
|
"\n",
|
||
|
"fig, axs = plt.subplots(nrows=4, ncols=1, figsize=(10,20))\n",
|
||
|
"\n",
|
||
|
"numerical_values0 = convert_values(df['BATT_PACK_1_FAULT'][start:end])\n",
|
||
|
"numerical_values1 = convert_values(df['BATT_PACK_1_DISCONN'][start:end])\n",
|
||
|
"numerical_values2 = df['PACK1_CRIDATA_BATT_VOL'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"numerical_values3 = df['PACK1_CRIDATA_AVG_CELL_TEMP'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"axs[0].scatter(range(len(numerical_values0)), numerical_values0, s=10)\n",
|
||
|
"axs[0].set_title(\"fault\")\n",
|
||
|
"axs[1].scatter(range(len(numerical_values1)), numerical_values1, s=10)\n",
|
||
|
"axs[1].set_title(\"disconnect\")\n",
|
||
|
"axs[2].scatter(range(len(numerical_values2)), numerical_values2, s=10)\n",
|
||
|
"axs[2].set_title(\"voltage\")\n",
|
||
|
"axs[3].scatter(range(len(numerical_values3)), numerical_values3, s=10)\n",
|
||
|
"axs[3].set_title(\"temperature\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## temperature?"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 69,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"[<matplotlib.lines.Line2D at 0x7fb2b58497e0>]"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 69,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjEAAAGdCAYAAADjWSL8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAA5WUlEQVR4nO3df3RU9b3v/9ckkwwhTjYJMZmMhEgrIhrgnAYbwukpvwMcY+qPW7R05eC9XDhWAbOAa4tdXdKuU8LX71Haszgi9XilKm28/Sr9pZ0Sr4LlJOFHNJUfQrGCBsgQoMlMAskkJJ/vH8iGSQAJJIYdno/lXmb2fs/en/3JJvOaz+w922WMMQIAAHCYmL5uAAAAwJUgxAAAAEcixAAAAEcixAAAAEcixAAAAEcixAAAAEcixAAAAEcixAAAAEdy93UDektHR4eOHDkir9crl8vV180BAACXwRijxsZG+f1+xcRceqyl34aYI0eOKDMzs6+bAQAArkBNTY2GDBlyyZp+G2K8Xq+kM52QlJTUx60BAACXIxwOKzMz034dv5R+G2LOfoSUlJREiAEAwGEu51QQTuwFAACORIgBAACORIgBAACORIgBAACORIgBAACORIgBAACOdFUhpqSkRC6XS8XFxfY8Y4yWL18uv9+vhIQETZw4Ubt37456XiQS0cKFC5WamqrExEQVFhbq0KFDUTX19fUqKiqSZVmyLEtFRUVqaGi4muYCAIB+5IpDzPbt2/Wzn/1Mo0ePjpr/1FNP6ZlnntHq1au1fft2+Xw+TZs2TY2NjXZNcXGxNmzYoNLSUm3ZskVNTU0qKChQe3u7XTN79mxVV1crEAgoEAiourpaRUVFV9pcAADQ35gr0NjYaIYPH27KysrMhAkTzGOPPWaMMaajo8P4fD6zcuVKu7alpcVYlmWee+45Y4wxDQ0NJi4uzpSWlto1hw8fNjExMSYQCBhjjNmzZ4+RZCorK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2OjSktLtWnTJgUCATU1NWn58uW6//77lZGRoYMHD+qJJ55Qamqq7r33XkmSZVmaO3eulixZosGDByslJUVLly7VqFGj7KuVRo4cqRkzZmjevHlau3atJGn+/PkqKCjgyiQAAGDrVog5evSoioqKVFtbK8uyNHr0aAUCAU2bNk3Nzc3auXOnXnrpJTU0NCgjI0OTJk3Sq6++Kq/Xa69j1apVcrvdmjVrlpqbmzVlyhStW7dOsbGxds369eu1aNEi+yqmwsJCrV69uod2GQAA9AcuY4zp60b0hnA4LMuyFAqF+Gipn/j/qg5p6a/+LEk6uPKuPm4NAKA3dOf1m3snAQAARyLEAAAARyLEwDG4cxIA4HyEGAAA4EiEGAAA4EiEGAAA4EiEGAAA4EiEGAAA4EiEGAAA4EiEGAAA4EiEGAAA4EiEGAAA4EiEGAAA4EiEGDiGi/sOAADOQ4gBAACORIgBAACORIgBAACORIgBAACORIgBAACORIgBAACORIgBAACORIgBAACORIgBAACORIgBAACORIgBAACORIiBY3DvJADA+QgxAADAkQgxAADAkQgxAADAkQgxAADAkQgxAADAkQgxAADAkboVYtasWaPRo0crKSlJSUlJysvL0x/+8Ad7uTFGy5cvl9/vV0JCgiZOnKjdu3dHrSMSiWjhwoVKTU1VYmKiCgsLdejQoaia+vp6FRUVybIsWZaloqIiNTQ0XPleAgCAfqdbIWbIkCFauXKlduzYoR07dmjy5Mn6xje+YQeVp556Ss8884xWr16t7du3y+fzadq0aWpsbLTXUVxcrA0bNqi0tFRbtmxRU1OTCgoK1N7ebtfMnj1b1dXVCgQCCgQCqq6uVlFRUQ/tMgAA6BfMVUpOTjb/+Z//aTo6Ooz
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"\n",
|
||
|
"plt.plot(df['PACK1_CRIDATA_AVG_CELL_TEMP'].cast(pl.Float32).fill_null(strategy='mean'))"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 76,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"(800.0, 1000.0)"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 76,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAAUBCAYAAAC2YKFFAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAACFMUlEQVR4nOzde5RVdeH//9fIZUQ+cBImGCZHxM/XvIGlWAr5TUtDU6KL37xgk5Yf0swLeUmxLLMUtW9285NWn35ZSuH6rKKsjKRSigUIomPivT6kmIxYDWcgaUDYvz/anm8jeAFnROTxWOus5dnnvfd5b3zL8rn2OfvUFUVRBAAAgGy3pScAAADwSiGQAAAASgIJAACgJJAAAABKAgkAAKAkkAAAAEoCCQAAoCSQAAAASgIJAACgJJAAAABKmxxIv/3tb/Oud70rTU1Nqaury49//OMurxdFkYsvvjhNTU3p169fDjnkkNx7771dxnR2duaMM85IQ0ND+vfvnwkTJuSxxx7rMqa9vT0tLS2pVCqpVCppaWnJihUrNvkEAQAAXqxNDqS///3vecMb3pCrr756o69feeWVueqqq3L11Vdn4cKFaWxszDve8Y6sXLmyNmby5MmZMWNGpk+fnjlz5mTVqlUZP3581q1bVxszceLEtLa2ZubMmZk5c2ZaW1vT0tKyGacIAADw4tQVRVFs9s51dZkxY0be8573JPnn1aOmpqZMnjw5559/fpJ/Xi0aOnRorrjiipxyyimpVqt57Wtfm+uvvz7HHntskuTxxx9Pc3Nzbr755hx++OG5//77s9dee2X+/Pk54IADkiTz58/PmDFj8sADD2T33Xd/iacNAACw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AAAAEoCCQAAoCSQAAAASgIJAACg1COBtHLlykyePDnDhw9Pv379Mnbs2CxcuLD2el1d3UYfX/jCF2pjDjnkkA1eP+6443piugAAAEmS3j1x0P/4j//I4sWLc/3116epqSk33HBDDjvssNx333153etel2XLlnUZ/4tf/CInn3xyjj766C7bJ02alEsuuaT2vF+/fj0xXQAAgCQ9EEirV6/OD3/4w/zkJz/JW9/61iTJxRdfnB//+Me55ppr8vnPfz6NjY1d9vnJT36St73tbdl11127bN9hhx02GAsAANBTuv0jdk8//XTWrVuX7bffvsv2fv36Zc6cORuMf+KJJ/Lzn/88J5988gavTZs2LQ0NDdl7771z7rnnZuXKld09XQAAgJpuv4I0YMCAjBkzJp/73Oey5557ZujQofnBD36Q22+/PbvtttsG47/73e9mwIABed/73tdl+wknnJARI0aksbExixcvzpQpU3L33Xdn1qxZG33fzs7OdHZ21p53dHR074kBAACvenVFURTdfdA//vGP+fCHP5zf/va36dWrV/bbb7+8/vWvz5133pn77ruvy9g99tgj73jHO/K1r33teY+5aNGi7L///lm0aFH222+/DV6/+OKL89nPfnaD7dVqNQMHDnxpJwQAAGy1Ojo6UqlUXlQb9Mhd7P793/89s2fPzqpVq7J06dIsWLAga9euzYgRI7qM+93vfpcHH3ww//Ef//GCx9xvv/3Sp0+fPPzwwxt9fcqUKalWq7XH0qVLu+VcAACAbUeP3MXuGf3790///v3T3t6eX/7yl7nyyiu7vP7tb387o0ePzhve8IYXPNa9996btWvXZtiwYRt9vb6+PvX19d0ybwAAYNvUI4H0y1/+MkVRZPfdd88f/vCHnHfeedl9993zoQ99qDamo6Mj//3f/50vfvGLG+z/xz/+MdOmTcuRRx6ZhoaG3HfffTnnnHOy77775i1veUtPTBkAAKBnAqlarWbKlCl57LHHMmjQoBx99NG59NJL06dPn9qY6dOnpyiKHH/88Rvs37dv3/z617/OV77ylaxatSrNzc056qij8pnPfCa9evXqiSkDAAD0zE0aXgk25YtYAADAq9cWv0kDAADA1kggAQAAlAQSAABASSABAACUBBIAAEBJIAEAAJQEEgAAQEkgAQAAlAQSAABASSABAACUBBIAAEBJIAEAAJQEEgAAQEkgAQAAlAQSAABASSABAACUBBIAAEBJIAEAAJQEEgAAQEkgAQAAlAQSAABASSABAACUBBIAAEBJIAEAAJQEEgAAQEkgAQAAlAQSAABASSABAACUBBIAAEBJIAEAAJQEEgAAQEkgAQAAlAQSAABASSABAACUBBIAAECpRwJp5cqVmTx5coYPH55+/fpl7NixWbhwYe31k046KXV1dV0eBx54YJdjdHZ25owzzkhDQ0P69++fCRMm5LHHHuuJ6QIAACTpoUD6j//4j8yaNSvXX3997rnnnowbNy6HHXZY/vznP9fGHHHEEVm2bFntcfPNN3c5xuTJkzNjxoxMnz49c+bMyapVqzJ+/PisW7euJ6YMAACQuqIoiu484OrVqzNgwID85Cc/yVFHHVXb/sY3vjHjx4/P5z//+Zx00klZsWJFfvzjH2/0GNVqNa997Wtz/fXX59hjj02SPP7442lubs7NN9+cww8//AXn0dHRkUqlkmq1moEDB3bLuQEAAFufTWmDbr+C9PTTT2fdunXZfvvtu2zv169f5syZU3t+2223ZciQIXn961+fSZMmZfny5bXXFi1alLVr12bcuHG1bU1NTRk5cmTmzp270fft7OxMR0dHlwcAAMCm6PZAGjBgQMaMGZPPfe5zefzxx7Nu3brccMMNuf3227Ns2bIkyTvf+c5MmzYtv/nNb/LFL34xCxcuzNvf/vZ0dnYmSdra2tK3b9/suOOOXY49dOjQtLW1bfR9p06dmkqlUns0Nzd396kBAACvcj3yHaTrr78+RVHkda97Xerr6/PVr341EydOTK9evZIkxx57bI466qiMHDky73rXu/KLX/wiDz30UH7+858/73GLokhdXd1GX5syZUq
|
||
|
"text/plain": [
|
||
|
"<Figure size 1000x1600 with 3 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"start = 50000 + 7500\n",
|
||
|
"end = start + 1000\n",
|
||
|
"\n",
|
||
|
"fig, axs = plt.subplots(nrows=3, ncols=1, figsize=(10,16))\n",
|
||
|
"\n",
|
||
|
"numerical_values1 = df['PACK1_CRIDATA_BATT_VOL'].cast(pl.Float32).fill_null(strategy='mean')[start:end]\n",
|
||
|
"numerical_values2 = convert_values(df['BATT_PACK_1_FAULT'])[start:end]\n",
|
||
|
"numerical_values3 = df['PACK1_CRIDATA_AVG_CELL_TEMP'].cast(pl.Float32).fill_null(strategy='mean')[start:end]\n",
|
||
|
"axs[0].scatter(range(len(numerical_values1)), numerical_values1, s=10)\n",
|
||
|
"axs[1].scatter(range(len(numerical_values2)), numerical_values2, s=10)\n",
|
||
|
"axs[2].scatter(range(len(numerical_values3)), numerical_values3, s=10)\n",
|
||
|
"axs[0].set_ylim(800,1000)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## SOH and SOC"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 84,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.collections.PathCollection at 0x7fb2b5a8e8c0>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 84,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAGdCAYAAAA44ojeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABP4klEQVR4nO3dfXRV1Z0//neAEANNromQhCsJBsoIGsozFnQaqAJl0NaBjlSty7az+lMB26j1aZhZsnRKAEfqd4ro1DVfaqeD4voqnc5qHcCqsRasKQ+KgFblIRGIEQlJBEwQzu8P5t7ee3L2OX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we2acPLzxHanjRDtCP7zxHZyx5fY+Y0HpWXbSuGQmFs0YganDS7Foxgi8sWSm5+94vZfWzu7kcyQy+ycNrq+nPote1jc24ePO9HVIrZ3dSu2QyunZl/k86KyHqI0T5TL1OWNB+tqq34thYxSPDfM7mEnXfXmz+bjwXwsHls/FVY+8gvc/7jmXnDpHm/jSUK1T4hyy17HXTeV6iWNXXTfW8fX9R08k/8U3dXipMProhimVjtFQYQhqntxrrYXbM6N6rgTRehrZ31etVyZk6pL6HDk5eMx7XYbXORLc1k9k2g6ZdNB/t/cjYblqPURtnFou89mXvXYQbRgkjqCkYOck+rzmWoOco009R7bmgu989k3H8tT5cre1BibNTQdVF6+1FirXlVm3AYjX08j+PqBWr8k/3ozHXv4AW/cdw2Mvf4DJP97s+TsydfFadzGs1HtdhuzaDVPWT5QM6K9
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"series = df['PACK1_CRIDATA_SOC'].cast(pl.Float32).fill_null(strategy='mean')\n",
|
||
|
"plt.scatter(range(len(series)), series, s=10)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 108,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.collections.PathCollection at 0x7fb2aec98ac0>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 108,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjEAAAGdCAYAAADjWSL8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWX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ARYgAAgJUIMQAAwEqEGAAAYCVCDAAAsBIhBgAAWIkQAwAArESIAQAAViLEAAAAKxFiAACAlQgxAADASoQYAABgJUIMAACwEiEGAABYiRADAACsRIgBAABWIsQAAAArEWIAAICVCDEAAMBKhBgAAGAlQgwAALASIQYAAFiJEAMAAKxEiAEAAFYixAAAACsRYgAAgJUIMQAAwEqEGAAAYCVCDAAAsBIhBgAAWIkQAwAArESIAQAAVoorxDz33HO65557lJaWprS0NBUVFen3v/+9t94Yo/Xr1ysQCGjEiBGaNm2aDh8+HLONaDSqVatWKSMjQykpKSotLdXp06djasLhsILBoBzHkeM4CgaDamlp6fkoAQDAkBNXiBk9erQ2btyo9957T++9955mzJihBx980AsqTz/9tJ599llt3rxZBw4ckN/v1+zZs9Xa2upto6ysTDt37lRFRYX27t2rtrY2lZSU6PLly17NokWL1NDQoMrKSlVWVqqhoUHBYLCPhgwAAIYE00sjR440//Ef/2GuXLli/H6/2bhxo7fu4sWLxnEcs3XrVmOMMS0tLSYxMdFUVFR4NZ9++qkZNmyYqaysNMYYc+TIESP
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"series = df['PACK1_CRIDATA_SOH'].cast(pl.Float32).fill_null(strategy='mean')\n",
|
||
|
"plt.scatter(range(len(series)), series, s=10)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"We need to remove outlier data points (e.g. 4000)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## find discharge zones"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"The idea is to have 2 moving average windows, and then find if the moving window ahead is lower than the moving window before."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 115,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"window_size = 10\n",
|
||
|
"series = df['PACK1_CRIDATA_SOC'].cast(pl.Float32).fill_null(strategy='mean')\n",
|
||
|
"moving_avg = series.rolling_mean(window_size=window_size)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 119,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"shape: (9, 2)\n",
|
||
|
"┌────────────┬───────────┐\n",
|
||
|
"│ statistic ┆ value │\n",
|
||
|
"│ --- ┆ --- │\n",
|
||
|
"│ str ┆ f64 │\n",
|
||
|
"╞════════════╪═══════════╡\n",
|
||
|
"│ count ┆ 273961.0 │\n",
|
||
|
"│ null_count ┆ 9.0 │\n",
|
||
|
"│ mean ┆ 80.893529 │\n",
|
||
|
"│ std ┆ 13.902372 │\n",
|
||
|
"│ min ┆ 0.0 │\n",
|
||
|
"│ 25% ┆ 80.893616 │\n",
|
||
|
"│ 50% ┆ 85.0 │\n",
|
||
|
"│ 75% ┆ 85.0 │\n",
|
||
|
"│ max ┆ 88.0 │\n",
|
||
|
"└────────────┴───────────┘\n",
|
||
|
"shape: (9, 2)\n",
|
||
|
"┌────────────┬───────────┐\n",
|
||
|
"│ statistic ┆ value │\n",
|
||
|
"│ --- ┆ --- │\n",
|
||
|
"│ str ┆ f64 │\n",
|
||
|
"╞════════════╪═══════════╡\n",
|
||
|
"│ count ┆ 273961.0 │\n",
|
||
|
"│ null_count ┆ 0.0 │\n",
|
||
|
"│ mean ┆ 80.893613 │\n",
|
||
|
"│ std ┆ 13.989593 │\n",
|
||
|
"│ min ┆ -0.299927 │\n",
|
||
|
"│ 25% ┆ 80.893616 │\n",
|
||
|
"│ 50% ┆ 85.0 │\n",
|
||
|
"│ 75% ┆ 85.0 │\n",
|
||
|
"│ max ┆ 100.0 │\n",
|
||
|
"└────────────┴───────────┘\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"print(moving_avg.describe())\n",
|
||
|
"\n",
|
||
|
"print(series.describe())"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 122,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.collections.PathCollection at 0x7fb2ac34ead0>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 122,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAh8AAAGdCAYAAACyzRGfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABrdklEQVR4nO29e3hUVZrv/4YYQhKTGC5JiKQgIAJNFAKCLTodEIWmY59W7CNepkc9z+lRwW7RPkpo57S09kC0R7RP2+i0Zw7j/HrQ+AzS02doWvAW24M2UQIiNy9cKlxCuBRJICEJsH9/MFVW7axr7bV37ar6fp6H5yFr79q1au2193rXe82wLMsiAAAAAACP6JfoDgAAAAAgvYDwAQAAAABPgfABAAAAAE+B8AEAAAAAT4HwAQAAAABPgfABAAAAAE+B8AEAAAAAT4HwAQAAAABPuSjRHbBz/vx5OnToEOXn51NGRkaiuwMAAAAABSzLoo6ODiorK6N+/cS6Dd8JH4cOHaLy8vJEdwMAAAAAcdDc3EzDhg0TnuM74SM/P5+ILnS+oKAgwb0BAAAAgArt7e1UXl4eWcdF+E74CJtaCgoKIHwAAAAASYaKywQcTgEAAADgKRA+AAAAAOAp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stLS00a9asyGeys7OpurqaNm5kO8d1d3dTe3t7zD/TJFPIIYgfWfQGLx20Sppo2RwylQ5b5zt5qJpd3HBEiye1OpE8yVjbmXPK4xHdB9nCpbOoODW7fHqgTfnzqv3iLe6yRd+E2eWEwqLo1/pDPEwKczrCwO1TA4wzL6CaZMw
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.scatter(range(len(moving_avg)),moving_avg, s=10)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 134,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.collections.PathCollection at 0x7fb2ac872440>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 134,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAh8AAAGdCAYAAACyzRGfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAng0lEQVR4nO3df3BU133//9eCxCIRaTGJ2dWCTBRFcWx+2DG4CsKNNrZRhmK3Lpk0Nk4Gl5kWJHBQaQrINLXI2BLQVENaEmVwPQRXJWQ6/lF/6tiWXCLhRKOJjFGM5QxxsSoUzEZNBnZlo6z4cb5/OLpfNgLMSrtn90rPx8ydsc49e/d933vX+5rD/vAYY4wAAAAsmZTuAgAAwMRC+AAAAFYRPgAAgFWEDwAAYBXhAwAAWEX4AAAAVhE+AACAVYQPAABgVVa6C/hDFy9e1Lvvvqu8vDx5PJ50lwMAAK6BMUYDA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r+mpp56SJIXDYUmS3++Pu53f73f2/aH6+nr5fD5nKywsHM15AAAAl0gofFy8eFG33Xab6urq9JnPfEZr1qzRX/3VX6mxsTFunsfjifvbGDNibFhNTY0ikYiz9fX1JXgKAADATRIKHwUFBbr55pvjxm666SadOHFCkhQIBCRpxCpHf3//iNWQYV6vV/n5+XEbAAAYvxIKH0uWLNGxY8fixn75y19qzpw5kqSioiIFAgG1tLQ4+4eGhtTW1qaysrIklAsAANwuK5HJf/M3f6OysjLV1dXpL/7iL/Szn/1Me/b
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"subset = moving_avg[54500:55000]\n",
|
||
|
"plt.scatter(range(len(subset)),subset, s=1)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"We can see that we get artifacts of the moving averages because the data is not clean"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 137,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"(800.0, 1000.0)"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 137,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAAUBCAYAAAC2YKFFAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAACp8UlEQVR4nOzde3RU5b3/8c+QyxDTZEsIuYwEDJZ7ALkohLIEBQNIRIVTQPilqDRiETQVFOOpFa0asEu8lC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dpaam9r6CgQDU1NUpJSbHbXC6XkpKStGHDhnrf1+v1yuPx+GwAAAAA4I8mD0gRERFKTk7Wn/70Jx06dEi1tbVasWKFNm3apOLiYknS2LFjtXLlSr3//vt6/PHHtWXLFl111VXyer2SpJKSEoWGhqpdu3Y+546NjVVJSUm975uVlSXDMOwtISGhqS8NAAAAQCsXkN8gLV++XKZp6qKLLpLT6dTTTz+tqVOnKigoSJI0efJkjRs3TklJSbr22mv1zjvv6LPPPtPbb7992vOapimHw1HvvszMTLndbnsrKipq8usCAAAA0LoFJCBdcsklysvLU2VlpYqKirR582bV1NQoMTGx3vr4+Hh17txZ+/btkyTFxcWpurpaZWVlPnWlpaWKjY2t9xxOp1ORkZE+GwAAAAD4I6DPQQoPD1d8fLzKysr07rvv6rrrrqu37rvvvlNRUZHi4+MlSQMHDlRISIhyc3PtmuLiYu3cuVNDhw4NZJcBAAAAnMe
|
||
|
"text/plain": [
|
||
|
"<Figure size 1000x1600 with 4 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"start = 54500\n",
|
||
|
"end = start + 5000\n",
|
||
|
"\n",
|
||
|
"fig, axs = plt.subplots(nrows=4, ncols=1, figsize=(10,16))\n",
|
||
|
"numerical_values1 = df['PACK1_CRIDATA_BATT_VOL'].cast(pl.Float32).fill_null(strategy='mean')[start:end]\n",
|
||
|
"numerical_values2 = convert_values(df['BATT_PACK_1_FAULT'])[start:end]\n",
|
||
|
"numerical_values3 = df['PACK1_CRIDATA_AVG_CELL_TEMP'].cast(pl.Float32).fill_null(strategy='mean')[start:end]\n",
|
||
|
"numerical_values4 = df['PACK1_CRIDATA_SOC'].cast(pl.Float32).fill_null(strategy='mean')[start:end]\n",
|
||
|
"axs[0].scatter(range(len(numerical_values1)), numerical_values1, s=10)\n",
|
||
|
"axs[1].scatter(range(len(numerical_values2)), numerical_values2, s=10)\n",
|
||
|
"axs[2].scatter(range(len(numerical_values3)), numerical_values3, s=10)\n",
|
||
|
"axs[3].scatter(range(len(numerical_values4)), numerical_values4, s=10)\n",
|
||
|
"axs[0].set_ylim(800,1000)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 138,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.collections.PathCollection at 0x7fb2ac7adb40>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 138,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAGdCAYAAAA44ojeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABfSElEQVR4nO3de3hU5bk3/u/kfCAZCJATSSC6UaEBBQQE5VCVQ0W0td1FUdRfrRtL0aK2KrpbU/tuENoir7XaXdp6LMX9q1Lx1SpYFesLCoLISamtHIIQIhCSACERWO8fYZLMZJ7Jc6/DzDOT7+e6cimTe615Zq01M3fWs+57+SzLskBERERkkKRYD4CIiIgoFBMUIiIiMg4TFCIiIjIOExQiIiIyDhMUIiIiMg4TFCIiIjIOExQiIiIyDhMUIiIiMk5KrAdgx+nTp7Fv3z7k5OTA5/PFejhERESkwbIsNDQ0oLi4GElJkc+RxGWCsm/fPpSWlsZ6GERERGRDVVUVSkpKIsbEZYKSk5MDoOUF5ubmxng0REREpKO+vh6lpaWt3+ORxGWCEpjWyc3NZYJCREQUZ3Quz+BFskRERGQcJihERERkHCYoREREZBwmKERERGQcJihERERkHCYoREREZBwmKERERGQcJihERERknLhs1EaJ59RpC+t2HkZNwwnk52RgRHkekpN4nyUioq5KfAblnXfewdSpU1FcXAyfz4e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WMhOskRE1MpRH5RYYR8UIiKi+BOzPihEREREbmCCQkRERMZhgkJERETGYYJCRERExmGCQkRERMZhgkJERETGYYJCRERExmGCQkRERMZhgkJERETGYYJCRERExmGCQkRERMZhgkJERETGYYJCRERExmGCQkRERMZhgkJERETGYYJCRERExmGCQkRERMZhgkJERETGYYJCRERExmGCQkRERMZhgkJERETGYYJCRERExmGCQkRERMZhgkJERETGYYJCRERExmGCQkRERMZhgkJERETGYYJCRERExmGCQkRERMZJifUAiIgoOvrd90qHx3Y9PCUGIyHqHM+gEBF1AeGSk0iPE8UaExQiogTXWRLCJIVMxASFiCiB6SYfTFLINExQiIiIyDhMUIiIiMg4rOKhhKVzyjqWFQyRxheLcT311g5Uvv7P1n/3AFDb7vfZycCaBybCn5UqWu/bmw/g5qUfuDPIOHM2gO9NHYgfvrw91kPRwmkeM9w1vhR3TB4MAHht/ee47YVNMR3Poqu+gmtG94v68/osy7Ki/qwO1dfXw+/3o66uDrm5ubEeDhlI8kEbi2TAtORJsr369szE6h9d6vp6ichsbnwmSb6/OcVDCUf6pRjtL1HTLlqUPs/uQ40Y9/M3XV8vEZkt2u9pJiiUUOy+gUxNBrwe11Nv7bC13O5Djag7/qXy929vPmB3SERksBfX7Irac/EaFIqZNzdV4zvLNgQ9dnEh8Mc5se1s2VlSMLoAWHqneoxuJxX97nvF0alVr5Kc7zy1Di/Mujjs77rqNSdEie6uFduidj0Kz6BQTPS775UOyQkA/N/q2E0N9LvvFa3nXnMg+l05TTwztK/uhGfrJiJigkJRp/OlGQ/XL4SO0esxmzY9VOzP8HT9RNS1MUGhqHpzU7V27PWL4ydJieY1LGcbkuBt2HPE8+cgoq6LCQpFVbhpHZX/q5/LtMpKjf4hHe2zPadi8JxERNHGBIUSSuOXp2M9hKhhkkJEiYwJChntna01ovjMGJxBiaVYJymxfn4iSlxd69OcYu7eCf1E8Tc+t170JXjTJWXCEcU/JglElIiYoFBUFffsbms53S/hYyfi7s4NrgjdPv/72gtiMxAiSmjRvAU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2DpC0GIj0vlL9LlMxPjtxJTa2sY6
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"series = df['PACK1_CRIDATA_SOC'].cast(pl.Float32).fill_null(strategy='mean')\n",
|
||
|
"plt.scatter(range(len(series)), series)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 143,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.collections.PathCollection at 0x7fb2abbdf640>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 143,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAGdCAYAAAA44ojeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAsr0lEQVR4nO3df3SU1YH/8c8AYQh0MgaRDFMSCG78GcSASEG/DRYJtWBr/Z6VFtZjt3v2QAFrqluEul3zdbcJ0payLQVWdw+l24Ow5yhdv0etxFaDfoNrSoLyw6ItkaRKiLQhiYAJwv3+gUwdkhlmkvvMPJPn/TpnzjH3eWbmzmWeeT7e+9zn+owxRgAAAC4yKN0VAAAAuBABBQAAuA4BBQAAuA4BBQAAuA4BBQAAuA4BBQAAuA4BBQAAuA4BBQAAuM6QdFegL86ePav33ntPgUBAPp8v3dUBAAAJMMaos7NT4XBYgwbF7yPJyIDy3nvvKT8/P93VAAAAfdDc3KyxY8fG3ScjA0ogEJB07gPm5OSkuTYAACARHR0dys/Pj5zH48nIgHJ+WCcnJ4eA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/7F0dHTYrjb6YWPNIW2sORR3n6zBJJR0IoT0zdGO3ntKYpV7ndtvkpYKDU1tqnnrWMztfbkDsVdZP2ts27ZNv/jFL7RlyxbV19dr8+bN+sEPfqDNmzdH7efzRc+RM8b0KDuvqqpKwWAw8sjPz7dd7QErkSGeVDjJGE9alRTk6nNXXdbrNqY9wibb17Jk2hDPxY4njrfEWe9B+fa
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"# reset df\n",
|
||
|
"series = df['PACK1_CRIDATA_SOC'].cast(pl.Float32).fill_null(-10)\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 147,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.collections.PathCollection at 0x7fb2ac59bd30>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 147,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAGdCAYAAAA44ojeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABK1ElEQVR4nO3df3hU1Z0/8HeAEAOdDImQhIEEg6WCDYWAgCDbQC2hLNpa2BV/1Ee7+/SrAraxLv74sl15dEsAK/W7RWT12aV2uyh9FnG7j7WAFWNdYEn5ofzSKgQSgTT8CEnkR4Jwv3+wM52ZzL33nLnnzj335v16njyPnLlz75kzZ2Y+ns8952QZhmGAiIiISCM9vK4AERERUTIGKERERKQdBihERESkHQYoREREpB0GKERERKQdBihERESkHQYoREREpB0GKERERKSdXl5XIB2XL1/GsWPHEAqFkJWV5XV1iIiISIBhGGhvb0ckEkGPHtZjJL4MUI4dO4aSkhKvq0FERERpaGxsxODBgy2P8WWAEgqFAFx5gXl5eR7XhoiIiES0tbWhpKQk9jtuxZcBSjStk5eXxwCFiIjIZ0Ruz+BNskRERKQdBihERESkHQYoREREpB0GKERERKQdBihERESkHQYoREREpB0GKERERKQdBihERESkHQYoREREpB3pAOXdd9/FrbfeikgkgqysLLz++usJjxuGgUWLFiESiSA3NxdTpkzBvn37Eo7p6OjAQw89hP79+6Nv37745je/iU8//dTRCyEiIqLgkA5Qzp49i1GjRmHFihUpH1+2bBmWL1+OFStWoK6uDsXFxZg2bRra29tjx1RXV2P9+vV49dVX8d577+Gzzz7DLbfcgkuXLqX/Ssj3djW04LWdn2JXQ4vXVSEiIo9lGYZhpP3krCysX78et912G4AroyeRSATV1dV47LHHAFwZLSkqKsLSpUtx//33o7W1FQMGDMC//du/Yc6cOQD+vDvxb37zG0yfPt32um1tbQiHw2htbeVePAGx5M0DWFV7KPbvByqH4vEZIzysERERqSbz+630HpT6+no0NTWhqqoqVpaTk4PKykps2bIFALBjxw5cvHgx4ZhIJILy8vLYMck6OjrQ1taW8EfBsauhJSE4AYBVtYc4kkJE1I0pDVCampoAAEVFRQnlRUVFsceamprQu3dv5Ofnmx6TrKamBuFwOPZXUlKistrksfqTZ6XKiYgo+FyZxZO8jbJhGLZbK1sd88QTT6C1tTX219jYqKyu5L2y/n2lyomIKPiUBijFxcUA0GUkpLm5OTaqUlxcjM7OTrS0tJgekywnJwd5eXkJfxQcFaX5eKByaELZg5VDUVGab/IMIiIKOqUBSllZGYqLi7Fp06ZYWWdnJ2prazFp0iQAwNixY5GdnZ1wzPHjx7F3797YMdT9PD5jBNbPnYTlt4/C+rmT8BhvkCUi6tZ6yT7hs88+wyeffBL7d319PXbv3o2CggKUlpaiuroaixcvxrBhwzBs2DAsXrwYffr0wV133QUACIfD+Nu//Vs88sgj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acljbbipdqqmfZuWy9Yo/h8x10r0eAHx75RaMLkn8MRxdEk5of7Oh/tzsHpgzrlTquiLHpjtqY9U2sueNP3bB9OGms6eibSBKNG2y+rvjpZ6fm92jy79l6jXux5vw/OaD2HroNJ7ffBDjfrzJ9jlW7QJc+TzZfY43PFxp+XjPLPHvgjnjSh23gwrXDviCVLkVs/c7ufyQTd8WvfaccaVd3tOeWdByijHgQoCydOlSrFq1CitWrMCBAwewbNkyPPPMM/jZz34WO2bZsmVYvnw5VqxYgbq6OhQXF2PatGlobw/mVCnq6rurtwsfO+z/yt90uauhBSfaE/P8ze2d2NVgPWw9YfFbUuUyP4rPbPg
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"# start = 50000\n",
|
||
|
"# end = start + 10000\n",
|
||
|
"start = 0\n",
|
||
|
"end = len(df)\n",
|
||
|
"window = series[start:end]\n",
|
||
|
"plt.scatter(range(len(window)), window, s=10)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 153,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.collections.PathCollection at 0x7fb2abf70a60>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 153,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAh8AAAGdCAYAAACyzRGfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAlPElEQVR4nO3df3BU1d3H8c9CYIGYbKNIlpREQ5tq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FKLntv2jrPVb/zwQ9zL44ABAXwocLUXLbf9HGZMhg/tcBgHjxL6gLUXLbf+xiCwCJR/hwIUpu+4ddbAHAGYQPl6Lk9tLYxRYAnEH4cClKbi+NMQIAZxA+XCpSyS2lo+EildgyRgAwcFnJ7gCSp6aqVLPG+UMbpk2/ZlSSe5Q6opXYVkYoUwYAxIaZD5d7sbldj7/0gR5/6QPd9dQerdp1MNldSgmUIwOAcwgfLhbpr3suNnYeJbYA4BzCh4vx131klNgCgLMIHy5GNUdklNgCgLMIHy4WqeKFv+4JZQDgNMKHy9VUlYZd7XR741HXLzqlxBYAnEX4cLlI6xvcvOiUElsAcB7hw+VYdBqO8QAA5xE+XI71DeEosQUA5xE+gP9HiS0A2EH4cDlOM3yGElsAsIPw4XKcdvkMYwEAdhA+XC7StT6kyOWmmY4SWwCwI+bw8eGHH+q73/2urrjiCo0YMUITJ07Uvn37QvcbY7Ry5UoVFBRo+PDhmj59upqbmxPaaSTWrAhlpG4rt6XEFgDsiSl8dHZ26qabbtKQIUO0a9cuvfvuu/r1r3+tz33uc6Fj1qxZo7Vr12r9+vXau3ev/H6/Zs6cqa6urkT
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"start = 70400\n",
|
||
|
"end = start + 500\n",
|
||
|
"window = series[start:end]\n",
|
||
|
"plt.scatter(range(len(window)), window, s=10)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"Good news is that the data makes sense. It discharges in about 40 minutes, then charges back up in the same amount of time"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 155,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.collections.PathCollection at 0x7fb2abe4d300>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 155,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAGdCAYAAAA44ojeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAk50lEQVR4nO3df3TU1Z3/8deQhCHByQjEzDCSYPBkCxp/YLCswDG4QqiNdq091QKibfeclQJKxBWI1hXdNQG6Us8WgcLpobbWQnuE1q5Qia2N2lBJCVEMFqsEEpE0UuNM+GEC5H7/sHy+DgmQgflxJ3k+zvn8Mfdz5zPvz03IvLifz51xGWOMAAAALNIv0QUAAACcioACAACsQ0ABAADWIaAAAADrEFAAAIB1CCgAAMA6BBQAAGAdAgoAALBOaqILOBednZ368MMP5fF45HK5El0OAADoAWOM2traFAgE1K/fmedIkjKgfPjhh8rJyUl0GQAA4Bw0NTVp2LBhZ+yTlAHF4/FI+uwEMzMzE1wNAADoiVAopJycHOd9/EySMqCcvKyTmZlJQAEAIMn05PYMbpIFAADWIaAAAADrEFAAAIB1CCgAAMA6BBQAAGAdAgoAALAOAQUAAFiHgAIAAKxDQAEAANaJOKC8+uqruuWWWxQIBORyufSrX/0qbL8xRosWLVIgEFB6eromTpyo+vr6sD7t7e269957lZWVpYEDB+orX/mKPvjgg/M6EQAA0HtEHFAOHz6sq666SsuXL+92/9KlS7Vs2TItX75cNTU18vv9mjx5stra2pw+paWl2rhxo9atW6fXX39dhw4d0s0336wTJ06c+5kAAJLSjsZWbaj9QDsaWxNdCiziMsaYc36yy6WNGzfq1ltvlfTZ7EkgEFBpaakWLFgg6bPZEp/PpyVLluiee+5RMBjURRddpJ/+9Ke64447JP3/byfetGmTpkyZctbXDYVC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R16lSNHDlSaWlpGj16tEpLSzV16lRJUnNzsyTJ5wv/4iyfz+fsO1V7e7tCoVDYBgC2ON19JD1R2/hJ1OrobVZV7dGOxshWM3W3nPdcjtNT31q7TSfO4zrEvxfxxZCnE/WAsn79ej377LN67rnnVFtbq2eeeUb/8z//o2eeeSasn8sVvn7KGNOl7aSKigp5vV5ny8nJiXbZAAALRbo893T9z2WZb0/Ufxg8e6czYDn56UU9oDz44INauHChvvGNb+iKK67QjBkzdP/996uiokKS5Pf7JanLbElLS0uXWZWTysrKFAwGna2pqSnaZQPAeWGmPjYiXZ57uv7nssy3Jy4PeM/e6QxYTn56Uf83deTIEfXrF37YlJQUZ5lxXl6e/H6/Kisrnf0dHR2qqqrSuHHjuj2m2+1WZmZm2AYANtlzjjc69qUbJCP1naIREd/gOjp3kGYWjTjv4/TU2m998Zw/UC3b05/l5GcQ9e/iueWWW/TEE08oNzdXl19+uXbs2KFly5bp29/+tqTPLu2UlpaqvLxc+fn5ys/PV3l5uTIyMjRt2rRolwMAcbN3cYlGLHyxRzdHprik9ytKnOdd9shmHTnWk2f2XtFaxbPwplGacrk/bqt43q8oOesqntR+0vHP/Xhn33Ap4eQsor7MuK2tTY888og2btyolpYWBQIBTZ06Vf/5n/+p/v37S/rsfpPHHntMP/zhD9Xa2qqxY8fq6aefVkFBQY9eg2XGAAAkn0jev6MeUOKBgAIAQPJJ6OegAAAAnC8CCgAAsA4BBQAAWIeAAgAArENAAQAA1iGgAAAA6xBQAACAdQgoAADAOgQUAABgHQIKAACwDgEFAABYh4ACAACsQ0ABAADWIaAAAADrEFAAAIB1CCgAAMA6BBQAAGAdAgoAALAOAQUAAFiHgAIAAKxDQAEAANYhoAA
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"start = 50000\n",
|
||
|
"end = start + 10000\n",
|
||
|
"window = series[start:end]\n",
|
||
|
"plt.scatter(range(len(window)), window, s=10)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## strategy\n",
|
||
|
"\n",
|
||
|
"We are going to identify periods of discharge/charge, then try to interpolate missing data in those intervals\n",
|
||
|
"\n",
|
||
|
"Large periods of missing data usually correspond to idle times"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 6,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"window_size = 10\n",
|
||
|
"# moving_avg = (df['PACK1_CRIDATA_SOC'].cast(pl.Float32)\n",
|
||
|
"# .fill_null(-10)\n",
|
||
|
"# .rolling_mean(window_size=window_size)\n",
|
||
|
"# .fill_null(-10))\n",
|
||
|
"moving_avg = df['PACK1_CRIDATA_SOC'].cast(pl.Float32).fill_null(-10)\n",
|
||
|
"\n",
|
||
|
"# moving_std = (df['PACK1_CRIDATA_SOC'].cast(pl.Float32)\n",
|
||
|
"# .fill_null(-10)\n",
|
||
|
"# .rolling_std(window_size=window_size)\n",
|
||
|
"# .fill_null(10))\n",
|
||
|
"\n",
|
||
|
"downward_segments = []\n",
|
||
|
"threshold_long = 10\n",
|
||
|
"threshold_short = 0.1\n",
|
||
|
"# smoothness = 3.0\n",
|
||
|
"segment_start = None\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"for i in range(len(df)):\n",
|
||
|
" if ((moving_avg[i] - moving_avg[i - 1] > threshold_short) and \n",
|
||
|
" (moving_avg[i] - moving_avg[i - 1] < threshold_long)):\n",
|
||
|
" # activate flag upon first contact\n",
|
||
|
" if segment_start is None:\n",
|
||
|
" segment_start = i - window_size + 1\n",
|
||
|
" # at end of downward movement, reset flag\n",
|
||
|
" elif segment_start is not None:\n",
|
||
|
" segment_end = i\n",
|
||
|
" downward_segments.append((segment_start, segment_end))\n",
|
||
|
" segment_start = None\n",
|
||
|
" "
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 8,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"# reset df\n",
|
||
|
"series = df['PACK1_CRIDATA_SOC'].cast(pl.Float32).fill_null(-10)\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 255,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"time = range(len(df))\n",
|
||
|
"for start, end in downward_segments:\n",
|
||
|
" plt.fill_betweenx(series, start, end, color='green', alpha=0.3)\n",
|
||
|
"plt.xlim(0, len(df))\n",
|
||
|
"plt.scatter(range(len(series)), series)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 9,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.collections.PathCollection at 0x7f6dbf4bc970>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 9,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiAAAAGdCAYAAAArNcgqAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAyjUlEQVR4nO3de3RU5b3/8c+eXCYXkgkhkIsEicivglERFRQv0CqpVq0VT09V6vl5bC0utIquUy0LPUS7StTTUs4pPfqzp7poPahLW1tcbdVYK20FFKHIrUckRMOBhHAJSchlcpnn90eawSGZzJ7JzJ5k5v1aa9Yye57Z+8njMPPJ3s93P5YxxggAAMBBrnh3AAAAJB8CCAAAcBwBBAAAOI4AAgAA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tKXJEm1tbVqaGhQRUWF/zVut1tz587Vhg0bBt2n1+tVS0tLwAP22a1woRIm9uyW36amdihnTKMDPQKAkSus+z0/9NBDam5u1llnnaWUlBT19vbq+9//vm655RZJUkND31yDwsLAmxsUFhbq008/HXSfVVVVevTRRyPpO2S/woVKmNizW347buw+WRaXxAAkt7DOgLz00kt6/vnntXbtWm3dulVr1qzRD37wA61ZsyagnWUF/hVojBmwrd/SpUvV3Nzsf+zfvz/MXyG59VfChNLU1uVAb5Kb3fLbsXm8xwEgrADyne98R9/97nd1880365xzztFtt92m+++/X1VVVZKkoqK++1L0nwnp19jYOOCsSD+3263c3NyAB+xLcVl65NppIdt977dMRI0lu+W3YzJ7uPwCAAozgLS3t8t1yq0bU1JS/GW4ZWVlKioqUnV1tf/5rq4urV+/XnPmzIlCdzGYsdnukG2YiBpbdstvzz29hcsvAKAw54Bcf/31+v73v69Jkybp7LPP1l//+letXLlSd9xxh6S+Sy9LlizRihUrNHXqVE2dOlUrVqxQVlaWbr311pj8ArA/wbR6d4MumTIuxr1JTnbnf+SN6dYRX+h2AJDowgogP/7xj/XII49o8eLFamxsVElJiRYtWqR//dd/9bd58MEH1dHRocWLF6upqUmzZ8/Wm2++qZycnKh3Hn3CWRl32bXTlcIdsKLO7hzfLHevZDOsAEAiCyuA5OTkaNWqVVq1alXQNpZlqbKyUpWVlcPsGuzqXxn3WFvw+4FIJ1fG5SxI9NVws1kACAtrwSQAVsaNL59PenuXvbNK7d6UGPcGAEYHAkiCsLsy7idHuANntL3xoeTtsRdAxmT0xrg3ADA6EEASxKyyfBXlhq6GeXFzHeW4UeTzSe/sthc+styGFXAB4O8IIAkixWXpllmTQrajHDe6ag5J7V32Asi8aYYVcAHg7wggCWRyQbatdtW7mTEZLXZXv01PNfriebHtCwCMJgSQBBJOOS6XYYYvnNVvryo3cvGvDQD8+EhMIP3luKH0l+NieOyufpuRxtkPADgVASSBUI7rLLt3P714Kmc/AOBUfCwmGLvluHYv1yA4u6vfnht6bjAAJB0CSIK54PSxISstXFZfO0TOZ+ytfpuXZTRl8IWgASCpEUASzJZPmxRqfqnP9LVD5A4cybC1+u2c/8PlFwAYDB+NCSaclXERub31WbbajffEuCMAMEoRQBIMpbixZ4y0u87e6s6ezBh3BgBGKQJIgqEUN/aONY9TZ3foReXGZDD/AwCCIYAkGEpxY8/bHXrNHUm68AzmfwBAMHw8JiBWxo2ttnZ7t7yn/BYAgiOAJCBWxo0dY6T9DZNE+S0ADA8BJAGxMm7sNLWMk7c7U5TfAsDw8BGZoFgZNzYaj9m7vEX5LQAMjQCSoCjHjT6fkeobS221pfw
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"start_time = 70000 + 400; end_time = start_time + 500\n",
|
||
|
"sampled_segments = [(segment_start, segment_end) for segment_start, segment_end in downward_segments if ((segment_start > start_time) and (segment_end < end_time))]\n",
|
||
|
"for start, end in sampled_segments:\n",
|
||
|
" plt.fill_betweenx(series[start_time:end_time], start, end, color='green', alpha=0.3)\n",
|
||
|
"# plt.xlim(0, len(df[start:end]))\n",
|
||
|
"plt.scatter(range(start_time,end_time), series[start_time:end_time])"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 195,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"[]"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 195,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"sampled_segments"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# What are faults associated with?"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 1,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import polars as pl\n",
|
||
|
"import pandas as pd\n",
|
||
|
"import numpy as np\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"from io import StringIO\n",
|
||
|
"import math\n",
|
||
|
"df = pl.read_csv('output.csv')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 209,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"['',\n",
|
||
|
" 'time',\n",
|
||
|
" 'AVG_PACK_SOC',\n",
|
||
|
" 'AvgSOC',\n",
|
||
|
" 'AvgSOH',\n",
|
||
|
" 'BATT_PACK_1_DISCONN',\n",
|
||
|
" 'BATT_PACK_1_FAULT',\n",
|
||
|
" 'BATT_PACK_1_WARN',\n",
|
||
|
" 'BATT_PACK_2_DISCONN',\n",
|
||
|
" 'BATT_PACK_2_FAULT',\n",
|
||
|
" 'BATT_PACK_2_WARN',\n",
|
||
|
" 'BATT_PACK_3_DISCONN',\n",
|
||
|
" 'BATT_PACK_3_FAULT',\n",
|
||
|
" 'BATT_PACK_3_WARN',\n",
|
||
|
" 'BATT_PACK_4_DISCONN',\n",
|
||
|
" 'BATT_PACK_4_FAULT',\n",
|
||
|
" 'BATT_PACK_4_WARN',\n",
|
||
|
" 'BATT_PACK_5_DISCONN',\n",
|
||
|
" 'BATT_PACK_5_FAULT',\n",
|
||
|
" 'BATT_PACK_5_WARN',\n",
|
||
|
" 'BATT_PACK_6_DISCONN',\n",
|
||
|
" 'BATT_PACK_6_FAULT',\n",
|
||
|
" 'BATT_PACK_6_WARN',\n",
|
||
|
" 'BATT_PACK_7_DISCONN',\n",
|
||
|
" 'BATT_PACK_7_FAULT',\n",
|
||
|
" 'BATT_PACK_7_WARN',\n",
|
||
|
" 'BATT_ROOM_TEMP',\n",
|
||
|
" 'Current',\n",
|
||
|
" 'MAX_CELL_TEMP',\n",
|
||
|
" 'MAX_CELL_VOL',\n",
|
||
|
" 'MAX_PACK_SOC',\n",
|
||
|
" 'MAX_UNCONN_PACK_VOL',\n",
|
||
|
" 'MIN_CELL_TEMP',\n",
|
||
|
" 'MIN_CELL_VOL',\n",
|
||
|
" 'MIN_PACK_SOC',\n",
|
||
|
" 'MIN_UNCONN_PACK_VOL',\n",
|
||
|
" 'NUMBER_OF_PACKS_CONN',\n",
|
||
|
" 'NUMBER_OF_PACKS_FAULTED',\n",
|
||
|
" 'PACK1_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK1_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK1_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK1_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK1_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK1_CRIDATA_CURR',\n",
|
||
|
" 'PACK1_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK1_CRIDATA_SOC',\n",
|
||
|
" 'PACK1_CRIDATA_SOH',\n",
|
||
|
" 'PACK2_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK2_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK2_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK2_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK2_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK2_CRIDATA_CURR',\n",
|
||
|
" 'PACK2_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK2_CRIDATA_SOC',\n",
|
||
|
" 'PACK2_CRIDATA_SOH',\n",
|
||
|
" 'PACK3_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK3_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK3_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK3_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK3_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK3_CRIDATA_CURR',\n",
|
||
|
" 'PACK3_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK3_CRIDATA_SOC',\n",
|
||
|
" 'PACK3_CRIDATA_SOH',\n",
|
||
|
" 'PACK4_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK4_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK4_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK4_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK4_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK4_CRIDATA_CURR',\n",
|
||
|
" 'PACK4_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK4_CRIDATA_SOC',\n",
|
||
|
" 'PACK4_CRIDATA_SOH',\n",
|
||
|
" 'PACK5_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK5_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK5_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK5_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK5_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK5_CRIDATA_CURR',\n",
|
||
|
" 'PACK5_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK5_CRIDATA_SOC',\n",
|
||
|
" 'PACK5_CRIDATA_SOH',\n",
|
||
|
" 'PACK6_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK6_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK6_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK6_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK6_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK6_CRIDATA_CURR',\n",
|
||
|
" 'PACK6_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK6_CRIDATA_SOC',\n",
|
||
|
" 'PACK6_CRIDATA_SOH',\n",
|
||
|
" 'PACK7_CRIDATA_AVG_CELL_TEMP',\n",
|
||
|
" 'PACK7_CRIDATA_AVG_CELL_VOL',\n",
|
||
|
" 'PACK7_CRIDATA_BATT_VOL',\n",
|
||
|
" 'PACK7_CRIDATA_BUS_VOL',\n",
|
||
|
" 'PACK7_CRIDATA_CHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK7_CRIDATA_CURR',\n",
|
||
|
" 'PACK7_CRIDATA_DISCHARGE_CURR_LIMIT',\n",
|
||
|
" 'PACK7_CRIDATA_SOC',\n",
|
||
|
" 'PACK7_CRIDATA_SOH',\n",
|
||
|
" 'PACK_1_STATUS',\n",
|
||
|
" 'PACK_2_STATUS',\n",
|
||
|
" 'PACK_3_STATUS',\n",
|
||
|
" 'PACK_4_STATUS',\n",
|
||
|
" 'PACK_5_STATUS',\n",
|
||
|
" 'PACK_6_STATUS',\n",
|
||
|
" 'PACK_7_STATUS',\n",
|
||
|
" 'RunningState',\n",
|
||
|
" 'Voltage',\n",
|
||
|
" 'valuestreamname']"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 209,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df.columns"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 6,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"def convert_values(values):\n",
|
||
|
" numerical_values = []\n",
|
||
|
" for value in values:\n",
|
||
|
" if value == 'False':\n",
|
||
|
" numerical_values.append(0)\n",
|
||
|
" elif value == 'True':\n",
|
||
|
" numerical_values.append(1)\n",
|
||
|
" else:\n",
|
||
|
" # numerical_values.append(np.nan)\n",
|
||
|
" numerical_values.append(-1)\n",
|
||
|
" return numerical_values\n",
|
||
|
"\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 7,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.collections.PathCollection at 0x7fe32e9c24d0>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 7,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjgAAAGdCAYAAAAfTAk2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAw2UlEQVR4nO3de3RU5b3/8c8AyQT5JVswzU1iSF3KLciBICSxqCgGULCUHgleopyD8cRfERHp0RR7BNbPE7XValWsclC8INAaOKVLSAnKzZUAAglyk3IUSMQZIzSZCUWSQPbvDxZzHCZXyOTy8H6ttdciz3z3M8/zzJ7Mhz0zOw7btm0BAAAYpEt7DwAAAKC1EXAAAIBxCDgAAMA4BBwAAGAcAg4AADAOAQcAABiHgAMAAIxDwAEAAMbp1t4DaA91dXX65ptvFB4eLofD0d7DAQAAzWDbtqqqqhQXF6cuXRo/R3NJBpxvvvlG8fHx7T0MAABwAcrKytS7d+9Gay7JgBMeHi7p7AJFRES082gAAEBzeL1excfH+17HG3NJBpxzb0tFREQQcAAA6GSa8/ESPmQMAACMQ8ABAADGIeAAAADjEHAAAIBxCDgAAMA4BBwAAGAcAg4AADAOAQcAABjnkrzQH9CRnTh1Wo8s+UzbDldKDoeGJ/bSK3cP1f8J83+6ek7W6l8Xb9M3nlOKs8L01tThsi4Luaj7PlNna9uhv6u86pQiQrppyfZSlVV8r6t6dtfvMoYEjOFMna0tXx7XxoPfauP+b/X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640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"fault = convert_values(df['BATT_PACK_1_FAULT'])\n",
|
||
|
"plt.scatter(range(len(fault)), fault)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 189,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"[<matplotlib.lines.Line2D at 0x7f6d74a9b010>]"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 189,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjEAAAGdCAYAAADjWSL8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABC40lEQVR4nO3de3xU9YH//3cgV2IyEjAZAgGjpAgGUIOGoBaUe42xpS0qNmt3KWot0Kyw/sry7de0uwXLd0W6sFpleQgKyG5Xad2qkVAVZbkajAIipQtyTQhimCQQEgjn9wdymsl97ufMvJ6PxzweycxnzuUz5/I+n/M550QZhmEIAADAZrqFegIAAAC8QYgBAAC2RIgBAAC2RIgBAAC2RIgBAAC2RIgBAAC2RIgBAAC2RIgBAAC2FB3qCQiUS5cu6cSJE0pKSlJUVFSoJwcAAHSBYRiqra1Venq6unXruK0lbEPMiRMnlJGREerJAAAAXjh69Kj69evXYZmwDTFJSUmSLldCcnJyiKcGAAB0RU1NjTIyMsz9eEfCNsRcOYWUnJxMiAEAwGa60hWEjr0AAMCWCDEAAMCWCDEAAMCWCDEAAMCWCDEAAMCWCDEAAMCWCDEAAMCWCDEAAMCWCDEAAMCWCDEAAMCWC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TFRBQUFOnbsmFuZ6upqFRYWyuFwyOFwqLCwUGfOnPFuLmEbrMgAgK7yKMRUV1fr9ttvV0xMjN5++2199tlneuaZZ3T11VebZRYtWqTFixdr2bJl2rlzp5xOp8aPH6/a2lqzTFFRkdavX69169Zp8+bNqqurU35+vpqamswy06ZNU3l5uUpKSlRSUqLy8nIVFhb6PseQxAMMAcDu6NsmRXtS+Ne//rUyMjL00ksvme9de+215t+GYWjJkiWaP3++pkyZIklatWqV0tLStHbtWj366KNyuVxasWKFXnnlFY0bN06StHr1amVkZGjjxo2aOHGi9u3bp5KSEm3btk25ubmSpOXLlysvL0/79+/XoEGDfJ1v2ARhC4HCogXYn0ctMW+88YZGjBih73//+0pNTdXNN9+s5cuXm58fOnRIlZWVmjBhgvleXFycRo8erS1btkiSysrKdOHCBbcy6enpys7ONsts3bpVDofDDDCSNHLkSDkcDrNMSw0NDaqpqXF72RmdSYODegYA+/IoxBw8eFDPP/+8srKy9M477+ixxx7T7Nmz9fLLL0uSKisrJUlpaWlu30tLSzM/q6ysVGxsrHr27NlhmdTU1FbjT01NNcu0tHDhQrP/jMPhUEZGhiezBtDqA0Qg1np78yjEXLp0SbfccosWLFigm2++WY8++qhmzJih559/3q1cy52BYRid7iBalmmrfEfDmTdvnlwul/k6evRoV2fL8ti5AgiWSG6cbH61n2FE9t2L7cKjENOnTx8NGTLE7b3BgwfryJEjkiSn0ylJrVpLqqqqzNYZp9OpxsZGVVdXd1jm5MmTrcZ/6tSpVq08V8TFxSk5OdntBQQKHep8FIBgHmlhPxiX1wNW51GIuf3227V//3639/785z9rwIABkqTMzEw5nU6Vlpaanzc2NmrTpk0aNWqUJCknJ0cxMTFuZSoqKrRnzx6zTF5enlwul3bs2GGW2b59u1wul1kGAJoLZf+mYIXaCMtpEYXf1jseXZ3093//9xo1apQWLFigqVOnaseOHXrxxRf14osvSrp8JFRUVKQFCxYoKytLWVlZWrBggXr06KFp06ZJkhwOh6ZPn645c+aoV69eSklJ0dy5czV06FDzaqXBgwdr0qRJmjFjhl544QVJ0iOPPKL8/HyuTAIAAJI8DDG33nqr1q9fr3nz5umXv/ylMjMztWTJEj300ENmmSe
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.plot(df['Voltage'].cast(pl.Float32))"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"We see that faults are constrained to between 50000 and 150000"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## overview"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 176,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'batt room temp')"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 176,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0oAAAlGCAYAAABnaCHYAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzde3wU9b3/8ffmtoSYLARIwkICkSIiQYSIGNQCIiCC1uo5oFhUpArFSyNQkXqsYFsuWtFWxUtrwXoB7FE8WikSW8UioMhFuXkrl4AkBjBsAoQEwvz+4MeWnexsJsnekryej8c+IN/57sx3dmZn5zPfm8MwDEMAAAAAAK+YSBcAAAAAAKINgRIAAAAAmBAoAQAAAIAJgRIAAAAAmBAoAQAAA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B0oEDB1RdXa309HSf9PT0dBUXF/t9T//+/fXKK69o9OjRSkhIUEZGhlq1aqUnn3zScjuVlZUqKyvzeQEAAACAXREZzMHhcPj8bRhGjbTTtm3bpnvuuUe/+tWvtH79ei1fvlw7d+7UxIkTLdc/e/ZsuVwu7yszMzOo5QcAAADQtDkMwzDCtbGqqiq1bNlSf/3rX/XjH//Ym/7zn/9cmzZt0sqVK2u8Z+zYsTp27Jj++te/etNWrVqlyy67TPv27VP79u1rvKeyslKVlZXev8vKypSZmSmPx6OUlJQg7xUAAACAxqKsrEwul6vW2CCsNUoJCQnKzc1VQUGBT3pBQYH69+/v9z1
|
||
|
"text/plain": [
|
||
|
"<Figure size 1000x3000 with 10 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"# start = 115000\n",
|
||
|
"# end = 140000\n",
|
||
|
"start = 0\n",
|
||
|
"end = len(df)\n",
|
||
|
"#\n",
|
||
|
"\n",
|
||
|
"num_rows = 10\n",
|
||
|
"fig, axs = plt.subplots(nrows=num_rows, ncols=1, figsize=(10,3 * num_rows))\n",
|
||
|
"\n",
|
||
|
"numerical_values0 = convert_values(df['BATT_PACK_1_FAULT'][start:end])\n",
|
||
|
"numerical_values1 = df['PACK1_CRIDATA_BATT_VOL'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"numerical_values2 = df['PACK1_CRIDATA_AVG_CELL_VOL'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"numerical_values3 = df['PACK1_CRIDATA_AVG_CELL_TEMP'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"numerical_values4 = df['PACK1_CRIDATA_BUS_VOL'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"numerical_values5 = df['PACK1_CRIDATA_CHARGE_CURR_LIMIT'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"numerical_values6 = df['PACK1_CRIDATA_CURR'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"numerical_values7 = df['PACK1_CRIDATA_DISCHARGE_CURR_LIMIT'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"numerical_values8 = df['PACK1_CRIDATA_SOC'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"numerical_values9 = df['BATT_ROOM_TEMP'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"axs[0].scatter(range(len(numerical_values0)), numerical_values0, s=10)\n",
|
||
|
"axs[0].set_title(\"fault\")\n",
|
||
|
"axs[1].scatter(range(len(numerical_values1)), numerical_values1, s=10)\n",
|
||
|
"axs[1].set_title(\"voltage\")\n",
|
||
|
"axs[1].set_ylim(600,1000)\n",
|
||
|
"\n",
|
||
|
"axs[2].scatter(range(len(numerical_values2)), numerical_values2, s=10)\n",
|
||
|
"axs[2].set_title(\"avg cell vol\")\n",
|
||
|
"\n",
|
||
|
"axs[3].scatter(range(len(numerical_values3)), numerical_values3, s=10)\n",
|
||
|
"axs[3].set_title(\"avg cell temp\")\n",
|
||
|
"axs[3].set_ylim(-20, 100)\n",
|
||
|
"\n",
|
||
|
"axs[4].scatter(range(len(numerical_values4)), numerical_values4, s=10)\n",
|
||
|
"axs[4].set_title(\"bus vol\")\n",
|
||
|
"\n",
|
||
|
"axs[5].scatter(range(len(numerical_values5)), numerical_values5, s=10)\n",
|
||
|
"axs[5].set_title(\"charge curr limit\")\n",
|
||
|
"\n",
|
||
|
"axs[6].scatter(range(len(numerical_values6)), numerical_values6, s=10)\n",
|
||
|
"axs[6].set_title(\"curr\")\n",
|
||
|
"\n",
|
||
|
"axs[7].scatter(range(len(numerical_values7)), numerical_values7, s=10)\n",
|
||
|
"axs[7].set_title(\"discharge curr limit\")\n",
|
||
|
"\n",
|
||
|
"axs[8].scatter(range(len(numerical_values8)), numerical_values8, s=10)\n",
|
||
|
"axs[8].set_title(\"soc\")\n",
|
||
|
"\n",
|
||
|
"axs[9].scatter(range(len(numerical_values9)), numerical_values9, s=10)\n",
|
||
|
"axs[9].set_title(\"batt room temp\")\n",
|
||
|
"\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 155,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'batt room temp')"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 155,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0sAAAaRCAYAAABx2RaYAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzde3wU5d3///eSkE2AZAmEJASSEBQkEsUQkIJQQDAUqRaxt1EreGp/oiIirQWkd1XuarS9a7VVQFsP9a6H1ALWtlQJKhEFBUJABBSVQAIkhEBIwikJyfz+4JttNpnd7CabPZDX8/HYB2Tmmplr5tqZ3c9eM5/LYhiGIQAAAACAgy7+rgAAAAAABCKCJQAAAAAwQbAEAAAAACYIlgAAAADABMESAAAAAJggWAIAAAAAEwRLAAAAAGCCYAkAAAAATBAsAQAAAIAJgiUAQNDIycnR0KFDFRERIYvFom3btnl9GxMmTNCECRPsf586dUqPPPKI1q1b5/VtAQACG8ESACAoHDlyRDNnztQFF1ygd999Vxs3btTgwYM7fLunTp3So48+SrAEAJ1QqL8rAACAO/bs2aO6ujrdcsstGj9+vL+rAwDoBOhZAgAEvNtuu01jx46VJGVlZclisWjChAnasmWLbrzxRg0YMEAREREaMGCAbrrpJu3fv99h+UceeUQWi6XFel955RVZLBbt27fPdLv79u1Tnz59JEmPPvqoLBaLLBaLbrvtNq/uHwAgMNGzBAAIeP/93/+tyy+/XPfee68ef/xxTZw4UVFRUdq1a5cuuugi3XjjjerVq5dKSkq0bNkyjRw5Urt27VJMTEy7ttu3b1+9++67+t73vqc777xTP/7xjyXJHkABAM5vBEsAgIB3wQUX6OKLL5YkDRo0SN/5znckSRdffLF++MMf2svV19fr+9//vuLi4vT6669r7ty57dqu1WpVRkaGJKl///727QIAOgduwwMABK0TJ05owYIFuvDCCxUaGqrQ0FD16NFDJ0+e1O7du/1dPQBAkKNnCQAQtG6++Wa9//77+u///m+NHDlSUVFRslgsuvrqq3X69Gl/Vw8AEOQIlgAAQamyslL//Oc/9fDDD2vhwoX26TU1NTp27JhD2fDwcPs8q9Vqn15eXu6bygIAghK34QEAgpLFYpFhGA7BjyT96U9/Un19vcO0AQMGSJI+//xzh+n/+Mc/Wt1O4/rpqQKAzoeeJQBAUIqKitJ3v/td/eY3v1FMTIwGDBigvLw8vfjii+rZs6dD2auvvlq9evXSnXfeqSVLlig0NFSvvPKKiouLW91OZGSkkpOT9fe//12TJk1Sr1697NsDAJzf6FkCAASt119/XRMnTtTPf/5zzZgxQ1u2bFFubq5sNptDuaioKL377ruKjIzULbfcotmzZystLU2LFy92azsvvviiunXrpmuvvVYjR47UI4880gF7AwAINBbDMAx/VwIAAAAAAg09SwAAAABggmAJAAAAAEwQLAEAAACACYIlAAAAADBBsAQAAAAAJgiWAAAAAMBEpxiUtqGhQYcOHVJkZKQsFou/qwMAAADATwzDUHV1tRISEtSli+u+o04RLB06dEiJiYn+rgYAAACAAFFcXKz+/fu7LNMpgqXIyEhJ5w5IVFSUn2sDAAAAwF+qqqqUmJhojxFc6RTBUuOtd1FRUQRLAAAAANx6PIcEDwAAAABggmAJAAAAAEz4PFj66KOPdM011yghIUEWi0Vvv/12q8vk5eUpIyND4eHhGjhwoJYvX97xFQUAAADQqfn8maWTJ09q2LBhuv3223X99de3Wr6wsFBXX321fvKTn+gvf/mLPvnkE91zzz3q06ePW8sHq4KiCq37qkySNOGiWKUnRfu5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text/plain": [
|
||
|
"<Figure size 1000x2100 with 7 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"start = 115000\n",
|
||
|
"end = 140000\n",
|
||
|
"# start = 0\n",
|
||
|
"# end = len(df)\n",
|
||
|
"\n",
|
||
|
"num_rows = 7\n",
|
||
|
"fig, axs = plt.subplots(nrows=num_rows, ncols=1, figsize=(10,3 * num_rows))\n",
|
||
|
"\n",
|
||
|
"numerical_values0 = convert_values(df['BATT_PACK_1_FAULT'][start:end])\n",
|
||
|
"numerical_values1 = convert_values(df['BATT_PACK_1_WARN'][start:end])\n",
|
||
|
"numerical_values2 = df['Current'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"numerical_values3 = df['PACK1_CRIDATA_AVG_CELL_TEMP'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"numerical_values6 = df['PACK1_CRIDATA_CURR'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"numerical_values8 = df['PACK1_CRIDATA_SOC'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"numerical_values9 = df['BATT_ROOM_TEMP'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"axs[0].scatter(range(len(numerical_values0)), numerical_values0, s=10)\n",
|
||
|
"axs[0].set_title(\"fault\")\n",
|
||
|
"\n",
|
||
|
"axs[1].scatter(range(len(numerical_values1)), numerical_values1, s=10)\n",
|
||
|
"axs[1].set_title(\"warn\")\n",
|
||
|
"\n",
|
||
|
"axs[2].scatter(range(len(numerical_values2)), numerical_values2, s=10)\n",
|
||
|
"axs[2].set_title(\"current\")\n",
|
||
|
"axs[2].set_ylim(-20, 30)\n",
|
||
|
"\n",
|
||
|
"axs[3].scatter(range(len(numerical_values3)), numerical_values3, s=10)\n",
|
||
|
"axs[3].set_title(\"avg cell temp\")\n",
|
||
|
"axs[3].set_ylim(0, 30)\n",
|
||
|
"\n",
|
||
|
"axs[4].scatter(range(len(numerical_values6)), numerical_values6, s=10)\n",
|
||
|
"axs[4].set_title(\"pack 1 curr\")\n",
|
||
|
"axs[4].set_ylim(-5, 5)\n",
|
||
|
"\n",
|
||
|
"axs[5].scatter(range(len(numerical_values8)), numerical_values8, s=10)\n",
|
||
|
"axs[5].set_title(\"soc\")\n",
|
||
|
"\n",
|
||
|
"axs[6].scatter(range(len(numerical_values9)), numerical_values9, s=10)\n",
|
||
|
"axs[6].set_title(\"batt room temp\")\n",
|
||
|
"\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 105,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<div><style>\n",
|
||
|
".dataframe > thead > tr > th,\n",
|
||
|
".dataframe > tbody > tr > td {\n",
|
||
|
" text-align: right;\n",
|
||
|
"}\n",
|
||
|
"</style>\n",
|
||
|
"<small>shape: (9, 2)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>statistic</th><th>value</th></tr><tr><td>str</td><td>f64</td></tr></thead><tbody><tr><td>"count"</td><td>1000.0</td></tr><tr><td>"null_count"</td><td>0.0</td></tr><tr><td>"mean"</td><td>0.190974</td></tr><tr><td>"std"</td><td>0.914956</td></tr><tr><td>"min"</td><td>-1.19995</td></tr><tr><td>"25%"</td><td>-0.699951</td></tr><tr><td>"50%"</td><td>0.0</td></tr><tr><td>"75%"</td><td>1.09998</td></tr><tr><td>"max"</td><td>2.09998</td></tr></tbody></table></div>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"shape: (9, 2)\n",
|
||
|
"┌────────────┬───────────┐\n",
|
||
|
"│ statistic ┆ value │\n",
|
||
|
"│ --- ┆ --- │\n",
|
||
|
"│ str ┆ f64 │\n",
|
||
|
"╞════════════╪═══════════╡\n",
|
||
|
"│ count ┆ 1000.0 │\n",
|
||
|
"│ null_count ┆ 0.0 │\n",
|
||
|
"│ mean ┆ 0.190974 │\n",
|
||
|
"│ std ┆ 0.914956 │\n",
|
||
|
"│ min ┆ -1.19995 │\n",
|
||
|
"│ 25% ┆ -0.699951 │\n",
|
||
|
"│ 50% ┆ 0.0 │\n",
|
||
|
"│ 75% ┆ 1.09998 │\n",
|
||
|
"│ max ┆ 2.09998 │\n",
|
||
|
"└────────────┴───────────┘"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 105,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"start = 50000 + 70000 + 3000 \n",
|
||
|
"end = start + 1000\n",
|
||
|
"\n",
|
||
|
"df['PACK1_CRIDATA_CURR'].cast(pl.Float32)[start:end].describe()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 129,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<div><style>\n",
|
||
|
".dataframe > thead > tr > th,\n",
|
||
|
".dataframe > tbody > tr > td {\n",
|
||
|
" text-align: right;\n",
|
||
|
"}\n",
|
||
|
"</style>\n",
|
||
|
"<small>shape: (3, 2)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>statistic</th><th>value</th></tr><tr><td>str</td><td>i64</td></tr></thead><tbody><tr><td>"count"</td><td>273961</td></tr><tr><td>"null_count"</td><td>6346</td></tr><tr><td>"sum"</td><td>158353</td></tr></tbody></table></div>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"shape: (3, 2)\n",
|
||
|
"┌────────────┬────────┐\n",
|
||
|
"│ statistic ┆ value │\n",
|
||
|
"│ --- ┆ --- │\n",
|
||
|
"│ str ┆ i64 │\n",
|
||
|
"╞════════════╪════════╡\n",
|
||
|
"│ count ┆ 273961 │\n",
|
||
|
"│ null_count ┆ 6346 │\n",
|
||
|
"│ sum ┆ 158353 │\n",
|
||
|
"└────────────┴────────┘"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 129,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"# df.columns.index('PACK1_CRIDATA_BATT_VOL')\n",
|
||
|
"# df.columns.index('PACK1_CRIDATA_CURR')\n",
|
||
|
"df['RunningState'].describe()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 127,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'warn 2')"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 127,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA08AAAPcCAYAAACZzID3AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAACJb0lEQVR4nOzde1zUdd7//+cIMqjBpJIgiYhtJUYnBzU8rKmFp2zpiJWYHfzGlimyBzXbNLeNavfqcrs8dbC6ujKjVmutZV1xM9KkTAIzdau9JCGFCLMZPAQK798f/pyrCdQPCXwGedxvt89tv/Oe92c+r/fMOy6f3/fM++MwxhgBAAAAAE6qnd0FAAAAAEBrQHgCAAAAAAsITwAAAABgAeEJAAAAACwgPAEAAACABYQnAAAAALCA8AQAAAAAFhCeAAAAAMACwhMAAAAAWEB4AgAErOzsbF100UXq0KGDHA6HioqKmuU6V155pa688krf40OHDmnevHl69913Lb/GggULdP311ysuLk4Oh8Pv9QAAZwbCEwAgIH3zzTdKS0vTeeedpzVr1ig/P18XXHBBi1z70KFDevjhhxsVnpYuXardu3drxIgROuecc5qvOACAbYLtLgAAgIZ8/vnnOn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/aXmZmpp577jk9//zz2rlzp2bMmKGSkhLf1/Bmz56tSZMm+fqPHz9eq1at0pIlS7Rr1y69//77mjZtmgYMGKDo6Gi7hgEAAADgDBdsdwGpqan
|
||
|
"text/plain": [
|
||
|
"<Figure size 1000x1200 with 4 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"start = 50000 + 70000 + 3000\n",
|
||
|
"end = start + 1000\n",
|
||
|
"\n",
|
||
|
"num_rows = 4\n",
|
||
|
"fig, axs = plt.subplots(nrows=num_rows, ncols=1, figsize=(10,3 * num_rows))\n",
|
||
|
"\n",
|
||
|
"numerical_values0 = convert_values(df['BATT_PACK_1_FAULT'][start:end])\n",
|
||
|
"numerical_values1 = convert_values(df['BATT_PACK_1_WARN'][start:end])\n",
|
||
|
"\n",
|
||
|
"numerical_values2 = convert_values(df['BATT_PACK_7_FAULT'][start:end])\n",
|
||
|
"numerical_values3 = convert_values(df['BATT_PACK_7_WARN'][start:end])\n",
|
||
|
"\n",
|
||
|
"axs[0].scatter(range(len(numerical_values0)), numerical_values0, s=10)\n",
|
||
|
"axs[0].set_title(\"fault 1\")\n",
|
||
|
"\n",
|
||
|
"axs[1].scatter(range(len(numerical_values1)), numerical_values1, s=10)\n",
|
||
|
"axs[1].set_title(\"warn 1\")\n",
|
||
|
"\n",
|
||
|
"axs[2].scatter(range(len(numerical_values2)), numerical_values2, s=10)\n",
|
||
|
"axs[2].set_title(\"fault 2\")\n",
|
||
|
"\n",
|
||
|
"axs[3].scatter(range(len(numerical_values3)), numerical_values3, s=10)\n",
|
||
|
"axs[3].set_title(\"warn 2\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 138,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.collections.PathCollection at 0x7f6d7ae55ae0>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 138,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjMAAAGdCAYAAADnrPLBAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAA1cklEQVR4nO3de3hTVaL38V96C6W0FSg0LRQoWMWxeCsOgmJBbiqIDmfE23jkHfTAIGgHHEZkZkDOSBUVeQdGZvRwEEXEd44yx3O8UUZFGVCxgAKKgNyKtFawpAVKW9r9/gGNTe9tkiYr+X6eJ8/T7KzsrKzuZP+y9lp72yzLsgQAAGCoMH9XAAAAwBOEGQAAYDTCDAAAMBphBgAAGI0wAwAAjEaYAQAARiPMAAAAoxFmAACA0SL8XYG2UFVVpSNHjig2NlY2m83f1QEAAM1gWZZKSkqUnJyssLCG+19CIswcOXJEKSkp/q4GAABohby8PHXv3r3Bx0MizMTGxko62xhxcXF+rg0AAGiO4uJipaSkuPbjDQmJMFN9aCkuLo4wAwCAYZoaIsIAYAAAYDTCDAAAMBphBgAAGI0wAwAAjEaYAQAARiPMAAAAoxFmAACA0QgzAADAaIQZAABgNMIMAAAwGmEGAAAYjTADAACMFhIXmkTwKT9TpUsfXavSikr9akgf3T/0fHWwszkDQCiiZwZGmvlfn6u0olKStPSDb/TWF/l+rhEAwF8IMzDSpn3H3O6fLD/jp5oAAPyNMAMAAIxGmAEAAEYjzAAAAKMRZgAAgNEIMwAAwGiEGQAAYDTCDAAAMBphBgAAGI0wAyNZVuP3AQChgzADI5FdAADVCDMAAMBohBkAAGA0wgwAADAaYQYAABiNMAMAAIxGmAEAAEYjzAAAAKMRZgAAgNEIMzBSnTMA+6caAIAAQJiBoYgvAICzCDMAAMBohBkAAGA0wgwAADAa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UpMTHR7XmJiouuxgoICRUVFqWPHjg2WqS07O1vx8fGuW0pKirffGgAACBA+DTNVVVW64oorNH/+fF1++eWaNGmS7rvvPi1dutStnM1mc7tvWVadZbU1VmbWrFlyOp2uW15enmdvBAAABCyfhpmkpCT95Cc/cVt20UUX6dChQ5Ikh8MhSXV6WAoLC129NQ6HQ+Xl5SoqKmqwTG12u11xcXFuNwQ3pmoDQOjyaZi5+uqr9fXXX7st2717t3r27ClJSk1NlcPhUE5Ojuvx8vJyrV+/XoMGDZIkZWRkKDIy0q1Mfn6+duzY4SoDAABCl09nM/3617/WoEGDNH/+fI0fP16ffvqpnnvuOT333HOSzh5eysrK0vz585WWlqa0tDTNnz9f7du315133ilJio+P18SJEzVjxgx17txZnTp10kMPPaR+/fq5ZjcBAIDQ5dMwc+WVV2rNmjWaNWuW5s2bp9TUVC1atEh33XWXq8zMmTNVWlqqKVOmqKioSAMGDNDatWsVGxvrKvPMM88oIiJC48ePV2lpqYYNG6YXXnhB4eHhvqw+AhgHlQAA1WyWFfznUi0uLlZ8fLycTifjZ4LEBbPfVnlllev+zOsv1JQh5/uxRgAAb2vu/ptrMwEAAKMRZgAAgNEIMwAAwGiEGQAAYDTCDAAAMBphBkEh+OfkAQAaQpgBAABGI8wAAACjEWZgJC4sCQCoRpiBkRgjAwCoRpgBAABGI8wAAACjEWYAAIDRCDMAAMBohBkAAGA0wgwAADAaYQYAABiNMAMAAIxGmIGROGceAKAaYQZGsjgFMADgHMIMAAAwGmEGAAAYjTADAACMRpgBAABGI8wAAACjEWYQFJjdBAChizADAACMRpgBAABGI8wAAACjEWZgJEb
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.plot(df['PACK1_CRIDATA_CURR'].cast(pl.Float64).fill_null(0))\n",
|
||
|
"plt.scatter(range(len(numerical_values0)), numerical_values0, color=\"r\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 214,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'voltage')"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 214,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAz8AAAIOCAYAAACWBLP/AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAABCLUlEQVR4nO3de3RU1d3/8c+QyyRgMhgiCYEQgiKgKEJQJICAShQBRW1FULmoLVEuBloukacKqARQ0UcpUBWhightBYqWIqlKEMEKMSgFllQJJEBiHhAz4dIAyf794WJ+HXOBZHLf79da54/ZZ59zvt+415RPz8wZhzHGCAAAAAAauEa1XQAAAAAA1ATCDwAAAAArEH4AAAAAWIHwAwAAAMAKhB8AAAAAViD8AAAAALAC4QcAAACAFQg/AAAAAKxA+AEAAABgBcIPAKDWrFq1SldffbWCg4PlcDi0c+fOKr9G37591bdvX8/rU6dOacaMGdq0aVOVXwsAULcRfgAAteL//u//9NBDD+nyyy/Xhg0btG3bNl155ZXVft1Tp05p5syZhB8AsJB/bRcAALDTvn37dPbsWT344IPq06dPbZcDALAAd34AADVu1KhR6tWrlyRp6NChcjgc6tu3r3bs2KH7779fbdq0UXBwsNq0aaNhw4bp4MGDXsfPmDFDDoejxHmXLVsmh8OhAwcOlHrdAwcO6LLLLpMkzZw5Uw6HQw6HQ6NGjarS/gAAdRN3fgAANe53v/udbrjhBo0dO1azZ89Wv379FBoaqj179qh9+/a6//77FRYWppycHC1atEjXX3+99uzZo/DwcJ+u26JFC23YsEG33367HnnkET366KOS5AlEAICGjfADAKhxl19+ua666ipJUrt27XTjjTdKkq666ir94he/8MwrKirSoEGDFBERoRUrVmjChAk+XdfpdCouLk6S1KpVK891AQB24GNvAIA648SJE5o6daquuOIK+fv7y9/fX5dccolOnjypvXv31nZ5AIB6jjs/AIA6Y/jw4froo4/0u9/9Ttdff71CQ0PlcDh0xx136PTp07VdHgCgniP8AADqhPz8fH3wwQd6+umnNW3aNM94YWGhfvjhB6+5QUFBnn1Op9MzfvTo0ZopFgBQL/GxNwBAneBwOGSM8QozkvTGG2+oqKjIa6xNmzaSpK+//tpr/P3337/gdc6fnztJAGAf7vwAAOqE0NBQ3XTTTXr++ecVHh6uNm3aKC0tTUuWLFHTpk295t5xxx0KCwvTI488olmzZsnf31/Lli1Tdnb2Ba8TEhKimJgY/fWvf9Utt9yisLAwz/UAAA0bd34AAHXGihUr1K9fP02ZMkX33HOPduzYodTUVLlcLq95oaGh2rBhg0JCQvTggw8qMTFRnTp10vTp0y/qOkuWLFHjxo1155136vrrr9eMGTOqoRsAQF3jMMaY2i4CAAAAAKobd34AAAAAWIHwAwAAAMAKhB8AAAAAViD8AAAAALAC4QcAAACAFQg/AAAAAKxQL3/ktLi4WEeOHFFISIgcDkdtlwMAAACglhhjVFBQoKioKDVqVP69nXoZfo4cOaLo6OjaLgMAAABAHZGdna1WrVqVO6dehp+QkBBJPzUYGhpay9UAAAAAqC1ut1vR0dGejFCeehl+zn/ULTQ0lPADAAAA4KK+DsMDDwAAAABYgfADAAAAwAo+h5/Nmzdr8ODBioqKksPh0Nq1ay94TFpamuLi4hQUFKS2bdtq8eLFvpYBAAAAAOXyOfycPHlSnTt31oIFCy5qfmZmpu644w717t1bGRkZevLJJzVhwgS99957vpYCAAAAAGXy+YEHAwYM0IABAy56/uLFi9W6dWu9/PLLkqS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ACUyt/XE6xatUpJSUlauHChevb
|
||
|
"text/plain": [
|
||
|
"<Figure size 1000x600 with 2 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"stepper = 0\n",
|
||
|
"start = 116300 + stepper\n",
|
||
|
"end = start + 100 + stepper\n",
|
||
|
"# start = 0\n",
|
||
|
"# end = len(df)\n",
|
||
|
"#\n",
|
||
|
"\n",
|
||
|
"num_rows = 2\n",
|
||
|
"fig, axs = plt.subplots(nrows=num_rows, ncols=1, figsize=(10,3 * num_rows))\n",
|
||
|
"\n",
|
||
|
"numerical_values0 = convert_values(df['BATT_PACK_1_FAULT'][start:end])\n",
|
||
|
"numerical_values1 = df['PACK1_CRIDATA_SOH'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"axs[0].scatter(range(len(numerical_values0)), numerical_values0, s=10)\n",
|
||
|
"axs[0].set_title(\"fault\")\n",
|
||
|
"axs[1].scatter(range(len(numerical_values1)), numerical_values1, s=10)\n",
|
||
|
"axs[1].set_title(\"voltage\")\n",
|
||
|
"\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# identify train and test regions"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import polars as pl\n",
|
||
|
"import pandas as pd\n",
|
||
|
"import numpy as np\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"from io import StringIO\n",
|
||
|
"import math\n",
|
||
|
"df = pl.read_csv('output.csv')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 8,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"def convert_values(values):\n",
|
||
|
" numerical_values = []\n",
|
||
|
" for value in values:\n",
|
||
|
" if value == 'False':\n",
|
||
|
" numerical_values.append(0)\n",
|
||
|
" elif value == 'True':\n",
|
||
|
" numerical_values.append(1)\n",
|
||
|
" else:\n",
|
||
|
" # numerical_values.append(np.nan)\n",
|
||
|
" numerical_values.append(-1)\n",
|
||
|
" return numerical_values\n",
|
||
|
"\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.collections.PathCollection at 0x7fe32e9c24d0>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjgAAAGdCAYAAAAfTAk2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAw2UlEQVR4nO3de3RU5b3/8c8AyQT5JVswzU1iSF3KLciBICSxqCgGULCUHgleopyD8cRfERHp0RR7BNbPE7XValWsclC8INAaOKVLSAnKzZUAAglyk3IUSMQZIzSZCUWSQPbvDxZzHCZXyOTy8H6ttdciz3z3M8/zzJ7Mhz0zOw7btm0BAAAYpEt7DwAAAKC1EXAAAIBxCDgAAMA4BBwAAGAcAg4AADAOAQcAABiHgAMAAIxDwAEAAMbp1t4DaA91dXX65ptvFB4eLofD0d7DAQAAzWDbtqqqqhQXF6cuXRo/R3NJBpxvvvlG8fHx7T0MAABwAcrKytS7d+9Gay7JgBMeHi7p7AJFRES082gAAEBzeL1excfH+17HG3NJBpxzb0tFREQQcAAA6GSa8/ESPmQMAACMQ8ABAADGIeAAAADjEHAAAIBxCDgAAMA4BBwAAGAcAg4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kZ8nq9WrNmja9t7Nix6tmzp5YuXdrkmLxeryzLksfjUURERMsnBQAA2lxLXr+DeganpqZGO3bsUHp6ul97enq6CgsLG913yJAhio2N1a233qr169f73VZUVBTQ55gxYxrss7q
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"fault = convert_values(df['BATT_PACK_1_FAULT'])\n",
|
||
|
"plt.scatter(range(len(fault)), fault)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 11,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.collections.PathCollection at 0x7fe3301f9f30>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 11,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAi8AAAGdCAYAAADaPpOnAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAk0UlEQVR4nO3df3RU9YH38c+EkAmwya2Qk4RIJGHPlgQDpWKBsFB0tYEKstXdbiM66O55sNiNCO66En8c0S2G7en2sD4WULS2Fbp69gAuVjZLaBH1SUKEMAISQ38EiMAQLMkMLiUJ5Pv8wcM8Dgn5RW5mvuH9Omf+4M73znzny5B5MzP3xmOMMQIAALBEXLQnAAAA0BPECwAAsArxAgAArEK8AAAAqxAvAADAKsQLAACwCvECAACsQrwAAACrxEd7An2tra1Nx48fV1JSkjweT7SnAwAAusEYozNnzigjI0NxcZ2/tzLg4uX48ePKzMyM9jQAAEAv1NfXa9S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kiSPx9Nuf2NMh9slac+ePfq3f/s3/fSnP73imMsVFxcrGAyGL/X19T19SAAAwCI9/s5LUVGRCgsLOx2TlZWlffv26eTJk+2uO3XqlNLS0jrc7/3331dDQ4NuuOGG8LYLFy7oH/7hH7Rq1SodPny43T5er1der7dnDwIAAFirx/GSkpKilJSULsfl5+crGAyqqqpKkydPliTt2rVLwWBQ06ZN63Afn8+n22+/PWLbrFmz5PP59Ld/+7c9nSo
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"start = 170000\n",
|
||
|
"end = len(df)\n",
|
||
|
"window = fault[start:end]\n",
|
||
|
"plt.scatter(range(len(window)), window)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 13,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'batt room temp')"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 13,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0oAAAlGCAYAAABnaCHYAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdeXxU1eH///eQZUgwGUhCEgYSCBbZAoqIEKQFCgSUiFsLikZFi1hEjLgApbZolYDWpW641A/xKyh8+lEsLo2gVZSyL1E2UWuAIISAJhOWkITk/v7gx8jczJ3s67yej8c88si5Z2bOzNy5c9/33HuOzTAMQwAAAAAAt1aN3QAAAAAAaGoISgAAAABgQlACAAAAABOCEgAAAACYEJQAAAAAwISgBAAAAAAmBCUAAAAAMCEoAQAAAIAJQQkAAAAATAhKAIBmY9myZerdu7dCQkJks9mUlZVV588xbNgwDRs2zP3/yZMnNXfuXH322Wd1/lwAgKaLoAQAaBaOHDmi1NRUnX/++crMzNS6det0wQUX1Pvznjx5Ug8//DBBCQD8TGBjNwAAgKr45ptvVFpaqptuuklDhw5t7OYAAFo4epQAAE3erbfeqiFDhkiSJkyYIJvNpmHDhmnz5s26/vrr1aVLF4WEhKhLly664YYbtG/fPo/7z507VzabrcLjZmRkyGazae/evV6fd+/evWrfvr0k6eGHH5bNZpPNZtOtt95ap68PAND00KMEAGjyHnroIV166aW66667NG/ePA0fPlzh4eHatWuXunfvruuvv14RERE6dOiQFi5cqAEDBmjXrl2Kioqq1fN26NBBmZmZGjNmjG6//Xb97ne/kyR3eAIAtFwEJQBAk3f++eerV69ekqRu3bpp0KBBkqRevXrpN7/5jbteWVmZUlJSFBMTozfffFPTp0+v1fPa7Xb1799fktSpUyf38wIAWj5OvQMANFvHjx/XzJkz9Ytf/EKBgYEKDAzUeeedpxMnTmj37t2N3TwAQDNGjxIAoNmaOHGiPvnkEz300EMaMGCAwsPDZbPZdMUVV6ioqKixmwcAaMYISgCAZsnlcun999/Xn//8Z82aNctdXlxcrJ9++smjbuvWrd3L7Ha7u/zo0aMN01gAQLPDqXcAgGbJZrPJMAyP4CNJf//731VWVuZR1qVLF0nSV1995VH+3nvvVfo8Zx+fHioA8C/0KAEAmqXw8HD96le/0hNPPKGoqCh16dJFq1ev1muvvaa2bdt61L3iiisUERGh22+/XY888ogCAwOVkZGhnJycSp8nLCxMnTt31j//+U+NGDFCERER7ucDALRc9CgBAJqtN998U8OHD9eDDz6oa6+9Vps3b9aqVavkcDg86oWHhyszM1NhYWG66aabdOeddyoxMVFz5syp0vO89tprCg0N1bhx4zRgwADNnTu3Hl4NAKApsRmGYTR2IwAAAACgKaFHCQAAAABMCEoAAAAAYEJQAgAAAAATghIAAAAAmBCU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21JgxYzR58mStX79e69ev1+TJk5WSkuIx4l2PHj20fPlySdLp06f1m9/8Rps3b9aSJUtUVlam3Nxc5ebmqqSkpKGaDgAAAMDPNOg8SkuWLFGfPn2UnJys5ORk9e3bV2+88YZHnT179sjlckmSDhw4oBUrVujAgQO66KKL1KFDB/etOiPlAQAAAEB1NNg8So2JeZQAAAAASE1wHiUAAAAAaC4ISgAAAABgQlACAAAAABOCEgAAAACYEJQAAAAAwISgBAAAAAAmBCUAAAAAMCEoAQAAAIAJQQkAAAAATAhKAAAAAGBCUAIAAAAAE4ISAAAAAJgQlAAAAADAhKAEAAAAACYEJQAAAAAwISgBAAAAgAl
|
||
|
"text/plain": [
|
||
|
"<Figure size 1000x3000 with 10 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"# start = 115000\n",
|
||
|
"# end = 140000\n",
|
||
|
"start = 170000\n",
|
||
|
"end = len(df)\n",
|
||
|
"#\n",
|
||
|
"\n",
|
||
|
"num_rows = 10\n",
|
||
|
"fig, axs = plt.subplots(nrows=num_rows, ncols=1, figsize=(10,3 * num_rows))\n",
|
||
|
"\n",
|
||
|
"numerical_values0 = convert_values(df['BATT_PACK_1_FAULT'][start:end])\n",
|
||
|
"numerical_values1 = df['PACK1_CRIDATA_BATT_VOL'].cast(pl.Float32).fill_null(strategy=\"mean\")[start:end]\n",
|
||
|
"numerical_values2 = df['PACK1_CRIDATA_AVG_CELL_VOL'].cast(pl.Float32).fill_null(strategy=\"mean\")[start:end]\n",
|
||
|
"numerical_values3 = df['PACK1_CRIDATA_AVG_CELL_TEMP'].cast(pl.Float32).fill_null(strategy=\"mean\")[start:end]\n",
|
||
|
"numerical_values4 = df['PACK1_CRIDATA_BUS_VOL'].cast(pl.Float32).fill_null(strategy=\"mean\")[start:end]\n",
|
||
|
"numerical_values5 = df['PACK1_CRIDATA_CHARGE_CURR_LIMIT'].cast(pl.Float32).fill_null(strategy=\"mean\")[start:end]\n",
|
||
|
"numerical_values6 = df['PACK1_CRIDATA_CURR'].cast(pl.Float32).fill_null(strategy=\"mean\")[start:end]\n",
|
||
|
"numerical_values7 = df['PACK1_CRIDATA_DISCHARGE_CURR_LIMIT'].cast(pl.Float32).fill_null(strategy=\"mean\")[start:end]\n",
|
||
|
"numerical_values8 = df['PACK1_CRIDATA_SOC'].cast(pl.Float32).fill_null(strategy=\"mean\")[start:end]\n",
|
||
|
"numerical_values9 = df['BATT_ROOM_TEMP'].cast(pl.Float32).fill_null(strategy=\"mean\")[start:end]\n",
|
||
|
"axs[0].scatter(range(len(numerical_values0)), numerical_values0, s=10)\n",
|
||
|
"axs[0].set_title(\"fault\")\n",
|
||
|
"axs[1].scatter(range(len(numerical_values1)), numerical_values1, s=10)\n",
|
||
|
"axs[1].set_title(\"voltage\")\n",
|
||
|
"axs[1].set_ylim(600,1000)\n",
|
||
|
"\n",
|
||
|
"axs[2].scatter(range(len(numerical_values2)), numerical_values2, s=10)\n",
|
||
|
"axs[2].set_title(\"avg cell vol\")\n",
|
||
|
"\n",
|
||
|
"axs[3].scatter(range(len(numerical_values3)), numerical_values3, s=10)\n",
|
||
|
"axs[3].set_title(\"avg cell temp\")\n",
|
||
|
"axs[3].set_ylim(-20, 100)\n",
|
||
|
"\n",
|
||
|
"axs[4].scatter(range(len(numerical_values4)), numerical_values4, s=10)\n",
|
||
|
"axs[4].set_title(\"bus vol\")\n",
|
||
|
"\n",
|
||
|
"axs[5].scatter(range(len(numerical_values5)), numerical_values5, s=10)\n",
|
||
|
"axs[5].set_title(\"charge curr limit\")\n",
|
||
|
"\n",
|
||
|
"axs[6].scatter(range(len(numerical_values6)), numerical_values6, s=10)\n",
|
||
|
"axs[6].set_title(\"curr\")\n",
|
||
|
"\n",
|
||
|
"axs[7].scatter(range(len(numerical_values7)), numerical_values7, s=10)\n",
|
||
|
"axs[7].set_title(\"discharge curr limit\")\n",
|
||
|
"\n",
|
||
|
"axs[8].scatter(range(len(numerical_values8)), numerical_values8, s=10)\n",
|
||
|
"axs[8].set_title(\"soc\")\n",
|
||
|
"\n",
|
||
|
"axs[9].scatter(range(len(numerical_values9)), numerical_values9, s=10)\n",
|
||
|
"axs[9].set_title(\"batt room temp\")\n",
|
||
|
"\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"we can reasonably assume that the data in this interval is without anomalies\n",
|
||
|
"\n",
|
||
|
"The issue lies in removing the \"0\" data"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 29,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'temp with zeros')"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 29,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAAPcCAYAAAB7EJuOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAACo50lEQVR4nOzde3hU1aH//8/kNoSYDISQDAMBIsUbQYWACF4CgkEE0dpTQKhFRY5UQVNAgfK1gOeUICp6WkWrB4F6g/4OYG2xSqiAF2JBLspNSiVAFGKUhkmQkIRk/f5gM2WSTEhgJjNJ3q/nmedJ1l6zZ83Kyp79mb332jZjjBEAAAAAQGHBbgAAAAAAhAoCEgAAAABYCEgAAAAAYCEgAQAAAICFgAQAAAAAFgISAAAAAFgISAAAAABgISABAAAAgIWABAAAAAAWAhIAIKQtX75c3bp1U3R0tGw2m7Zv3+731+jfv7/69+/v+f3EiROaPXu21q9f7/fXAgCENgISACBkfffdd7r77rvVpUsXvffee8rJydEll1wS8Nc9ceKE5syZQ0ACgGYoItgNAADAl3/84x8qLy/Xz372M6Wnpwe7OQCAZoAjSACAkHTPPffo+uuvlySNHDlSNptN/fv312effaZRo0apc+fOio6OVufOnXXXXXfp4MGDXs+fPXu2bDZbtfUuWbJENptNBw4cqPF1Dxw4oLZt20qS5syZI5vNJpvNpnvuucev7w8AEJo4ggQACEmPP/64rrnmGj300EOaO3euBgwYoLi4OO3evVuXXnqpRo0apfj4eB05ckQvvviievfurd27dyshIeGCXrddu3Z67733dMstt2jcuHG6//77JckTmgAATRsBCQAQkrp06aIrrrhCktS1a1dde+21kqQrrrhC//Ef/+GpV1FRoWHDhikpKUlvvvmmHn744Qt6XbvdrrS0NElShw4dPK8LAGgeOMUOANCoHD9+XNOmTdOPfvQjRUREKCIiQhdddJF++OEH7dmzJ9jNAwA0chxBAgA0KqNHj9bf/vY3Pf744+rdu7fi4uJks9l06623qqSkJNjNAwA0cgQkAECj4Xa79Ze//EWzZs3S9OnTPeWlpaX617/+5VW3RYsWnmV2u91T/v333zdMYwEAjRKn2AEAGg2bzSZjjFfgkaT//d//VUVFhVdZ586dJUlffPGFV/mf//znc77OmfVzRAoAmh+OIAEAGo24uDjdeOONeuqpp5SQkKDOnTtrw4YNWrRokVq1auVV99Zbb1V8fLzGjRunJ554QhEREVqyZIny8vLO+TqxsbHq1KmT/vSnP2ngwIGKj4/3vB4AoGnjCBIAoFF58803NWDAAD322GO688479dlnnyk7O1sOh8OrXlxcnN577z3FxsbqZz/7mSZMmKDU1FTNnDmzTq+zaNEitWzZUsOHD1fv3r01e/bsALwbAECosRljTLAbAQAAAAChgCNIAAAAAGAhIAEAAACAhYAEAAAAABYCEgAAAABYCEgAAAAAYCEgAQAAAIClyd4otrKyUocPH1ZsbKxsNluwmwMAAAAgSIwxKi4ulsvlUlhY7ceImmxAOnz4sJKTk4PdDAAAAAAhIi8vTx06dKi1TpMNSLGxsZJOd0JcXFyQWwMAAAAgWIqKipScnO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aWX6tJLL/X83rdvX+Xl5enpp5/WjTfeWONzZsyYocmTJ3t+LyoqIiQBAAAAqJeAH0FKSEhQeHh4taNFBQUF1Y4q1ebaa6/Vvn37fC632+2Ki4vzegAAAABAfQQ8IEVFRSktLU3Z2dle5dnZ2erXr1+d17Nt2za1a9fO380DAAAAAI8GOcVu8uTJuvvuu9WrVy/17dtXL7/8sg4dOqQJEyZ
|
||
|
"text/plain": [
|
||
|
"<Figure size 1000x1200 with 4 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"# start = 170000\n",
|
||
|
"# end = len(df)\n",
|
||
|
"start = 0\n",
|
||
|
"\n",
|
||
|
"end = len(df)\n",
|
||
|
"\n",
|
||
|
"num_rows = 4\n",
|
||
|
"\n",
|
||
|
"fig, axs = plt.subplots(nrows=num_rows, ncols=1, figsize=(10,3 * num_rows))\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"numerical_values0 = convert_values((df['BATT_PACK_1_FAULT']\n",
|
||
|
" .filter(df['PACK1_CRIDATA_BATT_VOL'].cast(pl.Float32) != 0))\n",
|
||
|
" [start:end])\n",
|
||
|
"numerical_values1 = (df['PACK1_CRIDATA_BATT_VOL']\n",
|
||
|
" .cast(pl.Float32)\n",
|
||
|
" .fill_null(strategy=\"mean\")\n",
|
||
|
" .filter(df['PACK1_CRIDATA_BATT_VOL'].cast(pl.Float32) != 0))[start:end]\n",
|
||
|
"\n",
|
||
|
"numerical_values2 = (df['PACK1_CRIDATA_AVG_CELL_TEMP']\n",
|
||
|
" .cast(pl.Float32)\n",
|
||
|
" .fill_null(strategy=\"mean\")\n",
|
||
|
" .filter(df['PACK1_CRIDATA_BATT_VOL'].cast(pl.Float32) != 0))[start:end]\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"numerical_values3 = df['PACK1_CRIDATA_AVG_CELL_TEMP'].cast(pl.Float32).fill_null(-100)[start:end]\n",
|
||
|
"\n",
|
||
|
"axs[0].scatter(range(len(numerical_values0)), numerical_values0, s=10)\n",
|
||
|
"axs[0].set_title(\"fault\")\n",
|
||
|
"\n",
|
||
|
"axs[1].scatter(range(len(numerical_values1)), numerical_values1, s=10)\n",
|
||
|
"axs[1].set_title(\"voltage\")\n",
|
||
|
"\n",
|
||
|
"axs[2].scatter(range(len(numerical_values2)), numerical_values2, s=10)\n",
|
||
|
"axs[2].set_title(\"temp\")\n",
|
||
|
"\n",
|
||
|
"axs[3].scatter(range(len(numerical_values3)), numerical_values3, s=10)\n",
|
||
|
"axs[3].set_title(\"temp with zeros\")\n",
|
||
|
"\n",
|
||
|
"\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 25,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.collections.PathCollection at 0x7fe3243fa860>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 25,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAioAAAGdCAYAAAA8F1jjAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAA5SElEQVR4nO3de3gUVYL38V/IjRCTJtzSNAQEB8UhjAIiI+MaFIThBS/rvANeZhZ3XF8vgLKiA647Kzo7XHREd1fR0cdRRkfB50VcnxddhRllZcA1A6iI1xnCTYgBJiThlgQ47x+YnnTSVanqS/p0/H6eJ88Dp6urq7qqq3516pxTGcYYIwAAAAt1SvUCAAAAOCGoAAAAaxFUAACAtQgqAADAWgQVAABgLYIKAACwFkEFAABYi6ACAACslZXqBYjFyZMntWfPHhUUFCgjIy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nLKsd4d/Krz+8XtaX81efH3/jO77wbXO7JJrJBXFs++flEzX7p/XCvET+1E07noLZqu9sKQNFuEzW9pz0b8sVSLevUaK4lt23cJcdfw8pk8nJwbjjuvC83uLRfaeuk4SbRNQo5mRlq8HDB46eBteS+/s2d9BmAduyPHkicym2RnRk91DqVx8Lt9zPmrF6u73U7dsUTKpwCbro9i5ig4kG3/JyoDVC7OdS0tBStHcEtZQMTcv/V77yzOzn/MBPdIK4tybp1Eg8behbkZGXquM/bP14PZp1cLt0Oe+h9kLimh+68rI9xqQI66XLkb+uk4SbRvV5ysjqp4UTb37vf04r
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"numerical_values1 = (df['PACK1_CRIDATA_BATT_VOL']\n",
|
||
|
" .cast(pl.Float32)\n",
|
||
|
" .fill_null(strategy=\"mean\")\n",
|
||
|
" .filter(df['PACK1_CRIDATA_BATT_VOL'].cast(pl.Float32) != 0))\n",
|
||
|
"\n",
|
||
|
"plt.scatter(range(len(numerical_values1)), numerical_values1, s=10)\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 27,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.collections.PathCollection at 0x7fe32601c5e0>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 27,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAGdCAYAAAA44ojeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9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/e5lvZrtytacML9canLS+tLrUMGifPnLV9nNBh63DzcOwOje2PMAGzNRoddk5NXeS5Gcdq6yP+Hep0ffvNz3HD6bB+a7PwpXkXaffXkS+VYDcvxI1UhzvXj/eEn8hsVx4vZ2wO5diVR9Jo8x6GK480Ynau0VlYjTSPx0QEFHRKbibJNvfghMv0288O6mjtX3ZyvTPTIp65ESpcOGjr6EFr/G7m9Y4CQqQvVrudR2jICQ0pTbe3ZQJma0U78lEbEsjsJpE2cToZtb2lOZxcahewogWv935SGnXuUbT5O06cdRi04jmXxg276+u25rq7fS5O14m62rDlbjj9YWM3ZygWc4nigYCCTsluAqGTiYUbHxmnX773paPTSu1ECwepyUmqD9OW1BgPVzsJCOmpKTppM1nZ6RkWUvzXS0hJSdJ5B+9ftDaHDodHG5lJT3PeB+3K4U6ptaOJ0oXTVyNNEo42fyc1WYp2gsgZh4eqTJng2S05OWyo6pbsfsbElX292nWkZUC5sq+3RVlycpJks/07Das9M9K091jLUBmLuUTxQEBBp2Q3HOp0YmFrQkmoSOHgwqS2lm1xOtktltr7GH5rpSRJdgejevZwPkcoVGpKsuoi7EUvjjKxujVi0eNOz15p7WiiJNVHSRe
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"numerical_values1 = (df['PACK1_CRIDATA_BATT_VOL']\n",
|
||
|
" .cast(pl.Float32)\n",
|
||
|
" .fill_null(0))\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
"plt.scatter(range(len(numerical_values1)), numerical_values1, s=10)\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 32,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"Text(0.5, 1.0, 'batt room temp')"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 32,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0oAAAlGCAYAAABnaCHYAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzde3wU9aH///fmSojJQghJWAgQKaISRIgIoVZAJIhctHoOIJQiWoQCKgUqUo8VbUtQ6+W0irdDwXqDfg/i0YJIrIBagiIX5SalyiVIYoAmm3BLQvj8/uDHlp3s5rq3JK/n47GPR/Yzn935zCezs/PemfmMzRhjBAAAAABwCQt2AwAAAAAg1BCUAAAAAMCCoAQAAAAAFgQlAAAAALAgKAEAAACABUEJAAAAACwISgAAAABgQVACAAAAAAuCEgAAAABYEJQAAI3G8uXL1b17d8XExMhms2n79u0+n8fAgQM1cOBA1/NTp05p/vz5Wr9+vc/nBQAIXQQlAECjcPToUU2YMEFdunTRmjVrlJubq8suu8zv8z116pQeffRRghIANDMRwW4AAAC18Y9//EMVFRX6yU9+ogEDBgS7OQCAJo4jSgCAkHfnnXfquuuukySNGTNGNptNAwcO1BdffKGxY8eqc+fOiomJUefOnXXHHXfo4MGDbq+fP3++bDZblfddunSpbDabDhw44HG+Bw4cUNu2bSVJjz76qGw2m2w2m+68806fLh8AIPRwRAkAEPIefvhhXXvttZo+fboWLFigQYMGKT4+Xrt371a3bt00duxYJSQkKD8/Xy+88IL69Omj3bt3KzExsUHzbdeundasWaObbrpJd999t372s59Jkis8AQCaLoISACDkdenSRVdeeaUkqWvXrurXr58k6corr9R//Md/uOpVVlZqxIgRSk5O1ptvvqn77ruvQfONjo5WRkaGJKlDhw6u+QIAmj5OvQMANFonTpzQ3Llz9YMf/EARERGKiIjQJZdcopMnT2rPnj3Bbh4AoBHjiBIAoNE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gKAEAAACABUEJAAAAACwISgAAAABgQVACAAAAAAuCEgAAAABYEJQAAAAAwIKgBAAAAAAWBCUAAAAAsCAoAQAAAIAFQQkAAAAALAhKAAAAAGBBUAIAAAAAC4ISAAAAAFgQlAAAAADAgqAEAAAAABYEJQAAAACwICgBAAAAgAVBCQAAAAAsCEoAAAAAYEFQAgAAAACLoASlRYsWKS0tTS1atFBGRoY++eQTr3XXr18vm81W5fH1118HsMUAAAAAmpOAB6Xly5dr5syZeuihh7Rt2zb96Ec/0rBhw3To0KFqX7d3717l5+e7Hl27dg1QiwEAAAA0NwEPSk8//bTuvvtu/exnP9MVV1yhZ599VqmpqXrhhReqfV1SUpJSUlJcj/Dw8AC1GAAAAEBzE9CgVF5eri1btigrK8utPCsrSxs3bqz2tb169VK7du00ePBgrVu3zp/NBAAAANDMRQRyZseOHVNlZaWSk5PdypOTk1VQUODxNe3atdPLL7+sjIwMlZWV6bXXXtPgwYO1fv16XX/99R5fU1ZWprKyMtfzkpIS3y0EAAAAgCYvoEHpApvN5vbcGFOl7IJu3bqpW7durueZmZnKy8vT73//e69BKTs7W48++qjvGgwAAACgWQnoqXeJiYkKDw+vcvSosLCwylGm6vTr10/79u3zOn3evHlyOp2uR15eXr3bDAAAAKD5CWhQioqKUkZGhnJyctzKc3Jy1L9//1q/z7Zt29SuXTuv06OjoxUfH+/2AAAAAIDaCvipd7NmzdKECRN0zTXXKDMzUy+//LIOHTqkqVOnSjp/NOi
|
||
|
"text/plain": [
|
||
|
"<Figure size 1000x3000 with 10 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"# start = 115000\n",
|
||
|
"# end = 140000\n",
|
||
|
"start = 0\n",
|
||
|
"end = len(df)\n",
|
||
|
"#\n",
|
||
|
"\n",
|
||
|
"num_rows = 10\n",
|
||
|
"fig, axs = plt.subplots(nrows=num_rows, ncols=1, figsize=(10,3 * num_rows))\n",
|
||
|
"\n",
|
||
|
"filter_condition = (df['PACK1_CRIDATA_BATT_VOL']\n",
|
||
|
" .cast(pl.Float32) != 0)\n",
|
||
|
"\n",
|
||
|
"numerical_values0 = convert_values(df['BATT_PACK_1_FAULT']\n",
|
||
|
" .filter(filter_condition)[start:end])\n",
|
||
|
"numerical_values1 = (df['PACK1_CRIDATA_BATT_VOL']\n",
|
||
|
" .filter(filter_condition)\n",
|
||
|
" .cast(pl.Float32)\n",
|
||
|
" .fill_null(strategy=\"mean\"))[start:end]\n",
|
||
|
"numerical_values2 = (df['PACK1_CRIDATA_AVG_CELL_VOL']\n",
|
||
|
" .filter(filter_condition)\n",
|
||
|
" .cast(pl.Float32)\n",
|
||
|
" .fill_null(strategy=\"mean\"))[start:end]\n",
|
||
|
"numerical_values3 = (df['PACK1_CRIDATA_AVG_CELL_TEMP']\n",
|
||
|
" .filter(filter_condition)\n",
|
||
|
" .cast(pl.Float32)\n",
|
||
|
" .fill_null(strategy=\"mean\"))[start:end]\n",
|
||
|
"numerical_values4 = (df['PACK1_CRIDATA_BUS_VOL'].cast(pl.Float32).fill_null(strategy=\"mean\"))[start:end]\n",
|
||
|
"numerical_values5 = (df['PACK1_CRIDATA_CHARGE_CURR_LIMIT'].cast(pl.Float32).fill_null(strategy=\"mean\"))[start:end]\n",
|
||
|
"numerical_values6 = (df['PACK1_CRIDATA_CURR'].cast(pl.Float32).fill_null(strategy=\"mean\"))[start:end]\n",
|
||
|
"numerical_values7 = (df['PACK1_CRIDATA_DISCHARGE_CURR_LIMIT'].cast(pl.Float32).fill_null(strategy=\"mean\"))[start:end]\n",
|
||
|
"numerical_values8 = (df['PACK1_CRIDATA_SOC'].cast(pl.Float32).fill_null(strategy=\"mean\"))[start:end]\n",
|
||
|
"numerical_values9 = (df['BATT_ROOM_TEMP'].cast(pl.Float32).fill_null(strategy=\"mean\"))[start:end]\n",
|
||
|
"axs[0].scatter(range(len(numerical_values0)), numerical_values0, s=10)\n",
|
||
|
"axs[0].set_title(\"fault\")\n",
|
||
|
"axs[1].scatter(range(len(numerical_values1)), numerical_values1, s=10)\n",
|
||
|
"axs[1].set_title(\"voltage\")\n",
|
||
|
"\n",
|
||
|
"axs[2].scatter(range(len(numerical_values2)), numerical_values2, s=10)\n",
|
||
|
"axs[2].set_title(\"avg cell vol\")\n",
|
||
|
"\n",
|
||
|
"axs[3].scatter(range(len(numerical_values3)), numerical_values3, s=10)\n",
|
||
|
"axs[3].set_title(\"avg cell temp\")\n",
|
||
|
"\n",
|
||
|
"axs[4].scatter(range(len(numerical_values4)), numerical_values4, s=10)\n",
|
||
|
"axs[4].set_title(\"bus vol\")\n",
|
||
|
"\n",
|
||
|
"axs[5].scatter(range(len(numerical_values5)), numerical_values5, s=10)\n",
|
||
|
"axs[5].set_title(\"charge curr limit\")\n",
|
||
|
"\n",
|
||
|
"axs[6].scatter(range(len(numerical_values6)), numerical_values6, s=10)\n",
|
||
|
"axs[6].set_title(\"curr\")\n",
|
||
|
"\n",
|
||
|
"axs[7].scatter(range(len(numerical_values7)), numerical_values7, s=10)\n",
|
||
|
"axs[7].set_title(\"discharge curr limit\")\n",
|
||
|
"\n",
|
||
|
"axs[8].scatter(range(len(numerical_values8)), numerical_values8, s=10)\n",
|
||
|
"axs[8].set_title(\"soc\")\n",
|
||
|
"\n",
|
||
|
"axs[9].scatter(range(len(numerical_values9)), numerical_values9, s=10)\n",
|
||
|
"axs[9].set_title(\"batt room temp\")\n",
|
||
|
"\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"kernelspec": {
|
||
|
"display_name": "Python 3",
|
||
|
"language": "python",
|
||
|
"name": "python3"
|
||
|
},
|
||
|
"language_info": {
|
||
|
"codemirror_mode": {
|
||
|
"name": "ipython",
|
||
|
"version": 3
|
||
|
},
|
||
|
"file_extension": ".py",
|
||
|
"mimetype": "text/x-python",
|
||
|
"name": "python",
|
||
|
"nbconvert_exporter": "python",
|
||
|
"pygments_lexer": "ipython3",
|
||
|
"version": "3.10.12"
|
||
|
},
|
||
|
"orig_nbformat": 4
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 2
|
||
|
}
|