mcdp {
# We need to fly for this duration
provides endurance [s]
# ...while carrying this extra payload
provides extra_payload [kg]
# ...and providing this extra power
provides extra_power [W]
# Sub-design problem: choose the battery
battery = instance mcdp {
# A battery provides capacity
provides capacity [J]
# and requires some mass to be transported
requires mass [kg]
# requires cost [$]
specific_energy_Li_Ion = 500 Wh / kg
required mass ā„ provided capacity / specific_energy_Li_Ion
}
# Sub-design problem: actuation
actuation = instance mcdp {
# actuators need to provide this lift
provides lift [N]
# and will require power
requires power [W]
# simple model: quadratic
c = 10.0 W/N²
required power ā„ (provided lift)^2 Ā· c
}
# Co-design constraint: battery must be large enough
power = power required by actuation + provided extra_power
energy = power Ā· provided endurance
capacity provided by battery ā„ energy
# Co-design constraint: actuators must be powerful enough
gravity = 9.81 m/s²
weight = (mass required by battery + provided extra_payload) Ā· gravity
lift provided by actuation ā„ weight
# suppose we want to optimize for size of the battery
requires mass for battery
}