Skip to content

Playback Analysis Walkthrough

This tutorial focuses on analyzing CAN bus data through log playback, signal decoding, and pattern identification. You'll learn how to load captured logs, decode signals using DBC files, identify anomalies through visualization, and export findings for further analysis. This walkthrough represents a typical debugging workflow that automotive engineers use to diagnose EV powertrain issues.

Time Estimate

  • System Setup: 10-15 minutes
  • Playback Configuration: 10-15 minutes
  • Signal Analysis: 15-20 minutes
  • Data Export: 5-10 minutes
  • Total Time: 40-60 minutes

Prerequisites

Before starting this tutorial, ensure you have:

  • TrueFidelity Desktop application running
  • A configured system with CAN network (or complete the System Design Workflow tutorial first)
  • Sample BLF log files for playback
  • The Drive Cycle DBC file with signal definitions
  • Basic understanding of CAN signals and EV powertrain systems

Learning Objectives

By completing this tutorial, you will:

  • Master the Signal Player panel for BLF playback
  • Understand signal decoding with DBC files
  • Learn to identify patterns in time-series data
  • Use filtering to focus on relevant signals
  • Export data for external analysis
  • Troubleshoot common playback issues

Scenario Overview

You're investigating regenerative braking behavior in an electric vehicle's drive cycle system. The test engineers report:

  • Inconsistent energy recovery during deceleration
  • Occasional torque command/feedback mismatches
  • Battery current fluctuations during regen events

Your task is to:

  1. Load and analyze the captured CAN log
  2. Identify motor and battery signals during regen
  3. Find anomalies in torque delivery
  4. Quantify energy recovery patterns
  5. Document findings for the team

The log contains 15 minutes of data from an EV test drive, including VCU commands, MCU feedback, and BMS status messages.

Part 1: System Preparation

Step 1: Load or Verify Your System

Before analyzing logs, you need a configured system with a CAN network and DBC file.

  1. Launch TrueFidelity Desktop:
  2. The application opens in System Design mode
  3. Check if you have an existing Drive Cycle system

  4. Open an existing system (recommended):

  5. Click File → Open
  6. Navigate to your truefidelity-system.json file
  7. Click Open

Or create a new system if needed: - Click File → New - Name it RegenAnalysis - Click Create

File menu with New option highlighted

  1. Verify or add a CAN network:
  2. From the Toolbox, drag a CAN Bus to the canvas (if not present)
  3. Select the CAN bus
  4. In Properties panel:
    • Name: CAN Bus 1
    • Baud Rate: 500000
    • DBC File: Browse and select DBC.dbc
    • Click Apply Changes

CAN Bus selected with Properties panel

  1. Add ECUs for the analysis (if creating new):
  2. Drag three ECUs from the Toolbox
  3. Configure as VCU, MCU, and BMS
  4. Board: S32K3X4EVB, OS: Zephyr
  5. Connect all to the CAN bus

  6. Save the system:

  7. Click File → Save
  8. File saves as truefidelity-system.json

File menu with Save option highlighted

Step 2: Start the System

Deploy the system to enable playback functionality.

  1. Start the system:
  2. Click the Start button (green play icon) in the toolbar
  3. Wait for ECUs to reach "Running" state

Main toolbar with Start button highlighted

  1. Verify system is running:
  2. Check ECU Status panel shows all ECUs as "Running"
  3. Status bar shows container count (e.g., "3 / 3 Containers Running")

ECU Status panel with all ECUs running

Part 2: CAN Log Analysis Setup

Step 3: Switch to CAN Log Analysis Mode

Configure the workspace for signal analysis.

  1. Change to analysis mode:
  2. Click View → Layouts → Network Analysis
  3. The layout reconfigures automatically

  4. Understand the analysis layout:

  5. Signal Viewer (left): Hierarchical signal tree from DBC
  6. Network Traffic (center): Live CAN frames
  7. Signal Chart (right): Time-series visualization
  8. Signal Player & Injection (bottom): Playback and injection controls

CAN Analysis mode panels

  1. Adjust panel sizes if needed:
  2. Drag panel borders to resize
  3. Maximize Signal Chart for better visibility
  4. Ensure Signal Player is fully visible

Step 4: Load the BLF Log File

