Week 6 update

 

Kevin:

  • Accomplishment #1 description & result
    • This week I mainly focused on noise reduction. I was able to start using a noise reduction method similar to the algorithm used by Audacity. The technique is called spectral noise gating. Essentially, a clip of pure noise is given to the algorithm to analyze. The FFT is taken in windows and then the algorithm tries to reduce similar patterns in the main audio clip.
    • This method of filtering is great for removing stationary noise. Stationary noise are sounds that remain relatively constant, like hums, hisses, or even more complicated sounds that remain throughout the clip. However, it is not able to cope well with non-stationary noises such as voices, or sporadic chirps.
    • We collected a small sample of noisy data to test on. There are several voices in the background as well as some generic coffee shop sounds. For the reasons described above, the noise was suppressed, especially background hums and some general chatter, but the voices were mostly intact. As a result we has quite a few false positives for keystroke detection.
    • For the test, I first ran our keystroke detection algorithm with high sensitivity on the clip with a simple bandpass filter. I then extracted the noise by taking randomly about ⅓ of the samples between detected keystrokes. I then used the spectral noise gating algorithm and applied this to the bandpass filtered audio clip. I re-ran the keystroke detection with lower sensitivity to reduce false-positives.
    • The result was that the noise was suppressed but of course not completely gone, especially the voices. The main goal is to see if this filtering can help us more accurately separate keystrokes. I sent the filtered data to James to see what kind of difference he can see in the features collected.
    • We would like to be able to remove more noise, however, the voices and other non-stationary sources of noise are very complicated to remove. Some people have had great success in doing so with deep learning model however those are trained to pick out everything except human voice. Training our own model would not be feasible at the moment.
  • Upcoming work #1 description & expectation
    • This week I will continue to refine and study the effects of noise filtering. I will need to collect more data to help further tune the filtering process.
    • I will also be research removing non-stationary noise with the use of multiple microphones. I may be able to have some modest success with the added data of a second microphone to determine what is noise and what is a keystroke.
    • Lastly, I will begin planning our final revision of the PCB. We are aiming for a smaller package size without as many pinouts.

James:

  • Accomplishment #1 description & result
    • In order to collect TDoA data, I made changes to the server to allow connections from multiple sensor boards. Upon connecting, each board is assigned a unique ID, and the timestamp of the connection is recorded. This will allow us to align the beginning of the recorded data in order to perform TDoA analysis.
    • Along with Ronit, we worked on collecting noisy data in order to help improve our noise reduction scheme.
  • Upcoming work #1 description & expectation
    • Using the three working boards we currently have, I will begin collecting keystroke recordings with TDoA data next week. I will then be able to perform TDoA analysis using the code written earlier in the semester using gunshot data. I will attempt to recluster the data with the TDoA as an additional feature.
    • The board is responsible for ending the connection and allowing the server to write the data out to a .wav file. This is currently handled by resetting the board manually. In order to allow the board to automatically power down and sleep in the absence of noise, we are currently planning on utilizing the Vesper wakeup microphone to kick a watchdog timer. Ronit has already begun working on this portion of the system.

Ronit:

  • Accomplishment #1 description & result
    • We narrowed down our trouble with our machine learning to having non-representative data. Our previous data was collected improperly.
    • Additionally, we were not performing enough noise reduction.
    • I worked with James to collect some noisy data for Kevin to test the new noise reduction technique
    • In parallel, I got the ESP32 to work with the wakeup microphone.
    • Now when there is no background noise, the wakeup microphone is switched on and the processor goes into deep sleep. The oscillator, execution units and sram are clock gated and consume no energy.
    • When there is noise in the environment detected above a preset threshold, an interrupt is generated that brings the processor out of deep sleep to resume its normal actions.
    • We will order a power analyser next week to measure more accurately how much power is saved, but preliminary experiments using the oscilloscope show that the power savings is around 20%.
    • We now need to modify the network stack to recognize when the processor is in deep sleep mode.

 

    • Upcoming work #1 description & expectation
    • There needs to be a last bit of tweaking to the network stack to support tdoa data and the sleep modes on both the processors.
    • Next week will involve a small portion of work on the network stack, and then the remaining work to the machine learning

 

