6.01 lecture notes march 4 - massachusetts institute of...

8
1 March 4, 2008 6.01 lecture notes 1 6.01 lecture notes March 4 Modeling and abstraction with signals and linear systems March 4, 2008 6.01 lecture notes 2 k= 0.5 k= 1.2 k= 2 k= 4 k= 6 Robot meets wall March 4, 2008 6.01 lecture notes 3 Big themes of 6.01 1. Controlling complexity – abstraction and modularity 2. Interacting with physical systems – models 3. Coping with error and incomplete information

Upload: others

Post on 13-Jul-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 6.01 lecture notes March 4 - Massachusetts Institute of ...courses.csail.mit.edu/6.01/spring08/handouts/week5/...March 4, 2008 6.01 lecture notes 1 6.01 lecture notes March 4 Modeling

1

March 4, 2008 6.01 lecture notes 1

6.01 lecture notesMarch 4

Modeling and abstraction with signals and linear systems

March 4, 2008 6.01 lecture notes 2

k= 0.5 k= 1.2

k= 2 k= 4 k= 6

Robot meets wall

March 4, 2008 6.01 lecture notes 3

Big themes of 6.01

1. Controlling complexity – abstraction and modularity

2. Interacting with physical systems –models

3. Coping with error and incomplete information

Page 2: 6.01 lecture notes March 4 - Massachusetts Institute of ...courses.csail.mit.edu/6.01/spring08/handouts/week5/...March 4, 2008 6.01 lecture notes 1 6.01 lecture notes March 4 Modeling

2

March 4, 2008 6.01 lecture notes 4

Signal and system abstraction

Describe a system by the way it transforms sequences of inputs in to sequences of outputs

March 4, 2008 6.01 lecture notes 5

March 4, 2008 6.01 lecture notes 6

Page 3: 6.01 lecture notes March 4 - Massachusetts Institute of ...courses.csail.mit.edu/6.01/spring08/handouts/week5/...March 4, 2008 6.01 lecture notes 1 6.01 lecture notes March 4 Modeling

3

March 4, 2008 6.01 lecture notes 7

March 4, 2008 6.01 lecture notes 8

polymorphism,inheritance

higher-order fns

Patterns

ADTs, classesdefAbstraction

lists, objectsif, f(g(x))Combination

numbers, strings+, *, ==Primitives

DataProcedures

PCAP framework for Python

March 4, 2008 6.01 lecture notes 9

Adder

][][][ 21 nxnxny +=

Gain

][][ nxkny ⋅=

21 xxy +=

xky ⋅=

Page 4: 6.01 lecture notes March 4 - Massachusetts Institute of ...courses.csail.mit.edu/6.01/spring08/handouts/week5/...March 4, 2008 6.01 lecture notes 1 6.01 lecture notes March 4 Modeling

4

March 4, 2008 6.01 lecture notes 10

]1[][ −= nxny

Rxy =

R is called the delay operator

March 4, 2008 6.01 lecture notes 11

March 4, 2008 6.01 lecture notes 12

Quiz

Find the operator equation and the difference equation corresponding to this delay-adder-gain block diagram

Page 5: 6.01 lecture notes March 4 - Massachusetts Institute of ...courses.csail.mit.edu/6.01/spring08/handouts/week5/...March 4, 2008 6.01 lecture notes 1 6.01 lecture notes March 4 Modeling

5

Three representations

Block diagram: good for understanding signal flow

Difference equation: good for computing numerical outputs to given numerical inputs

][]1[002.1][ nxnyny +−=

Operator equation: good for doing algebraic manipulation and analysis

xRyy += 002.1

March 4, 2008 6.01 lecture notes 14

Linear time-invariant systems (LTI)

• As block diagrams: Build from adders, (constant) gains, and delays

• As difference equations: Linear with constant coefficients

• As operator equations: Built from addition, multiplication by constants, and “multiplication” by R

][]1[][

][]1[][

10

10

jnxbnxbnxb

knyanyanya

j

k

−+−+=−+−+

xRbRxbxb

yRaRyayaj

j

kk

++=

++

10

10

March 4, 2008 6.01 lecture notes 15

Quiz

• Write the operator equation corresponding to the following difference equation

]3[8]2[6][10]2[7]1[4][3 −+−+=−−−+ nxnxnxnynyny

Page 6: 6.01 lecture notes March 4 - Massachusetts Institute of ...courses.csail.mit.edu/6.01/spring08/handouts/week5/...March 4, 2008 6.01 lecture notes 1 6.01 lecture notes March 4 Modeling

6

March 4, 2008 6.01 lecture notes 16

Quiz

• Write the operator equation corresponding to the Fibonacci equation

][]2[]1[][ nxnynyny =−+−=

xyRRyy =−+ 2Answer:

Note: The Fibonacci numbers are generated by taking x=0, but starting with y[0]=0 and y[1]=1

March 4, 2008 6.01 lecture notes 17

The big fact

• The operator algebra mirrors the behavior of the system, so we can reason about combining systems by doing algebra.

• This is captured by the idea of a system function

• This is, the system can be represented by the ratio of output y to input x as expressed by the operator equation.

xy

H =

March 4, 2008 6.01 lecture notes 18

xnynyny

xyRRyy

RRRRxw

wy

xy

H

=−+−−=+−

+−=

−⋅

−=⋅==

]2[6]1[5][65

6511

311

211

2

2

Page 7: 6.01 lecture notes March 4 - Massachusetts Institute of ...courses.csail.mit.edu/6.01/spring08/handouts/week5/...March 4, 2008 6.01 lecture notes 1 6.01 lecture notes March 4 Modeling

7

March 4, 2008 6.01 lecture notes 19

Patterns

system functionAbstraction

adder, gain, delayCombination

signalPrimitives

PCAP framework for signals and systems

March 4, 2008 6.01 lecture notes 20

s( )( )][]1[][

]1[][]1[]1[][

nsxndknv

sndknv

nvndnd

−−=−−=

−−−= δRobot motion:

controller:

Put controller eqnin the form of a DE

where x[n]=1 for all n

xv

vd

xd

H ⋅==

March 4, 2008 6.01 lecture notes 21

Rpxy

H01

1−

==

y gets multiplied by p0 each time around the cycle. So the result is an exponential: y[n]=pn

p0 is called the pole of the system

hal
Note
ERROR! See next week's lecture
Page 8: 6.01 lecture notes March 4 - Massachusetts Institute of ...courses.csail.mit.edu/6.01/spring08/handouts/week5/...March 4, 2008 6.01 lecture notes 1 6.01 lecture notes March 4 Modeling

8

March 4, 2008 6.01 lecture notes 22

p = -1.5 p = 1.5

p = 0.8

p = -0.8

March 4, 2008 6.01 lecture notes 23

The general picture: explanation next week

• The system function can be written in the form

• The p’s are the poles• The poles are in general complex numbers• The positions of the poles in the complex plane

determine the stability and oscillation of the system’s response

)1()1)(1(in polynomial

21 RpRpRpR

k−−− �