Import the captured data for analysis.

  1. Open Signal Player panel:
  2. Located at the bottom of the screen
  3. If not visible: View → Panels → Signal Player & Injection

  4. Load the BLF file:

  5. Click Select BLF button
  6. Navigate to your log file (e.g., regen_test_drive.blf)
  7. Click Open

Signal Player with loaded BLF file

  1. Inspect the loaded data:
  2. Click Inspect bundle to view details:
    • File size and duration
    • Number of CAN frames
    • Detected channels
    • Average data rate
  3. Verify the log loaded correctly

  4. Check DBC association:

  5. The Networks section shows CAN Bus 1
  6. Confirms DBC file is linked
  7. Signals will be decoded during playback

Step 5: Configure Playback Settings

Prepare for optimal playback performance.

  1. Verify playback readiness:
  2. System must be running (toolbar shows Stop button)
  3. Signal Player shows Play button enabled
  4. BLF file successfully loaded

  5. Prepare monitoring panels:

  6. Clear Network Traffic with the Clear button
  7. Position panels for comfortable viewing
  8. Signal Viewer ready for navigation

Part 3: Signal Identification and Selection

Step 6: Locate Regenerative Braking Signals

Find the relevant signals for regen analysis from the DBC file.

  1. Open Signal Viewer:
  2. Click on the Signal Viewer panel (left)
  3. Shows all signals from the DBC file organized by CAN message

  4. Search for motor signals:

  5. Use the search box at top
  6. Enter "Motor" or "Torque" to find motor-related signals
  7. Results filter as you type

  8. Identify key signals for regen analysis:

From MCU_Feedback_1 (0x201): - Motor_Spd: Motor speed in rpm - Actual_Torque: Delivered torque in Nm (negative during regen) - Motor_Temp: Motor temperature in °C - Inverter_State: Current inverter operating state

From MCU_Feedback_2 (0x202): - DC_Link_V: DC bus voltage - Phase_Curr_RMS: Motor phase current - Regen_Active: Regeneration active flag (0/1)

From VCU_Status_2 (0x101): - Brake_Pedal_Pcnt: Brake pedal position (%) - Cmded_Regen_Tq: Commanded regenerative torque

From BMS_Pack_1 (0x300): - Pack_V: Battery pack voltage - Pack_I: Battery current (negative = charging/regen) - SOC: State of charge percentage

Signal Viewer with expanded frames

  1. Expand signal details:
  2. Click arrows next to CAN frames to expand
  3. View signal properties:
    • Signal name and units
    • Min/max values
    • Scaling factors
    • Current value (during playback)

Step 7: Select Signals for Monitoring

Choose signals to chart and analyze.

  1. Select primary regen signals:
  2. Check the box next to Actual_Torque (MCU_Feedback_1)
  3. Select Regen_Active (MCU_Feedback_2)
  4. Select Pack_I (BMS_Pack_1)
  5. These will appear in the Signal Chart

  6. Add supporting signals:

  7. Motor_Spd: For speed context
  8. Brake_Pedal_Pcnt: To correlate with driver input
  9. Cmded_Regen_Tq: To compare command vs actual

  10. Clear search to see all signals:

  11. Remove search text
  12. Full signal tree returns
  13. Selected signals remain checked

Part 4: Playback and Analysis

Step 8: Start Playback

Begin replaying the captured data.

  1. Start playback:
  2. In Signal Player, click Play button
  3. Playback begins from the start
  4. Progress bar shows current position

  5. Monitor Network Traffic:

  6. CAN frames appear in real-time
  7. Observe frame rate and timing
  8. Each frame shows:
    • Timestamp
    • CAN ID (hex)
    • Data bytes
    • Frame counter

Network Traffic panel showing live CAN messages

  1. Watch Signal Viewer:
  2. Selected signals show live values
  3. Values update as frames arrive
  4. Green dots indicate active signals

  5. Observe Signal Chart:

  6. Lines plot in real-time
  7. Each signal has unique color
  8. Time axis scrolls automatically

Signal Chart showing signal patterns

Step 9: Identify Regen Anomalies

