Class in Zendir.Classes | Inherits from PowerNodeModel

Declaration

class ComputerPowerModel;

Description

Creates a power model for a Computer, which will draw power from the electrical circuit based on the operational state of the Computer.

A real computer is a Constant Power Load (CPL): its switched-mode PSU adjusts its effective input impedance so the computer draws approximately the same power regardless of the input voltage (R_effective = V² / P, a negative incremental resistance). SPICE however solves linear resistors, so this model uses a quasi-static iteration: each tick the resistance is recomputed from the previous tick’s solved voltage so the linear SPICE resistor converges on the true CPL operating point across successive time-steps.

Sequence per tick in the bus-connected path:

  1. PowerBus.UpdateComponents calls UpdatePowerModelState → this model’s UpdatePowerModel. On entry VoltageNode / VoltageIn / CurrentIn hold the PREVIOUS tick’s SPICE solution (zero on the very first tick).
  2. UpdateComputerModel caches VoltageNode into LastSolvedVoltage and computes R = LastSolvedVoltage² / P_state (seeded from NominalOperationalVoltage on the first tick). SPICE uses this R for the current tick’s solve.
  3. PowerBus.ExportData writes the new VoltageIn/VoltageOut/CurrentIn/ CurrentOut/VoltageNode onto this node.
  4. OnUpdate fires UpdateComputerModel again; the now-fresh VoltageNode and absorbed branch power are compared to the user thresholds to decide shutdown.

In SelfSolve mode (no PowerBus), VoltageNode is a simple mock (CurrentIn × Resistance) rather than a real solve, so the quasi-static feedback and the CPL voltage/power thresholds are intentionally disabled: the model falls back to a basic “power is flowing” check using NetPower.


Properties

DeclaredDescription
ComputerLoadA scalar value representing the load on the computer. Used when the computer is not Shutdown or Shutting down.
LastSolvedVoltageThe last SPICE-solved acrossthis computer. This is fed back into the next tick’s resistancecalculation so the model converges toward true constant-power behavior(R = V_solved² / P_state) despite the underlying SPICE resistor beinglinear. Zero means no valid solve has been captured yet and the nextresistance calculation will seed from .
MinOperationalVoltageRatioMinimum fraction of required onthe node for the computer to remain powered. Flight-rated logic andregulators often stay within ~10% of nominal before brownout or reset;0.9 is a typical default (e.g. 5 V rail must stay above ~4.5 V).
MinPowerRatioMinimum fraction of the expected (state-based) CPL power that must appear asabsorbed electrical power in the SPICE branch:
ModelShutdownA Bool to track if the model shutdown the computer.
NominalOperationalVoltageThe nominal DC voltage at this computer’s power node (the CPL reference).Survey CubeSat electrical power systems typically distribute regulated3.3 V and 5 V to avionics; 12 V or 28 V buses are also used forhigher-power paths before local regulation. The default 5 V matches acommon OBC input rail; set to your EPS tap (e.g. 12 V unregulated bus) ifthe model is connected upstream of a converter.Used to seed resistance on the first tick and as the reference for thevoltage shutdown threshold.
PowerThe Power Consumption of the Computer based on its current state.
PowerEnteringSafeModeThe Power Consumption of the Computer when EnteringSafeMode, scaled by ComputerLoad.
PowerExitingSafeModeThe Power Consumption of the Computer when ExitingSafeMode, scaled by ComputerLoad.
PowerRunningThe Power Consumption of the Computer when Running, scaled by ComputerLoad.Default ~3 W is representative of a CubeSat/small-sat on-board computer (OBC) under normal flight software load:published OBC figures are often roughly 0.3–5 W depending on architecture (e.g. low-power MCU vs FPGA SoC).
PowerSafeThe Power Consumption of the Computer when in Safe Mode, scaled by ComputerLoad.Default ~1 W is typical for a rad-tolerant MCU or minimal OBC safe/idle profile on a small satellite.
PowerShutdownThe Power Consumption of the Computer when Shutdown.
PowerShuttingDownThe Power Consumption of the Computer when ShuttingDown.
PowerStartingThe Power Consumption of the Computer when Starting (boot), scaled by ComputerLoad.Slightly above to reflect higher draw during storage/IO and bring-up.
InheritedDescription
CurrentInThe current flowing into this node at the In terminal.Under flow-through convention, positive means current enters at In and exits at Out.Equal to CurrentOut in steady state for two-terminal elements.
CurrentOutThe current flowing out of this node at the Out terminal.Under flow-through convention, positive means current exits at Out (entered at In).Equal to CurrentIn in steady state for two-terminal elements.
IsEnabledIs true if the object is currently enabled.
IsOpenCircuitA flag if the power node is currently open and no power willbe transferred to the next component.
NameThe display name or tag of this object.
NetPowerNet power this node contributes to the bus, calculated directly from thevoltages and currents at the In and Out terminals:NetPower = VoltageOut * CurrentOut - VoltageIn * CurrentInThis is the power delivered to the external circuit by this node (the negativeof the power absorbed by it). Under the flow-through convention, positiveCurrentIn represents current entering at the In terminal and positiveCurrentOut represents current exiting at the Out terminal.A positive NetPower means the node is adding power to the bus (e.g. a solarpanel producing power, a discharging battery). A negative NetPower means thenode is consuming power from the bus (e.g. a power sink, a charging battery,resistive losses in a fuse/switch/component).For a two-terminal element CurrentIn == CurrentOut, so this reduces to(VoltageOut - VoltageIn) * I. When one terminal is connected to ground andthe bus has ZeroGroundPlane enabled, that terminal’s voltage and current areboth zero, so the formula still represents the true energy exchange at thenon-grounded terminal (e.g. V_out * I_out for a ground-referenced source orbattery, -V_in * I_in for a ground-referenced load).
Out_PowerNodeMsgThe power node message that stores all the properties ofthe node.
ParentThe currently attached parent object.
ResistanceThe Resistance of the node.
SelfSolveA Flag to determine if the Power Node Model should update Output parameters itself if not connected to a PowerBus
VoltageInThe voltage at the In (negative) terminal of this node.For a load connected between a source and ground, this is the higher potential side.
VoltageNodeThe voltage drop across the node: VoltageIn - VoltageOut.Positive for a load (current flows from higher to lower potential).Negative for a source (Out terminal at higher potential than In).
VoltageOutThe voltage at the Out (positive) terminal of this node.For a load connected between a source and ground, this is the lower potential side.

Methods

InheritedDescription
ClearClear the Power Node Model if the circuit is open
FindParentWithIDReturns an attached parent that satisfies the specified ID.
FindParentWithTypeReturns an attached parent that satisfies the specified type.
FindRootWithIDReturns a root object that satisfies the specified ID.
FindRootWithTypeReturns a root object that satisfies the specified type.