System Modeling and Identification Lecture 1 Dr.-Ing. Erwin Sitompul President University http://zitompul.wordpress.com 2 0 1 5 President University Erwin Sitompul SMI 1/1 System Modeling and Identification Textbook and Syllabus Textbook: “Process Modelling, Identification, and Control”, Jan Mikles, Miroslav Fikar, Springer, 2007. Syllabus: Chapter 1: Introduction Chapter 2: Mathematical Modeling of Processes Chapter 3: Analysis of Process Models Chapter 4: Dynamical Behavior of Processes Chapter 5: Discrete-Time Process Models Chapter 6: Process Identification President University Erwin Sitompul SMI 1/2 System Modeling and Identification Grade Policy Final Grade = 10% Homework + 20% Quizzes + 30% Midterm Exam + 40% Final Exam + Extra Points Homeworks will be given in fairly regular basis. The average of homework grades contributes 10% of final grade. Written homeworks are to be submitted on A4 papers, otherwise they will not be graded. Homeworks must be submitted on time, on the day of the next lecture, 10 minutes after the class starts. Late submission will be penalized by point deduction of –10·n, where n is the total number of lateness made. There will be 3 quizzes. Only the best 2 will be counted. The average of quiz grades contributes 20% of final grade. President University Erwin Sitompul SMI 1/3 System Modeling and Identification Grade Policy Midterm and final exams follow the schedule released by AAB (Academic Administration Bureau). Make up of quizzes must be held within one week after the schedule of the respective quiz. Make up for mid exam and final exam must be requested directly to AAB. System Modeling and Identification Homework 2 Rudi Bravo 0029201800058 21 March 2021 No.1. Answer: . . . . . . . . ● Heading of Written Homework Papers (Required) President University Erwin Sitompul SMI 1/4 System Modeling and Identification Grade Policy Extra points will be given if you solve a problem in front of the class. You will earn 1 or 2. Lecture slides can be copied during class session. It is also available on internet. Please check the course homepage regularly. http://zitompul.wordpress.com The use of internet for any purpose during class sessions is strictly forbidden. You are expected to write a note along the lectures to record your own conclusions or materials which are not covered by the lecture slides. President University Erwin Sitompul SMI 1/5 System Modeling and Identification Chapter 1 Introduction President University Erwin Sitompul SMI 1/6 Chapter 1 Introduction Control Control is the purposeful influence on an object (process) to ensure the fulfillment of a required objectives. The objectives can be to satisfy the safety and optimal operation of the technology, the product specifications under constraints of disturbance, process stability, and other technical related matters. Control systems in the whole consist of technical devices and human factor. Control systems must satisfy: Disturbance attenuation Stability guarantee Optimal process operation President University Erwin Sitompul SMI 1/7 Chapter 1 Introduction Control There are two main methods of control: Feedback control, where the information about process output is used to calculate the control (manipulated) signal process output is fed back to process input Feedforward control, where the effect of control is not compared with the desired result Practical control experience confirms the importance of assumptions about dynamical behavior of processes. This behavior is described using mathematical models of processes, which can be constructed from a physical or chemical nature of processes or can be abstract. President University Erwin Sitompul SMI 1/8 Chapter 1 Introduction Process, System, Model The purpose of this course is to learn how to model a process, which may have one of these objectives: Synthesis: Modeling as the fundamentals to influence a process through a controller Analysis: Modeling as the fundamentals to a deep understanding of the process and further to optimization of the process Simulation: Modeling as the fundamentals to emulative calculation under a given boundary condition Process is the entire activities where matter and/or energy are stored, transported, and converted; whereas information is stored, transported, converted, created, or destroyed. System is a part of a process, which is defined by the user, and has an interconnection with the environment regarding the flow of matter, energy, and information. President University Erwin Sitompul SMI 1/9 Chapter 1 Introduction Process, System, Model An automobile may represent a process, consisting: Engine and driveline system Suspension system Braking System Climate control system The variables of interest depend on the user, i.e., engine technician requires the relation between transmission and speed, while aircon technician wants to know the relation between speed and cooling performance. President University Erwin Sitompul SMI 1/10 Chapter 1 Introduction Process, System, Model Flow of matter Flow of energy Process System Flow of information Environment Model is an appropriate description of the flows of a system to its environment, using physical, chemical nature of the system, or using abstract mathematical equations. A mathematical model is a description of a system using mathematical concepts and language. A model may help to explain a system and to study the effects of different components, and to make predictions about behavior. President University Erwin Sitompul SMI 1/11 Chapter 1 An Example of Process Control Process A simple heat exchanger Ti, qi Inlet V T V : volume of liquid in heat exchanger [m3] q : Volume flow rate [m3/s] T : Temperature [K] w : Heat input [W] Outlet w To, qo Assumptions: • Ideal mixing • No heat loss • Constant heating rate • Exchanger has no heat capacity • T = To President University Erwin Sitompul SMI 1/12 Chapter 1 An Example of Process Control Steady-State A simple heat exchanger Ti, qi Inlet V Input variables: • Inlet temperature Ti • Heat input w Output variables: • Outlet temperature T T Outlet w To, qo The process is said to be in steady-state if the input and output variables remain constant in time. The heat balance in the steady-state is of the form: q c p (To Ti ) w President University q : Volume flow rate [m3/s] ρ : Liquid specific density [kg/m3] cp : Liquid specific heat capacity [J/(kgK)] Erwin Sitompul SMI 1/13 Chapter 1 An Example of Process Control Process Control A simple heat exchanger Ti, qi Inlet V Input variables: • Inlet temperature Ti • Heat input w Output variables: • Outlet temperature T T Outlet w To, qo Control of the heat exchanger in this case means to influence the process so that T will be kept close to Tw. This influence is realized with changes in w, which is called manipulated variable. A thermometer must be placed on the outlet of the exchanger and we may choose between manual control or automatic control. President University Erwin Sitompul SMI 1/14 Chapter 1 An Example of Process Control Dynamical Properties of the Process In the case that the control is realized automatically, the knowledge about process response to changes of input variables is required. This is the knowledge about dynamical properties of the process, which is the description of the process in unsteady-state. The heat balance for the heat transfer process in a very short time interval Δt converging to zero is given by: (heat accumulation) d (mc pT ) dt President University = (heat coming from inlet and heating element) (qi c pTi w) Erwin Sitompul (heat going from outlet) (qo c pTo ) SMI 1/15 Chapter 1 An Example of Process Control Dynamical Properties of the Process Assuming qi = qo and T = To, mc p dT q c pTi q c pT w dt V cp dT q c pT q c pTi w dt The heat balance in the steady-state may be derived from the last equation, in the case that dT/dt = 0. q c p (To Ti ) w President University Erwin Sitompul SMI 1/16 Chapter 1 An Example of Process Control Feedback Process Control In case of choosing an automatic control, the control device performs the control actions which is described in a control law. The task of a control device is to minimize the difference between Tw and T, which is defined as control error. (Tw is the set point) Suppose that we choose a controller that will change the heat input proportionally to the control error, the control law can be given as: w(t ) q c p (Tw Ti ) P(Tw T (t )) We speak about proportional control, and P is called the proportional gain. President University Erwin Sitompul SMI 1/17 Chapter 1 An Example of Process Control Feedback Control of the Heat Exchanger The scheme The block diagram President University Erwin Sitompul SMI 1/18 System Modeling and Identification Chapter 2 Mathematical Modeling of Processes President University Erwin Sitompul SMI 1/19 Chapter 2 Mathematical Modeling of Processes General Principles of Modeling A system is expressed through mathematical descriptions. These descriptions are called “mathematical models.” The behavior of the system with regard to certain inputs can be characterized by using the mathematical model. Mathematical models can be divided into three groups, depending on how they are obtained: Theoretical model, developed using physical, chemical principles/laws Empirical model, obtained from mathematical analysis of measurement data of the process/ system or through experience Empirical-theoretical model, obtained from a combination of theoretical and empirical modeling approach President University Erwin Sitompul SMI 1/20 Chapter 2 Mathematical Modeling of Processes General Principles of Modeling Theoretical models are derived from the so called “balance equation of conserved quantity” that may include: Mass balance equation Energy balance equation Entropy balance equation Enthalpy balance equation Charge balance equation Heat balance equation Impulse balance equation A conserved quantity is a quantity whose total amount is maintained constant and is understood to obey the principle of conservation, which states that such a quantity can be neither created nor destroyed. President University Erwin Sitompul SMI 1/21 Chapter 2 Mathematical Modeling of Processes General Principles of Modeling Alternatively, a conserved quantity is one whose total amount remains constant in an isolated system, regardless of what changes occur inside the system. An isolated system is a hypothetical system that has zero interaction with its surroundings, i.e., zero transfer of material, heat, work, radiation, etc. across the boundary. The balance equations in an unsteady-state are used to obtain the dynamical model, which is expressed using differential equations. In most cases, ordinary differential equations are chosen to keep the mathematical model simple. President University Erwin Sitompul SMI 1/22 Chapter 2 Mathematical Modeling of Processes General Principles of Modeling Balance equation in integral form: t m(t ) m(t0 ) min ( ) mout ( )d t0 Balance equation can be written in differential form: dm(t ) min (t ) mout (t ) dt The variable m in the equations above can be mass, energy, entropy, ..., impulse. President University Erwin Sitompul SMI 1/23 Chapter 2 Mathematical Modeling of Processes General Principles of Modeling Mass balance in an unsteady-state is given by the law of mass conservation: n d ( V ) m i qi q j dt i 1 j 1 ρ, ρi V q, qi m n : : : : : Specific densities [kg/m3] Volume [m3] Volume flow rates [m3/s] Number of inlets Number of outlets In m V Out President University Erwin Sitompul SMI 1/24 Chapter 2 Mathematical Modeling of Processes General Principles of Modeling Energy balance follows the general law of energy conservation: d ( Vc pT ) dt m n s i 1 j 1 l 1 i qi c p ,iTi q jc pT Ql ρ, ρi V q, qi cp, cp,i T, Ti Q m n s President University : : : : : : : : : Specific densities [kg/m3] Volume [m3] Volume flow rates [m3/s] Specific heat capacities [J/(kgK) Temperatures [K] Heat per unit time [W] Number of inlets Number of outlets Number of heat sources and consumptions Erwin Sitompul SMI 1/25 Chapter 2 Examples of Dynamic Mathematical Models Single-Tank System Let us examine a liquid storage system shown below: qi ρ V qi, qo A V h h : : : : Specific densities [kg/m3] Volume [m3] Volume flow rates [m3/s] Cross-sectional area of the tank [m2] : Height of liquid in the tank [m] qo The mass balance for this process yields: d ( Ah ) qi qo dt With A and ρ assumed to be constant, A dh qi qo dt President University Erwin Sitompul SMI 1/26 Chapter 2 Examples of Dynamic Mathematical Models Single-Tank System Applying the law of mechanical energy conservation to the liquid near the outlet: qi V v1 a1 h v1 (potential energy) : Outlet flow velocity [m/s] : Cross-sectional area of the outlet pipe [m2] qo = (kinetic energy) mgh 12 mv12 v1 2 gh qo v1a1 President University Erwin Sitompul SMI 1/27 Chapter 2 Examples of Dynamic Mathematical Models Single-Tank System Inserting q0 = v1a1 into the mass balance equation of the system: A dh qi v1a1 dt or dh qi a1 v1 dt A A The initial condition (i.e., the initial height of the liquid) can be arbitrary, h(0) = h0. The tank will be in steady-state if dh/dt = 0. For a constant inlet flow rate qi, the steady-state liquid height hs is given by: qi a1v1 qi a1 2 gh 1 qi hs 2 g a1 2 President University Erwin Sitompul SMI 1/28 Chapter 2 Examples of Dynamic Mathematical Models Simulation of Single-Tank System The dynamic mathematical model of the single-tank system will now be simulated using Matlab Simulink. a1 A = = = = = = 20 cm2 2010–4 m2 210–3 m2 2500 cm2 250010–4 m2 0.25 m2 g qi tsim = = = = 9.8 m/s2 5 liters/s 510–3 m3/s 200 s Manual calculation of steady-state liquid height yields: 2 1 qi 1 5 103 0.319 m hs 3 2 g a1 2 9.8 2 10 President University 2 Erwin Sitompul SMI 1/29 Chapter 2 Examples of Dynamic Mathematical Models Simulation with Matlab-Simulink Matlab-Simulink provides the best simulation environment for control engineers. President University Erwin Sitompul SMI 1/30 Chapter 2 Examples of Dynamic Mathematical Models Simulation of Single-Tank System After construction, the Matlab Simulink block diagram is given as: dh qi a1 v1 dt A A President University Erwin Sitompul SMI 1/31 Chapter 2 Examples of Dynamic Mathematical Models Simulation of Single-Tank System The simulation result, from transient until steady-state, can be observed by clicking the Scope. hs 0.3185 m President University Erwin Sitompul SMI 1/32 Chapter 2 Examples of Dynamic Mathematical Models Impulse and Charge Balance Equations The impulse balance equation can be related to Newton’s law by: n d (mv) dv m ma Fi dt dt i 1 The charge balance equation can be related to Kirchhoff's law by: dq n Ij dt j 1 President University Erwin Sitompul SMI 1/33 Chapter 2 Examples of Dynamic Mathematical Models A Two-Mass System: Suspension Model m1 m2 x,y r : : : : mass of the wheel mass of the car displacements from equilibrium distance to road surface Equation for m1: ks ( x y) b( x y) kw ( x r ) m1 x Equation for m2: ks ( y x) b( y x) m2 y Rearranging: ks kw kw b x ( x y) ( x y) x r m1 m1 m1 m1 ks b y ( y x) ( y x) 0 m2 m2 President University Erwin Sitompul SMI 1/34 Chapter 2 Examples of Dynamic Mathematical Models A Two-Mass System: Suspension Model Using the Laplace transform: L x(t ) X (s) d L x(t ) sX ( s ) dt to transfer from time domain to frequency domain yields: b s X ( s) s X (s) Y ( s) m1 ks kw kw X ( s ) Y ( s ) X ( s ) R( s ) m1 m1 m1 2 ks b s Y ( s) s Y ( s ) X ( s ) Y ( s ) X ( s ) 0 m2 m2 2 President University Erwin Sitompul SMI 1/35 Chapter 2 Examples of Dynamic Mathematical Models A Two-Mass System: Suspension Model Eliminating X(s) yields a transfer function: kw b ks s m1m2 b Y (s) R( s) b k w ks b 3 ks k k w 2 k w b 4 s s s s m m m m m m m m1m2 1 2 1 2 1 1 2 Y ( s) output F ( s) transfer function R( s) input President University Erwin Sitompul SMI 1/36 Chapter 2 Examples of Dynamic Mathematical Models Bridged Tee Circuit v1 V1 Vi V1 Vo sC1V1 0 R1 R2 v Ri v L di dt i C dv dt V (s) R I (s) V (s) sL I (s) I (s) sC V (s) Resistor Inductor Capacitor Vo V1 sC2 (Vo Vi ) 0 R2 President University Erwin Sitompul SMI 1/37 Chapter 2 Examples of Dynamic Mathematical Models RL Circuit V1 Vi V1 V1 Vo 0 1 1 s V1 Vo Vo 0 V1 Vo ( s 1) s 1 v1 Further calculation and eliminating V1, 1 Vo V1 2 Vi s s 1 Vo Vo s 1 2 Vi s s Vo 2s 3 Vi President University Erwin Sitompul Vo 1 Vi 2s 3 SMI 1/38 Chapter 2 Examples of Dynamic Mathematical Models Homework 1 Derive a dynamic mathematical model for the interacting tank-inseries system as shown below. qi h1 v1 President University a1 q1 Erwin Sitompul h2 a2 v2 SMI 1/39 qo Chapter 2 Examples of Dynamic Mathematical Models Homework 1A Derive a dynamic mathematical model for the tank with the form of a triangular prism as shown below. qi2 qi1 h a qo v President University hmax ρ V h hmax A : : : : : Amax : qi1, qi2 qo v a1 : : : : Specific densities [kg/m3] Volume of liquid in the tank [m3] Height of liquid in the tank [m] Height of the tank [m] Cross-sectional area of the liquid surface [m2] Cross-sectional area of the tank at the top [m2] Volume flow rates of inlets [m3/s] Volume flow rates of outlet[m3/s] Outlet flow velocity [m/s] Cross-sectional area of the outlet pipe [m2] Erwin Sitompul SMI 1/40