Sampling and using the dataStarted by 3 years ago●12 replies●latest reply 3 years ago●185 views
I have been looking through Google, and have not gotten much wiser, so i turn to the experts.
I have a Signal lets say at 393.000 Mhz that has a bandwidth of 50KHZ, that means 393Mhz +/-25Khz.
I place my frequency marker at that frequency using SDR#, and do a IQ Sample. I take that sample to audacity, and inspect what I have sampled. I do a plot, and can see that 0Hz baseband, is in the middle of my signal I was supposed to sample. Did i do something wrong? Is the other half (-fs) overlayed on the +fs, or is it gone? Should I sample on the side of my signal to be sure the full bandwidth of my signal is on the positive frequency side? Surely it should be the intend that i should be able to fetch my 50kHz from that sample, not just the one half, then I would have lost 50% of my information in the signal.
When I place my marker on the center frequency of my signal, and sample, i would assume that is what its recording (+/-) on both sides of center, not just the positive half.
Kim Mortensen - Denmark
What RBJ said about telling us what software you're using. Better would be to tell us what that software actually does with the settings you set.
Having said that:
If the software is doing what it sounds like it's doing, then if you do I/Q sampling centered on 293MHz, and as a for-instance if you sample at 50kHz, then you will get 100,000 independent samples per second, because I/Q sampling takes two independent samples per sample instant.
If you treat that stream of 50,000 I/Q samples per second as a stream of complex numbers, then the content above 0Hz will contain the incoming RF signal above 393MHz, and the content below 0Hz will contain the incoming RF signal below 393MHz.
If you sample those streams and feed them into Audacity, which is designed for normal audio, then it probably won't "understand" that the data you're giving it is I/Q data, and it won't process it correctly -- unless Audacity has features that I don't know about.
To sum the questions above:
The sampling application SDR# (SDRSharp), and its sampling at 1.92Msps, so that should be enough to be on the safe side of the nyquist.
SDR# produces two 8-Bit channels in its recording file, one for I and one for Q. When i open in Audacity i get I and Q in their respective Left and Right, and Its directly visible that the channels are out of phase by 90 - So that part is ok.
It should also be possible to directly open the sample file and replay the full bandwidth, so the information is in the file. and I want to isolate my bandwidth, so only see my signal within the bandwidth, and im not sure what is the normal approach for this?
I would assume i should use the 0.8*BW low pass filter, but that would only work if the signal is centered around 0. But will that lowpass filter also work on the negative side of the 0Hz..
If i select the two channels in audacity, and make frequency plot, i only have the positive half of the signal. from the marker and up. which leaves me to think the negative part of the signal is not used in audacity, and therefore the information within the negative part is lost. Or is it that Audacity only shows the positive?
It has been some time, so maybe this is not entirely correct, but to my knowledge it is like this:
I your rf bandpass signal is centered around fc, and you multiply (frequency shift) this signal with cos(2pi fc t) for the I part and sin(2pi fc t) for the Q part, then this will shift your rf signal to the baseband and since there are no negative frequencies, you will get your upper half, BUT sin and cos mirror the negative side of the spectrum differently into your baseband, so the information below fc is mirrored into the Q part of the signal
First, someone here will be able to answer all of your questions. But to do so we need to know EXACTLY what is the nature of your signals at EACH stage of your processing, and EXACTLY what signal processing is taking place in EACH stage of your processing.
It sounds like you tuning your SDR to some RF carrier frequency and the I/Q sampling performs "quadrature sampling" which translates your RF signal down in frequency to produce an x1(n) complex-valued sequence (an I/Q sequence) that is centered at zero Hz. That x1(n) signal is what we would traditionally call a "baseband signal."
The first two questions are: What is the sample rate and what is the bandwidth of the complex-valued x1(n) baseband signal?
I suspect that the real part (I) and the imaginary part (Q) of your x1(n) signal each need to be passed through identical lowpass filters to limit the bandwidth of the x1(n) signal, producing a complex-valued x2(n) signal. By "limit the bandwidth" I mean "attenuate all signal and noise energy except your signal of interest". Am I correct that such lowpass filtering takes place and a narrower-bandwidth x2(n) signal is produced?
kimfmx, you wrote: "But will that lowpass filter also work on the negative side of the 0Hz." The answer is yes. Lowpass filters have a passband bandwidth that extends from some negative frequency cutoff up to some positive frequency cutoff.
I also suspect that the x1(n) signal, and the lowpass-filtered x2(n) signal if it exists, have spectra that are "symmetrical". By symmetrical I mean that the negative- and positive-frequency spectral components are mirror images of each other. Am I correct that x1(n) (and the x2(n) signal if it exists) has a symmetrical spectrum?
"If i select the two channels in audacity, and make frequency plot, i only have the positive half of the signal. from the marker and up. which leaves me to think the negative part of the signal is not used in audacity, and therefore the information within the negative part is lost. Or is it that Audacity only shows the positive?"
I don't know exactly what your Audacity software is doing, but know this: If Audacity is computing the spectrum of a real-valued signal (be that signal your I signal or your Q signal) the computed spectrum will be symmetrical. Which means the negative- and positive-frequency spectral components are redundant mirror images of each other. In this case the software may only be plotting the positive-frequency part of the computed spectrum. (No need to plot the negative-frequency spectral components because they contain no information beyond the information in the positive-frequency spectrum.)
kimfmx, keep asking questions, and don't worry, we'll figure all of this out.
Good to know that people are willing to help. Eventhough these questions seems basic for those who work with it all day, Its not so easy for someone who is in another trade, but wants to learn. I kind of get it, but there are some fundamentals i need to have hammered down.
I have made an actual case - Images below.
SDRSharp, in Quadrature sampling.
The sample frequency is 1.92 samples Pr second.
Center frequency is 425,85Mhz
Bandwidth is 25Khz.
When I sample this, and put it in Audacity, i get the below picture. The signal is now half, as can be seen by the ~12.5Khz marker.
I want to dig into the signal on the screen only, and therefor want to remove everything above and below the bandwidth, Can i just apply a low pass filter to cut off everything above 12.5Khz (* 0.8), and im good, or do i have to transmo-morth-move the whole spectrum up into the positive plane and do a low pass filter on 25Khz to be sure i have all the information. As can be seen in the first picture, the sides of the signal is not mirror images, so they contain different data - so this must be preserved.
If you want to centre the signal on dc as complex signal (not real) you will see the asymmetry. Your tool seems pushing band to dc as real only.
Hi kimfmx. Sorry for my delayed reply.
We can definitely answer your questions. But please know, we are not exactly sure what signal processing your are performing, and we do not know what your two spectral images represent. We need more information. Regarding your March 18th Reply:
(1) I'm assuming your first spectrum (top image) is the spectrum of a "real-world" information-carrying radio frequency (RF) signal. Is my assumption correct?
(2) If my assumption is correct, is that RF signal an amplitude modulated (AM) signal or perhaps a frequency modulated (FM) signal?
Your second spectral plot (bottom image) puzzles me, ...a lot!
(3) The freq-axis tick mark spacing is 50,000 Hz per division, but where is the zero Hz point on the frequency axis?
(4) There is a freq axis label of "29 Hz". What does the "29 Hz" label mean?
(5) Your text mentions a "12.5 kHz marker" but I don't see a 12.5 kHz marker on you spectral plot. Where is the 12.5 kHz frequency point on the freq-axis of your second spectral plot?
(6) Your second spectral plot is the spectrum of some signal sequence that I'll call "x(n)".
(7) What is the origin if the x(n) signal sequence?
(8) Is the x(n) signal a real-valued signal sequence or is it a complex-valued signal sequence?
(9) What is the center frequency of the x(n) signal?
(10a) In your text you wrote: "I want to dig into the signal on the screen only, and therefor want to remove everything above and below the bandwidth". What do your words "dig into" mean?
(10b) What do your words "signal on the screen" mean? What "signal" and what "screen" are you referring to?
(10c) What do your words "below the bandwidth" mean? What bandwidth?
(11) Is your goal (your desire) to AM demodulate or perhaps FM demodulate your original RF signal?
1) yes, its the spectrum of the signal, the light gray box encapsulating the signal is the bandwidth of 25Khz.
2) The signal is pi/4 DQPSK Signal so its Phase shift signal. with 4 dots in the constallation plane.
3+4) The graf start at 0Hz. The 29 Hz is very very close to the start, its almost indistinguishable to the 0Hz marker.
5) The first marker on the X axis from 0, is the one i have highlighted with a red arrow, it was difficult to place the marker exact, so its at 12.127 Khz, but should have been at 12.5Khz.
7) Sorry but I dont undestand the question.
8) Well the sample is complex type, split up as left and right channels in a Wav file. I selected both channels when making the plot, but I guess the Audacity program looks at the two channels as two real values, and not as I and Q signals. Audacity is an audio analyze/modification tool.
9) In the top picture the dialog in the middle of it all has data on the centre frequency. 425.8502 Mhz That is what I suppose the 0Hz represents at the bottom photo.
10a) Well.. There are so many examples of using Gnu radio, to do stuff, but I dont want to do it like everyone else, as I would leanrn absolutely nothing, except how to use Gnu Radio. I want to be able to sample the signal, post process it by hand or write the nessesary filters, and end up with beeing able to pull bit information out of it. when i succeed with this, ill be able to write a program to do it from a stream.. i want to learn it, not just have the end result.
10b) The Top image shows the signal, the screen dump is for this question only. I can just turn on my SDR, and i can sample as much DQPSK signal as i need to. But its useless unless i know how to process it properly.
10c) Well that is the big question. To include point 11 in this answer also:
Yes I want to be able to demodulate this signal. I have already written a program to process the data, but im not satisfied with the result, so i need to dig deeper into my signal, and i fear that im making some mistakes in the early step of process.
From what i can undestand, I need to take the following steps to successfulle demodulate the DQPSK signal.
1) Retrieve the sample from the source, in this case I use a wav file to test my concept - I and Q is in left and right channel respectively.
2) The bandwidth of 1.92Mhz is way too much information, and I need to filter out excess noise and signals out of my bandwidth, so ill have to apply a low pass filter limited to 12.5 Khz(*0.8) (Or will it be 25Khz, to catch the 25Khz which extends on both positive and negative side of the 0Hz) - Thats my question.
3) Now I have to introduce a AGC function to normalize the signal (or is that at a later step)?
4) NoW i have to send my band limited signal through a puls shaping filter, a Raised cosine with Alpha of 0.35 (Tetra standard).
5) Now my signal is readable in theory, I need to figure out how to so a clock sync function to know when to do the actual sampling of I and Q, to see where they are in the constellation plane.
(Some people talk about decimation, not sure how that works and at what step that should be introduced, and at what rate - But it should be to remove some sample points, that in turn lower the computational task at hand.)
All of this is possible to implement in C#, and i have done most of it, but im missing out at some critical part. and as i have no "test signal" to compare with, and validate along the process, its a tough round - But I will succees.. I think it fun and interesting, so it will be done.
I think your issue is a basic tool issue. If audacity has setting for complex input then you are done. If not then pass I only and see spectrum then pass Q only and see spectrum then you got both sides.
You wrote: "2) The bandwidth of 1.92Mhz is way too much information, and I need to filter out excess noise and signals out of my bandwidth, so ill have to apply a low pass filter limited to 12.5 Khz(*0.8) (Or will it be 25Khz, to catch the 25Khz which extends on both positive and negative side of the 0Hz) - Thats my question."
The answer is: Assuming your complex-valued (I and Q sequences) signal is centered at zero Hz, design a lowpass filter whose "passband cutoff frequency" is 10 or 11 kHz. And that "design" process will generate numbers, called "filter coefficients" that are used in the mathematical implementation of your lowpass filtering process. Next, you pass your I sequence through the designed filter and pass your Q sequence through the designed filter. You'll be filtering two different sequences and the outputs of your two filtering operations will be a "lowpass filtered I" sequence and a "lowpass filtered Q" sequence.
Then you'll be ready to perform DQPSK demodulation of your "lowpass filtered I" and "lowpass filtered Q" sequences. I'm sorry to say that I am NOT qualified to give you any advice on how to perform DQPSK demodulation.
However, if your DQPSK demodulation process requires you to compute the magnitude of a complex number, |a + jb|, I know a reasonably accurate way to do that without having to perform a complicated square root operation.
kimfmx, I like you enthusiasm!
What utility or application are you using to "place [your] frequency marker"?
And what's your sample rate?