2023 Digital Cup Mathematical Modeling Problem B Energy-saving Train Operation Control Optimization Strategy Solution Documentation and Procedures for the Whole Process

2023 Digital Cup Mathematical Modeling

Question B Energy-saving train operation control optimization strategy

Original title reproduced:

  While the electrification process of urban transportation is rapidly advancing, the corresponding growth in energy consumption and negative effects are also increasing rapidly. The rapid growth of energy consumption in urban rail transit has placed a burden on the sustainable development of urban rail transit. In 2018, the subway load in Beijing, Shanghai, and Guangzhou accounted for 1.5%-2.5% of the city's total load, becoming the largest single load of the urban power grid [1]. Under the "dual carbon" policy, the urban rail system has adopted ATO driving mode, photovoltaic + subway and other methods, which have achieved good carbon reduction and energy saving effects. The demand-side response of the urban rail system can reduce traction energy consumption costs while ensuring passenger satisfaction [2], and can further explore the potential of urban rail systems to reduce carbon emissions and save energy.
  During the operation of the train, various frictions will occur between the train and the outside world, which will consume the energy of train traction. During train operation, many factors are considered, such as the friction between the train and the track, the air resistance experienced by the train, changes in the potential energy of the train, and the positional speed limit during train operation. During the same journey, trains using different driving strategies usually result in different energy and time consumption. The running process of a single train between two platforms is shown in Figure 1.
Insert image description here
  Question 1
  Suppose a train runs on a horizontal track from platform A to platform B. The distance is 5144.7m. The upper limit of the running speed is 100km/h. The mass of the train is 176.3t. The rotational quality factor p of the inertia of the rotating part of the train is p. = 1.08, the maximum traction force of the train motor is 310KN, and the maximum braking force of the mechanical braking component is 760KN. The resistance encountered by the train satisfies the Davis resistance equation f = 2.0895 + 0.0098v + 0.006v^2. The speed unit in this formula is m/s and the resistance unit is KN.
  How do you write a program through modeling methods to obtain the speed-distance curve, traction braking force-distance curve, time-distance curve and energy consumption-distance curve of the train operation process? How long does the program take to run? It is necessary to obtain a total of six sets of curves for the train to arrive at platform B in the shortest time, and add 10s, 20s, 50s, 150s, and 300s to the shortest running time to reach platform B.
  In the actual situation of train operation, there are more factors to consider and the model is more complex. The speed limits on different sections of the train journey are different, and there are also different slope conditions during the journey. The dynamic characteristics of the motor are also more complex. In addition, energy storage devices have important applications in the field of train energy saving. When the train brakes , a certain proportion of energy will be stored in the energy storage device for subsequent use. As shown in Figure 2.
Insert image description here
  This question provides two attachments. Road condition data from XEQ station to SMKXY station and train-related parameter data including motor traction/braking dynamic characteristics. The introduction is as follows:
  Appendix 1: Road condition data from XEQ station to SMKXY station (xls format), which contains slope change information and speed limit change information on the road from XEQ station to SMKXY station. See attachment 1.xls for details.
Insert image description here
  Appendix 2: Appendix 2 introduces the dynamic characteristics and parameters of the motor and gives the static motor traction rate and brake regeneration rate. See attachment 2.docx for details.
  Question 2
  considers the road condition information in Appendix 1 and 2 and the complex dynamic process of the motor. If the planned running time of the train is T, please design an optimization plan to obtain a feasible speed trajectory so that the energy consumption during the operation can be reduced (the lower, the better). Referring to question 1, obtain a total of six sets of curves for the train to arrive at platform B in the shortest time, and add 10s, 20s, 50s, 150s, and 300s to the shortest running time to reach platform B.
  Various emergencies may occur during train operation, causing the train to arrive at the platform early or late. The train's speed trajectory needs to change based on the new arrival time.

  Question 3.
  The train departs from the starting point and is originally scheduled to arrive at the destination in 320 seconds. When the train reaches the 2000m position, due to an unexpected accident ahead, it needs to be delayed by 60 seconds to reach the destination. Please design an optimization plan that can quickly (the faster, the better) obtain the adjusted optimized speed trajectory while maintaining energy-saving operation of the train. Draw the speed-distance curve, traction braking force-distance curve, time-distance curve and energy consumption-distance curve of the train operation process.

