Modeling #4 - The Cab Control Problem The speed-of-approach algorithm employs: an k2 un vn an amax if k2 un vn amax an dmax if k2 un v n d max ECE194 S’02 Introduction to Engineering Design Arizona State University 1 Modeling - The Cab Control Problem Start as before with the equation for the velocity of the leading car A: un us ud costn Again use the numerical approach: x n1 x n un x n1 x n un t t ECE194 S’02 Introduction to Engineering Design Arizona State University 2 Modeling - The Cab Control Problem Then repeat for the trailing car B: 1. Calculate the acceleration an from the speed-of-approach algorithm 2. Calculate the velocity vn+1 vn1 v n an t vn1 vn ant 3. Calculate the distance yn+1 yn1 yn vn yn1 yn vnt t ECE194 S’02 Introduction to Engineering Design Arizona State University 3 Modeling - The Cab Control Problem 4. Calculate the relative speed: un1 vn1 then compute the new acceleration from the speed of approach algorithm. 5. Increment the time, and repeat all of the calculations for both cab A and cab B ECE194 S’02 Introduction to Engineering Design Arizona State University 4 Modeling - The Cab Control Problem Note: Once again, you must limit the accelerations With “if” statements, or some other approach, you must stop the acceleration from exceeding the two limits (amax and -dmax) ECE194 S’02 Introduction to Engineering Design Arizona State University 5