process modelling and simulation with application to the...

24
Process Modelling and Simulation with Application to the MATLAB/Simulink Environment November, 2016 Università di Cagliari, Sardinia (IT) František Gazdoš ([email protected]) CZECH REPUBLIC

Upload: phamcong

Post on 19-Mar-2018

222 views

Category:

Documents


5 download

TRANSCRIPT

Process Modelling and Simulation

with Application to the MATLAB/Simulink Environment

November, 2016 Università di Cagliari, Sardinia (IT)

František Gazdoš ([email protected])

CZECH REPUBLIC

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš

COUNTRIES & REGIONS…

Italy / Sardinia / Cagliari (60M / 1.6M / 154k )

Czech Republic / Zlín Region / Zlín

(10.5M / 600k / 75k)

UNIVERSITIES…

Università di Cagliari (more than 30.000 students)

Faculty of Biology and Pharmacy

Faculty of Engineering and Architecture

Faculty of Medicine and Surgery

Faculty of Sciences

Faculty of Humanities

Faculty of Economic Sciences,

Law and Political Sciences

Tomas Bata University in Zlín

(more than 10.000 students)

Faculty of Technology

Faculty of Management and Economics

Faculty of Multimedia Communications

Faculty of Applied Informatics

Faculty of Logistics and Crisis

Management

Faculty of Humanities

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš

Faculty of Applied Informatics

Studies: Bachelor’s Degree studies

Follow-on Master’s Degree studies

Ph.D. Degree studies

A number of courses in English

for International students!

R&D in:

Applied Informatics

Security Technologies

Automatic Control

Measurement and Instrumentation

You are Welcome!

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš

Process modelling and simulation… / contents

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 2

CONTENTS

1 Motivation – Why?

2 Approaches – How?

3 Illustrative examples

room heating process

mass-spring-damper system

tubular heat exchanger

4 Introduction to MATLAB & Simulink

5 Further - What else?

basics of MATLAB programming (displaying process static characteristics)

building Simulink blocks, masking…

basics of Simulink (solving differential equations – process dynamics responses)

Process modelling and simulation… / …why…?

1. MOTIVATION – WHY?

it saves health & lives!

(hazardous real-time experiments, dangerous conditions…)

it saves time!

(slow real-time experiments…)

it saves costs!

(expensive real-time experiments, repairs…)

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 3

Process modelling and simulation… / …how..?

2. APPROACHES – HOW?

structure & behaviour model

(model variables & parameters correspond

to real process variables & parameters)

knowledge of the process +

mathemathics, physics, chemistry, bilogy…

ANALYTICAL approach:

analytical (internal, state-space)

model

mathematical description of physical,

chemical, bilogical sub-processes…

material & energy balances

design stage of a new technology

(real plant still does not exists…)

valid in wide range of input variables and modes

(often not allowable under real conditions…)

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 4

Process modelling and simulation… / …how..?

2. APPROACHES – HOW?

only behaviour model

(model variables & parameters DO NOT correspond

to real process variables & parameters)

EMPIRICAL approach:

experimental (external, input-output)

model

measured data processing & evaluation

(model structure choice, identification,…)

real-time measurements (input output)

usually simpler model

process must already exist

(real-time measurements)

often more accurate model

(for the measured range of input signals!)

usually time-demanding…

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 5

Process modelling and simulation… / …how..?

2. APPROACHES – HOW?

mathematical model = SIMPLIFIED reality

(some sub-processes unknown, some neglected…)

COMBINATION

analytical + empirical

(basic model structure by an analysis + parameters via experiments…)

TRADE-OFF

(model accuracy x model complexity)

…what to model…? …what to neglect…?

…how complex the model

can be…?

…how accurate model

is needed…?

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 6

Process modelling and simulation… / …how..?

2. APPROACHES – HOW?

definition of variables (input, output, state)

simplifying assumptions

energy / material balances

steady-states analysis

choice / estimate / determination of model parameters

choice of initial / boundary conditions & operating point(s) for simulation

implementation of the model

simulation experiments

experiments evaluation

model verification / corrections…

process variables limits, model validity

schematic picture

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 7

Process modelling and simulation… / …examples…

3. ILLUSTRATIVE EXAMPLES

ROOM heating process: schematic picture:

definition of variables:

inputs: - heat power P(t) in [W]

- outdoor temperature TC(t) in [K]

states: - room temperature T(t) in [K]

outputs: - room temperature T(t) in [K]

simplifying assumptions:

- ideal air mixing

- constant process parameters

(air volume V, density , heat capacity cP,

overall heat transfer coefficient a,

heat transfer surface area A , …)

- heat accumulation in the walls

neglected

- …

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 8

Process modelling and simulation… / …examples…

3. ILLUSTRATIVE EXAMPLES

ROOM heating process:

energy / material balances:

heat input = heat output + heat accumulation

steady-states analysis:

(steady variables)

(heat loss due to exchange

of air and heat conduction

through the walls)

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 9

Process modelling and simulation… / …examples…

3. ILLUSTRATIVE EXAMPLES

ROOM heating process:

choice / estimate / determination of model parameters:

process variables limits, model validity

choice of initial / boundary conditions & operating point(s) for simulation

- no singular states…

- model valid in common (reasonable chosen) conditions…

T(0) = 25 [°C] = 298.15 [K]

P = 2000 [W]

Tc = 5 [°C] = 278.15 [K]

