From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

USRP Software Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

DSB-SC demodulation with USRP

Hi All,

I have a problem with DSB-SC demodulator in USRP. I'm using NI USRP-2922 and two vis at TX and RX:

DSP-SC TX.jpg

 

DSP-SC RX.jpg

I try to observe both phase-synchronized and phase-unsynchronized received signals. The phase-synchronized output is supposed to be identical to transmitted message signal while phase-unsynchronized is supposed to be affected by phase distortion. The problem is the phase-unsynchronized output is identical to transmitted signal (!!!) while the phase-synchronized output is affected by noise, which means the result is totally reversed. Here is the outputs:

 Untitled (2).jpg3 (1).jpg2 (1).jpg

Any help would be appreciated,

Kash

 

0 Kudos
Message 1 of 11
(4,430 Views)

Hi khdl,

 

I think you have coded things correctly and maybe just the graphs are mismatched. Looking at your code, the phase synchronization is done to the first waveform in your array and the second waveform is the unsynchronized waveform. Even though the phase synchronization code was at the bottom of your block diagram, it's actually applied to the upper waveform in your diagram. 

 

To make sure you can just have 2 graph indicators in your VI instead of building an array and displaying both in one graph. That can help you clear up any confusion as well. 

James F.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 11
(4,398 Views)

Hi James,

Thanks for your reply. 

I thought so but I used separate graph monitors to make sure they are not mismatched. Look at the results please, they are still the same:

6.jpg

 

4.jpg

 

5.jpg

 

5 (1).jpg

 

I'm sure something is wrong but I can't find it 😞

Kash

0 Kudos
Message 3 of 11
(4,387 Views)

James,

I'm using one USRP and a loopback cable, I mean same USRP for TX and RX so I guess the oscillators on TX and RX are already synchronized  and no phase synchronization is required. That's why the unsynchronized output is identical to message. 

Do you think if I use separate USRP with TX and RX I would get different results?

 

Regards,

Kash 

0 Kudos
Message 4 of 11
(4,378 Views)

Hi Kash,

 

I don't think that would cause the issue you're seeing. What if you left the Median Filter parameters at default values? In addition, what does your Tx code look like? I'm not sure if the Tx code could cause this behavior, but I'm curious to see what it looks like.

 

James F.
Applications Engineer
National Instruments
0 Kudos
Message 5 of 11
(4,349 Views)

Hi James,

I will run the simulation using Median Filter with default values.

For transmitter, I just generate sinusoid signals and scale it down (due to ADC constraint in USRP) then make a complex signal and transmit it over the channel. Here is my transmitter:

original.jpg

 

Thank you for your support,

--Kash

0 Kudos
Message 6 of 11
(4,346 Views)

Hi Kash,

 

Let me know how your testing goes. I don't see any glaring mistakes on the transmitter either so I'm a little stumped on where this error could be coming from especially because you are seeing the right behaviors just on the wrong channels.

 

James F.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 11
(4,327 Views)

James,

Thanks for your follow up.

I ran the Median Filter with default parameters but I didn't see any changes.

I used "Power spectrum and PSD" vi to see the actual frequency of the received message in both synch and unsynch cases. The message signal is a sinusoid with frequency of 10 Hz. Here is the result:

 spec_1.jpgspec_2.jpgspec_3.jpgYou can see the received frequency is 10Hz at unsynch output but we have more than one received frequency at the synch output (5Hz and 15Hz).

spec_1_1.jpgspec_3_1.jpg

I guess there is no phase difference between transmitter and receiver and "phase synchronizer" is only extracting the +10Hz and -10Hz frequency, dividing them by two and adding them to message frequency.

I hope I'm not doing something stupid.

 

--Kash

 

0 Kudos
Message 8 of 11
(4,324 Views)

Hi Kash,

 

I do think the Synch signal you're getting is a little weird. However, I do think the synchronization you're doing is working. The goal of the synchronization you're doing is to eliminate the cos(theta) phase error term. However, the error in theta manifests itself in the form of a gain constant once cos(theta) is evaluated.

 

This means that when looking at your unsynchronized signal, the amplitude could be different every time. However, your synchronized data should have the same amplitude every time. I think that's what I'm seeing from your data. I am expecting the signals from the synchronized and unsynchronized channels to be the same aside from the amplitude. I'm not exactly sure why your synchronized waveform looks so different.

 

James F.
Applications Engineer
National Instruments
0 Kudos
Message 9 of 11
(4,318 Views)

James,

I appreciate your help and support. I agree with your explanation and am not sure why I'm getting this weird result. I'll keep working on that and will update you if I get any kind of reasonable results or if I find out what the problem is. It's a good challenge for me.

 

Thanks again,

--Kash

0 Kudos
Message 10 of 11
(4,315 Views)