320 likes | 560 Views
Model Predictive Control for Embedded Applications Leonidas G. Bleris Panagiotis Vouzis, Mark Arnold, and Mayuresh V. Kothare 2006 AIChE Annual Meeting San Francisco, CA. Introduction. Model Predictive Control Theory MPC for Portable Devices Implementation Pathways Applications
E N D
Model Predictive Control for Embedded Applications Leonidas G. Bleris Panagiotis Vouzis, Mark Arnold, and Mayuresh V. Kothare 2006 AIChEAnnual MeetingSan Francisco, CA
Introduction • Model Predictive Control • Theory • MPC for Portable Devices • Implementation Pathways • Applications • Concluding Remarks
…briefly A class of control algorithms that utilize an explicit process model to compute a manipulated variable profile that will optimize an open-loop performance objective over a future time interval. The performance objective typically penalizes predicted future errors and manipulated variable movement subject to constraints
History (...briefly) • LQR (Kalman, 1964) • Unconstrained infinite horizon • Constrained finite horizon – MPC (Richalet et al., 1978, Cutler & Ramaker,1979) • Driven by demands in industry • Defined MPC paradigm • Posed as quadratic program (QP) (Cutler et al. 1983) • Constraints appear explicitly • Academic research: 919 papers in 2002... (Allgöwer, 2004) • Stability • Performance • Explicit MPC (Bemporad et al. 2002, Tøndel et al. 2003) (Qin & Badgwell, 2003)
…in detail Disturbances Parameters MPC Umpc System Output Uinitial State-space Transfer function Step response Impulse response Model: Predicted outputs Inputs + Reference Model - Updated Inputs Optimization Cost Function + Control & Prediction horizons + Weighting matrices Constraints
Receding horizon solution Model Optimization Disturbances Parameters Umpc System Output Uinitial Set-point Past Future Projected output Manipulated input k K+1 K+2 K+3 K+m-1 Prediction Horizon Control Horizon
Constraints • The three basic types of constraint; hard, soft and setpoint approximation. • Hard constraints (top) should not be violated in the future. • Soft constraints (middle) may be violated in the future, but the violation is penalized in the objective function. • Setpoint approximation of constraint (bottom) penalizes deviations above and below the constraint. Shades areas show violations penalized in the dynamic optimization. Froisy, 1994
Output and Input Trajectories • Four options for specifying desired controlled variables behavior: • setpoint • zone • reference trajectory • funnel. • Shaded areas show violations penalized in the dynamic optimization
Why MPC? • Ability to enforce constraints on manipulated and controlled variables • Economic operating point of typical processes often close to constraints… • Ability to handle large multivariable systems • Novel formulations (such as hybrid MPC) enable the application to systems involving both discrete-event and continuous variables. ..not • Problems with model uncertainties and over-parameterized models • MPC requires on-line optimization of a possibly large problem, at each control decision. • Using Newton’s algorithm, the number of operations is 12(n3+6n2+10n), where n is the size of the problem: (inputs) x (control horizon M) Choosing an MPC technology for a given application can be a complex task!
Why Embedded MPC? Need for advanced embedded controllers is inherent in multiple application areas: • Biomedical / Prosthetics • Robotics • Automotive / Avionics • etc Desirable characteristics of an MPC chip? • Reliable operation • Low-power consumption • Small area • Small memory-size requirements • Operation in low frequency and voltage • Reconfigurability
Biomedical Applications R. Dorf and R. Bishop, Modern Control Systems, Addison Wesley, 7th edition, 1995.
Drug Delivery - Prosthetics • American Diabetes Association: Industry size $11 billion • Nearly 6% of the U.S. population Figure: Diabetes patients in US • “Smart” Prosthetics: Controllers for artificial limbs • Global market for neuromodulation, stimulation and neurosensors at US$2.4 billion for 2004 with expected annual growth of 32% • Neuronal prosthetics market, at US$2.2 billion by 2008 • Need for MPC arises from the multivariable and constraint nature • Controller allows for flexibility and usability • Improves comfort and mobility of patients
Automotive Economist, September 2006
MPC for Portable Systems NSF workshops: • The importance of control and system integration of microscale systems emphasized • “For self-contained miniaturized systems, the sensors, actuators and control hardware must be included within the system design.” One of the issues raised was that software and DSP based control: • may not be practical since they may take up too much “real estate” on the chip • might not be sufficiently fast for microscale system dynamics. Shapiro B. Workshop on Control and System Integration of Micro- and Nano-Scale Systems, Technical Report, National Science Foundation Workshop, 2004 Sitti M. Workshop on Future Directions in Nano-Scale Systems, Dynamics and Control, Technical report, National Science Foundation Workshop, 2003
Implementation Pathways • S/W-H/W Co-Designed Embedded Controller • Customize the implementation according to the optimization algorithm and design/performance objectives • Application-Specific Processor • Speed and reduction in “real estate” • Off-the-shelf General Purpose Processor • No need for H/W design • Easy implementation since only programming is required • Unable to tailor the H/W to the particular needs of the problem
S/W-H/W Co-Design Approach Input (16 bits) 16-bit µP Core Matrix Coprocessor + LNS Output (16 bits) Write Read CS Data or Status
MPC formulation • The optimization problem: • State-Space model of a system • Results to:
Computational Issues in MPC P:Prediction Horizon M:Control Horizon N: Number of states B = P×M A = P×N Yref = 1×M • Using Newton's method: • We get: where: • Abundant matrix operations
HW-SW Partitioning Gradient, Hessian, Gauss-Jordan Matrix Coprocessor Newton, Initialization ADCUS • µP used: ADCUS SE1608 16 bit • FPGA used: Virtex IV of Xilinx • Development environment: ISE 7.1 of Xilinx & EISC Studio of ADCUS Profiling results for a benchmark control problem on a Pentium processor.
Profiling and Timing Results of the ADCUS-Coprocessor Architecture The clock cycles required by each function of the Newton’s algorithm for one optimization iteration Profiling results for the benchmark problem on the ADCUS-Coprocessor architecture
ASIP design framework Satisfy: System performance requirements using minimum required implementation complexity Emulations: Logarithmic number system (LNS) arithmetic K integer bits and F fraction bits [minimize] LNS: advantage in cost, power consumption and speed, that increases as the word size decreases Adjust the size of words (the #bits processed in a single instruction) using parametric simulation tests
Application: Heat Regulation Figure: % of error for different control horizons
Heat Regulation - Initial Simulations Using K=7, F=20 and CH=6
Word size reduction Figure: % of error for different values of F Figure: Actuation/ Output (K=5, F=10 and CH=6) • Observations: • While the output is “far” from the set point, the behavior is close to optimal (full precision). • Low precision causes large errors in the controlled variable when close to the set point.
Reduced precision simulations Using K=5, F=10 and CH=6 Using K=5, F=8 and CH=6
Hardware Implementation • Estimations for both 64-bit FP and 16-bit LNS circuits show: • The size required is about 17 times smaller in 16-bit LNS. • The clock cycle is at least 3.23 times faster in 16-bit LNS. • The proposed problem can be solved at sampling speeds as low as 32ms. L. Bleris, J. Garcia, M. Arnold and M. Kothare, “Towards Embedded Model Predictive Control for System-On-a-Chip Applications”, Journal of Process Control, 16, 255-264, Mar. 2006.
Emulation Results Switching between setpoints using MPC (solid line) and a heuristic controller (dashed line). Top plot: transient response of the concentration using step response (dashed line), MPC I (thin line) and MPC II (solid line). Bottom plot: the actuation for the MPC II case. L. Bleris, J. Garcia, M. Arnold and M. Kothare, “Model predictive hydrodynamic regulation of microflows”. Journal of Micromechanics and Microengineering, 16, 1792-1799, 2006.
Conclusions • S/W-H/W Co-Designed Embedded Controller • S/W & H/W are tailored to the particular family of problems • Bigger development effort • Application-Specific Processor • Accuracy tailored to the particular problem • Most efficient in terms of power consumption and performance • Once fabricated cannot be reconfigured • Embedded optimization and model based controllers: • can play a critical role in ensuring the proper functionality • desired performance of any device • Economic operating point of typical processes are close to constraints
Acknowledgements • Panagiotis Vouzis • Dr. Jesus Garcia • Prof. Kothare • Prof. Arnold • US National Science Foundation • CTS-9980781 (‘Engineering Microsystems: XYZ-on-a-chip’ program) • CTS-0134102 (CAREER program) • The Technology Collaborative • ADCUS, Inc. Thank you for your attention