FlightSims.BehaviouralCloning
— TypeSupervised-learning-based imitation learning algorithm of deterministic policies.
FlightSims.CTLinearIRL
— TypeRefs
[1] F. L. Lewis, D. Vrabie, and K. Vamvoudakis, "Reinforcement Learning and Feedback Control: Using Natural Decision Mehods to Design Optimal Adaptive Controllers," IEEE Control Systems, vol. 32, no. 6, pp.76-105, 2012.
Variables
V̂ ∈ R: the estimate of (state) value function - V̂.basis: Φ - V̂.param: w
FlightSims.CTLinearIRL
— Typed: polynomial degree
FlightSims.CTValueIterationADP
— TypeRefs
[1] T. Bian and Z.-P. Jiang, “Value Iteration, Adaptive Dynamic Programming, and Optimal Control of Nonlinear Systems,” in 2016 IEEE 55th Conference on Decision and Control (CDC), Las Vegas, NV, USA, Dec. 2016, pp. 3375–3380. doi: 10.1109/CDC.2016.7798777. [2] Forked repo of the code implementation by T. Bian, https://github.com/JinraeKim/nonlinear-VI/blob/main/nonlinear_sys.R
Variables
V̂ ∈ R: the estimate of (state) value function - V̂.basis: Φ - V̂.param: w dV̂ ∈ R: the estimate of time derivative of (state) value function - dV̂.basis: Ψ - V̂.param: c (BE CAREFUL; not used)
FlightSims.CTValueIterationADP
— Typen: state dim. m: input dim. d: polynomial degree
FlightSims.GoodarziQuadcopterEnv
— TypeReferences
[1] F. A. Goodarzi, D. Lee, and T. Lee, “Geometric stabilization of a quadrotor UAV with a payload connected by flexible cable,” in 2014 American Control Conference, Jun. 2014, pp. 4925–4930, doi: 10.1109/ACC.2014.6859419.
Variables
p ∈ R^3: inertial position v ∈ R^3: inertial velocity R ∈ so(3): inertial-to-body rotation matrix (R_I2B) ω ∈ R^3: angular rate of body in inertial frame u ∈ R^4: [f, M...] where f ∈ R: total thrust, M ∈ R^3: moment
FlightSims.HelixCommandGenerator
— TypeVariables
pos0 ∈ R^3: initial position dir ∈ S^2 (sphere): a unit vector dir_perp ∈ S^2 (sphere): a unit vector perp. to dir
r > 0: radius ω: angular rate θ: phase c: coefficient for forward direction
Notes
The basis vectors of the plane perpendicular to the dir
is determined by a keyword argument dir_ref=[0, 0, 1]
. For more details, see the source code.
FlightSims.IslamQuadcopterEnv
— TypeReferences
[1] M. Islam, M. Okasha, and M. M. Idres, “Dynamics and control of quadcopter using linear model predictive control approach,” IOP Conf. Ser.: Mater. Sci. Eng., vol. 270, p. 012007, Dec. 2017, doi: 10.1088/1757-899X/270/1/012007.
Variables
u ∈ R^4: square of rotor angular speed
FlightSims.LQR
— TypeInfinite-horizon continuous-time linear quadratic regulator (LQR).
FlightSims.LeeHexacopterEnv
— TypeNotes
- [1] is modified for hexa-x configuration; see [2].
References
[1] T. Lee, M. Leok, and N. H. McClamroch, “Geometric Tracking Control of a Quadrotor UAV on SE(3),” in 49th IEEE Conference on Decision and Control (CDC), Atlanta, GA, Dec. 2010, pp. 5420–5425. doi: 10.1109/CDC.2010.5717652. [2] PX4 Airframes Reference, https://docs.px4.io/master/en/airframes/airframe_reference.html.
Variables
u ∈ R^6: rotor forces
FlightSims.LinearApproximator
— Typen: input dimension d: polynomial degree m: output dimension
FlightSims.PolynomialBasis
— MethodNotes
with_bias=true
provides polynomials with the degree of from 0 to d
.
with_bias=false
provides polynomials with the degree of d
.
Variables
n ∈ N: length of array, i.e., x ∈ Rⁿ d ∈ N: degree
FlightSims.PowerLoop
— TypeRefs.
[1] E. Kaufmann, A. Loquercio, R. Ranftl, M. Müller, V. Koltun, and D. Scaramuzza, “Deep Drone Acrobatics,” arXiv:2006.05768 [cs], Jun. 2020, Accessed: Jun. 02, 2021. [Online]. Available: http://arxiv.org/abs/2006.05768
Variables
d ∈ R^3: displacement r ∈ R^+: radius
Notes
units: [m], [s]
FlightSims.ReferenceModelEnv
— TypeReferences
- Reference model (e.g., xd, vd, ad, addot, adddot)
[1] S. J. Su, Y. Y. Zhu, H. R. Wang, and C. Yun, “A Method to Construct a Reference Model for Model Reference Adaptive Control,” Adv. Mech. Eng., vol. 11, no. 11, pp. 1–9, 2019.
Notes
d: degree of the reference model autodiff: autodiff = true for tracking time-varying command; otherwise for set-point regulation xcmdfunc(t): function of time
FileIO.load
— Methodload(path::String; with_process=false)
FileIO.save
— Methodsave(path::String,
env::AbstractEnv, prob::DiffEqBase.DEProblem, sol::DESolution;
process=nothing)
FlightSims.ApproximateOptimalInput
— MethodInfer the approximate optimal input.
FlightSims.Command
— MethodNotes
NED coordinate system.
- go straight
norm(v0)(t-t0) + 0.5a*(t-t0)^2 = norm(Δp)
- loop
rθ = V(t-t0-tgostraight)
FlightSims.DatumFormat
— MethodDatum format function compatible with sim
and SavingCallback
in DifferetialEquations.jl
.
Notes
As written in the description, this should allocate the output (not as a view to x
).
FlightSims.Dynamics!
— MethodNotes
running_cost: integrand; function of (x, u)
FlightSims.LinearSystem_IntegratorEnv
— MethodLinearSystemEnv + IntegratorEnv
FlightSims.OptimalController
— MethodMinimise J = ∫ (x' Q x + u' R u) from 0 to ∞
FlightSims.Process
— MethodPost processing function (default).
Notes
- It would be deprecated.
FlightSims.State
— MethodEven for scalar integrator, you should put an array of length 1; due to the limitation of in-place method Dynamics!
.
FlightSims.State
— MethodNotes
r
denotes integrand ofinteg
.
FlightSims.State
— MethodCommon state structure of MulticopterEnv
FlightSims.State
— Methodx_i
denotes i
th (time) derivative of x
FlightSims.approximate_optimal_input
— MethodInfer the approximate optimal input.
FlightSims.input_to_force_moment
— MethodCommon input to force and moment transformation (default: not applied)
FlightSims.maybe_apply
— MethodNotes
Borrowed from an MRAC example.
FlightSims.min_Ĥ
— MethodMinimise approximate Hamiltonian.
FlightSims.partitionTrainTest
— FunctionpartitionTrainTest(data, at)
Split a dataset into train and test datasets (array).
FlightSims.saturate
— MethodCommon input saturation (default: not applied)
FlightSims.set_data!
— MethodNotes
adp.data contains M+1 data j = 0, 1, ..., M-1
FlightSims.sim
— FunctionNotes
FlightSims.update!
— Methods: states (minibatch) ∈ R^nxN a: actions (minibatch) ∈ R^mxN
Examples
for batch in bc.dataloader FlightSims.update!(bc, batch...) end