USRP Environmental Setup 7~9

Introduction

SDR7-9_10
High-level block diagram of a digital communication system
The basic components involved in transmitting(Transmitter) and receiving digital data(Receiver)
Raw Signal (0100011):
The original binary data that you want to transmit
It’s a sequence of bits, where ‘0’ and ‘1’ represent two different states
Symbol Mapping:
Maps the signal to 0 and 1
At the transmitter, the binary data is first converted into symbols
In the case of BPSK, as mentioned, the bits ‘0’ and ‘1’ might be mapped to -1 and +1, respectively
This is done to prepare the data for modulation
Upsampling:
Widen the interval between signals
Upsampling is the process of increasing the sample rate by inserting zeros between the original samples to increase the length of the data sequence, which is then followed by a filtering process to smooth out the signal
Example:
Starting with the Original Sampled Signal:
You begin with a sequence of symbols, which, in your case, would be the mapped values from your binary data
Let’s say the sequence is [-1, 1, -1], corresponding to the binary sequence 010
Inserting Zeros:
To upsample by a factor of L (L being an integer), you would insert L-1 zeros between each pair of original samples
If L is 3, for example, you would insert two zeros between each symbol
The sequence would now look like this: [-1, 0, 0, 1, 0, 0, -1]
Interpolation Filter (Low-pass Filter):
Inserting zeros isn’t enough because it introduces discontinuities in the signal
To address this, you apply an interpolation filter, which is typically a low-pass filter
This filter will smooth out the signal, removing the high-frequency components introduced by the zero-insertion step and interpolating between the non-zero samples
Effect on the Signal Spectrum:
Upsampling stretches the spectrum of the original signal and creates copies of it
The interpolation filter is designed to keep the original spectrum while suppressing the copies
Resulting Upsampled Signal:
After filtering, you get an upsampled signal with a higher sample rate that more closely resembles a continuous-time signal
This signal can now be more effectively used in further processing, such as pulse shaping for transmission
Take a sequence, upsample it by a factor of 3, and apply a simple filter to smooth the signal
(1)Say the original sequence is [-1, 1, -1] (corresponding to your binary data 010). Upsampling by a factor of 3: (2) Insert zeros
Original: -1 1 -1
Upsampled: -1 0 0 1 0 0 -1
(3)Apply a simple filter to this upsampled sequence to smooth it out
In a real system, this would be a more complex operation
(Often involving a root raised cosine filter or another filter designed to minimize ISI and spectral leakage)
But for simplicity, we can use a basic averaging filter in this example
Pulse Shaping (Root Raised Cosine Filter):
Making the shape of the frequency
The upsampled data is then passed through a pulse shaping filter
The root raised cosine filter is designed to minimize ISI, as it has properties that cause the pulses to have minimal interference with one another
Pulse shaping is crucial to maintain the integrity of the signal over the transmission medium
Modulation (Carrier Wave Multiplication):
SDR7-9_1
SDR7-9_2
Imposing an input signal onto a carrier wave
Changing the shape of the carrier wave to encode the information we are interested in carrying
This is done by multiplying the data signal with a cosine wave, as indicated by the cos(2πf_ct) term in the diagram, where f_c is the carrier frequency
Moves the data signal up to a higher frequency band suitable for transmission
-Modulating the signal onto a carrier wave is like translating your song into a language that the carrier pigeon understands
You do this by combining your song with a special type of wave (the cosine wave, which is a smooth, up and down wave).
This process changes the original “low” frequency of your song to a “higher” frequency, something the pigeon is better at carrying over long distances without losing the tune amidst the noise
-Multiplying the data signal by a cosine wave adjusts the frequency of your data so it can travel better through the communication channel (like air, cables, or whatever space it needs to cross)
This higher frequency is less likely to be messed up by noise and other signals that could interfere with your song on its journey to the loudspeaker. Once the song reaches the other side, it can be translated back into its original form so it can be played loud and clear
Example:
3RF Characteristics
Amplitude:
SDR7-9_7
(Ref:https://primaryscienceonline.org.uk/glossary-of-terms/amplitude/)
Height of the wave
The bigger the waveform, the more power it has
Frequency:
SDR7-9_6
(Reference: https://www.britannica.com/science/radio-frequency-spectrum)
Cycles per second, or complete waveforms in each second
-RF spectrum and there are different frequencies within the spectrum
-In order to transmit(Speaking at 2.4GHz) and receive a signal, need a receiver(Listening at 2.4GHz)
Need to listen at the same frequency as we were transmitting
-Measured in Hertz
-Cps(Cycle Per Second):
Phase:
SDR7-9_5
(Ref:https://www.quora.com/What-exactly-are-in-phase-and-out-of-phase-in-terms-of-waves)
Where the phase is in the given moment
Show you a signal and it is flowing through the air, that is a single signal
But if I have another signal with the same frequency traveling through the air as well, they have a relationship if sharing the same space
SDR7-9_4
(Ref:https://www.quora.com/What-exactly-are-in-phase-and-out-of-phase-in-terms-of-waves)
In-Phase
Two signals match up exactly. Additive and makes the signal more powerful
Same words at same freq, at the same time, strong voice
Out-Phase
Another signal, and it is a little bit out of phase, works against each other and reduces the signal strength, interfering with each other
-180 degrees out of phase, they cancel each other out, having a loss of signal at that point
(Wave itself is 360 degrees, a complete circle)
Reference:
https://www.cbtnuggets.com/blog/technology/networking/frequency-amplitude-phase-3-rf-characteristics
AM example
SDR7-9_4
Input signal which its height varies according to the loudness of our voice
Add this input signal to the pure carrier wave, then the carrier’s amplitude will change corresponding to the input signal that is fed into it
FM example
DR7-9_9
Change the frequency of an input signal, if we add input signal to the pure carrier wave, the frequency of the carrier wave will be changed
Changes of frequency to carry our speech information
=> Any strategy which combine some systematic fashion, input signal with a carrier wave is called a Modulation Scheme(Analog or Digital)
Reference:
https://www.taitradioacademy.com/topic/how-does-modulation-work-1-1/
Fading Channel:
The signal, now at a higher frequency, is transmitted over the channel
During transmission, the signal may suffer from fading, which means its amplitude might decrease due to various factors like distance, obstacles, etc
-A fading channel, is a type of communication channel where these kinds of variations in signal strength happen regularly
It’s not a stable channel where the signal stays the same; instead, it’s dynamic and changes based on where you are, what’s around you, and even the current weather conditions
Noise:
As the signal travels through the channel, noise is added to it. This noise can come from various sources and causes degradation in the quality of the received signal
Receiver Processing (Downsampling, Synchronization, Matched Filter): At the receiver, the noisy signal is processed to retrieve the original data
Matched Filter:
The received signal is then passed through a matched filter, which is designed to maximize the SNR
This filter is essentially the mirror image of the pulse shaping filter used at the transmitter
It also helps to correct for the dispersion of the signal caused by the channel
-The matched filter is the optimal linear filter for maximizing the signal to noise ratio (SNR) in the presence of additive stochastic noise
What the Matched Filter Does
Maximizing the Signal to Noise Ratio (SNR):
Amplifies the sound of your whistle when it comes back to you but doesn’t amplify all the other noises
This makes your whistle sound louder and clearer compared to the background noise, making it easier for you to pinpoint your friends
Optimal Linear Filter:
“Optimal” means it does the best possible job at distinguishing your whistle from the noise. “Linear” refers to the way the filter processes the sound signals, which is in a straightforward manner without changing the essence of the whistle sound
Additive Stochastic Noise:
Random noise added to your signal
The matched filter helps by focusing on the pattern of your whistle and ignoring everything else that doesn’t match
Reference: chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://ee.eng.usm.my/eeacad/mandeep/EEE436/chp%203.pdf
Frequency & Time Synchronization:
The receiver must adjust for any frequency offset between the transmitter and receiver to ensure the received signal is correctly aligned in time and frequency
This means the receiver will attempt to make the frequency offset exactly 0
Down Sampling
Shrink the interval between signals
Example:
(1)Original Sampled Signal:
Start with your sequence of symbols, say [-1, 1, -1]
(2)Low-pass Filtering (Before Downsampling)
Before you actually remove samples, you apply a low-pass filter to the original signal
The filter helps to prevent “aliasing,” which in this analogy is like making sure the photos don’t look jumbled or confusing when viewed in a smaller size
The low-pass filter smooths out the signal, removing high-frequency components that could cause interference in the downsampled signal
(3)Reducing the Sample Rate:
Downsampling by a factor of M means you will keep only every M-th sample and discard the others (like choosing to keep every third photo and removing the others)
If M is 2, you will keep every second symbol
From our sequence, if we downsample by a factor of 2, we might keep the first and third symbols, so it looks like [-1, -1]
(4)Effect on the Signal Spectrum:
Downsampling compresses the spectrum of the original signal
The low-pass filter ensures that this compression doesn’t mix different parts of the signal spectrum together in a way that would corrupt the signal
Resulting Downsampled Signal:
After filtering and removing samples, you end up with a signal that has a lower sample rate
It’s like your smaller, more manageable photo album that you can easily share. This signal still represents your original data, but with fewer details, making it more suitable for certain applications or for transmission over limited bandwidth
Symbol De-Mapping:
Restore it to a signal from a frequency
After filtering, the signal is downsampled and the symbols are recovered
This involves making a decision on whether a given symbol is closer to -1 or +1, thus restoring the original binary sequence (0100011)
Footnote:
Frequency offset:
Discrepancy between the expected frequency of a signal and its actual received frequency
This can occur due to a variety of reasons, such as Doppler shift due to relative motion between transmitter and receiver, inaccuracies in oscillator frequencies at the transmitter or receiver, or propagation delays
Pulse:
Single sudden and intense change that occurs in a wave or in a phenomenon that repeats at a regular interval
ISI(Intersymbol Interference):
Problem that occurs in digital communication when one symbol, or pulse, interferes with subsequent symbols
This interference happens because the symbols or pulses overlap, making it hard for the receiver to tell them apart
Carrier wave:
Continuous electromagnetic radiation, of constant amplitude and frequency, that is given out by a transmitter

QAM Modulation Simulation/Implementation

QAM(Quadrature Amplitude Modulation)
Most common modulation modern radios se

Frequency offset to 10
It moves, meaning that the synchronization is not done properly
100 100

ASK Modulation Configuration/Simulation

Amplitude Shift Keying
-Amplitude 조절 가지고 데이터 송수신

PAM Modulation Configuration/Simulation

00 -> 01 -> 11 -> 10
1 bit difference

BPSK Modulation Configuration/Simulation

Binary Phase Shift Keying
-2분법을 Phase로 Shift한 변조법

Differential BPSK Modulation Simulation/Implementation

빛 변환 따라 바뀜
Time recovery 성능이 좋으면 좋지만
변환시 shifting을 해서 정보 recovery

Differential Encoder

Enter usrp -> USRP Sinc
Vlaue: 2.45e9
Sync: No sync
center_free:

Low pass filter 지우기 ->

Reference:
https://www.geeksforgeeks.org/bpsk-binary-phase-shift-keying/

https://github.com/bastibl/gr-ieee802-11
https://github.com/greatscottgadgets/gr-bluetooth
https://github.com/drtyhlpr/ble_dump
https://wiki.gnuradio.org/index.php/Tutorials
(Writing the Yaml for the block)
https://wiki.gnuradio.org/index.php?title=Creating_Python_OOT_with_gr-modtool
https://wiki.gnuradio.org/index.php?title=Creating_C%2B%2B_OOT_with_gr-modtool