Why OFDM schemed signal do not looks like an expected OFDM? - gnu

I was trying to transmit and recive a signal using OFDM transmission scheme. But when I plot the transmitted signal, it didnt behaves as expeted. Can anyone give some suggestions for this ?
My transmitted signal appears as this: Transmitted plot
Thanks in advance.
Expected the output frequecy plot as like this :Expected plot
I am not sure whether I am getting the right plot or not. Please provide me suitable suggestions.

Related

Realtime Audio Processing with FFT

So I'm doing real time Audio processing in Python. The good news is, i found this link, which helps me collect data from my PC mic, and plot all the data in real time which is fantastic.
I also found this code from other links, where i can stream the data from Mic to Speaker for a given time.
self.stream=self.p.open(format=pyaudio.paInt16,channels=self.CHANNELS,rate=self.RATE,input=True,
output=True,frames_per_buffer=self.CHUNK)
def stream_data(self):
for i in range(0, int(self.RATE / self.CHUNK * self.RECORD_SECONDS)):
data = self.stream.read(self.CHUNK)
self.stream.write(data, self.CHUNK)
Where my idea diverges from the above link is, I want to apply an FFT to the Microphone data before i send it to the speaker. if I print the 'data' from the above code, i see that it is a whole lot of hexa gibberish that has to converted to decimal format. From the earlier link, I know how to do that as well
data = np.frombuffer(self.stream.read(self.CHUNK),dtype=np.int16)
I have the data that I need in decimal format. But now that i have this data, how can i convert it back to the hexa format after processing, that 'self.stream.write' can understand & output to the speaker. I'm not sure how that gets done.
i believe I've been able to find an answer. so if this might help someone else as well, here is a paper that helped me.
Real-Time Digital Signal Processing Using pyaudio_helper and the ipywidgets

How to write the function to lit LED on sense HAT simulator

I am trying to light a LED on senseHAT simulator. In the documentation it says we have to provide the coordinates and the color in the ,, format. But it doesn't mention how we need to set the msg.payload value inorder to actually lit the simulators LED. I have been searching for a while and I couldn't find any examples using nodeRED. All the examples available are done using python API.
The documentation of the nodeRED senseHAT simulator provides only the value formats.
msg.payload="0,0,#001100";
where x=0 and y=0 are the coordinates of the 8x8 LED Matrix, which values from 0-7
You can append multiple commands in single msg.payload using \n
For example:
msg.payload = msg.payload+"\n0,1,#1100000";

In Tizen, Orientation sensor value is always -1

By using Sensor API, I want to get the Orientation sensor values.
(sensor.h)
I followed tutorial (URL: https://developer.tizen.org/development/tutorials/native-application/system/sensor?langredirect=1#retrieve), wrote same code except selecting Orientation sensor.
Lastly, when I called 'seonsor_listener_read_data()' function, I got just '-1'
But I knew the azimuth range is 0 <= and <= 360. I think it's weird.
Before I googled, somebody said that it might be broken sensor. But I'm not sure.
Any guys know how to solve it? or know reasons?
The Gear S2 doesn't support the orientation sensor.

USRP Overflow Detected and FFT scale

I've read this is no big deal but it's really annoying. I'm plotting a 40Mhz BW at 20MSPS. This is a N210 and I'm connected through a switch.
It seems to plot fine but the scale on the Y-axis is constantly changing. Can I fix this?
Finally, the X-axis is from 0 to 500e-3. This makes no sense to me given my settings. Can someone please help me understand this?
In response to the question, "It seems to plot fine but the scale on the Y-axis is constantly changing. Can I fix this?" you can bring up the plot menu using the small down arrow on the plot view. From there select Settings... and under the Plot section there are places for the plot min and max, which default to AUTO.
USRP Overflow detected; I've read this is no big deal ...
It really is a big deal. It means your PC was not fast enough at processing the samples that came from the USRP, so some samples had to be dropped. This is the worst that can happen to your signal.
You will need to make your signal processing faster (for example, instead of processing everything live first storing things to an SSD and then later process stuff offline, or buy a significantly faster PC, if you think that would help with your specific application), or reduce the sampling rate.
I'm plotting a 40Mhz BW at 20MSPS
Nyquist says you're not. You can't observe 40 MHz bandwidth with 20 MS/s, it's mathematically impossible.
It seems to plot fine but the scale on the Y-axis is constantly changing. Can I fix this?
I don't know the graphical sinks of redhawk, but this sounds like autoscaling, so yes, probably you can disable that feature.
Finally, the X-axis is from 0 to 500e-3. This makes no sense to me given my settings. Can someone please help me understand this?
You don't tell us what you're plotting. Time values, given some trigger, converting complex samples to their magnitude? Or is it some kind of power spectrum?
In the later case, this is most probably normalized frequency for a real signal; you have to read it as "frequency in units of sampling rate".

Using cross-correlation to detect the beginning of a signal

I am using cross-correlation to find where an audio signal occurs within a recording. When doing this, the point of highest correlation is always found somewhere within the signal in the recording, but I'm looking for a way to find the point where that signal BEGINS in the recording. Does anybody know of a way to go about doing this, or if cross-correlation will even do the job? Thanks in advance.
If your signal is stationary, then instead of looking for a maxima using a single cross-correlation window, try looking for a maximum difference between 2 adjacent signal-sized cross correlation windows. If the prior window shows a very low correlation, and the current window shows a very high correlation, then the likelihood that you are right at a transition edge is good.

Resources