Optimal household energy management and participation in ancillary services with PV production