scenarioPowerDemo

Overview

This is an illustration of how to use simplePower modules to perform orbit power analysis considering attitude and orbital coupling.

This scenario is intended to provide both an overview and a concrete demonstration of the features and interface of the power group of modules, which represent Basilisk’s low-fidelity power system modeling functionality. Specifically, simplePower modules are intended to provide three major features:

  1. Computation of power generated by solar panels, which considers orbit and attitude dependence;

  2. Computation of power consumed by on-board spacecraft power sinks;

  3. Computation of the spacecraft power balance and total stored energy by the simpleBattery class.

The script is found in the folder basilisk/examples and executed by using:

python3 scenarioPowerDemo.py

The simplePower subsystem consists of two kinds of Basilisk simModules: Module: powerStorageBase (which is used to represent power storage units, and serves as the heart of the subsystem) and Module: powerNodeBase (which is used to represent system components that consume or generate power). A conceptual diagram of these classes and their interfaces to eachother and the rest of Basilisk is shown in the figure below.

../_images/simplePowerConcept.svg

In general, this system can be configured using the following process:

  1. Create and configure a set of powerNodeBase modules to represent power system sources and sinks, including their nodePowerOutMsg attributes;

  2. Create and configure a Module: powerStorageBase instance;

  3. Use the addPowerNodeToModel() method from the Module: powerStorageBase on the nodePowerOutMsg you configured in step 1 to link the power nodes to the Module: powerStorageBase instance

  4. Run the simulation.

One version of this process is demonstrated here. A spacecraft representing a tumbling 6U cubesat is placed in a LEO orbit, using methods that are described in other scenarios. Three simplePower modules are created: a Module: simpleBattery, a Module: simpleSolarPanel, and a Module: simplePowerSink (which represents the load demanded by on-board electronics.) The solar panel is assumed to be body-fixed, and given the parameters appropriate for a 6U cubesat.

When the simulation completes, the following single plot is shown to demonstrate the panel’s attitude and orbit dependence, the net power generated, the stored power, and the power consumed. An initial rise in net power from the panel facing towards the sun is cut short as the spacecraft enters eclipse; as it exits, the stored charge of the battery begins to rebuild.

../_images/scenario_powerDemo.svg
scenarioPowerDemo.run(show_plots)[source]

The scenarios can be run with the followings setups parameters:

Parameters:

show_plots (bool) – Determines if the script should display plots