Two ways of doing controls. The electrical engineering kind of way and the artificial intelligence kind of way. I like to search, and I'll go with the artificial intelligence approach anyday.
Here are the links to the last three Kinematics Dynamics & Control Homeworks:
3.)Modeling a Robotic Finger via Uniform Grid Search
2.)Optimizing the Control of a Two-Link Pendulum
1.)Controlling a Robotic Pendulum via Dijskstra-Like Backward Value Iteration