\documentclass[letterpaper, 11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{mathptmx}
\usepackage{natbib}
\usepackage[top=1in, bottom=1.25in, left=1.25in, right=1.25in]{geometry}
\usepackage{enumitem}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{hyperref}
\hypersetup{colorlinks=true,allcolors=MidnightBlue,pdfauthor={surajss2}}
\usepackage{titlesec}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{enumitem}
\usepackage{array}
\usepackage{booktabs}
\usepackage{comment}
\usepackage{csquotes}
\usepackage{microtype}
\usepackage[ragged]{footmisc}

\title{CS 437: Final Lab Proposal – Smarter Alarm Clock}
\author{Suraj Singh \\ NetId: surajss2 }

\begin{document}

\maketitle

\section{Project Topic}\label{sec:topic}
Create a smarter alarm clock that is able to learn from my sleep pattern and determine the best time to wake me up in a specific window with the lowest chance of being snoozed. 
Specifically, I will use the Withing Sleep Mat to notify when I go to bed, run an neural network to approximate the stage of sleep I am in, and run a Python script alarm from the Raspberry Pi when a good time window matches.
For this project, I will be working on my own.

\section{Motivation}\label{sec:motive}
Sleep is an important part of life, but with busy schedules and many distractions, it can be hard to manage healthy sleep hygiene. 
Snoozing one's alarm clock can often be used to give just a little bit more sleep, but the problem is that it creates a bad habit of ignoring the alarms. 
Another issue with traditional alarm clocks they are essentially closed devices, where they have no way of taking information from outside sources. 
An example would be one's sleep pattern, which can provide useful feedback about what stage of sleep they are in. 
Being woken up up from deep sleep can lead to feelings of grogginess, and that is if the alarm is heard by the person. 
The idea for a smarter alarm clock would be to address these shortcomings while also being as simple as regular alarm clocks (i.e.\ the user only needs to set a time to wake up and the smart alarm clock will handle the rest). 

\section{Timeline}\label{sec:timeline}
For this project, I will work towards 2 main deliverables:
\begin{enumerate}
    \item A neural network trained on my sleep data,
    \item An alarm clock Python script run on the Raspberry Pi.
\end{enumerate}

With the target of around 25 hours, here is approximately the timeline for the project:
\begin{itemize}
    \item Week 1 (04/04 to 04/10): 3 hours
    \begin{enumerate}
        \item Download my sleep data from the Withing website and analyze the structure of the data.
        \item Create a simple alarm clock Python script that runs on the Raspberry Pi. The minimum functionality is to trigger an alarm sound at a specific time.
    \end{enumerate}
    \item Week 2 (04/11 to 04/17): 4 hours
    \begin{enumerate}
        \item Pre-process the sleep data to prepare it for training. Primarily split the data into training and validation datasets.
        \item Setup the alarm system with the Withing API to receive notification of sleep events. Some examples would be user is in bed and user has left the bed.
    \end{enumerate}
    \item Week 3 (04/18 to 04/24): 7 hours
    \begin{enumerate}
        \item Training a model with the sleep data and test with my most recent sleep data (test dataset).
        \item Soft test run of the Raspberry Pi alarm clock: 
        \begin{itemize}
            \item Check if notifications from the API (user in-bed and user out-of-bed) are sent and received correctly. 
            \item Determine how long the latency is from Withing API to Python script.
        \end{itemize}
    \end{enumerate}
    \item Week 4 (04/25 to 05/01): 5 hours
    \begin{enumerate}
        \item Connect AI model to the Raspberry Pi and run tests to see how well it works. Tests will include:
        \begin{itemize}
            \item if it can pickup sleep events from the Withing device, 
            \item how accurate the AI model guesses the sleep stage (against test dataset), 
            \item and if it is able to trigger the alarm at a reasonable window of time.
        \end{itemize}
        \item Test alarm clock in practice and verify ease of use.
    \end{enumerate}
    \item Week 5 (05/02 to 05/08): 6 hours
    \begin{enumerate}
        \item Take feedback and polish up the model and scripts.
        \item Finalize video and report.
    \end{enumerate}
    \item Week 6 (05/09 to 05/13): X hours – Extra time if needed to work on finishing up video and report.
\end{itemize}

\section{Currently Defined Tools}\label{sec:tools}
\begin{itemize}
    \item Hardware:
    \begin{itemize}
        \item Raspberry Pi
        \item (Bluetooth) Speaker
    \end{itemize}
    \item Software:
    \begin{itemize}
        \item Python
        \item \href{https://developer.withings.com/api-reference#tag/sleep}{Withing API}
        \item Tensorflow Lite or PyTorch Mobile for Deep Learning Neural Network model
    \end{itemize}
\end{itemize}

\end{document}