Solved

Digital upsampling an array...in vb.net

Posted on 2004-08-30
4
439 Views
Last Modified: 2010-04-17
Hey,

Was just wondering what was the best way to digital upsample an array of numbers....

trying to make an byte array of dynamic size's from 50 to 2000 with values in the 0-254 range...I want result array to be a fixed size of 4096....the realtionship bewteen the index and data must be contained

The array is then graphed with x= the data and(voltage) y = index of array(tiime)

I suppose you could go through each two values, find the avrage and then fill in accordingly.....I am hoping there is an easier/faster way...
0
Comment
Question by:computerfixins
  • 2
4 Comments
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 11933501
Could you explain in a little more detail how the resulting array is generated?  I'm not familiar with the term "digital upsample".

Idle_Mind
0
 
LVL 5

Expert Comment

by:rsriprac
ID: 11937729
I would recommend that you do the display handling in the display part of the code then rather then change the coding logic.  By upsampling it would just create extra overhead and such.  I would normilize all the time data qand multiply with you upscale value (4096), i.e. if you have 250 sample points, and working on point 6, then the x location should be (6/120)*4096.

So basically you are doing the mapping when you are doing the plot rather then a pre-processing the array.  Also if you want finder interpolation (i.e. between sample point), just do a linear interpolation (or whatever suites you data) for the in-between points. (Divided Differences Linear Interpolation)

-Ram
0
 
LVL 7

Author Comment

by:computerfixins
ID: 11941643
Hey,

    The values from the upsampled array are also processed through a fast fourier transform...so the actaul data is needed...

Basically the stem of the problem is the FFT....

FFT is a function that gives you -db response vs mhz when you pass in amplitude and Time
So lets say i pass in 1us or microsecond of data...the atod board hardware contraints make this only 100 datapoints of data
Then i pass in the 100 datapoints to the fft....
the FFT returns 100 datapoints over 100mhz....not too bad....
but then i only want to look at a range of about 5mhz....so i draw my graph accordingly, but i only have about 5 datapoints...
After the FFT is drawn i also do several functions, and manipulate the wave....
0
 
LVL 5

Accepted Solution

by:
rsriprac earned 250 total points
ID: 11941813
MAybe its worth looking into wavelets trasformation since it preserves more details then FFT and you could have better decoding.  Because upsampling doesn't really work unless you know the behaviors of the details and then you run interpolation methods that will not throw off the measure more then normal.

I still say do the re-sampling once you know the graphing parameters.  The other problem is that you are lacking data at 5 data point and upsampling does not really do much except make the graph look more continous.

-Ram
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
strCopies  challenge 17 82
word0 challenge 4 65
drawing animated level bar based on numbers 3 88
program a usb light to turn on when needed 6 48
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now