Signal


iphone3g2.JPG

Apple has released the iPhone 2.0 at their world-wide developer conference touting new and improved data speeds via AT&T’s 3G network. As a smartphone user on the Verizon network, I became curious to see how my data speeds compared. I accessed the mobile speed test at dslreports.com via my phone and noted a 758Kbit/s download rate while in State College, PA. I then quickly tethered my laptop to the phone via USB cable and used speedtest.net to obtain the following two results:

speed-test-usb-dc.jpg

speed-test-usb-ny.jpg

Next, I tethered my laptop to the phone using Bluetooth to obtain slower connection speeds to the same test servers:

speed-test-bt-dc.jpg

speed-test-bt-ny.jpg

I tested the connection rates at another location on the outskirts of State College and found similar results. In contrast, it seems that the new speeds of 215Kbit/s are not impressive, even substandard. I would really like to give Apple and AT&T the benefit of the doubt here and write this off as a side-effect of high network congestion at the WWDC. I would be interested to see if any reader has experience with AT&T’s 3G data speeds and can post their apparent transfer rates.

del.icio.us | digg

agilent.JPG

To follow up the last post on resistor selection, here is a the Agilent Technologies Impedance Measurement Handbook. I found this handbook to be quite useful and well written as it covers everything from the basics of measurement problems to examples of both low frequency and RF frequency impedance measurements. The authors focused on the often overlooked parasitic properties of common system components as well as the measurement systems themselves. They go on to outline methods to construct test structures and procedures to minimize these parasitics and go on to give practical examples. For obvious reasons, all of the test equipment in the handbook is made by Agilent, however, other brands can be used just as well.

( 5950-3000.pdf )

del.icio.us | digg

arnold.jpg

In my battle with transfer function estimation, I have been dealing with many noise problems lately and have come across this application note from TI regarding the calculation of noise figures for basic op-amp circuits.  This noise figure deals with the ratio of circuit signal-to-noise ratio (SNR) at the input versus the output. The article goes through the derivation of noise analysis equations due to thermal noise in resistive elements and due to rms noise figures of the active device and goes on to quantify the noise figure as a function of temperature, resistances and op-amp parameters. This can be useful in determining performance properties of circuits given a set of passive components and can be used to define a “best case scenario”.

This all well and good, but then one might ask what noise has to do with system identification (transfer function estimation)? The simple answer is that the frequency-domain transfer function can be determined by passing “noise” through a system and comparing the spectral properties of the output versus the input. The idea is that white noise has a flat spectra (over infinite time) so the transfer function can be accurately determined for all frequencies (again, given infinite time). If infinity is too long a time to wait, one trick is using something called periodic random noise to give a well defined spectral distribution in finite time. A Gaussian random number generator can create white noise, however, an inverse Fourier transform is used to to generate the periodic noise.

Essentially, enough sinusoids are added together to cover the frequency range of interest with equal amplitudes and randomized phases that are distributed over +/- pi. The amplitude will relate to the desired resulting rms value for the noise and the number of summed sinusoids. The frequencies of choice should line up with the sampled frequencies in the following FFT that will be computed to compare the spectra of the input and output signals. The signal will now look like noise and will be “random”, however, all of the frequency domain components will maintain their amplitude and phase through the whole procedure leading to less variance in the FFTs.

( slyt094.pdf )

del.icio.us | digg

shannon.jpg

As promised before, I have finally worked through the majority of this paper, enough to give a brief introduction and discussion.

The key point of this paper is to demonstrate the importance of statistical analysis and its applications to determining information generation and transmission capacity. The measure H, or entropy, can be thought of as the amount of variance, or uncertainty, in a communication system. This leads us to define the theoretical capacity of a communication system given the known statistical properties of its constituents as well as apply analysis to practical systems.

The concept of information entropy deals with the uncertainty in the expected value of this information. Although it is rooted in statistical mechanics, it can be seen that highly predictable information has low variance, and therefore lower entropy, as compared to more random information. From this measure of information entropy, we can determine the necessary number of bits to efficiently encode this information, or to put it another way, how many symbols we can transmit per bit (assuming digital communication medium). Although the case of uniform probability distribution for all information symbols is easiest to analyze and leads to highest entropy, most practical applications have particular statistical distributions for symbol/information generation. Shannon goes to lengths to demonstrate this with the English language noting that selection of letters, or even words, is highly structured and far from random. This structure is a measure of redundancy of information, so that if I typ like ths, you cn stil undersnd me. (Spammers have been rediscovering this fact for years.)