Overview of the overall solution process (abstract)

  In response to question 1, based on the background of energy consumption growth in the electrification process of urban rail transit and the Euler numerical method, a dynamic model to simulate the train operation process was established. By considering factors such as friction between the train and the track, air resistance, potential energy changes, and location speed limits, the train's speed-distance curve, traction braking force-distance curve, time-distance curve, and energy consumption-distance curve are obtained. In the model, we consider a train running on a horizontal track, given the distance from platform A to platform B, the upper limit of speed, the mass of the train, the inertial mass factor of rotating parts, the maximum traction force of the train motor and the maximum braking force of the mechanical braking component, The initial conditions are set, the differential equation is defined, and the Euler numerical method is used for iterative updates to obtain the train's operating status. According to the simulation operation results of the program, the speed changes, traction braking force changes, running time and energy consumption of the train in different road sections can be observed. In addition, the train arriving at platform B under different time constraints was simulated, and six sets of curve data were obtained.
  For question two, based on the dynamic model established for the train operation process, the particle swarm optimization algorithm can be used to solve the optimal speed trajectory of the train on a given road section. In order to ensure safety and energy saving and emission reduction goals, we use energy consumption as a constraint in the objective function and limit the maximum speed based on the road section slope information. In the particle swarm algorithm, the fitness of each speed is determined by calculating the energy consumption of the speed trajectory. In order to estimate the energy consumption of a train more accurately, we need to consider the variable speed motion during train operation. By calculating the traction power and braking power of the train at different speeds, the acceleration and braking degree of the train in each time period are determined under the condition that the maximum traction force and maximum braking force are met. Then, the energy consumption in each time period is calculated based on the traction power and braking power, and finally the total energy consumption of the entire journey is obtained.
  For problem three, two optimization methods are introduced to solve problem three: establishing a speed curve for algorithm optimization, using staged path solution and genetic algorithm. At the same time, it is necessary to dynamically adjust and optimize according to real-time conditions to ensure that the train reaches the terminal safely, energy-saving and quickly.

