Control System Design
Control System Design
http://www.csd.newcastle.edu.au//simulations/ball_sim1...
System Model
The modelling of the ball and plate system comes straight from simple Newtonian physics. The equation for acceleration of the ball down the plate is given by
This simplistic model ignores the forces on the ball due to the motion of the plate, but we will see later that there are stronger influences on the system than this modelling error. The measurement of the ball position is made by a camera directly above the plate. The camera will thus project the ball's position onto a two-dimensional plane, meaning that the observed position of the ball is given by
Since is small (we will only be tilting the plate by a small amount), and assuming that g = 9.8, the transfer function can be linearised to
remembering that and for small . We immediately recognise the double integrator as a possible source of difficulty for control. A simple lead compensator was selected for the ball position control. The angle of the plate is controlled by a motor connected to an arm which is connected to the plate (as shown in the diagram above). This arrangement is such that the plate angle moves at half the rate of the angular movement of the motor. The motor is controlled via pulse width modulation, allowing integer speed commands in the range -127 to 127 to be given to the motor. The motor's maximum speed is 30 rpm. The major obstacle to control is the several sources of non-linearity in the motor. Firstly, there is the obvious speed limit in the motor (which is an actuator saturation). Secondly, the motors appear to have a dead zone, which means that the motor speed must be larger than 20 before the motor will move. Finally, there is a reasonable amount of backlash in the gears of the motor. (Read this page for an explanation of backlash and the effect it has.) There is also a physical limit on the angle that the plate can tilt, but this is not really a problem, since the control system will be designed so as to not approach this limit. Assuming that the motor has no dynamics (i.e. the output angle is the integral of the input speed), the resulting model of the angle control mechanism (including a proportional controller with gain 2000) is
1 de 3
30/05/12 12:05
http://www.csd.newcastle.edu.au//simulations/ball_sim1...
Overcoming the dead-zone is simple (and is described in chapter 15): simply add 20 to the motor speed if it is positive, or subtract 20 if the desired speed is negative. Overcoming the backlash is somewhat more difficult. We closely monitor the desired motor speed, and if it changes direction, we drive the motor at maximum speed for a small period of time to overcome the backlash. The applet below will show that this compensation is not very effective. If the motor was able to rotate faster, then the backlash could be overcome more quickly. As it stands, the motors cannot move fast enough to allow any significant compensation. The fact that the backlash is after the integrator is what makes the backlash so difficult to overcome. If the backlash were before the integrator, we could easily compensate for it by estimating the position of the output in the deadzone, and driving the input to overcome the dead zone, as described in the previous discussion of backlash. The backlash occurs after the integrator because the backlash affects the position of the motor output, not its speed. The block diagram below shows the system if the backlash were before the integrator.
2 de 3
30/05/12 12:05
http://www.csd.newcastle.edu.au//simulations/ball_sim1...
Things to try Disable backlash and noise Enable backlash in the model (after the integrator, with zero noise) Enable the backlash compensation (after the integrator) Swap the backlash position to before the integrator (leaving compensation enabled) Design a faster position controller (with zero noise and no backlash)
Things to notice Watch the response of the idealised system Watch the ball position and see the osicllation introduced. Also notice the effect on the plate angle Notice that the magnitude of the oscillations has reduced slightly Notice that the controller can completely compensate for the backlash The range of angles used by the controller is greater, and the plate angle may even go into saturation.
Compare the simulated results to the results The real results have an oscillation in the from the real ball and plate apparatus, motor speed, which has yet to be explained. found here. The system's response is not too good, but the ball manages to stay on the plate (which is 0.4m wide in the simulation). This was the main objective of the project, but the presence of backlash severely inhibits the system's performance, meaning that the control is not as good as was desired.
3 de 3
30/05/12 12:05