Practical Applications of Industrial Optimization: from High-Speed Embedded Controllers to Large Discrete Utility Systems
Total Page:16
File Type:pdf, Size:1020Kb
Practical Applications of Industrial Optimization: From High-Speed Embedded Controllers to Large Discrete Utility Systems Jonathan David Currie School of Engineering February 2014 Supervised by: Associate Professor David I. Wilson Professor Brent R. Young A thesis submitted to Auckland University of Technology in fulfilment of the requirements for the degree of Doctor of Philosophy. Abstract Optimization of large-scale industrial systems requires not only state-of-the-art nu- merical algorithms, but also accurate tailor-made underlying models to ensure the solution is both sensible and useful. The combination of setting up a rigorous op- timization solver together with building a high-fidelity model can cause the typical industrial user to become overwhelmed with formulating one or both of these steps, resulting in poor performance and/or a suboptimal solution. This work addresses the problem by developing a high-level framework for modelling and solving industrially significant optimization problems. The framework allows the user to concentrate on their domain specialization, while the framework automatically tailors the optimiza- tion problem by exploiting structural features within the user’s model. To illustrate the benefit of this approach, two widely varying industrial optimization problems are investigated: Online optimization within an embedded predictive controller and large-scale steam utility system operational optimization. Within the first chosen example, an embedded model predictive controller, an optimal control problem must be solved at each sample in order to calculate the next control move(s). In a traditional linear predictive controller, this requires solving online a quadratic programming problem which, even for modest problems with rel- atively short prediction horizons, can involve tens of decision variables and hundreds of linear constraints. On an embedded platform, such as a microcontroller, solving a problem of this size online requires substantial computational power together with a large amount of dynamic memory, both of which are highly constrained on typical hardware. To overcome the hurdle, this work introduces the jMPC Toolbox, a high- level MATLAB framework for describing, tuning, simulating and generating em- bedded predictive controllers. Furthermore, the quad wright and quad mehrotra interior-point quadratic programming solvers have been developed, which are specif- ically tailored to solve modestly-sized online optimization problems within a model predictive controller on embedded hardware. Together, these two contributions al- low an embedded predictive controller with an online optimization solver capable of over 10kHz sampling rates to be built, verified and deployed to modest embedded hardware in less than ten seconds. A case study demonstrates the effectiveness of the i approach applied to an unstable, nonlinear laboratory-scale helicopter, while bench- marks against literature show for the problems of interest that the quad mehrotra solver is the best in class. The second chosen example, steam utility systems, are designed to supply the heating, mechanical and electrical demands of an on-site process system, such as an oil refinery, paper mill, chemical process plant or a variety of other energy intensive industries. Steam is used as the working fluid within the utility system, and is generated by boilers or recovered from waste heat, which is then used to supply the heating requirements of the process, or used to drive steam turbines to supply mechanical and electrical loads. In addition, gas turbines provide modern utility systems with co-generation potential, allowing the system to export excess electricity if economically viable. However, due to the discrete nature of a utility system where equipment can be switched in and out of service, steam flows redistributed, and where zero-flow conditions are normal, optimizing the operation of a utility system requires a rigorous model based on thermodynamics and state-of-the-art numerical algorithms. To address this problem, a second MATLAB framework, the OPTI Toolbox, has been developed which provides a suite of state-of-the-art open-source optimization algorithms suitable for solving the discrete optimization problems that arise from operational optimization. Furthermore, to tailor the utility system model to the optimizer, a symbolic mixed integer nonlinear modelling strategy is developed to approximate a rigorous simulator model, combining regressions from literature, industrial experience and process specific knowledge, resulting in an efficient model for optimization. Multiple case studies are presented to demonstrate the efficiency of the approach, including the operational optimization of an industrial petrochemical utility system. Each of the case studies encompass a range of operating conditions and superstructures, noting the framework correctly solves for the global optimum for all problems in less than 5 seconds, matches the solution from an equivalent rigorous thermodynamic model and provides industrially significant CAPEX-free economic savings. While the jMPC and OPTI Toolboxes target substantially different ends of the industrial optimization spectrum in terms of physical size and dynamic response, this work shows that the common approach of abstracting the optimization problem via a higher-level framework, together with exploiting problem specific characteristics, allows high-speed and robust solutions to be obtained to industrially significant problems. Moreover, in both examples the complexities of the model and the inter- face to the optimizer are hidden, allowing the user to focus directly on the problem at hand, yet still obtain best-in-class performance. ii Acknowledgements I firstly wish to thank my academic supervisors, Associate Professor David I Wilson and Professor Brent R Young, for offering me this project. Both David and Brent have provided countless hours of advice, knowledge and insight, and it is due to their invaluable assistance that the project has been a success. I am especially grateful to David’s enthusiasm and support, specifically within the fields of numerical analysis, automatic control and process modelling. In addition, I wish to thank AUT University for providing me both undergrad- uate and postgraduate scholarships, which has allowed me to dedicate a significant part of the last 8 years to my study and research. Furthermore, a special mention is due to all the engineering academic and administration staff at AUT who have with- out exception been incredibly supportive of my research. I especially appreciate the time spent with Mark Beckerleg, John Collins, David White and Roy Nates when discussing questions related to my research, as well around my decision to pursue postgraduate study. I also wish to thank my parents, Diana Donald and Richard Currie, for the emotional and financial support through this period of my life. In addition, special thanks is due for the assistance in proof-reading, an area I find challenging. Also, considerable recognition is due to Dr. Nick Depree, who taught me the foundations of chemical engineering needed to undertake this project. Without his input and advice, the utility system section would not have been possible. Financial support for this project was provided by the Vice Chancellor’s Doc- toral Scholarship, the Industrial Information and Control Centre (I2C2) and the Engineering Research Institute (ERI), all of which enabled me to undertake this research, and which is gratefully acknowledged. iii List of Publications Currie, J., Prince-Pike, A., and Wilson, D. Auto-Code Generation for Fast Embedded Model Predictive Controllers. In 19th International Conference on Mechatronics and Machine Vision in Practice (Auckland, New Zealand, 28–30 November 2012), pp. 122–128. Currie, J., Prince-Pike, A., and Wilson, D. A Cost Effective High-Speed Auto-Coded Embedded Model Predictive Controller. International Journal of In- telligent Systems Technologies and Applications 13, 1/2 (2014). Currie, J., Wilson, D., Yu, W., and Young, B. Rethinking the Modelling of Energy And Utility Systems. In 9th World Congress of Chemical Engineering (Seoul, Korea, 18–23 August 2013). Invited Keynote. Currie, J., and Wilson, D. I. A Model Predictive Control Toolbox Intended for Rapid Prototyping. In 16th Electronics New Zealand Conference (ENZCon 2009) (Dunedin, New Zealand, 18–20 November 2009), Tim Molteno, Ed., pp. 7–12. Currie, J., and Wilson, D. I. Lightweight Model Predictive Control Intended for Embedded Applications. In 9th International Symposium on Dynamics and Control of Process Systems (DYCOPS) (Leuven, Belgium, 5–7 July 2010), pp. 264– 269. Currie, J., and Wilson, D. I. Interpolated Model Predictive Control: Having Your Cake and Eating it Too. In Australian and New Zealand Annual Chemical Engineering Conference, Chemeca (Sydney Australia, 18–21 September 2011). Currie, J., and Wilson, D. I. OPTI: Lowering the Barrier Between Open Source Optimizers and the Industrial MATLAB User. In Foundations of Computer- Aided Process Operations (Savannah, Georgia, USA, 8–11 January 2012), Nick Sahinidis and Jose Pinto, Eds. Currie, J., and Wilson, D. I. Rigorously Modelling Steam Utility Systems for Mixed Integer Optimization. In 10th International Power and Energy Conference (Ho Chi Minh City, Vietnam, 12–14 December 2012), IEEE, pp. 526–531. Currie, J., and Wilson, D. I. The Efficient Modelling of Steam Utility Systems. In Australian and New Zealand Annual Chemical Engineering Conference, Chemeca (Wellington,