Abstract:Cyber-physical systems (CPS) is a system that integrates physical and computational elements based on context-awareness. It can intelligently respond to dynamic changes in the real world and has important and broad application prospects. However, CPS works in a complex physical environment, and changes around it can affect the behavior of CPS. Therefore, ensuring the safety and reliability of CPS in complex environments is critical. This study proposes an integrated modeling method for real-time data. By defining a series of rules, the domain environment model is combined into the runtime verification process to ensure the safety and reliability of CPS in an uncertain environment. First, the method builds a mathematical model for the environment. Then, design the merge rules to merge the mathematical models with only one environmental factor under the same system parameter into a mathematical model with one or more environmental factors under the same system parameter. Next, the transformation rules are defined to convert the mathematical model into an environment model represented by pseudocode. Finally, the environment model is combined into the runtime monitoring model to perform verification according to the combination rules. The method makes the verification process more complete and accurate. When the environment changes, it ensures that the safety properties in the CPS are still satisfied by dynamically adjusting the parameter range. Finally, the method is applied to the mobile robot obstacle avoidance experiment, to model the temperature and humidity physical environment and then, to combine it into the monitoring model, eventually, the life time safety reminder is accurately given in different environments.