Download presentation
Presentation is loading. Please wait.
1
EECS 20 Chapter 4 Section 4.71 Feedback in State Machines Last time we Identified issues involved when connecting state machines Looked at different connection topologies Considered implications of connection in mathematical description Today we will Look at state machines with feedback Consider state machines with constant or absent external input and determine whether they are well-formed Consider state machines with external input and feedback, and examine accuracy of output tracking
2
EECS 20 Chapter 4 Section 4.72 Iteration to Fixed-Point In Homework 2, Exercise 2.15, we considered the following: G x y y(n) = G(x,y(n-1)) = ½ (y(n-1) + x/y(n-1) ) We determined that the output sequence y converged to the square root of the constant external input x. We say that √x is a fixed point of this system, since √x = G(x, √x )
3
EECS 20 Chapter 4 Section 4.73 External and Feedback Input This system contains feedback. It has a constant external input, x, and a feedback input, y, equal to the output. G x y y(n) = G(x,y(n-1)) = ½ (y(n-1) + x/y(n-1) ) We can see from the system description that we are not using the idea of state to define this system. The output is a function of the present values of the two inputs (the external input and the feedback input). No history of inputs is really needed. (We could define states in a useful way, say States = Naturals, s(n+1) = s(n) + 1, keeping track of the number of iterations.)
4
EECS 20 Chapter 4 Section 4.74 Interconnection Requirement Feedback can be viewed as cascading a machine with itself. We therefore have a requirement for the port alphabets. Suppose that the external input port alphabet is Inputs EXT, the feedback input port alphabet is Inputs INT, and the output port alphabet is Outputs. We require that Outputs Inputs INT G x y
5
EECS 20 Chapter 4 Section 4.75 Well-Formed Feedback Loops Not every feedback system has a unique fixed point like Exercise 2.15. Some systems have no fixed points, and some have more than one. A fixed point is defined as an output value y(n) that satisfies (s(n+1),y(n)) = update(s(n),y(n)). We say that a feedback system is well-formed if there exists a unique non-stuttering y(n) satisfying the above for every reachable state s(n). If this is not true, we say the feedback system is ill-formed. The definition is more complicated when external inputs exist.
6
EECS 20 Chapter 4 Section 4.76 Ill-Formed Feedback Loops Consider the following system: Inputs = RealsOutputs = Reals States = {onlyState}InitialState = onlyState s(n) States, y(n) Outputs, update(s(n),y(n-1)) = (onlyState, y(n-1) 2 + 6 ) Find the fixed points for this system, if they exist. Need to find {y Reals | y = y 2 + 6 } = {y Reals | 0 = y 2 – 5y + 6} = {2, 3} 5 5
7
EECS 20 Chapter 4 Section 4.77 Varying External Inputs: Tracking Consider again the system from Exercise 2.15. Suppose now that x is a sequence. G x y y(n) = G(x(n),y(n-1)) = ½ (y(n-1) + x(n)/y(n-1) ) Will the output converge to √x(n)? Let’s simulate this system and see how well y(n) tracks √x(n).
8
EECS 20 Chapter 4 Section 4.78 Varying External Inputs: Tracking
9
EECS 20 Chapter 4 Section 4.79 Feedback in Computer Communication Consider a feedback system with two machines: Sender Receiver max_rate rate ack This system models a computer, Sender, delivering packets of data to Receiver. Sender transmits at rate(n) packets per step. Due to traffic throughout the network, packets will be lost if rate(n) exceeds max_rate(n). However, Sender does not have direct knowledge of the value of max_rate(n).
10
EECS 20 Chapter 4 Section 4.710 Feedback in Computer Communication Sender Receiver max_rate rate ack Receiver lets Sender know that it did not receive a packet using the feedback signal ack. ack(n) has value “success” or “drop”. Receiver will set ack(n) = drop if rate(n) > max_rate(n). Otherwise, Receiver will set ack(n) = success. Sender has the following update function for input ack(n), state curr_rate(n) and output rate(n): (curr_rate(n+1), rate(n)) = update(curr_rate(n), ack(n)) ack(n) = dropack(n) = success (curr_rate(n)/2, curr_rate(n)/2)(curr_rate(n)+1, curr_rate(n)+1)
11
EECS 20 Chapter 4 Section 4.711 Tracking the Optimal Rate Ideally, we would like Sender to send at max_rate(n). How close do we get? Sender often sends at a rate much lower than max_rate. One drop signal halves the sending rate, and it takes a long time to recover.
12
EECS 20 Chapter 4 Section 4.712 Tracking the Optimal Rate When the connection duration is short, Sender does not have enough time to reach a high rate.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.