Skip to content

erikscheurer/BoschStudentCompetition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maths Meets Industry Student Competition 2022

The student competition was part of the "Maths meets Industry" workshop that took place in October 2022 at the University of Stuttgart and was organized by the Cluster of Excellence "Data-Integrated Simulation Science (SimTech)" and Robert Bosch GmbH. See the problem statement for more details.

Team: David Gekeler, Erik Scheurer and Julius Herb

Requirements

  • NumPy
  • SciPy
  • Matplotlib

Overview

  • solution.py: Contains our basketball throw simulation, along with the hit rate estimation using a Monte Carlo simulation

  • test.py: Contains a comparison of the different ball throw solutions with and without air resistance

  • optimization.py: Contains the code for the grid search we used to find the optimum, along with another optimization method from the noisyopt package, which we did not end up using.

  • presentation.pdf: Contains further information about the problem statement, physical modeling, numerical solution, the considered uncertainties and the optimization of the ball throw parameters.

Problem Statement and Idea

We consider a robot with arm length $h$ that throws a ball at the angle $\alpha$ with a velocity $v$:

The idea is now, that the ball has a certain radius and is assumed to be a perfect circle. We can then calculate the intersection of the ball with the ring and the backboard by just tracking the center of the ball. Intersection happens by adding a "buffer" of the radius of the ball and bouncing the center of the ball of this buffer.

According to the specifications, the ball is modeled as a rigid body without considering angular momentum. In addition, the collisions are assumed to be perfectly elastic and the ideal law of reflection is applied. We also incorporate air resistance based on the drag equation for a more accurate model.

Multiprocessing is available to parallelise the computation of the average hit rate and can be enabled manually. Please note that the support of multiprocessing depends on the available software and hardware setup.

Usage

At the bottom of solution.py, some examples are given. You can also import the korbwurf function, which was specified in the problem statement.

simulate_throw is the core of the simulation that also enables plotting.

hit_rate computes the average hit rate for given parameters.

The examples at the bottom of the file are also used to create the following plots.

Results

We obtained the following optimal parameters:

Parameter Value
$h$ $2m$
$v$ $7.37 \frac{m}{s}$
$\alpha$ $60.68°$
Hit Rate $0.47$

The following plot shows one throw with the optimal parameters:

Including uncertainties, we see different colors for each segment of the throw. Green means, the ball goes in the hoop, blue means, it bounces of the ring or the backboard. Magenta means, the ball is out of bounds.

Optimization

The following plot shows the optimization landscape:

The convergence of the hit rate in the Monte Carlo simulation can be seen in the following plot:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages