Skip to content

SWaP-C Models API

Size, Weight, Power, and Cost models.

Overview

from phased_array_systems.models.swapc import PowerModel, CostModel

Classes

PowerModel

PowerModel(overhead_factor: float = 0.2)

Power consumption calculator for phased array systems.

Computes DC power, RF power, and prime power based on architecture parameters and efficiency factors.

Power Equations

RF_power = n_elements * tx_power_per_elem DC_power = RF_power / pa_efficiency Prime_power = DC_power * (1 + overhead_factor)

ATTRIBUTE DESCRIPTION
name

Model block name for identification

TYPE: str

overhead_factor

Additional power overhead (cooling, control, etc.)

Initialize power model.

PARAMETER DESCRIPTION
overhead_factor

Fraction of DC power for overhead (default 20%)

TYPE: float DEFAULT: 0.2

Source code in src/phased_array_systems/models/swapc/power.py
def __init__(self, overhead_factor: float = 0.2):
    """Initialize power model.

    Args:
        overhead_factor: Fraction of DC power for overhead (default 20%)
    """
    self.overhead_factor = overhead_factor

evaluate

evaluate(arch: Architecture, scenario: Scenario, context: dict[str, Any]) -> MetricsDict

Evaluate power metrics.

PARAMETER DESCRIPTION
arch

Architecture configuration

TYPE: Architecture

scenario

Scenario (may influence duty cycle)

TYPE: Scenario

context

Additional context (unused)

TYPE: dict[str, Any]

RETURNS DESCRIPTION
MetricsDict

Dictionary with power metrics: - rf_power_w: Total RF output power (W) - dc_power_w: DC power consumption (W) - prime_power_w: Prime/wall power (W) - pa_efficiency: Power amplifier efficiency - n_elements: Number of array elements

Source code in src/phased_array_systems/models/swapc/power.py
def evaluate(
    self,
    arch: Architecture,
    scenario: Scenario,
    context: dict[str, Any],
) -> MetricsDict:
    """Evaluate power metrics.

    Args:
        arch: Architecture configuration
        scenario: Scenario (may influence duty cycle)
        context: Additional context (unused)

    Returns:
        Dictionary with power metrics:
            - rf_power_w: Total RF output power (W)
            - dc_power_w: DC power consumption (W)
            - prime_power_w: Prime/wall power (W)
            - pa_efficiency: Power amplifier efficiency
            - n_elements: Number of array elements
    """
    n_elements = arch.array.n_elements
    tx_power_per_elem = arch.rf.tx_power_w_per_elem
    pa_efficiency = arch.rf.pa_efficiency

    # RF power
    rf_power_w = n_elements * tx_power_per_elem

    # DC power (accounting for PA efficiency)
    dc_power_w = rf_power_w / pa_efficiency

    # Prime power (including overhead)
    prime_power_w = dc_power_w * (1 + self.overhead_factor)

    return {
        "rf_power_w": rf_power_w,
        "dc_power_w": dc_power_w,
        "prime_power_w": prime_power_w,
        "pa_efficiency": pa_efficiency,
        "n_elements": n_elements,
    }

CostModel

Parametric cost model for phased array systems.

Computes recurring and non-recurring costs based on array size and cost parameters.

Cost Equations

Recurring_cost = n_elements * cost_per_element Total_cost = Recurring_cost + NRE + Integration

ATTRIBUTE DESCRIPTION
name

Model block name for identification

TYPE: str

evaluate

evaluate(arch: Architecture, scenario: Scenario, context: dict[str, Any]) -> MetricsDict

Evaluate cost metrics.

PARAMETER DESCRIPTION
arch

Architecture configuration

TYPE: Architecture

scenario

Scenario (unused for basic cost model)

TYPE: Scenario

context

Additional context (unused)

TYPE: dict[str, Any]

RETURNS DESCRIPTION
MetricsDict

