An electrosurgical system and method for performing electrosurgery is disclosed. The electrosurgical system includes an electrosurgical generator adapted to supply electrosurgical energy to tissue. The electrosurgical system includes an electrosurgical instrument, such as an electrosurgical antenna, knife, forceps, suction coagulator, or vessel sealer. The disclosed system includes an impedance sensor, a controller, dynamic impedance matching network, and an electrosurgical energy generator. The dynamic impedance matching network includes a PIN diode switching array configured to selectively activate a plurality of reactive elements. The disclosed arrangement of reactive elements provides real-time impedance correction over a wide range of impedance mismatch conditions.