Read Latex

Wednesday, November 16, 2011

Scaling Laws for Fractal Antennas



I was doing some simulations of fractal antennas recently and a friend said, "I'm talking about the postage sized antenna for 160 meters."




The statement intrigued me for several reasons:
1) Perhaps fractal antennas scale differently because of fractal dimension?
2) How small would could an antenna for 160 meters (1.9 Mhz) REALLY be?
3) How does fractal dimension affect the performance of the antenna?


Analysis Tools


The questions were answered via extensive analysis. Analysis was performed using 4NEC2 an excellent adaption by Arie Voors of the Numerical Electromagnetics Code by J, Burke and A. Poggio. These links will open in a new window if you would like to check them out. Arie Voors has made his tool freely available to the technical community. The Minkowski Antenna configuration used in this study is described here by Camps-Raga and Islam at the University of Missouri, Columbia. The 'C' program minkowski.c, the bash script, doit.bash, and the parameter file, tail.txt used to generate the antenna examples are included at the bottom of this technical note.


Simulation Results


1) A fractal antenna of a given configuration and dimension scales
    linearly in wavelength just like all antennas do.
2) A Minkowski fractal antenna for 160 meters would be 36 feet wide.
    It would have a gain of -19.3 dB relative to an isotropic radiator.

3) Increasing fractal dimension decreases antenna size with
    gain dropping faster than size.


Discussion


1) A fourfold reduction in antenna size is accompanied by a gain reduction of 21.3 dB so there appears to be is a severe penalty for size reduction. My current hypothesis is that as fractal dimension increases, the antenna starts to look more like a mirror than an absorber of electromagnetic energy.
2) A level 0 Minkowski fractal is a square loop antenna! The makes a nice basis for comparison.




Analysis Details




















'C' Code Used to Generate the Minkowski Fractal Antennas


The 'C' code was written entirely by the author using the principle of segmenting a single line and offsetting the middle segment by a distance h. The code was compiled using the cygwin cc compiler from the fantastic and free cygwin running on top of Windows XP on a dual core Intel processor and ASUS motherboard from newegg.com. If you have never had the pleasure of building your own computer from off the shelf components I urge you to do so. You will save a ton of money and get a computer more suited to your needs. Anyway, here is the 'C' code:


------- cut here -------
// Minkowski fractal antenna generator by van at wdv dot com

#include
#define SOUTH 1
#define EAST 2
#define NORTH 3
#define WEST 4
#define MAX(a,b) ((a)>(b)?a:b)


int maxLevel = 1;


void edge(double xA, double yA, double xF, double yF, int type, int level)
{
    double W = 1.0 / 3.0;
    double H = 1.0 / 3.2;
    double L, w, h;
    double xB, yB;
    double xC, yC;
    double xD, yD;
    double xE, yE;


    if(level >= maxLevel)
    {
        printf("1\t0\t%9.4f\t%9.4f\t0\t%9.4f\t%9.4f\t1.e-4\n",
            xA, yA + 1, xF, yF + 1);
    }
    else
    {
        if(type == SOUTH)
        {
            L = xF - xA; w = L * W; h = L * H;


            xB = xA + w; yB = yA + 0;
            xC = xA + w; yC = yA + h;
            xD = xF - w; yD = yA + h;
            xE = xF - w; yE = yA + 0;


            edge(xA, yA, xB, yB, SOUTH, level + 1);
            edge(xB, yB, xC, yC,  WEST, level + 1);
            edge(xC, yC, xD, yD, SOUTH, level + 1);
            edge(xD, yD, xE, yE,  EAST, level + 1);
            edge(xE, yE, xF, yF, SOUTH, level + 1);
        }
        else if(type == EAST)
        {
            L = yF - yA; w = L * W; h = L * H;


            xB = xA + 0; yB = yA + w;
            xC = xA - h; yC = yA + w;
            xD = xA - h; yD = yF - w;
            xE = xA + 0; yE = yF - w;


            edge(xA, yA, xB, yB,  EAST, level + 1);
            edge(xB, yB, xC, yC, NORTH, level + 1);
            edge(xC, yC, xD, yD,  EAST, level + 1);
            edge(xD, yD, xE, yE, SOUTH, level + 1);
            edge(xE, yE, xF, yF,  EAST, level + 1);
        }
        else if(type == NORTH)
        {
            L = xA - xF; w = L * W; h = L * H;

            xB = xA - w; yB = yA + 0;
            xC = xA - w; yC = yA - h;
            xD = xF + w; yD = yA - h;
            xE = xF + w; yE = yA + 0;

            edge(xA, yA, xB, yB, NORTH, level + 1);
            edge(xB, yB, xC, yC,  EAST, level + 1);
            edge(xC, yC, xD, yD, NORTH, level + 1);
            edge(xD, yD, xE, yE,  WEST, level + 1);
            edge(xE, yE, xF, yF, NORTH, level + 1);
        }
        else if(type == WEST)
        {
            L = yA - yF; w = L * W; h = L * H;

            xB = xA - 0; yB = yA - w;
            xC = xA + h; yC = yA - w;
            xD = xA + h; yD = yF + w;
            xE = xA - 0; yE = yF + w;

            edge(xA, yA, xB, yB,  WEST, level + 1);
            edge(xB, yB, xC, yC, SOUTH, level + 1);
            edge(xC, yC, xD, yD,  WEST, level + 1);
            edge(xD, yD, xE, yE, NORTH, level + 1);
            edge(xE, yE, xF, yF,  WEST, level + 1);
        }
    }
}

