next up previous contents
Next: PID Controller Simulator Up: Three-link Robot Manipulator Previous: Simulation

Benchmarking

One important decision that had to be made was: do we need to implement some or all of the controller module in hardware? And if so which modules, or even parts of the modules, should be hardwired? To answer these questions we chose approximate figures for the required speed to achieve a certain performance, the available machines for the controller, the available hardware that can be used to build such modules, and a time chart for each module in the system to determine the bottlenecks. This also involved calculating the number of operations in each module giving a rough estimate of the time taken by each module.

The simulator described in Section 4.4 was used to generate time charts for each module, and to compare the execution time on different machines. The machines used in this benchmarking effort include: SUN SPARCStation-2, Sun SPARCStation-10 model 30, Sun SPARCStation-10 model 41, and HP-700. Table 2 shows the configurations of the machines used in this benchmark, with the type, clock cycle rate, the MIPS and MFLOPS for each.

  table409
Table 2: Configuration of the machines used in the benchmark.  

To generate time charts for the execution time of each module, a program called gprof was used. This program produces an execution profile of C, Pascal, or Fortran77 programs. It gives the execution time for each routine in the program, and the accumulated time for all the routines. Then xgraph was used to draw charts showing these time profiles. The simulation program was executed with an update frequency of 1000 Hz for 10 seconds, which means that each routine was called 10,000 times. From this output, it was obvious that the bottleneck was the dynamics routine and usually it took between 25% to 50% of the total execution time on the different machines.

From these results we found that the HP-700 was the fastest of all, followed by the SPARC-10 machines. After the simplification using Mathematica, the execution time increased because the results contained many different trigonometric functions, and it seemed that these machines do not use lookup tables for such functions. So, all nonbasic trigonometric functions were replaced by basic trigonometric functions. For example, tex2html_wrap_inline2793 was formulated as tex2html_wrap_inline2795 . Using this conversion, the performance improved significantly. Figure 20 shows a speed comparison between the machines. The graph represents the speed of each machine in terms of iterations per second. The machines are SPARC-2, SPARC-10-30, SPARC-10-41, and HP-730, respectively. For each machine, the first column is the speed before any simplification, the second column is the speed after using Mathematica (notice the performance degradation here), and the third column after simplifying the trigonometric functions.

  figure419
Figure 20: Performance comparison for different platforms.  

These benchmarks helped us decide that a software solution on a machine like the Sun SPARC-10 would be enough for our models, and there was no need for a special hardware solutions. However, for a greater number of links, the decision might be different.


next up previous contents
Next: PID Controller Simulator Up: Three-link Robot Manipulator Previous: Simulation

Matanya Elchanani
Wed Dec 18 17:00:21 EST 1996