RF Chain Design Rules¶
Mandatory Attenuators with 3 dB Minimum Excess¶
Version: 3.0
Last Updated: 2025-10-31
Purpose: Design guidelines for professional-grade RF transmitter chains with guaranteed power headroom and precision control
⚠️ Code-reference drift (audited 2026-05-19; updated 2026-07-03): The numeric design rules in this doc still broadly match production, but the
Code Implementationfile paths and line numbers below are stale. The RF-chain orchestration and component selection were ported to the backend — the canonical engine is nowbackend/services/rf_chain/(orchestrator.py,design_attempt.py,steps/,convergence.py,constants.py).frontend/src/services/rfChain/designService.tsis only a thin SSE wrapper overPOST /api/rf-chain/design; the frontendrfChainOrchestrator.ts/attenuatorWrapperService.ts/predriverSelectionService.tsand the wholefrontend/src/services/selection/tree no longer exist. Design constants live inbackend/services/rf_chain/constants.py(MINIMUM_EXCESS_DB,MAX_ITERATIONS,TARGET_OUTPUT_MIN/MAX_OVER_DB, …) — note the output window is now 0.5–2.0 dB over target (center +1.0 dB), wider than the "0.5–1.5" cited below. Treat every line-number citation below as approximate.
Note: This document reflects the actual code implementation. Key principles: - 3 dB minimum excess power required between all stages (mandatory for attenuator placement) - 1 dB minimum physical attenuator value (SMT component availability) - VCO receives 6 dB total margin (3 dB excess + 3 dB safety) - this is the ONLY exception - Final output window: Target +0.5 to +1.5 dB (asymmetric, no undershoot allowed)
CORE DESIGN PRINCIPLES¶
Rule 1: Mandatory Attenuators Between All Stages¶
Statement: Every RF chain stage MUST have an attenuator to the next stage.
Applies To: - VCO → Predriver (if predriver exists) - Predriver → Driver (if predriver exists) - VCO → Driver (if no predriver) - Driver → PA (always)
Rationale: - Provides precision power control at each stage - Protects components from over-drive - Enables design flexibility and production tuning - Distributes power dissipation across multiple components
Exception: None. If a stage exists, it MUST have an attenuator to the next stage.
Rule 2: 3 dB Minimum Excess Power Per Stage¶
Statement: Each stage MUST provide at least 3 dB MORE power than the next stage requires. The attenuator consumes this excess.
Mathematical Expression:
Stage_Output_Power ≥ Next_Stage_Input_Power + 3 dB
Where:
Attenuator_Value = Stage_Output_Power - Next_Stage_Input_Power
Minimum_Attenuator_Value = 3 dB (power budget and design minimum)
Maximum_Attenuator_Value = 20 dB (practical limit)
Critical: The 3 dB excess power requirement defines the power budget, while the attenuator is the physical mechanism that consumes this excess. When the calculated excess power matches the attenuator value: - Excess power ≥ 3 dB: Required power budget for headroom and control - Physical attenuator ≥ 3 dB: Minimum design value (matches excess power requirement) - Attenuator = Excess: The attenuator value equals the available excess power
Example Scenarios: - 3.2 dB excess → Place 3 dB attenuator (excess ≥ 3 dB ✓, physical component ≥ 1 dB ✓) - 10.5 dB excess → Place 10 dB attenuator (excess ≥ 3 dB ✓, physical component ≥ 1 dB ✓) - 2.5 dB excess → FAIL: Insufficient excess power (< 3 dB) - NO attenuator placed - 0.5 dB excess → FAIL: Insufficient excess power (< 3 dB) - need predriver or higher VCO
Rationale: - Ensures adequate signal-to-noise ratio at each stage - Provides margin for component tolerances - Guarantees components never starved for power - Enables robust, manufacturable designs
Validation: - Every inter-stage connection checks: excess_power ≥ 3 dB (power budget requirement) - If excess ≥ 3 dB → Place physical attenuator with value ≥ 1 dB (closest standard value to excess) - If excess < 3 dB → Component selection FAILURE (insufficient power budget, need higher-power source or predriver) - If attenuator value > 20 dB → Component mismatch WARNING (inefficient design, source too powerful)
Critical Distinction: - MINIMUM_EXCESS_DB = 3.0: Power budget requirement - excess power must be ≥ 3 dB - MINIMUM_ATTENUATOR_DB = 1.0: Physical SMT component minimum (market availability) - Practical minimum: When excess ≥ 3 dB, attenuator is placed with value ≥ 1 dB
Code Implementation:
- rfDesignConstants.ts:26 - Constant: MINIMUM_ATTENUATOR_DB = 3.0 (design rule)
- rfDesignConstants.ts:28 - Constant: PHYSICAL_COMPONENT_MIN_DB = 1.0 (market availability)
- rfDesignConstants.ts:202 - Exports: MINIMUM_EXCESS_DB = 3.0
- attenuatorConstants.ts:8 - Selection service uses: MINIMUM_ATTENUATOR_DB = 1.0 (SMT components)
- attenuatorWrapperService.ts:71 - Checks if excess ≥ 3 dB before placing attenuator
- attenuatorWrapperService.ts:75 - Selects attenuator with ≥ 1 dB physical value
- predriverSelectionService.ts:401, 407 - Enforces ≥ 3 dB excess requirements for stage skipping
Special Case - VCO Requirements:
- VCO gets additional 3 dB safety margin: VCO_min = Component_input + 3 dB (excess) + 3 dB (safety) = 6 dB total
- This is the ONLY place in the chain where 6 dB is applied (implementation: backend/services/rf_chain/steps/vco_step.py)
Engineering Justification for VCO 6 dB Requirement: VCOs require additional headroom beyond the standard 3 dB excess due to several unique sensitivity factors:
- Component Tolerance Stackup: ±1.5 dB
- VCO output power spec tolerance (typical ±1 dB)
- Temperature coefficient variation (0.1 dB/10°C over operating range)
-
Supply voltage sensitivity (0.1-0.2 dB/V)
-
Load Pulling Effects: ±1 dB
- VCO output power varies with load impedance (VSWR sensitivity)
- Different attenuator values present different impedances
-
Typical load pulling: ±0.5 to ±1 dB
-
Frequency Pulling: ±0.5 dB
- Output power variation with frequency tuning
- VCO pulling figure (e.g., ±500 kHz/V tuning sensitivity)
-
Frequency-dependent power variation
-
Aging and Reliability: +0.5 to +1 dB
- Long-term output power degradation (MTBF calculations)
- Typical spec: ±0.5 dB over 10,000 hours
- Conservative design includes margin for aging
Calculation: 3 dB (excess) + 1.5 dB (tolerance) + 1 dB (load pulling) + 0.5 dB (frequency pulling) + 0.5 dB (aging) ≈ 6.5 dB Design Rule: Round to 6 dB total for VCO requirements.
Rule 3: Physical Attenuator Placement¶
Statement: Every inter-stage connection with ≥ 3 dB excess power MUST have a physical SMT attenuator component placed. The attenuator value equals the available excess power, with a physical component minimum of 1 dB.
Applies To All Inter-Stage Positions: - VCO → Predriver (if predriver exists) - VCO → Driver (if no predriver) - Predriver → Driver - Driver → PA
Physical Component Requirements:
IF Excess_Power ≥ 3 dB THEN
Place_Attenuator = TRUE
Physical_Attenuator_Value = Closest_Standard_Value(Excess_Power)
WHERE Physical_Attenuator_Value ≥ 1 dB (SMT component minimum)
ELSE
Place_Attenuator = FALSE (insufficient excess - component selection failure)
Where:
Excess_Power = Stage_Output - Next_Stage_Input - Trace_Loss
Excess_Power ≥ 3 dB (Rule 2 power budget requirement)
Physical component values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 18, 20 dB
Practical Implementation: - Algorithm checks if excess ≥ 3 dB (mandatory power budget requirement) - If YES: Places physical attenuator with value = closest standard value to excess - Physical attenuators start at 1 dB (market availability), not 3 dB - Example: 2.5 dB excess → FAIL (< 3 dB minimum excess) - Example: 3.2 dB excess → Place 3 dB attenuator ✓ - Example: 5.5 dB excess → Place 6 dB attenuator ✓
Rationale: - The attenuator is the physical mechanism that consumes the excess power - 3 dB excess ensures adequate power budget for component selection - 1 dB physical minimum provides flexibility for actual SMT component selection - Enables circuit tuning and production adjustment - Standard industry practice for professional RF chains
Code References:
- Excess check: attenuatorWrapperService.ts:71 - if (vcoExcess >= MINIMUM_EXCESS_DB) (3 dB)
- Attenuator selection: attenuatorWrapperService.ts:75 - selectOptimalAttenuator(MINIMUM_ATTENUATOR_DB, ...) (1 dB)
- Standard values: rfDesignConstants.ts:31 - STANDARD_VALUES: [1, 2, 3, ..., 20]
Rule 4: Attenuator as Excess Power Mechanism¶
Statement: The attenuator is the physical mechanism that consumes the excess power. An attenuator is placed only when excess power ≥ 3 dB, with the physical component value matching the closest standard value to the excess.
Key Relationship:
Excess_Power = Stage_Output - Next_Stage_Input - Trace_Loss
IF Excess_Power ≥ 3 dB THEN
Physical_Attenuator_Value = Closest_Standard_Value(Excess_Power)
WHERE Physical_Attenuator_Value ≥ 1 dB (SMT component minimum)
ELSE
NO_ATTENUATOR (component selection failure)
Clarification:
NOT: Stage_Output = Attenuator_Value + Next_Stage_Input + 3 dB (additional margin on top)
BUT: Stage_Output = Next_Stage_Input + Trace_Loss + Excess_Power
WHERE: Excess_Power ≥ 3 dB (power budget check)
Physical_Attenuator ≈ Excess_Power (closest standard value)
Example:
Driver output: 35 dBm
PA optimal input: 25 dBm
Trace loss: 0.5 dB
Excess power: 35 - 25 - 0.5 = 9.5 dB ≥ 3 dB ✓
Attenuator placed: 10 dB (closest standard value to 9.5 dB)
PA receives: 35 - 10 - 0.5 = 24.5 dBm ≈ 25 dBm ✓
Power budget: 9.5 dB excess provides headroom for:
- Component tolerances (±1 dB)
- Temperature variation (0.2 dB/10°C)
- Production tuning flexibility
- Design margin for reliable operation
Relationship Between Rules 2, 3, and 4: - Rule 2: Requires ≥ 3 dB excess power (power budget minimum) - this is the GATE - Rule 3: Places physical attenuator ≥ 1 dB when gate opens (SMT component minimum) - Rule 4: Clarifies decision flow - excess check first, then physical component selection - Summary: 3 dB excess is the power budget requirement that triggers attenuator placement; physical attenuator can be ≥ 1 dB based on market availability
Rule 5: Stage Skipping Optimization¶
Statement: The system optimizes the RF chain by skipping unnecessary amplification stages when power headroom is sufficient.
Priority Order (optimization hierarchy): 1. First Priority: Skip Predriver (VCO→Driver→PA preferred) - If VCO→Driver excess ≥ 3 dB: Skip predriver - Uses: VCO→Driver→PA chain - Benefit: Fewer components, lower cost, better efficiency
- Second Priority: Skip Driver (VCO→Predriver→PA)
- If predriver→PA excess ≥ 3 dB: Skip driver
- Uses: VCO→Predriver→PA chain
-
Benefit: Reduced attenuation waste, improved efficiency
-
Last Resort: Full Chain (VCO→Predriver→Driver→PA)
- Only when both VCO→Driver and predriver→PA have insufficient excess
- Uses: Complete 3-stage amplification chain
- Includes: 3 mandatory attenuators
Decision Logic:
Step 1: Check VCO→Driver excess power
IF (VCO_output ≥ Driver_optimal_input + 3 dB) THEN
✅ Skip predriver → Use VCO→Driver→PA
Step 2: Check predriver→PA excess power
ELSE IF (Predriver_output ≥ PA_optimal_input + 3 dB) THEN
✅ Skip driver → Use VCO→Predriver→PA
Step 3: Require full chain
ELSE
✅ Use full chain → VCO→Predriver→Driver→PA
Code Implementation:
- predriverSelectionService.ts:394-396 - Checks VCO→Driver excess first
- predriverSelectionService.ts:405-409 - Builds skip-predriver result
- predriverSelectionService.ts:412-421 - Falls back to skip-driver check
- predriverResultBuilder.ts:164-182 - Handles skip-predriver logic
Attenuator Requirements:
- VCO→Driver/PA: 3 dB minimum
- Predriver→Driver/PA: 3 dB minimum
- Driver→PA: 3 dB minimum
- All inter-stage connections maintain 3 dB excess power rule (attenuator equals excess)
COMPONENT SELECTION REQUIREMENTS¶
General Selection Philosophy¶
Priority Order (hierarchy of selection criteria): 1. Power & Performance Requirements (mandatory) - Power capability (P1dB, output power) - Gain requirements - Frequency coverage - Linearity margins (≥3 dB)
- Efficiency & Linear Operation (important)
- Power efficiency (>30% for drivers, >40% for PAs)
- Phase noise (VCOs)
-
Harmonics and distortion
-
Cost Optimization (secondary consideration)
- Select lowest-cost component that meets all power/performance criteria
- Within the pool of components satisfying technical requirements, prioritize cost-effectiveness
- Consider: Component cost + additional attenuation needed + power consumption
Key Principle: Cost is a tie-breaker, not a primary constraint. All components must first satisfy power budget and linearity requirements from Rules 1-4.
VCO Selection¶
Power Requirement:
IF Predriver exists:
VCO_min_output = Predriver_optimal_input + 3 dB (excess) + 3 dB (safety) = 6 dB total
IF No Predriver:
VCO_min_output = Driver_optimal_input + 3 dB (excess) + 3 dB (safety) = 6 dB total
Selection Criteria: - Frequency coverage: Target ±10% - Output power: ≥ Next_stage_input + 3 dB excess + 3 dB safety = 6 dB total ⭐ - Phase noise: < -100 dBc/Hz @ 10 kHz - Prefer: 8-10 dBm output VCOs for typical designs - Cost: Optimize among components meeting power and performance requirements
Typical Values: - Low power designs: 0-5 dBm VCO - Medium power: 5-10 dBm VCO - High power: 10-15 dBm VCO
Frequency Multiplier Selection and Integration¶
Purpose: For mmWave and high-frequency applications where direct VCO synthesis is not practical or available, frequency multipliers enable the use of lower-frequency VCOs with multiplication to achieve the target frequency.
When to Use Frequency Multipliers:
Frequency multipliers are required when the target LO frequency exceeds the practical availability of VCOs in the database.
Frequency Band Decision Rules:
IF target_LO_frequency < 6 GHz:
USE direct VCO synthesis (no multiplier)
ELSE IF 6 GHz ≤ target_LO_frequency < 18 GHz:
TRY direct VCO synthesis first
IF no suitable VCO available:
USE VCO + frequency multiplier
ELSE IF 18 GHz ≤ target_LO_frequency < 40 GHz:
USE VCO + x2 multiplier (preferred)
VCO_frequency = target_LO_frequency / 2
ELSE IF 40 GHz ≤ target_LO_frequency < 60 GHz:
USE VCO + x3 or x4 multiplier
VCO_frequency = target_LO_frequency / N (where N = 3 or 4)
ELSE IF target_LO_frequency ≥ 60 GHz:
USE VCO + cascaded multipliers (e.g., x2 → x2 for x4 total)
OR USE VCO + higher multiplication factor (x4, x6)
VCO_frequency = target_LO_frequency / N
VCO Maximum Practical Frequency:
Rationale: Beyond 20 GHz, VCO availability decreases significantly, phase noise degrades, and cost increases dramatically. Using lower-frequency VCOs with multipliers is more practical and cost-effective.Multiplier Selection Algorithm:
1. Determine if multiplier is needed:
IF target_LO_frequency > VCO_MAX_PRACTICAL_FREQ:
multiplier_needed = TRUE
ELSE:
TRY direct VCO synthesis
IF no VCO found in database:
multiplier_needed = TRUE
2. Calculate optimal multiplication factor:
preferred_factors = [2, 3, 4, 6] // In order of preference
FOR each factor N in preferred_factors:
vco_frequency = target_LO_frequency / N
IF vco_frequency is within practical VCO range (typically 2-20 GHz):
IF VCO exists in database at vco_frequency:
SELECT multiplication_factor = N
BREAK
3. For very high frequencies (>60 GHz):
PREFER cascaded multipliers over single high-factor multiplier
EXAMPLE: Use x2 → x2 instead of x4 for better phase noise and harmonic control
4. Search frequency multiplier database:
FILTER multipliers by:
- multiplication_factor = N
- input_frequency_range contains vco_frequency
- output_frequency_range contains target_LO_frequency
Multiplication Factor Preference Order: 1. x2 (First Choice): Best phase noise, simplest design, widely available 2. x3 (Second Choice): Good performance, reasonable availability 3. x4 (Third Choice): Acceptable but higher phase noise degradation 4. x6 (Fourth Choice): Use only when necessary 5. Cascaded (Special Cases): x2→x2 for x4, x2→x3 for x6
Phase Noise Degradation:
Critical Rule: Frequency multiplication degrades phase noise by 20·log₁₀(N) dB, where N is the multiplication factor.
Phase_Noise_multiplier_output = Phase_Noise_VCO + 20·log₁₀(N)
Examples:
N = 2: Phase noise degrades by 6.0 dB
N = 3: Phase noise degrades by 9.5 dB
N = 4: Phase noise degrades by 12.0 dB
N = 6: Phase noise degrades by 15.6 dB
VCO Selection with Multiplier:
When using a frequency multiplier, the VCO selection criteria must account for the phase noise degradation:
Required_VCO_Phase_Noise = Target_Phase_Noise - 20·log₁₀(N)
Example:
Target LO frequency: 28 GHz
Target phase noise: -100 dBc/Hz @ 10 kHz
Multiplication factor: x4
Required VCO phase noise: -100 - 12.0 = -112 dBc/Hz @ 10 kHz
VCO frequency: 28 / 4 = 7 GHz
Multiplier Insertion Point:
Frequency multipliers MUST be placed immediately after the VCO, before any other amplification stages.
RF Chain with Multiplier:
VCO → Multiplier → [Attenuator] → Predriver/Driver → PA
NOT:
VCO → Predriver → Multiplier → Driver → PA ❌
Rationale: - Multipliers work best at lower power levels (VCO output level) - Simplifies impedance matching - Reduces harmonic content in amplification stages - Standard industry practice for LO generation
Power Budget with Multipliers:
Frequency multipliers have conversion loss (typically 6-12 dB for passive multipliers, 0-5 dB gain for active multipliers).
Power flow with multiplier:
VCO_output → Multiplier_input
Multiplier_output = VCO_output + Multiplier_gain (or - Multiplier_loss)
Power budget calculation:
Next_stage_input_required = Predriver_optimal_input (or Driver if no predriver)
Multiplier_output_required = Next_stage_input_required + 6 dB (VCO margin applies)
VCO_output_required = Multiplier_output_required - Multiplier_gain
Example with passive multiplier:
Predriver needs: 0 dBm
VCO margin: +6 dB
Multiplier output needed: 0 + 6 = 6 dBm
Multiplier loss: -8 dB
VCO output needed: 6 - (-8) = 14 dBm
Multiplier Component Database Parameters:
The frequency multiplier database (frequency_multipliers.json) should contain:
- multiplication_factor: 2, 3, 4, 6, etc.
- input_frequency_min, input_frequency_max: VCO frequency range
- output_frequency_min, output_frequency_max: Multiplied frequency range
- conversion_gain_db or conversion_loss_db: Power transfer characteristic
- input_power_min, input_power_max: Operating power range
- phase_noise_floor: Additive phase noise contribution
- harmonic_suppression: Unwanted harmonic levels
- power_consumption: DC power required (for active multipliers)
Selection Criteria for Multipliers:
1. Frequency coverage:
- input_frequency_min ≤ VCO_frequency ≤ input_frequency_max
- output_frequency_min ≤ target_LO_frequency ≤ output_frequency_max
2. Power handling:
- input_power_min ≤ VCO_output ≤ input_power_max
- output_power ≥ Next_stage_requirement + VCO_margin
3. Phase noise:
- Total phase noise (VCO + 20·log₁₀(N) + multiplier_floor) meets requirements
4. Harmonic suppression:
- Adequate suppression of unwanted harmonics (typically >20 dBc)
5. Cost:
- Optimize among components meeting all technical requirements
Harmonic Filtering Consideration:
Frequency multipliers generate harmonics that may require filtering:
Post-multiplier filtering:
IF multiplier_output contains significant unwanted harmonics:
CONSIDER adding bandpass filter after multiplier
Filter_center = target_LO_frequency
Filter_rejection = suppress unwanted harmonics to <-20 dBc
Note: This is typically handled by the mixer's LO port selectivity, but may require explicit filtering for very demanding applications.
Cascaded Multiplier Design:
For very high frequencies or to minimize phase noise impact:
Single multiplier (x4):
VCO (7 GHz) → x4 Multiplier → 28 GHz
Phase noise degradation: 12.0 dB
Cascaded multipliers (x2 → x2):
VCO (7 GHz) → x2 Multiplier → 14 GHz → x2 Multiplier → 28 GHz
Phase noise degradation: 6.0 dB + 6.0 dB = 12.0 dB (same total)
Benefits of cascaded approach:
- Better harmonic control (each stage filters harmonics)
- More flexibility in power budget management
- Can insert amplification between stages if needed
Drawbacks:
- Higher cost (two multipliers)
- More PCB area
- Additional components to manage
Design Trade-offs:
| Approach | Phase Noise | Cost | Complexity | Power |
|---|---|---|---|---|
| Direct VCO | Best | Medium | Lowest | Low |
| VCO + x2 | Good (+6 dB) | Low | Low | Low |
| VCO + x3 | Fair (+9.5 dB) | Medium | Medium | Medium |
| VCO + x4 | Poor (+12 dB) | Medium | Medium | Medium |
| Cascaded | Same as single | High | High | Higher |
Recommendation: Always prefer x2 multiplication when possible. Use x3 or x4 only when VCO frequency would be too low (<2 GHz) or unavailable.
Code Implementation Notes:
When implementing the multiplier selection algorithm: 1. Check if direct VCO synthesis is possible 2. If not, calculate required multiplication factor 3. Select VCO at divided frequency (target_freq / N) 4. Select multiplier from database 5. Insert multiplier immediately after VCO in RF chain 6. Adjust phase noise budget: VCO_phase_noise + 20·log₁₀(N) 7. Calculate power budget with multiplier gain/loss 8. Continue with normal attenuator and amplifier selection
Predriver Selection¶
Power Requirement:
Predriver_min_output = Driver_optimal_input + 3 dB
Predriver_target_output = Driver_optimal_input + 10-15 dB (better)
Selection Criteria: - Gain: 20-35 dB typical - P1dB: ≥ Target_output + 3 dB ⭐ - Linear output: ≥ Driver_optimal_input + 3 dB ⭐ - Efficiency: >30% preferred - Cost: Optimize among components meeting power and performance requirements
Typical Input Levels: - Optimal predriver input: -5 to +5 dBm - Requires VCO attenuator if VCO > 5 dBm
Typical Output Levels:
- Low power: 15-20 dBm
- Medium power: 20-28 dBm
- High power: 28-35 dBm
Driver Selection¶
Power Requirement:
Driver_min_output = PA_optimal_input + 3 dB
Driver_target_output = PA_optimal_input + 10-15 dB (better)
Selection Criteria: - Gain: 20-30 dB typical - P1dB: ≥ Target_output + 3 dB ⭐ - Linear output: ≥ PA_optimal_input + 3 dB ⭐ - Efficiency: >30% for high power, >40% preferred - Cost: Optimize among components meeting power and performance requirements
Typical Input Levels: - Optimal driver input: 5-12 dBm - Maximum safe input: 15 dBm (most drivers)
Typical Output Levels: - Low power PA: 20-28 dBm driver output - Medium power PA: 28-35 dBm driver output - High power PA: 35-43 dBm driver output
PA Selection¶
Power Requirement:
PA_P1dB ≥ Target_output + 3 dB (minimum margin)
PA_optimal_input = Target_output - PA_gain + 2 dB (margin)
Selection Criteria: - P1dB: ≥ Target + 3 dB ⭐ - Gain: Appropriate for target output - Efficiency: >40% for high power applications - Driver must provide PA_input + 3 dB minimum - Cost: Optimize among components meeting power and performance requirements
Note: PA selection drives driver requirements via Rule 2.
ATTENUATOR SPECIFICATIONS¶
Trace Loss Parameters¶
Standard Trace Loss: 0.5 dB per inter-stage connection
What's Included: - PCB trace losses (coplanar waveguide, microstrip) - Via transitions between layers (typically 0.05-0.1 dB per via) - Connector losses (SMA, RF pin connectors) - Small parasitic losses from pad transitions
Typical Values (for 2.4 GHz designs on RO4350B substrate):
Short traces (<1 inch): 0.2 - 0.3 dB
Medium traces (1-2 inches): 0.3 - 0.5 dB
Long traces (2-3 inches): 0.5 - 0.7 dB
Driver→PA path: 0.6 - 1.0 dB (longer, higher power)
Design Assumption: We use 0.5 dB as a conservative standard value for general inter-stage connections (implementation: rfDesignConstants.ts:15 - TRACE_LOSS = 0.5). This accounts for typical 2-3" trace lengths on standard FR4 or RO4350B substrates.
Important: Trace loss is subtracted BEFORE the attenuator calculates its value, ensuring sufficient margin for physical interconnect losses.
Standard Attenuator Values¶
Standard Values (available SMT components):
Selection Algorithm:
1. Calculate excess power (includes trace loss):
excess_power = source_output - target_input - trace_loss
2. Validate against 3 dB power budget rule:
IF excess_power < 3 dB:
ERROR: "Insufficient excess power - component mismatch"
NO ATTENUATOR PLACED
ACTION: Need higher-power source component OR add intermediate stage
3. If excess_power ≥ 3 dB, select closest standard value:
selected_atten = closest_standard_value(excess_power)
4. Verify physical component range:
ASSERT: 1 ≤ selected_atten ≤ 20
Series Recommendation: - Mini-Circuits YAT series (DC to 18 GHz) - Cost-effective SMT attenuators - Standard values in 1 dB increments
DESIGN VALIDATION RULES¶
Validation Rule 1: Minimum Excess Check¶
For each stage:
actual_excess = stage_output - next_stage_input
ASSERT: actual_excess ≥ 3 dB
If FAIL:
ERROR: f"Stage {name} provides only {actual_excess:.1f} dB excess"
ACTION: Select higher-power component for this stage
Validation Rule 1.5: Final Output Window Check¶
For final output power:
output_delta = final_output - target_output
# Asymmetric tolerance: Must be +0.5 to +1.5 dB above target (no undershoot)
ASSERT: 0.5 ≤ output_delta ≤ 1.5
If output_delta < 0.5:
ERROR: f"Final output +{output_delta:.1f} dB below +0.5 dB minimum"
STATUS: CRITICAL FAILURE - design cannot meet target
ACTION: Retry with adjusted target (iterative convergence up to 5 iterations)
FALLBACK: Increase PA gain, reduce post-PA losses, or select higher power components
If output_delta > 1.5:
WARNING: f"Final output +{output_delta:.1f} dB above +1.5 dB maximum"
STATUS: EXCESS POWER - attempting fallback optimization
ACTION: Algorithm attempts to find lower-gain PA from feasible pool
FALLBACK: If no better PA found, retry with adjusted target
If 0.5 ≤ output_delta ≤ 1.5:
SUCCESS: f"Final output +{output_delta:.1f} dB within window ✓"
STATUS: PASS - design meets specifications
Iterative Convergence Algorithm: - Maximum 5 iterations to hit output window (increased from 3) - Each iteration adjusts target power based on previous delta - Tracks best attempt if all iterations fail - Returns best result within acceptable tolerances
Rationale: - +0.5 dB minimum: Ensures adequate margin for component tolerances, temperature variation, and aging - +1.5 dB maximum: Accommodates 1 dB step attenuators while preventing excessive power waste - Asymmetric (no undershoot): Undershooting target is unacceptable; overshooting is tolerable within limits - Window width: 1.0 dB provides practical balance between hitting target and manufacturing tolerances - Iterative approach: Allows algorithm to converge on optimal design through multiple attempts (max 5 iterations)
Code Implementation:
- Main loop: backend/services/rf_chain/orchestrator.py - Iterative design with MAX_ITERATIONS = 5 (constants.py)
- Window check: backend/services/rf_chain/convergence.py - Validates output_delta against the target window (TARGET_OUTPUT_MIN/MAX_OVER_DB = 0.5/2.0, constants.py)
- Fallback: backend/services/rf_chain/convergence.py + strategies/pa_retry.py - Finds a better PA when output exceeds the window
- Constants: rfDesignConstants.ts:176-177 - TARGET_OUTPUT_MIN/MAX_OVER_DB = 0.5/1.5 (centralized)
- All code uses centralized constants from rfDesignConstants.ts (no hardcoded values)
Validation Rule 2: Attenuator Range Check¶
For each inter-stage connection:
excess_power = stage_output - next_stage_input - trace_loss
# STEP 1: Check if attenuator is required (excess power check)
IF excess_power < 3.0:
ERROR: f"Stage {name} excess {excess_power:.1f} dB < 3 dB minimum"
STATUS: Component selection FAILURE (insufficient power budget)
ACTION: Increase source stage power OR add intermediate stage (predriver)
NO_ATTENUATOR_PLACED: True
# STEP 2: If excess ≥ 3 dB, place attenuator
IF excess_power ≥ 3.0:
attenuator_value = closest_standard_value(excess_power)
PLACE_ATTENUATOR: True
# STEP 3: Validate physical attenuator value
ASSERT: 1 ≤ attenuator_value ≤ 20
If attenuator_value < 1:
ERROR: "No physical SMT component available < 1 dB"
If attenuator_value > 20:
WARNING: f"Attenuator {name} = {value:.1f} dB > 20 dB (component mismatch)"
ACTION: Consider lower-power source component for better efficiency
Key Distinction: - Excess power check: Must be ≥ 3 dB (power budget requirement) - Physical attenuator: Can be ≥ 1 dB (SMT component availability) - Example: 3.2 dB excess → Place 3 dB attenuator (meets both requirements) - Example: 1.5 dB excess → NO attenuator (fails 3 dB power budget check)
Code Implementation:
- Power budget check: attenuatorWrapperService.ts:71 - if (vcoExcess >= MINIMUM_EXCESS_DB) (3 dB)
- Physical selection: attenuatorWrapperService.ts:75 - selectOptimalAttenuator(MINIMUM_ATTENUATOR_DB, ...) (1 dB min)
- Standard values: rfDesignConstants.ts:31 - [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 18, 20] dB
Validation Rule 3: Linear Operation Check¶
For each amplifier:
component_output = input_power + gain
margin_to_P1dB = P1dB - component_output
ASSERT: margin_to_P1dB ≥ 3 dB # Design guideline (conservative minimum)
If FAIL:
WARNING: f"{name} operating {margin_to_P1dB:.1f} dB from P1dB (recommend ≥ 3 dB)"
ACTION: Select component with higher P1dB or reduce drive level
Practical Operation Guidelines: - 3 dB margin: Conservative design guideline - ensures linear operation with headroom for temperature, aging, and production variation - 1-3 dB margin: Acceptable for most applications - amplifiers operate near compression (typical for efficiency-optimized designs) - < 1 dB margin: Caution - approaching P1dB compression, monitor IMD and harmonics - At P1dB: Compression-limited operation - acceptable only if IM3 and harmonics are within spec
Design Philosophy:
Minimum Margin Required (dB) = Design Headroom + Tolerance Safety + Application Needs
Where:
Design Headroom: 1 dB (min) to 3 dB (conservative)
Temperature variations: 0.1-0.2 dB/10°C
Production tolerances: 0.5 dB
Application margin: 1-2 dB (depending on linearity requirements)
Trade-offs: - Higher margin (>3 dB): Better linearity, lower IMD, lower efficiency - Lower margin (1-3 dB): Higher efficiency, acceptable linearity for most applications - Near P1dB (<1 dB): Maximum efficiency, requires careful IMD/harmonic monitoring
By Component Type: - VCO: Keep full 3-6 dB margin (low noise priority) - Predriver: 2-3 dB margin acceptable (lower power, linear operation) - Driver: 1-3 dB margin acceptable (efficiency vs. linearity trade-off) - PA: 1-3 dB margin acceptable (compression-limited operation is typical)
Code Implementation Note: The 3 dB ASSERT is a design guideline check, not an absolute requirement. Operating closer to P1dB (1-2 dB) is acceptable if IM3 and harmonics meet specification.
Validation Rule 4: Power Continuity Check¶
For each stage transition:
next_input = stage_output - attenuator - trace_loss
ASSERT: abs(next_input - next_optimal_input) ≤ 0.5 dB
If FAIL:
ERROR: f"Power discontinuity: {next_input:.1f} dBm vs {next_optimal_input:.1f} dBm expected"
ACTION: Adjust attenuator value or component selection
DESIGN FLOW ALGORITHM¶
Step 0: Iterative Convergence Loop¶
Main orchestration (backend/services/rf_chain/orchestrator.py):
MAX_ITERATIONS = 5
originalTarget = params.targetOutputPower
currentTarget = originalTarget
bestAttempt = null
FOR iteration = 1 TO MAX_ITERATIONS:
1. Perform single design attempt with currentTarget
2. Calculate outputDelta = finalOutput - originalTarget
3. Validate against window: 0.5 ≤ outputDelta ≤ 1.5
IF 0.5 ≤ outputDelta ≤ 1.5:
RETURN success (design converged)
ELSE IF outputDelta < 0.5:
# Undershoot - increase target for next iteration
currentTarget += adjustment
CONTINUE to next iteration
ELSE IF outputDelta > 1.5:
# Overshoot - attempt PA gain reduction fallback
betterPA = findLowerGainPA(feasiblePAs)
IF betterPA found:
USE betterPA and RETURN success
ELSE:
currentTarget -= adjustment
CONTINUE to next iteration
IF iteration == MAX_ITERATIONS:
RETURN bestAttempt OR failure
Step 1: Backward Power Budget Calculation¶
Start from target output, work backwards (vcoSelectionOrchestrator.ts:64-99):
1. Define target output power (e.g., 40 dBm)
2. Calculate PA requirements:
PA_output = target + POST_PA_LOSS (typically 4 dB)
PA_input = PA_output - typical_PA_gain
3. Calculate Driver requirements (with 3 dB rule):
Driver_min_output = PA_input + 3 dB (mandatory excess)
Driver_target_output = PA_input + 10-15 dB (preferred for flexibility)
Driver_input = Driver_output - typical_Driver_gain
4. Determine if Predriver needed:
IF Driver_min_output > 20 OR target ≥ 25 dBm:
Predriver_likely_needed = TRUE
5. Calculate Predriver requirements (with 3 dB rule):
Predriver_min_output = Driver_input + 3 dB
Predriver_target_output = Driver_input + 10-15 dB (preferred)
Predriver_input = Predriver_output - typical_Predriver_gain
6. Calculate VCO requirements (with 6 dB rule - ONLY exception):
VCO_min_output = Next_stage_input + 3 dB (excess) + 3 dB (safety) = 6 dB total
VCO_target_output = Next_stage_input + 8-10 dB (preferred)
NOTE: VCO is the ONLY component that gets 6 dB total margin
Step 2: Component Selection (Forward)¶
Select components in order (backend/services/rf_chain/design_attempt.py → steps/):
1. Select VCO (selectVcoWithOrchestration):
- Calculate required output from backward calculation
- Search database for VCOs meeting frequency and power requirements
- Output ≥ VCO_min_output (6 dB total above next stage - ONLY exception)
- Score by: phase noise, power match, cost
- May be reselected later if predriver needs more power
2. Select Post-PA Components (early selection for loss calculation):
- Output Filter (selectFilterWithPowerEstimation)
- BPF (Band-Pass Filter)
- Isolator/Circulator
- Directional Coupler
- Connector & Substrate
- Calculate actual post-PA losses for accurate PA selection
3. Select PA (selectPaFromFilteredPool):
- Filter by P1dB ≥ target + post_PA_loss + 3 dB
- Score with driver feasibility analysis (scorePAsWithDriverFeasibility)
- Validate against filtering requirements (harmonics, rejection)
- Select PA with best combined score (performance + driver feasibility)
4. Select Driver (selectDriverForRfChain):
- Calculate required driver output: PA_input + 3 dB (mandatory excess)
- Optimal driver output: PA_input + 10-15 dB (flexibility margin)
- Filter candidates by:
* P1dB sufficient for linear operation
* Can be driven by VCO (or predicted predriver)
* Meets power hierarchy: Driver P1dB ≤ PA P1dB - 2 dB
- Score by: power match, efficiency, cost
- Reject if compressed or insufficient excess to PA
5. Analyze Predriver Requirement (analyzePredriverRequirement):
- Check if VCO→Driver excess ≥ 3 dB
- IF YES: Skip predriver (optimization priority 1)
- IF NO: Search for suitable predriver
- Predriver selection criteria:
* Can be driven by VCO with 6 dB total margin
* Provides Driver input + 3 dB excess
* P1dB ≥ output + 3 dB margin
- Check stage skipping options:
* Priority 1: Skip predriver (VCO→Driver→PA)
* Priority 2: Skip driver (VCO→Predriver→PA)
* Priority 3: Full chain (VCO→Predriver→Driver→PA)
6. VCO Power Adjustment (if needed):
- If VCO has headroom within powerRange, increase output
- Eliminates need for predriver (efficiency optimization)
- Reselect VCO if current one cannot provide required power
Step 3: Insert Attenuators (insertAttenuatorsAutomatically)¶
For each stage connection (attenuatorWrapperService.ts:51-268):
1. VCO → First Amplifier (Predriver OR Driver):
excess_power = VCO_output - First_Amp_input
IF excess_power ≥ 3 dB:
PLACE attenuator with value = closest_standard(excess_power)
ELSE:
ERROR if no predriver and going direct to driver
(Predriver analysis should have added predriver)
2. Predriver → Driver (if both exist):
excess_power = Predriver_linear_output - Driver_optimal_input - trace_loss
IF excess_power ≥ 3 dB:
PLACE attenuator with value = max(excess_power, 1 dB)
ADDITIONAL CHECK: Will driver compress?
IF Driver_output_after_att > Driver_P1dB:
ADD extra attenuation to prevent compression
Total_att = excess_power + compression_excess + 2 dB safety
3. Driver → PA:
excess_power = Driver_linear_output - PA_optimal_input - trace_loss
IF excess_power ≥ 3 dB:
PLACE attenuator with value = closest_standard(excess_power)
ELSE:
WARNING: Insufficient excess (should not happen with correct driver selection)
Physical Attenuator Selection:
- Standard values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 18, 20] dB
- Series: Mini-Circuits YAT, DAT (digital), KAT (high freq)
- Algorithm: selectOptimalAttenuator(min=1dB, vcoOutput, frequency, application)
Important Distinctions: - Excess power requirement: ≥ 3 dB (power budget check before placement) - Physical attenuator value: ≥ 1 dB (SMT component minimum after placement decision)
Step 4: Validate Complete Chain¶
Run all validation rules:
- ✓ All inter-stage excess power ≥ 3 dB (mandatory for attenuator placement)
- ✓ All physical attenuators ≥ 1 dB and ≤ 20 dB
- ✓ All amplifiers have P1dB margin ≥ 1 dB minimum (component-specific targets: VCO 3-6 dB, Predriver 2-3 dB, Driver/PA 1-3 dB)
- ✓ Power continuity at each stage
- ✓ Final output meets target +0.5 to +1.5 dB (asymmetric window, no undershoot allowed)
- ✓ Iterative convergence within 5 attempts
EXAMPLE DESIGN: 40 dBm @ 2.4 GHz¶
Backward Calculation¶
Target: 40 dBm
Post-PA losses: 4 dB
PA (CGH35030F):
- P1dB: 50 dBm
- Gain: 17 dB
- Optimal input: 40 - 17 + 2 = 25 dBm
Driver Requirements:
- Minimum output: 25 + 3 = 28 dBm
- Target output: 25 + 10 = 35 dBm
- P1dB needed: 35 + 3 = 38 dBm
Driver (High-power, P1dB=40dBm):
- Selected output: 35 dBm
- Gain: 28 dB
- Optimal input: 35 - 28 = 7 dBm
Predriver Requirements:
- Minimum output: 7 + 3 = 10 dBm
- Target output: 7 + 15 = 22 dBm
- P1dB needed: 22 + 3 = 25 dBm
Predriver (GRF5526):
- Selected output: 22 dBm (linear, P1dB=28dBm)
- Gain: 31 dB
- Optimal input: 22 - 31 = -9 dBm
VCO Requirements:
- Minimum output: -9 + 3 (excess) + 3 (safety) = -3 dBm
- Target output: -9 + 8 = -1 dBm
VCO (MAX2623):
- Output: 3 dBm
- Excess: 3 - (-3) = 6 dB ✓ (meets VCO special requirement)
Forward Power Flow¶
Stage 1: VCO → Predriver
VCO output: 3 dBm
Attenuator: 12 dB (3 - (-9) = 12 dB) ✓ ≥ 3 dB
Trace loss: 0.5 dB (includes PCB traces, connectors, via losses)
Predriver input: 3 - 12 - 0.5 = -9.5 dBm ✓
Stage 2: Predriver Amplification
Input: -9.5 dBm
Gain: 31 dB
Theoretical output: 21.5 dBm
P1dB: 28 dBm
Linear output: 21.5 dBm (6.5 dB margin ✓)
Stage 3: Predriver → Driver
Predriver output: 21.5 dBm
Attenuator: 15 dB (21.5 - 7 = 14.5 → 15 dB standard) ✓ ≥ 3 dB
Trace loss: 0.5 dB
Driver input: 21.5 - 15 - 0.5 = 6.0 dBm ✓
Stage 4: Driver Amplification
Input: 6.0 dBm
Gain: 28 dB
Theoretical output: 34.0 dBm
P1dB: 40 dBm
Linear output: 34.0 dBm (6.0 dB margin ✓)
Stage 5: Driver → PA
Driver output: 34.0 dBm
Attenuator: 10 dB (34.0 - 25 = 9.0 → 10 dB standard) ✓ ≥ 3 dB
Trace loss: 0.5 dB
PA input: 34.0 - 10 - 0.5 = 23.5 dBm ✓
Stage 6: PA Amplification
Input: 23.5 dBm
Gain: 16.5 dB (adjustable to meet target)
Output: 23.5 + 16.5 = 40.0 dBm
P1dB: 50 dBm
Margin: 50 - 40.0 = 10.0 dB ✓
Stage 7: Post-PA
PA output: 40.0 dBm
Losses: 4 dB
Final output: 36.0 dBm
Adjust PA gain to 17.5 dB → Final: 41.0 dBm
After post-PA losses: 41.0 - 4 = 37.0 dBm ≈ 38 dBm target ✓
Validation Summary¶
✓ VCO→Predriver attenuator: 12 dB ≥ 3 dB
✓ Predriver→Driver attenuator: 15 dB ≥ 3 dB
✓ Driver→PA attenuator: 10 dB ≥ 3 dB
✓ Predriver P1dB margin: 6.2 dB ≥ 3 dB
✓ Driver P1dB margin: 5.4 dB ≥ 3 dB
✓ PA P1dB margin: 8.6 dB ≥ 3 dB
✓ Final output: 39 dBm ≈ 40 dBm target
Design Status: PASS ✓
BENEFITS OF THESE RULES¶
1. Design Robustness¶
- Guaranteed power headroom at every stage
- No component starvation scenarios
- Predictable performance across production units
2. Manufacturing Advantages¶
- Standard attenuator values for easy sourcing
- Tuning flexibility during bring-up
- Tolerance absorption via attenuator adjustment
3. Component Protection¶
- Over-drive prevention via mandatory attenuators
- Linear operation enforcement via P1dB margins
- Thermal distribution across multiple components
4. Design Validation¶
- Clear pass/fail criteria (3 dB minimum)
- Automated validation possible
- No ambiguity in power budget
5. Signal Quality¶
- Adequate SNR at each stage
- Reduced distortion via linear operation
- Consistent performance across operating conditions
TRADE-OFFS¶
Costs¶
- Additional BOM cost: $6-20 per unit (3-4 attenuators @ $2-5 each)
- PCB area: ~5-10% increase for attenuators
- Assembly complexity: More components to place
Benefits¶
- Design flexibility: Easier component substitution
- Production yield: More margin = fewer failures
- Performance consistency: Less unit-to-unit variation
- Design time: Clear rules = faster validation
Net Assessment: Benefits outweigh costs for professional RF products
IMPORTANT: Constants vs Implementation¶
Constant Definitions (Two Sources)¶
rfDesignConstants.ts (Design rule constants):
MINIMUM_ATTENUATOR_DB = 3.0 // Design rule (conceptual minimum for power budget)
PHYSICAL_COMPONENT_MIN_DB = 1.0 // Market availability (actual SMT components)
MINIMUM_EXCESS_DB = 3.0 // Power budget requirement (gate check)
attenuatorConstants.ts (Selection service constants):
MINIMUM_ATTENUATOR_DB = 1.0 // Physical SMT component minimum
MINIMUM_EXCESS_DB = 3.0 // Power budget requirement (gate check)
Practical Implementation¶
The algorithm works in TWO steps:
- Power Budget Check (Gate):
if (excess_power >= MINIMUM_EXCESS_DB)→ 3 dB minimum - Physical Component Selection:
selectOptimalAttenuator(MINIMUM_ATTENUATOR_DB, ...)→ 1 dB minimum
Key Insight: The 3 dB requirement is a POWER BUDGET check, not a physical component minimum. Physical SMT attenuators start at 1 dB in the market. The algorithm: - Checks if excess ≥ 3 dB (power budget gate) - Places attenuator with value ≥ 1 dB (physical component minimum) if gate opens
Example Flow:
// Step 1: Check power budget
const excess = vcoOutput - predriverInput; // e.g., 3.2 dB
if (excess >= MINIMUM_EXCESS_DB) { // 3.2 >= 3.0 ✓ GATE OPENS
// Step 2: Select physical component
const attenuator = selectOptimalAttenuator(
MINIMUM_ATTENUATOR_DB, // 1 dB (physical min)
vcoOutput,
frequency,
application
);
// Result: Places 3 dB attenuator (closest standard to 3.2 dB)
}
ALGORITHM SUMMARY (Quick Reference)¶
Core Constants (rfDesignConstants.ts)¶
MINIMUM_EXCESS_DB = 3.0 // Power budget requirement (all stages)
MINIMUM_ATTENUATOR_DB = 3.0 // Design rule (conceptual)
PHYSICAL_COMPONENT_MIN_DB = 1.0 // SMT availability (actual placement)
MAXIMUM_ATTENUATOR_DB = 20.0 // Practical upper limit
TRACE_LOSS = 0.5 // General interconnect loss
TARGET_OUTPUT_MIN_OVER_DB = 0.5 // Final output window minimum
TARGET_OUTPUT_MAX_OVER_DB = 1.5 // Final output window maximum (used in all validations)
VCO_MIN_MARGIN_DB = 3.0 // VCO P1dB margin minimum
VCO_TARGET_MARGIN_DB = 6.0 // VCO total requirement (3 dB excess + 3 dB safety)
PREDRIVER_MIN_MARGIN_DB = 2.0 // Predriver P1dB margin minimum
DRIVER_MIN_MARGIN_DB = 1.0 // Driver P1dB margin minimum
PA_MIN_MARGIN_DB = 1.0 // PA P1dB margin minimum
Design Flow (High-Level)¶
1. ITERATIVE LOOP (max 5 iterations):
FOR each iteration:
a. Backward power calculation (VCO requirements)
b. Component selection (VCO → Post-PA → PA → Driver → Predriver)
c. Stage skipping optimization (prefer VCO→Driver→PA)
d. Attenuator insertion (≥3 dB excess → place ≥1 dB physical)
e. Power flow validation
f. Final output window check (0.5 to 1.5 dB)
IF output within window: RETURN success
ELSE IF undershoot: Increase target, retry
ELSE IF overshoot: Find lower-gain PA, retry
2. RETURN best attempt or failure
### Key Decision Points:
- Excess power ≥ 3 dB? → PLACE attenuator
- Excess power < 3 dB? → ADD predriver OR increase source power
- VCO→Driver excess ≥ 3 dB? → SKIP predriver (priority 1)
- Predriver→PA excess ≥ 3 dB? → SKIP driver (priority 2)
- Otherwise → FULL chain (priority 3)
Validation Checklist¶
✓ All inter-stage excess power ≥ 3 dB (mandatory)
✓ All physical attenuators: 1 dB ≤ value ≤ 20 dB
✓ All amplifiers: P1dB margin ≥ component-specific minimum
✓ Power continuity: stage outputs match next inputs (±0.5 dB)
✓ Final output: target -0.5 to +1.5 dB (allows slight undershoot for standard attenuator gaps)
✓ Converged within 5 iterations
Document Owner: RF System Design Team
Last Updated: 2025-10-31 (Version 3.0 - Algorithm Implementation Update)
Status: Active Design Rules — numeric thresholds still authoritative; code-reference paths need re-wiring after the 2026 RF-chain refactor (see warning at top of file).
Key Files (canonical engine is now the backend — verify exact paths in repo):
- backend/services/rf_chain/orchestrator.py — Main iterative orchestration (the canonical System-A engine; replaces the old frontend rfChainOrchestrator.ts)
- backend/services/rf_chain/design_attempt.py — Single forward design attempt (VCO→PA→driver→power-tree→validation)
- backend/services/rf_chain/steps/ — Per-component selection (vco_step.py, pa_step.py, driver/, attenuator_step.py, power_tree_step.py)
- backend/services/rf_chain/constants.py — Design constants & margins (MINIMUM_EXCESS_DB, MAX_ITERATIONS, TARGET_OUTPUT_MIN/MAX_OVER_DB, …)
- backend/services/rf_chain/convergence.py — Convergence / output-window checks
- frontend/src/services/rfChain/designService.ts — Thin SSE wrapper over POST /api/rf-chain/design; chainMapper/ + powerFlowCalculatorService.ts map the backend result for display