Team

  • Accomplishments
    • After testing we verified the new PCB is working with the modifications discussed last week. We are able to obtain data from the main microphone over WiFi while powered by the battery. We also confirmed the Vesper mic is working. Everything is getting the proper voltage. We believe the battery charging system is working, but further testing may be required.
    • More progress was made in the signal processing side. We are tuning the keystroke detector and exploring noise reduction options.
    • The server is being updating to handle TDoA data.
  • Upcoming
    • We will be collecting more data to aid in refinement and further development. We need data for TDoA, noise reduction, clustering, and machine learning.
    • We have our demo on Wednesday and will be showing the data collection and networking portion of our project.
    • We will be refining our feature extraction, clustering, and machine learning this week to prepare for integrating everything together.
  • Changes to schedule
    • We are behind on integration since all of the parts are not fully complete yet. Most of this week will be focused on getting everything ready for integration.

Week 4 and 5 update

Kevin:

Update for week 4

  • Accomplishment #1 description & result
    • This week our first revision of PCBs arrived along with the parts needed to assemble it.
    • We assembled the PCB using solder paste placed of the exposed pads. The solder paste was placed using a stencil cut from a precise vinyl cutter. The board then went into an oven where a specific pattern of heating is used to properly solder the components.
    • Once out of the oven we fixed a few issues with the soldering, namely some bridges on the power ICs.
    • Upon testing the PCB, we discovered the ESP32 was getting very hot, much hotter than it should be in normal operation. The issue was that 5V was being put into the 3.3V pin on the ESP32. I did not thoroughly read the datasheet for the ESP32 and thought 5V would not harm the device, this is incorrect. The boost converter used after the battery manager does does not regulate higher voltages down to 3.3V, instead it only boots up the 3.3V.  This resulted in the 5V coming from the USB going into the processor without being stepped down.
    • We can’t simply supply 3.3V on the power in line because the battery manager needs at more than this to operate and so the output voltage is only about 2V, this also won’t charge the battery.
    • We decided to order another PCB with changes to supply the proper 3.3V needed. We will use a Buck-Boost converter which will step both up and down to regulate the voltage to the processor at 3.3V.
      • I chose to use the TPS63001 chip for this task. It has voltage input range of 2.4V to 5.5V, which matches what we need quite well. The output is fixed to 3.3V with a ripple of about 10mV. The chip has a power saving mode, which we will be using, that lowers the switching frequency when possible.
    • We also discovered one of the the ground pins on the ESP32 was not connected because the ground pour was slightly smaller than expected preventing a connection.
    • We were able to see some data from the vesper mic vout pin since the breakout section was working properly.

First revision pre-assembly

  • Upcoming work #1 description & expectation
    • Next week I will be working on finishing the schematic for the new board as well as routing. I will also order the new parts needed for this board and the board itself.
    • I will also begin to research more on background noise reduction
    • If the boards arrive on time we will try to assemble and test those as well.

 

Update for week 5

  • Accomplishment #1 description & result
    • This week I finished routing the new board, Rev 0.2. I kept the breakouts for the ESP32 and the vesper mic. I fixed the ground issue for the one pin the processor and of course added the new buck-boost converter and its peripherals.
    • The board was ordered over spring break along with the new parts.
    • While waiting for the board to arrive, I was able to research more removing background noise from our audio data. I have a matlab filter used for hearing aids I want to try as well as audacity’s noise reduction system. I need to collect noisy data to test these methods. Audacity is open source so the code for their noise reduction system is available in C++ which I may adapt to our needs if it works well. In preliminary tests it appears to work quite well. The user selects an area of the signal that is only background noise and the algorithm does its best to remove only similar sounds without destroying the good signal.
    • The new boards and parts arrived by Wednesday and Ronit assembled it on Thursday morning. We discovered the output of the buck-boost converter was not regulating the output voltage to 3.3V. After careful inspection we found that the feedback pin had to be connected to the output voltage even on the fixed 3.3V version. I soldered a wire on the board between the to pins and it now works very well.
    • The board can be powered from 5V USB or our LiPo battery without issue. At first glance it also appears to charge the battery correctly but more testing needs to be done. Importantly, the board connects to the computer and can be programmed.
    • The Vesper mic appears to react to noise levels as well.
    • We made a quick fix to the old board as well. We soldered a wire into the 3.3V line so we can power the board direction with 3.3V. We need to test if the battery can power it but we will not be able to charge due to the issues discussed in last week’s report.

 

