How to Use the Battery Analyzer
The Battery Analyzer helps you understand your robot's electrical performance by analyzing Driver Station (DS) logs. Upload your log files to see detailed graphs and metrics.
Quick Start
- Click the Analyzer card on the Overview tab
- Upload your DS log file (.log or .csv)
- Review the analysis graphs and metrics below
Understanding Graph Visuals
What You'll See on the Graphs
- Raw data line: The actual measured values from your log file, showing every sample point
- Rolling window line: A smoothed average over a time window (e.g., 0.10s) that removes noise and shows the overall trend
- Rolling min/max: Shows the worst-case values within each window — critical for spotting brownouts or current spikes
- Rolling median: The middle value in each window, less affected by extreme outliers than the mean
- Regression line: A straight line showing the overall trend (increasing, decreasing, or flat) over the entire match
- Scatter points: Individual data points highlighted to show specific events (e.g., current peaks above 30A)
- Threshold lines: Horizontal dashed lines marking important limits (e.g., 7V brownout, 120A main breaker)
- Phase coloring: Background colors showing match phases — blue for Auto, green for Teleop, gray for Disabled
Statistical Terms Explained
- Mean (Average): Sum of all values divided by count. Shows the typical performance level.
- Median: The middle value when sorted. Less affected by extreme spikes than mean, better for "typical" behavior.
- P90 (90th Percentile): Value that 90% of samples are below. Shows performance under heavy load.
- Rolling Window: A sliding time window that calculates statistics over recent data only. Smooths out noise while preserving trends.
- Example: Imagine you're looking at voltage readings every 0.02 seconds. A 0.10s rolling window looks at the last 5 readings (0.10s ÷ 0.02s = 5 samples) and calculates the average. As time moves forward, the window "slides" — it drops the oldest reading and adds the newest one. This smooths out sudden spikes while still showing the overall trend. Think of it like a moving average that helps you see the forest through the trees.
- R² (R-squared): How well the regression line fits the data. Closer to 1.0 means a strong trend.
How These Relate to Battery Health
- Voltage trends: A declining regression line indicates battery depletion. Steep drops suggest weak or damaged batteries.
- Internal resistance (R): Higher resistance means more voltage drop under load. As batteries age, resistance increases — shown by rising impedance over time.
- Current spikes: Frequent high-current events stress the battery. More spikes = faster depletion and more heat buildup.
- Brownout duration: Time below 7V directly correlates with robot performance loss. Healthy batteries should have minimal brownout time.
- Energy used: Total Wh consumed vs. battery capacity (216Wh) shows if you're within safe operating limits.
Basic Graphs
Battery Voltage (V)
Shows your battery voltage over the entire match. Healthy batteries should stay above 12V. The red line at 7V indicates the brownout threshold — if voltage drops below this, the robot will disable temporarily.
Trip Time (ms)
Measures how long the roboRIO takes to process each control loop. Lower is better. Values above 10ms (yellow line) indicate the code is taking too long, which can cause laggy robot response.
Packet Loss (%)
Shows the percentage of communication packets lost between the Driver Station and robot. High packet loss indicates radio or network issues.
CAN Utilization (%)
Shows how much of the CAN bus bandwidth is being used. The yellow line at 70% indicates high utilization. Values above this may cause communication delays with devices.
roboRIO CPU (%)
Shows the CPU usage of the roboRIO. High CPU usage can cause slow code execution and trip time issues.
Total Current Draw (A)
Shows the total current being drawn from the battery across all PDP channels. Spikes indicate high-power moments (e.g., driving hard, shooting). Consistently high draw may drain batteries quickly.
PDP Channels — Avg / Peak Current
Shows the average and peak current for each Power Distribution Panel (PDP) channel. Redder cells indicate higher current draw. Use this to identify which motors or devices are drawing the most power.
Advanced Analysis Graphs
Voltage Analysis
Advanced voltage metrics include a rolling minimum (worst-case dip) to expose brownout events, and a regression line showing overall depletion trend.
Current Analysis
Shows total current draw with local peaks highlighted as scatter points. Regression on peaks reveals current demand trends over the match.
Power Analysis
Instantaneous power (P = V × I) calculated from DS log voltage and summed current. Regression shows whether power demand trends up or remains flat.
Impedance Analysis
Internal resistance calculated as R = (Voc − V) / I at each current peak (I > 15A). Shows battery health and degradation over time.
Key Metrics
Avg / Min Voltage
Average voltage during enabled periods, and the minimum voltage reached. Min voltage below 7V triggers brownouts.
Brownouts
Number of brownout events and total time spent in brownout. Any brownouts indicate power delivery issues.
Avg / Max Trip Time
Average and maximum code execution time. High trip times cause laggy robot control.
Avg / Max Packet Loss
Average and maximum packet loss percentage. High values indicate network/radio problems.
CAN Utilization
Percentage of CAN bus bandwidth used. Above 70% may cause device communication delays.
roboRIO CPU
Average CPU usage of the roboRIO. High CPU can slow down code execution.
Auto / Teleop Time
Time spent in autonomous and teleoperated modes. Helps correlate performance with match phases.
Phase Bar
Visual breakdown of match phases: Auto (blue), Teleop (green), and Disabled (gray).
Troubleshooting Tips
- Brownouts: Check battery health, reduce current draw, or add more batteries
- High Trip Time: Optimize code, reduce vision processing, or check for blocking operations
- Packet Loss: Improve radio placement, reduce interference, or check cable connections
- High CAN Utilization: In code, reduce the frequency of periodic sensor updates (e.g., send motor controller data every 50ms instead of 20ms), combine multiple values into single CAN frames, or remove unnecessary status messages. For wiring, split devices across multiple CAN buses if your controller supports it, or use devices with lower bandwidth requirements
- High CPU: Profile code, reduce vision processing, or optimize algorithms