赞
踩
当大家面临着复杂的数学建模问题时,你是否曾经感到茫然无措?作为2021年美国大学生数学建模比赛的O奖得主,我为大家提供了一套优秀的解题思路,让你轻松应对各种难题。
让我们来看看数维杯A题!
1、俯仰力矩和俯仰角变化:
推导俯仰力矩的表达式。
基于给定参数建立俯仰角变化模型。
计算 5 秒、10 秒和 20 秒时的姿态角。
2、滚转、俯仰和偏航力矩:
建立滚转、俯仰和偏航力矩的表达式。
建立姿态角变化模型。
计算 5 秒、10 秒和 20 秒时的姿态角。
3.机动特性:
设计低速和高速飞行的机动以实现平飞任务。
4、加速机动任务:
设计控制输入以实现前进加速和平飞。
考虑低速和高速飞行特性。
俯仰力矩表达式:
俯仰力矩主要受到共轴刚性转子、螺旋桨推进器、水平尾翼的影响。
共轴刚性转子产生的气动力矩可以表示为:
M
rotor
=
K
rotor
⋅
ρ
⋅
A
⋅
V
tip
M_{\text{rotor}} = K_{\text{rotor}} \cdot \rho \cdot A \cdot V_{\text{tip}}
Mrotor=Krotor⋅ρ⋅A⋅Vtip
螺旋桨推进器产生的推力和旋转力矩:
T
propeller
=
C
propeller
T_{\text{propeller}} = C_{\text{propeller}}
Tpropeller=Cpropeller
水平尾翼产生的气动力矩:
M
horizontal tail
=
C
horizontal tail
⋅
q
⋅
S
horizontal
⋅
y
ˉ
horizontal
M_{\text{horizontal tail}} = C_{\text{horizontal tail}} \cdot q \cdot S_{\text{horizontal}} \cdot \bar{y}_{\text{horizontal}}
Mhorizontal tail=Chorizontal tail⋅q⋅Shorizontal⋅yˉhorizontal
俯仰角变化模型:
利用力矩和力的平衡,可以得到俯仰角变化的微分方程:
I
y
y
⋅
θ
˙
=
M
rotor
+
T
propeller
+
M
horizontal tail
I_{yy} \cdot \dot{\theta} = M_{\text{rotor}} + T_{\text{propeller}} + M_{\text{horizontal tail}}
Iyy⋅θ˙=Mrotor+Tpropeller+Mhorizontal tail
其中 I y y I_{yy} Iyy 是飞行器绕 y 轴的惯性矩。
数值求解:
初始条件:
import numpy as np from scipy.integrate import odeint # 定义常数和初始条件 K_rotor = 0.1 rho = 1.225 A = 10.0 V_tip = 5.0 C_propeller = 0.05 C_horizontal_tail = 0.02 q = 100.0 S_horizontal = 8.0 y_horizontal = 2.0 I_yy = 100.0 initial_conditions = [0.0] # 初始俯仰角 # 定义微分方程 def pitch_dynamics(theta, t): M_rotor = K_rotor * rho * A * V_tip T_propeller = C_propeller M_horizontal_tail = C_horizontal_tail * q * S_horizontal * y_horizontal # 俯仰角变化微分方程 dtheta_dt = (M_rotor + T_propeller + M_horizontal_tail) / I_yy return dtheta_dt # 定义时间范围 time_points = np.linspace(0, 20, 1000) #见完整版代码
滚转力矩表达式:
滚转力矩主要由共轴刚性转子和水平尾翼贡献。
共轴刚性转子产生的滚转力矩与问题一中的俯仰力矩相似,可以表示为:
M
roll
=
K
rotor
⋅
ρ
⋅
A
⋅
V
tip
M_{\text{roll}} = K_{\text{rotor}} \cdot \rho \cdot A \cdot V_{\text{tip}}
Mroll=Krotor⋅ρ⋅A⋅Vtip
水平尾翼产生的滚转力矩:
M
horizontal tail
=
C
horizontal tail
⋅
p
⋅
S
horizontal
⋅
y
ˉ
horizontal
M_{\text{horizontal tail}} = C_{\text{horizontal tail}} \cdot p \cdot S_{\text{horizontal}} \cdot \bar{y}_{\text{horizontal}}
Mhorizontal tail=Chorizontal tail⋅p⋅Shorizontal⋅yˉhorizontal
俯仰力矩表达式:
偏航力矩表达式:
偏航力矩主要由共轴刚性转子和垂直尾翼贡献。
共轴刚性转子产生的偏航力矩与滚转和俯仰情形相似:
M
yaw
=
K
rotor
⋅
ρ
⋅
A
⋅
V
tip
M_{\text{yaw}} = K_{\text{rotor}} \cdot \rho \cdot A \cdot V_{\text{tip}}
Myaw=Krotor⋅ρ⋅A⋅Vtip
垂直尾翼产生的偏航力矩:
M
vertical tail
=
C
vertical tail
⋅
r
⋅
S
vertical
⋅
y
ˉ
vertical
M_{\text{vertical tail}} = C_{\text{vertical tail}} \cdot r \cdot S_{\text{vertical}} \cdot \bar{y}_{\text{vertical}}
Mvertical tail=Cvertical tail⋅r⋅Svertical⋅yˉvertical
滚转、俯仰和偏航角变化模型:
利用力矩和力的平衡,可以得到滚转、俯仰和偏航角变化的微分方程:
I
roll
⋅
p
˙
=
M
roll
+
M
horizontal tail
I_{\text{roll}} \cdot \dot{p} = M_{\text{roll}} + M_{\text{horizontal tail}}
Iroll⋅p˙=Mroll+Mhorizontal tail
I pitch ⋅ q ˙ = M rotor + T propeller + M horizontal tail I_{\text{pitch}} \cdot \dot{q} = M_{\text{rotor}} + T_{\text{propeller}} + M_{\text{horizontal tail}} Ipitch⋅q˙=Mrotor+Tpropeller+Mhorizontal tail
I yaw ⋅ r ˙ = M yaw + M vertical tail I_{\text{yaw}} \cdot \dot{r} = M_{\text{yaw}} + M_{\text{vertical tail}} Iyaw⋅r˙=Myaw+Mvertical tail
数值求解:
初始条件:
import numpy as np from scipy.integrate import odeint # 定义常数和初始条件 K_rotor = 0.1 rho = 1.225 A = 10.0 V_tip = 5.0 C_horizontal_tail = 0.02 p = 0.1 S_horizontal = 8.0 y_horizontal = 2.0 C_vertical_tail = 0.03 r = 0.05 S_vertical = 5.0 y_vertical = 1.5 I_roll = 150.0 I_pitch = 100.0 I_yaw = 80.0 initial_conditions = [0.0, 0.0, 0.0] # 初始滚转、俯仰和偏航角 # 定义微分方程 def dynamics(variables, t): p, q, r = variables # 滚转、俯仰和偏航角速度 M_roll = K_rotor * rho * A * V_tip + C_horizontal_tail * p * S_horizontal * y_horizontal M_pitch = K_rotor * rho * A * V_tip + C_horizontal_tail * q * S_horizontal * y_horizontal M_yaw = K_rotor * rho * A * V_tip + C_vertical_tail * r * S_vertical * y_vertical # 滚转、俯仰和偏航角速度变化微分方程 dp_dt = M_roll / I_roll dq_dt = M_pitch / I_pitch dr_dt = M_yaw / I_yaw return [dp_dt, dq_dt, dr_dt] # 定义时间范围 time_points = np.linspace(0, 20, 1000)
低速飞行的机动特性设计:
高速飞行的机动特性设计:
设计方法:
优化目标:
约束条件:
数学表达式:
数值模拟:
低速飞行设计:
高速飞行设计:
参数调整和优化:
验证和测试:
import numpy as np from scipy.integrate import odeint from scipy.optimize import minimize # 定义初始条件和参数 initial_conditions_low_speed = [0.0, 0.0, 0.0] # 滚转、俯仰和偏航角 initial_conditions_high_speed = [0.0, 0.0, 0.0] # 滚转、俯仰和偏航角 params_low_speed = [0.1, 1.0, 5.0] # 共轴刚性转子和螺旋桨推进器参数 params_high_speed = [1.0, 2.0, 3.0, 1.0, 2.0, 3.0] # 螺旋桨推进器、升降舵和方向舵参数 # 定义低速飞行动力学方程 def dynamics_low_speed(variables, t, params): # 省略动力学方程,根据具体问题补充 return [0, 0, 0] # 定义高速飞行动力学方程 def dynamics_high_speed(variables, t, params): # 省略动力学方程,根据具体问题补充 return [0, 0, 0] # 定义目标函数 def objective(params): # 低速飞行 result_low_speed = odeint(dynamics_low_speed, initial_conditions_low_speed, time_points, args=(params[:3],)) # 高速飞行 result_high_speed = odeint(dynamics_high_speed, initial_conditions_high_speed, time_points, args=(params[3:],)) # 计算目标函数,例如使得姿态角尽量接近零 error_low_speed = np.sum(np.abs(result_low_speed[:, :3])) error_high_speed = np.sum(np.abs(result_high_speed[:, :3])) # 返回总体目标函数 return error_low_speed + error_high_speed # 定义约束条件 def constraint(params): # 可以根据需要添加约束条件 return [0] # 定义时间范围 time_points = np.linspace(0, 20, 1000) # 优化参数 initial_guess = params_low_speed + params_high_speed result = minimize(objective, initial_guess, constraints={'type': 'eq', 'fun': constraint})
飞行动力学建模:
控制输入设计:
目标函数和约束条件:
数学表达式:
数值模拟和优化:
低速和高速动力学模型建立:
控制输入设计:
目标函数和约束条件制定:
数学模型建立:
数值模拟和优化:
验证和测试:
import numpy as np from scipy.integrate import odeint from scipy.optimize import minimize # 定义初始条件和参数 initial_conditions = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] # 滚转、俯仰、偏航角和速度、加速度 params_low_speed = [0.1, 1.0, 5.0] # 低速模式下的控制输入参数 params_high_speed = [1.0, 2.0, 3.0, 1.0, 2.0, 3.0] # 高速模式下的控制输入参数 # 定义低速和高速飞行动力学方程 def dynamics(variables, t, params): # 省略动力学方程,根据具体问题补充 return [0, 0, 0, 0, 0, 0] # 定义目标函数 def objective(params): # 低速飞行 result_low_speed = odeint(dynamics, initial_conditions, time_points, args=(params[:3],)) # 高速飞行 result_high_speed = odeint(dynamics, initial_conditions, time_points, args=(params[3:],)) # 计算目标函数,例如使得加速度尽量大 error_low_speed = -result_low_speed[-1, 4] # 取负号表示最大化加速度 error_high_speed = -result_high_speed[-1, 4] # 返回总体目标函数 return error_low_speed + error_high_speed # 定义约束条件 def constraint(params): # 可以根据需要添加约束条件
更多完整的代码和思路看这里:
2023 年 数维杯(A题)国际大学生数学建模挑战赛 |数学建模完整代码+建模过程全解全析
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。