Rev 0.2 Board, main changes are centered around part U2, the new buck-boost converter.

 

  • Upcoming work #1 description & expectation
    • I will be collecting noisy data and looking at the effectiveness of the background noise algorithms I researched this week.
    • If the board bring up goes well, I will start designing out Rev 1.0 for the PCB which will be more stripped down and as small as possible.

 

James:

Update for week 4

  • Accomplishment #1 description & result
    • This week, I worked with Ronit to begin collecting labeled sample data to work on over the break. I began researching different features used and methods to extract them from papers which accomplished similar attacks.
    • Past work has shown that cepstrum features do yield better classification accuracy than FFT. However, we want to test this for ourselves and compare FFT, cepstrum, and a concatenation of both.

 

  • Upcoming work #1 description & expectation
    • In the upcoming weeks, I will work on extracting different features from keystrokes in an automated manner and attempt to cluster different keys based on these features.
    • I will also need to further explore the potential classification algorithms to use. During my research of which features to use, I found a comparison of different classification algorithms and their accuracy. Interestingly, a linear classification model yielded better accuracy on test data than both a neural network and a gaussian mixture model. I will try to compare both linear classification as well as the original strategy we planned on using, k-means.

  • Changes to schedule description
    • No major changes have been made to the schedule. However, we have been shifting responsibilities around as needed in order to allow Kevin to fully complete the next revision of our PCB.

 

Update for week 5

  • Accomplishment #1 description & result
    • This week, I worked more on the feature extraction from the labeled keystroke data. I extracted both FFT and cepstrum features from the entire window of the push peak of the keystroke. I am currently ignoring the release peak as it is less intense in energy and sometimes difficult to pick up in the presence of background noise.
    • Using the FFT and cepstrum features, I attempted to classify a few different letters using k-means. When classifying a combination of ‘q’, ‘a’, ‘k’ and the space bar, I found that both the ‘k’ and spacebar were clustered fairly accurately, yielding no more that 2-3 erroneous classifications out of 20. However, the letters ‘a’ and ‘q’ were misclustered into all four clusters
    • I thus attempted to increase the feature set. I began by taking FFTs and cepstrum features over sliding windows of 5ms with a 3.75ms overlap. Unfortunately, this did not alleviate the issue.
    • I also helped Kevin troubleshoot the newly arrived second revision of the PCB. Unfortunately, there was a missing connection on one of the inputs to the buck-boost converter, and we manually soldered on a wire to bridge the connection. This corrected the issue.
  • Upcoming work #1 description & expectation
    • I will further explore different options and features for classifying the keystrokes effectively. We are currently having some difficulty effectively clustering the data, and this is currently the biggest risk area in the project. I will take a closer look at the previous work done in this area and attempt to replicate their methods as described.
    • We also hope that TDoA will serve as a highly distinguishing feature. Now that we have multiple working sensor packages (both breadboarded and PCB), we can begin to incorporate TDoA data into the clustering.
    • Should we still find ourselves unable to find the correct features to cluster upon, we may need to explore different keyboards, typists, and typing styles.

 

  • Changes to schedule description
    • We are falling behind schedule in terms of machine learning and signal processing. Fortunately, the PCB design has been mostly finalized. This will allow us to fully shift our focus to these areas. Because of the ample time for testing and integration we alloted to ourselves, we should still be on track to complete the project.

 

 

Ronit:

Update for week 4

  • Accomplishment  description & result
    • We collected data for each individual key. We recorded 30 keypresses pressed with the index finger.
    • I worked with James to extract features from the sound. We got some features but decided to work on them further after spring break.
    • I worked with James on keystroke separation, we read the paper Acoustic Keyboard Emanation Revisted Zhung et al. It described a means of extracting keystrokes from a sound clip by creating 10ms windows and examining the the change in the energies.

 

  • Upcoming work  description & expectation
    • After spring break, we will probably have the new batch of PCBs.
    • Once we have a working remote listening device, I will make the processor sleep and only wake up when sound is detected.
    • Once we have a working sensor package, we will need to work on adapting our network stack to support data from two devices, so that we can extract time difference of arrival.

 

  • Changes to schedule description
    • I will be helping James with the machine learning from here onwards, we need to try and reach out MVP as soon as possible

 

