Expand description
§gainlineup
A gain lineup toolbox for RF cascade analysis and signal chain modeling.
This crate provides types and functions for computing cascaded gain, noise figure, IP3, dynamic range, and compression through a chain of RF blocks (amplifiers, attenuators, filters, mixers, etc.).
§Quick Start
use gainlineup::{Input, Block, cascade_vector_return_output};
let input = Input::new(1.0e9, 1.0e6, -30.0, Some(270.0));
let blocks = vec![
Block {
name: "LNA".to_string(),
gain_db: 30.0,
noise_figure_db: 1.5,
output_p1db_dbm: None,
output_ip3_dbm: None,
},
];
let output = cascade_vector_return_output(input, blocks);
assert_eq!(output.signal_power_dbm, 0.0);Modules§
- cli
- Command-line interface for the gainlineup tool.
Structs§
- Amplifier
Model - Amplifier model wrapping a
Blockwith optional AM-PM characterization. - Amplifier
Model Builder - Builder for
AmplifierModel. - Amplifier
Point - A single point from a combined AM-AM + AM-PM sweep.
- Block
- A single block (stage) in an RF cascade, such as an amplifier, attenuator, or filter.
- Dynamic
Range - Summary of dynamic range metrics at a given node in the cascade.
- Imd3
Point - A single point from a two-tone IMD3 sweep.
- Input
- The input signal that enters the RF cascade.
- Signal
Node - Output signal at a node in the RF cascade, containing power, noise, and gain information.
Functions§
- cascade_
am_ am_ sweep - Sweep input power through a cascade of blocks and return the AM-AM curve.
- cascade_
gain_ compression_ sweep - Sweep input power through a cascade and return gain compression curve.
- cascade_
vector_ return_ output - Cascade a vector of blocks and return only the final output
SignalNode. - cascade_
vector_ return_ vector - Cascade a vector of blocks and return a
SignalNodefor each stage output.