main(int argc, char **argv)
{
    if(argc > 1) maxLevel = atoi(argv[1]);

    edge( 0,  0, 16,  0, SOUTH,  0);
    edge(16,  0, 16, 16,  EAST,  0);
    edge(16, 16,  0, 16, NORTH,  0);
    edge( 0, 16,  0,  0,  WEST,  0);
}




Bash Script Used to Generate the Minkowski Fractal Antennas


The 'C' program above, though somewhat minimal, produces extra copies of the segments during the recursion. The output lines are only part of the "card entry" fragments necessary for 4NEC2. To get the output file into a form usable by 4NEC2 the following script was run:


$doit.bash 2


which produces a level 2 Minkowski fractal antenna.


------- cut here --------------


#!/bin/bash
minkowski.exe $1 | sort -u | nl | sed -e 's/ //g' | sed -e 's/^/GW\t/' > head.txt
cat head.txt | wc -l > /tmp/tmp.txt
lineCount=`cat /tmp/tmp.txt`
echo $lineCount
sedCommand="s/NSEG/$lineCount/"
echo $sedCommand
cat tail.txt | sed -e "$sedCommand" > foo.txt
cat head.txt foo.txt > MI3ALVW.nec
u2d MI3ALVW.nec


~                       

The Last File


The last file "tail.txt" is used by the bash script to provide analysis parameters for 4NEC2. It looks like this:


------- cut here ----------


GE  0
EK
LD  5   0   0   0   5.74713e7   0
EX  6   NSEG    1   0   1   0
GN  2   0   0   0   13  0.005
FR  0   1   0   0   1.8 0


Addendum:
"Chip" W1YW owns US patents 6452553 and 7256751 on fractal antennas. He has measured the performance of a configuration similar to the one pictured at 175 MHz and does not report the dip in gain that appears in the 1.9 MHz version above. He states and I quote:


"For example,the MI2 (second iteration)  modeled in NEC4, reveals a 97% efficiency and dipole equivalent gain. Recently an open house with members of the Radio Club of America showed this to: K1VR; WB2MGP; K1BG; WA6RNU; W0BIW; KD0FAA; and several others. In addition, the visitors were treated to actual chamber measurements of a wire-bent MI2 at 175 MHz, Its gain was indisitinguishable (within 0.2dB) from an ETS calibrated dipole of 1.7 dBi. The fractal antenna is thus unity gain to a dipole."


Thus W1YW does not observe the same drop in gain that occur in my simulations. Work is proceeding to rectify this discrepancy.


Sunday, July 31, 2011

Testing a cool posting style excerpted from Matt Might



