Application of a Transactive Energy Mechanism to Perform Ancillary Service