Simulator
For our IT project, we created a simulation of the descent of the G(A)SP payload. It models the conditions that the real weather balloon will be subject to, such as different speeds and directions of wind, as it steers as close as it can to the desired location. It was written in Python and uses PyGame, however also uses self-constructed physics, GUI and simulation files. This ensures accuracy in our program, for example in that the descent changes according to not only the weight and surface area of the object, but also to the air density at different altitudes.
It is a model of a feedback system in the physical world, as the real thing will take input from sensors, receive it through serial and send into the user interface, to then calculate the output and send it back to actuators (the servo that controls the rudder) altering the next input. The calculation we used to find the output, is called PID – Proportional-Integral-Derivative control. This algorithm tells us a sensible rate at which to alter the rudder, so that we don’t overshoot where we want to go and have a stable, controlled landing.
This project gave us the opportunity to write the code for our real project before we’d even started making the hardware. It gave us an idea of the data and how we would use it to best steer the rudder effectively. We also now have an indicator of the limitations and effectiveness of our steering, such as what levels of wind it will be impossible to steer to certain locations in. For instance, it would be almost impossible to steer in a hurricane. As we were able to speed up the simulation, it gave us an idea of how long the descent will take and where the balloon would travel.
All of this knowledge is useful in the optimisation for the real launch, helping us to decide when it would be best to release the parachute so that we know it will have enough time to steer to a preferable landing location, giving us insight into the speed the payload will reach and how best to tune the PID algorithm.
If we had not tested our simulation before the real thing, errors that otherwise would have been overlooked may have resulted in a fail launch. That is why this simulation has been invaluable to our overall project.