Perception Loop and Machine Consciousness