Module: simpleSolarPanel¶
Executive Summary¶
This module provides first-order modeling of power generation from an attitude and orbitally coupled solar panel. Specifically, it:
Evaluates the impact of shadowing using an assigned EclipseMsgPayload
Computes power generation using a cosine law based on the panel area, efficiency, and attitude
Allows for the panel body-fixed orientation
nHat_B, the panel area, and the panel efficiency to be set viasetPanelParameters().Writes out a PowerNodeUsageMsgPayload describing its power generation.
Power generation is computed according to SMAD:
\[W_{out} = W_{base} * C_{eclipse} * C_{panel} * (\hat{n}\cdot \hat{s}) A_{panel}\]where \(W_{base}\) is the base power (in \(\mbox{W}/\mbox{m}^2\)) at the spacecraft location from the sun, \(C_{eclipse}\) is the eclipse/penumbra mitigator on the sun’s power (1 corresponds to no shadow, 0 corresponds to eclipse), \(C_{panel}\) represents the panel’s efficiency at converting solar energy into electrical energy, \((\hat{n}\cdot \hat{s})\) represents the alignment between the panel’s normal vector and the spaceraft-sun unit vector, and \(A_{panel}\) represents the panel area in meters squared.
For more information on how to set up and use this module, see the simple power system example: scenarioPowerDemo
Module Assumptions and Limitations¶
This module only uses the input and output messages of the PowerNodeBase base class. Further, the module does not include any self-shadowing in the solar panel power generation evaluation.
Message Connection Descriptions¶
The following table lists additional module input messages beyond those specified in Module: powerNodeBase.
Msg Variable Name |
Msg Type |
Description |
|---|---|---|
sunInMsg |
Describes sun position |
|
stateInMsg |
Describes spacecraft position, attitude. |
|
sunEclipseInMsg |
(optional) Describes shadow factor due to planetary bodies. |
User Guide¶
This module inherits the user guide from the PowerNodeBase base class. Module specific instructions include:
must connect
sunInMsgandstateInMsginput messagesthe
sunEclipseInMsgmessage is optional. If provided the modules uses the eclipse shadow factor to adjust the power generation if needed.must specify the variables
panelArea,panelEfficiencyandnHat_B. These there parameters can also be set at the same time throughsetPanelParameters(nHat_B, panelArea, panelEfficiency)
For more information on how to set up and use this module, see the simple power system example: scenarioPowerDemo
-
class SimpleSolarPanel : public PowerNodeBase¶
- #include <simpleSolarPanel.h>
simple solar panel class
Public Functions
-
SimpleSolarPanel()¶
-
~SimpleSolarPanel()¶
-
bool customReadMessages()¶
-
void customReset(uint64_t CurrentClock)¶
custom solar panel reset function
-
void setPanelParameters(Eigen::Vector3d nHat_B, double panelArea, double panelEfficiency)¶
This method allows for solar panel parameters to be set.
- Parameters
nHat_B – The normal vector of the solar panel expressed in the spacecraft body frame.
panelArea – the spacecraft panel area in meters squared.
panelEfficiency – The efficiency of the solar panel in nondimensional units; typically ranges from 0.1 to 0.5.
- Returns
void
Public Members
-
ReadFunctor<SpicePlanetStateMsgPayload> sunInMsg¶
[-] sun data input message
-
ReadFunctor<SCStatesMsgPayload> stateInMsg¶
[-] spacecraft state input message
-
ReadFunctor<EclipseMsgPayload> sunEclipseInMsg¶
[-] Messun eclipse state input message
-
double panelArea¶
[m^2] Panel area in meters squared.
-
double panelEfficiency¶
[W/W] Panel efficiency in converting solar energy to electrical energy.
-
Eigen::Vector3d nHat_B¶
[-] Panel normal unit vector relative to the spacecraft body frame.
-
BSKLogger bskLogger¶
BSK Logging
Private Functions
-
void evaluatePowerModel(PowerNodeUsageMsgPayload *powerUsageMsg)¶
This method computes the power generated by the solar panel and stores it in a PowerNodeUsageMsgPayload. This is evaluated in two steps:
Compute the amount of power available at the spacecraft position using the SOLAR_FLUX_EARTH macro, distance factor, and eclipse shadow factor;
Compute how much of that power is captured and converted to power using the projectedArea and panelEfficiency attributes.
- Returns
void
-
void computeSunData()¶
This method computes the spacecraft-sun vector, the solar panel’s projected area, and the sunDistanceFactor based on the magnitude of the spacecraft sun vector.
- Returns
void
Private Members
-
double projectedArea¶
[m^2] Area of the panel projected along the sun vector.
-
double sunDistanceFactor¶
[-] Scale factor on the base solar power computed using the true s/c-sun distance.
-
SpicePlanetStateMsgPayload sunData¶
[-] Unused for now, but including it for future
-
SCStatesMsgPayload stateCurrent¶
[-] Current SSBI-relative state
-
double shadowFactor¶
[-] solar eclipse shadow factor from 0 (fully obscured) to 1 (fully visible)
-
SimpleSolarPanel()¶