Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ As an example to get started you estimate the parameters of a quadrotor model wi
make estimate-model model=quadrotor_model log=resources/quadrotor_model.ulg
```

For fixedwing AVL parameters,
```
make estimate-model model=fixedwing_avl_model log=resources/orange_plane.ulg
```

## Generating a Model Prediction for Given Parameters and Log

It is also possible to test the obtained parameters for a certain model on a different log using:
Expand Down
169 changes: 169 additions & 0 deletions Tools/parametric_model/configs/fixedwing_avl_model.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# AVL-based Fixed-Wing Model Configuration
# This configuration uses the AVL (Athena Vortex Lattice) aerodynamic model
# for comprehensive fixed-wing system identification

model_name: "AVL Fixed Wing Model"
model_type: "Fixed Wing with AVL Aerodynamics"
model_class: "FixedWingAVLModel"
extractor_class: "FixedWingExtractorModel"

extractor_config:
vmin: 8.0
vmax: 20.0

model_config:
mass: 1.45 # kg
moment_of_inertia:
Ixx: 0.107 # kg*m^2
Iyy: 0.256 # kg*m^2
Izz: 0.356 # kg*m^2

actuators:
rotors:
puller_:
- rotor:
description: "puller rotor"
rotor_type: "LinearRotorModel"
dataframe_name: "throttle"

aerodynamics:
type: "AVLModel"

# Reference geometry
area: 0.41 # Wing reference area [m^2]
chord: 0.19 # Mean aerodynamic chord [m]
span: 2.16 # Wing span [m]
AR: 11.37 # Aspect ratio (can be computed from span and area)
eff: 0.95 # Oswald efficiency factor

# Air properties
air_density: 1.225 # kg/m^3 at sea level

# Stall parameters
alpha_stall: 0.262 # Stall angle of attack [rad] (~15 degrees)
M: 15.0 # Sigmoid blending parameter for stall transition

# Flat plate drag model parameters (for post-stall)
CD_fp_k1: -3.0 # Flat plate drag sigmoid parameter 1
CD_fp_k2: 0.5 # Flat plate drag sigmoid parameter 2

# Control surfaces
num_ctrl_surfaces: 3
ctrl_surface_names:
- "elevator"
- "aileron"
- "rudder"

dynamics_model_config:
optimizer_config:
optimizer_class: "LinearRegressor"

estimate_forces: True
estimate_moments: True
resample_freq: 50.0
estimate_angular_acceleration: False

data:
required_ulog_topics:
actuator_outputs:
id: 1
ulog_name:
- "timestamp"
- "output[0]"
- "output[1]"
- "output[3]"
- "output[4]"
- "output[6]"
dataframe_name:
- "timestamp"
- "u0"
- "u1"
- "u3"
- "u4"
- "u6"
actuator_type:
- "timestamp"
- "control_surface"
- "control_surface"
- "control_surface"
- "motor"
- "control_surface"

vehicle_local_position:
ulog_name:
- "timestamp"
- "vx"
- "vy"
- "vz"

vehicle_attitude:
ulog_name:
- "timestamp"
- "q[0]"
- "q[1]"
- "q[2]"
- "q[3]"
dataframe_name:
- "timestamp"
- "q0"
- "q1"
- "q2"
- "q3"

vehicle_angular_velocity:
ulog_name:
- "timestamp"
- "xyz[0]"
- "xyz[1]"
- "xyz[2]"
- "xyz_derivative[0]"
- "xyz_derivative[1]"
- "xyz_derivative[2]"
dataframe_name:
- "timestamp"
- "ang_vel_x"
- "ang_vel_y"
- "ang_vel_z"
- "ang_acc_b_x"
- "ang_acc_b_y"
- "ang_acc_b_z"

sensor_combined:
ulog_name:
- "timestamp"
- "accelerometer_m_s2[0]"
- "accelerometer_m_s2[1]"
- "accelerometer_m_s2[2]"
dataframe_name:
- "timestamp"
- "acc_b_x"
- "acc_b_y"
- "acc_b_z"

vehicle_thrust_setpoint:
ulog_name:
- "timestamp"
- "xyz[0]"
dataframe_name:
- "timestamp"
- "throttle"

vehicle_torque_setpoint:
ulog_name:
- "timestamp"
- "xyz[0]"
- "xyz[1]"
- "xyz[2]"
dataframe_name:
- "timestamp"
- "aileron" # Combined aileron input
- "elevator" # Elevator input
- "rudder" # Rudder input

vehicle_land_detected:
ulog_name:
- "timestamp"
- "landed"
dataframe_name:
- "timestamp"
- "landed"
1 change: 1 addition & 0 deletions Tools/parametric_model/src/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from . import aerodynamic_models
from .fixedwing_avl_model import FixedWingAVLModel
from . import rotor_models
from . import model_plots
from . import extractor_models
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
from .phiaerodynamics_model import PhiAerodynamicsModel
from .control_surface_model import ControlSurfaceModel
from .linear_wing_model import LinearWingModel
from .avl_model import AVLModel
Loading
Loading