An Automatic Parameter Extraction Technique for an Improved PiN Diode Circuit Model