Look for unusual patterns in regenerative braking behavior.

  1. Monitor regen activation:
  2. Watch Regen_Active signal transitions (0→1→0)
  3. Should correlate with Brake_Pedal_Pcnt increases
  4. Note any delays or mismatches

  5. Analyze torque behavior:

  6. Compare Cmded_Regen_Tq with Actual_Torque
  7. They should track closely during regen
  8. Look for:

    • Command without response
    • Delayed torque delivery
    • Torque oscillations
  9. Check battery current:

  10. Pack_I should go negative during regen (charging)
  11. Magnitude should correlate with Actual_Torque
  12. Look for:

    • Current spikes
    • Unexpected direction changes
    • Zero current during active regen
  13. Identify problem areas:

When you spot an anomaly: - Click Pause in Signal Player - Note the timestamp - Observe all signal values - Document the pattern: - Regen commanded but no torque delivered - Torque delivered but no battery current - Oscillations in torque or current

Step 10: Detailed Investigation

Zoom into problem areas for closer analysis.

  1. Navigate to specific timestamp:
  2. Use Signal Player progress bar
  3. Click and drag to scrub through log
  4. Position at the start of an anomaly

  5. Adjust playback speed:

  6. Slow to 0.5x for detailed observation
  7. Speed up to 2x for quick scanning
  8. Pause frequently to examine details

  9. Focus on anomaly window:

  10. Identify start of anomaly
  11. Play through event slowly
  12. Identify end of anomaly
  13. Note total duration

  14. Chart analysis:

In Signal Chart panel: - Time Window: Adjust to 30 seconds for detail - Auto-scale: Enable for best fit - Zoom with mouse wheel on time axis - Click and drag to pan

Step 11: Filter Network Traffic

Focus on specific messages during analysis.

  1. Apply CAN ID filter:
  2. In Network Traffic panel
  3. Enter CAN ID in filter field
  4. Example: 0x201 for MCU_Feedback_1
  5. Only matching frames are shown

  6. Filter by multiple IDs:

  7. Filter for 0x201 (MCU feedback)
  8. Or 0x300 (BMS status)
  9. Helps isolate specific subsystem messages

  10. Clear filters when done:

  11. Click Clear or remove filter text
  12. Returns to full traffic view
  13. Helps see context again

Part 5: Quantitative Analysis

Step 12: Measure Regen Performance

Quantify the regenerative braking behavior.

  1. Identify regen events:
  2. Pause at each Regen_Active transition (0→1)
  3. Record the brake pedal percentage
  4. Note the commanded regen torque
  5. Measure the actual torque delivered

  6. Calculate efficiency:

  7. Compare Cmded_Regen_Tq vs Actual_Torque
  8. Note any gaps or delays
  9. Measure response time (command to delivery)

  10. Create event summary:

Example findings: ``` Event 1: Timestamp 00:02:15 - Brake Pedal: 25% - Commanded Regen Torque: -150 Nm - Actual Torque: -145 Nm (97% efficiency) - Pack Current: -45 A - Response time: ~50ms - Status: Normal

Event 2: Timestamp 00:05:42 - Brake Pedal: 40% - Commanded Regen Torque: -250 Nm - Actual Torque: -180 Nm (72% efficiency) - Pack Current: -52 A - Response time: ~150ms - Status: ANOMALY - Torque limited ```

Step 13: Pattern Analysis

Identify recurring issues or triggers.

  1. Look for patterns:
  2. Do anomalies occur at specific SOC levels?
  3. Any correlation with motor temperature?
  4. Related to vehicle speed (Motor_Spd)?
  5. Battery temperature (Cell_Tmax) factor?

  6. Check BMS limits:

  7. Review Max_Charge_Pwr and Max_Charge_Tq from BMS_Limits
  8. Does regen get limited when battery is near full?
  9. Temperature-related derating?

  10. System behavior:

  11. Does issue self-recover?
  12. Any correlation with Inverter_State changes?
  13. Pattern repetition frequency?

Part 6: Data Export

Step 14: Export Network Traffic

Save raw CAN data for detailed analysis.

  1. Stop playback:
  2. Click Stop in Signal Player
  3. Ensures complete data in buffer

  4. Export from Network Traffic:

  5. Click Export button in toolbar
  6. Choose format:
    • Text (.txt): Human-readable
    • CSV (.csv): For spreadsheet analysis
    • JSON (.json): For programmatic processing
    • candump: Standard CAN log format
  7. Name: regen_analysis_traffic.csv
  8. Click Save

  9. Capture to industry formats (for longer recordings):

  10. Click Configure in Network Traffic toolbar
  11. Select network/channel
  12. Choose format: BLF (Vector), MDF4, or CSV
  13. Click Start Capture, then Stop Capture when done

