Loading ...
Sorry, an error occurred while loading the content.

AW: AW: [perseus_SDR] Re: VHF/UHF (n)FM modes

Expand Messages
  • Matthias Bopp
    Hello Leif, I think that this is a good idea. I am afraid that I won t find the time in the near tearm but if you are interested I can borrow you the necessary
    Message 1 of 16 , Mar 31, 2010
    • 0 Attachment
      Hello Leif,

      I think that this is a good idea.

      I am afraid that I won't find the time in the near tearm but if you are
      interested I can borrow you the necessary hardware for some tests.

      Best regards

      Matthias

      www.dd1us.de


      -----Ursprüngliche Nachricht-----
      Von: perseus_SDR@yahoogroups.com [mailto:perseus_SDR@yahoogroups.com] Im
      Auftrag von Leif Asbrink
      Gesendet: Donnerstag, 1. April 2010 01:34
      An: perseus_SDR@yahoogroups.com
      Betreff: Re: AW: [perseus_SDR] Re: VHF/UHF (n)FM modes

      Hello Matthias,

      > Dynas indeed works quite well. Not only for improvements in sensitivity
      but
      > also with respect to adjacent channel interference. Both the center
      > frequency as well as the bandwidth of the "tracking" filter are adjusted
      > dynamically.
      It would be very interesting if someone could make available a wideband
      recording (500 kHz bandwidth) plus a recording of the output from a dynas
      receiver from the same station at the same moment of time.

      That would allow a demonstration of what the audio quality would
      be with the various SDR detect algorithms as well as with dynas.
      It would be essential to use an RF amplifier followed by a power
      splitter to make sure that the noise floor in the Perseus as well
      as in the Dynas receiver is totally dominated by the preamplifier
      noise.

      73

      Leif / SM5BSZ



      ------------------------------------

      Yahoo! Groups Links
    • Jurgen Bartels
      ... I created a slightly different method than Leif to remove WFM-Splatter using SpectrumLab & Perseus H/W See the video-demos
      Message 2 of 16 , Apr 1, 2010
      • 0 Attachment
        > That sounds like a nice experiment!
        >
        > I always tend have the "euphoria" that systems from the past that partially
        > failed because of hardware/component tolerances can have a second life (or at
        > least an attempt) in SDR technology with a bigger chance of succes :-)

        I created a slightly different method than Leif to remove WFM-Splatter using
        SpectrumLab & Perseus H/W
        See the video-demos http://dx.3sdesign.de/fm_bandwith_talk.htm

        Along with that the noise reduction is implemented.
        An audio example
        http://dx.3sdesign.de/temp/Dynas-Demo-96_1-100213.mp3

        It starts with a very weak signal that slowly gets a bit stronger but still is
        burried in noise. In between I turn the nose reduction on/off


        Jurgen Bartels Suellwarden, N. Germany
        Winradio G305 & Perseus
        300m beverage & dual-feed 30x4m EWE pointing 320°
        FM 15-ele, SpecLab FM demod using Perseus h/w
        http://dx.3sdesign.de/station_list.htm


        http://fewo.3sdesign.de - Vacation home: DX right at the Northsea coast
      • iv3nwv
        Hi Leif, ... Much interesting indeed. ... I don t know the details of your approach but after reading your post I ve worked to see what I could get out of the
        Message 3 of 16 , Apr 2, 2010
        • 0 Attachment
          Hi Leif,

          > I am working on these things in Linrad. Plus some more.
          > Look here for enhanced S/N (FFT detector)
          > http://www.sm5bsz.com/linuxdsp/install/fm.htm

          Much interesting indeed.

          >Linrad now has an FFT detector. It is the ultimate solution to
          >this problem, a "filter bank" that puts N filters over the bandwidth.
          >The phase is extracted from the phase of the signal in the strongest
          >FFT bin. Possibly it would be better to get the phase as a power
          >weighted average of the phase from several of the stronger FFT bins.
          >One might also select one bin rather than another on the basis
          >of the expected phase based on a low pass filtered signal from
          >a previous run of the same algorithm.

          I don't know the details of your approach but after reading your post I've worked to see what I could get out of the issue (and that's why I disappeared for some days :-D)

          The FFT detector is just an efficient way to get an approximate estimate of the frequency deviation of a WBFM (Wide Band FM) modulated signal but it's not the optimal estimator.
          From a theoretical (and statistical) point of view the better estimate of an unknown parameter (in this case the frequency deviation) is given by what specialists call MAP (Maximum A Posteriori) probability estimators.
          Following this approach, the problem of making the best estimate translates into computing the probability of the unknown pararameter given a set of observations on the received signal. The best estimate is then the value which maximizes such probability.
          I.e. if DF is the unknown frequency deviation of the transmitted signal, if {s1, s2, ... sN} is a set of samples received at some instant and if DF is assumed constant over the interval spun by the N samples, then the problem is to find the argument which maximizes the "a posteriori" probability of the unknown parameter DF given the samples set s1...sN:

          Prob(DF | s1,s2,..sN)

          With the help of the Bayes rule, it turns out that the a posteriori probability can be expressed as the product of two terms:

          Prob(DF | s1,s2,..sN) = k*Prob(s1,s2,...sN|DF)*Prob(DF)

          where:

          Prob(s1,...sN|DF) is the "likelyhood" of the sequence s1...sN, given DF, and
          Prob(DF) is the "a priori" probability of DF (that's to say what we already know about the probability distribution of DF).

          Now, there are two interesting facts:

          1) The quantity Prob(s1,s2,...sN|DF), that's to say the a posteriori probability that the received samples are s1, s2, ... sN given a particular DF, require the marginalization (the sum over all possible values) of another probability function, Prob(s1,s2,...sN|DF,phi)*Prob(phi), where phi is the modulator phase. That's to say:
          Prob(s1...sN|DF) =
          Sum over all phi values of (Prob(s1...sN|DF,phi)*Prob(phi)).
          If phi is unknown, its probability density function Prob(phi) can be assumed uniform (constant). Nevertheless the marginalization of the quantity Prob(s1...sN|DF,phi) is always required.
          Without entering into more math details, the FFT detector does not do such a marginalization (unless maybe with the averages you are doing after it). It's just a method to estimate the maximum of Prob(s1...sN|DF,phi) at some phi. But the maximum of Prob(s1...sN|DF,phi) is NOT the maximum of its marginalized function Prob(s1...sN|DF) !!!

          2) The a priori probability Prob(DF) is not generally uniform!
          If there's no knowledge about the unknown parameter DF, one can assume that it is uniformly distributed in some range.
          In this case the MAP (maximum a posteriori) probability depends upon the likelyhood function only, and this is why the estimator is called a ML (Maximum Likelyhood) one.
          A ML estimator is always worse than a MAP estimator as it simply ignores any "a priori" knowledge on the parameters which are to be estimated.
          But we have some a priori knowledge about DF! Common WBFM models assume that it has a normal (gaussian) distribution with a well known standard deviation.

          I've put all of the above theory together and realized a MAP estimator for the case of the WBFM demodulator.
          It was not so easy, as the likelyhood function Prob(s1...sN|DF,phi) has an expression which can't be marginalized exactely (it's an exponentiation of a sum of terms which contains cosine functions), but I've found a simplification in the case of the weak signals regime which allowed me to marginalize it over the modulator phase without the need of any numerical integration (nor of any FFT average :-)).
          The result is that the likelihood function is NOT the FFT of the given sample sequence, but something interestingly different (and which in my case is computed just once every 16 samples).
          The estimator takes into account also the standard deviation of the WBFM modulator frequency deviation as an input parameter. This allows to easily set a tradeoff between distortion and noise.

          Some simulations I've done today indicate that the threshold extension of such a MAP estimator is really good. I hope to be able to make soon a decent table of numbers which compares it against the classical atan2 demodulator.

          Here are some audible results which compare the performance of the classical and the MAP demodulator:

          1st simulation:

          http://microtelecom.it/iv3nwv/mozartc20dematan2snrif-9.wav
          (The classical atan2 demodulator at an input SNR of -9dB)

          http://microtelecom.it/iv3nwv/mozartc20demmapsnrif-9.wav
          (The MAP demodulator at the same SNR (-9dB))

          http://microtelecom.it/iv3nwv/mozartc20demcompsnrif-9.wav
          (A "mixed" comparison of the cases above)

          2nd simulation:

          http://microtelecom.it/iv3nwv/mozartc20demcompsnrif-6.wav
          (A "mixed" comparison of the atan2 and the MAP estimator at a higher SNR (-6 dB))

          Note that the SNR is referred to the IF bandwidth, which for all the cases was 250 kHz.
          The input SNR referred to the signal audio bandwidth (15.625 KHz) is 12 dB larger, that's to say just 3 dB in the first simulation and 6 dB in the second.

          Here is the original IQ file at -9 dB SNR sampled at 250 kS/s which one could play with to test other demodulators:

          http://microtelecom.it/iv3nwv/mozartc20iqfs250k-9.wav

          73s and Happy Easter,

          Nico / IV3NWV
        • iv3nwv
          Hi Paul, ... Not to the same extent, I believe. NBFM is more close to a linear system than WBFM and has a lower input SNR threshold. The ratio between the
          Message 4 of 16 , Apr 3, 2010
          • 0 Attachment
            Hi Paul,

            > Interesting!
            > But is non of this appliccable to NBFM?

            Not to the same extent, I believe.
            NBFM is more "close" to a linear system than WBFM and has a lower input SNR threshold.
            The ratio between the signal bandwidth and the maximum modulation frequency is also lower. This means that it cannot be expected that the frequency deviation is constant for more than a couple of samples and, from a practical point of view, it requires a different approach in modeling the signal statistics and the estimator, something I've started doing right this afteroon and just because there's a lot of amazing (and quite new) theory and tools behind such kind of problmes.
            I do not expect big gains, though. In NBFM systems the phase constraints between successive samples is much weaker than in WBFM.

            Weak constraints => less extrinsic information from adiacent samples => small improvement.

            Stronger constraints exhist (we know that the human voice has a statistic which is very different from a simple Markov chain model) and would give bigger gains if they just weren't intractable from a mathematical point of view, as it occurs in this framework.

            73s
            Nico / IV3NWV
          • Leif Asbrink
            Hi Matthias, I do not have the antennas or the normal knowledge of a FM DXer so it would be a major effort for me to collect relevant data. Maybe someone else
            Message 5 of 16 , Apr 4, 2010
            • 0 Attachment
              Hi Matthias,

              I do not have the antennas or the normal knowledge of a FM
              DXer so it would be a major effort for me to collect relevant data.

              Maybe someone else could do it?

              Regards

              Leif / SM5BSZ





              > I think that this is a good idea.
              >
              > I am afraid that I won't find the time in the near tearm but if you are
              > interested I can borrow you the necessary hardware for some tests.
              >
              > Best regards
              >
              > Matthias
              >
              > www.dd1us.de
              >
              >
              > -----Ursprüngliche Nachricht-----
              > Von: perseus_SDR@yahoogroups.com [mailto:perseus_SDR@yahoogroups.com] Im
              > Auftrag von Leif Asbrink
              > Gesendet: Donnerstag, 1. April 2010 01:34
              > An: perseus_SDR@yahoogroups.com
              > Betreff: Re: AW: [perseus_SDR] Re: VHF/UHF (n)FM modes
              >
              > Hello Matthias,
              >
              > > Dynas indeed works quite well. Not only for improvements in sensitivity
              > but
              > > also with respect to adjacent channel interference. Both the center
              > > frequency as well as the bandwidth of the "tracking" filter are adjusted
              > > dynamically.
              > It would be very interesting if someone could make available a wideband
              > recording (500 kHz bandwidth) plus a recording of the output from a dynas
              > receiver from the same station at the same moment of time.
              >
              > That would allow a demonstration of what the audio quality would
              > be with the various SDR detect algorithms as well as with dynas.
              > It would be essential to use an RF amplifier followed by a power
              > splitter to make sure that the noise floor in the Perseus as well
              > as in the Dynas receiver is totally dominated by the preamplifier
              > noise.
              >
              > 73
              >
              > Leif / SM5BSZ
              >
              >
              >
              > ------------------------------------
              >
              > Yahoo! Groups Links
              >
              >
              >
              >
            • Leif Asbrink
              Hi Nico, Now I am back at home. Slowly getting into a normal situation with respect to piled up paper work:-) Weak WFM is an interesting challenge although I
              Message 6 of 16 , Apr 9, 2010
              • 0 Attachment
                Hi Nico,

                Now I am back at home. Slowly getting into a normal situation
                with respect to piled up paper work:-)

                Weak WFM is an interesting challenge although I have been
                informed that FM DXers do not have much interest since every channel
                is occupied by a station that is not weak and that the big
                problem is spillover from strong signals on the adjacent channel.
                But accademically it is interesting anyway:-)

                > I.e. if DF is the unknown frequency deviation of the
                > transmitted signal, if {s1, s2, ... sN} is a set of samples
                > received at some instant and if DF is assumed constant
                > over the interval spun by the N samples, then the problem
                > is to find the argument which maximizes the "a posteriori"
                > probability of the unknown parameter DF given the samples set s1...sN:
                >
                > Prob(DF | s1,s2,..sN)
                >
                > With the help of the Bayes rule, it turns out that the a
                > posteriori probability can be expressed as the product of two terms:
                >
                > Prob(DF | s1,s2,..sN) = k*Prob(s1,s2,...sN|DF)*Prob(DF)
                >
                > where:
                >
                > Prob(s1,...sN|DF) is the "likelyhood" of the sequence s1...sN,
                > given DF, and Prob(DF) is the "a priori" probability of DF
                > (that's to say what we already know about the probability
                > distribution of DF).
                ??????????????
                I would not dare to guess anything about a probale distribution
                of DF. It seems to me that I would just introduce distortion...

                > Now, there are two interesting facts:
                >
                > 1) The quantity Prob(s1,s2,...sN|DF), that's to say the
                > a posteriori probability that the received samples are s1,
                > s2, ... sN given a particular DF, require the marginalization
                > (the sum over all possible values) of another probability
                > function, Prob(s1,s2,...sN|DF,phi)*Prob(phi), where phi
                > is the modulator phase. That's to say:
                > Prob(s1...sN|DF) =
                > Sum over all phi values of (Prob(s1...sN|DF,phi)*Prob(phi)).
                > If phi is unknown, its probability density function Prob(phi)
                > can be assumed uniform (constant). Nevertheless the
                > marginalization of the quantity Prob(s1...sN|DF,phi) is
                > always required.
                > Without entering into more math details, the FFT detector
                > does not do such a marginalization (unless maybe with the
                > averages you are doing after it). It's just a method to
                > estimate the maximum of Prob(s1...sN|DF,phi) at some phi.
                > But the maximum of Prob(s1...sN|DF,phi) is NOT the maximum
                > of its marginalized function Prob(s1...sN|DF) !!!
                Hmmm, I do not understand this theory, and I am sceptical on
                the correctness. The properly windowed FFT works as a filter
                bank (fully equivalent to the analog counterpart.) The filters
                overlap and under the assumption that DF is not changing (much)
                over the interval I can not understand why the phase rotation
                from transform to transform obtained from the strongest FFT bin
                would not be the best estimate of the frequency.

                Problems do occur when the frequency changes rapidly, and that
                should be tackled by computing the fft on a couple of frequency
                modulated baseband signals (linear frequency drift.) The maximum
                bin would be obtained for the fft computed with a frequency drift
                that matches the real frequency drift of DF. (I use that approach
                for finding the frequency drift in the Linrad AFC for EME CW.)

                > 2) The a priori probability Prob(DF) is not generally uniform!
                > If there's no knowledge about the unknown parameter DF, one
                > can assume that it is uniformly distributed in some range.
                > In this case the MAP (maximum a posteriori) probability depends
                > upon the likelyhood function only, and this is why the estimator
                > is called a ML (Maximum Likelyhood) one.
                > A ML estimator is always worse than a MAP estimator as it
                > simply ignores any "a priori" knowledge on the parameters
                > which are to be estimated.
                > But we have some a priori knowledge about DF! Common WBFM
                > models assume that it has a normal (gaussian) distribution
                > with a well known standard deviation.
                I do not understand how that would help....

                > I've put all of the above theory together and realized
                > a MAP estimator for the case of the WBFM demodulator.
                > It was not so easy, as the likelyhood function
                > Prob(s1...sN|DF,phi) has an expression which can't be
                > marginalized exactely (it's an exponentiation of a sum
                > of terms which contains cosine functions), but I've found
                > a simplification in the case of the weak signals regime
                > which allowed me to marginalize it over the modulator
                > phase without the need of any numerical integration
                > (nor of any FFT average :-)).
                ????? I do not use any FFT average in Linrad. The FFT itself
                is N selective averages over a selected time interval. Assuming
                DF is nearly constant over that time interval should implicate
                that no other process could be better????

                > The result is that the likelihood function is NOT the
                > FFT of the given sample sequence, but something interestingly
                > different (and which in my case is computed just once
                > every 16 samples).
                Here you have an advantage. In the current FFT detector of
                Linrad a new FFT is computed for every sample. That is of course
                ridiculously inefficient, but it was easy...

                > The estimator takes into account also the standard deviation
                > of the WBFM modulator frequency deviation as an input
                > parameter. This allows to easily set a tradeoff between
                > distortion and noise.
                >
                > Some simulations I've done today indicate that the threshold
                > extension of such a MAP estimator is really good. I hope to
                > be able to make soon a decent table of numbers which compares
                > it against the classical atan2 demodulator.
                >
                > Here are some audible results which compare the performance
                > of the classical and the MAP demodulator:
                >
                > 1st simulation:
                >
                > http://microtelecom.it/iv3nwv/mozartc20dematan2snrif-9.wav
                > (The classical atan2 demodulator at an input SNR of -9dB)
                >
                > http://microtelecom.it/iv3nwv/mozartc20demmapsnrif-9.wav
                > (The MAP demodulator at the same SNR (-9dB))
                >
                > http://microtelecom.it/iv3nwv/mozartc20demcompsnrif-9.wav
                > (A "mixed" comparison of the cases above)

                I have run your raw data through the Linrad FFT detector and
                in my ears it sounds better. Your algorithm is probably
                far more CPU efficient and perhaps you can improve it.

                For the moment I have more interesting problems to work with
                (e.g. getting Perseus running under Linux.) but I will most
                probably do some more experimenting on FM detectors to see
                if I can go beyond the assumption that DF is constant.

                I have made some testing on the time delay from antenna to
                loudspeaker. Linux is generally good, I see about 10 ms with
                a Delta 44. Windows XP 32 is fine with similar delay but
                there is no properly working driver for Delta44 for Vista
                or Windows 7. The other soundcards, Sigmatel (the motherboard)
                or Audigy LS are ridiculously slow. I can not find any way
                to disable all the extra functions they go through - and
                there are no ASIO drivers for them. I do have reports
                that soundcards that have ASIO drivers work fine (=fast)
                under Vista.

                Some more info here:
                http://www.sm5bsz.com/lir/rxdel/drivers.htm

                I am sure Perseus will work fine with an adequate time delay
                for high speed contest CW with Linrad under Windows (all
                versions) in the near future. (Provided that the soundcard
                in use has ASIO drivers.) Under Linux almost any soundcard
                will be fine.

                73

                Leif / SM5BSZ
              • iv3nwv
                Hi Leif, welcome back home! :-) I m in Modena today, a town near Bologna, for the annual italian amateur association SDR Symposium I attend yearly together
                Message 7 of 16 , Apr 9, 2010
                • 0 Attachment
                  Hi Leif,
                  welcome back home! :-)

                  I'm in Modena today, a town near Bologna, for the annual italian amateur association SDR Symposium I attend yearly together with Alberto I2PHD, Beppe IK3VIG, Martin IW3AUT, Marco IK1ODO and others.

                  I'll be back home on Sunday evening and comment your reply by then.

                  73s
                  Nico

                  --- In perseus_SDR@yahoogroups.com, Leif Asbrink <leif@...> wrote:
                  >
                  > Hi Nico,
                  >
                  > Now I am back at home. Slowly getting into a normal situation
                  > with respect to piled up paper work:-)
                  >
                  > Weak WFM is an interesting challenge although I have been
                  > informed that FM DXers do not have much interest since every channel
                  > is occupied by a station that is not weak and that the big
                  > problem is spillover from strong signals on the adjacent channel.
                  > But accademically it is interesting anyway:-)
                  >
                  > > I.e. if DF is the unknown frequency deviation of the
                  > > transmitted signal, if {s1, s2, ... sN} is a set of samples
                  > > received at some instant and if DF is assumed constant
                  > > over the interval spun by the N samples, then the problem
                  > > is to find the argument which maximizes the "a posteriori"
                  > > probability of the unknown parameter DF given the samples set s1...sN:
                  > >
                  > > Prob(DF | s1,s2,..sN)
                  > >
                  > > With the help of the Bayes rule, it turns out that the a
                  > > posteriori probability can be expressed as the product of two terms:
                  > >
                  > > Prob(DF | s1,s2,..sN) = k*Prob(s1,s2,...sN|DF)*Prob(DF)
                  > >
                  > > where:
                  > >
                  > > Prob(s1,...sN|DF) is the "likelyhood" of the sequence s1...sN,
                  > > given DF, and Prob(DF) is the "a priori" probability of DF
                  > > (that's to say what we already know about the probability
                  > > distribution of DF).
                  > ??????????????
                  > I would not dare to guess anything about a probale distribution
                  > of DF. It seems to me that I would just introduce distortion...
                  >
                  > > Now, there are two interesting facts:
                  > >
                  > > 1) The quantity Prob(s1,s2,...sN|DF), that's to say the
                  > > a posteriori probability that the received samples are s1,
                  > > s2, ... sN given a particular DF, require the marginalization
                  > > (the sum over all possible values) of another probability
                  > > function, Prob(s1,s2,...sN|DF,phi)*Prob(phi), where phi
                  > > is the modulator phase. That's to say:
                  > > Prob(s1...sN|DF) =
                  > > Sum over all phi values of (Prob(s1...sN|DF,phi)*Prob(phi)).
                  > > If phi is unknown, its probability density function Prob(phi)
                  > > can be assumed uniform (constant). Nevertheless the
                  > > marginalization of the quantity Prob(s1...sN|DF,phi) is
                  > > always required.
                  > > Without entering into more math details, the FFT detector
                  > > does not do such a marginalization (unless maybe with the
                  > > averages you are doing after it). It's just a method to
                  > > estimate the maximum of Prob(s1...sN|DF,phi) at some phi.
                  > > But the maximum of Prob(s1...sN|DF,phi) is NOT the maximum
                  > > of its marginalized function Prob(s1...sN|DF) !!!
                  > Hmmm, I do not understand this theory, and I am sceptical on
                  > the correctness. The properly windowed FFT works as a filter
                  > bank (fully equivalent to the analog counterpart.) The filters
                  > overlap and under the assumption that DF is not changing (much)
                  > over the interval I can not understand why the phase rotation
                  > from transform to transform obtained from the strongest FFT bin
                  > would not be the best estimate of the frequency.
                  >
                  > Problems do occur when the frequency changes rapidly, and that
                  > should be tackled by computing the fft on a couple of frequency
                  > modulated baseband signals (linear frequency drift.) The maximum
                  > bin would be obtained for the fft computed with a frequency drift
                  > that matches the real frequency drift of DF. (I use that approach
                  > for finding the frequency drift in the Linrad AFC for EME CW.)
                  >
                  > > 2) The a priori probability Prob(DF) is not generally uniform!
                  > > If there's no knowledge about the unknown parameter DF, one
                  > > can assume that it is uniformly distributed in some range.
                  > > In this case the MAP (maximum a posteriori) probability depends
                  > > upon the likelyhood function only, and this is why the estimator
                  > > is called a ML (Maximum Likelyhood) one.
                  > > A ML estimator is always worse than a MAP estimator as it
                  > > simply ignores any "a priori" knowledge on the parameters
                  > > which are to be estimated.
                  > > But we have some a priori knowledge about DF! Common WBFM
                  > > models assume that it has a normal (gaussian) distribution
                  > > with a well known standard deviation.
                  > I do not understand how that would help....
                  >
                  > > I've put all of the above theory together and realized
                  > > a MAP estimator for the case of the WBFM demodulator.
                  > > It was not so easy, as the likelyhood function
                  > > Prob(s1...sN|DF,phi) has an expression which can't be
                  > > marginalized exactely (it's an exponentiation of a sum
                  > > of terms which contains cosine functions), but I've found
                  > > a simplification in the case of the weak signals regime
                  > > which allowed me to marginalize it over the modulator
                  > > phase without the need of any numerical integration
                  > > (nor of any FFT average :-)).
                  > ????? I do not use any FFT average in Linrad. The FFT itself
                  > is N selective averages over a selected time interval. Assuming
                  > DF is nearly constant over that time interval should implicate
                  > that no other process could be better????
                  >
                  > > The result is that the likelihood function is NOT the
                  > > FFT of the given sample sequence, but something interestingly
                  > > different (and which in my case is computed just once
                  > > every 16 samples).
                  > Here you have an advantage. In the current FFT detector of
                  > Linrad a new FFT is computed for every sample. That is of course
                  > ridiculously inefficient, but it was easy...
                  >
                  > > The estimator takes into account also the standard deviation
                  > > of the WBFM modulator frequency deviation as an input
                  > > parameter. This allows to easily set a tradeoff between
                  > > distortion and noise.
                  > >
                  > > Some simulations I've done today indicate that the threshold
                  > > extension of such a MAP estimator is really good. I hope to
                  > > be able to make soon a decent table of numbers which compares
                  > > it against the classical atan2 demodulator.
                  > >
                  > > Here are some audible results which compare the performance
                  > > of the classical and the MAP demodulator:
                  > >
                  > > 1st simulation:
                  > >
                  > > http://microtelecom.it/iv3nwv/mozartc20dematan2snrif-9.wav
                  > > (The classical atan2 demodulator at an input SNR of -9dB)
                  > >
                  > > http://microtelecom.it/iv3nwv/mozartc20demmapsnrif-9.wav
                  > > (The MAP demodulator at the same SNR (-9dB))
                  > >
                  > > http://microtelecom.it/iv3nwv/mozartc20demcompsnrif-9.wav
                  > > (A "mixed" comparison of the cases above)
                  >
                  > I have run your raw data through the Linrad FFT detector and
                  > in my ears it sounds better. Your algorithm is probably
                  > far more CPU efficient and perhaps you can improve it.
                  >
                  > For the moment I have more interesting problems to work with
                  > (e.g. getting Perseus running under Linux.) but I will most
                  > probably do some more experimenting on FM detectors to see
                  > if I can go beyond the assumption that DF is constant.
                  >
                  > I have made some testing on the time delay from antenna to
                  > loudspeaker. Linux is generally good, I see about 10 ms with
                  > a Delta 44. Windows XP 32 is fine with similar delay but
                  > there is no properly working driver for Delta44 for Vista
                  > or Windows 7. The other soundcards, Sigmatel (the motherboard)
                  > or Audigy LS are ridiculously slow. I can not find any way
                  > to disable all the extra functions they go through - and
                  > there are no ASIO drivers for them. I do have reports
                  > that soundcards that have ASIO drivers work fine (=fast)
                  > under Vista.
                  >
                  > Some more info here:
                  > http://www.sm5bsz.com/lir/rxdel/drivers.htm
                  >
                  > I am sure Perseus will work fine with an adequate time delay
                  > for high speed contest CW with Linrad under Windows (all
                  > versions) in the near future. (Provided that the soundcard
                  > in use has ASIO drivers.) Under Linux almost any soundcard
                  > will be fine.
                  >
                  > 73
                  >
                  > Leif / SM5BSZ
                  >
                • iv3nwv
                  Here I m back, Leif. ... Yes, of course! That s the most amazing part :-) ... As you teach you often need some special solution which is tailored to a specific
                  Message 8 of 16 , Apr 12, 2010
                  • 0 Attachment
                    Here I'm back, Leif.

                    > Weak WFM is an interesting challenge although I have been
                    > informed that FM DXers do not have much interest since every channel
                    > is occupied by a station that is not weak and that the big
                    > problem is spillover from strong signals on the adjacent channel.
                    > But accademically it is interesting anyway:-)

                    Yes, of course! That's the most amazing part :-)

                    > > Prob(s1,...sN|DF) is the "likelyhood" of the sequence s1...sN,
                    > > given DF, and Prob(DF) is the "a priori" probability of DF
                    > > (that's to say what we already know about the probability
                    > > distribution of DF).
                    > ??????????????
                    > I would not dare to guess anything about a probale distribution
                    > of DF. It seems to me that I would just introduce distortion...

                    As you teach you often need some special solution which is tailored to a specific case. Of course what you get out of a particular solution does not always produce the best results in the general case but it should at least give the best result for the particular case.
                    In the case of WBFM broadcasting stations it is unlikely that the istantaneous frequency deviation assumes large values as the statistic of the modulating signal is the statistic of speech (or music). This property of course does not holds if the modulating signal is a 64-PAM digital signal.
                    The basic question is then: does daring to guess something on a distribution of DF introduce in this particular case a better estimate? The reply is yes (if you guess in the right direction at least).
                    You probably are already using implicitly a similar rule. I guess that for a WBFM signal you never look for peaks at more than +/- 75 kHz from the nominal carrier frequency just because you have assumed that a standard WFBM signal never exceeds this value even if the channel is 300 kHz wide.
                    The amplitude of the distortion (I would better call it estimate error) must be weighted with the frequency it occurs at last. If a large distortion occurs every thousand years it's not a big problem.

                    > > Without entering into more math details, the FFT detector
                    > > does not do such a marginalization (unless maybe with the
                    > > averages you are doing after it). It's just a method to
                    > > estimate the maximum of Prob(s1...sN|DF,phi) at some phi.
                    > > But the maximum of Prob(s1...sN|DF,phi) is NOT the maximum
                    > > of its marginalized function Prob(s1...sN|DF) !!!

                    > Hmmm, I do not understand this theory, and I am sceptical on
                    > the correctness.

                    I'm preparing a paper to better clarify (to myself) the underlying theory, hi :-D
                    Jokes apart, I will try to give you an explanation here as it could take some days to complete the paper.
                    It can be shown that the probability that a particular sequence of samples s1..SN given a phase modulator phi and a istantaneous pulsation deviation normalized to the sampling interval (assumed constant over the sequence duration), I will call it theta, is:

                    P(s1..sN | phi, theta) = k*exp(A/sigma*real(F(theta)*exp(-j*phi)))

                    k*exp(A/sigma*real(F(theta)*sum(sk/sigma*exp(-j*k*theta-j*phi))))

                    where:
                    - A is the received carrier amplitude,
                    - sigma is the standard deviation of a noise component (I or Q) assumed gaussian and i.i.d.,
                    - k is a constant which does not depends on phi, nor on theta.
                    - F(theta) is the discrete fourier transform of the sequence s1..sN normalized to the noise standard deviation, that't to say the quantity:

                    F(theta)= sum(sk/sigma*exp(-j*k*theta))

                    It is easy to see that the probability P(s1..SN | phi, theta) is maximum where the modulus of F(theta) is maximum.
                    This explain why the FFT method provides an optimal estimate of theta, the normalized pulsation deviation, in a maximum likelyhood sense: it maximizes the likelyhood :-)

                    Nevertheless the maximum of the a posteriori probability of theta, which is porportional to the integral over phi of the quantity:

                    P(s1...SN | phi, theta)*P(phi,theta)

                    in general is not maximum where the received sequence likelyhood P(s1...SN | phi, theta) is maximum.

                    You must make explicit assumption on the a priori probability of phi and theta, integrate resulting a posteriori probability of theta and phi over phi, and finally look for the theta value which maximizes the integral.
                    With some math it can be shown that the a posteriori probability of theta has the following expression:

                    P(theta|s1...sN) = k*Io(A/sigma*|F(theta)|)*p(theta)

                    where:
                    - Io(x) is the modified Bessel function of the first kind and order zero,
                    - p(theta) is the a priori probability of the normalized frequency deviation
                    - k is a normalization constant

                    If we assume no knowledge on how theta is distributed, that's to say p(theta) = const., the maximum of the the a posteriori probability is the maximum of the Io() function, which is increasing and monotonic. This proves that the value of theta which maximizes the a posteriori probability of a maximum likelyhood estimator is the value which maximizes the DFT of the data sequence.

                    But if p(theta) is not uniformly distributed (MAP estimation) you could get better results: afterall it is intuitive that some side information (how theta is distributed) provide some additional information to the estimator.

                    > ????? I do not use any FFT average in Linrad.

                    Ops, sorry. I had misunderstood it.

                    > The FFT itself
                    > is N selective averages over a selected time interval. Assuming
                    > DF is nearly constant over that time interval should implicate
                    > that no other process could be better????

                    If you don't make further assumptions on DF this is true, as proved above. The interesting point is that other processes should behave better when further assumptions are made.


                    > I have run your raw data through the Linrad FFT detector and
                    > in my ears it sounds better. Your algorithm is probably
                    > far more CPU efficient and perhaps you can improve it.

                    When I wrote the first simulation I didn't realized that I could find an exact formula for the a posteriori probability of the frequency deviation. I simply maximized the product of the DFT with a gaussian priori probability with the expected variance and neglecting the dependence on the Bessel function.
                    As the Io() function can't be expressed in closed form, I've still to refine this last step in a practical, C language, implementation. The new simulation with the exact formula provides few tenths dBs improvement though, nothing really important and probably not worth the effort of the refinement.

                    73s
                    Nico / IV3NWV
                  • iv3nwv
                    ... vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ... ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Please discard
                    Message 9 of 16 , Apr 12, 2010
                    • 0 Attachment
                      > It can be shown that the probability that a particular sequence of samples s1..SN given a phase modulator phi and a istantaneous pulsation deviation normalized to the sampling interval (assumed constant over the sequence duration), I will call it theta, is:
                      >
                      > P(s1..sN | phi, theta) = k*exp(A/sigma*real(F(theta)*exp(-j*phi)))
                      >


                      vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

                      > k*exp(A/sigma*real(F(theta)*sum(sk/sigma*exp(-j*k*theta-j*phi))))

                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      Please discard this formula. The right one is the first.

                      Nico
                    Your message has been successfully submitted and would be delivered to recipients shortly.