An electrosurgical generator is disclosed. The generator includes a radio
frequency output stage configured to generate a radio frequency waveform
and a sensor circuit configured to measure a property of the radio
frequency waveform during a predetermined sampling period to determine
whether an arc event has occurred. The generator also includes a
controller configured to determine a total charge and/or total energy
deposited by the radio frequency waveform during the predetermined
sampling period associated with the arc event. The controller is further
configured to adjust the output of the electrosurgical generator based on
at least one parameter to limit arcing.