Stable determination of time-dependent scalar potential from boundary measurements in a periodic quantum waveguide