Testing protocols and component optimization of PEM and AEM water electrolyzers