Rf modeling of an MOS varactor and MIM capacitor in 0.18-μm CMOS technology