btp_ppt_end_sem
TRANSCRIPT
![Page 1: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/1.jpg)
Embedded System for Control of an AC Compressor Based on Sleep Stage
Detection
B.Tech Project Abhishek Kumar Agrawal
Supervisor:Prof. A. Routray
![Page 2: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/2.jpg)
Introduction: No need of maintaining Room temperature at reference temperature for entire sleep period. User in NREM stage 2,3,4 AC compressor OFF User in NREM stage 1 and REM AC compressor ON Variation in Respiratory rate with different sleep stages has ben used as key for control.
![Page 3: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/3.jpg)
Objective: To develop a Real time Respiratory rate counter
Using Active noise cancellation algorithm has been developed Prototyped using ADMP401 microphone and STM32f4 board
To establish a wireless link for sleep data transfer Using ESP8266 Wi-Fi module, sleep stage has been transferred
To develop an application for viewing sleep data An Android application has been developed for collecting and
viewing data for entire sleep period
![Page 4: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/4.jpg)
Overview of the system:
![Page 5: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/5.jpg)
Respiratory rate counter:
Breath rate per minute
Smoothing and envelope
detection
Active noise cancellation
Absolute sum of windowed
data
Breath signaland noise
Input
![Page 6: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/6.jpg)
Algorithm Development Sampling Frequency selection:
Signal from 10000: 13000, 4096 point FFT. Sampling frequency = 2KHz
![Page 7: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/7.jpg)
Active noise cancellation A 2nd Order LMS adaptive FIR filter has been used
![Page 8: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/8.jpg)
Respiratory Rate counting Signal has been divided in to window of 0.05 (=100)For each window sum of absolute value has been computed
![Page 9: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/9.jpg)
Low Pass filter design for smoothing FFT of windowed sum of absolute data has been computed 0.2 has been chosen as cutoff frequency of LPF
![Page 10: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/10.jpg)
Low Pass filterAn IIR low pass filter has been designed using Butterworth approximation and impulse invariance design method.
= 0.15, = 0.25, =0.9, = 0.1
Order of filter (N) = 6Cutoff frequency() = 0.1918
![Page 11: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/11.jpg)
Response of LPF Magnitude Response: Phase Response:
![Page 12: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/12.jpg)
Smoothened Output of LPF Now by setting threshold number of respiratory rate can be determined.
![Page 13: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/13.jpg)
Wireless Link : wi-fi module on Human side Connects to access pointActs as clientTakes data through UART from uc and transfer to server over TCP
wi-fi module on AC side Configured as Access pointActs as Server Collect sleep stage data through TCP and generate On-Off flag for AC compressor. Write all sleep data to a file As app ask for data it transfer content of file and reset the file
![Page 14: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/14.jpg)
Mobile Application:
Connects to server using wi-fi
Receive the file containing last sleep data
Plot the received data for viewing to user
Can be used for deleting data on server without viewing
![Page 15: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/15.jpg)
Hardware selection: Microphone:
Analog devices ADMP401
wi-fi module:
ESP8266-01 wifi module
![Page 16: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/16.jpg)
Development Board: ARM Cortex M4 based STM32F4 discovery board:
source@www. galeria.tech-blog.pl
![Page 17: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/17.jpg)
Prototype Developed: Human Side
With STM32F4 board and microphones collect and transmit sleep stage data
AC side
Acts as access point and server. Get sleep data and generate On-Off control signal. Writes data to a file and transmit to App if asked
![Page 18: BTP_PPT_END_SEM](https://reader036.vdocuments.net/reader036/viewer/2022062313/55cae605bb61eb39788b481f/html5/thumbnails/18.jpg)
Android App Developed:With connect a LED glows on server side indicating connection establishment
With read new activity opens showing a plot for sleep data for last periods