Presentation is loading. Please wait.

Presentation is loading. Please wait.

Understand the football simulation source code. Understand the football simulation source code. Learn all the technical specifications of the system components.

Similar presentations


Presentation on theme: "Understand the football simulation source code. Understand the football simulation source code. Learn all the technical specifications of the system components."— Presentation transcript:

1

2 Understand the football simulation source code. Understand the football simulation source code. Learn all the technical specifications of the system components. Learn all the technical specifications of the system components. Study the control loops in the controller. Study the control loops in the controller. Learn all the C library of the controller from ACSLIB guide. Learn all the C library of the controller from ACSLIB guide. Create a motion path which will reach a specified state in specified time. Create a motion path which will reach a specified state in specified time. The profile will be created according to a vector which includes: The profile will be created according to a vector which includes: After the user inserts these values, the football player should After the user inserts these values, the football player should reach to: reach to: Create a graphic user interface in order to view the real time results on a graph. Create a graphic user interface in order to view the real time results on a graph.

3 The time for to football player to reach to the cross point with the ball on both axes The horizontal position,the player should reach in delta time. The horizontal velocity, the player should reach in delta time The circular position, the player should reach in delta time The circular velocity, the player should reach in delta time

4

5

6 The software simulation is a flexible system, which serves as the lab for the development of the agent. It is an idealized copy of the real foosball table. It simulates the physical behavior of the foosball: The software simulation is a flexible system, which serves as the lab for the development of the agent. It is an idealized copy of the real foosball table. It simulates the physical behavior of the foosball: The motion of the ball and the players. The motion of the ball and the players. The collisions between the ball and the players or the table borders. The collisions between the ball and the players or the table borders. Counts the goals. Counts the goals.

7 The SB line of controllers supports the following modes of motion:. Linear point to point Mode 0. Linear point to point, repetitive Mode 1. Move by sequence Mode 3. Circular interpolation Mode 4. Multiple velocities - point to point Mode 8. Search for contact Mode 9 Constant Velocity (jogging). Mode 10. Master-Slave Mode 12. Continuous path following Mode 15. Arbitrary path generation and cam Mode 16. Manual control by Joystick Mode 21. Position tracking Mode 22

8 Delay checking with MFC Timer With MFC timer we could perform a sampling on the motor encoder in a very accurate time. We used this feature in order to measure the time delay from the moment we called the controller to start the motion until the moment the motors actually began to move. We set a timer in the code before calling the function to move the motor and we started sampling the encoder every 5ms. We couldn ’ t get more accurate checking with this method, because the minimum time between each sample can ’ t be lower then 5 ms. This fact we discovered by our self, by few experiments. So we did a linear interpolation between the points in order to get the delay time.

9 Delay checking with ACS Tools Using ACSPL you can create a data collection of the motor motion, the data collection does as we did above it sample the encoder every specified time, but using data collection feature you can get sampling every 1 ms, so implement a data collection code within our program, and the results showed the 2 ms was correct, and we also discovered there is a 2.5ms delay between the sampling time until the computer gets the sampling results.

10 For better view of the project results, we created a graph output program that gives in real time the graph of the football player motion. For better view of the project results, we created a graph output program that gives in real time the graph of the football player motion. The main window is divided to 3 parts: Menu Bar Menu Bar The menu bar contains all the functions that we The menu bar contains all the functions that we need to control the player from the pc. need to control the player from the pc.

11 Graph window Graph window here you can see the graph of the motion built on real time, There are two graphs, the first one is describing the motion that the motor should have done, and the second one, describes the real motion. here you can see the graph of the motion built on real time, There are two graphs, the first one is describing the motion that the motor should have done, and the second one, describes the real motion.

12 Side bar Side bar the side bar shows all the samples any 10 millisecond, the side bar shows all the samples any 10 millisecond, it was made to help for the debug and for more details of it was made to help for the debug and for more details of the motion profile. the motion profile.

13 The path is defined by an array of up to 32 mixed straight line segments The motion starts at the present position, accelerates to the specified vector velocity, keeps that velocity until the last segment, and then decelerates toward the end point of the path. This motion gave us the best solution for creating our motion profile,this motion is very flexible and can serve many type ’ s of motion.

14 We decided to set 3 points in a linear line, the middle point is specified point which the motor had to go through in specified time, while the other two points on the sides, helps us to gain control on the velocity. The motor will achieve in the middle point. This idea was based on the assumption that the ACS interpolation was good enough And will make the motor to move through these points accurately.

15 The idea of the numerical interpolation came to, after having problems to achieve good results using the ACS interpolation. We used the popular Divided Distances Interpolation. This interpolation creates a polynomial function of forth levels: The inputs we used were: f(0) = 0 the starting point position. F ’ (0) = 0 the starting point Velocity. F ” (0) = 0 the starting point acceleration. f(delta_t)) = X the specified position point in the specified time. F ’ (delta_t)) = V the specified velocity point in the specified time.

16

17

18 In order to achieve more accurate velocity in specified time, we used the technique of the 3 points, combined with our interpolation. Whit the combination of both techniques, we achieved good results in position and velocity. The results were showed errors around 300 to 0 counts in the position, and around 10 counts/msec in the velocity. Those results were taken in hard paths as the tests before.

19 We have fully implemented the project goals, and also added some additional features. Created a motion profile for the football player Overcome of the delay of the controller. Succeed to get reasonable results on both axes. Gained knowledge of working with Real-Time systems. Provided an easy class to control the motors in future development Created a graph viewer in order to see the last path of the motor. Gui designed especially to be attractive,intuitive and easy to use.

20 There are few enhancements that can be done in the future and they are: 1)Improve the interpolation by considering the acceleration limits and the response to steps. 2)Replace the controller with a new one, for two reasons: a. The existing controller can handle up to two player ’ s rows. b. The controller can ’ t change movements on the fly.

21


Download ppt "Understand the football simulation source code. Understand the football simulation source code. Learn all the technical specifications of the system components."

Similar presentations


Ads by Google