In his excellent blog on the Y-combinator, Matt Might - a professor at my alma mater, the University of Utah - uses a technique for placing executable Javascript code in the flow of his document.
Right now I am pasting his code into the html editor of my Google blogger to see if I can reproduce the trick he uses. The part that follows is in double quotes, as it is Matt's work:


Open Double Quote


The following example expresses the factorial function without using recursion:
[result1]


Take a close look at the definition of Y. It uses only three kinds of expression: anonymous functions, variable reference and function application.

Close Double Quote


Back to my words: Note that even though this is a blog, the html is still functional and the Javascript program executes when the "Evaluate" button is pressed. So handy for making those subtle programming points!


If you right click this page and choose, "View Source", You can see the embedding of the code between lines 456 and 524. A short preamble and "postamble" are all that are required. Thanks Matt!


Footnotes:
Attempts to paste commented html tags were futile as they were evaluated. Attempts to color the code red didn't work either.

Wednesday, July 20, 2011

Regarding "Informational Derivation of Quantum Theory" by Chiribella, et.al.



Regarding "Informational derivation of quantum theory", "PHYSICAL REVIEW A 84, 012311 (2011)", Chiribella

I was provoked to cast Information Compression as an Iterated Function

So given a string S, of length L, find an iterated function F, that produces a new string S’ of length L’ where L’ < L.
One might also require an iterated function G = F-1 that takes S’ and produces S.
If such a G exists, then F would be called a lossless or invertible iterated compression function.


S = "The rain in Spain stays mainly in the plain."
L = 45

F1 = { s/ain/1/g }

S1 = "The r1 in Sp1 stays m1ly in the pl1."
L1 = 37

F2 = { s/he/2/g }

S2 = "T2 r1 in Sp1 stays m1ly in t2 pl1."
L2 = 35

F()  = F1(F2())
S' = F(S)
L' < L since 35 < 45

G1 = { s/1/ain/g }

G2 = { s/2/he/g }

