(double-click on orange itens for definition)

 

                                    BALL & PLATE APPARATUS (CE 151)

1. SUMMARY

    This text is based on HUMUSOFT user's manual for CE 151 - BALL & PLATE APPARATUS including several passages from that. The aim of this page is to present to student only the basic information concerning about the model. Further information can be found on the manual by itself and control theory textbooks.

   Ball position is measured by a vision system consisting from CCD camera. This camera has resolution 256x256 pixel.The signal is brought by a coaxial cable linked to computer throught FG201 frame Grabber PC add on card which is standard PC ISA card whose entrance is PAL video signal. This card allows resolution 256x256 or 512x512 pixel and has 256 steps of grey. In computer there is another card (MF614) that helps the model do not have problems with obstruction and excessive declination ( figure 1). 

figure 1- Block Diagrams and Cabling

                                 

    'The system consists of a plate pivoted at its centre such that the slope of the plate can be manipulated in two perpendicular directions. A servo system consisting of motors is used for tilting the plate. Intelligent vision system is used for measurement of the ball position. The basic control task is to control the position of a ball freely rolling on a plate. This system is a dynamic system with two inputs and two outputs. Both coordinates can be controlled independently as their mutual interactions are negligible due to low velocity and acceleration rate of the ball movemet. The system is naturally sampled as both actuators and sensor are of a digital, discrete time nature. The system is designed to be controlled by digital controllers.(figure 2)'                       

figure 2- Schematic Diagram of the Ball & Apparatus

  

 

2. MODELING   

 

 

    Now it is presented one mathematical model not considering all of the dynamical properties of the device attempting to simplify the derivation of the model. The modelling is separated in two parts. The first one is related to the servo system of plate inclination and the second one comes from the ball frelly rolling on the plate. There is no feedback from the ball position to the plate angle. The torque generated by the ball, when close to the border of the plate, is much smaller than the stepping motor holding torque. Thus the stepping motors including the driver electronics are analyzed separetely from the rest of the system. 

 

2.2 Plate and Ball Dynamics

 

    The general form of the Euler- Lagrange equation is 

    

              

 

    The system has four degrees of freedom, two in the ball motion in the plane and two in the plate

inclination. As generalized coodinates x and y position of the ball associated to the plate and plate inclination angles and are chosen. Let us assume that the plate inclination is driven by generalized torques and acting on the plate in corresponding direction. To summarize generalized coordinates 

are the following variables

                        

Following assumptions are made:

- ball-plate  contact is not lost under any circunstance

- no sliding of the ball on the plate is allowed

- all friction forces and torques are neglected

- plate angles and area limitations are not considered

 

Kinetic energy of the ball is given by rotational energy relative to the center of the rolling ball plus translational energy of the center of the ball.

 

                  

 

Kinetic energy of the plate, including the ball placed in the position (x,y), rotating around its center is done by the following equation.

                   

                   

The term    can be expressed as 

                  

    

The kinectic energy of the plate including the ball represented by mass point is then 

 

                  

 

Total kinectic energy of the system is 

 

                   

 

 Potential energy of the ball is relative to the horizontal plane in the center of the inclined plate. 

 

 

 

 Generalized force is given by the torque generated by the servo including the transmission system

                                              

 

                   

                                    

 

Parameter d is a distance between the pivot and the plate, where the servosystem acts on the plate.

After de derivation needed for getting the particular form of the set of Euler-Lagrange equations, following set of nonlinear differential equations is obtained.

 

 

Equations (3.9) and (3.10) describe the ball motion on the plate , they say the acceleration of the ball movement depends on the angles and angular velocity of the plate inclination. Equations (3.11) and (3.12) tell how is the plate inclination dynamics influenced by the external driving force and the position and speed of the ball. 

 

 

The interpretation ofthe particular terms in the equations (3.9) and (3.11) is:

 

 

 

The set of nonlinear differential equations (3.9) to (3.12) can be easily converted into nonlinear state model. This model is rather complex and it is difficult to use such model for analysis and design of a controller.

 

2.3 Model Simplification

 

    In fact not the forces and but directly the angles and are system inputs. This is due to the fact that the frequency of a stepper is below the acceleration limit. No steps can be lost and magnitude of load moment cannot affect the motor position. This assumption results in omitting the equations (3.11) and (3.12) .

 

 

    The ratio between the nonlinear term representing centrifugal force and gratitational force acting in the corresponding direction depends on the maximum angular velocity rate in the plate inclination. In our CE151 model, the angular velocity might be assumed constant with the magnitude depending on the stepping motor driving frequency. As the ratio is roughly 1:25, for 400 Hz stepping motor frequency normally used, the centrifugal forces might be neglected.

 

    In the steady state the plate should be in the horizontal position, where both angles are equal to zero. If one assumes that the angle  do not change much, 5, the sine function can be replaced by its argument . The same result follows of course from the exact linearization of the differential equationsa around the steady state.

 

    Ball inertia can be computed as 

 

 

    For the rest of our analysis we assume the following model

 

                                            

