How We Know "Typical Driver Needs: 5-10 dBm Input"¶
The Calculation Formula¶
The algorithm calculates driver input requirements using two different methods depending on context:
Method 1: Optimal Input (For Linear Operation)¶
Formula:
Where:
- driverP1dB: Driver's 1 dB compression point (maximum linear output)
- driverGain: Driver's gain (typically 20-30 dB)
- driverMarginTarget.target: Typically 3 dB (for linear operation backoff)
Purpose: This calculates the optimal input power for the driver to operate linearly (3 dB below P1dB compression point).
Method 2: Required Input (To Meet PA Needs)¶
Formula:
Where:
- requiredPaInput: PA input power needed (typically 15-25 dBm)
- MINIMUM_EXCESS_DB: 3 dB (for attenuator insertion)
- TRACE_LOSS_BUDGET: ~1 dB (trace losses)
- driverGain: Driver's gain (typically 20-30 dB)
Purpose: This calculates the minimum input power needed for the driver to provide sufficient output to the PA.
Real Examples from Database¶
Example 1: BG13D (BeRex)¶
P1dB: 19.0 dBm
Gain: 26.0 dB (max)
driverMarginTarget.target: 3 dB
Optimal Input = 19.0 - 26.0 - 3.0 = -10.0 dBm
Wait, that's negative! This means BG13D can operate with very low input power. But this is the optimal input, not the required input.
Example 2: CMD244K5 (Qorvo)¶
P1dB: 25.0 dBm
Gain: 17.5 dB (max)
driverMarginTarget.target: 3 dB
Optimal Input = 25.0 - 17.5 - 3.0 = 4.5 dBm ✅
Example 3: Typical High-Power Driver¶
P1dB: 30.0 dBm
Gain: 25.0 dB
driverMarginTarget.target: 3 dB
Optimal Input = 30.0 - 25.0 - 3.0 = 2.0 dBm
Example 4: Typical Medium-Power Driver¶
P1dB: 20.0 dBm
Gain: 20.0 dB
driverMarginTarget.target: 3 dB
Optimal Input = 20.0 - 20.0 - 3.0 = -3.0 dBm
Where "5-10 dBm" Comes From¶
The 5-10 dBm range comes from Method 2 (Required Input) calculations for typical designs:
Scenario: 30 dBm Target Output¶
Step 1: Calculate Required PA Input
Target Output: 30 dBm
Post-PA Losses: 5.9 dB
Required PA Output: 30 + 5.9 = 35.9 dBm
PA Gain: 15 dB (typical)
Required PA Input: 35.9 - 15 = 20.9 dBm
Step 2: Calculate Required Driver Output
Required PA Input: 20.9 dBm
3 dB Excess: +3.0 dB
Trace Loss: +1.0 dB
Required Driver Output: 20.9 + 3.0 + 1.0 = 24.9 dBm
Step 3: Calculate Required Driver Input
Required Driver Output: 24.9 dBm
Driver Gain: 25 dB (typical)
Required Driver Input: 24.9 - 25.0 = -0.1 dBm ≈ 0 dBm
But wait! This gives ~0 dBm, not 5-10 dBm.
The Real Answer: It Depends on the Driver!¶
The optimal input (Method 1) varies by driver:
| Driver P1dB | Driver Gain | Optimal Input | Range |
|---|---|---|---|
| 20 dBm | 20 dB | -3 dBm | Low power |
| 25 dBm | 17.5 dB | 4.5 dBm | Medium |
| 30 dBm | 25 dB | 2.0 dBm | High power |
| 35 dBm | 28 dB | 4.0 dBm | High power |
| 38 dBm | 25 dB | 10.0 dBm | Very high |
Most drivers in the database have optimal inputs in the range: - Low-power drivers: -5 to 0 dBm - Medium-power drivers: 0 to 5 dBm - High-power drivers: 5 to 10 dBm ✅ - Very high-power drivers: 10 to 15 dBm
Why "5-10 dBm" is a Reasonable Estimate¶
Looking at the predriver filtering code (line 164-165):
const driverRequiredInput = useOptimalDriverInput
? PowerCalculationUtils.getDriverP1dB(selectedDriver) - PowerCalculationUtils.getDriverGain(selectedDriver) - driverMarginTarget.target
: requiredPaInputForTarget + PREDRIVER_CONSTANTS.MINIMUM_EXCESS_DB + PREDRIVER_CONSTANTS.TRACE_LOSS_BUDGET - PowerCalculationUtils.getDriverGain(selectedDriver);
When useOptimalDriverInput = true (which is the case for predriver selection), it uses Method 1 (optimal input).
For typical high-power drivers selected in designs: - P1dB: 25-35 dBm - Gain: 20-28 dB - Margin: 3 dB - Optimal Input: 2-12 dBm
Most common range: 5-10 dBm ✅
Code Reference¶
Location: predriver/driver selection now lives in the backend — backend/services/rf_chain/steps/driver/predriver.py and steps/driver/select.py. The TypeScript below is the legacy frontend implementation (services/predriverSelectionService.ts, since removed); the drive-headroom logic it shows still holds.
const driverRequiredInput = useOptimalDriverInput
? PowerCalculationUtils.getDriverP1dB(selectedDriver) - PowerCalculationUtils.getDriverGain(selectedDriver) - driverMarginTarget.target
: requiredPaInputForTarget + PREDRIVER_CONSTANTS.MINIMUM_EXCESS_DB + PREDRIVER_CONSTANTS.TRACE_LOSS_BUDGET - PowerCalculationUtils.getDriverGain(selectedDriver);
Also: attenuator insertion is now backend backend/services/rf_chain/steps/attenuator_step.py; the frontend gap surface is frontend/src/utils/chain/AttenuatorGapError.ts (legacy attenuatorWrapperService.ts removed).
Summary¶
"5-10 dBm" is derived from:
- Real driver specifications in the database
- Optimal input calculation:
P1dB - Gain - 3 dB - Typical high-power drivers (P1dB: 25-35 dBm, Gain: 20-28 dB)
- Result: Most drivers need 5-10 dBm input for optimal linear operation
It's not a hardcoded value - it's calculated from each driver's actual P1dB and gain specifications, but 5-10 dBm is the typical range for the high-power drivers commonly selected in designs.