Hydrogen generation for sensing and control in submerged friction stir welding