A = 55 [m2], V = 70 [m3] …measured

a = 1.82 [W/(m2K)] … estimated (steady-state model for Ps = 2000 [W] and Ts = 20 [K])

= 1.205 [kg/m3], cp = 1005 [J/(kgK)] …taken from the literature (for T = 20 [°C])

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 10

Process modelling and simulation… / …examples…

3. ILLUSTRATIVE EXAMPLES

ROOM heating process:

implementation of the model (steady-state model, dynamic model…)

simulation experiments

experiments evaluation

model verification / corrections…

- linear 1st order system,

- with lumped parameters,

- continuous-time,

- deterministic,

- multivariable (MIMO),

- time-invariant…

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 11

Process modelling and simulation… / …MATLAB…

4. INTRODUCTION TO MATLAB & SIMULINK

basics of MATLAB programming (displaying process static characteristics)

basics of Simulink (solving differential equations – process dynamics responses)

building Simulink blocks, masking…

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 12

Process modelling and simulation… / …examples…

ILLUSTRATIVE EXAMPLES

Mass-spring-damper system:

(simplified car shock absorber) schematic picture:

definition of variables:

inputs: - forcing function F(t) in [N]

states: - position y(t) in [m]

- velocity v(t) = dy(t)/dt in [m/s]

outputs: - position y(t) in [m]

simplifying assumptions:

- ideal spring

- well lubricated, sliding surface

(wall friction modelled as viscous damper)

- constant process parameters

(spring constant k, friction constant b,

mass of load m, …)

- …

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 13

Process modelling and simulation… / …examples…

ILLUSTRATIVE EXAMPLES

Mass-spring-damper system:

…performing a force balance:

(& utilizing Newton’s 2nd law of motion…)

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 14

steady-states analysis:

spring force friction force (viscous damper)

(steady variables)

Process modelling and simulation… / …examples…

ILLUSTRATIVE EXAMPLES

Mass-spring-damper system:

choice / estimate / determination of model parameters:

process variables limits, model validity

choice of initial / boundary conditions & operating point(s) for simulation

- no singular states…

- model valid in common (reasonable chosen) conditions…

y(0) = dy(0)/dt = 0 [m]

F = 50 [N]

m = 500 [kg] … load of mass (measured)

k = 2000 [N/m] … spring constant (taken form the literature)

b = 400 [N/(m/s)] … friction constant / viscous damping coefficient (taken from the literature)

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 15

Process modelling and simulation… / …examples…

ILLUSTRATIVE EXAMPLES

Mass-spring-damper system:

implementation of the model (steady-state model, dynamic model…)

simulation experiments

experiments evaluation

- linear 2nd order system,

- with lumped parameters,

- continuous-time,

- deterministic,

- single-input single-output (SISO),

- time-invariant…

model verification / corrections…

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 16

Process modelling and simulation… / …examples…

ILLUSTRATIVE EXAMPLES

Mass-spring-damper system:

transfer function description (using the Laplace transform):

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 17

Gain “K”

time-constant “T”

damping coefficient

“ ”

steady-state gain:

damping coefficient:

time-constant

(natural period / inverse natural frequency): natural frequency:

Process modelling and simulation… / …examples…

ILLUSTRATIVE EXAMPLES

Mass-spring-damper system:

state-space description:

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 18

define states as: …and input as: …then output will be:

then it holds: …and the 2nd order model can be rewritten into two 1st order DE:

in the matrix form: A B

C D

in the compact form: …with matrices as:

Process modelling and simulation… / …examples…

ILLUSTRATIVE EXAMPLES

Mass-spring-damper system:

state-space description:

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 19

and initial conditions:

…easy simulation in the MATLAB/Simulink using the “Transfer Fcn” or “State-Space” blocks...

Process modelling and simulation… / …what else..?

5. FURTHER…for control engineers…

linearization in a chosen operating point (for nonlinear models…)

deviation variables & proper scaling…

system analysis… - linear / nonlinear…?

- with lumped / distributed parameters...?

- continuous / discrete-time...?

- deterministic / stochastic...?

- single-variable / multi-variable...?

- time-invariant / variant...?

- state-space / transfer function description...?

- controllabilty & observability...?

- system degree & type (P/I/D)...?

- system gain & time-constants...?

- (un)stable...?

- (a)periodic response...?

- (non-)minimum-phase behaviour...?

- with(out) time-delay…?

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš 20

Process modelling and simulation… / …what else..?

5. FURTHER…for self-study…

WELLSTEAD, P. Introduction to Physical Modelling. Academic Press, 1980.

SEVERANCE, F.L. System Modeling and Simulation: An Introduction. Wiley, 2001.

INGHAM et al. Chemical Engineering Dynamics: Modelling with PC Simulation. Wiley, 1994.

LUYBEN, W.L. Process Modeling, Simulation and Control for Chemical Engineers. McGraw-Hill,

1990.

HANSELMAN, D.C. & LITTLEFIELD, B.L. Mastering MATLAB. Prentice Hall, 2011.

DABNEY, J.B. & HARMAN, T.L. Mastering Simulink. Prentice Hall, 2003.

SKOGESTAD, S & I. POSTLETHWAITE, I. Multivariable Feedback Control: Analysis and Design.

Chichester: Wiley, 2005.

Thank you

for your attention!

Erasmus lectures at Università di Cagliari in November 2016 / František Gazdoš