Update for week 5

  • Accomplishment  description & result
    • Kevin made changes to the PCB over spring break and ordered new ones.
    • I assembled the PCB, there was some issues with the power management circuit, but we managed to solder a wire on and fix it.
    • I was able to flash our program onto the PCB and connect to the internet.
    • In parallel, I have been working on the machine learning. The problem we are trying to solve is a substitution cipher. Brute force was fast but noise threw it off very easily. We found a naive bayes approach and attempted to use it. It was resistant to noise but was exceedingly slow.

 

  • Upcoming work description & expectation
    • My work going forward will be focused on machine learning and battery conservation on the ESP32, now that we have a working remote listening device, we need to make sure it meets our laid out target of being able to run for 12 hours on one 200mAh battery .
    • We may have to recollect the data, the collecting data by recoding individual key presses may not have been the best idea. Preliminary tests using the clustering algorithm show that letters that are located physically close to each other are being put in the same cluster. This is to be expected, but we were hoping to see more separation.

 

  • Changes to schedule description
    • We are trying to reach our MVP as quickly as possible, we are seeing routes for optimization for the PCB as well as our processing pipeline, we are making a record of them but right now our main focus is on achieving the correctness. These optimizations, especially for the processing pipeline will come in handy when we try to reduce our compute time.
    • We have fallen behind in the machine learning, we will be collectively working on it starting next week.

 

 

Team:

Accomplishment #1 description & result

  • We built the second revision of the PCB, initially it seemed to draw too much voltage and was having the same heating problem as last time. We found out that it was because we left one of the pins on the buck-boost converter hanging that we should have tied to the output. We managed to fix this with a botch wire.
  • We also managed to program the board and run our program on it. Next week we will be testing the microphone and making sure the peripherals work as intended.
  • James managed to extract cepstral and fft features. He ran K-means clustering on it, but it yielded poor separation on keys that are physically close to each other on the keyboard.

Upcoming work #1 description & expectation

  • After spring break, we need to try and get our new pcb working. It should work now that we use a buck boost converter.
  • We need to extract features so that we can begin the machine learning. We will be using cepstral, fft and TDoA to cluster the features.
  • We also hope that TDoA will serve as a highly distinguishing feature. Now that we have multiple working sensor packages (both breadboarded and PCB), we can begin to incorporate TDoA data into the clustering.

Changes to schedule description

  • There will be a major shift from embedded coding and PCB design to machine learning and signal processing. We need to achieve our MVP as soon as possible so that we can begin refinement and testing.

Any other major change to your project on a high level

  • There are no major changes to the project at this moment.

 

Team:

Accomplishment #1 description & result

  • We built our first revision of our PCB, Upon testing the PCB, we discovered the ESP32 was getting very hot, much hotter than it should be in normal operation. The issue was that 5V was being put into the 3.3V pin on the ESP32. This required switching from a boost converter to a Buck-Boost converter to step the voltage both up and down. A new schematic has been created and the order will be put out soon.
  • James and Ronit collected labeled data for every single key.
  • James and Ronit implemented the keystroke separation as described by the paper by Zhung et al. After some noise reduction, we were able to get the keys separated rather well.

Upcoming work #1 description & expectation

  • After spring break, we need to try and get our new pcb working. It should work now that we use a buck boost converter.
  • We need to extract features so that we can begin the machine learning. We will be using cepstral, fft and TDoA to cluster the features.

Changes to schedule description

  • We will try to get the machine learning as soon as possible, as we think it will be the most challenging portion of our project.

Any other major change to your project on a high level

  • There are no major changes to the project at this moment.

 

Status Report 3/2

Kevin

Accomplishments

  • This week I spent time on preparing for our Design Review presentation on Monday. Our presentation will server a good beginning for the content in our Design Document. I have also begun to work on the Design Document. I generated the BOM for our PCB and ordered the necessary parts. I ordered enough to make 5 complete boards. This is mitigate problems with components breaking and we will also have most of the parts on hand for our next revision.
  • I made progress on detecting and separating keystrokes. We have found the Matlab Voice Activity Detector was not sufficient in finding keystrokes, especially with background noise. Instead we looked at a few other strategies. The first we tried was using xorr, a correlation algorithm. The goal here is to find every place in the waveform that has the signature pattern of a keystroke. This was not effective and resulted in poor results. The current method is to take a window in the past and find the mean amplitude. We then compare this with the mean of a smaller window looking forward. If the difference is significant, we consider this a keystroke and take a 100ms snippet. Below is an example of a keystroke found this way.
  • While this method appears to be effective, it is subject to problems with background noise, especially voices. James has been working on a new method which focuses on power instead of amplitude and looks for the characteristic pattern of a keystroke, two humps spaced ~80ms apart.

