PhD thesis - Invariant sets for control and monitoring of systems in dynamic environments