"It’s not that I’m so smart, it’s just that I stay with problems longer." Einstein
Quadrotor Control
In general the quadrotor has two inputs: the thrust force () and the moment (). is the sum of the thrusts at each rotor
,
while is proportional to the difference between the thrusts of two rotors
, where is the arm length of the quadrotor.
2-D Quadrotor Control
Equation Of Motion
The dynamic model of the quadrotor is nonlinear. However, a PD controller is designed for a linear system. To use a linear controller for our nonlinear system, we first need to lineariye the equation of motions about a equilibrium configuration. In this case of the quadrotor, the equilibrium configuration is the hover configuration at any arbitrary position with zero angle.
Dynamics are non linear:
Equilibrium hover configuration:
To linearize the dynamics, we replace all non-linear function of the state and control variables with their first order Taylor approximations at the equilibrium location.
Linearized dynamics by replacing by and by 1:
Trajectory Tracking
The desired trajectory with the corresponding position, velocity and acceleration can be achieved by the commanded acceleration, calculated by the controller using:
with
and
Nested Control Structure
If we are following non-aggressive trajectories where the snap is small, we may approximate this as . Furthermore, we may “absorb” into the proportional and derivate gains. This gives us a new, simplified equation:
Control Equations
So these are the three equations we can use to drive a quadrotor that is close to the operating point and stays on the y-z-plane.
3-D Quadrotor Control
Trajectory Tracking
For the 2D quadrotor our trajectories were specified as a 2D vector . In the case of 3D the trajectories are specified as a 4D vector consisting of desired trajectory (position, yaw angle):
The desired trajectory with the corresponding position, velocity and acceleration can be achieved by the commanded acceleration, calculated by the controller using:
with
and
Nested Control Structure
Please keep in mind that the angular velocity components in body frame are as followed:
The quadrotor has two inputs: the thrust force () and the moment (). is the sum of the thrusts at each rotor
while is proportional to the difference between the thrusts of two rotors
( is the arm lenght of the quadrotor).
Inner Loop
The inner loop corresponds to attitude control. The actual attitude and the angular velocity, or the roll, pitch and yaw angles are feed back to calculate .
Outer Loop
The outer loop is corresponding to position control. We look mainly at the actual position vector and the yaw angle.
Control For Hovering
Let’s look at it in a special case, the hovering.
We will now linearize the dynamics at the hover configuration:
By means of these linearized equations we go further and look at the nested control structure.
Tuning PD & PID Controllers
A possible approach to tuning is to use the Zeigler-Nichols [1] method of tuning.
- Set all gains to zero and start with the proportional gain by setting it to a rather larger value like 100 or 1000. The goal is to provoque a sustained oscillation with a rather consistend time period.
- Once we find the value at which this happens, this becomes . Also we need to find the time period of oscillations ().
- Calculate the other gains.
- Repeat this steps with each group such a , and .
Planning
Time, Motion And Trajectories
General Set Up
- Start, goal positions (orientations)
- Waypoint positions (orientations)
- Smoothness criterion
- Generally translate to minimizing rate of change of “input”
- Order of the system (n)
- Order of the system determines the input
- Boundary conditions on $$(n-1)^{th} order and lower derivatives
- Third order is called yerk
- Forth oder is called snap
Calculus Of Variations
Euler Lagrange Equation
Necessary condition satisfied by the optimal function .
Simple Examples
By means of the six boundary conditions at start and end positions.
The position contraints looks as followed and the results becomes a linear problem:
With differentation we get:
The same can be done with the acceleration and defining the corresponding boundary conditions.
To solve this mathematical problem there are multiple possibilities. The one I’m using here is
We can find a equation with reflects the Minimum Jerk Trajectory.
Waypoints
In robotics it is not enough to calculate just the minimum jerk trajectory. It is necessary to calculate as well the intermediate points named waypoints. We can define piecewise continous trajectories between waypoints. Resulting in problems in to kinks of the connect pieces. Therefore we should aimed for a smooth curve, called a spline.
Finally, this leads us to Minimum Snap Trajectories.
The position control system is a fourth order system, therefore we want trajectories that can be differentiated four times.