Embedded System Hardware

2 downloads 3428 Views 3MB Size Report
Applet at © http:// www.jhu.edu/~signals/fourier2/index.html ... Moire_pattern_of_bricks_small.jpg .... Signal to noise for ideal n-bit converter : n * 6.02 + 1.76 [dB].
technische universität dortmund

fakultät für informatik informatik 12

Peter Marwedel Informatik 12 TU Dortmund Germany

2012年 11 月 13 日

© Springer, 2010

Embedded System Hardware

These slides use Microsoft clip arts. Microsoft copyright restrictions apply.

TU Dortmund

Motivation (see lecture 1): "The development of ES cannot ignore the underlying HW characteristics. Timing, memory usage, power consumption, and physical failures are important.“

 P dt

Reasons for considering hard- and software:  Real-time behavior  Efficiency - Energy - …  Security  Reliability  … technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 2-

TU Dortmund

Application Knowledge

Structure of this course

2: Specification & Modeling

Design repository

3: ES-hardware

Design

8: Test * 6: Application mapping

4: System software (RTOS, middleware, …)

7: Optimization 5: Evaluation & Validation (energy, cost, performance, …)

* Could be integrated into loop; not included in the current course

Generic loop: tool chains differ in the number and type of iterations Numbers denote sequence of chapters technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 3-

TU Dortmund

Embedded System Hardware Embedded system hardware is frequently used in a loop (“hardware in a loop“):

 cyber-physical systems technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 4-

TU Dortmund

Many examples of such loops

 Heating  Lights  Engine control  Power supply © P. Marwedel, 2011

 …  Robots technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 5-

TU Dortmund

Sensors Processing of physical data starts with capturing this data. Sensors can be designed for virtually every physical and chemical quantity, including  weight, velocity, acceleration, electrical current, voltage, temperatures, and  chemical compounds. Many physical effects used for constructing sensors. Examples:  law of induction (generat. of voltages in a magnetic field),  light-electric effects. Huge amount of sensors designed in recent years. technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 6-

TU Dortmund

Example: Acceleration Sensor

Courtesy & ©: S. Bütgenbach, TU Braunschweig technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 7-

TU Dortmund

Charge-coupled devices (CCD) image sensors Based Basedon on charge charge transfer transferto tonext next pixel pixelcell cell

Corresponding to “bucket brigade device” (German: “Eimerkettenschaltung”) technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 8-

TU Dortmund

CMOS image sensors Based on standard production process for CMOS chips, allows integration with other components.

technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 9-

TU Dortmund

Property

CCD

CMOS

Technology optimized for

Optics

VLSI technology

Technology

Special

Standard

Smart sensors

No, no logic on chip Logic elements on chip

Access

Serial

Random

Size

Limited

Can be large

Power consumption

Low

Larger

Video mode

Possibly too slow

ok

Applications technische universität dortmund

See also B. Diericks: CMOS image sensor concepts. Photonics West 2000 Short course (Web)

Comparison CCD/CMOS sensors

Situation is changing over the years fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 10 -

TU Dortmund

Example: Biometrical Sensors e.g.: Fingerprint sensor

© P. Marwedel, 2010

technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 11 -

TU Dortmund

Artificial eyes (1)

© Dobelle Institute (was at www.dobelle.com) technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

Show movie from www.dobelle.com (e.g. blind person driving a car)

- 12 -

TU Dortmund

