Here’s an interesting control problem. This time your spuCraft is not constrained to move along a straight line. Now it can move up, down, left, and right. And it can rotate. If you control it precisely, your HumBird spuCraft can hover and get the flowers.
In this problem, we will learn about integral action, and get to use Evans’ root locus to think about control design.
Table of Links
- Video: Introduction to Humbird
- Mathematical Model of the HumBird SpuCraft
- One Degree of Freedom Altitude Dynamics
- Altitude Control: First Attempt
- Making Sense of Steady State Error
- Using Feed Forward to Reduce or Eliminate Steady State Error
- Thinking About How an Integrator Works
- Getting Rid of Steady State Error Manually
- Practical Considerations of Altitude Controller
- Finishing the Altitude Controller
- Designing the Lateral Controller
- First Steps at Implementing Lateral Control
- Focus on Roll Control
- Finishing the Lateral Control
Here we outline the goals of HumBird and show you how to get your SpuPilot started. The attached document provides a copy of the code and parameter values.
We’re going to start with just the vertical dynamics. We’ll try to hold the spuCraft at a fixed altitude. Start by deriving equations that describe the dynamics.
Here is a first attempt at controlling the altitude of the spuCraft. We implement a straightforward PD controller. It kinda works. The spuCraft’s altitude stabilizes… eventually. Also, there is a steady state error.
The following are some questions you should consider
When you know the weight of the spuCraft precisely, it is possible to eliminate the steady state error precisely with feed forward action. However, if there is uncertainty, the feed-forward will generally not eliminate all error.
To eliminate steady state error in the presence of uncertainty we are going to use an integrator. But before we put the integrator to use, let’s recall how it works.
Now I want you to get rid of the steady state error, but do it manually with your gamepad. By pushing the thumbstick up and down, you can add or subtract a little from the thrust signal so that you can properly balance the weight and eliminate the error. We investigate two ways of doing this. One is with direct thumbstick input. The other sends the thumbstick input to an integrator and then uses the integrator output to augment the thruster signal.
By observing how one can get rid of steady state error manually, we can figure out how to write a mathematical algorithm that does the same.
In order to get your controller to work better, I offer some advice.
Now it’s time to finish the altitude controller. You need the dynamics to decay fast enough to get that first flower. Then you need the controller to maintain proper elevation as your spuCraft is sweeping side to side, hunting flowers.
Equations of Motion (including lateral dynamics)
Here is a video solution:
How do you control the spuCraft to go side to side? This video will get you started on designing your lateral controller.
Let’s implement the lateral controller you derived. It should work for smaller excursions, but the big ones will likely be problematic. To successfully get the flowers, though, you’ll have to fly across the screen in a controlled way.
In the previous problem, we found that we run into problems when the spuCraft roll angle gets too large. Here we focus on the dynamics and control of roll and take action to prevent crashing.
The last step is to embed the roll controller into the lateral position controller. This video should take you to the finish line.