today tba tomorrow good friday se-2811 slide design: dr. mark l. hornick content: dr. hornick...

Post on 01-Jan-2016

218 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Today TBA

Tomorrow Good Friday

SE-2811Slide design: Dr. Mark L. Hornick

Content: Dr. HornickErrors: Dr. Yoder

1

SE3910Week 5, Class 3

Ex: C/C++ (Review)

Why do we have both .h and .cpp file extensions for C++? Why not just have .cpp (like .java for Java classes)?

Answer these questions:

1. What should you put into a class’s .h file?

2. What should you put into a class’s .cpp file?

[Note: On next lab, use .hpp and .cpp instead of .h and .cpp]

SE-2811Dr.Yoder 2

Compiling and Linking

Compiling Converting individual .c or .cpp file to object code

Linking Combining multiple object (.o) files into an

excecutable (usually without extension, or .exe on Windows)

SE-2811Dr.Yoder 3

Ex: C/C++

Circle the link-time errors. Box the compile-time syntax error warning: implicit declaration of function `...' point.m:40: error: ‘mypoint’ undeclared (first use in

this function) parse error before `...‘ collect2: ld returned 1 exit status undefined reference to `filterText' /usr/lib/crt1.o(.text+0x18): undefined reference to

`main 'SE-2811Dr.Yoder 4

Network Latency with resmon.exe

SE-2811Dr.Yoder 5

Signals as sums of sine-waves

SE-3910 - Dr. Josiah YoderSlide style: Dr. Hornick

Much Material: Dr. Schilling

6http://mathworld.wolfram.com/FourierSeriesSquareWave.html

http://ccn.ucla.edu/BMCweb/SharedCode/slides/SlideFiles.html

SE-3910 - Dr. Josiah YoderSlide style: Dr. Hornick

Much Material: Dr. Schilling7

Units: dB

What is a decibel?

A tenth of a bel

What is a bel?

The log10 of some ratio.

e.g. signal power / noise power

X dB = 10 log10 (Y)

X – in units of dB

Y – simple ratio (unitless) 8

dB examples

dB50 dB 100,00030 dB 1,0000 dB 1-30 dB 0.001-50 dB 0.000 010

SE-2811Dr.Yoder 9

Channel capacity

SE-3910 - Dr. Josiah YoderSlide style: Dr. Hornick

Much Material: Dr. Schilling10

H SN (db) Maximum Number of Bits per second3000 0 30003000 10 10378.294863000 20 19974.634453000 30 29901.678783000 40 39863.569933000 50 49828.96473000 60 59794.710043000 70 69760.490433000 80 79726.27432

In-class exercise

The old analog TV channels had a bandwidth of 6MHz

Supposing a SNR of 50 dB, what is the maximum possible bit-rate?

SE-3910 - Dr. Josiah YoderSlide style: Dr. Hornick

Much Material: Dr. Schilling11

In-class Activity: What is the data rate of classic NTSC television (as digital stream)?

Store color with special scheme so only two bytes required per pixel, on average

720x480 30/1.001 fps

Follow up:

If compressed to 25MiB/s (or 25MB/s) what is the compression ratio?SE-3910 - Dr. Josiah Yoder

Slide style: Dr. HornickMuch Material: Dr. Schilling

12

The Stroboscopic Effect

Have you ever noticed something that is in motion seem to stop?

SE-3910 - Dr. Josiah YoderSlide style: Dr. Hornick

Much Material: Dr. Schilling13

Safety

See, e.g. “DC lamps must always be turned on when using any rotating machines”

http://www.seasshops.ucla.edu/services/student-faculty-shop/machine-shop-rules

SE-3910 - Dr. Josiah YoderSlide style: Dr. Hornick

Much Material: Dr. Schilling15

Aliasing

http://photo.stackexchange.com/questions/24512/what-is-aliasing-and-anti-aliasing

SE-3910 - Dr. Josiah YoderSlide style: Dr. Hornick

Much Material: Dr. Schilling16

More aliasing

Single-Sensor Imaging: Methods and Applications for Digital Cameras, by Rastislav Lukac

http://www.openphotographyforums.com/forums/showthread.php?t=14988

SE-3910 - Dr. Josiah YoderSlide style: Dr. Hornick

Much Material: Dr. Schilling17

Human eye

Recall As little as 13ms

Notice interruption As short as 16ms

Single-ms duration looks as long as 100-400ms

10ms green followed by 10ms red May appear as single yellow stimulus

SE-3910 - Dr. Josiah YoderSlide style: Dr. Hornick

Much Material: Dr. Schilling18

Ex:

Why might you want to sample at a higher frame-rate than the 30fps? Be as professional as possible

Avoid flame wars Have technical depth to back it Avoid sounding technical just to be cool

SE-3910 - Dr. Josiah YoderSlide style: Dr. Hornick

Much Material: Dr. Schilling19

Ex:

What are two ways we can avoid the stroboscopic effect in a video game simulation of a rotating wheel?

SE-3910 - Dr. Josiah YoderSlide style: Dr. Hornick

Much Material: Dr. Schilling20

In-class Activity: Analog to digital bandwidth

Suppose you would like to send video in a (relatively) low-frequency with a narrow bandwidth of 1 Mhz

The connection is fairly noisy and you can only get 20dB SNR

What bit-rate can you achieve?

SE-3910 - Dr. Josiah YoderSlide style: Dr. Hornick

Much Material: Dr. Schilling

21

In-class activity

Suppose I have a band centered at 100 Mhz which is 1Mhz wide.

What are the limits on this range?

What is the wavelength of the center 1 Mhz signal

speed of light = 299 792 458 m / s

speed in Cat-5 is 70% of this

wavelength = time of period * velocitySE-3910 - Dr. Josiah Yoder

Slide style: Dr. HornickMuch Material: Dr. Schilling

22

Fiber-optic Transmission

In fiber-optic transmission, signals are sent by transmitting various colors (or invisible) light down a fiber-optic channel

The colors are separated at the other end Multiple fibers can be used Supposing that the same bandwidth rule

applies, what bandwidth can be carried by the visible spectrum? (700-400nm)

Use SNR of 4000 Hint: Convert wavelength to period/frequency

SE-3910 - Dr. Josiah YoderSlide style: Dr. Hornick

Much Material: Dr. Schilling23

Muddiest Point

Wait for the slides, or follow this link to answer both questions at once: http://bit.ly/1Mow5a3

SE-2811Dr.Yoder 24

Muddiest Point

Wait for the slides, or follow this link to answer both questions at once: http://bit.ly/1Mow5a3

SE-2811Dr.Yoder 25

SE-2811Dr. Josiah Yoder 26

http://bit.ly/1Mow5a3

SE-2811Dr. Josiah Yoder 27

http://bit.ly/1Mow5a3

References

EB: Derek Malloy, Exploring Beaglebone, Wiley, 2015

http://www.linuxtopia.org/online_books/an_introduction_to_gcc/gccintro_95.html

http://www.network-theory.co.uk/docs/gccintro/gccintro_95.html

http://stackoverflow.com/questions/5645387/gcc-compile-errors-in-an-basic-example-objc-program

http://www.linuxtopia.org/online_books/an_introduction_to_gcc/gccintro_94.html

SE-2811Slide design: Dr. Mark L. Hornick

Content: Dr. HornickErrors: Dr. Yoder

28

top related