cds 130 - 003 fall, 2010 computing for scientists measurements (sep. 14, 2010 – sep. 29, 2010) jie...

38
CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Upload: horatio-barnett

Post on 15-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

CDS 130 - 003Fall, 2010

Computing for Scientists

Measurements(Sep. 14, 2010 – Sep. 29, 2010)

Jie Zhang Copyright ©

Page 2: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Measurements

1. How sensors measure scientific data?

2. Issues with sensor?• Sensor is not perfect; it has limitations

3. Issues with data?• Signal and noise

Page 3: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Sensors(Sep. 14, 2010)

Page 4: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Objectives

•How does a sensor work?

•Different types of sensors

Page 5: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

SensorA sensor is a device that measures a physical quantity and converts it into a signal which can be read by an observer or by an instrument.http://en.wikipedia.org/wiki/Sensor

Thermometer Thermometer biosensor

Page 6: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Electric Measurement

R: the resistance of the conductor in units of Ohms

V: the potential difference measured across the resistance in units of Volts

I: the current through the resistance in units of Amperes

Most sensors are electric-based, converting physical signal into electric signal: electric voltage and/or electric current

Page 7: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Electric Measurement

R

VI Ohm’s Law

Ohm's law states that the current through a conductor between two points is directly proportional to the potential difference or voltage across the two points, and inversely proportional to the resistance between themI = V /R

V = I R

R = V/I

Page 8: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Electric MeasurementWater Flow Analogy

Page 9: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Question?

In a clear day, a 10 inch by 8 inch solar panel can generate a voltage potential of 20 volts at the output. If a 40 Ohms resistance is connected to it, what is the electric current flowing through the circuit?

Page 10: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

CCD Charge-Coupled Device: A sensor of electromagnetic radiation

Biosensor for imaging

CCD sensor for imaging:the eyes of digital world

Page 11: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

CCD

•CCD was invented in 1969 at AT&T Bell Labs by Willard Boyle and George E. Smith •In 1969, the CCD was a simple 8-bit shift register•In 1974, a 2-D 100 X 100 pixel device•Sony managed to mass produce CCDs for camcorders•In 2009, Boyle and Smith were awarded the Nobel Prize for Physics for their work on CCD

http://en.wikipedia.org/wiki/Charge-coupled_device

Page 12: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

CCD - Operation•In a CCD for capturing images, there is a photoactive layer (region) and a transmission layer (region). •The photoactive region is an array of capacitor (pixel); each capacitor accumulate an electric charge proportional to the light intensity striking at that location •After the exposure to the array, a control circuit causes each capacitor to transfer its contents to its neighbor (operating as a shift register). The last capacitor in the array dumps its charge into a reader, which is converted to a readable voltage and saved.

Page 13: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

CCD - Operation

Charge Accumulation: more photons, more charges during the exposure time

Page 14: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

CCD - Operation

Charge Transfer: The charge packets (electrons, blue) are collected in potential wells (yellow) created by applying positive voltage at the gate electrodes (G). Applying positive voltage to the gate electrode in the correct sequence transfers the chargehttp://en.wikipedia.org/wiki/Charge-coupled_device

Page 15: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

CCD - Operation

Color CCD: Digital color cameras generally use a Bayer mask over the CCD. Each square of four pixels has one filtered red, one blue, and two green. The result of this is that luminance information is collected at every pixel, but the color resolution is lower than the luminance resolution

Page 16: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Biosensor

A biosensor is an analytical device for the detection of an analyte that combines a biological component with a physico-chemical detector component. It consists of 3 parts1.the sensitive biological element (biological material (e.g. tissue, microorganisms, cell receptors, enzymes, antibodies, nucleic acids))2.the detector element that transforms the signal resulting from the interaction of the analyte with the biological element into another signal that can be more easily measured and quantified3.associated electronics or signal processors that are primarily responsible for the display of the results in a user-friendly wayExp: blood glucose biosensor

http://en.wikipedia.org/wiki/Biosensor

Page 17: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Sensor Types•Imaging: CCD detectors•Temperature•Pressure•Chemical Sensors:

•Carbon Monoxide Detector•Motions Sensors•Biosensor•………

Page 18: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Summary•Nearly all sensors use or can use electrical measurements

•Ohm's law governs electrical circuits

•Sensors can be broken into different classes, depending on what things they measure, e.g., CCD, glucose sensor

