WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2016-Nov-29 08:20:26

gmkim
Member
Registered: 2016-Jul-19
Posts: 27

.

.

Last edited by gmkim (2020-Aug-17 20:05:35)

Offline

 

#2 2016-Nov-29 09:13:54

chunter
Administrator
From: Mango Communications
Registered: 2006-Aug-24
Posts: 1212

Re: .

gmkim wrote:

There is "Interpolate" part.
As I know on, interpolation is used when we conduct upsampling and by interpolation we can get the value between given signal.
But in that code, I can't get the in-between value.

1. Is it ok that we cannot get in-between value after that part? I can't understand that part.

In these lines of the example, you can see three different steps of the interpolation procedure:

A. "tx_vec_padded" represents the original 1x rate signal.
B. "tx_vec_2x" represents the original waveform with a zero inserted between every sample .
C. "tx_vec_air" is the filtered version of "tx_vec_2x" where all of the high frequency content of the signal jumping to a value of 0 between every sample has been smoothed away. This is the signal that has the in-between values.

If you are trying to line up tx_vec_air and tx_vec_2x, there are keep in mind the filter operation introduces a delay that is half the length of the filter. Your Tx signal in "tx_vec_air" starts later than it does in "tx_vec_2x".

After running the example script, copy and paste the following into a MATLAB command prompt:

Code:

tx_vec_air = filter(interp_filt2, 1, tx_vec_2x);
close all;
plot(real(tx_vec_2x(1000:1100)),'b-o','LineWidth',2);
hold on; plot(real(tx_vec_air(1021:1121)),'r-o','LineWidth',2);
grid on
axis tight

That should give a pretty good view of the interpolation procedure. You'll see the original samples and the new samples created in-between them. Note: that code snippet re-executes the filter operation because the script normalizes tx_vec_air's amplitude and makes it harder to see how the two signals line up.

gmkim wrote:

2. In "Decimate" part, there is two line.

Code:

raw_rx_dec = filter(interp_filt2, 1, rx_vec_air);
raw_rx_dec = raw_rx_dec(1:2:end);

I think second line is enough to decimate. What is the function of first line?

Raw downsampling without a filter will alias high frequency content onto the lower frequency content that you are keeping. Since you know that anything outside of your intended frequency range is just noise, you might as well filter it out before it gets "mixed in" after the downsampling. Wikipedia has a pretty good writeup of these two steps to decimate a signal in the "By an integer factor" section.

Offline

 

#3 2016-Nov-29 23:18:51

gmkim
Member
Registered: 2016-Jul-19
Posts: 27

Re: .

.

Last edited by gmkim (2020-Aug-17 20:01:05)

Offline

 

Board footer