Smart maintenance strategies are becoming increasingly important in the industry, and can contribute to environmentally and economically sustainable production. In this paper a recently developed latent variable framework for nonlinearsystem identification is considered for use in smart maintenance. A model is first identified using data from a system operating under normal conditions. Then the identified model is used to detect when the system begins to deviate from normal behavior. Furthermore, for systems that operate on separate batches (units), we develop a new method that identifies individual models for each batch. This can be used both to detect anomalous batches and changes in the system behavior. Finally, the two methods are evaluated on two different industrial case studies. In the first, the purpose is to detect fouling in a heat exchanger. In the second, the goal is to detect when the tool in a wood moulder machine should be changed.