Capture configuration dialog

Step 15: Export Signal Data

Save decoded signal values for analysis.

  1. Prepare for export:
  2. Ensure relevant signals are selected in Signal Viewer
  3. Playback includes the anomaly timeframe
  4. Chart shows complete events of interest

  5. Export signal values:

  6. Focus on critical signals: Actual_Torque, Pack_I, Regen_Active
  7. Include time range of interest
  8. Decoded values with proper units
  9. Save as: regen_signals_decoded.csv

  10. Export contents include:

  11. Timestamp column
  12. Selected signal columns
  13. Proper scaling applied (from DBC)
  14. Engineering units

Step 16: Export Visualizations

Capture charts for documentation.

  1. Configure Signal Chart:
  2. Adjust time window to show anomaly clearly
  3. Ensure all relevant signals visible
  4. Enable grid for measurement reference
  5. Verify legend shows signal names

  6. Export chart:

  7. Right-click on Signal Chart
  8. Select Export Chart
  9. Choose format (PNG recommended)
  10. Name: regen_torque_anomaly.png

  11. Additional screenshots:

  12. Network Traffic during anomaly
  13. Signal Viewer with peak values
  14. Save for report inclusion

Part 7: Documentation

Step 17: Create Analysis Report

Document findings for the engineering team.

  1. Compile findings document:

``` Regenerative Braking Analysis Report ==================================== Date: [Current Date] Analyst: [Your Name] Log File: regen_test_drive.blf Duration: 15 minutes System: Drive Cycle (VCU, MCU, BMS)

Summary: Identified 4 regen torque limitation events where actual torque was significantly below commanded value.

Key Findings:

  1. Event at 00:05:42

    • Commanded: -250 Nm, Actual: -180 Nm
    • SOC at time: 85%
    • BMS Max_Charge_Tq: 180 Nm (limiting factor)
    • Root cause: BMS limiting regen near full charge
  2. Event at 00:08:15

    • Commanded: -200 Nm, Actual: -120 Nm
    • Motor_Temp: 78°C
    • Inverter derating suspected
    • Correlation with Inv_Temp increase
  3. Event at 00:11:30

    • Commanded: -180 Nm, Actual: -50 Nm
    • Cell_Tmax: 42°C
    • BMS thermal protection active
    • Heater_On = 0 (cooling needed)

Analysis: - Regen limiting primarily driven by BMS constraints - High SOC (>80%) triggers charge power limits - Thermal conditions affect both MCU and BMS limits - VCU should pre-calculate available regen based on limits

Recommendations: - Review VCU regen request logic vs BMS limits - Implement predictive regen calculation - Improve thermal management during sustained regen - Consider driver feedback for limited regen scenarios ```

  1. Attach supporting data:
  2. Exported CSV files
  3. Chart screenshots
  4. Network traffic logs

  5. Organize deliverables:

RegenAnalysis/ ├── truefidelity-system.json ├── exports/ │ ├── regen_analysis_traffic.csv │ ├── regen_signals_decoded.csv │ └── regen_torque_anomaly.png ├── logs/ │ └── regen_test_drive.blf └── reports/ └── regen_analysis_report.md

Troubleshooting Guide

Common Playback Issues

BLF File Won't Load

Symptom: Select BLF fails or shows error

Solutions: 1. Check file isn't corrupted 2. Verify file size is manageable (<2GB recommended) 3. Ensure sufficient memory available 4. Check file permissions 5. Try a different BLF file to isolate issue

No Signals Appearing

Symptom: Signal Viewer empty during playback

Solutions: 1. Verify DBC file is loaded in network properties 2. Check DBC CAN IDs match the log file 3. Ensure network is properly configured 4. Reload the system after DBC changes

Playback Stutters or Freezes

Symptom: Playback isn't smooth

Solutions: 1. Reduce number of charted signals (3-5 recommended) 2. Close unnecessary panels 3. Clear Network Traffic periodically 4. Reduce chart time window 5. Close other applications

Signal Values Don't Update

Symptom: Values stay at zero or don't change

Solutions: 1. Verify playback is actually running (progress bar moving) 2. Check signal selection in Signal Viewer 3. Ensure DBC scaling is correct 4. Verify signal exists in the log (check Network Traffic)

Chart Not Displaying

