Sid’s Status Report for April 27, 2024

Over the past week, I worked towards improving the machine learning model, and working on the final project presentation that we had on Wednesday. For the models, I wrote and tested all the code for the 6-dimension polynomial regression to determine the likelihood of availability of benches at the gym. Furthermore, for the crowd prediction, I tried a few different Machine Learning models and tested different parameters to increase our accuracy values. I also passed on the predicted results to the EC2 instance to be integrated into the app, and added details for the models in the project presentation.

For testing the regression model, the dataset was divided into a training and validation dataset with a 80/20 split. On the validation dataset, MSE, RMSE, and Accuracy were calculated. A maximum accuracy value of 60% was achieved with an RMSE value of 0.65. The model was also tested against our measured values for the crowd, achieving a 65% accuracy in predicting crowdedness. For the polynomial model, data was created by summing the time for which a bench was occupied over the hour, and averaging over days
The coefficient of determination (R2 value) for the fit was calculated to be 0.92 using sklearn_metrics built-in calculator.

For the next week, I will be testing our models with a larger dataset to include all the measured values from the past month, which I hope would increase the predictive accuracy. I will also make some changes to the polynomial model to calculate bench availability for shorter time intervals. Lastly, I will ensure smooth functionality for the people counter.

With these updates, I am on track with our schedule. I look forward to showing our work at the demo!

Max’s Status Report for April 27, 2024

This week, I tested the sensor module circuit without the LM7805 and unfortunately got similar results as before with the circuit lasting about 2.5 days. I am now rerunning the test with different software since the HTTP requests were being sent at a 5-second interval, but I think that making the interval 1 minute more resembles how a bench is used and I’m confident we’ll get a better battery life this way. I also cut the pieces for the final people countercase, and I’ll be assembling it tomorrow as I have to work on other classes. Also, at the start of the week, I 3-D printed the sensor case with no issues. We’ve planned our demo as well for next week, and plan on showing a live feed with the help of a friend of the gym to show that our application works in real-time.

My progress is on schedule as I had allotted time for both debugging the sensor and creating the demo cases for the two sensor systems.

I look to have the cases finalized for the demo with everything soldered together inside and complete the final deliverables (poster, video, report) with my teammates.

Team Status Report for April 27, 2024

Max is still working on improving the battery life performance of the sensor so that it performs closer to our requirement of a week-long battery life. He continued testing this week without LM7805 linear voltage regulator, and the the results resembled the previous battery life of a little less than 3 days. We plan to test this again with different software so that the period between HTTP requests is longer to match the sensor behavior in the gym.

No changes have occurred, but Max is still looking to see if a voltage regulator is necessary in the sensor circuit.

Sid is currently working on improving the accuracy of both models being used for prediction. This week, he continued testing standard models to compare their accuracies, and experimented with using a variety of input variables to find correlations. We plan to use a larger amount of data, which would include points collected over the last month via the sensors.

We are looking to finalize our deliverables for this week, and are preparing for the final demo. The sensor case has already been made, and everything will be soldered and assembled at the start of this week.

 

Derek’s Status Report for April 27, 2024

This week I worked on implementing the front end. Specifically, I worked on implementing probability of a bench being available using the predictions from our model. The end goal with this prediction data is to be able to integrate it with the Google Maps API to tell users the probability of a bench being available at the time of their arrival. This week I was able to display the probabilities for each hour. In the next week, I need to finish integrating the predictions with Google Maps. I also need to finalize the front end and make it cleaner and more user friendly.

Additionally, our team will be working on the final report this week. With this schedule, I should be on track to finish my part of the implementation and my team is on track to finish as well.

Derek’s Status Report for April 20, 2024

In the past two weeks, I have been working on refining the software for our system. The Advanced Python Library was having problems with scheduling function execution. I could not fully debug the problem with duplicate entries so I am currently working on writing a Python script that will clean the existing data by deleting duplicate entries. Additionally, I spent more time working on the front end. With Sid finishing the machine learning model, I was able to integrate the predictions into the front end. I added a bar chart that represented hourly occupancy levels for each day of the week.

My plan for this week is to finish implementing the front end. This would include finishing the Google Maps feature that tells users the occupancy at the time of their arrival. Additionally, we plan on adding a feature that will tell users the probability of a bench being vacant for each hour. Once Sid is able to complete the ML model for predicting bench occupancy, I plan on integrating these predictions into the front end as well.

Team Status Report for April 20, 2024

