A Practical Introduction to Human-in-the-Loop Cyber-Physical Systems