Development of embedded systems for heating, ventilating and air conditioning (HAVAC), using machine learning

Detalhes bibliográficos
Autor(a) principal: Rodrigues, José Adriano Pais
Data de Publicação: 2022
Tipo de documento: Dissertação
Idioma: eng
Título da fonte: Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
Texto Completo: http://hdl.handle.net/10316/105998
Resumo: Dissertação de Mestrado em Engenharia Física apresentada à Faculdade de Ciências e Tecnologia
id RCAP_7f4d062c8ec52b1b2285f12ee7c685e1
oai_identifier_str oai:estudogeral.uc.pt:10316/105998
network_acronym_str RCAP
network_name_str Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
repository_id_str 7160
spelling Development of embedded systems for heating, ventilating and air conditioning (HAVAC), using machine learningDesenvolvimento de sistemas embebidos para deteção de pessoas usando visão térmica e aprendizagem de máquinaInternet das CoisasSistemas EmbebidosAprendizagem de MáquinaInfravermelhoCâmara TérmicaInternet of ThingsEmbedded SystemsMachine LearningInfraredThermal CameraDissertação de Mestrado em Engenharia Física apresentada à Faculdade de Ciências e TecnologiaOs sistemas de deteção de humanos mais difundidos dependem fortemente de sensores de movimento e métodos analógicos. Os mais recentes desenvolvimentos neste campo já integram a inteligência artificial, juntamente com a imagiologia de infravermelhos para identificar gestos ou inferir a presença de pessoas nas imagens capturadas. No entanto, a maioria destas abordagens são dirigidas a aplicações muito específicas e apresentam alguns obstáculos, tais como dificuldade de integração em sistemas mais amplos, falta de escalabilidade devido ao uso de dispositivos dispendiosos e forte dependência de serviços externos como a computação em nuvem. O objectivo deste trabalho é desenvolver um método sustentável e eficaz para analisar a ocupação de uma sala em tempo real, utilizando componentes de baixo custo e facilitando a sua integração em sistemas embutidos de maior dimensão. Para atingir este objectivo, foi utilizada uma câmara térmica de baixa resolução para adquirir imagens infravermelhas de salas com diferentes graus de ocupação: vazias, uma pessoa e duas pessoas. A fim de aumentar a variância entre amostras, as imagens foram recolhidas em sete salas diferentes, alterando o ângulo da câmara, a altura, as poses das pessoas e introduzindo fontes externas de calor não humanas. À medida que a câmara ia adquirindo as imagens, estas iam sendo armazenadas num servidor local implementado num computador normal. Algumas arquitecturas de redes neurais distintas foram treinadas com os fotogramas capturados, cada modelo fazendo uso de camadas convolucionais a fim de extrair as características visuais, sendo assim integradas num sistema embutido composto por um microcontrolador e a já mencionada câmara térmica. Um procedimento de inferência em tempo real foi feito, prevendo o número de pessoas que a câmara capturava. Esta metodologia distingue entre uma pessoa, duas pessoas e uma sala vazia. A fim de implementar a inferência dos modelos, foi necessário realizar algumas otimizações de memória, tanto na arquitectura de rede como na alocação da memória do microcontrolador, sendo a matriz de pesos codificada no \textit{Firmware}. As camadas e parâmetros das redes foram escolhidos de modo a obter a melhor relação possível entre eficácia e consumo de recursos, de modo a que o hardware com restrições de memória pudesse lidar com os modelos. Este trabalho também cimentou as bases para a implementação da aprendizagem de transferência em tempo real, realizando sucessivos procedimentos de otimização dentro do microcontrolador, usando conjuntos de imagens capturadas. Isto permitiu ao sistema adaptar-se melhor a novas salas e aumentar o seu desempenho ao longo do tempo, treinando a última camada da rede. Embora esta implementação não tenha sido acabada, foi desenhada uma rede neural \textit{feed-forward} para funcionar como uma camada extra de uma rede neural convolucional, utilizando como caraterísticas os resultados da camada softmax do modelo anterior, juntamente com três novas métricas extraídas: a temperatura média da matriz de píxeis, o número de píxeis com valores acima de um limite predefinido e a pontuação de adjacência. Este modelo de camada extra foi integrado no microcontrolador para realizar inferência. Embora a aprendizagem de transferência não tenha sido implementada, foi realizada uma simulação, com o mesmo servidor local utilizado durante a aquisição das imagens. As amostras foram capturadas e transmitidas, tendo a aprendizagem de transferência sido feita fora do microcontrolador. Todas as implementações foram testadas e analisadas minuciosamente, tendo a rede neural convolucional treinada com imagens segmentadas obtido os melhores resultados e a rede de camada extra os piores para a metodologia de inferência. No entanto, a simulação de aprendizagem de transferência mostrou um aumento progressivo da precisão, podendo a camada extra superar as melhores redes no procedimento de inferência, dado suficientes iterações de otimização.The most widespread human sensing systems rely heavily in motion sensors and analogical methods. The most recent developments in this field already integrate artificial intelligence along with infrared imaging in order to identify gestures or infer the presence of people in the captured image frames. However, most of these approaches are directed at very specific applications and present some obstacles such as difficulty of integration in broader systems, lack of scalability due to expensive hardware and heavy dependencies on external services such as cloud. The aim of this work is to develop a sustainable and effective method to analyse the occupation of a room in real-time using low cost components and easing its integration in larger embedded systems. In order to achieve this goal, a low resolution thermal camera was used to acquire infrared images of rooms with different degrees of occupation: empty, one person and two people. In order to increase the variance between samples, the images were collected in seven different rooms, changing the camera angle, height, people's poses and introducing external non-human heat sources. As they were acquired by the camera, the images were stored in a local server implemented on a regular computer. Some distinct neural network architectures were trained with the captured frames with every model making use of convolutional layers in order to extract the visual features and being integrated in an embedded system comprised of a microcontroller and the before mentioned thermal camera. A real-time inference procedure would then take place, predicting the number of people the camera captured. This methodology distinguished between one person, two people and empty room. In order to implement the models' inference, some memory optimizations had to be performed, both in the network architecture and in the microcontroller's memory allocation with the weight matrix being hard-coded in the Firmware. The networks' layers and parameters were chosen in order to achieve the best trade off between effectiveness and resource consumption so the memory constrained hardware could handle the implementation. This work also laid the foundation for implementing transfer learning in real-time, making successive fine-tuning procedures inside the microcontroller with batches of captured images. This allowed the system to better adapt to new rooms and increase its performance as time passes by training the last layer of the network. Even though this implementation was not complete, a feed-forward neural network was designed to work as an extra layer of a simple convolutional neural network. It took the outputs from the previous model's softmax layer, using them as features along with three new extracted metrics: the average temperature in the frame, the number of pixels above a threshold and the adjacency score. This extra layered model was integrated in the microcontroller to perform inference. Although the transfer learning was not complete, a simulation was performed, with the same local server used during the image acquisition. The frames would be captured and transmited, and the transfer learning would take place outside the microcontroller. All the implementations were tested and analyzed thoroughly with the results showing the convolutional neural network trained with threshold segmented images as the best performer and the extra layered network as the worst for the inference methodology. However, the transfer learning simulation showed a progressive increase in accuracy and, with enough fine-tuning iterations, the extra layer could even outperform the best networks in the inference procedure.2022-09-28info:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/masterThesishttp://hdl.handle.net/10316/105998http://hdl.handle.net/10316/105998TID:203187300engRodrigues, José Adriano Paisinfo:eu-repo/semantics/openAccessreponame:Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)instname:Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informaçãoinstacron:RCAAP2023-03-16T21:34:33Zoai:estudogeral.uc.pt:10316/105998Portal AgregadorONGhttps://www.rcaap.pt/oai/openaireopendoar:71602024-03-19T21:22:28.126819Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) - Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informaçãofalse
dc.title.none.fl_str_mv Development of embedded systems for heating, ventilating and air conditioning (HAVAC), using machine learning
Desenvolvimento de sistemas embebidos para deteção de pessoas usando visão térmica e aprendizagem de máquina
title Development of embedded systems for heating, ventilating and air conditioning (HAVAC), using machine learning
spellingShingle Development of embedded systems for heating, ventilating and air conditioning (HAVAC), using machine learning
Rodrigues, José Adriano Pais
Internet das Coisas
Sistemas Embebidos
Aprendizagem de Máquina
Infravermelho
Câmara Térmica
Internet of Things
Embedded Systems
Machine Learning
Infrared
Thermal Camera
title_short Development of embedded systems for heating, ventilating and air conditioning (HAVAC), using machine learning
title_full Development of embedded systems for heating, ventilating and air conditioning (HAVAC), using machine learning
title_fullStr Development of embedded systems for heating, ventilating and air conditioning (HAVAC), using machine learning
title_full_unstemmed Development of embedded systems for heating, ventilating and air conditioning (HAVAC), using machine learning
title_sort Development of embedded systems for heating, ventilating and air conditioning (HAVAC), using machine learning
author Rodrigues, José Adriano Pais
author_facet Rodrigues, José Adriano Pais
author_role author
dc.contributor.author.fl_str_mv Rodrigues, José Adriano Pais
dc.subject.por.fl_str_mv Internet das Coisas
Sistemas Embebidos
Aprendizagem de Máquina
Infravermelho
Câmara Térmica
Internet of Things
Embedded Systems
Machine Learning
Infrared
Thermal Camera
topic Internet das Coisas
Sistemas Embebidos
Aprendizagem de Máquina
Infravermelho
Câmara Térmica
Internet of Things
Embedded Systems
Machine Learning
Infrared
Thermal Camera
description Dissertação de Mestrado em Engenharia Física apresentada à Faculdade de Ciências e Tecnologia
publishDate 2022
dc.date.none.fl_str_mv 2022-09-28
dc.type.status.fl_str_mv info:eu-repo/semantics/publishedVersion
dc.type.driver.fl_str_mv info:eu-repo/semantics/masterThesis
format masterThesis
status_str publishedVersion
dc.identifier.uri.fl_str_mv http://hdl.handle.net/10316/105998
http://hdl.handle.net/10316/105998
TID:203187300
url http://hdl.handle.net/10316/105998
identifier_str_mv TID:203187300
dc.language.iso.fl_str_mv eng
language eng
dc.rights.driver.fl_str_mv info:eu-repo/semantics/openAccess
eu_rights_str_mv openAccess
dc.source.none.fl_str_mv reponame:Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
instname:Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação
instacron:RCAAP
instname_str Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação
instacron_str RCAAP
institution RCAAP
reponame_str Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
collection Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
repository.name.fl_str_mv Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) - Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação
repository.mail.fl_str_mv
_version_ 1799134114287190016