A risk we are currently working on mitigating is the battery of the bench sensors dying to early. To extend the battery life, several strategies were employed. The first strategy consisted of changing the software on the bench sensor module to only connect to WiFi when sending requests because WiFi is very power hungry. Additionally, an extra battery pack was added to the sensor module to increase the life as well.

Another risk was with how our occupancy data was being stored. There were many occasions where occupancy was being logged 2-3 times per hour instead of just one. These entries were merely duplicate entries. To solve this problem, I am currently working on a Python script that will clean all of our data.

As previously stated, more batteries were required for the sensor module.  No extra cost was incurred because we already had bought extra batteries. Additionally, we plan on adding a feature that predicts the probability of bench occupancy at a given time. No other changes were made to the existing design.

 

 

Sid’s Status Report for April 20, 2024

Over the past two weeks I was able to finalize and test out the ML model. The included adding and debugging some more code and using the RandomForestRegressor from SKLearn, as well as the fastai module. I then wrote code to use this model to predict the crowdedness values for the following week. Currently, I have managed to achieve a maximum of 60% accuracy, and am working to improve this to around 70%. I have also been writing the code to do a linear regression for the bench occupation times, which I will test tomorrow.

Some of the hardware related challenges that I faced involved working with a Raspberry Pi for the first time. In order to better understand this, I watched a few of introductory youtube videos, and read reference code to understand how to build the people counter. Furthermore, I faced a similar issue while have to learn some of the new libraries for the machine learning analysis, particularly getting weather data through Openmeteo. Again, I was able to better implement this by using reference code and building upon it for my use. I also learnt some new machine learning analysis skills from other courses I was taking this semester.

For the next week, I will be finalizing both the models and working on passing the predictions to the EC2 instance. I will also be working on our final presentation.

With these updates, I am on track with our schedule.

Max’s Status Report for April 20, 2024

Last week, I improved the power performance of the bench sensor modules, but I realized that reaching our use case requirement of 1 week for the sensor is unlikely. I modified the detection algorithm so that Wifi is only on when the device is sending a request. This is still not enough, and it seems that Wifi as a protocol is too expensive.

This week I worked on creating the models for both the people counter and the bench sensor.  For the bench sensors, I produced an initial version of the case using Rhino and am currently 3D printing it. The case should fit 2 mini breadboards, a battery pack, and the IR sensor.  I also collected material for the people counter, and I put it together this week.

I am currently on schedule.

I look to finish the case for the people counter and continue looking for ways to improve the power consumption in the people counter.

As someone on the software track, working with mostly hardware this project has been both rewarding and challenging. I’ve gotten better at reading datasheets for different components to understand how they work. I think that my experience in 18220 was useful in building the circuit. I’ve also found blogs written by fellow tech enthusiasts very useful when I was getting started as they gave me a base for understanding how the NodeMCU can read analog data, and how it communicates with outside devices.

<==== This is the layout of the bottom of the case.

The .stl file of the top.

The .stl file of the base.

Max’s Status Report for April 6, 2024

I have put aside my plan to build a case for the bench sensor and people counter hardware setups, and have spent time debugging the power issue with my bench sensor. It is running out of battery too quickly. After some probing, I narrowed the issue down to the NodeMCU being the problem, but I am still looking into how it can consume less power.

My progress is on schedule, but I would like to resolve the power issue soon. •

I am hoping to have a plan for fixing the power issue.

I have already verified the IR sensors by measuring my distance from them and reading the output voltage levels to verify that they work within the range they were advertised (100-550cm). I used equipment available in the ECE Lab of Hammershlag. I look to re-verify the accuracy of the bench sensor module detection algorithm by running 10 trials of someone arriving, 10 trials of someone leaving, and 10 trials of someone using the machine with a water break and with obstacles in the background.

 

Sid’s Status Report for April 6, 2024

This week, I completed some more tests on the people counter, and updated it to improve its functionality and reliability. I also spent time working on the Machine Learning model, which is now almost ready to run. In particular, I got the weather API incorporated into the data, to improve the model’s accuracy.

In order to test the people counter, initial tests were done by making sure the sensor’s detect people at appropriate distances. After the counter was set up at the gym, its reliability was checked by observing how accurately it counted people walking through. A lot of edge cases were also tested and dealt with. For the ML model, a part of the dataset will be used to validate its accuracy. Furthermore, its predictions will be compared against the following week’s ground truth data in order to ensure it is predicting values correctly.

For the next week, I intend to work on getting the ML model to run. I also want to work on building a system to collect occupancy data from the EC2 instance.

With these updates, I am on track with our schedule.