Due to the increasing connectivity of automation devices and the increasing computing power Cyber-Physical Systems, production plants are becoming increasingly complex. This leads to an increasing error susceptibility of the systems and thus to a severe fault detection and analysis. The task of man is changing from operation to monitoring. But due to the increasing complexity of systems, operators are increasingly overwhelmed with the monitoring. To support the operator, approaches from the field of model-based diagnosis are widely used for this task. Here, a model is used to predict the behavior of the system for given inputs. This prediction is compared with the actual behavior of the plant and in case of a deviation, an error is reported. Often, manually created models are used. But the manual creation of models is a time consuming task. Thus, an automatic modeling is desirable. The use of intelligent systems should support the operators in the monitoring of the system. In this work, three algorithms are introduced, of which two algorithms deal with the identification of timed Automata and the third one uses the identified models for anomaly detection: First, the algorithm BUTLA is introduced, which runs faster than other algorithms from state of the art. It is an offline identification algorithm, so it uses data which is stored in a database and a preprocessing of the data. Then, the algorithm OTALA is introduced, which to the best of our knowledge is the first online passive identification algorithm for timed automata. One of its benefits is the autonomous convergence detection. Therefore, this algorithm is especially suited for the usage in autonomously running Cyber-Physical Production Systems. Finally, the anomaly detection algorithm ANODA is introduced. It uses the identified timed automata for anomaly detection. The proposed algorithms are evaluated theoretically and empirically.