본 논문에서는 시퀀스 데이터 처리 모델인 LSTM(Long Short Term Memory)을 인코더, 디코더로 구성된 입력값을 복원하는 Autoencoder 방식으로 활용하여 스마트 온실의 이상 데이터를 탐지하는 인공지능 모델을 구현한다. 스마트팜 온실 내부 환경의 정밀한 제어를 위해 설치된 60개의 센서에서 수집된 정상 데이터를 입력값으로 활용하여 LSTM Autoencoder을 학습시켰다. 학습이 완료된 모델은 학습 오차 및 검증 오차가 매우 낮은 수치에 수렴하였으며 최종적으로 학습 과정을 마친 LSTM Autoencoder 모델은 Representation 벡터에 정상 데이터 분포에 대한 정보를 함축하고 있어 해당 정보를 기반으로 시퀀스 입력을 복원한다. 이러한 복원 과정에서 정상 데이터 분포에서 벗어난 시퀀스 입력을 받으면 정확한 복원이 진행되지 않아 재구축 시 오차가 커지는 점을 활용해서 이상 탐지에 적용한다. 정상, 비정상 데이터의 구분이 되는 임계값은 학습 과정에서 얻어진 학습 오차의 분포를 활용하여 설정할 수 있으며, 시퀀스 입력에 대한 오차를 영상으로 시각화하여 이상 탐지에 활용할 수 있다.
In this paper, LSTM (Long-Short Term Memory), a sequence data processing model, is used as an Autoencoder method that reconstructs input smart farm sensor data composed of encoders and decoders to implement an artificial intelligence model that detects anomaly in smart farm. The LSTM Autoencoder was trained by using the normal data collected from the 60 sensors installed for precise control of the greenhouse environment of the smart farm as input sequence values. The trained model obtained a very low train and validation error in the learning process, and the LSTM Autoencoder model that has finally completed the learning process contains information about normal data distribution in the representation vector, so sequence input is restored based on that information. In this restoration precess, when a sequence input that is out of the normal data distribution is received, it is applied to anomaly detection by taking advantage of the fact that the reconstruction error increases because accurate restoration does not proceed. The error that becomes the threshold value that distinguishes normal and abnormal data can be set using the loss distribution obtained in the learning process, and the error for sequence input can be visualized as an image and used for anomaly detection.