Solved

Digital upsampling an array...in vb.net

Posted on 2004-08-30
4
445 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Magic Software info 18 131
advertisement module in core php 4 162
creating threads in delphi 1 105
Selenium and Interactive Data Language 3 15
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
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 …

809 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