Skip to content
Claire edited this page Apr 3, 2017 · 6 revisions

Welcome to the Balloons VALBAL wiki! Below is a collection of questions we had while going through the VALBAL code.

Avionics

What are the criteria for a vent/drop to be triggered?

  1. We ask for a force vent/drop via RockBLOCK (data.FORCE_VALVE).
  2. The respective incentive exceeds 1 + data.INCENTIVE_NOISE and the respective queue is almost empty. We perform that second check so that we don't continuously add 20 seconds to the queue while the system is still reacting to previous actions.

What is data.INCENTIVE_NOISE?

data.INCENTIVE_NOISE is the number of BMP sensors that the system no longer trusts. It is added to the default incentive threshold of 1.

Fewer sensors means greater error in VALBAL's knowledge of its altitude. The fewer the trustworthy sensors, the greater INCENTIVE_NOISE and the incentive thresholds will be, and the harder it is for an action (vent or drop) to be triggered.

What is manual mode and when is it used?

When VALBAL is in manual mode, it maintains normal operation except it skips over the actuation of the valve and ballast. This way, if VALBAL is acting oddly during a mission (like venting or ballasting a lot), we can enable manual mode, see what the controller is thinking without actually letting it act, and debug over RockBLOCK. In manual mode, it's ok for both the valve and ballast incentives to be >= 1 at the same time; in fact we want to see that to help our debugging.

Manual mode is on by default so that VALBAL doesn't attempt to vent or drop while we're setting it up for launch (and presumably jiggling it around quite a bit). We then switch into "control" mode via RockBLOCK command right before launch.

Controller

How is the incentive calculated?

The incentive is the sum of three terms (mimicking a PID-esque controller): 2. "Derivative" term = C1 * ascent rate

  1. "Proportional" term = C2 * (current altitude - setpoint)
  2. "Integral" term = C3 * (current altitude - altitude of last vent/drop)

What are RE_ARM_CONSTANT and the corrected altitude since last vent/drop?

(We'll walk through this for the valve first.) Say VALBAL's altitude is currently very close to the valve setpoint and we very recently vented. Thus our proportional and integral terms are essentially 0, and we're left with derivative control, which is inherently oscillatory. Not good! That's where altitudeSinceLastVentCorrected comes in. Instead of blindly using the altitude since last vent, we use the corrected term:

float altitudeSinceLastVentCorrected = min(altitudeSinceLastVent, altitude + RE_ARM_CONSTANT);

where

RE_ARM_CONSTANT = incentive threshold / (C2 + C3) 

Note that C2 and C3 are both less than 1, so RE_ARM_CONSTANT will end up being greater than 1. If we're descending after a very recent vent, altitude + RE_ARM_CONSTANT will be less than altitudeSinceLastVent

ok i'm very confused now so i will stop attempting to explain incorrectly

What is firstBallastDropped?

This is related to altitudeSinceLastDropCorrected... (something about we don't want to be ballasting during our entire ascent, so we only turn on altitudeSinceLastDropCorrected once we reach a threshold altitude) finish me

Power States

Why do we need to keep track of the power states for RockBLOCK, GPS, and heaters?

finish me

GPS

What is hot start?

err i do not know...helpp!

Clone this wiki locally