Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Sorting out noisy signals 4

Status
Not open for further replies.

Danielsp

Civil/Environmental
Apr 5, 2018
61
0
0
BR
I am a Civil Engineer who's just started in the field, so please bear with me here. It's quite simple stuff.

How can we separate different frequencies in a signal in such a way that the information modulated into a given frequency is preserved? I mean, if you use a passband filter around a target frequency, you average out many wave cycles of that frequency and all the information stored there is lost.

At least that's what happens with a FIR filter (I've tried) and I suppose IIR filters would have the same effect. So, is there a different kind of frequency filter that keeps modulation intact? I tried a PLL as well but the net effect is pretty much the same. How is that problem solved in real life?

Thanks in advance!

 
Replies continue below

Recommended for you

"if you use a passband filter around a target frequency, you average out many wave cycles of that frequency and all the information stored there is lost. "

This is not true; otherwise, FM radios wouldn't exist.

A bandpass filter that just gets your carrier and modulation through is what you should be designing to.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
Shannon and others formulated that a long time ago. It is about band-width of your filter. Modulation causes sidebands. Simple in AM and somewhat more complex in FM.
There is a limit to signal contents and carrier frequency. Your filter, however steep, sets the limit for upper modulation frequency.
A practical application is in AM radios. Google superheterodyn, intermediate frequency and band-width.

Gunnar Englund
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
 
Thank you, IRstuff and Skogsgurra!

Now, I've seen the math of a FIR filter and also made a spreadsheet out of it. Apparently, it works fine. I tested it by submitting a signal with 6 different sine frequencies and after it goes through the filter, only what's within the passband remains.

But the math of the TIR filter is exactly what I described: the filtered signal intensities are calculated as a weighted average of previous points of the unfiltered signal, therefore mixing up intensities in different times.

FIR_def_yrm1cb.png


For instance, let's think of a very simple AM encoding: half a cycle in full amplitude means 1 and half a cycle in 0 amplitude means 0. If I modulate 10101010101010 etc., my signal will be the positive halves of a sine. If I put that through the filter, it will average full amplitude semicycles with zero amplitude semicyles. The result is that all zero semicycles will be gone in the filtered signal. Not only that, lots of negative values also show up (there are both positive and negative weights, represented as b[sub]i[/sub] in the formula above).

Check out the graph. In the example I used 44100Hz as a sampling rate, a signal of 4900Hz modulated like above (just the positive halves of a sine, the rest is 0). In the filtered signal, all areas of "silence" disappeared, as the maths should have you expect.


Filter_efpmak.png


Am I doing anything wrong?
 
Dear Skogsgurra

As I understand, the superhet make sense if you have more than one frequency. But the problem I mentioned arises for any number of arrier frequencies, including just 1. Or am I wrong here? Anyway, I do not intend to use more than one carrier frequency, and he problem remains. Do you have any idea how to solve it?

Thanks!
 
Dear GregLocock

You are right. Maybe that was not the best example I could have come up with. But anyway, whatever are the changes I make to a pure sine wave in the modulation process, they are going to introduce alien frequencies. I tried alternating full waves and blanks as well. Look what happenned.

2018-04-05_19_51_51-Teste_filtro_BandPass_-_Excel_yggdeq.jpg


I tried alternating frequencies. No mater what the signal is, the FIR summation averages out different wave cycles, thus scrambling the data.

So, how is this problem solved in practice?
 
"calculated as a weighted average of previous points of the unfiltered signal, therefore mixing up intensities in different times"

No, most FIRs are digital models of analog filters. Analog filters have phase delays that are dependent on the frequency; that's what you are seeing. "calculated as a weighted average of previous points" is not equivalent to "average out many wave cycles of that frequency and all the information stored there is lost." If you do the math correctly on each individual frequency you will see that the signal is preserved, but delayed.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
Thanks, IRstuff!

Yes, my description "average out many wave cycles" is not very accurate. I just meant that the weighted average of several input points across many cycles will inevitably smooth things out and scramble different cycles into a pastiche, and that is exactly what I see in my results.

Now, the math is very, very simple but of course I still could have made a mistake. Yet the filter does remove frequencies outside the passband, I checked. And if the signal is a pure sine wave, unaltered, it really goes unchanged through the filter (apart from some expected change in amplitude). If there is some mistake in the spreadsheet, are there any other tests I could perform to check that hypothesis?
 
"How can we separate different frequencies in a signal in such a way that the information modulated into a given frequency is preserved? I mean, if you use a passband filter around a target frequency, you average out many wave cycles of that frequency and all the information stored there is lost. "

I think the thinking there is on the wrong track. If that statement is fundamental to your problems with this then you need to start over.



Cheers

Greg Locock


New here? Try reading these, they might help FAQ731-376
 
IRStuff, I know!

The point is, ONLY a pure sine in a frequency f has only content in that frequency. Whatever modulated data is inserted into that pure sine creates higher frequencies. There is no way around this. So, the problem remains... How are different frequencies in a signal sorted out from each other? How do cell phones and tvs do it? They have several frequencies relatively close to each other.
 
"Whatever modulated data is inserted into that pure sine creates higher frequencies."

And lower too. Called sidebands. Lower and Upper Sidebands.

Amplitude Modulation is quite straightforward (regarding sidebands), but Frequency and Phase Modulation just isn't.

Also, look up 'aliasing' in terms of sampling.

Signal processing, both analog and digital, is extremely non-trivial. It's not easy to provide little answers.

 
If you want to separate out frequency content then you want to work in the frequency domain, not the time domain. Fourier analysis/transform is the tool for this. If you are only interested in a single frequency, there are crude tools to get this (i.e. multiply your signal by a sinewave at that frequency and then low pass filter (but unfortunately you probably won't match the frequency/phase exactly so you'll have beating that you still need to deal with like you showed above)).

More detail of what signal you are specifically trying to 'pull out of the noise' will be helpful here.

Z
 
Thanks for the tips, VE1BLL!

Yeah, there are the sidebands! But do you think they interfere with the problem I have in hand?
Yes, sidebands might distort my signals if my filter passband is too narrow. But tat doesn't change the fact that the signal is distorted as it goes through the filter, right? Because that is the problem I am facing, no matter what kind of modulation I use.
 
zappedagain, maybe I haven't been clear enough.

I don't need the frequency content. I just want to demodulate a signal that comes with noise. Now, that is trivial... when tere is no noise. But the only way I know to eliminate noise is to use a filter (a passband one in this case, since I have noise both above and below the carrier frequency). And unless the signal is a pure sine (it never is when there is modulated data into it), the filter distorts it (see the FIR filter equation and the graphs above) and thus the data is lost.
 
Once again, if you want to to recover a modulated signal, then you need a passband that is at least as large as the largest frequency in the modulation that you are unwilling to sacrifice. The fact that you insist on using rectangular waveforms for the modulation means that you need something like 10x the carrier frequency for a plausible bandwidth.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
If you're doing this on a computer, as a simulation, then you should see if you can include an FFT module (sometimes called a 'Tool Kit' in MS-Excel) to allow you to *see* (with your eyeballs) the same information in the frequency spectrum domain. If you don't do this, then you're working blind. If you can do it, then you'll find that everything will fall into place much quicker.

In the RF world, one of my quips is that, "If RF were purple, then it wouldn't be considered magic." In other words, once you can see it, it's easy.

Same sort of thing applies when trying to do signal processing. You *must* work in the frequency spectrum domain most of the time, only occasionally referring to the amplitude versus time domain as required (example, pop-noise filtering where they're more visible in the amplitude plot).

 
Status
Not open for further replies.
Back
Top