Robust control of a reverse-flow reactor