Symptom: Signal Chart remains empty

Solutions: 1. Select signals first in Signal Viewer (checkboxes) 2. Ensure playback has started 3. Check time window settings 4. Enable Auto-scale 5. Verify signals are receiving data

Performance Optimization

For Large Log Files

  1. Memory management:
  2. Close unused panels
  3. Limit selected signals to essentials
  4. Clear Network Traffic regularly
  5. Export in time segments

  6. Playback optimization:

  7. Start with fewer signals, add gradually
  8. Use filtering extensively
  9. Disable auto-scroll in Network Traffic

For Complex Analysis

  1. Workflow optimization:
  2. Pre-filter in Network Traffic
  3. Focus on specific time ranges
  4. Export incrementally
  5. Document findings as you go

  6. Signal management:

  7. Group related signals (all MCU, all BMS)
  8. Use consistent time windows
  9. Clear unneeded selections

Advanced Techniques

Multi-Stage Analysis

  1. Initial scan (2x-4x speed):
  2. Identify regions of interest
  3. Note approximate timestamps
  4. Get overall patterns

  5. Detailed review (0.5x-1x speed):

  6. Focus on problem areas
  7. Precise measurements
  8. Correlation analysis

  9. Verification (1x speed):

  10. Confirm findings
  11. Check edge cases
  12. Validate patterns

Signal Correlation

  1. Identify relationships:
  2. Command vs feedback: Cmded_Regen_Tq vs Actual_Torque
  3. Cause and effect: Brake_Pedal_PcntRegen_ActivePack_I
  4. Limiting factors: Max_Charge_Tq vs Actual_Torque

  5. Timing analysis:

  6. Measure response delays (command to action)
  7. Identify synchronization issues
  8. Check message periodicity

Integration with External Tools

Python Analysis

import pandas as pd
import matplotlib.pyplot as plt

# Load exported data
df = pd.read_csv('regen_signals_decoded.csv')

# Find regen events
regen_events = df[df['Regen_Active'] == 1]

# Calculate efficiency
df['Regen_Efficiency'] = df['Actual_Torque'] / df['Cmded_Regen_Tq'] * 100

# Plot torque comparison
plt.figure(figsize=(12, 6))
plt.plot(df['Timestamp'], df['Cmded_Regen_Tq'], label='Commanded')
plt.plot(df['Timestamp'], df['Actual_Torque'], label='Actual')
plt.xlabel('Time (s)')
plt.ylabel('Torque (Nm)')
plt.legend()
plt.title('Regen Torque: Command vs Actual')
plt.show()

MATLAB Analysis

% Load exported data
data = readtable('regen_signals_decoded.csv');

% Plot regen analysis
figure;
subplot(3,1,1);
plot(data.Timestamp, data.Actual_Torque);
ylabel('Torque (Nm)');
title('Regenerative Braking Analysis');

subplot(3,1,2);
plot(data.Timestamp, data.Pack_I);
ylabel('Current (A)');

subplot(3,1,3);
plot(data.Timestamp, data.Regen_Active);
ylabel('Regen Active');
xlabel('Time (s)');

Summary

You've completed a comprehensive playback analysis workflow:

  • ✅ Configured system with CAN network and DBC
  • ✅ Loaded and inspected BLF log file
  • ✅ Identified and selected relevant EV signals
  • ✅ Performed real-time playback analysis
  • ✅ Located and quantified regen anomalies
  • ✅ Filtered network traffic for focus
  • ✅ Exported data for external analysis
  • ✅ Created comprehensive documentation

This tutorial covered essential skills for analyzing CAN logs in TrueFidelity. The techniques apply to various EV debugging scenarios, from regenerative braking issues to battery management troubleshooting.

Next Steps

  1. Practice with different logs:
  2. Analyze charging scenarios
  3. Debug motor control issues
  4. Investigate battery anomalies

  5. Expand your analysis:

  6. Add more signal correlations
  7. Develop pattern recognition skills
  8. Create reusable analysis workflows

  9. Advanced topics:

  10. Signal injection testing (see End-to-End Example)
  11. GDB debugging for firmware issues
  12. Multi-bus analysis
  • System Design Workflow: Building ECU topologies
  • ECU Monitoring Walkthrough: Real-time system monitoring
  • End-to-End Example: Complete analysis with injection testing
  • DBC & Signal Definitions: Working with signal databases