HW 03
HW 03
Homework 3
Last modification: November 9, 2021
1. (2 pts.) You’re given a “6-DOF" IMU that has a 3-axis gyroscope and a 3-axis accelerometer.
You mount the IMU on a quadrotor with the following local coordinate system: the y-axis
points forwards, the z-axis to the left, and the x-axis makes a right-handed system. Note that
this is different from your Romi.
(a) For each axis of the gyroscope, identify which angular motion it is registering: yaw, pitch
or roll.
(b) If the quadrotor were in a horizontal position, which angular degree of freedom cannot
be determined? Explain.
2. (4 pts.) You build the rig in Figure 1. A dowel is mounted on a bearing such that it can tilt up
and down. We’ll call the angle it makes with horizontal, θ. At the end of the dowel, you mount
a pair of propellers on a swivel. By adjusting the speeds of the propellers, you can control both
θ and the angle of the swivel bar w.r.t. horizontal, which we’ll call φ. You mount a 6-DOF IMU
(accelerometer and gyroscope) on the swivel bar such that the x-axis is parallel to the dowel
and points outward from the swivel, and the z-axis is vertical when in the neutral position
(φ = 0).
(b) How many total degrees of freedom does the rig have? Is it holonomic, non-holonomic,
or redundant?
Homework 3 2
(c) Describe how you can use the accelerometer to determine the angle of the swivel, φ.
Which components of the accelerometer will you use? What might be some sources of
error in your calculation? Be sure to write out the mathematical formula for calculating
φ, though you don’t need to write code.
(d) Which gyroscope axis measures changes in φ? Can you use it to track φ over time? What
sources of error are there? Explain.
4. (2 pts.) You want your Romi to know when passes a slope threshold of 15 degrees (so you can
put it into turbo mode for steep slopes). You write the following function to check if it needs
the extra boost or not.
bool checkIfSteepSlope(angle)
{
return (currPitch > angle);
}
where currPitch is the current pitch angle (for this problem, positive pitches correspond to
nose-up). How well do you think this will work? What could you do to improve it?
6. (2 pts.) You place your IMU with the z-axis pointing up and register a raw acceleration value of
1005. You then flip it over and the raw acceleration value is -989. Assuming the accelerometer
output is linear, calculate the bias (in mg) and resolution (in mg/bit) of the accelerometer. Write
out an expression that converts the raw reading to acceleration. What is the raw (uncalibrated)
reading when it’s on its side and the z-axis points exactly horizontal?