DSPRelated.com
Forums

Recreating Undersampled Data

Started by Rob Gaddi May 17, 2017
On 5/18/2017 1:02 PM, Rob Gaddi wrote:
> On 05/17/2017 07:01 PM, Steve Pope wrote: >> rickman <gnuarm@gmail.com> wrote: >> >>> If I am understanding your problem correctly, you have a triangle wave >>> with content at 2.0625 Fs and harmonics. I am pretty sure this will >>> alias the fundamental and the lower harmonics into the baseband. The >>> fundamental will be at 0.0625 Fs, the 2nd harmonic will be at 0.125 Fs >>> and so on. Once the harmonics reach 0.5 Fs the apparent frequency will >>> fold back, but since their amplitudes will be low, they should not >>> impact the results significantly. So you should be able to view the >>> data directly treating 0.0625 Fs as the fundamental frequency of your >>> triangle wave. >> >> Yes, but you might want to view the triangle wave signal with the correct >> time-axis, such that it truly does look like the original signal >> as seen on TV (er, as seen on an oscilloscope). >> >> Unless harmonics are aliasing on top of each other, you should >> be able to filter out a pretty good version of the original signal. >> >> >> S. >> > > That makes a lot of sense, and interestingly enough your technique makes > very few a priori assumptions about the signal being sampled; only that > each of the harmonics fits into a narrow bin. Let me see if I've got > this right: > > The idea is that I started with a mostly periodic signal, so all my data > is located in what is effectively pure spectral lines with some sideband > stuff around. > > So my signal has had all the aliases folded on top of the baseband, but > they all still have enough differentiation that you can pick them apart > visually; here's the 2.0625 fundamental at 0.0625, here's the 4.125 2nd > harmonic at 0.125 and so on and so forth. By zero-stuffing the signal, > it spatters identical copies of that spectrum up in frequency, now my > fundamental is at all of 0.0625, 0.9375, 1.0625, 1.9375, 2.0625, 2.9375, > and so on until we hit the new limit of the interpolated frequency. > > Because I know my fundamental is at 2.0625 I can drop a 30 kHz wide > bandpass filter onto the interpolated signal centered at 2.0625 and pick > the fundamental back out. And another one at 4.125 to pluck the 2nd > harmonic, and 6.1875 for the 3rd and so on until the 8th harmonic at > 16.5. Beyond that point all my harmonics have been aliasing back on one > another, 7th to 9th, etc and so my retrieval stops, but a triangle wave > drops off as n^-2 so for my simple visual task they didn't exist anyhow. > > That high of a Q on the bandpass filter is computationally expensive, > but I'm doing it offline so I don't care. The periodic nature of the > bandpass means I could probably speed things up by consolidating the > whole thing into an interpolated FIR but my codeslinging time is more > valuable than my compute time so, again, don't care. > > Because all those bandpass filters can be same-length FIR linear phase > they all have the same group delay, so their results can simply be > summed together, shift that delay back out, and I've got my oscilloscope. > > This is kind of a fascinating answer. I'll give it a try when I get a > chance and see how it turns out.
How will that signal differ from looking at the sampled data directly? -- Rick C
rickman  <gnuarm@gmail.com> wrote:

>On 5/18/2017 1:30 AM, Steve Pope wrote:
>> Let's say the original continuous-time signal has components at 2.0625 >> MHz and 4.125 MHz. >> >> We sample this at 1 MHz by multiplying it by the signal >> >> delta(t - n * 1 usec) , for all integers n.
>> The resulting continuous-time signal has components at 2.0625 MHz and >> 4.125 MHz plus a bunch of aliases of these.
>Perhaps I don't understand what you mean by "a bunch of aliases of >these". The 1 MHz sampled signal will have the alias of the 2.0625 MHz >signal showing up at 0.0625 MHz, no where else.
I'm going to say there are aliases are 0.0625 MHz, and 1 + n * 0.0625 MHz for all non-zero integers n. (Still I have not had my coffee yet ... been sleeping late these days.) Steve
> > I'm going to say there are aliases are 0.0625 MHz, and 1 + n * 0.0625 MHz > for all non-zero integers n. >
i think the already mentioned (under)sampling oscilloscope is the better analogy for this question. i.e. the time domain rather than the frequency domain an (under)sampling scope doesn't need to know the shape of the waveform, it needs to know only that the waveform is repetitive. m
On Thu, 18 May 2017 12:42:18 -0700 (PDT), makolber@yahoo.com wrote:

> >> >> I'm going to say there are aliases are 0.0625 MHz, and 1 + n * 0.0625 MHz >> for all non-zero integers n. >> > >i think the already mentioned (under)sampling oscilloscope is the better >analogy for this question. > >i.e. the time domain rather than the frequency domain > >an (under)sampling scope doesn't need to know the shape of the waveform, it needs to know only that the waveform is repetitive.
Ideally it needs to know the frequency, or, better yet, phase lock to it. Phase locking to a triangle of reasonably known frequency is definitely achievable. --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
rickman  <gnuarm@gmail.com> wrote:

>How will that signal differ from looking at the sampled data directly?
I think you're suggesting the following: 1) Sample the signal at 1 MS/sec 2) Apply a lowpass filter with bandwidth < 500 KHz 3) Observe the signal centered at 0.0625 MHz If so there are many ways this observed signal differs from the OP's desired observation (wrong number of zero crossings, generally wong wavefore). It is however, in the frequency domain, an exact copy of a passband signal centered at 2.0625 MHz. But that's not what the OP wants; they want to see a triangle wave, which is not a passband signal. If you're instead suggesting leaving out step 2, then you have a different set of problems, unless you filter out the unwanted aliases per my suggestion. Steve
On 5/18/2017 3:08 PM, Steve Pope wrote:
> rickman <gnuarm@gmail.com> wrote: > >> On 5/18/2017 1:30 AM, Steve Pope wrote: > >>> Let's say the original continuous-time signal has components at 2.0625 >>> MHz and 4.125 MHz. >>> >>> We sample this at 1 MHz by multiplying it by the signal >>> >>> delta(t - n * 1 usec) , for all integers n. > >>> The resulting continuous-time signal has components at 2.0625 MHz and >>> 4.125 MHz plus a bunch of aliases of these. > >> Perhaps I don't understand what you mean by "a bunch of aliases of >> these". The 1 MHz sampled signal will have the alias of the 2.0625 MHz >> signal showing up at 0.0625 MHz, no where else. > > I'm going to say there are aliases are 0.0625 MHz, and 1 + n * 0.0625 MHz > for all non-zero integers n. > > (Still I have not had my coffee yet ... been sleeping late these days.)
Not sure what you are saying. The fundamental has one alias, 0.065 MHz. The aliases of the harmonics are at other multiples of that frequency. The only limitation (as I said in a previous post) is when the harmonics reach 0.5 Fs (0.5 MHz) where they will fold back to values below 0.5 MHz. But by then the amplitudes are very low. I took your early statement to indicate the fundamental had multiple aliases. Regardless, the time domain signal will show the signal as it was captured. The time base would need to be adjusted to compensate for the aliasing. -- Rick C
On 5/18/2017 4:22 PM, Steve Pope wrote:
> rickman <gnuarm@gmail.com> wrote: > >> How will that signal differ from looking at the sampled data directly? > > I think you're suggesting the following: > > 1) Sample the signal at 1 MS/sec > 2) Apply a lowpass filter with bandwidth < 500 KHz > 3) Observe the signal centered at 0.0625 MHz
Once the signal is sampled at 1 MSPS there is no need to filter at 500 kHz, in fact, this makes no sense since the 1 MHz sampled signal no longer has content above 500 kHz. There is no such thing as a filter for higher frequency content than Fs/2. I am suggesting step 1 and 4 4) observe the time sequence of the sampled signal. It will look exactly like the same signal sampled at a much higher rate, 16 points per cycle of the 2.065 MHz signal.
> If so there are many ways this observed signal differs from the > OP's desired observation (wrong number of zero crossings, generally > wong wavefore). It is however, in the frequency domain, an exact > copy of a passband signal centered at 2.0625 MHz. But that's > not what the OP wants; they want to see a triangle wave, which is > not a passband signal. > > If you're instead suggesting leaving out step 2, then you have > a different set of problems, unless you filter out the unwanted > aliases per my suggestion.
Maybe there is something I am missing. How do you filter a 1 MSPS data stream for content above 500 kHz? -- Rick C
On Thu, 18 May 2017 02:01:57 +0000, Steve Pope wrote:

> rickman <gnuarm@gmail.com> wrote: > >>If I am understanding your problem correctly, you have a triangle wave >>with content at 2.0625 Fs and harmonics. I am pretty sure this will >>alias the fundamental and the lower harmonics into the baseband. The >>fundamental will be at 0.0625 Fs, the 2nd harmonic will be at 0.125 Fs >>and so on. Once the harmonics reach 0.5 Fs the apparent frequency will >>fold back, but since their amplitudes will be low, they should not >>impact the results significantly. So you should be able to view the >>data directly treating 0.0625 Fs as the fundamental frequency of your >>triangle wave. > > Yes, but you might want to view the triangle wave signal with the > correct time-axis, such that it truly does look like the original signal > as seen on TV (er, as seen on an oscilloscope).
Assuming that the frequency is roughly known, that should just be a matter of scaling the "pseudo" time axis correctly. -- www.wescottdesign.com
In article <ofleji$e96$1@dont-email.me>, rickman  <gnuarm@gmail.com> wrote:

>On 5/18/2017 4:22 PM, Steve Pope wrote:
>> I think you're suggesting the following: >> >> 1) Sample the signal at 1 MS/sec >> 2) Apply a lowpass filter with bandwidth < 500 KHz >> 3) Observe the signal centered at 0.0625 MHz
>Once the signal is sampled at 1 MSPS there is no need to filter at 500 >kHz, in fact, this makes no sense since the 1 MHz sampled signal no >longer has content above 500 kHz.
I disagree. At least if one is defining "sampling" in the usual way. The fourier transform of an impulse train is an impulse train, and therefore when you multiply a signal by an impulse train you obtain an infinite number of aliases stretching upwards to infinity in frequency, based on the time/frequency duality of multiplication and convolution.
>Maybe there is something I am missing. How do you filter a 1 MSPS data >stream for content above 500 kHz?
Yes, you're missing something. I did not say 1 MSPS data stream. I said the following:
>>> Let's say the original continuous-time signal has components at 2.0625 >>> MHz and 4.125 MHz.
>>> We sample this at 1 MHz by multiplying it by the signal >>> >>> delta(t - n * 1 usec) , for all integers n. >>> >>> The resulting continuous-time signal has components at 2.0625 MHz and >>> 4.125 MHz plus a bunch of aliases of these.
Emphasis on "continuous time signal" in my last sentence. Now -- this continuous time signal is the sampled, but not digitized version of the original signal. However, it can be approximated to any desired degree starting from the sampled/digitized signal by upsampling the latter. Steve
On 5/18/2017 9:12 PM, Steve Pope wrote:
> In article <ofleji$e96$1@dont-email.me>, rickman <gnuarm@gmail.com> wrote: > >> On 5/18/2017 4:22 PM, Steve Pope wrote: > >>> I think you're suggesting the following: >>> >>> 1) Sample the signal at 1 MS/sec >>> 2) Apply a lowpass filter with bandwidth < 500 KHz >>> 3) Observe the signal centered at 0.0625 MHz > >> Once the signal is sampled at 1 MSPS there is no need to filter at 500 >> kHz, in fact, this makes no sense since the 1 MHz sampled signal no >> longer has content above 500 kHz. > > I disagree. At least if one is defining "sampling" in the usual way. > > The fourier transform of an impulse train is an impulse train, and > therefore when you multiply a signal by an impulse train you obtain an > infinite number of aliases stretching upwards to infinity in frequency, > based on the time/frequency duality of multiplication and convolution. > >> Maybe there is something I am missing. How do you filter a 1 MSPS data >> stream for content above 500 kHz? > > Yes, you're missing something. I did not say 1 MSPS data stream. > I said the following: > >>>> Let's say the original continuous-time signal has components at 2.0625 >>>> MHz and 4.125 MHz. > >>>> We sample this at 1 MHz by multiplying it by the signal >>>> >>>> delta(t - n * 1 usec) , for all integers n. >>>> >>>> The resulting continuous-time signal has components at 2.0625 MHz and >>>> 4.125 MHz plus a bunch of aliases of these. > > Emphasis on "continuous time signal" in my last sentence. > > Now -- this continuous time signal is the sampled, but not digitized > version of the original signal. However, it can be approximated > to any desired degree starting from the sampled/digitized signal > by upsampling the latter.
Ok, so you have gone off the rails. You aren't talking about the OP's problem. You are discussing how many angels can dance on the head of a pin. Just so I understand clearly, if you apply your delta convolution, are you suggesting you then filter this analog signal through an analog filter? Notice early in this post you say, "I think you're suggesting the following:" That is NOT what I am suggesting. If you really want to play games with something other than the ADC sampling of the OP, I'm not particularly interested, at least not unless you explain this clearly. What is the point? -- Rick C