G = G1(G2())
S = G(S')

F is invertible, iterated and compresses.

Sidebar 1: F can be packaged with S:

Sp = F + S = /ain/1/he/2/"The rain in Spain stays mainly in the plain."

Next Step: Find an Iterated Function that performs Information Expansion

So given a string S, of length L, find an iterated function F, that produces a new string S’ of length L’ where L’ > L.
One might also require an iterated function G = F-1 that takes S’ and produces S.
If such a G exists, then F would be called a lossless or invertible iterated expansion function.

S = "The rain in Spain stays mainly in the plain."
L = 45

F = { s/[a-zA-Z]/[%3d]/ }

S1 = "084he rain in Spain stays mainly in the plain."
L1 = 47

S2 = "084104e rain in Spain stays mainly in the plain.
L2 = 49

S' = "0841041010321140971051100321051100320831120971051100
     3211511609712111503210909710511010812103210511003211
     6104101032112108097105110046010"

L' > L since 135 > 45

G = { s/[%3d]/[a-zA-Z]/ }
S = G(S')

F is invertible, iterated and expands.

Sidebar 1: F can be packaged with S:

Sp = F + S = /[a-zA-Z]/[%3d]/"The rain in Spain stays mainly in the plain."

In this context we call F, the "transcription apparatus".


Next Step: Show that the cost of mutagenesis is higher in the compressed case.


This is trivial and will be left as an exercise to the reader.

Source for F in Expansion Section:

#include

/* convert any number to itself and any letter to a number */
/* hint add a comma to each phrase and watch intronic explosion */
/* hint remove the commas and watch loss of reading frame */
/* hint add triplets and watch need for reading frame */

int isNumber(int c)
{
    return ( ('0' <= c) && (c <= '9') );
}

void echo(int c)
{
    printf("%c", c);
}

void number(int c)
{
    printf("%03d", c);
}

main()
{
    int i;
    int c;

    for(i = 0; (c = getchar()) != EOF; i++ )
    {
        if( isNumber(c) )
        {
            echo(c);
        }
        else
        {
            number(c);
            break;
        }
    }

    for(; (c = getchar()) != EOF;)
    {
            echo(c);
    }
}

Wednesday, June 08, 2011

The Impedance of Free Space



The impedance of free space is ~120Ï€, or about 377 Ohms.

  1. What does that mean?
  2. Does nature oppose the propagation of light? 
  3. If it does, would we even see star light?
  4. Or is this a fee that, once paid, admits to a photon the right to propagate until it collides with something else?



It turns out that the "impedance" of free space is really just a ratio of strengths.


It is the ratio of the electric field strength, to the magnetic field strength.


Its numerical values are just an artifact of the definition of the ampere and the meter.

It might be interesting to work backwards and say that the impedance of free space is one and see how that could lead to a useful set of units for Maxwell's equations.




Tuesday, March 08, 2011

Trustworthy Java Applets Without Costly Certificates


Introduction
When you run a Java applet, the run time system looks for a file called java.policy, on your customer's system. This file specifies what rights Java will be granted at run time. If this file is not configured correctly your Java applet will not function properly and your customer will be frustrated. The only alternative to providing your customer a java.policy file is to buy a certificate that can cost over $500 per year. If your applet does not generate sufficient revenue to cover this, your voice is silenced along with your right to contribute. This also destroys the chance that your applet will be useful to someone a year from now, robbing you of future options as well.

So we would like to get useful applets running without permission problems while respecting the customer's right to security. We will accomplish this by establishing and maintaining a trust relationship with the customer as any supplier must do. In what follows the terms customer and user may be used interchangeably.

Applet Execution
Most applets are executed during development in interactive environments like NetBeans or Eclipse. For simplicity, an applet can be run in a browser, or as a standalone program, by you or your customer. Assuming Java is installed, an applet can be run in a browser simply by visiting a web page that hosts it. It can also be run in standalone mode by typing:


at a command prompt. Getting the right prompt is critical, otherwise hidden errors can disguise what Java is really doing. Getting the right prompt will be covered below. The term right prompt is a useful misnomer. It is really the environment behind the prompt that must be checked, but we want to make a complex thing simple, so we pretend it is a single character, keyword, or phrase, like mathematicians do.

Running appletviewer is useful for testing security fixes. Why? Because you can run it with test java.policy files like so:



Notice there is no space between the -J and the -D in the statement above.

A useful java.policy file for development and testing is:

                     


Blanket permission is not safe for production settings. You can stop here, develop the most sophisticated applet you want, and then resume to deploy your applet. We will now cover four remaining issues to understand and solve Java applet security problems. These issues are:
  1. Getting system properties such as ${user.home}
  2. Getting the right prompt for Windows and Unix systems.
  3. Testing an appropriate java.policy file.
  4. Deploying a java.policy file.
1. Getting System Properties
Some users and most developers have several versions of Java installed. In this situation the value of key system properties can depend on what you are doing. Continuing our java.policy thread, we need to know the exact directory to which ${user.home} refers. To replace complex speculation with simple fact, we run the program PrintUserHome.java:


to produce the output:


Authors note: 
In the text below, please assume that any word that starts with an upper case letter is a trademark held by their respective owners.

Many Java developers use Interactive Development Environments (IDE's) such as Netbeans or Eclipse. Compiling and running tiny programs in these can be a hassle.  This hassle can be eliminated by running programs in Unix environments, like MacOS/Linux, or in  cygwin, a wonderful Unix platform which sits atop Windows. In any of these a tiny Java program can be run without an IDE, without ant or make using the policyInstaller available at the end of this document. In the java.policy file above, we give the Java Runtime Environment (JRE) permission to read files from ${user.home}. This directory becomes the "sandbox" for those activities our grant permission directive allowed. Other key system properties can be listed using similar calls to those above. These are also enumerated in the policyInstaller:




2. Getting 'The Right Prompt'
We can inspect other key system properties by typing:

$ set | grep "JAVA|CLASSPATH"



On the same machine we can open a command "Window" and repeat using a variant of the same command:

$ set | grep "JAVA\|CLASSPATH"



Here we notice an important discrepancy, that the value of JAVA_HOME is different.
It is
...\jdk1.6.0_22 in the first case and ...\jdk1.6.0_10 in the other.

If we were to place an applet policy file in the wrong JAVA_HOME location, it would not work, and we might not know why. If that was done both the customer and the developer would be frustrated. Not good!

This can be fixed by editing the windows environment variables, which require a reboot of the system to take effect. To access these, right-click the mouse and select:
My Computer-->Properties-->Advanced-->Environment Variables.
Then examine the System variables.



In this case we would change the JDK version suffix from 10 to a 22 as shown and reboot.

When these two environments are consistent we have the 'right prompt'. More formal developments can be found at the references provided.

3. Testing an appropriate java.policy File

The blanket permission we granted above for testing and development is not appropriate for applet deployment. Instead we run the applet together with the java.policy file in the local directory granting the most restricted possible permissions until security exceptions no longer occur. As before this is done using appletviewer with the options shown below:


Each a time an exception occurs, we can add a line to the java.policy file that grants permission for that specific exception, using the text of the exception itself as a guide.


The java.policy file above restricts File I/O to the directory Java calls ${user.home}.
The wildcard character '*' says that any file or directory in ${user.home} may be read or written. One could add the keywords write,delete or  execute to this permission directive. Additional keywords are separated by commas, i.e.: "read, write, execute", etc. The references titled "Appendix A..." below provides a complete description of all the possible permission directives. For example, in the applet that motivated this blog entry, the final java.policy file looked like this by the time it ran without exception.


After we have successfully tested the applet using a candidate java.policy file we are ready to deploy both the applet and policy files.


4. Deploying an java.policy File.

Local Deployment
We first deploy the java.policy file locally to the directory in which we were running the applet. . Then we test the applet again using applet viewer.

Now we have a compatible applet.html and java.policy combination. The applet.html can be deployed either as a proprietary custom solution for desktop use, or as a traditional web page for widespread use. We will cover the later case. Since a correct java.policy file is required for execution of many applets, the file itself, properly installed constitutes an informal key enabling the software to function. Note that whenever the user upgrades their version of Java, a new java.policy file must be deployed to the correct location.


There are two ways to deploy the java.policy file. One is to let the user download and install it themselves, but this requires expertise and patience some customers may not have (regrettably). Another way is to bundle the file in the policyInstaller below which the customer downloads and executes to install the java.policy file. It is good practice to inform the customer of the risks that installing the policy file may entail. This can be part of the EULA that the installer requires the customer to agree to, or placed on the web page from which the policy file is downloaded.


Location of the java.policy file.
For an applet to run on a user's machine the java.policy file must be installed in this location:

${user.home}\.java.policy

Policy Installer
A zip file containing the policyInstaller, source code, directory structure, and setup instructions for the IDE-less Java examples is available by sending $19.99 via PayPal to the author's email address. The zip file describes how to quickly and easily make a simple jar file and manifest for testing java.policy  files and IDE-less java execution.

References:
  1. Appendix A: Security and Permissions, Oracle Document
  2. How do I get user home directory name?, Kodejava Example
  3. Hello World without an IDE.


Monday, October 11, 2010

A Short Note On Complexity in Nature


I was thinking about complexity this morning.

- image credit

When we zoom out from a given scene, we embrace more and more complexity. Although we cannot directly perceive this complexity, we can imagine it being there.

- image credit


As we zoom out we embrace more and more collections of matter and interrelationships between them. As we zoom back in, there is less stuff, and presumably fewer relationships.

- image credit
As we keep zooming in we get down to the level of organic molecules, which are made of atoms, which are made of elementary particles, which are perhaps made of strings:

- image credit

I was wondering if the universe was "programmed" like body plan is programmed via our genome. DNA is a base-four digital code that, when evaluated, defines the body plan of most organisms, except for RNA viruses.

These collections of particles were "smart enough" to sweep their orbits clean when they were the size of planets, condensing from accretion disks:

- image credit

So my thought is, "What if complexity increases as we zoom in? That is, the scale we live at is actually one of intermediate (apparent) complexity."

- image credit


If this is true, then the more we search for elementary particles at ever increasing energies, the more we will find.


I am curious about this idea and if there is an encoding of universe body plan at the subatomic level.

- image credit










Monday, September 13, 2010

Design Patterns vs. Components in Software Resuse

I have been pondering the dichotomy of Design Patterns vs. Reusable Software Components (RSC's). Are they they same thing, or are they opposites? RSC's are the integrated circuits of software while design patterns are reusable chunks of observable interactions that appear repeatedly. A design pattern is not an algorithm for performing some calculation. It is a higher level aggregation, often with less specificity. Thus design patterns are not themselves implementations of solutions to computational problems, or interaction scenarios. Similarity vs. Uniqueness is a controlling idea here.
- Agile Modeling

A key idea in clarifying this is to consider the difference between functional blocks of capability versus the interconnections between functional blocks. Another useful idea is that of process.  Functional blocks, at any level of aggregation can be reduced to a single idea. One has inputs to the block that produce outputs from the block. Ensembles of functional blocks can always be replaced by a single equivalent functional block that abstracts away the internal complexity of the contents. Functional blocks make mathematical and algorithmic descriptions look like circuits. In fact, a software functional block can always be replaced by an equivalent piece of hardware and vica versa. This fact has not yet been fully exploited in the current software revolution, otherwise you could buy Microsoft Word on a chip.


Imagine taking the 23 design patterns, overlaying them on each other in the 253 possible ways and asking what are the similarities and differences between them and their subsets?


These differences are largely the interconnects that glue together portions of the patterns, as opposed to the blocks of UML themselves. UML is a useless modeling language and violates my own notions of how graphical depictions of things should work, but I digress.


Resolution of the aforementioned dichotomy takes place when we look at any printed circuit board (PCB) of reasonable complexity.
- develec.com
Every PCB has the need for power, input/output channels, cooling, but these are all just functional relationships which can be and are represented as functional blocks with signals flowing between them. Some are signals we care about, some are just housekeeping, like power.


In a PCB, islands of reuseable components (IC's) are connected in higher level idioms to accomplish some design objective. If an aggreation of chips (blocks) occurs frequently enough, the ensemble is turned into a single chip, just as the abstraction of many functional blocks can be replaced by a single block.


For a given PCB, the overall pattern is unique to the purpose of the PCB, yet it is composed of functional blocks which take on familiar and reusable patterns. These patterns repeat themselves and are therefore factorable into recognizable idioms, much like the letters, words, sentences and paragraphs of what I am typing just now.


The resolution of the similarity versus uniqueness question is given by the latter analogy. This note I am writing is a unique combination of reusable letters, words and sometimes sentences. But as the specific purpose of this note is articulated in increasing detail, it becomes increasingly unique. DNA is the same way. Four reusable symbols, CTAG, code for 64 possible sets of three (CCC, CCT, CCA, etc.) to specify 20 amino acids which polymerize (yes, people ARE plastic) to form proteins, which fold into useful configurations.
- Current Protocols


At increasing levels of complexity there seems less and less likelihood of reuseability. But in biological systems this is not necessarily true. For example a complex organ like the heart can be transplanted into another individual and work well enough to sustain life.
- ScienceDaily.com


Letters and words are reusable by necessity, lest we have the burden of continually reinventing writing and therefore communicating at the letter, word and sentence level and never end up getting anything useful done. It would be interesting to devise a language in which each idea is represented as a succession of new letters. But I will leave that glorious exercise to another.

- think smart designs blog



Something like a word processing program lives at the level of a PCB, while a font chooser lives at the level of a design pattern. But we need more than font choosers to make the world go 'round!


Design patterns are reusable, but at a meta-level, since they are not concrete. When we design a GUI certain patterns have emerged. The menu's are at the top, output and status information appear at the bottom. All languages read from top to bottom so this is quite natural. Is this because we look at the face before the feet of someone who greets us?


Consider the wonderful design documentary, "Objectified" which features Machines That Make Machines (MTMM). People by the way do this, as do all living things. A beautiful design is one that can be transparent in all its aspects and still be clearly discerned. The sheet rock in most homes, hides a network of two by fours, conduits, pipes, debris behind a facade of paint and crumbling gypsum. If a design is transparent then the machines that make machines should be just as beautiful and functional as the things they are used to make. Note that machines that make machines don't do so without first being created by their creator. In the "end game" only one level of machines that make machines are necessary because, like the functional blocks abstracted, the expression ((MTMM)TMM)TMM can be rewritten as MTMM.

- Science Clarified: AI and Robotics

Consider the assembly line staffed by pick and place robots. These are MTMM's. The CNC machines that work in concert to produce pistons, connecting rods and wheels are also MTMM's. The make technical artifacts like cars, washing machines, PCB's, etc.


Sections of assembly lines which bear a similarity to each other across technical artifacts are analogous to the design patterns of software identified by the Gang of Four. The parts they create are the reusable (think green) components, which can be recycled without further dis-assembly.


A principle emerges that at low levels of complexity everything looks reusable. A molecule, a resistor, an op-amp, a nut or a bolt. As complexity escalates, uniqueness increases. Thus reuse-ability of the aggregation becomes less and less, but not always, as in the case of DNA, where long strands are evolutionarily conserved, because that is the only way that the problem could be solved.


Two categories of tasks emerge: those that are reducible to repetition and those that are not.

- world of molecules.com


- whyfiles.org

Monday, August 16, 2010

Location-Based Radio



WHAT

I want you to imagine a new kind of radio - a radio where the station is selected by its geographic location rather than its radio frequency:

Traditional Radio Tuning
Instead of a radio with a tuning knob that slides across the band, imagine a radio that uses a global view of the earth and stars:

Location-Based Radio Console
Each station on such a radio would be a small icon, rendered on or above the Earth. The icons properties might indicate the station type, frequency and bandwidth.



A location-based radio is "tuned" by selecting the location of the station of interest. In the figure below, a terrestrial radio station labeled X is at one location in the spectrum. A second signal Y is a celestial source from a different spectral slot.



Another kind of tuning is possible - a radio station can be located by first clicking on its position in the spectrum and then observing its physical location.

HOW

There are several ways we might achieve a location-based radio. Naively, we might index a list of radio stations by their latitude, longitude and altitude. We might then create a program that would look up the location we selected and open that data stream, like for example, iTunes™ does:

iTunes Radio Listing


Such a user-interface, though convenient and even useful, misses a major conceptual opportunity. I propose a more fundamental and far-reaching implementation of location-based radio. One that is considerably more versatile, entertaining and enabling of discovery.

MULTILATERATION

The idea for a location-based radio was spawned by a very simple desire. I wanted a radio that would tell me whether a signal was of terrestrial or celestial origin. It takes several radios listening simultaneously to answer this question. If a radio signal is common to four or more receivers it can be uniquely located in three dimensional space using the Time Difference Of Arrival (TDOA) of the signals.

Image Courtesy Agilent Technologies


However, this required four radios instead of just one. That was bad. Perhaps if three other people could share the cost of one radio each, all could benefit. That was good. Running this idea to its logical conclusion results in the creation of a location-based radio network. We know that networks are powerful and enabling things.

In a location-based radio network, four is the minimum number of receivers, but in general more radios are better. More signals can be heard, more common signals can be found and more people can benefit. The effect compounds quickly.

For example, if a signal is of terrestrial origin, one might listen to it, or in the case of amateur radio, respond to it with a transmission. If the signal is of celestial origin, one might want to analyze it, discovering its location and structure. The former is entertainment, the latter is science. Science can be entertaining, and entertainment scientific.

SOFTWARE-DEFINED RADIO

Preceding my desire for a location-based radio was the advent of software-defined radio. Software-define radios eliminate some of the traditional hardware of a conventional radio. A portion of the physical radio is replaced by software in the form of digital  signal processing algorithms. A “soft radio” is a hybrid device, spanning analog and digital worlds, hardware and software. This introduces complexity but produces a payoff -  radio signals can be digitized and routed like other web-based media as TCP/IP packets. Such packets can be exchanged by constellations of location-based radios over the internet for comparison and analysis.

If these packets are time-stamped very accurately, they can be used to locate the signal. Time stamps do not occupy much space, so transmitting them from soft radio to soft radio does not create a lot of overhead. In fact, the original RF can be stripped away and just the audio portion of the signal retained - as long as the time stamps are accurately registered against the signal samples. This reduces transmission time and overhead significantly.

Digital signal processing, in the “cloud”, makes location-based radio possible. Software-defined radio enables large swaths of spectrum to be simultaneously processed and shared. So hundreds of signals can be observed and analyzed, instead of just one at a time, as in conventional radio. Location-based radio is to conventional radio like Google is to a filing cabinet.

BACKGROUND

During the second world war, there was a race to develop and use radio techniques to locate aircraft and naval vessels. The British innovated with a technique called multilateration. However it was the advent of GPS that makes location-based radio possible at reasonable cost.

CONSTRAINTS

One constraint on any radio is the band that it listens to. Software-defined radio now routinely spans AM frequencies of 530 kHz on the low end to 1.3 GHz plus on the high end. The radio spectrum from 1 MHz to 1 GHz spans four decades of frequency. Such bandwidth is within reach of soft radios currently on the market.

WHATS OUT THERE

Several companies already manufacture software-define radios that can be used as a starting point for a location-based radio network. A standard software defined radio (SDR) can be equipped with a GPS, so that its internal oscillator is “GPS disciplined”. This GPS discipline guarantees that digitized chunks of spectrum can be accurately time-stamped to within a few nanoseconds. Light travels a foot per nanosecond. So if a signal common to four radios is time-stamped accurate to the nanosecond, the location could theoretically be good to a foot. At this writing, fifty nanoseconds is an achievable goal and more than enough to provide utility. With larger networks of radios, techniques such as differential geodesy can be used to refine the location of the signal by observing common signals for longer periods of time.

IMPLEMENTATION

With just a few location-based radio nodes, one could resolve light-dimmers, microwave ovens, FM stations, satellites,etc. Knowing the location of a radio source is one of the most important ways of determining its nature. And knowing the location of the multitude of radio signals impressing themselves upon us every moment of every day, is not only entertaining, it is interesting science. It is also democratizing.

A simple design could be produced and distributed would enable a location-based radio capability to be grown from the grass-roots level. It could be based on existing SDR designs of which there are several to choose from.

CONCLUSION

Imagine being able to locate every radio signal that was impinging upon your existence, by working in concert with a network of similar web-based soft radios. This has far-reaching ramifications some of which, like the internet, may be difficult to predict or anticipate. One example is the ability to track meteors, to in effect, "Catch a Falling Star".

ACKNOWLEDGMENTS

This work is dedicated to my best friend and technology partner, Marilyn Fulper, who life on earth was cut short when a car ran a red light and struck her on her bicycle.



REFERENCES

Multilateration : Locating an Object by TDOA

L. Van Warren - A Blazing Fast Introduction to SDR

L. Van Warren - To Catch A Falling Star

L. Van Warren - A Short Trek to DNA-Cutter M87

Gerald Youngblood - Four part series on SDR


Wednesday, April 07, 2010

Fixing Java's Epic Fail

----
ACT I
EXT. NIGHT
A Grand Torino is parked in a vacant lot.
A slim figure with a gun towers over strange penguin-like figure,

"working" over a certain car. 




I will speak with words of one sound.
I will not raise my tone.
I will not take this one more day.

We had high hopes for you.
Day and night, night and day.
But you are a punk.
We took it and took it.
We thought it would stop.
We thought it would change but it did not.

Here is where we are.
You can change or you can die.
It is up to you.
So what will you do punk,
now that you are five and ten?


---

He was supposed to be objective, portable and secure.

"Leaks no more" they said. "Browser-ready".

We bought in and let you work with... with your GUI's, your API's, your IDE's. You took our days our nights AND our weekends.



You were slow. Twenty times slow.

Here's the lesson punk:

TRUST CANNOT BE AUTOMATED
 

Sometimes you need a person to MAKE A CHOICE.
Baseball has an umpire. There is a reason for that.


Here's your choice.


FIX THIS or the strange little man gets it:

1) Enable file I/O in any context, with MANNERS

MANNERS means ASK PERMISSION:
"Strange little man wants to write file X from author Y on your computer, is that okay?"

2) Eliminate security obstructions for developers on their own machines.

Deployment is a separate step, with MANNERS

3) Enable compilation to native code on all platforms.

Gnu fixed this, adopt it.

4) Enable pipes with MANNERS.

Got that Captcha?!