0% found this document useful (0 votes)
16 views

Lab F Linear MPC

The document describes implementing a model predictive control (MPC) application for temperature control using a second order linear empirical model. It provides the objective, equations for the empirical model, estimated parameter values, and instructions to design an MPC controller that follows temperature setpoint changes over a 10 minute period. It also provides questions to consider regarding controller tuning and performance.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Lab F Linear MPC

The document describes implementing a model predictive control (MPC) application for temperature control using a second order linear empirical model. It provides the objective, equations for the empirical model, estimated parameter values, and instructions to design an MPC controller that follows temperature setpoint changes over a 10 minute period. It also provides questions to consider regarding controller tuning and performance.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Temperature Control Lab F: Model Predictive Control

Objective: Implement a Model Predictive Control (MPC) application for the


Temperature Control lab. Use a second order linear empirical model with heaters 1 and
2 (Q1 and Q2) along with temperatures 1 and 2 (Tc1, Tc2, Th1, Th2). The difference
between the two heater temperatures (Δ𝑇ℎ = 𝑇ℎ2 − 𝑇ℎ1) is used to approximate the
heat transferred between the two heaters.

Heater 1 / Temperature 1 Heater 2 / Temperature 2_________________


𝑑𝑇ℎ1 𝑑𝑇ℎ2
𝜏12 𝑑𝑡
+ (𝑇ℎ1 − 𝑇𝑎 ) = 𝐾1 𝑄1 + 𝐾3 Δ𝑇ℎ 𝜏12 𝑑𝑡
+ (𝑇ℎ2 − 𝑇𝑎 ) = 𝐾2 𝑄2 − 𝐾3 Δ𝑇ℎ

𝑑𝑇𝑐1 𝑑𝑇𝑐2
𝜏3 + (𝑇𝑐1 − 𝑇𝑎 ) = 𝑇ℎ1 − 𝑇𝑎 𝜏3 + (𝑇𝑐2 − 𝑇𝑎 ) = 𝑇ℎ2 − 𝑇𝑎
𝑑𝑡 𝑑𝑡

There are 5 unknown parameters with 2 time constants (𝜏12 and 𝜏3 ) and 3 gains (𝐾1 , 𝐾2 , 𝐾3 ) that need to
be estimated to minimize the difference between the measured and predicted values for both temperatures.
A parameter estimation exercise (see Figure 1) has identified the parameters in Table 1.

Figure 1. Parameter Estimation Results

The MHE or batch parameter estimation application can be rerun to improve parameter estimates, if desired.
A more accurate ambient temperature can also be obtained by measuring the temperature with no heater
output.
Table 1. Empirical Model Parameters and Variables
Parameter Value Description
𝐾1 0.607 Heater 1 Gain (~Δ𝑇ℎ1 /Δ𝑄1 ) at Steady State
𝐾2 0.293 Heater 2 Gain (~Δ𝑇ℎ2 /Δ𝑄1 ) at Steady State
𝐾3 0.240 Heat Transfer Between Heaters
𝜏12 192 sec Time Constant for Thermal Capacitance of Heaters 1 and 2 (sec)
𝜏3 15 sec Time Constant for Conduction to Temperature Sensor (sec)
𝑇𝑎 23 ℃ Ambient Temperature (℃)
𝑄1 0-100% Heater Output 1 (%)
𝑄2 0-100% Heater Output 2 (%)

Variables Initial Description


Condition
𝑇ℎ1 𝑇𝑎 Heater 1 Temperature (℃)
𝑇ℎ2 𝑇𝑎 Heater 2 Temperature (℃)
𝑇𝑐1 𝑇𝑎 Sensor 1 Temperature (℃)
𝑇𝑐2 𝑇𝑎 Sensor 2 Temperature (℃)

With this model, implement an MPC application that follows setpoint changes for both temperatures. It is
recommended to use a 10 minute test period where each setpoint changes 2-3 times during the testing.
Include a plot of the setpoints, measured temperatures, and heater values. Discuss the controller
performance and whether model mismatch or controller tuning can be improved.

Questions for Consideration

1. How did you decide on the appropriate control horizon time and cycle time? What are the
tradeoffs between a shorter or longer time horizon?
2. How well does the MPC application track the setpoints? Are there regions where there is
excessive overshoot (too aggressive) or a slow response (too sluggish)?
3. How much does the heater move each cycle of the controller when not saturated at an upper or
lower limit? In some applications, excessive movement of the MV can cause problems such as
with wearing out valves or motors. If it were important to have less MV movement, what tuning
parameters could be adjusted?
4. What are the values for STATUS (optimizer status) and FSTATUS (measurement feedback
status) for Q1 and Q2 (heater values as manipulated variables) and Tc1 and Tc2 (measured
temperatures as controlled variables) for the MPC application? Create a table that shows how
MVs and CVs are configured for Moving Horizon Estimation (MHE) versus Model Predictive
Control (MPC).

See https://github.com/APMonitor/arduino/ at 2_Regression/2nd_order_MIMO for starting files. The


source code for the solution is located at 6_Model_Predictive_Control/2nd_order_linear. Solution
videos are available in Python (GEKKO) and MATLAB. You should strive to build your own
applications versus relying on the solution templates.

You might also like