Optimal Control of Pitch/Travel without Feedback
Preparations
1) State Space Formulation
State Space Representation Task We want to write the model on continuous time state space form
Where , and .
We know the following:
Solution
2) Model Discretization
Task Discretize the model using the forward Euler method, and write it on the discrete time state space form
Solution Forward Euler method gives us
Rewriting this
Where and
3) Calculating the Optimal Path
Values:
Task Find optimal trajectory for moving from to , when we assume that the elevation angle is constant.
Solution Why do we need this constraint?
- Large deviations from the point of linearization might lead to poor performance. Therefore (due to safety) we limit it to degrees.
Is it necessary to also implement this constraints on the pitch reference angle ?
- This is what we’ve done.
Minimizing the cost function
We want to express this as
Finding : We therefore get
Meaning that , and the rest is .
Same reasoning for finding :
Thus giving us
3.1) For the daring
4) Adding Zeroes to the Input Vector
This is done to let the helicopter stabilize at .
5) Elevation offset
The elevation offset is about 30 degrees. When we start the program, it thinks its current position , which is what we can offset.
6) Reasonable Trajectory
The trajectory seems reasonable considering its an open control loop.
In the Lab
See Github for Matlab implementation.
Test plan
Row vs data
- Time
- Travel
- Travel rate
- Pitch
- Pitch rate
- Elevation
- Elevation rate
- Pitch reference
- Elevation reference
- V_d
- V_s 13-17. x_star (row 13-17)
For the Report
The motors are uneven, therefore degrees on pitch makes it more stable
- If the helicopter is completely still at the start, the optimization layer works better than if its moving when the controller starts.