Text this: A perturbation-based model for rectifier circuits