Upcoming Work

  • For this upcoming week, I will primarily be focused on the bring-up of the PCB. We are expecting the PCBs to arrive this week and I would like to have one assembled before Spring break, which starts on Friday 3/8/2019. The plan for this was outlined in the previous weeks progress report. I will be contacting the post-doc we have been working with for some help with assembly. I will also be researching methods of reducing background noise. We may to use both mics in order to complete this task without losing too much data from the keystrokes.

Changes to schedule description

  • We are currently on track with the PCBs. It would have been nice to receive them this past week but unfortunately we were not lucky with the timing. We are slightly behind with the signal processing. Fortunately, the keystroke detection built this week is good enough to efficiently grab keystrokes from long audio clips. From here we can start extracting features and begin using real data for our machine learning side. James is helping out with the next version of the keystroke separation to help speed things up while I move onto noise reduction.

Ronit

Accomplishments

  • Last week, we were having trouble  with getting the ESP32 to sample I2S at the rate we wanted it to. This turned out to be because we were performing several small TCP transactions instead of one large TCP transaction. As a result we were getting bottlenecked in terms of RAM, we were not sending samples out fast enough and we were dropping samples and it seemed as though we were sampling data at a lower rate that we were actually.
  • To fix this, we switched to large streaming transfers and we send raw bytes to the laptop rather than sending ascii text. This required some reconfiguration of the network stack to accept bytes rather than ascii text. Now We are able to record data remotely and replay it back on the laptop in matlab.
  • We did some preliminary testing with music, there was no audible difference between the recorded track and the real track. We also compared the fft spectrums, there was a little bit of noise in the recorded version but we do not anticipate there being any issues with this.

Upcoming work

  • With this, all the embedded code has been written for now, I will now be moving on to writing the deep learning model to translate each of the clusters to letters based on a language model.

Changes to schedule description

  • There are no changes required, I am on track. I will spend some time next week to collect data using the ESP32 in order to help bring Kevin and James back on schedule.

James

Accomplishments

  • In parallel with Kevin, I implemented and researched an alternate method of keystroke identification and separation. In order to identify individual keystrokes, the entire recording of keystrokes was temporally divided into non-overlapping 10ms bins. Subsequently, the FFT coefficients of each bin was used to calculate the energy of each bin, which was then normalized between 0 and 1. A sequence of delta vectors was then calculated by subtracting each bin’s energy with the energy of the previous bin. The delta vectors were then amplitude-thresholded to determine the presence of each feature of keystrokes: two surges of energy followed by rapid falls in energy within a 40ms window signify the key-press sequence. A later surge in energy within a 100ms window then signifies the key-release.

Upcoming work

  • Next week, I will continue to refine the keystroke separation, as well as to be able to isolate the different parts of each individual keystroke, as indicated by the waveform above.
  • Now that we have also fixed the sampling rate issue on the ESP32, we can begin collecting good data from the actual sensor package. In the upcoming weeks, and over Spring Break, I will begin to apply the keystroke separation to larger portions of this data and begin to work with Kevin to extract FFT, cepstrum, and TDoA features.
  • Now that the risk of not being able to obtain good data from the ESP32 over wifi has been eliminated, the biggest risk to the project has shifted to

Changes to schedule description

  • I have fallen behind schedule on extracting features from keystrokes. However, now that we have the sensor package up and running, we can begin collecting large amounts of data to work with. I will make use of the data we collect to work on the feature extraction over Spring Break, in order to catch up to schedule.

Team Status

Accomplishments

  • The major accomplishments this week we were to fix the issues with obtaining data using the ESP32. We were also able to implement a fairly reliable keystroke separator.
  • The largest task completed this week was the preparation for the Design Review presentation and the writing of the Design Report.

Upcoming work

  • In the next few weeks, we will be moving forward with the signal processing and machine learning portions of the project, as the initial PCB design is mostly complete.

Changes to schedule description

  • We have fallen slightly behind schedule due to challenges in obtaining data from the ESP32 over wifi as well as the time spend on composing the Design Report. We will make use of the extra time over Spring Break to catch back up to schedule.

High-level Project Changes

  • No major changes have been made to the project as of now. We are, however, exploring modifications to the noise reduction and keystroke separation methods.