•Good sensors measure what they are suppose to measure, and not disturb the experiments

Page 19: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Sensor Limitations(Sep. 16, 2010)

Page 20: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Objectives•What is lower and upper limits?

•In terms of magnitude or intensity

•What is resolution?•In terms of space and time

•Calibration issues•linearity

Page 21: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Lower Limit•Any measurement below this point is recorded as just zero or noise•All sensors have lower limits

•Temperature sensors have minimum temperature•CCD has a minimum level of light, which is considered “not a noise”

Page 22: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Upper Limit•Any measurement beyond this point is recorded as the same value, or zero, or as corrupted•It causes saturation, which should be avoided for most of data collection•Examples

•Temperatures larger 140 degrees are recorded as 140 degrees •Wind speeds larger than 250 mph cannot be recorded •Voltages greater than 10,000 volts cause the voltmeter to fail•SOHO satellite records the magnetic field on the Sun larger than 3000 Gauss as zero, a big headache for scientists.

Page 23: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Resolution in Time•Also called “temporal resolution”•Sensors take time to measure a signal

•Time for the signal to built up•Electric charges to build up in CCD pixels, e.g., the exposure time

•Time to read the data from the censor•CCD readout time, e.g., 1 second

Page 24: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Resolution in Space•Also called “spatial resolution”•It describes the detail an image holds. Higher resolution means more image details, e.g., number of pixels, dots per inch

•Monitors•CCD cameras and camcorders•Projectors•Printers

Page 25: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Resolution in Levels•Limits the precision of measurements•It is limited by the sensitivity of sensors•It is also limited by the resolution of the Analog to Digital Converter (ADC)•Number of bits used to store data

•8 bits: 256 levels•10 bits: 1024 levels•12 bits: 4096 levels

Page 26: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

ADC

•An analog-to-digital converter (abbreviated ADC is a device that converts a continuous quantity to a discrete digital number•Typically, it converts an input analog voltage (or current to a digital number proportional to the magnitude of the voltage or current.

http://en.wikipedia.org/wiki/Analog-to-digitanl_converter

Page 27: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Resolution in Levels

•An analog-to-digital converter (abbreviated ADC is a device that converts a continuous quantity to a

A typical home outdoor electrical temperature sensors has an operational range between 140 and -40 degree in Fahrenheit , and use 12 bits to convert the data. What is the resolution of the detector?

F 044.0

40962

40

140

12

min

max

minmax

R

N

I

IN

IIR

What is the resolution if the ADC is 8 bits?

Page 28: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Linearity •A desirable feature of a sensor is Linearity: the measured signal is proportional to the input signal

Linear Non-Linear

Page 29: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Data Limitations-Signal and Noise

(Sep. 29, 2010)

Page 30: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Motivation

The data we get from sensors is not perfect. Every measurement has noise and limitations, both from the sensor and other random factors. We need to understand noise, in order to fully understand scientific measurements

Page 31: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

What Happens to Stars?

Constellation Orion in the Country

Constellation Orion in the City

Page 32: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Signal to Noise Ratio (SNR)

http://www.dspguide.com/ch25/3.htm

Page 33: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Objectives

•Understand what are signal, noise and background.

•Do calculation of SNR (Signal to Noise Ratio)

Page 34: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Signal, Noise and Background

A Measurement

Page 35: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Signal, Noise and Background

•The background is an average of the values when there is no signal

•The noise describes variations in the background

•The signal is the value of the peak MINUS the background

Page 36: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Signal to Noise Ratio (SNR)

In previous figure:

•The peak is about 27500 •The background is about 25000 •The signal is 2500 = 27500-25000 •The noise is about 150 •The signal to noise ratio = 2500/150 = 16.6

The signal to noise ratio (SNR) is the ratio between the signal and the noise

Page 37: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Signal to Noise Ratio (SNR)•Most noise in scientific measurements follows Poisson distribution•Poisson noise is equal to the square root of the background level

•A SNR of 3 is often required as a minimum to ensure that the measurement is a true signal

Page 38: CDS 130 - 003 Fall, 2010 Computing for Scientists Measurements (Sep. 14, 2010 – Sep. 29, 2010) Jie Zhang Copyright ©

Note: In the week of Sep. 20 to Sep. 24, 2010, Joe made a tutorial on Matlab.

The End(Sep. 28, 2010)