A comparative analysis of self-adaptive patterns in cyber-physical systems