Artificial eyes (2)

 Translation into sound [http://www.seeingwithsound.com/etumble.htm]

technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

Movie

- 13 -

TU Dortmund

Other sensors  Rain sensors for wiper control (“Sensors multiply like rabbits“ [ITT automotive])  Pressure sensors  Proximity sensors  Engine control sensors  Hall effect sensors

technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 14 -

TU Dortmund

Signals

Sensors generate signals Definition: a signal s is a mapping from the time domain DT to a value domain DV : s : DT  DV DT : continuous or discrete time domain DV : continuous or discrete value domain. technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 15 -

technische universität dortmund

fakultät für informatik informatik 12

Peter Marwedel Informatik 12 TU Dortmund Germany

© Springer, 2010

Discretization

These slides use Microsoft clip arts. Microsoft copyright restrictions apply.

TU Dortmund

Discretization of time

Digital computers require discrete sequences of physical values s : DT  DV

Discrete time domain

 Sample-and-hold circuits technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 17 -

TU Dortmund

Sample-and-hold circuits Clocked transistor + capacitor; Capacitor stores sequence values

e(t) is a mapping ℝ  ℝ h(t) is a sequence of values or a mapping ℤ  ℝ technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 18 -

TU Dortmund

Do we lose information due to sampling?

Would we be able to reconstruct input signals from the sampled signals?  approximation of signals by sine waves.

technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 19 -

TU Dortmund

Approximation of a square wave (1)

K=1

Target: square wave with period p1=4 K

 2 t  4  e' K (t )   sin k 1, 3, 5,.. k  pk  K=3 with k: pk= p1/k: periods of contributions to e’

technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 20 -

TU Dortmund

Approximation of a square wave (2)

K=5

K

4  2 t  e' K (t )   sin    4/k  k 1, 3, 5,.. k

technische universität dortmund

fakultät für informatik

K=7

 P.Marwedel, Informatik 12, 2012

- 21 -

TU Dortmund

Approximation of a square wave (3)

K=9

K

4  2 t  e' K (t )   sin    4/k  k 1, 3, 5,.. k

technische universität dortmund

fakultät für informatik

K=11 K=11

Applet at © http://  P.Marwedel, Informatik 12, 2012 www.jhu.edu/~signals/fourier2/index.html-

22 -

TU Dortmund

Linear transformations

Let e1(t) and e2(t) be signals Definition: A transformation Tr of signals is linear iff

Tr (e1  e2 )  Tr (e1 )  Tr (e2 )

In the following, we will consider linear transformations.  We consider sums of sine waves instead of the original signals. technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 23 -

TU Dortmund

Aliasing

 2 t   2 t  e3 (t )  sin   0 . 5 sin     8   4 

 2 t   2 t   2 t  e4 (t )  sin   0 . 5 sin  0 . 5 sin      8 4 1      

Periods of p=8,4,1 Indistinguishable if sampled at integer times, ps=1 technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

Matlab demo

- 24 -

TU Dortmund

Aliasing (2)  Reconstruction impossible, if not sampling frequently enough How frequently do we have to sample? Nyquist criterion (sampling theory): Aliasing can be avoided if we restrict the frequencies of the incoming signal to less than half of the sampling rate. ps < ½ pN where pN is the period of the “fastest” sine wave or fs > 2 fN where fN is the frequency of the “fastest” sine wave fN is called the Nyquist frequency, fs is the sampling rate. See e.g. [Oppenheim/Schafer, 2009] technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 25 -

TU Dortmund

Anti-aliasing filter A filter is needed to remove high frequencies

e4(t) changed into e3(t)

g (t ) e(t )

Ideal filter

Realizable filter

fs /2

technische universität dortmund

fs fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 26 -

TU Dortmund

Examples of aliasing in computer graphics Sub-sampled, no filtering

Original

technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

http://en.wikipedia.org/wiki/Image: Moire_pattern_of_bricks_small.jpg

- 27 -

TU Dortmund

Examples of aliasing in computer graphics (2)

Original (pdf screen copy) Filtered & subsampled

http://www.niirs10.com/Resources/ Reference Documents/Accuracy in Digital Image Processing.pdf

technische universität dortmund

Impact of rasterization fakultät für informatik

Subsampled, no filtering

 P.Marwedel, Informatik 12, 2012

- 28 -

TU Dortmund

Discretization of values: A/D-converters

Digital computers require digital form of physical values

s: DT  DV

Discrete value domain

A/D-conversion; many methods with different speeds. technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 29 -

TU Dortmund

Flash A/D converter

No decoding of h(t) > Vref

Encoding of voltage intervals

“11“ “10“ “01“ “00“ technische universität dortmund

fakultät für informatik

Vref /4

 P.Marwedel, Informatik 12, 2012

Vref /2

3Vref /4

Vref

h(t) - 30 -

TU Dortmund

Resolution  Resolution (in bits): number of bits produced  Resolution Q (in volts): difference between two input voltages causing the output to be incremented by 1

Q

VFSR n

with

Q: resolution in volts per step VFSR: difference between largest and smallest voltage n: number of voltage intervals technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

Example: Q = Vref /4 for the previous slide

- 31 -

TU Dortmund

Resolution and speed of Flash A/D-converter

Parallel comparison with reference voltage Speed:

O(1)

Hardware complexity:

O(n)

Applications: e.g. in video processing

technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 32 -

TU Dortmund

Higher resolution: Successive approximation h(t)

V-

w(t)

Key idea: binary search: Set MSB='1' if too large: reset MSB Set MSB-1='1' if too large: reset MSB-1 technische universität dortmund

Speed: O(log2(n)) Hardware complexity: O(log2(n)) with n= # of distinguished voltage levels; slow, but high precision possible.

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 33 -

TU Dortmund

Successive approximation (2)

V 1100

Vx h(t)

1011 1010

1000

V-

t technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 34 -

TU Dortmund

Application areas for flash and successive approximation converters Effective number of bits at bandwidth (used in multimeters) (using single bit D/A-converters; common for high quality audio equipments) [http://www.beis.de/Elektronik/ DeltaSigma/DeltaSigma.html]

(Pipelined flash converters)

[Gielen et al., DAC 2003] technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

Movie IEEE tv

- 35 -

TU Dortmund

Quantization Noise

Assuming “rounding“ (truncating) towards 0

h(t)

w(t)

w(t)-h(t)

technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 36 -

TU Dortmund

Quantization Noise

h(t)

Assuming “rounding“ (truncating) towards 0

w(t)

h(t)-w(t)

technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

MATLAB demo

- 37 -

TU Dortmund

Signal to noise ratio

 effective signal voltage   signal to noise ratio (SNR) [db]  20 log10   effective noise voltage 

e.g.: 20 log10(2)=6.02 decibels Signal to noise for ideal n-bit converter : n * 6.02 + 1.76 [dB] e.g. 98.1 db for 16-bit converter, ~ 160 db for 24-bit converter Additional noise for non-ideal converters

technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

MATLAB demo

- 38 -

TU Dortmund

Summary

Hardware in a loop  Sensors  Discretization • Sample-and-hold circuits - Aliasing (and how to avoid it) - Nyquist criterion

• A/D-converters - Quantization noise technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 39 -

TU Dortmund

SPARE SLIDES

technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 40 -

TU Dortmund

Flash A/D converter

*

Encodes input number of most significant ‘1’ as an unsigned number, e.g. “1111” -> “100”, “0111” -> “011”, “0011” -> “010”, “0001” -> “001”, “0000” -> “000” (Priority encoder). * Frequently, the case h(t) > Vref would not be decoded

technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 41 -

TU Dortmund

Quantization noise for audio signal

Source: [http://www.beis.de/Elektronik/DeltaSigma/DeltaSigma.html]

technische universität dortmund

fakultät für informatik

 P.Marwedel, Informatik 12, 2012

- 42 -

Suggest Documents