Weekly Status Report #7: 11/03/18

Bobbie

Done this week

This week I wrote a program for interactively running HINT tests. It requires pre-generated audio at varying SNRs, but this helps make the program more portable (as opposed to generating noise at runtime using Matlab).

 

The chest harness did not arrive until very late in the week, so I did not make any progress on that front.

 

Last week we had issues with getting a usable and relatively clean signal out of the electret microphones from Professor Sullivan. I worked on an amplification circuit to bring the voltage values to the range of the Teensy’s ADC, but the signal was incredibly noisy so this was unsuccessful. I did consider building a more complex circuit to try and filter out the largest frequency component of the noise (60 Hz), but I thought this would be not worth the time, as Sean put in the redesigned PCB order so we should have it early next week.

 

I also walked Kevin through some of the utility code for generating test signals that I had written earlier in the semester. This highlighted the fact that a lot of the code I had written was not very well documented, so that is something I will work on going forwards.

Goals for next week

  • Build mount for microphones to attach to the purchased chest harness
  • Document existing Matlab utility code
  • Convert SDW-MWF Matlab code to C using Matlab Coder and adjust for inputs and outputs to be taken in real-time

Kevin

Done this week

This week I worked on refining the matlab code for adaptive beamforming.  The matlab implementation uses frost beamforming and is now successfully able to take a linear, uniform array of microphones of arbitrary elements n and implement frost beamforming on multiple voice inputs.  The code in the link given below is able to take a specific “steering angle”, in our case 0 degrees because the signal of interest is targeted to be directly in front of our user, and reduce the signal inputs coming from other directions. 

 

The link to the matlab file is the following:  https://drive.google.com/drive/folders/1E8JMs5zqOZoTGYU2UY8XqLxLb3x19juc?usp=sharing 

If you download and run the file, you should be able to hear two different audio outputs.  The first one is the sound from all three audio files.  You will notice that the laughter noise drowns out almost all other noise, making the speech files inaudible.  The second audio output is after frost beamforming is applied.  You will notice that the speech file is very audible.

Goals for next week

There are several elements of the code that need to be further explored.  First, I utilized diagonal loading which is a MATLAB built-in that I read can help robustness of beamforming.  I noticed that utilizing this helped make the output audios more clear and understandable. My goal is to look deeper and understand what diagonal loading does and how it improves robustness.  Additionally, we have yet to receive our new PCB boards, so the goal is to test this code on real microphone inputs once we build our microphone circuits.

 

Sean

Done this Week

This week, we realized our PCBs for our microphones wouldn’t work due to some of the traces overlapping with a ground pad, so I redesigned the PCB to have a via through to the other side of the board to avoid this issue. I soldered the audio shield to the Teensy board, and got audio output working through the shield to headphones.

 

I tried to get audio working with the mics professor Sullivan gave us, and the audio input on the Teensy worked, but the mics were too noisy to get any meaningful audio from them.

 

I also got a 3.072 MHz clock output from the Teensy that we can use to drive the data input from the surface mount microphones.

 

Goals for Next Week

Once we get our second iteration of the PCBs, I will start to get audio input from them onto the Teensy.

 

I will work with Kevin and Bobbie to convert their working audio processing functions into C/Arduino code that we can put on the Teensy.

 

Weekly Status Report #3 10/06/18

Bobbie

Done this week

This week we received the parts for the test environment (minus the mannequin) and got the test environment set up and outputting. This required some research into getting IEC958 (S/PDIF) devices working with Ubuntu, but I got it after a little trial and error (images on next page).

 

In the images you can see that the speakers are quite close to each other. We might need some extension cables to get the speakers farther apart, but I think we should wait until we see if that’s a problem or not. Until we get the mic hardware set up, we can use the Matlab script I wrote last week to simulate sounds from this speaker setup.

Goals for next week

  1. Generate some test files using Matlab speaker geometry script (this should be very fast)
  2. Start working on signal processing side of things

 

Kevin

Done this week

