Analysis Module#
Analysis code for wireless power transfer systems.
- class wpt_tools.analysis.MinMax(min: float, max: float, step: float | None)#
Bases:
objectClass for minimum and maximum values and step size.
- Parameters:
min (float) – The minimum value.
max (float) – The maximum value.
step (Optional[float]) – The step size.
- __init__(min: float, max: float, step: float | None)#
Initialize the class.
- min: float#
- max: float#
- step: float | None#
- class wpt_tools.analysis.NwTools#
Bases:
objectStateless utilities for analyzing scikit-rf rf.Network objects.
- static analyze_efficiency(rich_nw: RichNetwork, rx_port: int = 2, show_plot: bool = False, show_data: bool = True, target_f: float | None = None, range_f: float | None = None) EfficiencyResults#
Analyze the efficiency of the network.
- Parameters:
rich_nw (RichNetwork) – The network to analyze.
rx_port (int) – The port to analyze.
show_plot (bool) – Whether to show the plot.
show_data (bool) – Whether to show the data.
target_f (Optional[float]) – The target frequency.
range_f (Optional[float]) – The range of the target frequency.
- Returns:
The results of the efficiency solver.
- Return type:
- Raises:
ValueError – If the target frequency is not found within the specified range.
TypeError – If the network is not a rf.Network or nw_with_config.
- static fit_z_narrow(rich_nw: RichNetwork, show_plot: bool = False, show_data: bool = True, target_f: float | None = None, range_f: float | None = None) LCRFittingResults#
Fit simple LCR models in a narrow frequency band and optionally plot.
- Parameters:
rich_nw (RichNetwork) – The network to fit.
show_plot (bool) – Whether to show the plot.
show_data (bool) – Whether to show the fit.
target_f (Optional[float]) – The target frequency.
range_f (Optional[float]) – The range of the target frequency.
- Returns:
The results of the LCR fitting.
- Return type:
- static calc_rxc_filter(rich_nw: RichNetwork, rx_port: Literal[1, 2], rload: float, *, target_f: float | None = None, range_f: float | None = None, show_data: bool = True, c_network: Literal['CpCsRl'] = 'CpCsRl')#
Compute receiver RXC filter using solver and print a summary.
- static sweep_load(rich_nw: RichNetwork, rez_range: MinMax, imz_range: MinMax, rx_port: Literal[1, 2], input_voltage: float | None = 1, target_f: float | None = None, range_f: float | None = None, show_plot: bool = False)#
Compute load sweep results and optionally plot them. Returns results.