Dictionary with cost metrics: - recurring_cost_usd: Element-based recurring cost (USD) - nre_usd: Non-recurring engineering cost (USD) - integration_cost_usd: System integration cost (USD) - total_cost_usd: Total system cost (USD) - cost_per_element_usd: Cost per element (USD) - n_elements: Number of elements

Source code in src/phased_array_systems/models/swapc/cost.py
def evaluate(
    self,
    arch: Architecture,
    scenario: Scenario,
    context: dict[str, Any],
) -> MetricsDict:
    """Evaluate cost metrics.

    Args:
        arch: Architecture configuration
        scenario: Scenario (unused for basic cost model)
        context: Additional context (unused)

    Returns:
        Dictionary with cost metrics:
            - recurring_cost_usd: Element-based recurring cost (USD)
            - nre_usd: Non-recurring engineering cost (USD)
            - integration_cost_usd: System integration cost (USD)
            - total_cost_usd: Total system cost (USD)
            - cost_per_element_usd: Cost per element (USD)
            - n_elements: Number of elements
    """
    n_elements = arch.array.n_elements
    cost_per_elem = arch.cost.cost_per_elem_usd
    nre = arch.cost.nre_usd
    integration = arch.cost.integration_cost_usd

    # Recurring cost (scales with elements)
    recurring_cost = n_elements * cost_per_elem

    # Total cost
    total_cost = recurring_cost + nre + integration

    return {
        "recurring_cost_usd": recurring_cost,
        "nre_usd": nre,
        "integration_cost_usd": integration,
        "total_cost_usd": total_cost,
        "cost_per_element_usd": cost_per_elem,
        "cost_usd": total_cost,  # Canonical metric name
        "n_elements": n_elements,
    }

Functions

compute_thermal_load

compute_thermal_load(dc_power_w: float, rf_power_w: float, additional_dissipation_w: float = 0.0) -> dict[str, float]

Compute thermal dissipation for heat management.

PARAMETER DESCRIPTION
dc_power_w

Total DC power consumption (W)

TYPE: float

rf_power_w

RF power radiated (W)

TYPE: float

additional_dissipation_w

Other heat sources (W)

TYPE: float DEFAULT: 0.0

RETURNS DESCRIPTION
dict[str, float]

Dictionary with thermal metrics: - heat_dissipation_w: Total heat to remove (W) - rf_efficiency: Fraction of DC converted to RF

Source code in src/phased_array_systems/models/swapc/power.py
def compute_thermal_load(
    dc_power_w: float,
    rf_power_w: float,
    additional_dissipation_w: float = 0.0,
) -> dict[str, float]:
    """Compute thermal dissipation for heat management.

    Args:
        dc_power_w: Total DC power consumption (W)
        rf_power_w: RF power radiated (W)
        additional_dissipation_w: Other heat sources (W)

    Returns:
        Dictionary with thermal metrics:
            - heat_dissipation_w: Total heat to remove (W)
            - rf_efficiency: Fraction of DC converted to RF
    """
    # Heat = DC input - RF output + additional sources
    heat_dissipation_w = dc_power_w - rf_power_w + additional_dissipation_w
    rf_efficiency = rf_power_w / dc_power_w if dc_power_w > 0 else 0.0

    return {
        "heat_dissipation_w": heat_dissipation_w,
        "rf_efficiency": rf_efficiency,
    }

compute_cost_per_watt

compute_cost_per_watt(total_cost_usd: float, rf_power_w: float) -> float

Compute cost per Watt of RF power.

PARAMETER DESCRIPTION
total_cost_usd

Total system cost (USD)

TYPE: float

rf_power_w

RF output power (W)

TYPE: float

RETURNS DESCRIPTION
float

Cost per Watt (USD/W)

Source code in src/phased_array_systems/models/swapc/cost.py
def compute_cost_per_watt(total_cost_usd: float, rf_power_w: float) -> float:
    """Compute cost per Watt of RF power.

    Args:
        total_cost_usd: Total system cost (USD)
        rf_power_w: RF output power (W)

    Returns:
        Cost per Watt (USD/W)
    """
    if rf_power_w <= 0:
        return float("inf")
    return total_cost_usd / rf_power_w

