23
Meeting you, Djaeni and Cindy @ Diponegoro University Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com Diponegoro University 27-03-2014

@ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Meeting you, Djaeni and Cindy

@ Diponegoro University

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

Diponegoro University 27-03-2014

Page 2: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Meeting you, Djaeni and Cindy

@ Diponegoro University

Djaeni: PhD at Wageningen University, Systems & Control Group (now Biomass Refinery & Process Dynamics

Me: Assistant Professor at Wageningen University, Systems & Control Group since 1990

Cindy: My daughter traveling Asia for 6 month meeting her dad in Semarang!

Cindy: “Dad, what exactly do you do?”

Attend my lecture!

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

Diponegoro University 27-03-2014

Page 3: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

Examples from personal experience

Five times exam: course Dynamic Systems including PID control ...

Robot control : Still done by PID controllers ...

Greenhouse climate control : Still done by PID controllers ...

Alternative title : War on PID control !

First landing on the moon in 1969: Optimal Control!?

My wife (who is always right): “Do not fully turn off the heater at night”. Is that optimal control?

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

Diponegoro University 27-03-2014

Page 4: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

PID control: I do not understand !

Questions A temperature error is needed to heat the room?

Tm(t) is always late compared to Td(t)?

Why do I need to measure the room temperature?

If I know the heater and room I can compute H(t), or not?

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

Diponegoro University 27-03-2014

Page 5: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

PID control of greenhouse

Questions Window opening, Heater or a combination?

How to get Td(t), Hd(t)?

Is realizing Td(t), Hd(t) the real goal?

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

Diponegoro University 27-03-2014

Page 6: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

The “full” greenhouse control problem

What is the control challenge/objective?

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

Diponegoro University 27-03-2014

Page 7: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

Verbal optimal control problem formulation

Find the heating, CO2 supply and ventilation patterns that produce maximum profit.

Patterns: time functions.

Profit: Benefit – Costs.

Benefit is obtained from selling crops.

Costs are associated with heating (energy supply), CO2 supply, ventilation and other investments.

Simplifications: ignore ventilation and humidity and consider perfectly isolated greenhouse.

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

Diponegoro University 27-03-2014

Page 8: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

Quantitative mathematical formulation

What do the mathematical symbols represent?

What other information is needed to solve the mathematical problem?

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

0

Find , , 0 that maximize

f

f

t

w f P C

H t C t t t

J c W t c H t c C t dt

Diponegoro University 27-03-2014

Page 9: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

Mathematical model of the greenhouse (1)

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

Mathematical model must relate , , 0 to fH t C t t t W t

2

To do this properly the mathematical model must compute:

, , 0 fT t CO t t t

2

2

The growth rate is a function of , :

,

dWT t CO t

dt

dWf T t CO t

dt

Diponegoro University 27-03-2014

Page 10: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

Mathematical model of the greenhouse (2)

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

The rate of temperature change is a function of

, heat capacity greenhouseH H

dTH t

dt

dTc H t cdt

22

2

The rate of concentration change is a function of

, volume greenhouseV V

dCOCO C t

dt

dCOc C t c

dt

Diponegoro University 27-03-2014

Page 11: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

Mathematical model of the greenhouse (3)

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

The mathematical model consists of (first-order) differential equations recognisable by presence of rates of change dx/dt.

Models containing differential equations are called dynamic models.

Dynamic models are obtained from knowledge of the system, often scientific knowledge (first-principles models / white box models).

Using scientific knowledge allows us to understand and interpret the model!

Black box models do not allow for this.

Diponegoro University 27-03-2014

Page 12: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

Halfway summary (1)

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

Optimal control problem: Given a mathematical dynamic model of the system find the control patterns (time-functions/trajectories/histories) that maximize (minimize) a cost function (performance measure/cost criterion/penalty function).

Problem formulation is still missing one thing ...

We also have to know “where the system starts”

We have to know the initial state : values of W(0), T(0), CO2(0).

Diponegoro University 27-03-2014

Page 13: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

Halfway summary (2)

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

Control problem has been turned into a mathematical computational problem.

No need for measurements or errors!

General control objectives (profitability, sustainability) can be quantitatively expressed in the cost function!

General non-linear, multivariable systems can be handled!

Have a break ... of no more than 15 minutes!

Diponegoro University 27-03-2014

Page 14: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

Three optimal control examples

Heating of living room at night

Simplified greenhouse

Robot control

Examples included in Tomlab Propt optimal control toolbox for Matlab. Tomlab is commercially available. A free demo license is easily obtained: http://tomopt.com/tomlab/products/propt

See also http://gvw007.yolasite.com

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

Diponegoro University 27-03-2014

Page 15: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

Heating of living room at night (1)

Control objectives Minimize heat energy supply.

Room temperature at least 20 [oC] at 7.00 AM.

Cost function:

Dynamic model:

Initial state:

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

T o H

dTc T t T t c H t

dt

7

0

J H t dt

0 20T

Diponegoro University 27-03-2014

Page 16: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

Heating of living room at night (2)

Constraints (equalities or inequalities that have to be satisfied exactly):

External input:

Demo!

My wife is almost always right ...

External input:

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

7 20

0 100, 0 7

T

H t t

10, 0 7oT t t

15 10sin / 7 , 0 7oT t t t

Diponegoro University 27-03-2014

Page 17: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

Simplified greenhouse (1)

Control objectives: maximize profit.

Dynamic model:

Cost function = profit:

Initial state:

Constraints:

demo! Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

W

T o H

dWc I t T t W t

dt

dTc T t T t c H t

dt

48

0

p f cJ c W t c H t dt

0 3600, 0 48H t t

0 00

0 10

Wx

T

Diponegoro University 27-03-2014

Page 18: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

Simplified greenhouse (2)

http://www.amazon.com/Optimal-Control-Greenhouse-Cultivation-Straten/dp/1420059610

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

Diponegoro University 27-03-2014

Page 19: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

MK2 Robot

Control objectives Minimum time pick and place; pick and place locations

specified

Constraints Limited DC motor currents proportional to motor torque

Dynamic Model Generated automatically from CAD drawing or a language

specifying the robot topology, the associated link masses and moments of inertia

Result Optimal DC motor currents & optimal robot motion =

optimal path planning! Demo!

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

Diponegoro University 27-03-2014

Page 20: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

Summary (1)

With optimal control: All types of systems can be handled.

All types of control objectives can be considered.

All types of constraints can be handled.

This requires: A quantitative mathematical dynamic model of the system

obtained by exploiting scientific knowledge.

A quantitative mathematical description of the control objectives.

A quantitative mathematical description of the constraints.

What you get: The best control & performance!

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

Diponegoro University 27-03-2014

Page 21: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

Summary (2)

Measurements: are only required to realize feedback to counteract model

and other types of uncertainty.

If the model (including the initial state and external inputs) is known perfectly optimal control: Is errorless, as opposed to PID control.

Shows no latency, as opposed to PID control.

Takes into account all system-interactions, as opposed to PID control.

Is optimal, as opposed to PID control.

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

Diponegoro University 27-03-2014

Page 22: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

Optimal Control

The Future? Society increasingly wants to control everything (health,

environment, food, economy) and quantify and optimize everything (costs, emissions, footprints, energy, weights).

Systems become larger, more complicated and interactive.

or Not? Robots, greenhouses & most industrial processes are mostly

still controlled by PID controllers ...

Neils Armstrong & George Aldrin landed manually ... !

Optimal is only optimal with respect to the model!

If the model is poor, if the process contains highly uncertain parts, the benefits of optimal control vanish.

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

Diponegoro University 27-03-2014

Page 23: @ Diponegoro Universitygvw007.yolasite.com/resources/Dipo/MOC1-Dipo2014.pdf · Meeting you, Djaeni and Cindy @ Diponegoro University Djaeni: PhD at Wageningen University, Systems

Mathematical Modelling & Optimal Control

Final message

If you do not understand you may be wright!

Meet your Dad at the other end of the world to understand what he is doing?

Ask Djaeni for an optimal control course, computers & a Matlab programming course !

Then I will be back !!

Gerard van Willigenburg, Wageningen University, http://gvw007.yolasite.com

Diponegoro University 27-03-2014