Linear Model Predictive Control for ueueing Networks in Manufacturing and Road Traffic Yoni Nazarathy Swinburne University of Technology, Melbourne. Joint work with: Erjen Lefeber (manufacturing), Hai Vu, Bao Vo, Tung Le and Serge Hoogendoorn (road traffic) ANZIAM, Jan 30, 2012.
Overview and Main Story Central control of: Manufacturing networks Urban traffic networks Model as a ueueing Network: Jobs (lots, cars) Servers (manufacturing machines, signaled intersections) ueues (lots waiting for processing, cars waiting at intersections) Routes: Fixed, random, partially controlled, incentive driven Delayed movement Policy for resource allocation and routing Desired: High throughout, low WIP, steady output, fairness... Sensible computable control Methodological and mathematical structure of the control In this talk: A control (policy) methodology based on MPC
Most of the talk focuses on the manufacturing setting
S S S D D
Precise ueueing Network Model Definition Discrete time n = 0, 1,... K job classes, L servers Types of classes: Source ueue D Delay S Sink Deterministic routes Randomness due to batch arrivals ( classes), ũ k, m k Processing capacity: jobs per server per time unit, c i, i = 1,... L Control Policy How should servers allocate capacity? S S S D D
A Controlled Markov Chain P = {p kk } routing matrix, C constituency matrix i.i.d jobs generated at sources, ũ U generic r.v. of U-fold sum {X (n)} is a controlled Markov chain, with control U(n) = f (X (n)) X k (n + 1) = Matrix form X k (n) + k K X D k (n)p k k + k K ũ U k (n) {,} k p k k U k (n), k K (queue) k K X D k (n)p k k + k K ũ U k (n) {,} k p k k, k K D (delay) X k (n) + k K D X k (n)p k k + k K {,} ũ U k (n) k p k k, k K S (sink) X (n + 1) X D (n + 1) X S (n + 1) = I P D 0 0 P DD 0 0 P DS I Elements of ũ( ) are ũ U k (n) U k k (n)m k s.t. X (n) X D (n) X S (n) P M + P D M P S M 0 0 0 I 0 0 0 0 0 I I 0 0 0 I 0 0 0 C C P I P D P S X (n) X D (n) X S (n) U (n) U (n) [ U(n) U (n) 0 0 0 c ] + P P D P S ũ ( U (n) )
Concept: Control as a Linear System X (n + 1) = A X (n) + B U(n) + zero mean noise s.t. F [ X (n) U(n) ] g Our Control Methodology Ignore noise Assume state and control (X ( ), U( )) are continuous in value Find a reference trajectory Apply standard control-theoretic methods for tracking the reference trajectory Use Model Predictive Control (MPC) using a uadratic Programming (P) formulation
A Structured Example: The Aquisition ueue D. Denteneer, J. van Leeuwaarden, and I. Adan. The acquisition queue. ueueing Systems, 56(3):229240, 2007. Server 1 D D 3 4 S d 3 2 D d 2
Acquisition ueue with d = 3 D 1 (n + 1) D 2 (n + 1) D 3 (n + 1) (n + 1) S(n + 1) = Maximal Throughput 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 D 1 (n) D 2 (n) D 3 (n) (n) S(n) + m 0 0 0 0 0 0 1 0 1 1 ( 1 ) 1 δ = lim n n S(n) = m + 1 c [ U(n) U (n) ] A Reference Trajectory U r (n) = U r (n) = D r 1(n) = D r 2(n) = D r 3(n) = δ, r (n) = const, S r (n) = δ n Error Dynamics: X e (n) = X (n) X r (n), U e (n) = U(n) U r (n) Also satisfy: X e (n + 1) = A X e (n) + B U e (n) Our controller tries to regulate X e (n) on 0
The MPC Approach Action of Controller at Time n Look at X e (n) Plan an optimal schedule for a time horizon of N time units: Optimize the variables U e (n),..., U e (n + N 1) These yield predictions of X e (n + 1),..., X e (n + N) Practical objective (P): n+n 1 ˆX e (i + 1) ˆX e (i + 1) + U e (i) RU e (i) i=n After optimizing use first step: U(n) = U e (n) + U r (n) Round off U(n) and insure feasibility Repeat in next time step Parameters of controller: Time horizon, N. Positive definite cost matrixes,, R. Reference trajectory.
Precise Formulation of the P (for illustration) s.t. C S 1 U S + U S X B I min U e U e ( B B + R ) U e + 2X e 0 A B U e Ue c 0 0 0 + 0 S 1 X S X 0 Xr + C S 1 U S + U I Ur + 0 S X S X A 0 X e 0, R are block diagonal matrixes of and R. The S matrixes select elements. The following matrixes are used for prediction: A = A A 2. A N, B = B 0 0 AB B..... A N 1 B B Observe: If U r is constant as well as X r on the -classes then control law is a function of X e 0 only
Numerical Illustration
Acquisition ueue Threshold vs. MPC Example: c = 10, d = 10, m = 3 A Simple Threshold Control Law (Van Leeuwaarden et. al. 2007) U (n) = α + (c (n)) +, α < c/(1 + m) (for stability) U (n) = c U (n) Assume no noise, optimize α: α = 2 is best 250 200 150 100 50 400 450 500 n 50 100
MPC Appears Better than Threshold Compare α = 2 with MPC ( = I, R = I, N = 30) 75 50 25 400 450 500 n 25 50 75 Add noise (Geometrically distributed acquisitions) 250 200 150 100 50 200 400 600 800 1000 n 50 100 150
What about road traffic?
Model Modifications for Urban Traffic Control Time-varying arrivals Servers operate on multiple queues in parallel (traffic phases) Free flow in links up to intersections Route selection of driver in two ways: Fixed proportions of flow out of every intersection Centrally controlled directives yielding a traffic split Spil-backs play a major role Instead of tracking a trajectory, minimization of makes sense ( ) 2 cars in system Key point: We can do all of the above, yet maintain the linear P structure for MPC
Example: A More Complex Manufacturing Network
Example: A More Complex Manufacturing Network Use Linear Program (LP) to Find a Reference Trajectory ρ [0, 1] s.t. max 1 0 1/m 3 1 1 0 0 0 1 1/m 2 0 1/m 4 4i=1 w i r i r 1 r 2 r 3 r 4 r i 0, i = 1, 2, 3, 4. c 1m 1 c 3 c 4 c 2 c 5 (route 1) U r 1 (n) = ρr 1 /m 1, X r 5 (n) = X r 6 (n) = X r 7 (n) = X r 8 (n) = Ur 5 (n) = Ur 6 (n) = Ur 7 (n) = Ur 8 (n) = ρr 1, (route 2) U r 2 (n) = ρr 2 /m 2, (route 3) U r 3 (n) = ρr 3 /m 3, (route 4) U r 4 (n) = ρr 4 /m 4, X r 10 (n) = X r 11 (n) = X r 12 (n) = X r 9 (n) = Ur 9 (n) = ρr 4, (sinks) X r 13 (n) = ρ(r 1 + r 2 )n, X r 14 (n) = ρr 3 n, X r 15 (n) = ρr 4 n., Server 1 Server 2 Server 3 Server 4 Server 5 1 5 6 7 8 S 13 S 14 3 2 S 15 9 D 12 D 11 D 10 4
A More Complex Network (cont.) Parameters set such that r i > 0, i = 1, 2, 3, 4, = I, R = I, ρ = 1 N = 5, Stable 80 60 40 20 1010 1020 1030 1040 1050 n N = 4, Stable in s (not in output). N = 3 Unstable 100 50 50 2000 4000 6000 8000 10 000 n 200 400 600 800 1000 n 50 100 50 150 100
Stability? Continuous Deterministic Case Add end point constraint: X e (N) = 0 Main Theoretical Result: If feasible solution exists then resulting system is asymptotically stable Alternative: Take N = Discrete Stochastic Case No general result Some hope of proving positive recurrence for toy examples by analyzing the solution of the P when X0 e is far from the origin
Conclusion Main idea: View queueing network as controlled linear system with self generated noise apply MPC appears to work well General theory: e.g. Stability properties... hard to obtain At least... Hope for asymptotic explicit stochastic analysis of some toy examples To do: Set up observers (possibly using the noise structure)