This work introduces ParamRF: a Python library for efficient, parametric modelling of radio frequency (RF) circuits. Built on top of the next-generation computational library JAX, as well as the object-oriented wrapper Equinox, the framework provides an easy-to-use, declarative modelling interface, without sacrificing performance. By representing circuits as JAX PyTrees and leveraging just-in-time compilation, models are compiled as pure functions into an optimized, algebraic graph. Since the resultant functions are JAX-native, this allows computation on CPUs, GPUs, or TPUs, providing integration with a wide range of solvers. Further, thanks to JAX's automatic differentiation, gradients with respect to both frequency and circuit parameters can be calculated for any circuit model outputs. This allows for more efficient optimization, as well as exciting new analysis opportunities. We showcase ParamRF's typical use-case of fitting a model to measured data via its built-in fitting engines, which include classical optimizers like L-BFGS and SLSQP, as well as modern Bayesian samplers such as PolyChord and BlackJAX. The result is a flexible framework for frequency-domain circuit modelling, fitting and analysis.
翻译:本文介绍ParamRF:一个用于高效参数化射频电路建模的Python库。该框架基于新一代计算库JAX及其面向对象的封装库Equinox构建,在保持高性能的同时提供了易于使用的声明式建模接口。通过将电路表示为JAX PyTree并利用即时编译技术,模型可被编译为纯函数并优化为代数图结构。由于生成的函数完全基于JAX原生实现,支持在CPU、GPU或TPU上进行计算,并能与多种求解器无缝集成。此外,借助JAX的自动微分功能,可计算任意电路模型输出相对于频率和电路参数的梯度,这不仅提升了优化效率,更为新型分析技术开辟了可能。我们通过内置拟合引擎展示了ParamRF的典型应用场景——将模型拟合至实测数据,这些引擎既包含L-BFGS和SLSQP等经典优化器,也涵盖PolyChord与BlackJAX等现代贝叶斯采样器。最终形成了一个适用于频域电路建模、参数拟合与系统分析的灵活框架。