You should exclude that degree of freedom from the MPC.
An alternative approach for this would be to make the mesh itself periodic.
I’ve just done some work on this in
The drawback is that you would need to use a DG type space to enforce inter cell continuity, so it might be more work than it is worth for your usecase.