EE249 Homework 4TA: Alessandro Pinto{[email protected]}October 29, 2004Goal of HW4 is to model hybrid systems in HyVisual and architectures inMetropolis. General Comments: an answer to a problem is neither rightnor wrong (but there are exceptions of course). I would rather consider yourhomework as solutions to design problems. I could argue that your solution isinefficient and you could argue the same about mine. Grade is established mostlyon the reasoning that you follow to answer the questions. Hence it is in yourinterest to justify your claims. You can use any kind of sources as long as youinclude references.Problem 1: We want to build a simplified model of an elevator. As youmay have noticed there is a specific pattern that the elevator follows to go fromone floor to another. After you step in the elevator and the doors close, it startsincreasing it’s speed until a cruise speed is reached. When the distance to thedestination is smaller that a ce rtain value, the speed decreases until a landingspeed is reached and finally the elevator stops at the desired floor.We can define few parameters. To reach the cruise spee d the e levator moveswith a constant acceleration equal to a = 0.5g where g = 9.81m/s2. Thecruise speed is vc= 4km/h. The breaking distance (the distance needed by thecontrol algorithm to stop the elevator) is xb= 1m. Finally the landing speed isvl= 0.1m/s.The behavior of the elevator and control algorithm can be informally de-scribed as follows. The elevator waits a new command of the form¨’go to positionxT”’. During this phase the acceleration and the speed are ¨x = 0, ˙x = 0. Whenthe command is issued the system changes the state and goes to an accelerationstate where the new equations are ¨x = a. Two things may happen:• the cruise speed is reached: then the system has to go in the cruise s tatewhere the new equation is ¨x = 0, namely constant speed.• the distance of the elevator from the target is less than or equal to thebraking distance and the speed is less then the cruise speed: then thesystem has to go directly to the deceleration state. This means that thetarget position was so close to the starting position that the elevator didn’thave time to reach the cruise speed.1EE249 Fall2004, Homework 4If the distance to the destination b ec omes smaller than or equal to the brak-ing distance while the elevator is cruising, the elevator has to decelerate.When the speed drops down to the landing speed, the elevator has to movewith constant speed vluntil the target is reached (within a tolerance that youcan decide), and finally has to stop (ideally the speed can go to zero in zerotime, in practice this cannot happen).QUESTION 1.1: describe an hybrid model of the system that I haveinformally explained.QUESTION 1.2: build such a model using HyVisual and plot position andspeed of the elevator to go from position 0.0 to position 10m and from position10m to −5m.Problem 2: Complete the example we started during lab session. Downloadthe files at:http://www-cad.eecs.berkeley.edu/~polis/class/ee249/labs/lab6/ee249lab6.zipYou need to:• write the code of CpuScheduler• write the top level scheduling and scheduled netlist• fill up the code on all other objects that are incompleteThe results that you have to produce are the following:RESULT 2.1: one trace of start and end of execution3;RESULT 2.2: average delay in the execution of
View Full Document