Skip to content

VNA Code Documentation

KoldK9NE edited this page Dec 14, 2018 · 1 revision

Background

Last year we worked on the VNA project for our Electronics II class. We had the goal of making the VNA better, however when trying to take measurements we noticed that the readings were very off. JD was able to program the DMA to gather data at a much faster pace. When the class took on the project of the VNA for our Signals & Systems class we wanted to keep improving upon this project. When looking through the code we see that the buffer controlled by the DMA would write over the first memory buffer.

Troubleshooting

One thing we learned about in class was the the concept of a Discrete Fourier Transform (DFT). This concept is implemented by using code to implement the arithmetic functions. Doing this let’s us use less variables and we saw an increase in speed performance. However there were still problems in our results. Originally TI composer was used or coding but C++ 7 has sets of useful functions, so this is now used for its extensive libraries. The coding team went about it by trying a double float type for measurements but were still getting 0.2% error which is not ideal. So the next step in debugging was to match the frequency bin to correctly represent the mathematical equations used. But errors as high as 23% were observed after 5 to 10 measurements.

After looking through the code it was apparent that the banning window was being calculated incorrectly. After correctly fixing this error we see a drastic decrease in error and were able to measure a standard deviation of 0.02%. In our testing the Device Under Test (DUT) was a wire. Knowing this a transform of 1 is expected. When testing the board created before improvements were implemented from Electronics II we see we would get back a value of 0.85. And when testing one of the revisions created in class using a new Low-Pass Filter (LPF) we saw a value of 0.95.

Flash memory is used for our application as opposed to ROM memory. This is because once the memory is used up, we cannot take any more measurements. For our application we want to keep taking measurements.

Improvements

From these findings we were able to effectively improve on issues regarding he DMA and understanding how it works and how that effects our measurements. Corrections were made upon the code on how the banning window is calculated so we can get expected results. The ability to implement flash has been useful for efficient use of memory storage for our values and calculations. And due to these improvements we have achieved valuable data for a better understanding of how the VNA is operating.

Clone this wiki locally