This week we started by collecting speech files to test in a basic MATLAB simulation.  We now have approximately 100 test files of different people speaking syllables/words/phrases that we can use for not only our MATLAB simulation but also our final hearing test.  Additionally, we have started with our basic MATLAB simulations to narrow down the specific adaptive noise cancellation methods we will use. After attempting and tweaking multiple different variations of ANC, we decided to start with a simple Least-Means-Squared (LMS) ANC algorithm that would be both fast and simple to implement.  

 

Below are two examples of our algorithm on two different test signals.  

We found that this algorithm works much better when noise (reference) does not greatly affect desired signal (pretty obvious).  Additionally, the two greatest factors in accuracy of our cancelled signal depended on both magnitude and period of the noise signal (ex. If reference signal has much smaller period than desired, you get cleaner cancelled signal).  

Goals for next week

  1. Refine current ANC algorithm to handle more use cases
  2. Start considering how to implement ANC algorithm with multiple microphones

Sean

Done this Week

This week we received our surface-mount microphones. They are extremely small, so we need to create a PCB that will allow us to attach wires to it for testing. This week I designed a first draft of the board in Eagle with a premade solder footprint of the INMP621 microphone and attached it to screw-in wire pins. This will make it easy for us to try different wirings in the building phase. Eventually, I will design a similar PCB with solder pads so we can make the device smaller.

 

Goals for this Week

Sam said he could get me an Altium license, and I would like to try designing the PCB on there. With Eagle, I can’t rearrange the pins in the design, which is fine for the build testing phase, but may become a problem when we try to design a low-profile device.

 

I also would like to start programming on the Teensy board with the Arduino IDE. I will start out with simple audio input/output through the Teensy Audio Shield. I will also start researching libraries we can use to make audio processing easier and faster on the Teensy. Kevin and I will work together to implement an algorithm that is a good balance of effective and efficient. The LMS algorithm he is currently testing is fast, but may have some trouble working in our desired testing environment, a loud room, since the frequencies of the desired signal and the noise will be similar, since both will be human voices.

Weekly Status Report #2 9/29

Ordering Parts (Sean & Bobbie)

This week we ordered several parts to begin creating our physical test environment and directional hearing aid.  For our test environment we ordered dual speakers along with a USB hub power source and USB 7.1 Channel Audio Adapter to output our test recordings to individual speakers.  We also ordered a mannequin torso to mount our directional hearing aid on. The total budget spent on this test environment so far is $140.65. (Bobbie)


For our directional hearing aid, we purchased 8 omnidirectional microphones to mount on our test torso.  We also ordered a Teensy 3.6 microcontroller, 4 Teensy Audio Boards to receive microphone inputs, and 8 headers to attach the audio boards onto the microcontroller.  The total budget spent on our hearing aid components is $118.65. It is important to note that we ordered extra parts in case of changes or issues moving forward. (Sean)

Generating Test Environment Recordings (Bobbie)

We moved forward with our test environment planning.  Per discussion with Professor Sullivan in lab, we decided to build out basic matlab simulations to generate signals and sound delays given arbitrary speaker & microphone placements.  Below is a screenshot of sample MATLAB code written by Bobbie Chen:

Signal Processing (Kevin)

We are continuing with our research on adaptive noise-cancellation techniques to implement on Teensy microcontroller.  Several research papers have been read in order to get a better understanding of different potential algorithms that we could attempt to use in our MATLAB simulations.  Some research papers of note include Adaptive Noise Cancelling: Principles and Applications (Widrow, McCool, Wililams).  Looking forward, we aim to have some implementation of ANC for our MATLAB simulation by the end of the week.

Circuitry and Embedded Software (Sean)

We have a general design for using hardware microphones wired directly to the Teensy board’s I/O pins. We are currently doing research on how to read Pulse Density Modulation (PDM) data from the microphones onto the Teensy board. We will start working on assembling the microphones once they arrive, and we will aim to get a signal through the circuitry.

Goals for Next Week

For this following week, we wish to assemble the test environment.  We also aim to begin assembling the hardware for the hearing aids, hopefully getting a loopback from mic to earphones.  With regards to signal processing, our goal is to have some implementation of adaptive noise cancellation implemented by the end of next week in our MATLAB simulation.