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:一个用于射频(RF)电路高效参数化建模的Python库。该框架基于新一代计算库JAX及面向对象封装库Equinox构建,在保证性能的同时提供易于使用的声明式建模接口。通过将电路表示为JAX PyTree并利用即时编译技术,模型作为纯函数被编译为优化的代数图。由于生成的函数具有JAX原生特性,因此可在CPU、GPU或TPU上执行计算,并支持与多种求解器集成。此外,借助JAX的自动微分功能,可针对任意电路模型输出计算关于频率及电路参数的梯度,从而实现更高效的优化以及令人瞩目的新型分析可能性。我们通过内置的拟合引擎展示了ParamRF的典型应用场景——将模型与实测数据拟合,这些引擎既包含L-BFGS、SLSQP等经典优化器,也涵盖PolyChord、BlackJAX等现代贝叶斯采样器。最终形成一个适用于频域电路建模、拟合与分析的灵活框架。