Once the information entropy for all of the circuits involved in the communication system are determined, the channel capacity can be determined in the form of symbols per second given a finite certainty and a raw channel bit-rate. Shannon gives a fine example of a digital channel operating at 1000bits/s with a 1% error rate leading to an effective bit rate of ~919bits/s to account for error detection. Some communication system examples are given which I will not discuss in depth, however, I will try to reiterate the important steps in efficient communication design. Although Shannon gives a mathematical formulation for determining the theoretical limit for channel throughput, it is up to the designer to realize create a system which comes close to the limit. To do this, it is imperative to know the statistical properties of all of the sub-systems involved and the noise that may be present, and only then can efficiency be achieved.

The paper is by far more in-depth than this introduction and the math is not too hard, if anything, it is worth a look-over for some commentary on the statistical nature of the English language. As always, feel free to post a comment to discuss something about the paper, add something, or correct a mistake I have made. As a small bonus, I am adding Shannons’ patent for PCM-encoded voice/telephone service for those who like to read those types of things.

( 1948shannon-a-mathematical-theory-of-communication.pdf )
( 1946shannon-communication-syste-memploying-pulse-code-modulation-patent.pdf )

del.icio.us | digg

chronux_logo3.JPG

I have been working on spectral analysis of time series data and I am finding that (duh!) it is often easier to use someone else’s wheel than to invent a new one myself. That is, if their wheel has all of the necessary features and meets your performance criteria. I have been working with multi-taper spectral estimates and have found that the Chronux code (MATLAB scripts), available from Partha Mitra’s lab, to be fairly easy to use and effective for some continuous time-series analysis. The code also handles point process analysis, however, I don’t use that feature much.

The main reason that I like to use the multi-taper methods based on Slepian tapers, is that each taper gives a independent measurement of the signal spectra which then allows for computation of variances and therefore confidence intervals. This gives a certainty measurement to the analysis which can either make a strong case for its significance or will identify deficiencies in the data. Basically, these people put some years into writing this code and if you need to do coherence or spectral analysis in MATLAB, might as well give it a try.

del.icio.us | digg

undersampling.JPG

If I had to sum up this application note with a phrase, I would re-iterate that the minimum sampling rate to adequately capture a signal depends not only on the frequency content, but also the signal bandwidth. To demonstrate, we can look at GSM-based mobile communications which operate at around 1700MHz in the US. Even though the frequency content is high, each GSM channel is only 200kHz wide, so we can use a relatively slow ADC and a bit of good design. The typical trick employed in RF equipment is to set up an oscillator to run at the center frequency (~1700MHz) of the desired GSM channel and multiply it by the incoming RF signal (also ~1700MHz). As with a Fourier transform, the DC component of the result will represent the power at the oscillator frequency and the adjacent frequencies will be shifted to center around DC and will show up as “beats”. This new signal will have a much lower frequency content, on the order of the 200kHz, and will therefore allow slower ADCs to be used with a focus on economics (cheaper handsets) and higher accuracy (better reception).

The application note presents a similar type of trick, except this time, digital undersampling is involved. The idea is that unfiltered frequency content that is outside of the Nyquist band will be aliased into the Nyquist band and still provide meaningful information as long as it has narrow bandwidth and it is the only frequency content coming in. To use the previous example, if we can set up a well-tuned bandpass filter to center around the GSM channel of choice, we can run an ADC at 400kHz and expect the higher-frequency content to be aliased in.

