# Upsampling by zero padding or duplicating sequence

I need to upsample a 2 MHz signal by a factor of 3000 to convert the OQPSK modulated baseband signal to passband. When I upsample by duplicating the elements in the sequence, I seem to get less error compared to padding the sequence with zeros. The frequency spectrum is also better when I duplicate elements whereas with zero padding, the spectrum shows nothing. I am now confused on which way is the right method to upsample a sequence and why.

• It sounds like you're trying to upsample the baseband signal to a rate commensurate with the final RF that you want to transmit it on. This is not how it's done in practice. You generate the signal at baseband, then use hardware to upconvert it to the desired carrier frequency. Generating a several-gigasample-per-second signal so that you can shift its frequency digitally is not practical. Commented May 20, 2015 at 14:19
• Before using hardware to upconvert to the desired frequency, I would like to simulate the same in Matlab and compare this result with the result produced when using hardware. Commented May 20, 2015 at 14:29

:Boggle:
Neither is correct. You should interpolate between samples if you need to convert to a higher sampling rate.
Linear interpolation is easiest, but will cause harmonics to appear in the output.

Linear interpolation with a lowpass filter is better. Use the nyquist frequency for your original signal (before upsampling) as the cutoff for the lowpass.

There are other methods that you can find fairly easily now that you know what you need to look for.

I don't know enough about what you are doing to be certain, but I'm pretty sure that upsampling to that extent shouldn't be neccessary unless you are doing something special - like working backwards from a result to compare to some original signal.

• The purpose for upsampling/oversampling in my case is that I need to perform a passband modulation with a carrier at 2.4 GHz and the baseband signal is sampled at 2 MHz. In order to apply a carrier to the baseband signal so that the peak is now centered at 2.4 GHz, I first need to upsample the Baseband signal to a higher rate and I am doing this in matlab by using the 'Upsample' function which pads zeros. Is this not the right way of doing this? Commented May 20, 2015 at 13:53