The combination of Internet of Things (IoT) and artificial intelligence (AI) technology plays an important role in many fields, especially in the field of psychology and medical treatment. This work is mainly to study an affective robotics that can serve humans emotionally based on the IoT and AI technology. The design of affective robotics is important to understand the underlying mechanisms of human behaviors in real life. These mechanisms mainly include human nonverbal behaviors and affective states, which are important but difficult to be precisely modeled. To address this challenge, we introduce a human–robot interaction (HRI) architecture, including emotion recognition, affective computing, emotion diagnosis, and emotion control. First, we propose a system model based on HRI between affective robotics and human, in order to enhance the emotional service. Then, we develop a dynamical model with affective computing and control, where we provide a mathematical formulation method based on stochastic differential equations to quantify the emotional state. Furthermore, we perform the dynamic behavior analysis of the existence, boundedness, and stability of the model solution comprehensively. Numerical results are provided to demonstrate the validity and feasibility of the proposed design techniques.