Week 2 (Chapter 2) 1.Signals are Functions 2.Systems
Each function has four things: 0 the name (f, g, sin, cos, sound, …) 1 the domain ( a set ) 2 the range ( a set ) 3 the graph or assignment ( for every domain element, a range element ) A signal is a function
Function definition Let f : Domain Range such that x Domain, f ( x ) = expression
Voice: Time Pressure Doman = Time =[0,1] Range = Pressure = Reals graph(Voice) = { red points} Time X Pressure Time Air pressure Signal
Signals are modeled as functions But there are many choices in selecting the function domain and range The good engineer selects the choice appropriate to the task
Examples from Topic notes/Signals/Sound Voice: [0,1] Pressure IntegerVoice: [0,1] Integers16 ComputerVoice: DiscreteTime Integers16 in which DiscreteTime ={0, 1/8000, 2/8000, …}
Examples from Topic notes/Signals/Images Image: VerticalSpace X HorizontalSpace Intensity VerticalSpaceX HorizontalSpace = [a,b] X [c,d] Intensity = [black, white] Image(row,col) Intensity DigitalImage: VerticalSpaceX HorizontalSpace = {1,2, …,300}X{1,2,…,200} Intensity = {0,1, …, 255} = Integers8 ColorDigitalImage: VerticalSpaceX HorizontalSpace = {1,2, …,300}X{1,2,…,200} Intensity 3 = {0,1, …, 255} x {0, …, 255}x{0, …,255} = Integers8 3
Two very important definitions 1. function composition If f: X Y, g : Y Z, g f : X Z is defined by x X, ( g f ) ( x ) = g ( f ( x ) ) [ Z] x X YZ f(x) g(f(x))
2. Function or Signal Space For domain X, and range Y, [X Y ] = { f | domain ( f ) = X range ( f ) = Y } = {set of all functions whose domain = X, and range = Y} Sounds = [Time Pressure] BitSequences = [Nats {0,1}]
Images = [VerticalSpace x HorizontalSpace Intensity 3 ] is the set of all color images. Suppose VerticalSpace = {1, …, 300}, HorizontalSpace = {1,…, 200} 1 i 300, 1 j 200 Varaiya(i, j) = (n R, n G, n B ), where (n R, n G, n B ) are the RGB values of the pixel (i, j) Consider a particular image Varaiya Images
Since Domain(Varaiya) = {1, …, 300} x {1, …, 200}, is finite, graph (Varaiya) can be given as this table (1,1)Varaiya (1,1) (1,2)Varaiya (1,2) … (1,200)Varaiya (1,200) (2,1)Varaiya (2,1) … … (200,300)Varaiya (200,300) in which Varaiya (i,j) is an element of Intensity 3
or as a 300 x 200 matrix whose (i, j) th element is Varaiya (i,j) Intensity 3 Varaiya(1,1)Varaiya (1,200) Varaiya (i, j) Varaiya (300,1)Varaiya (300,200)
So Images, the space of all images, can be represented as the space of all 300 x 200 matrices, whose entries are elements of Intensity 3 Images = [{1, …, 300} x {1, …, 200} Intensity 3 ]
A video movie is a signal (30 frames/sec) VideoVideo: DiscreteTime Images DiscreteTime = {0, 1/30, 2/30, …} Domain (Video) = DiscreteTime, Range(Video) = Images Video (t) Images [this is the t th frame] Video (t)(i, j) Intensity 3 [this is the (i,j) th pixel of the t th frame]
An alternative signal is AltVideo: DiscreteTime x VerticalSpace x HorizontalSpace Intensity 3, in which AltVideo (t, i, j) is the (i,j)th pixel value of frame t The two definitions are related by: t, i, j AltVideo(t, i, j) = Video (t)(i,j)
Space of signals
A space of signals is of the form [X Y] We will be specially interested in the case where the domain X represents Time Examples AnalogSounds = [[0,1] Pressure] DigitalSounds = [{0,1/8000, …} Integers16] [0,5] Position The position of a vehicle is a signal in Positions = [[0, 5] Reals]
Position&Speed of a vehicle is a signal in Position&Speeds = [[0,5] Reals 2 ] [0,5] Position&Speed
[0,5] Position [0,5] Speed Alternatively, Position&Speed = (Position, Speed) with Position Positions = [[0,5] Reals] Speed Speeds = [[0,5] Reals]
Image processing system
Lane changingShock wave
Lane changing
Shock wave
Image processing system (IPS) IPS: [FreewayVideos] [Time Vehicle # x Lane x Position] or [Time x Vehicle #s Lane x Position] IST input signal output signal
StereoSounds = [Time Pressure 2 ] Alternatively, SteroSounds = LeftSounds x RightSounds where LeftSounds = RightSounds = [Time Pressure] t LeftSound(t) t RightSound(t)
A record or log of the successive buttons that are pressed in the Cory Hall elevator may look like 1, 4, Open, Close, 3, 2, B, 5 … We could model this as a signal Record: Indices {B,1,2,3,4,5, Open, Close} where Indices = {0,1,2, …, N} The space of all such signals is Records = [Indices Events] Events = {B, 1, …, Close}
In an event sequence, the domain Indices represents succession, rather than quantitative time. Other event sequences: DoorRecord: Indices {enter, leave} is a log of persons entering or leaving 10 Evans eg. DoorRecord = (e,l,l,e,e, …) NumberRecord: Indices Integers + is a log of number of people in 10Evans after each {enter,leave} event eg. NumberRecrod = (6,5,4,5,6, …) DoorRecord [Indices {enter, leave} ] NumberRecord [Indices Integers + ]
Systems
A system S is a function : InputSignals OutputSignals with InputSignals = [D R], OutputSignals = [D’ R’] S x InputSignals y = S(x) OutputSignals
10Evans: [Ints + {enter, leave}] [Ints + Ints + ] 10Evans u = (e,l,l,e,e,… ) y = (6,5,4,5,6,… ) initial number in room 5 InputSignals OutputSignals
The system 10Evans can be specified as follows: y = 10Evans (u), and for all n Ints +, y(n) is given by where
How do you ‘give’ S? S u Speeds y=S(u) Positions Speeds = [[0,5] Reals], Positions = [[0,5] Reals] y(0) initial position
How do you ‘give’ Q? Q u Accels v = Q(u) Speeds Accels = [[0,5] Reals], Speeds = [[0,5] Reals] v(0) initial speed
u Accelsv Speedsy Positions Q v(0) S y(0) SºQ: Accels Positions : [[0,5] Reals] [[0,5] Reals]
Other examples: TopicNotes/Systems/DTMFTopicNotes/Systems/DTMF KeypadSequences Sounds DTMF