INTRODUCTION TO THE SIMULATION OF ENERGY AND STORAGE SYSTEMS 20.4.2018 FUSES+ in Stralsund Merja Mäkelä merja.makela@xamk.fi South-Eastern Finland University of Applied Sciences
Intended learning outcomes After this discussion, our participant is able to understand basic modelling and simulation principles develop simple energy system and process control models identify visualized simulation based on Matlab Simulink.
Agenda Introduction System models Process control models Controller models Modelling and simulation of energy and storage systems Case 1: Capacity of a tank with straight walls Case 2: Tank capacity with a free output Case 3: Tank capacity with a level control loop Case 4: Mixer tank with heat capacity Case 5: Solar collector model Conclusions
INTRODUCTION
Energy sources and storages Potential Chemical (hydrogen) Gravitational (dam, reservoir capacity) Electrical (battery) Thermal (heat accumulator, boiler reservoir) Kinetic Wind (hydrogen, battery) Electricity, heat and movement are especially interesting. Different kinds of energy conversions are needed.
Why do we need simulations and models? We are able to deal with systems by using simulation software and models: supporting process and control system design, such as predictions of system steady states testing of new process and control methods. training the operation of process systems. Matlab Simulink is widely used in dynamic simulations. A model describes a phenomenon. A model is often a mathematical presentation.
SYSTEM MODELS
System model in general Inputs U Outputs Y? Relationship between outputs and inputs Single Input, Single Output (SISO) Multiple Inputs, Multiple Outputs (MIMO)
Example 1: From a real fuel cell to a FC model? Fuel cell Development of novel control strategies Inputs U Outputs Y? www.directindustry.com/prod/
Example 2: From an FC model to a real FC Design of a new product www.directindustry.com/prod/
Energy system model Energy sources Process system or engine Energy products and emissions Relationship between energy products and energy sources products, such as electricity, heat, movement emissions, such as NOx sources, such as renewable and fossile fuel components
Example: PEM fuel cell system model Energy sources Hydrogen Oxygen Inputs U PEMFC Outputs Y Energy products DC Voltage Load Which voltage could we get when we have constant hydrogen and oxygen feed, and a certain load? Water Waste heat
PROCESS CONTROL MODELS
Energy process control model Manipulated variables Actuators and energy process dynamics Controlled (and measured) variables Relationship between controlled variables and manipulated variables controlled variables, such as flows, temperatures, pressures manipulated variables, such as control signals to actuators
Example: PEMFC process control model Hydrogen flow (hydrogen partial pressure) PEMFC process dynamics and actuator dynamics DC Voltage Relationship between controlled variables and manipulated variables DC voltage, the controlled variable hydrogen flow valve, the manipulated variable
PEMFC process control model as a flow chart presentation Hydrogen Oxygen PIC PEMFC DC voltage and current
CONTROLLER MODELS
Set points Controller model + - Measured variables Control errors Controller Control algorithm (Control law) Relationship between control outputs and controller errors control errors (set points from operators measured variables from sensors and transmitters (controlled variables) controller with a control algorithm controller outputs (control signals to actuators) Controller outputs to actuators
Example: PID controller model Hydrogen p. pressure set point + - Control error e PID control algorithm Controller Control algorithm Hydrogen partial u Kp( e T d ) i dt 0 pressure measurement Relationship between the control error and controller output 1 t edt T de Controller output u Control signal to a valve actuator 1 de u Kp( e edt Td ) T dt i t 0
MODELLING AND SIMULATION OF ENERGY AND STORAGE SYSTEMS
Two basic methods from systems to models System 1. Physical 2. Identification modelling Model 1. method: Physical modelling first principles (nature laws) as a basis 2. method: Identification fitting observations to ready-made model structures
How are we able to build models? First principle models: We make static and dynamic models based on mass balances, consistency balances and energy balances. Identification models: We fit sampled system data to ready-made model structures, such as Laplace transfer function models discrete ARX models.
Example of a static model: Tank reservoir In a steady state: f in f in f out f in Input flow [m 3 /s] f out Output flow [m 3 /s] V Volume in a tank [m 3 ] V f out
Dynamic tank capacity model dv f f dt in out V Volume in a tank [m 3 ] f in Input flow [m 3 /s] f out Output flow [m 3 /s] f in V f out
CASE 1: CAPACITY OF A TANK WITH STRAIGHT WALLS
Tank model: Dependent on the level a* dh f f dt in out h tank level [m] fin input volume flow [m 3 /s] fout output volume flow [m 3 /s] a tank cross section [m 2 ] a f in V h f out
From a differential equation to a Matlab Simulink presentation Input Stimulus ( f in f out )* 1 a dh dt Output Input flow fin change + 0.005 1/a 1 s 1/a Integrator Initial value h = 1 m Tank level h 0.01 Constant output flow fout 27
28 Simulation results: Case 1
CASE 2: TANK CAPACITY WITH A FREE OUTPUT FLOW
Tank model with a free output flow a * dt dh f f in out f in f b* 2* g * h out h fin fout a b tank level input volume flow output volume flow cross section of the tank cross section of the output pipeline a V h b f out
From a differential equation to a Matlab Simulink presentation 1 dh Input Stimulus ( f in b * 2* g * h ) a dt Output Input flow fout : steady state + 0.001 1/a 1 s 1/a Integrator Initial value h = 1 m Tank level h b*sqrt(2*9.81 *u(1)) Fcn
Simulation results: Case 2
CASE 3: TANK CAPACITY WITH A LEVEL CONTROL LOOP
Tank model with a level control loop h fin fout a a* dh dt f out c* f in f out u 1 de u Kp( e edt Td ) T dt tank level input volume flow output volume flow tank cross section i t 0 u e Kp Ti Td h a controller output control error controller gain integration time derivation time f in LIC f out
From equations to a Simulink model K p ( e 1 de edt Td T ) dt i t 0 u Input Stimulus ( f in f out )* 1 a dh dt Stimulus fin 0.5 -> 0.25 1/a 1 s 1 1/a a=10 m2 Integrator Initial value h = 0 m Level set point 0 -> 1 m kp Gain Gain 1 1/ti Gain 2 1 s Integrator Add Output td Gain 3 du /dt Derivative Added slowness for reality Tank level h 35 Saturation Slowness Delay 2 sec
Simulation results: Case 3
CASE 4: MIXER TANK WITH HEAT CAPACITY
Mixer tank capacity model a * dh dt f in f out f hot f cold f hot f out f cold f out b* 2* g * h h V b Cross section of the pipeline [m 2 ] f hot Hot input flow [m 3 /s] f cold Cold input flow [m 3 /s] f out Output flow [m 3 /s] a f out b
Mixer tank heat capacity model Change in energy [kj/s] f hot f cold ahdc dt dt f hot dc( Thot T ) fcolddc( T Tcold c specific heat capacity [J/kgC] d density [kg/m 3 ] T temperature of the liquid in the tank f hot hot input flow [m 3 /s] f cold cold input flow [m 3 /s ) a T f out h
Mixer tank heat capacity model Change in temperature [C/s] f hot f cold dt dt ( fhot ( Thot T ) fcold ( T Tcold )) / ha T h T temperature of the liquid in the tank f hot hot input flow [m 3 /s] f cold cold input flow [m 3 /s a f out
( f hot ( T hot T ) f ( T T )) / cold cold ha dt dt From equations to a Simulink model fhot + 0.005 fcold 1/a 1 s 1/a, a = 1 m Integrator Initial value h = 1 m Tank level h b*sqrt(2*9.81 *u(1)) b= 0.01 90 Thot u(1)*(u(2)-u(3)) Fcn2 Saturation u(1)*(u(2)-u(3)) Fcn3 10 Tcold (u(2)-u(3))/(u(1)*a) Fcn4 1 s Integrator Initial value = 50 C Liquad temperature T 41
Simulation results: Case 4
43 CASE 5: SOLAR THERMAL COLLECTOR MODEL
Solar collector system https://www.vbus.net/scheme/6a46a7e11f9813e2840536533d71d0e2
https://www.vbus.net/#diagram/a2aa1c60690c81ae92809b1cab4a8820 Which models of a solar thermal system could be interesting?
CONCLUSIONS
Conclusions We may develop energy system models controller models energy process control models. There are two basic methods of modelling: first principles identification. We may visualize models by using simulation tools. Matlab Simulink is very widely used in universities.
Thank you for your attention! Any questions, any comments? See you in Matlab Simulink classes!