CMU RI 16-711: KDC: Assignment 3: State Estimation


This assignment explores state estimation and Kalman Filtering.


Part 1: Check the simulator you created for Assignment2 standing balance against mine. Bonus points for finding errors in mine. C code and Include file. I leave it up to you to figure out how to do the checking. You can check the one step response to a given state and action. You can see if you get a similar trajectory for a given initial state and sequence of actions. You can see if the behavior is similar with the same feedback controller. Take the point of view that you are trying to convince a skeptical employer that your code is correct.

linearize-dynamics.cand notes.txt shows how to create an LQR controller.


Part 2: State estimation using low pass filtering. The file noise.c shows how to add noise to a simulation. The sensor noise and process noise covariances are diagonal. Note that the example program uses standard deviations rather than variances to specify the Gaussian random variable distributions: Measurement noise (standard deviations) ankle angle: 0.1, knee angle: 0.1, hip angle: 1.0, ankle angular velocity: 1.0, knee angular velocity: 1.0, hip angular velocity: 1.0. Process noise (standard deviations): All 3 torques 100.0.

This code uses the simulator from Part 1. You can use this simulator or your own.

Part2a: Manually design a filters to clean up the measurements. Check out butter(), and filter() in Matlab. See how much you can reduce the standard deviation of the states with your filter. Use the same feedback controller for the comparison of balancing with and without the filter.

Part2b: Design a Kalman filter to clean up the measurements. Type "help kalman" and "help dkalman" in Matlab.


Part 3: Reconstructing Missing states: Redo Part 2 assuming you do not have velocity measurements.

Part 3a: Manually design a filter to provide velocity estimates. Explore numeric differentiation combined with low pass filtering.

Part 3b: Design a Kalman filter to clean up measurements and provide full state feedback.


Part 4: Extended Kalman Filtering. Apply the same noise levels in Part 2 to your walking controller from Assignment 2 (both sensor and process noise). Then design a filter to reduce the effect of the noise. You may also have to change your control algorithm to be robust to noise. The robot moves through quite different configurations (unlike standing balance). Will this be a problem? The robot changes contact state (1 or 2 feet on the ground)? How will you handle this?


What to turn in?

Generate a web page describing what you did. Include links to your source and compiled code in either .zip, .tar, or .tar.gz format. Be sure to list the names of all the members of your group, which should have no more than three members. Mail the URL of your web page to bstephens@cmu and cc cga@cs [You complete the address, we are trying to avoid spam.] The writeup is more important than the code. What did you do? Why did it work? What didn't work?


You can use any type of computer/OS/language you want. You can work in groups [N <= 3] or alone.


Movie!

It would be great if you could make a movie of your walker. Here are some suggestions as to how to do it.

camstudio A Windows program to record what is on your screen and save it as an .avi file. Suggested by Tom Goff tgoff at andrew


Questions

Q1: In your linearized dynamics code for part 1, are the angles (a1, a2, a3) measured w.r.t. the floor or are they joint angles?

A1: They are joint angles. a1 (ankle) is the angle between the calf and vertical. a2 (knee) is the angle between the thigh and the calf (straight is zero). a3 (hip) is the angle between the torso and the thigh (straight is zero).