2.4 Servo System

figure 3- Servosystem principal scheme 

 

figure 4-Corresponding Blok-Diagram 

 

    The block diagram above shows the nonlinear dynamics of a servo system used for plate inclination. Stepping motor is represented by an ideal integrator which turns in constant speed. The speed depends on the frequency of pulses supplied by a stepping motor control card. The frequency is programmable and the user can change it when loading the stepping motor card driver.

    Software driver for the stepping motor control card and electronics of the card itself exhibit an additional nonlinear dynamical behavior. First the value sent to hte card from the MATLAB enviroment is limited to 1. Then the value is written to the buffer and the content of the buffer cannot be overwritten till the card generates the number of pulses proportional to the value recorded in the buffer. This changes the shape of the input signal when the input signal of the servosystem changes faster than is the nominal speed of the stepping motor. Then the motor is not able to follow the input and a delay will appear. Moreover when the input signal changes before the value recorded in the buffer is reached, the function of the servosystem deteriorate.

    It is prohibited to excite the above mentioned nonlinear behavior as then the linearization of the servosystem dynamics cannot be done and standar methods for controller design cannot be used. The solution is to filter an input signal in order the servosystem to be able to follw a filtered signal. The simplest filter, derived directly from the known nominal speed of the stepping motor, is a "rate limiter" with the following function in discrete time.

figure 5- Block diagram of a nonlinear servosystem dynamics

 

If the rate threshold R is equal or lower then the nominal spped of the servo, the servo is able to copy the signal U and the content of the motor control card buffer is continuously updated (figure 4).  

We will see that there is still one important nonlinearity that will influence difference between linear model and real system under control. This is the limitation of an input signal to the Ball & Plate system. The software driver enabling the user to have a direct access to the system from MATLAB is able to process numerical values within the range of <-1,1>, while the values outside the interval are limited to 1. The limit values have been designed in such a way that theycorrespond to the limit slopes of the plate. The saturation has its counterpart in many industrial system where the actuator cannot operate above some limits. 

 

2.5 Position Sensor    

    Ball psistion is measured by a vision system consisting from CCD camera anf FG 201 Frame Grabber PC add-on card. The vision system including the software driver is fast enought to allow us to neglect the dynamics of such an intelligent sensor. The time period for updating the ball position measurement is set to 40 ms. This refreshing rate cannot be changed as it depends on the function of the frame grabber electronics. Thus the sampling period of resuslts in steps in the measurement. The remaining parameter describing the sensor is the transformation constant converting position in meters to positions in Machine Units (MU) of MATLAB software enviroment. 

figure 6- CCD Camera

2.6 Complete system dynamics

             

figure 7- Block Diagram of a complete system dynamics in one coordinate

 

 

2.7 PID Demonstration Program

    The PID demonstration program is intended for the basic experiments only and for quick start with using the model. For advanced experiments the student are supposed to use MATLAB software.

2.7.1 Running the program

    In Windows you can run the demonstration program by double-clicking the- CE151 Ball & Plate Demo

After running the program you'll see main control panel window.

figure 8 - Main control panel window

 

    At main control panel you can see the plate area on the left, graphic representation of three potentiometers on the right, and buttons labeles Start, Plot, Reset PID and Exit at the down right side of the screen. In the plate area there is a filled circle representing the actual position of the ball and an empty red circle showing the setpoint. 

    By clicking the Start button you start the control process, this button label changes to Stop so you can  stop the experiment. You can change the setpoint by pointing the mouse cursor to the plate area and clicking the mouse at the position of the new setpoint. The cursos changes its shape to indicate the setpoint setting is active. The red circle changes its position and controller immediately accepsts the new value of setpoint. You can also change the PID coefficients by dragging the button to change the mantissa. The Reset button reverts the original coefficients of the PID controller . Clicking the Exit button terminates the program.

   By clicking the Plot button you open a new screen to see history plots. Similarly to the main control panel, the red lines represent the setpoints and the green lines represent the actual position. The liones shows the history at the moment of opening the history window, they do not change to reflect the new values. By clicking the Back button you'll go back to main control panel.