problem analysis:

  Analysis of Question
  1 Analysis of the significance of the research on Question 1: Question 1 is a mathematical modeling problem of the train operation process. By establishing a mathematical model, curves such as train operating speed, traction braking force, time and energy consumption under different conditions can be obtained. This helps to understand the performance of the train under different conditions and provides a basis for optimizing train operation.
  Analysis of general mathematical methods for solving such problems: We can use numerical methods to model and solve changes in speed, traction braking force, time and energy consumption during train operation. Among them, Euler's numerical method is a commonly used numerical method, which is suitable for numerical approximate solution of differential equations.
  Analysis of the characteristics of the data given in the question: The attachment provides the operating data of the train on the horizontal track, including the distance between trains, upper limit of speed, train mass, inertial rotation quality factor, maximum traction force, maximum braking force and resistance equation. These data reflect the key parameters and constraints during train operation and are the basis for establishing mathematical models.
  Analyze the question requirements of Question 1: Question 1 requires writing a program through modeling method to obtain the speed-distance curve, traction braking force-distance curve, time-distance curve and energy consumption-distance curve of the train under the shortest running time, and The running time of the program. These curves can describe the operating status and energy consumption of the train at different locations, helping to evaluate the performance and efficiency of the train. In addition, it is necessary to obtain a total of six sets of curves for the train to arrive at platform B in the shortest time, and add 10s, 20s, 50s, 150s, and 300s to the shortest running time to reach platform B.
  For the above reasons, we first establish a mathematical model I based on Euler's numerical method to simulate the train's operation process under ideal conditions. Then, a model II is established to observe changes in the corresponding speed-distance curve, traction braking force-distance curve, time-distance curve and energy consumption-distance curve by adjusting the running time. Finally, the results of Model I and Model II are compared to analyze the operation conditions and energy consumption differences of trains under different conditions.
  Analysis of question two
  Analysis of the significance of the research on question 2: Question 2 belongs to the mathematical modeling problem of the train operation process. By establishing a mathematical model and using road condition information and complex dynamic processes as the constraints of Problem 1, we can obtain the feasible train trajectory, traction braking force, time and energy consumption curves. This helps to understand the performance of the train under different conditions and provides a basis for optimizing train operation. Analysis of general mathematical methods to solve such problems: In response to changes in speed, traction braking force, time and energy consumption during train operation, we can use the particle swarm optimization algorithm to design a speed trajectory with minimal energy consumption, and according to the road conditions Information and train dynamic characteristics are restricted and adjusted accordingly to achieve driving safety and economy.
  Analysis of the characteristics of the data given in the question: The attachment provides the slope change information, speed limit change information and motor dynamic characteristics of the train on the way from XEQ station to SMKXY station. Among them, the mass and running distance of the train are determined, while the slope information determines the upper limit of the speed, the constant torque area and the weak magnetic area of ​​the motor reflect the range of the train's acceleration and deceleration; the resistance determines the force experienced by the train during operation. The size of the attenuation force.
  Analyze the question requirements of Question 2: Question 2 requires writing a program through modeling methods to obtain the feasible speed trajectory with the lowest energy consumption of the train under a given running time T, and to generate the traction braking force-distance curve and the time-distance curve. and energy consumption-distance curves, as well as the running time of the program. These curves can be used to describe the operating status and energy consumption of the train at different locations, thereby evaluating the performance and efficiency of the train. In addition, it is also necessary to obtain the curve of the train arriving at platform B in the shortest time, and a total of six sets of curves by adding 10s, 20s, 50s, 150s, and 300s to the shortest running time to platform B to explore the impact of changes in speed trajectory on train energy consumption. Influence.
  To achieve the above goals, we first need to consider the acceleration and deceleration limits of the train when designing the speed trajectory to ensure the safety and operating efficiency of the train. At the same time, factors such as the slope and resistance of the train's travel section must also be considered to optimize energy consumption performance. Then, through numerical calculation methods, the energy consumption of the train at different speeds can be calculated and the trajectory plan with the minimum energy consumption can be selected. Finally, after the preliminary results are obtained, the speed trajectory needs to be further inspected and optimized to meet the requirements of train safety and operating efficiency. In addition, according to the question requirements, the curves of the train arriving at platform B under different speed trajectories need to be obtained to explore the impact of speed trajectory changes on train energy consumption.

Model assumptions:

  1. Assume that in question 1, the gradient between stations is 0, and the train moves in a straight line;
  2. Assume that the time for generating traction force and braking force is negligible, that is, the train can reach the maximum traction force and maximum braking force in an instant;
  3 . Ignore air resistance and friction;
  4. When the train moves at a constant speed, F resistance = F traction force
  5. Assume that the resistance experienced by the train is constant within a certain fixed length interval, and the resistance value corresponds to the initial speed within the interval. .

Paper thumbnail:

Insert image description here
Insert image description here

For all the papers, please see "Only modeling QQ business cards" below. Just click on the QQ business card.

code:

Solution model for train acceleration phase:

import math
import pandas as pd
import time
start_time = time . time () # 记 录 代 码 开 始 时 间
# 列车质量
mass = 176300 # kg
# 列 车 加 速 度 阶 段 的 牵 引 力
traction_force = 33369 # N
# 列 车 速 度 上 限
velocity_limit = 27.8 # m / s
# 列 车 阻 力 公 式 参 数
k1 = 2.0895
k2 = 0.0098
k3 = 0.006
# 列 车 加 速 度 阶 段 的 数 量 ( 小段数 )
num_segments = 1000
# 列 车 站 点 间 的 总 距 离
total_distance = 5144.7 # m
# 列 车 在 每 个 小 段 内 的 长 度
segment_length = total_distance / num_segments # m
# 初始 化 变量
distance_traveled = 0
velocity = 0
elapsed_time = 0 # 修 改 变 量 名 为 elapsed_time
# 存 储 每 一 小 段 的 距 离 、 速度 、 时间
data = []
# 开 始 模 拟 列 车 运 动
for i in range ( num_segments ):
# 当 前 小 段 的 起 始 速 度
initial_velocity = velocity
# 计 算 当 前 小 段 内 的 阻 力
resistance = ( k1 + k2 * velocity + k3 * velocity ** 2) * 1000
# 计 算 当 前 小 段 内 的 加 速 度
acceleration = ( traction_force - resistance ) / mass
# 计 算 当 前 小 段 内 的 末 速 度
final_velocity = math . sqrt ( initial_velocity ** 2 + 2 * acceleration * segment_length )
t = ( final_velocity - initial_velocity ) / acceleration
# 如 果 末 速 度 超 过 速 度 上 限 , 则 以 速 度 上 限 为 准
if final_velocity > velocity_limit :
final_velocity = velocity_limit
# 更 新 列 车 的 距 离 和 速 度
distance_traveled += segment_length
velocity = final_velocity
# 累 加 时 间 并 将 其 添 加 到 列 表 中
elapsed_time += t
data . append ([ distance_traveled , velocity , elapsed_time ])
# 如 果 列 车 达 到 速 度 上 限 , 结 束 运 动 模 拟
if velocity >= velocity_limit :
break
# 将 数 据 转 换 为 DataFrame 格式
df = pd . DataFrame ( data , columns =[ 'Distance ', 'Velocity ', 'Time '])
# 获 取 时 间 的 累 加 值
df [' Time_cumsum '] = df ['Time ']. cumsum ()
# 将数 据 写入 Excel 表格中
df . to_excel ('p1 - aacc +10. xlsx ', sheet_name ='Sheet1 ', index = False )
print (" 列车 在 运行 %.2f 米 的 距 离 后 达 到 速 度 上 限 %.2 f m/s" % ( distance_traveled , velocity_limit ))
print (" 达 到 速 度 上 限 所 需 的 时 间 为 %.2f 秒" % elapsed_time )
end_time = time . time () # 记 录 代 码 结 束 时 间
execution_time = end_time - start_time # 计 算 代 码 运 行 时 间
print (" 代 码 运 行 时 间 为 %.2f 秒" % execution_time )

Solution model for train deceleration stage:

