CS378
Introduction to Cyber-physical Systems
Assignment
1
Due:
Jan 29, 2013
In the current version of inverted
pendulum simulator, the controller makes decisions based only on the state
of the pole (i.e., the angle of inclination). The rules of the controller are:
if the pole falls towards the left, a force will be applied to pull the cart to
the left; if the pole falls towards the right, a force will be applied to pull
the cart to the right. The pulling
force varies with the angle; if the angle is large, the force will be large; if
the angle is small, the force will be small.
In the simulation, you will find that there is a problem
with this controller. The pole will eventually fall over or hit the boundary.
If we look at the simulation carefully, we will find that the controller will
not apply any force if the pole is in the upright position, even if the angular
speed of the pole is high. So, for better control, not only the position (i.e.,
the angle) of the pole is important, but also the first derivative of the
pole¡¯s state (i.e. the angular speed) is an important factor.
In this assignment, you are asked to modify the controller
so that it also takes the first derivative of the pole¡¯s state into account.
Run the simulation after your modification to see how much improvement you get.
You are free to modify the parameters in the current control algorithm as well.
Hint: The controller already provides four sampling data
types from the sensor now. The
first derivative of the pole¡¯s angle is one of them. Make use of it in the
feedback.