Dynamics of Mechanical Systems Techniques for Modeling Discrete











































- Slides: 43
Dynamics of Mechanical Systems Techniques for Modeling Discrete Controllers for the Optimization of Hybrid Plants: a Case Study E. Seabra 1 | J. Machado 1 | C. Leão 2 | L. F. Silva 1 Universidade do Minho - Escola de Engenharia 1 Departamento de Engenharia Mecânica 2 Departamento de Produção e Sistemas Campus de Azurém 4800 -058 Guimarães Portugal Universidade do Minho Escola de Engenharia
Outline Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives 2
Support Context of the work Contribution of this work • SCAPS Project • “Safety Control of Automated Production Systems” The case study Plant modeling for simulation purposes • Simulation and Formal Verification of Real-Time Systems - taking into account the plant modeling Controller modeling for simulation purposes Simulation results Conclusions and perspectives • Supported by FCT • the Portuguese Foundation for Science and Technology, and FEDER, the European Regional Development Fund 3
Automated system – Static point of view Context of the work Contribution of this work Plant Controller The case study Inputs Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Outputs Program Scan cycle Does the program is correct ? (in accordance with the expected behavior? ) Conclusions and perspectives 4
Automated system – Dynamic point of view Context of the work How to create the plant model for: Contribution of this work -Simulation purposes? The case study and/or -Formal verification purposes? Plant modeling for simulation purposes Controller modeling for simulation purposes Taking the time into account … Simulation results Conclusions and perspectives 5
State of the art Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Analysis Techniques of Industrial Controllers: • Not exhaustive (Simulation) [Barton 1992] [Baresi et al. 1998] [Amerongen 2003] [Mattsson et al. 1998] [Lebrun 2003] • Exhaustive (Formal Verification) - Model-Checking [Clarke et al. 1986] [Moon et al. 1992] - Theorem-proving [Volker & Kramer, 1999] [Roussel & Denis, 2002] - Reachability analysis [Kowalewski & Preu ig, 1996] [Frey & Litz, 2000] Conclusions and perspectives 6
State of the art Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives Analysis Techniques of Industrial Controllers: • Not exhaustive (Simulation) [Barton 1992] [Baresi et al. 1998] [Amerongen 2003] [Mattsson et al. 1998] [Lebrun 2003] For Real-Time Hybrid systems (tools and formalisms): Dymola software and programming language Modelica [Elmqvist and Mattson, 1997]; with the library for hierarchical state machines State. Graph [Otter, 2005] 7
Our Goal Context of the work Contribution of this work To show as Modelica modeling language can be used for: The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Ø Safety behavior of the system (Controller + Plant) Ø Optimization of hybrid plant behavior parameters Ø Analysis of discrete controllers for hybrid plants Simulation results Conclusions and perspectives 8
Case Study (Normal Behavior) Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives Tank 1 is filled with an aqueous solution by opening valve V 12. When the level becomes high, the valve is closed and the heating system is switch on and also, in simultaneous, the cooling system of the condenser by opening valve V 13. When the concentration desired in the tank 1 is reached, there are switch off the heating system and the cooling system of the condenser. Continuously the solution flows from tank 1 into tank 2, and it must be guaranteed that the tank 2 is empty. When the first tank is empty the solution in tank 2 stays for post‑processing operation where the solution is heated to avoid possible crystallization, using two approaches: heat until the temperature sensor TIS 2 indicates that the desired temperature was reached; or heat for a certain time. Finally, the tank 2 is emptied by the pump P 1, if the valve V 18 be opened. 9
Case Study (Normal Behavior) Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives Tank 1 is filled with an aqueous solution by opening valve V 12. When the level becomes high, the valve is closed and the heating system is switch on and also, in simultaneous, the cooling system of the condenser by opening valve V 13. When the concentration desired in the tank 1 is reached, there are switch off the heating system and the cooling system of the condenser. Continuously the solution flows from tank 1 into tank 2, and it must be guaranteed that the tank 2 is empty. When the first tank is empty the solution in tank 2 stays for post‑processing operation where the solution is heated to avoid possible crystallization, using two approaches: heat until the temperature sensor TIS 2 indicates that the desired temperature was reached; or heat for a certain time. Finally, the tank 2 is emptied by the pump P 1, if the valve V 18 be opened. 10
Case Study (Normal Behavior) Context of the work Tank 1 is filled with an aqueous solution by opening valve V 12. Contribution of this work When the level becomes high, the valve is closed and the heating system is switch on and also, in simultaneous, the cooling system of the condenser by opening valve V 13. The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives When the concentration desired in the tank 1 is reached, there are switch off the heating system and the cooling system of the condenser. Continuously the solution flows from tank 1 into tank 2, and it must be guaranteed that the tank 2 is empty. When the first tank is empty the solution in tank 2 stays for post‑processing operation where the solution is heated to avoid possible crystallization, using two approaches: heat until the temperature sensor TIS 2 indicates that the desired temperature was reached; or heat for a certain time. Finally, the tank 2 is emptied by the pump P 1, if the valve V 18 be opened. 11
Case Study (Normal Behavior) Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives Tank 1 is filled with an aqueous solution by opening valve V 12. When the level becomes high, the valve is closed and the heating system is switch on and also, in simultaneous, the cooling system of the condenser by opening valve V 13. When the concentration desired in the tank 1 is reached, there are switch off the heating system and the cooling system of the condenser. Continuously the solution flows from tank 1 into tank 2, and it must be guaranteed that the tank 2 is empty. When the first tank is empty the solution in tank 2 stays for post‑processing operation where the solution is heated to avoid possible crystallization, using two approaches: heat until the temperature sensor TIS 2 indicates that the desired temperature was reached; or heat for a certain time. Finally, the tank 2 is emptied by the pump P 1, if the valve V 18 be opened. 12
Case Study (Normal Behavior) Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives Tank 1 is filled with an aqueous solution by opening valve V 12. When the level becomes high, the valve is closed and the heating system is switch on and also, in simultaneous, the cooling system of the condenser by opening valve V 13. When the concentration desired in the tank 1 is reached, there are switch off the heating system and the cooling system of the condenser. Continuously the solution flows from tank 1 into tank 2, and it must be guaranteed that the tank 2 is empty. When the first tank is empty the solution in tank 2 stays for post‑processing operation where the solution is heated to avoid possible crystallization, using two approaches: heat until the temperature sensor TIS 2 indicates that the desired temperature was reached; or heat for a certain time. Finally, the tank 2 is emptied by the pump P 1, 13
Case Study (Normal Behavior) Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives Tank 1 is filled with an aqueous solution by opening valve V 12. When the level becomes high, the valve is closed and the heating system is switch on and also, in simultaneous, the cooling system of the condenser by opening valve V 13. When the concentration desired in the tank 1 is reached, there are switch off the heating system and the cooling system of the condenser. Continuously the solution flows from tank 1 into tank 2, and it must be guaranteed that the tank 2 is empty. When the first tank is empty the solution in tank 2 stays for post‑processing operation where the solution is heated to avoid possible crystallization, using two approaches: heat until the temperature sensor TIS 2 indicates that the desired temperature was reached; or heat for a certain time. Finally, the tank 2 is emptied by the pump P 1, if the valve V 18 be opened. 14
Case Study (Failure behavior) Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results The condenser may fail: the steam can not be cooled and the pressure inside the condenser rises. • The heater must be switched off to avoid the condenser explosion The temperature of tank 1 decreases and the solution may become solid and can not be drained in tank 2. • Valve V 15 must be opened early enough for preventing tank 2 overflow, but after opening first valve V 18 In the case of a condenser malfunction, it is also necessary to ensure some response times of the controller program • whenever a condenser malfunction starts, the condenser can explode if steam is produced during 22 time units • if the heating device is switched off, the steam production stops after 12 time units • If no steam is produced in tank 1, the solution may solidify after 19 time units • emptying tank 2 takes between 0 and 26 time units • filling tank 1 takes 6 time units, at most Conclusions and perspectives 15
Case Study (Failure behavior) Context of the work Contribution of this work The case study The condenser may fail: the steam can not be cooled and the pressure inside the condenser rises. • The heater must be switched off to avoid the condenser explosion The temperature of tank 1 decreases and the solution may become solid and can not be drained in tank 2. • Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Valve V 15 must be opened early enough for preventing tank 2 overflow, but after opening first valve V 18 In the case of a condenser malfunction, it is also necessary to ensure some response times of the controller program • whenever a condenser malfunction starts, the condenser can explode if steam is produced during 22 time units • if the heating device is switched off, the steam production stops after 12 time units • If no steam is produced in tank 1, the solution may solidify after 19 time units • emptying tank 2 takes between 0 and 26 time units • filling tank 1 takes 6 time units, at most Conclusions and perspectives 16
Case Study (Failure behavior) Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results The condenser may fail: the steam can not be cooled and the pressure inside the condenser rises. • The heater must be switched off to avoid the condenser explosion The temperature of tank 1 decreases and the solution may become solid and can not be drained in tank 2. • Valve V 15 must be opened early enough for preventing tank 2 overflow, but after opening first valve V 18 In the case of a condenser malfunction, it is also necessary to assure some response times of the controller program • whenever a condenser malfunction starts, the condenser can explode if steam is produced during 22 time units • • if the heating device is switched off, the steam production stops after 12 time units If no steam is produced in tank 1, the solution may solidify after 19 time units emptying tank 2 takes between 0 and 26 time units filling tank 1 takes 6 time units, at most Conclusions and perspectives 17
Case Study (Failure behavior) Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results The condenser may fail: the steam can not be cooled and the pressure inside the condenser rises. • The heater must be switched off to avoid the condenser explosion The temperature of tank 1 decreases and the solution may become solid and can not be drained in tank 2. • Valve V 15 must be opened early enough for preventing tank 2 overflow, but after opening first valve V 18 In the case of a condenser malfunction, it is also necessary to assure some response times of the controller program • whenever a condenser malfunction starts, the condenser can explode if steam is produced during 22 time units • if the heating device is switched off, the steam production stops after 12 time units • • • If no steam is produced in tank 1, the solution may solidify after 19 time units emptying tank 2 takes between 0 and 26 time units filling tank 1 takes 6 time units, at most Conclusions and perspectives 18
Case Study (Failure behavior) Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results The condenser may fail: the steam can not be cooled and the pressure inside the condenser rises. • The heater must be switched off to avoid the condenser explosion The temperature of tank 1 decreases and the solution may become solid and can not be drained in tank 2. • Valve V 15 must be opened early enough for preventing tank 2 overflow, but after opening first valve V 18 In the case of a condenser malfunction, it is also necessary to assure some response times of the controller program • • whenever a condenser malfunction starts, the condenser can explode if steam is produced during 22 time units if the heating device is switched off, the steam production stops after 12 time units • If no steam is produced in tank 1, the solution may solidify after 19 time units • • emptying tank 2 takes between 0 and 26 time units filling tank 1 takes 6 time units, at most Conclusions and perspectives 19
Case Study (Failure behavior) Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results The condenser may fail: the steam can not be cooled and the pressure inside the condenser rises. • The heater must be switched off to avoid the condenser explosion The temperature of tank 1 decreases and the solution may become solid and can not be drained in tank 2. • Valve V 15 must be opened early enough for preventing tank 2 overflow, but after opening first valve V 18 In the case of a condenser malfunction, it is also necessary to assure some response times of the controller program • • • whenever a condenser malfunction starts, the condenser can explode if steam is produced during 22 time units if the heating device is switched off, the steam production stops after 12 time units If no steam is produced in tank 1, the solution may solidify after 19 time units • emptying tank 2 takes between 0 and 26 time units • filling tank 1 takes 6 time units, at most Conclusions and perspectives 20
Case Study (Failure behavior) Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results The condenser may fail: the steam can not be cooled and the pressure inside the condenser rises. • The heater must be switched off to avoid the condenser explosion The temperature of tank 1 decreases and the solution may become solid and can not be drained in tank 2. • Valve V 15 must be opened early enough for preventing tank 2 overflow, but after opening first valve V 18 In the case of a condenser malfunction, it is also necessary to assure some response times of the controller program • • whenever a condenser malfunction starts, the condenser can explode if steam is produced during 22 time units if the heating device is switched off, the steam production stops after 12 time units If no steam is produced in tank 1, the solution may solidify after 19 time units emptying tank 2 takes between 0 and 26 time units • filling tank 1 takes 6 time units, at most Conclusions and perspectives 21
Controller specification for the system behavior Context of the work Contribution of this work SFC (IEC 60848) Specification Normal operation The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives 22
Controller specification for the system behavior Context of the work SFC (IEC 60848) Specification Failure operation Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives 23
Controller specification for the system behavior Context of the work SFC (IEC 60848) Specification Contribution of this work Translation The case study Plant modeling for simulation purposes State. Graphs (Otter, 2005) Simulation with Dymola Controller modeling for simulation purposes Simulation results Conclusions and perspectives 24
Modelica System Modeling Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives 25
Plant modeling - Simulation Context of the work Modelica model for tank 1 (Evaporator) Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives 26
Plant modeling - Simulation Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Modelica model for tank 1 (Evaporator) • Takes into account the functioning constraints indicated before; • There were modelled, also, the other system physical devices. Conclusions and perspectives 27
Plant modeling - Simulation Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Modelica model for tank 1 (Evaporator) • Takes into account the functioning constraints indicated before; • There were modelled, also, the other system physical devices Conclusions and perspectives 28
Controller modeling - Simulation Context of the work State. Graph model for normal operation Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives 29
Controller modeling - Simulation Context of the work State. Graph model for failure operation Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives 30
Simulation Methodology Context of the work Contribution of this work 1 – Simulation of system behavior using a discrete controller (operation and failure modes) The case study Plant modeling for simulation purposes 2 – Increasing the productivity of the system (number of batches in the evaporator system) Controller modeling for simulation purposes Simulation results Conclusions and perspectives 31
Simulation of system behavior using a discrete controller Context of the work Normal behavior – Tanks’ levels Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives The two main properties are confirmed, the drainage of the solution present in the tank 1 only to happen when the tank 2 is empty and also the filling of the tank 1 to happen soon after this to be empty. 32
Simulation of system behavior using a discrete controller Context of the work Failure behavior (condenser malfunction) – Tanks’ levels Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives It can be concluded that the failure operation mode is properly simulated, given that is proven that the tank 1 is drained through the safety valve (V 16) because it is seen that the tank 2 remains empty. 33
Increasing the productivity of the system Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes The batches number optimization depends on the best synchronism that happens among the time in that the solution present in the tank 1 is prepared to be drained and the time in that the tank 2 finishes its emptying, because it implicates lesser wastes of time in the process. Among of several physical variables of the process it was chosen the heat supply rate (QHeat) because it is the most relevant variable that determine the rate of the steam formation (this condenses in the condenser C) and correspondingly, the time in that the solution present in the evaporator (tank 1) is prepared to be drained (desired concentration reached). In addition, in all of the performed simulations, it was assumed a time of 200 s for the solution powder-processing operation fulfill in the tank 2. Simulation results Conclusions and perspectives 34
Increasing the productivity of the system Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results The batches number optimization depends on the best synchronism that happens among the time in that the solution present in the tank 1 is prepared to be drained and the time in that the tank 2 finishes its emptying, because it implicates lesser wastes of time in the process. Among of several physical variables of the process it was chosen the heat supply rate (QHeat) because it is the most relevant variable that determine the rate of the steam formation (this condenses in the condenser C) and correspondingly, the time in that the solution present in the evaporator (tank 1) is prepared to be drained (desired concentration reached). In addition, in all of the performed simulations, it was assumed a time of 200 s for the solution powder-processing operation fulfill in the tank 2. Conclusions and perspectives 35
Increasing the productivity of the system Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes The batches number optimization depends on the best synchronism that happens among the time in that the solution present in the tank 1 is prepared to be drained and the time in that the tank 2 finishes its emptying, because it implicates lesser wastes of time in the process. Among of several physical variables of the process it was chosen the heat supply rate (QHeat) because it is the most relevant variable that determine the rate of the steam formation (this condenses in the condenser C) and correspondingly, the time in that the solution present in the evaporator (tank 1) is prepared to be drained (desired concentration reached). In addition, in all of the performed simulations, it was assumed a time of 200 s for the solution powder-processing operation fulfill in the tank 2. Simulation results Conclusions and perspectives 36
Increasing the productivity of the system Context of the work Heat supply rate of 2500 W – Tanks’ levels Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives It happens a great synchronism lack between the time in that the solution present in the tank 1 is prepared to be drained and the time in that the tank 2 finishes its emptying (waste of time of about 300 s). 37
Increasing the productivity of the system Context of the work Heat supply rate of 3170 W – Tanks’ levels Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives It can be verified the synchronism that occurs among the time in that the solution present in the tank 1 is prepared to be drained and the time in that the tank 2 finishes its emptying. 38
Increasing the productivity of the system Context of the work Heat supply rate of 3170 W – Tanks’ levels Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives An excellent synchronization can be confirmed by the simulation results for the time period that take places the transfer of the solution between tank 1 and tank 2, because wastes of time don't exist. 39
Increasing the productivity of the system Context of the work Simulations with different heat supply rates – Tanks’ levels Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results Conclusions and perspectives 40
Conclusions Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes Simulation results The presented approach (to increase the Systems Safety) is useful because: • In Simulation: - we can avoid, using simulation, a set of program errors in reduced time intervals; - some functioning delays may be obtained by simulation; • these delays are important to create the plant models formal verification purposes; • In Formal Verification - the verification of complex hybrid systems is limited due to the number of states involved, this way the simulation is the best solution for obtaining safety hybrid systems. Conclusions and perspectives 41
Perspectives Context of the work Contribution of this work The case study Plant modeling for simulation purposes Controller modeling for simulation purposes To use Simulation to: • Evaluate and optimization of different parameters of the plant functioning • to find critical delays of the plant functioning - to see if a property, for different considered delays, is still true or if different delays imply that a property that is true, for a delay, will become false for another To apply the results indicated before: Simulation results Conclusions and perspectives • In order to apply on the formal verification of hybrid systems 42
Dynamics of Mechanical Systems Techniques for Modeling Discrete Controllers for the Optimization of Hybrid Plants: a Case Study Thank you for your attention Questions? * eseabra@dem. uminho. pt ' +351 253 510 227 +351 253 516 007 Universidade do Minho Escola de Engenharia