Skip to content

Commit

Permalink
add WIP linearization to quadrotor
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Aug 6, 2024
1 parent 25c7974 commit 422e0fe
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/src/examples/quad.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,21 @@ nothing # hide
![quadrotor animation](quadrotor.gif)

The green arrows in the animation indicate the force applied by the thrusters.

```@example QUAD
quad = RotorCraft(closed_loop=false, addload=false)
quad = complete(quad)
inputs = [quad.thruster1.u; quad.thruster2.u; quad.thruster3.u; quad.thruster4.u]
outputs = [quad.y_alt, quad.y_roll, quad.y_pitch]
op = [
vec(ori(quad.freemotion.Rrel_f).R .=> I(3));
vec(D.(ori(quad.freemotion.Rrel_f).R) .=> 0*I(3));
quad.world.g => 9.81;
inputs .=> 1;
] |> Dict
ssys = structural_simplify(IRSystem(quad), (inputs, outputs))
lr = linearize(IRSystem(quad), inputs, outputs; op)
```

0 comments on commit 422e0fe

Please sign in to comment.