16-299: Assignment 5



The assignment focuses on modeling and control of the isolated motor-wheel system. Put your robot upside down on your desk.

Make sure your battery is fully charged. Connect the USB cable between the Nano Every and your computer. More information on how to use the Arduino, some test programs, how to collect data, how to model the data, and how to control the robot is on our Elegoo web page.




Part 1

Make a state space model of the motor-wheel system, using any technique you like.

Units: Let's use radians for wheel angle. The command has no known units, so we should just use it as is.

Examples of frequency domain and direct regression model-making are here.


Part 2

Part 2: Design and implement a feedback-only PD controller to move each wheel 180 degrees (1/2 revolution). Where does the velocity signal come from? How quickly can you complete the movement? The end of the movement is when the wheel remains within 5 encoder counts of the target. Test your controller using the example programs described on this page.




Part 3

Design and implement a feedback only state space controller for the motor-wheel system based on your estimated model. Does the state space controller match the feedback controller you designed by hand?

How quickly can you complete a 180 degree movement? Note that as long as the command is saturated what feedback controller is in use won't matter. The controller only matters for slowing down the movement after the initial command saturation is over.

Is the state space controller "better" than a manually designed feedback controller? When would the difference be greater?

With the model I created, an LQR controller introduces too much damping. Why might this be the case, aside from my model is bad?



Part 4

Does adding an observer to your state space controller such as a Kalman Filter to filter noise and estimate missing states help? A Kalman Filter should introduce less delay that a simple low pass filter, since it uses a model of the process dynamics to predict future states such as velocity. Here are the results from my implementation, where the Kalman Filter has less delay, except towards the end of the movement. Any ideas why that might be happening?

How quickly can you complete a 180 degree movement now? Can you attain higher velocity gains, and thus higher position gains? Note that as long as the command is saturated what feedback controller or observer is in use won't matter. The observer only matters for slowing down the movement after the initial command saturation is over.



Part 5

Add a feedforward command. Does this improve performance, in terms of how quickly can you complete a 180 degree movement? Note that as long as the command is saturated feedforward commands won't make any difference. However, a bang-bang trajectory, where negative command saturation slows down the movement, is likely to be the way to make the fastest movement to a goal. The figure below shows that fast movements driven by a feedback controller begin with a saturated command, and going faster makes the negative part of the command almost saturated as well. In this example the velocity gain was limited by instability, so I couldn't make the negative pulse saturated with only feedback control.



Bonus Part A

Can you write a program to learn a feedforward command that makes the shortest possible movement?


Bonus Part B

Can you design a nonlinear control law that generates a time optimal bang or bang-bang trajectory from any state to a goal angle.


Bonus Part C

Can you "cancel" friction so the wheel turns freely? Note that you can try to separately compensate static and dynamic friction, or friction components due to the velocity, friction components that are just due to the direction of movement, and friction observed when the wheel is not moving.

Can you "power-assist" the wheel so that when you try to manually turn it, it "pushes" you to turn even more? The wheel should not spin when you let go.