On a final note, I have to apologize for my negligence on keeping up the `Journal Club‘. I have not forgotten about discussing Shannon’s work and plan to write a post about it at the earliest convenient time.

del.icio.us | digg

i2c.JPG

I found this surprisingly well-written manual for I2C serial communication protocol today. In short, this is a fairly popular message-based protocol that can be found in many embedded systems in consumer electronics, test and automation and automotive fields. There are low-speed alternatives and the structure of the protocol is fairly user-friendly making it a good option for hobbyists. There also schematics available on-line for rs232 and USB to I2C adapters available on-line like this open-source platform.

( an10216_1.pdf )

del.icio.us | digg

matlab-macro.jpg

I have been noticing more and more the tendency of tutorials or help information on the fast Fourier transform (FFT) to completely ignore signal windowing/enveloping/tapering. The sample code typically starts out with generating a time series made up of one or more sinusoids with possible random noise included. The code then takes an FFT of the data and displays the power spectra. This simple method works well for a small class of signals whose properties are not changing over the time bin and whose values go to zero at the start and end of the time bin. In all other cases, there is some degree of spectral leakage, or unnecessary broadening of spectral peaks and potential additional spectral noise. The typical solution to this problem to subdivide the whole time series into overlapping time-bins and then apply some kind of window function and only then perform a FFT. Care should be taken to normalize the resulting FFT with the area of the window function so that accurate power values are preserved. Things get more complicated if the time series under analysis deals with point processes, something which may be described later. The image above is a μblog original and may be used freely.

( an014-understanding-fft-windows.pdf )

del.icio.us | digg

prox-assembled-standing.jpg

With RFID-type devices becoming more and more ubiquitous in our society, it is good to know some of the advances being made in the security research fields so as to avoid a false sense of security. I came across Jonathan Westhues‘ site which outlines his experiences duplicating certain identification devices. It is important to note that the duplicated devices are of the identification-only type and do not have any built in security mechanisms, however, these are accessible initial steps. Hopefully this will motivate me to do something with the TMS3705A-based RFID reader I built following a sample design.

del.icio.us | digg

fm-small.jpg

The other week, the tape deck part of the head unit in my 1999 Jeep broke down. It turned out to be a belt drive and the belt snapped in its old age. The initial consequence was that the tape reels would not spin and cause the tape deck to think that it had reached the end of the tape, it would then change direction and find its self in the same position, and then it would finally conclude that there was some error and bypass playing the tape. The secondary consequence was that I could no longer listen to XM radio or my MP3 player using the tape adaptor. The drive from Washington, D.C. to State College, PA became long and tedious.

The first solution would be to replace the broken belt, but that would take a long time and would not be very much fun. Using an FM tuner would also be out of the question since the FM frequency space in most places is fairly saturated. I figured that since I haven’t listend to FM radio in a few years, there was no need to start now. I decided to add an audio line input to the stock head unit at the expense of FM radio.

Most modern radio receivers use a demodulator chip for the FM radio part, mine used a Sanyo LA1862, which has left and right audio output channels. The chip ran on a +9V supply and the audio outputs were centered around +4.5V, so my audio output signal would also have to be biased to be around +4.5V. The circuit I designed (schematic) takes the inputs from a 1/8 inch audio jack and loads the right and left channel with a 50 Ohm resistor. This is to ensure that the circuit gets a correct audio signal regardless of the drive circuitry, so even open collector outputs would work. Next, the left and right channels are taken differentially using a pair of INA105 diff-amps. This is to give a little bit of isolation and prevent any possibly ground loops caused by listening to something that is powered by the car. The reference pins on these chips are driven by a +4.5V reference which is generated by using a voltage buffer and a resistor bridge. Since the op amps and diff amps require 10V to operate, they run off the +12V power while the resistor bridge for the +4.5V reference is between the ground and +9V power line. The radio board had a LM7809 voltage regulator so it was easy to pull off the +12V, +9V and GND.

After putting everything together and testing it, I cut the traces from the LA1862 FM demodulator and hot-glued the designed circuit board to the original radio board and replaced the metal cover. Since I used SOIC components, everything fit together nicely. The end result is that the signal on the 1/8 inch audio jack is played through the sound system whenever FM radio is selected on the head unit regardless of the channel it is tuned to. The sound quality seems to be a bit better than the tape adaptor.

I am sure that there are more efficient ways to add this line input, so if you know, please feel free to share.

Update: While sleeping on this, I think that adding a low pass filter on the output of the additional board would not hurt. Even a single pole passive filter.  There was a low pass filter implemented on the original radio board so that is why not having it on my board didn’t have much of a negative effect on circuit noise performance.

fm01.jpg fm02.jpg fm03.jpg

fm04.jpg fm05.jpg fm06.jpg

fm07.jpg fm08.jpg fm09.jpg

fm-feed-schematics.jpg

( la1862.pdf )

del.icio.us | digg

Next Page »