import math
import pandas as pd
# 列车质量
mass = 176300 # kg
# 列 车 初 始 速 度
initial_velocity = 27.8 # m / s
# 列 车 终 点 速 度
final_velocity = 0 # m / s
# 列车 制 动力
braking_force = 27629 # N
# 列 车 站 点 间 的 距 离
distance = 5144.7 # m
num_segments = 1000
# 每 个 小 段 的 长 度
segment_length = distance / 1000 # m
# 列 车 当 前 速 度
velocity = initial_velocity # m / s
# 列 车 运 行 距 离
total_distance = 0 # m
# 列 车 运 行 时 间
total_time = 0 # s
# 创建空的 DataFrame , 用 于 保 存 数 据
df = pd . DataFrame ( columns =[" 距离 (m)", " 速度 (m/s)", " 时间 (s)"])
# 逐 个 小 段 计 算 列 车 运 行 距 离 和 时 间 , 直 到 速 度 降 为 0
for i in range ( num_segments ):
# 当 前 小 段 开 始 速 度
segment_initial_velocity = velocity
# 计 算 当 前 小 段 的 阻 力
resistance = (2.0895 + 0.0098 * velocity + 0.006 * velocity ** 2) * 1000
# N
# 计 算 当 前 小 段 的 减 速 度
acceleration = ( braking_force + resistance ) / mass # m / s ^2
# # 计 算 当 前 小 段 内 的 末 速 度
# final_velocity = math . sqrt ( segment_initial_velocity ** 2 - 2 * acceleration * segment_length )
# 计 算 当 前 小 段 内 的 末 速 度
temp = segment_initial_velocity ** 2 - 2 * acceleration * segment_length
if temp < 0:
final_velocity = 0
else :
final_velocity = math . sqrt ( temp )
# 计 算 当 前 小 段 的 运 行 时 间
segment_time = ( velocity - final_velocity ) / acceleration # s
# 如 果 末 速 度 超 过 速 度 上 限 , 则 以 速 度 上 限 为 准
if final_velocity < 0:
final_velocity = 0
# # 计 算 当 前 小 段 的 运 行 距 离
# segment_distance = velocity * segment_time - 0.5 * acceleration * segment_time ** 2
# m
# 更 新 列 车 当 前 速 度
velocity -= acceleration * segment_time
# 更 新 列 车 总 运 行 距 离
total_distance += segment_length
# 更 新 列 车 总 运 行 时 间
total_time += segment_time
# 将 当 前 小 段 的 数 据 保 存 到 DataFrame 中
df . loc [ i ] = [ segment_length , velocity , segment_time ]
# 输 出 当 前 小 段 的 距 离 、 速 度 和时 间
print ("第 {} 小段 : 距离 {:.2 f} 米 , 速度 {:.2 f} 米/秒 , 时间 {:.2 f} 秒". format ( i +1 , segment_length , velocity , segment_time ))
# 如 果 速 度 已 经 降 为 0, 则 跳 出循 环
if final_velocity <= 0:
break
# 计 算 每 个 小 段 的 累 计 距 离 , 速 度和 时 间
df [" 总距离 (m)"] = df [" 距离 (m)"]. cumsum ()
df [" 总速度 (m/s)"] = df [" 速度 (m/s)"]. cumsum ()
df [" 总时间 (s)"] = df [" 时间 (s)"]. cumsum ()
# 将 DataFrame 保存到 Excel 文件中
filename = "p1 -de. xlsx "
with pd . ExcelWriter ( filename ) as writer :
df . to_excel ( writer , index = False )
# 输出结果
print (" 列车 在 运行 %.2 f 米 的 距 离 时 速 度 降 为 0。" % total_distance )
print (" 速度降为 0 时 所 需 的 时 间 为 %.2 f 秒 。" % total_time 

Solution model of train speed trajectory:

import math
distance = 5144.7 # 距离 , 单位为米
speed_limit = 100 # 速度上限 , 单位为 km / h
mass = 176.3 # 质量 , 单位为吨
inertia_factor = 1.08 # 旋 转 惯 量 因 子
max_traction_force = 310 # 最大 牵 引力 , 单位为 kN
max_brake_force = 760 # 最大 制 动力 , 单位为 kN
# 计算 Davis 阻力
def davis_friction ( v ):
v_ms = v / 3.6 # 将速度从 km / h 转换为 m / s
return 2.0895 + 0.0098* v_ms + 0.006* v_ms **2
# 计 算 列 车 受 到 的 总 阻 力
def total_friction ( v ):
return davis_friction ( v ) * mass * 9.8
# 计 算 列 车 加 速 度
def acceleration ( v ):
net_traction_force = max_traction_force - total_friction ( v )
return net_traction_force / mass
# 计 算 列 车 制 动 加 速 度
def brake_acceleration ( v ):
return max_brake_force / mass
# 计 算 列 车 能 耗
def energy_consumption (v , a ):
return total_friction ( v ) * v / 1000 + mass * ( inertia_factor /2) * ( a /(9.8*1000))**2 * distance
def Force ( final_velocity ):
traction_force = (310000 * 10) / final_velocity # 计 算 弱 磁 区 的 力
back_force = (760000 * 17) / final_velocity # 计 算 弱 磁 区 的 力
return traction_force , back_force
# 在 速 度 上 限 内 遍 历 所 有 速 度 , 找 到 最 小 的 能 耗 值 和 对 应 速 度
min_energy = math . inf
for v in range (1 , speed_limit + 1):
a = acceleration ( v )
energy = energy_consumption (v , a )
if energy < min_energy :
min_energy = energy
optimal_v = v
print (" The optimal speed is % dkm /h, and the minimum energy consumption is %.2 fkWh ." % ( optimal_v , min_energy ))
For all the papers, please see "Only modeling QQ business cards" below. Just click on the QQ business card.

Guess you like

Origin blog.csdn.net/weixin_43292788/article/details/132799341