EEVblog Electronics Community Forum

Electronics => RF, Microwave, Ham Radio => Topic started by: uer166 on October 03, 2024, 06:30:34 pm

Title: Chirps, down-chirps and quadrature signals
Post by: uer166 on October 03, 2024, 06:30:34 pm
I'm struggling a bit to understand some LoRa details based on: https://www.youtube.com/watch?v=jHWepP1ZWTk. (https://www.youtube.com/watch?v=jHWepP1ZWTk.)

Specifically:

All that makes some amount of intuitive sense, however when I get into the Matlab script presented in the video and the math, the main confusing thing that emerges to me is:
*both* the symbol (up-chirp) and the basis down-chirp's real and complex time-domain waveforms look similar: they start at a low frequency, ramp up, and then down. If I were to plot it as a frequency plot, they would both look like a up-down chirp, with minor phase differences due to the complex part of one of them being inverted. So, what gives? The de-chirping process was always shown as some kind of multiplication by a opposing direction chirp, but intuitively that doesn't seem to make sense to me, and the Matlab code doesn't seem to agree with that interpretation either.
Title: Re: Chirps, down-chirps and quadrature signals
Post by: Marsupilami on October 04, 2024, 01:09:20 pm
I’m not familiar with LoRa at all, but what you (and the video) might be missing is that complex signals can have negative frequencies. When the signal is on a modulated carrier the up chirp is rising in frequency from below the carrier to above, while the downchirp is falling from above the carrier to below. (Assuming the carrier is at the center of the chirp) However in complex baseband both look the same. This is because the difference between a positive and a negative frequency is encoded in the relative phase of the I and Q components. Depending on whether I leads or lags 90degrees to Q the complex quantity represents a positive or negative frequency.
You should be able to see this when looking at both I and Q of the chirps.

HTH
Title: Re: Chirps, down-chirps and quadrature signals
Post by: Marsupilami on October 04, 2024, 01:14:16 pm
Oh and I forgot:
The reason why the complex conjugate turns an upchirp into a downchirp is that when you negate the Q (imaginary) component of the signal you effectively flip the +90 relative phase to the I component to -90 degrees, thus turning a positive frequency into negative.
Title: Re: Chirps, down-chirps and quadrature signals
Post by: uer166 on October 04, 2024, 08:58:06 pm
I’m not familiar with LoRa at all, but what you (and the video) might be missing is that complex signals can have negative frequencies. When the signal is on a modulated carrier the up chirp is rising in frequency from below the carrier to above, while the downchirp is falling from above the carrier to below. (Assuming the carrier is at the center of the chirp) However in complex baseband both look the same. This is because the difference between a positive and a negative frequency is encoded in the relative phase of the I and Q components. Depending on whether I leads or lags 90degrees to Q the complex quantity represents a positive or negative frequency.
You should be able to see this when looking at both I and Q of the chirps.

HTH

Ah, so the lora symbol and base down-chirp are only a up and down-chirp respectively in up-converted RF, but I am looking at I/Q only. I'll try some experiments mixing up the I/Q signals to RF with 2 mixers and a 90-deg phase shift of LO on one of them to see if that does it (in Matlab).
Title: Re: Chirps, down-chirps and quadrature signals
Post by: Marsupilami on October 04, 2024, 11:48:40 pm
Yep, if you're centered around DC (baseband) you can't tell by frequency alone if it's up or down.
[attachimg=1]

Title: Re: Chirps, down-chirps and quadrature signals
Post by: uer166 on October 09, 2024, 11:24:31 pm
Ah I'm 98% sure I get it now. There's a myriad of confusion when it comes to FFT to me in Octave/Matlab: