Beyond wires and batteries: Voltify’s new model for freight rail electrification
Back to Tutorials
techTutorialintermediate

Beyond wires and batteries: Voltify’s new model for freight rail electrification

July 6, 202610 views4 min read

Learn to build a simulation model for rail electrification systems using Python, calculating power consumption and comparing different electrification scenarios.

Introduction

In the freight rail industry, electrification is becoming the key to decarbonizing transportation. Companies like Voltify are pioneering new models for rail electrification that go beyond traditional overhead wires and battery systems. This tutorial will teach you how to build a simulation model for rail electrification systems using Python and basic electrical engineering concepts. You'll learn to model power consumption, calculate energy efficiency, and simulate different electrification scenarios to evaluate their real-world impact.

Prerequisites

To follow this tutorial, you should have:

  • Basic understanding of Python programming
  • Familiarity with electrical engineering concepts (voltage, current, power, resistance)
  • Installed Python 3.x with the following packages: numpy, matplotlib, pandas
  • Basic knowledge of railway operations and freight train dynamics

Step-by-Step Instructions

1. Set Up Your Python Environment

First, ensure you have the required Python packages installed. Open your terminal or command prompt and run:

pip install numpy matplotlib pandas

This step ensures you have the necessary tools to perform calculations and visualize data.

2. Define Rail Electrification Parameters

Begin by creating a Python script to define the key parameters of your electrification system:

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

# Rail electrification parameters
rail_parameters = {
    'voltage': 25000,  # Voltage in volts
    'current': 1000,   # Current in amperes
    'efficiency': 0.95,  # System efficiency
    'train_weight': 100000,  # Train weight in kg
    'speed': 60,  # Speed in km/h
    'distance': 100,  # Distance in km
    'rolling_resistance': 0.005,  # Rolling resistance coefficient
    'grade': 0.02  # Grade (slope) in decimal
}

print("Rail Electrification Parameters:")
for key, value in rail_parameters.items():
    print(f"{key}: {value}")

This sets up the basic electrical and mechanical parameters needed for our simulation. These values represent typical freight rail conditions.

3. Calculate Power Consumption

Next, we'll calculate the power required for train operation:

# Calculate power consumption
power = rail_parameters['voltage'] * rail_parameters['current']
print(f"\nElectrical Power: {power} W")

# Calculate mechanical power needed
# P_mech = F * v (where F is force, v is velocity)
# Force = (rolling resistance + grade resistance) * weight
force = (rail_parameters['rolling_resistance'] + rail_parameters['grade']) * rail_parameters['train_weight'] * 9.81  # Force in Newtons
velocity = rail_parameters['speed'] * 1000 / 3600  # Convert km/h to m/s
mech_power = force * velocity  # Mechanical power in watts
print(f"Mechanical Power Required: {mech_power:.2f} W")

This step calculates the actual power needed to move the train, considering both electrical and mechanical factors.

4. Simulate Energy Efficiency

Now, we'll model how efficiency affects energy consumption:

# Simulate different efficiency scenarios
efficiency_values = np.linspace(0.8, 0.99, 10)
energy_consumption = []

for eff in efficiency_values:
    # Calculate energy consumed with given efficiency
    energy = (mech_power / eff) * (rail_parameters['distance'] * 1000) / (3600 * 1000)  # kWh
    energy_consumption.append(energy)

# Create DataFrame for results
results_df = pd.DataFrame({
    'Efficiency': efficiency_values,
    'Energy_Consumption_kWh': energy_consumption
})

print("\nEnergy Consumption vs Efficiency:")
print(results_df)

This simulation shows how improving system efficiency can dramatically reduce energy consumption, which is crucial for electrification projects.

5. Visualize Results

Create a visualization of your electrification model:

# Plot energy consumption vs efficiency
plt.figure(figsize=(10, 6))
plt.plot(results_df['Efficiency'], results_df['Energy_Consumption_kWh'], marker='o', linewidth=2)
plt.title('Energy Consumption vs System Efficiency')
plt.xlabel('System Efficiency')
plt.ylabel('Energy Consumption (kWh)')
plt.grid(True)
plt.show()

This visualization helps understand the relationship between system efficiency and energy consumption, which is essential for decision-making in electrification projects.

6. Model Different Electrification Scenarios

Finally, let's model different electrification scenarios to compare their effectiveness:

# Define different electrification scenarios
scenarios = {
    'Conventional Diesel': {'efficiency': 0.35, 'cost_per_kwh': 0.15},
    'Overhead Wire System': {'efficiency': 0.95, 'cost_per_kwh': 0.08},
    'Hybrid System': {'efficiency': 0.85, 'cost_per_kwh': 0.10}
}

# Calculate cost per km for each scenario
scenario_results = []
for name, params in scenarios.items():
    cost = energy_consumption[0] * params['cost_per_kwh']  # Using first efficiency value
    scenario_results.append({'Scenario': name, 'Cost_per_km': cost})

# Display results
scenario_df = pd.DataFrame(scenario_results)
print("\nScenario Comparison:")
print(scenario_df)

# Plot scenario comparison
plt.figure(figsize=(10, 6))
plt.bar(scenario_df['Scenario'], scenario_df['Cost_per_km'], color=['red', 'green', 'blue'])
plt.title('Cost Comparison of Different Electrification Scenarios')
plt.ylabel('Cost per km ($/km)')
plt.xticks(rotation=45)
plt.grid(axis='y')
plt.tight_layout()
plt.show()

This comparison shows how different electrification models can impact operational costs, helping evaluate which approach might be most suitable for a given rail network.

Summary

In this tutorial, you've learned to build a simulation model for rail electrification systems. You've defined key parameters, calculated power consumption, simulated efficiency impacts, and compared different electrification scenarios. This model provides a foundation for evaluating real-world electrification projects like those developed by Voltify, helping decision-makers understand the technical and economic implications of transitioning from diesel to electric rail systems.

The skills you've developed here are directly applicable to analyzing electrification projects in the freight rail industry, providing a quantitative approach to evaluating environmental and economic benefits of electrification.

Source: TNW Neural

Related Articles