Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Digital upsampling an array...in vb.net

Posted on 2004-08-30
4
Medium Priority
?
489 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 86

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 1000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Make the most of your online learning experience.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Loops Section Overview

824 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