compute_cost_per_db

compute_cost_per_db(total_cost_usd: float, eirp_dbw: float) -> float

Compute cost per dBW of EIRP.

Useful for comparing cost-effectiveness of different architectures.

PARAMETER DESCRIPTION
total_cost_usd

Total system cost (USD)

TYPE: float

eirp_dbw

Effective Isotropic Radiated Power (dBW)

TYPE: float

RETURNS DESCRIPTION
float

Cost per dBW (USD/dBW)

Source code in src/phased_array_systems/models/swapc/cost.py
def compute_cost_per_db(total_cost_usd: float, eirp_dbw: float) -> float:
    """Compute cost per dBW of EIRP.

    Useful for comparing cost-effectiveness of different architectures.

    Args:
        total_cost_usd: Total system cost (USD)
        eirp_dbw: Effective Isotropic Radiated Power (dBW)

    Returns:
        Cost per dBW (USD/dBW)
    """
    if eirp_dbw <= 0:
        return float("inf")
    return total_cost_usd / eirp_dbw

Output Metrics

Power Metrics

Metric Units Description
rf_power_w W Total RF power (all elements)
dc_power_w W DC power (RF / PA efficiency)
prime_power_w W Total prime power

Cost Metrics

Metric Units Description
recurring_cost_usd USD Element cost × count
nre_cost_usd USD Non-recurring engineering
integration_cost_usd USD System integration
cost_usd USD Total cost

Usage Examples

Power Calculation

from phased_array_systems.models.swapc import PowerModel

# Using PowerModel
model = PowerModel()
metrics = model.evaluate(arch, scenario, context={})
print(f"Prime Power: {metrics['prime_power_w']:.0f} W")
print(f"RF Power: {metrics['rf_power_w']:.0f} W")
print(f"DC Power: {metrics['dc_power_w']:.0f} W")

Cost Calculation

from phased_array_systems.models.swapc import CostModel

# Using CostModel
model = CostModel()
metrics = model.evaluate(arch, scenario, context={})
print(f"Total Cost: ${metrics['cost_usd']:,.0f}")
print(f"Recurring: ${metrics['recurring_cost_usd']:,.0f}")
print(f"NRE: ${metrics['nre_cost_usd']:,.0f}")

Cost Analysis Utilities

from phased_array_systems.models.swapc.cost import compute_cost_per_watt, compute_cost_per_db

# Cost efficiency metrics
cost_per_watt = compute_cost_per_watt(total_cost_usd=50000, rf_power_w=100)
cost_per_db = compute_cost_per_db(total_cost_usd=50000, eirp_dbw=45)

print(f"Cost per Watt: ${cost_per_watt:.0f}/W")
print(f"Cost per dB EIRP: ${cost_per_db:.0f}/dB")

Power Equations

RF Power

\[ P_{RF} = P_{elem} \times N \]

DC Power

\[ P_{DC} = \frac{P_{RF}}{\eta_{PA}} \]

Prime Power

Prime power includes additional overhead (typically DC power plus auxiliaries):

\[ P_{prime} = P_{DC} \times (1 + overhead) \]

Cost Equations

Recurring Cost

\[ C_{recurring} = C_{elem} \times N \]

Total Cost

\[ C_{total} = C_{recurring} + C_{NRE} + C_{integration} \]

Trade-offs

Power vs. Array Size

# Power scales linearly with element count
# For constant EIRP, larger arrays need less power per element

# 8x8 at 1W each: P = 64W RF
# 16x16 at 0.25W each: P = 64W RF, but 6dB more gain from aperture

Cost vs. Performance

# Cost scaling factors:
# - Element count: linear
# - Power per element: typically superlinear
# - Frequency: higher frequency = higher cost per element

See Also