Flexible dispatch strategy for electric grid integrating PEM electrolyzer for hydrogen generation