USE OF MS OFFICE FOR IDENTIFICATION OF CONTROLLED SYSTEMS IN METALLURGY AND OPTIMAL SETTING OF CONTROLLER PARAMETERS

Nowadays, automatization is widespread in all areas of human endeavor because it reduces physical and psychological strain, improves production, and increases economic and environmental benefits in the industry. In the field of controlled machine aggregates of technological processes, an essential element of automation is automatic control. The quality of automatic control always depends on the controller parameter settings of the given system. Particularly in the metallurgical industry, the controller's optimal setting is critical because even minor deviations from the optimum can lead to substantial financial losses, deterioration in product quality, and adverse effects on the environment. To ensure quality setting, a sufficient mathematical description of the controlled system is needed. A variety of methods and commercial applications have been developed for the identification of dynamic systems and the setting of controller parameters. Nevertheless, the use of these hi-tech programs requires skilled operators, and their training represents a considerable financial and time burden. Besides, the acquisition of these programs is costly, especially for schools. Therefore, it is appropriate for teaching purposes and technical practice to create a suitable alternative using a common type of computer software such as MS Excel, a standard tool in many schools and work places. This paper presents how to identify controlled systems and optimally set the controllers using MS Excel, namely, its add-in Solver, based on the data of measured transition functions describing typical metallurgical aggregates. Such an approach's main benefit is that the potential user does not know the programming code that identifies the controlled systems and adjusts the controllers' optimal settings.


INTRODUCTION
In metallurgy, production lines and their aggregates process vast amounts of materials and raw materials, which place heavy demands on energy supply and heating media. Therefore, the optimization of all production and service processes must be ensured. Any or even a slight deviation from the optimality causes significant financial losses and places a burden on a company's budget. In terms of control of technological processes, virtually every production machinery is equipped with various control systems. Among others, it is mainly the control system performance that significantly determines the quality of the final products and reduces energy consumption and relief in human resources management. The optimal setting of the controller is conditioned by the knowledge of the mathematical description of the control system obtained by identification. This study aims to make the possibility of calculating the optimal settings of controllers more accessible for users by using MS Excel instead of expensive specialized software tools. It is noteworthy that the proposed procedure does not require any programming knowledge.

CONTROL OF TECHNOLOGICAL AGGREGATES (DEVICES)
From the control point of view, every technological device is considered a control system (Closed-loop control system, CS). The device performing the control is called the controller (C), which, based on the continuous determination of the controlled variable y(t) and its comparison (processed by a comparator) with the reference value (control variable) w(t) creates a controller output u(t). This variable affects the controlled system to achieve optimal consistency between the desired and real variable values. In addition, the difference between these quantities is called the control error e(t) given by the relation: The following feedback block diagram characterizing the control system is presented below, see Figure 1.

Figure 1
Block diagram of the control system Each control system should be optimally set. In other words, the controller's parameters should always correspond to the parameters of the control system.

PLANT
In engineering practice, it is commonly assumed that the control system is described by Laplace image transfer or by a linear differential equation with constant coefficients ai, bj in the form [1], [2]: A specific mathematical description is obtained by using of the so-called control system identification. In this process, the mathematical description of the system is often simplified but without a significant downgrade of parameters. Mainly in the metallurgical industry, there are the following four basic types of control systems: -proportional first order control systemused for, e.g., heating of surfaces, electric drives (rotational speed), -proportional second order control systemused for, e.g., heating with different types of heat transfer, -integral first order control systemused for, e.g., containers and tanks, -integral second order control systemused for, e.g., electric drives (angles of rotation).

MATHEMATICAL DESCRIPTION OF CONTROL SYSTEMS
In our case, it is beneficial to start with the transfer function of individual systems that will be converted to a differential equation. This equation will be solved in the MS Excel spreadsheet as a system model.

Proportional first order control system
The proportional first order system is described by the transfer function GpI(p) in the form: where: ksis the gain of the system, T1is the time constant of the system, U(p)is the input variable, Y(p) is the output variable.
Rearranging the equation and using the inverse Laplace transform, we obtain a differential equation in the form: For the numerical solution, this equation can be rewritten as: Since ∆y = ynew -yold, one can easily obtain the expression for ynew: where: ∆tis the time step, yoldis the old output value at a time lower by ∆t than the current time, ynewis the new output value calculated at a time higher by ∆t compared to the time when value yold was taken, ucurrent value of system input variable.
It will be shown below how to comply with the correct time sequence and always calculate a new value of the output variable in the spreadsheet based on this mathematical model.

