Identification in closed-loop, MISO identification, practical issues of identification CHEM-E7145 Advanced Process Control Methods Lecture 4
Contents Identification in practice Identification in closed-loop (section 13) Motivation Indirect and direct identification Identifiability conditions MATLAB Examples Identification of MISO systems
Identification in practice: designing experiments Cover the normal operating range the amplitude large enough to provide good signal/noise ratio the amplitude not too large to drive the process out of the normal operating point Persistent excitation is needed (otherwise it may not be possible to identify a model) Pseudo-random binary signal Usually one input is changed at time in the multiple input single output systems (MISO)
Identification in practice: data pre-treatment Remove the mean value or a known steady state value from the signals Estimate the input-output delays Cross-covariance method Identify models with different delays Select the inputs affecting each output Use matrix of correlations between the inputs and the outputs Use knowledge of the physical process structure
Identification in practice: Selection of the model order Examine the value of the modelling error (MATLAB Example) 0.8 0.7 Variance of the equation error 0.6 0.5 0.4 0.3 0.2 0.1 0 0 1 2 3 Model order 4 5 6
Identification in practice: Selection of the model order Check the zero-pole map Zero-pole cancelation (a zero is located close to a pole) shows that the model order should be decreased
Identification in practice: Selection of the noise model The right model must produce uncorrelated noise estimation (white noise) Autocovariance of the modeling error 1.2 1 0.8 0.6 0.4 0.2 0 Right model structure Wrong model structure -0.2-15 -10-5 0 5 10 15 Time lag
Identification in practice: Selection of the model structure For real data there is no such thing as a correct model structure and order Different structures can result in different model quality The only way to determine the model quality is to try different structures and then compare the resulting model properties Use validation to test your models
An industrial example: identification of ethylene furnace Ethylene and propylene are produced in the furnace with some byproducts by thermal cracking a hydrocarbon feed: Ethane + Propane Ethylene +Propylene + Hydrogen +By-products Steam is added to lower the partial pressure of the hydrocarbons thereby increasing the yield of ethylene
An industrial example: the process diagram
An industrial example: the process description The convection section is used to preheat the feed flows with the hot flue gases The chemical reactions take place in the radiant section and get the energy from burning of fuel gas Under-pressure is maintained in the radiant section to permit inflow of combustion air to the furnace
An industrial example: the process control The temperature of the product outflow is controlled by adjusting the fuel gas flow The oxygen level in the radiant section is controlled by adjusting the underpressure
An industrial example: Models to be identified Case 1. Oxygen content (output) is predicted using the under-pressure and the fuel gas flow (inputs) Case 2. The temperature of the product outflow (output) is predicted using the underpressure, fuel gas flow, and the product feed flow (inputs)
An industrial example: data generation Open-loop data is obtained by exciting the inputs one by one with PRBS signals. Only one input is excited at a time Closed-loop data is obtained by keeping the control loops active and exciting the setpoints one by one using a PRBS signals. Only one setpoint is disturbed at a time.
An industrial example: selection of model order for case 1
An industrial example: model validation for case 1
An industrial example: selection of model order for case 2
An industrial example: model validation for case 2
Contents Identification in practice Identification in closed-loop (section 13) Motivation Indirect and direct identification Identifiability conditions MATLAB Examples Identification of MISO systems
Identification in closed-loop
Identification in closed loop: the motivation Sometimes the open-loop experiments cannot be carried out, because the process control cannot be switched off Unstable process cannot be identified in openloop Setpoint variations are not allowed
Direct identification the input u and the output y signals are measured and used to identify a process model the least squares and its modifications are applicable under certain identifiability conditions (discussed later)
Indirect identification Considered to introduce the necessary identifiability conditions, which are the same for both indirect and direct methods Assumptions: the output signal y is measured, the input signal u is not the transfer function of the controller is known instead An intermediate closed loop ARMA model (output to noise) is identified first, and then the parameters of the process model are obtained
Indirect identification: the closed loop transfer function The intermediate closed-loop noise to output transfer function is: y(z) ν(z) = G ν (z) 1 + G c z G P (z) = D(z 1 )P(z 1 ) A z 1 P z 1 + B z 1 Q(z 1 ) Order of polynomials Numerator order: r = m d + m p Denominator order: l = max(m a + m p, m b + m q ) A and B are determined from the denominator
Indirect identification: necessary identifiability conditions The model is identified from the denominator of the intermediate transfer function: A z 1 P z 1 + B z 1 Q z 1 = 1 + α 1 z 1 + + α l z l Number of coefficients to define is m a + m b Number of equations l = max(m a + m p, m b + m q ) Number of equations l must be higher than the number of variables m a + m b : m p > m b or m q > m a
An example: a first order model with a proportional controller A first order process model is considered: y k + ay k 1 = bu k 1 + ν k + dν k 1 A proportional controller u k = q 0 y(k): y k + (a + bq 0 )y k 1 = ν k + dν k 1 Identifying the process model from the intermediate model: α = a + bq 0 Two parameters cannot be identified from a single equation
A numerical example Check that two sets of parameters B A = 0.25z 1 1 0.7z 1 B A = 0.25z 1 1+0.3z 1 D = 1+0.75z 1 A 1 0.7z 1 D = 1+0.75z 1 A 1+0.3z 1 give the same close-loop response y/ν with the proportional controller Q/P = 2
An example: a first order model with a PD controller A PD-controller is considered u k = q 0 y k q 1 y(k 1) The intermediate ARMA model is: y k + a + bq 0 y k 1 + bq 1 y k 2 = ν k + qν(k 1) Now, two equations are used to defined two coefficients: α 1 = a + bq 0 α 2 = bq 1
If the condition is not fulfilled Generate data with two different controllers Introduce delay to the control Add a test signal:
Contents Identification in practice Identification in closed-loop (section 13) Motivation Indirect and direct identification Identifiability conditions Further examples Identification of MISO systems
A MATLAB example The same system y z u(z) = is identified with : 0.25 z 1 1 0.7 z 1 un-delayed proportional controller G C z = 2 a delayed proportional controller G C z = 2z 2 open-loop simulations See MATLAB
A MATLAB example 0.4 0.2 0-0.2-0.4-0.6-0.8-1 True system parameters Undelayed controller Delayd control, right order Delayed control, wrong order Open loop, right order Open loop, wrong order -1.2 A(1) B(1)
A MATLAB example A right and wrong order models are identified using closed-loop and open-loop data Identification with open-loop data produces the proper results even when the model order is higher than the process order Identification with closed-loop data produces incorrect results if the model order is higher than the process order Check MATLAB Example
A numerical example Check that two sets of parameters B A = 0.25z 1 1 0.7z 1 B A = 0.25z 1 1 0.7z 1 +z 3 D = 1+0.75z 1 A 1 0.7z 1 D A = 1+0.75z 1 1 0.7z 1 +z 3 give the same close-loop response y/ν with the delayed proportional controller Q/P = 2z 2
A MATLAB example: Instrumental variable method for closedloop identification In the instrumental variable method the error and the instrumental variable must not be correlated In the closed loop there is a correlation due to feedback. Therefore the method cannot be used Special adaptions of the instrumental method exist
Contents Identification in practice Identification in closed-loop Motivation Indirect and direct identification Identifiability conditions Examples Identification of MISO systems (Chapter 17)
Identification of MIMO systems: the general model structure The general linear MIMO model is: p B ij y i = u j=1 A j ij
Identification of MIMO systems: the simplified model structure The simplified MIMO model is: p y i = 1 A i j=1 B ij u j
Identification of MIMO systems For the process outputs the models are identified independently The Least Squares method with general model structure always results in a nonlinear optimization The simplified model can be rewritten: y k + a 1 y k 1 + a 2 y k 2 + + a m y k m = b 11 u 1 k 1 + b 12 u 1 k 2 + b 1m1 u 1 k m 1 + + b p1 u p k 1 + b p2 u p k 2 + b pmp u p k m p
Least squares with simplified MISO model structure The parameters are identified using the least squares method The matrixes are formed as follows: ψ(k) = [ y k 1,, y(k m) u 1 k 1, u 1 (k m 1 ) u 2 k 1, u 2 (k m 2 ) u p k 1, u p k m p ] θ = [a 1, a 2,, a m b 11, b 12,, b 1m1 b 21, b 22,, b 2m2 b p1, b p2,, b pmp ]
Experiments for MISO model identification Exiting the inputs one after another SISO identification can be used Exciting the inputs simultaneously MISO identification must be used saving the needed measurement time coherent models the identification is easier if the excitation signals sent to different inputs are not correlated
An industrial example: identification of a polymerization reactor A continuous reactor is considered Reactants and air flow are injected into the reactor at high temperature The airflow improves the drying of the product, which increases the degree of polymerization A catalyst is added to the reactor as well to activate polimerization The viscosity of the product is increasing during the polymerization The aim of the process control is to obtain a polymer of homogeneous viscosity
Two data sets used for identification: catalyst flowrate air flowrate An industrial example: viscosity of the product The peak in the catalyst flowrate is introduced Since the air compressor is of charge-discharge type, the air flow oscillates the data
An industrial example: a SISO model First, the viscosity is predicted using the catalyst flow rate alone (SISO model) using ARX structure The best models identified from two data sets: y k = 1.73 y k 1 1.28y k 2 + 0.36y k 3 + 60.4u(k 3) y k = 1.67 y k 1 1.37y k 2 + 0.55y k 3 + 147.1u(k 3) The gains are very different and the validation results are not successful other model structures must be tried (OE model was not successful)
An industrial example: validation of SISO model The SISO model cannot explain the oscillations in the measured data Solid line the measured data Dotted line the model prediction
An industrial example: a MISO model The viscosity is predicted using both the catalyst and the air flow The best model is: y k = 0.81y k 1 + 105 u cat k 3 + 0.51 u air (k 3)
An industrial example: validation of MISO model Even thought the model is still far from being perfect, it works much better than the SISO model explains the oscillations in the viscosity 66% of variations is explained by the catalyst flow and 33% is explained by the air flow Solid line the measured data Dotted line the model prediction
Summary of identification The process models used for identification The least squares method and its modifications Instrumental variable method Maximum likelihood method Identification in closed loop Identification of MIMO systems