Solved

Digital upsampling an array...in vb.net

Posted on 2004-08-30
4
430 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Batch file output 20 76
countX 22 68
wordmultiple challenge 12 89
Windows Batch File - Display current time and date in FOR command 8 46
This article will show, step by step, how to integrate R code into a R Sweave document
A short article about a problem I had getting the GPS LocationListener working.
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

763 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

10 Experts available now in Live!

Get 1:1 Help Now