Proportional second order control system
In the metallurgical industry, proportional second order control systems are most often non-oscillatory and can be described by the transfer function GpII(p) in the form: Using the principles of block algebra, such a system can be seen as two systems of the first order connected in series, as shown in When the transfer functions are connected in series, they are multiplied, so that the original form of the transfer function is obtained. Even though by multiplying the two brackets of the denominator of the particular functions, a suitable form for a differential equation is obtained, it is better to use the models and the method of calculating the proportional system of the first order already outlined. Then, the first controller will have directly the values u(t) at the input. The output of the first controller will be the input of the second controller, so that the output of the second controller will represent the output y(t) of the proportional second order control system. It is worth mentioning that there are also oscillating proportional systems of second order, but these would be addressed differently. In this case, a suitable form for calculation in MS Excel could be obtained using the state description of such a system.

Integral first order control system
The Integral first order control system is described by the transfer function GiI(p) in the form: where: k3is the general gain constant, T3is the system integral time constant, U(p)is the input variable, Y(p)is the output variable.
May26-28, 2021, Brno, Czech Republic, EU By a simple modification and using the inverse Laplace transform, we obtain a differential equation in the form: For the numerical solution of this differential equation we will use the modified relation: Since ∆y = ynew -yold, then the expression for ynew can be obtained: where: T3is the integral time constant.

Integral second order control system
In technical practice, integral second order control systems are in fact integral first order control systems with inertia (proportional controller) of the first order. They can be described by the transfer function GiII(p) in the form: Applying the principles of block algebra, such a system can be interpreted as two systems of the first order connected in series, as shown in Figure 3:

Figure 3
Block diagram of the integral second order control system Considering the advantage of knowing the models and the method of calculating both types of partial systems, the calculation is performed similarly to the proportional second order control system. For the sake of consistency, a rectangular method was used for numerical integration, which is sufficient for ∆t close to zero. It should be noted that the accuracy of the calculation can be increased using either the trapezoidal method or multistep method.

IDENTIFIED CONTROL SYSTEMS
In the present case, the identification relies upon determining the type and specific parameters of the identified control systems. Determination of the appropriate control system is based on either a physical principle or the course of the transient function. Subsequently, a table in MS Excel has to be made containing the measured data of a specifically identified system and the data calculated by the corresponding mathematical model of the control system. Note that the system model must be performed to easily change its parameters by inserting them in selected table cells. The sum of the squared deviations expresses the agreement between the measured and calculated values at individual times according to: where: Esum of squared deviations, yo -measured value of the identified object, ym -calculated value of the model, R1 -first row of the table, Rn -last row of the table. MS Excel also enables a plot of time dependence, from which the agreement of the courses is also evident.
May26-28, 2021, Brno, Czech Republic, EU To identify the parameters of the selected control system, the MS Excel add-in Solver is used. Among other things, it allows finding the optimal values of independent variables (in our case, the searched system parameters located within cells) so that the sum of squared deviations is minimized.

IMPLEMENTATION OF IDENTIFICATION IN MS EXCEL
From this section on, we focus only on the identification of the proportional second order control system, which is the most complex. Other systems are more manageable and it is not an issue to implement them by changing the above relationships. Now, the mentioned relations for the numerical calculation of proportional second order control system are applied to the spreadsheet according to To calculate the identification of the system parameters, the solver is used, set according to Figure 5a. Figure 5b shows the optimal calculated parameters (constants) ks, T1 and T2 of the identified control system, and the parameters intentionally changed by 5%. Figure 6 a presents a graph of the transfer functions measured and calculated following the model after identification (both curves are almost overlapped). Figure 6b shows both transfer functions when the time constants T1 and T2 are changed by 5% compared to the performed identification. An example of several rows of calculated table values after optimization is in Figure 7.

OPTIMAL CONTROLLER SETTINGS
Similarly, as in the case of identifying the control system in MS Excel based on particular models, it is possible to add a model of the controller to the table and use the solver to optimize the controller's parameters of closedloop control system. However, this method is not part of this article. Here, we present the settings of the controller respecting the required model, where we assume the desired course of control corresponding to the proportional system of the first order with an optional time constant Tw. We can calculate the optimal values of adjustable controller constants for the types of controlled systems listed here (see Table 1. Then, the calculation is added to the MS Excel table, which we used to calculate the system identification. Thus, we obtain the optimal adjustable controller constants after the identification. Table 1 Optimal setting of controller parameters by the method of the required model (dynamic inversion) By applying these relations when Tw = 25 s, we obtain the optimal adjustable parameters of the PID controller for the identified system: kr = 1,849, TI = 44,662 s, TD = 4,977 s. The plot in Figure 6a shows the time course of the resulting optimal control process.

CONCLUSION
The article presents the possibilities of using an accessible spreadsheet processor MS Excel and a solver for identifying the most frequent types of control systems and for subsequent calculation of the optimal settings of controllers in metallurgy. Given solution shows satisfactory results suitable for widespread use in technical practice.