Reply by Evgeny Filatov●October 12, 20162016-10-12
On 12/10/2016 15:27, Evgeny Filatov wrote:
> On 06/07/2016 23:59, Tim Wescott wrote:
>> No, I'm not suddenly turning racist -- this is about signal processing.
>>
>> I want to fill a vector with binary numbers, evenly balanced between ones
>> and zeros, such that (with the exception of the honkin' big spike at DC)
>> its FFT is as flat as possible.
>>
>> Is there an algorithm for doing this?
>>
>
> Sometimes it's possible to write English words using only hexadecimal
> numbers, like DEAD BEEF. Sometimes words like those appear in industry
> standards, being a sort of an inside joke. But obviously not every word
> could be encoded that way.
>
> Which makes me wondering, what is the shortest binary sequence to encode
> the F-word, and did such a sequence (encoding the F-word) ever make its
> way to any industry standard?
>
> Gene
>
Yeah, that's definitely weird. Let's just move on, for 0x18C56's sake.
Gene
Reply by Evgeny Filatov●October 12, 20162016-10-12
On 06/07/2016 23:59, Tim Wescott wrote:
> No, I'm not suddenly turning racist -- this is about signal processing.
>
> I want to fill a vector with binary numbers, evenly balanced between ones
> and zeros, such that (with the exception of the honkin' big spike at DC)
> its FFT is as flat as possible.
>
> Is there an algorithm for doing this?
>
Sometimes it's possible to write English words using only hexadecimal
numbers, like DEAD BEEF. Sometimes words like those appear in industry
standards, being a sort of an inside joke. But obviously not every word
could be encoded that way.
Which makes me wondering, what is the shortest binary sequence to encode
the F-word, and did such a sequence (encoding the F-word) ever make its
way to any industry standard?
Gene
Reply by ●October 12, 20162016-10-12
One option might be parity(x) where x goes from 0 to say (2^n)-1 (eg 255,511,1023..)
Reply by Eric Jacobsen●July 10, 20162016-07-10
On Sun, 10 Jul 2016 09:40:45 +0100, Nobody <nobody@nowhere.invalid>
wrote:
>On Sat, 09 Jul 2016 12:34:31 +0100, Nobody wrote:
>
>> 3. Find the frequency whose magnitude is farthest from the average
>> magnitude.
>> 4. Find the bit which, if flipped, will make that magnitude closest to the
>> average magnitude, and flip it. If the number of 0s and 1s is unequal,
>> only consider bits which have the correct value.
>> 5. Update the FFT.
>> 6. Go to 3.
>
>Tried this, and it tends to get stuck in false minima. Similarly for
>just selecting a random bit and testing whether flipping it makes the
>spectrum more or less flat.
Getting stuck in local minima is a common issue with adaptive
algorithms. You might try flipping a bunch of bits to check whether
the current minimum is local or not.
Reply by Nobody●July 10, 20162016-07-10
On Sat, 09 Jul 2016 12:34:31 +0100, Nobody wrote:
> 3. Find the frequency whose magnitude is farthest from the average
> magnitude.
> 4. Find the bit which, if flipped, will make that magnitude closest to the
> average magnitude, and flip it. If the number of 0s and 1s is unequal,
> only consider bits which have the correct value.
> 5. Update the FFT.
> 6. Go to 3.
Tried this, and it tends to get stuck in false minima. Similarly for
just selecting a random bit and testing whether flipping it makes the
spectrum more or less flat.
Reply by Steve Pope●July 9, 20162016-07-09
Nobody <nobody@nowhere.invalid> wrote:
>1. Generate a random vector of bits
>2. Compute its FFT
>3. Find the frequency whose magnitude is farthest from the average
>magnitude.
>4. Find the bit which, if flipped, will make that magnitude closest to the
>average magnitude, and flip it. If the number of 0s and 1s is unequal,
>only consider bits which have the correct value.
>5. Update the FFT.
>6. Go to 3.
Great idea.
A related, more complex approach might be to use the Forney algorithm
to flatten the response. I once had a one-bit (bipolar, dare I
say) signal from which I needed to remove an unwanted third
harmonic, and Forney worked in that case.
(While it's most common to use a Forney equalizer to flatten
the spectrum of a signal, if the signal is bipolar (or I suppose,
m-polar for small m) you can flatten the signal directly without
passing it through an equalizing filter.)
Steve
Reply by Nobody●July 9, 20162016-07-09
On Wed, 06 Jul 2016 15:59:42 -0500, Tim Wescott wrote:
> I want to fill a vector with binary numbers, evenly balanced between ones
> and zeros, such that (with the exception of the honkin' big spike at DC)
> its FFT is as flat as possible.
>
> Is there an algorithm for doing this?
Wild-arsed guess:
1. Generate a random vector of bits
2. Compute its FFT
3. Find the frequency whose magnitude is farthest from the average
magnitude.
4. Find the bit which, if flipped, will make that magnitude closest to the
average magnitude, and flip it. If the number of 0s and 1s is unequal,
only consider bits which have the correct value.
5. Update the FFT.
6. Go to 3.
Reply by Steve Pope●July 9, 20162016-07-09
Allan Herriman <allanherriman@hotmail.com> wrote:
>You should be aware that in telecommunication there are some modified AMI
>(alternate mark inversion) + RZ (return to zero) line codes that are
>described as bipolar despite having three voltage levels: +, - and 0.
>AMI: A one is signalled by an alternating + or - (i.e. one symbol uses +,
>the next uses -, the next uses + and so on) simply to provide DC balance.
>RZ: the voltage returns to zero during each symbol to provide transitions
>for clock recovery.
>i.e. a symbol consists of:
>Zero: 0 for the full T symbol duration
>One: + or - for T/2, followed by 0 for T/2. (+ and - typically
>alternate to give DC balance, sometimes with "bipolar violations" to
>signal ... things)
Thanks for this information.
Without saying that any of the following applies to any of the above:
My experience is that terminology as used in standards documents
is often inconsistent with that used (or previously used) by researchers
and design engineers.
In some cases, a section of a standard might be correctly named
initially, but then as the standard is developed the technical content
changes without the section being re-named, and that gets finalized.
Or naming is used that conforms to regulatory nomenclature without
the actual technical content conforming, as a sort of end-run around
a regulation.
Steve
Reply by Allan Herriman●July 9, 20162016-07-09
On Fri, 08 Jul 2016 16:24:02 -0700, herrmannsfeldt wrote:
> On Friday, July 8, 2016 at 4:14:52 PM UTC-7, Steve Pope wrote:
>
> (snip)
>> >On Thursday, July 7, 2016 at 10:40:48 PM UTC-7, Tim Wescott wrote:
>
>> >(snip, someone wrote)
>
>> That was I.
>
>> >> > You can, but the result would not be bipolar, it would be real-
valued.
>
>> >> > Tim states "a vector filled with binary numbers". (I think he
meant
>> >> > bipolar, or bi-valued, or whatever the correct terminology du jour
is.)
>
>> >I believe it is binary.
>
>> Bipolar is correct. Google on "bipolar signal", "bipolar signaling".
>
> "In telecommunication, a bipolar signal is a signal that may assume
either of
> two polarities, neither of which is zero."
[possibly OT]
You should be aware that in telecommunication there are some modified AMI
(alternate mark inversion) + RZ (return to zero) line codes that are
described as bipolar despite having three voltage levels: +, - and 0.
AMI: A one is signalled by an alternating + or - (i.e. one symbol uses +,
the next uses -, the next uses + and so on) simply to provide DC balance.
RZ: the voltage returns to zero during each symbol to provide transitions
for clock recovery.
i.e. a symbol consists of:
Zero: 0 for the full T symbol duration
One: + or - for T/2, followed by 0 for T/2. (+ and - typically
alternate to give DC balance, sometimes with "bipolar violations" to
signal ... things)
Examples:
HDB3, used on E1
B3ZS, used on T3
The 'B' in those acronyms stands for Bipolar.
Reference: ITU-T G.703.
Whilst these are quite old line encodings (1970s?) they were quite
popular and are still used in new products today (albeit mostly to
connect to legacy equipment).
The codes are, of course, fairly inefficient in terms of channel
capacity, but they were just right for the technology of the day (e.g.
using a full wave rectifier + LC tank for the symbol timing recovery
(yes, I have done that in actual products)).
These codes should not be confused with true ternary codes (which also
use three voltage levels). E.g. 4B3T (ISDN), MLT3 (100M Ethernet), etc.
Regards,
Allan
Reply by Steve Pope●July 8, 20162016-07-08
<herrmannsfeldt@gmail.com> wrote:
>On Friday, July 8, 2016 at 4:14:52 PM UTC-7, Steve Pope wrote:
>> >I believe it is binary.
>
>> Bipolar is correct. Google on "bipolar signal", "bipolar signaling".
>
> "In telecommunication, a bipolar signal is a signal that may assume
>either of
> two polarities, neither of which is zero."
>
>> Binary means base 2, and so it can be confusing to use binary
>> to indcate bipolar.
>
>So, if one of the values is zero, it isn't bipolar.
Per the above, yes. I think in a narrow sense, bipolar connotes
that not only is the signal representing just one bit, but that
bit is represented at the physical layer by two values. I am
not sure about the "neither is zero" part of the definition;
you could get in trouble relatively quickly by applying this
to conclude that, for example, an ECL signal is bipolar but a CMOS
signal is not bipolar.
A example of a signal that is clearly bipolar is RS-232.
>I thought the one under discussion had one that was zero, but yes it can
>be confusing.
I think in this discussion we can leave the physical layer out of it,
but maybe I introduced it by using the bipolar terminology in
the first place.
Steve