Technology Journal of Energy JET Volume 8 (2015) p.p. 41-53 Issue 3, November 2015 Typology of article 1.01 www.fe.um.si/en/jet.html THREE-PHASE FUZZY MODEL OF A DYNAMIC PRODUCTION SYSTEM TRIFAZNI MEHKI MODEL DINAMIČNEGA PROIZVODNEGA SISTEMA In this article, a three-phase fuzzy model of controlling a dynamic production system is presented. A power supply system can be an example of such a system. Fuzzy system control follows a stochastic mathematical closed-loop model of the control of stocks (additional capacities) in a production system. The fuzzy model is demonstrated with a numerical example. Povzetek V članku je predstavljen trifazni mehki model v procesu upravljanja dinamičnega proizvodnega sistema. Takšen sistem je lahko tudi energetski sistem. Mehko upravljanje sistema izhaja iz slučajno-stnega matematičnega zaprtozančnega modela upravljanja zalog v proizvodnem sistemu. Mehki pristop vpeljemo z uporabo trifaznega sistema mehkega sklepanja in pomeni približek zaprtozanč-nemu sistemu upravljanja. Mehki algoritem je ilustriran z numeričnim primerom. Every production system is a complex dynamic system. If a theoretical mathematical dynamic model of it is to be created, a great many variables and their interrelationships have to be taken into R Corresponding author: Prof. Janez Usenik, Ph.D., University of Maribor, Faculty of Energy Technology, Tel.: +386 40 647 689, Fax: +386 7 620 2222, Mailing address: Hočevarjev trg 1, SI 8270 Krško, Slovenia, e-mail address: janez.usenik@um.si 1 Landscape Governance College Grm Novo mesto, Sevno 13, 8000 Novo mesto Janez UsenikR, Meta Vidiček1 Keywords: dynamic production system, control, fuzzy model, fuzzy reasoning. Abstract 1 INTRODUCTION JET 41 Janez Usenik, Meta Vidicek JETVol. £1 (2015 ) Issue 3 consideration. However, with methods of logical and methodological decomposition, every may be divided into a finite set of simpler subsystems, which are then studied and analysed separately, [1]. A model of optimal control is determined with a system, its input/output variables, and the optimality criterion function. The system represents a regulation circle, which generally consists of a regulator, a control process, a feedback loop, and input and output information. In this article, dynamic production systems will be studied. The optimality criterion is the optimal and synchronized balancing of planned and actual output functions, [2]. Let us consider a production model in a linear stationary dynamic system in which the input variables indicate the demand for products manufactured by a company. These variables can be deterministic, stochastic or fuzzy. The fuzzy approach to the control of dynamic systems is approximately 50 years old. Thierry et al., [3] described the development of the fuzzy system control. From 1965 to 1985, the heuristic approach was pioneered, and earlier industrial applications were made. From 1985 to 2005, the model base approach was developed, including fuzzy modelling, model base fuzzy control design and adaptive fuzzy control. Since 2005, there have been new improvements in TS (Tagaki-Sugeno) system analysis, such as non-quadratic Lyapunov functions, delay, fuzzy-polynomial techniques, shape-dependent laws, asymptotic exactness, and adaptive control. In this article, a new fuzzy approach to the control of dynamic systems is presented. It is based on the fuzzy inference rules in the if-then form. In Usenik, [4], the two-phase system was defined, and in this article a new and innovative expansion is developed. 2 DEFINING THE PROBLEM Demand for a product should be met, if possible, by the current production. The difference between the current production and demand is the input function for the control process; the output function is the current stock/additional capacities, [4]. When the difference is positive, the surplus will be stocked, and when it is negative, the demand will also be covered by stock. In the case of a power supplier, stock in the usual sense does not exist (such as cars or computers, etc.); energy cannot be produced in advance for a known customer. The demand for energy services is neither uniform in time nor known in advance. It varies, has its ups (maxima) and downs (minima), and can only be met by installing and activating additional proper technological capacities, [5]. Because of this, the function of stock in the energy supply process is held by all the additional technological potential/capacities large enough to meet periods of extra demand. The output function measures the amount of unsatisfied customers or unsatisfied demand in general. When this difference is positive, i.e. when the power supply capacity exceeds the demand, a surplus of energy will be made. For this model, the regulation circuit is given in Figure 1, [4]. The task is to determine the optimum production and stock/capacities so that the total cost will be as low as possible, [1]. 42 JET Three-phaze fuzzy model of a dynamic production system Figurel: Regulation circuit of the production system 3 FUZZY MODEL Construction of a fuzzy system takes several steps, [6], [7]: selection of decision variables and their fuzzification, establishing the goal and the construction of the algorithm (base of rules of fuzzy reasoning), inference and defuzzification of the results of fuzzy inferences. A graphic presentation of a fuzzy system is given in Figure 2, [8]. Output crisp Figure 2: Architecture of a fuzzy expert system In, [4], a fuzzy two-phase system, given in Figure 3, was designed. Demand Rules block 1 Production Rules block 2 —► capacity Figure 3: The fuzzy two-phased system JET 43 Janez Usenik, Meta Vidicek JETVol. £1 (2015 ) Issue 3 Now, this fuzzy model will be expanded, and a three-phase fuzzy model will be created. Following the dynamic system, there are two subsystems in the first phase: system DEMAND and system PRODUCTION. Let us assume that the demand (Figure 4) depends on: ■ the market area, ■ the density of the area, ■ the price, ■ the season, ■ the uncertainty and the production (Figure 5) on: ■ the costs of production, ■ the policy, ■ the season, ■ the weather, and ■ the uncertainty. ÍYY MARKET^ |YY DENSITY_01 \- ÍYY PRI |YY SEAS0N_m[-IYY UNCERTAL.f1 REI1 DENSITY 01 MARKET PRICE SEASON 01 UNCERTAINTY... DEMAND -|demand M in/El Sum Figure 4: The fuzzy subsystem "demand" Figure 5: The fuzzy subsystem "production" 44 JET Three-phaze fuzzy model of a dynamic production system In the second phase, the output "SUPPLY" depends on the fuzzy input variables "demand" and "production"; in the third phase, with the output "CAPACITY" we have the fuzzy input variables "supply" and "production" (Figure 6). Figure 6: The fuaay three- phase system We assume that all expressions in our model are fuzzy variables. 3.1 Fuzzification In the fuzzification procedures, fuzzy sets for all fuzzy variables (input and output) must be defined, as well as their membership functions. Every fuzzy variable is presented by more terms/fuzzy sets. In our system, there are fourteen fuzzy variables: the market area, the density of the area (density_01), the price, the season_01, the uncertainty_01, the demand, the costs of production, the policy, the season_02, the weather, the uncertainty_02 and production in the first phase and capacity_01 in the second phase and, finally, in the third phase the capacity as output of the system. Fuzzy sets are given by terms below. In the first rules block (subsystem_01): • the input fuzzy variable MARKET AREA is represented by the fuzzy sets: SMALL, BIG, • the input fuzzy variable DENSITY OF THE AREA (DEeNSITY_01) is represented by the fuzzy sets: WEAK, MEDIUM, STRONG, • the input fuzzy variable PRICE is represented by the fuzzy sets: LOW, MEDIUM, HIGH, • the input fuzzy variable SEAS0N_01 is represented by the fuzzy sets: LOW, HIGH, • the input fuzzy variable UNCERTAINTY_01 is represented by the fuzzy sets: SMALL, MEDIUM, BIG, VERY_BIG, • the output fuzzy variable DEMAND is represented by the fuzzy sets: VERY_LOW, LOW, MEDIUM, HIGH, VERY_HIGH. In the second rule block (subsystem_02): JET 45 Janez Usenik, Meta Vidicek JETVol. £1 (2015 ) Issue 3 • the input fuzzy variable COSTS is represented by the fuzzy sets: LOW, NORMAL, HIGH, • the input fuzzy variable SEASON_02 is represented by the fuzzy sets: LOW, HIGH, • the input fuzzy variable UNCERTAINTY_02 is represented by the fuzzy sets: SMALL, MEDIUM, BIG, VERY_BIG, • the input fuzzy variable WEATHER is represented by the fuzzy sets: GOOD, BAD, • the input fuzzy variable POLICY is represented by the fuzzy sets: BAD, MEDIUM, GOOD, • the output fuzzy variable PRODUCTION is represented by the fuzzy sets: LOW, MEDIUM, HIGH. In the third rule block (second phase): • the input fuzzy variable DEMAND is represented by the fuzzy sets: VERY_LOW, LOW, MEDIUM, HIGH, VERY_HIGH, • the input fuzzy variable PRODUCTION is represented by the fuzzy sets: LOW, MEDIUM, HIGH, • the output fuzzy variable SUPPLY is represented by the fuzzy sets: VERY_LOW, LOW, MEDIUM, HIGH, VERY_HIGH. In the fourth rule block (third phase): • the input fuzzy variable SUPPLY is represented by the fuzzy sets: VERY_LOW, LOW, MEDIUM, HIGH, VERY_HIGH, • the input fuzzy variable PRODUCTION is represented by the fuzzy sets: LOW, MEDIUM, HIGH, • the output fuzzy variable CAPACITY is represented by the fuzzy sets: VERY_LOW, LOW, MEDIUM, HIGH, EXTREMELY_HIGH. For every fuzzy set, membership functions must be created (Figures 7-18). On the x-axis, the measures would be given in units, such as the number of customers, EUR, EUR/kWh, MWh, and so on, depending on the data. On the y-axis, membership in the interval [0, 1] is measured for every possible fuzzy variable and for every fuzzy set. Due to the uniqueness of this model, we suppose that all units for all fuzzy variables are given in relative measure, i.e. percentages from 0 to 100. Of course, the expert knows what, for example, 30% for "weather" or 80 % of the "price" etc. means. The fuzzy variables SUPPLY and CAPACITY are outputs of the fuzzy system. SUPPLY means a quantity of the goods, which is delivered to the customers on the basis of the demand directly from the factory by the current production. The fuzzy variable CAPACITY means extra capacities that should be added in the process of the production if it is not sufficient for current demand. Figure 7: UBF of "MARKET" Figure 8: UBF of "DENSITY_01" 3 JET Three-phaze fuzzy model of a dynamic production system Figure 9: MBF uf "PRICE" Figure 10: MBF uf "SEASON" LOW MEDIUM HIGH VERY HIGH Figure 11: MBF uf "UNCERTAINTY" Figure 12: MBF uf "DEMAND" Figure 13: MBF uf "COSTS" Figure 14: MBF uf "POLICY" Figure 15: MBF uf "WEATHER" Figure 16: MBF uf "PRODUCTION" Figure 17: MBF uf "SUPPLY" Figure 18: MBF uf "CAPACITY" 3.2 Fuzzy inference Fuzzy inference is a process in which a certain conclusion is derived from a set of fuzzy statements. In addition to linguistic variables, there are basic widgets of a fuzzy logic system as well as sets of rules that define the behaviour of a system. A single fuzzy rule (implication) assumes the form: if x is A, Cher y is B, where A and B are linguistic values defined by fuzzy sets on the universes of discourse X and Y, respectively. Variables x and y are defined by the sets X and Y. With fuzzy inference, we must put all values and facts in a definite order and connect JET 22 Janez Usenik, Meta Vidicek JETVol. £1 (2015 ) Issue 3 them to the procedure of inference execution, so that it will be feasible to do so with a computer. This order is given as a list or system of rules (rule block), [9], [10]. We applied FuzzyTech software, [11]. In the first phase (Rule block 1, Rule block 2), 144 rules in each block are automatically created. Some of them are represented in Tables 1 and 2. In block 3 and the block 4, FuzzyTech software creats 15 rules (Tables 3 and 4). Table 1: Some rules of the Rule Block "RBI" IF DENSITY_01 MARKET PRICE SEAS0N_m UNCERTAIN THEN DoS DEMAND WEAK BIG HIGH LOW BIG 1.00 HIGH WEAK BIG HIGH LOW MEDIUM 0.01| HIGH WEAK BIG HIGH LOW VERY_BIG 1.00 HIGH WEAK BIG HIGH HIGH SMALL 0.00 MEDIUM WEAK BIG HIGH HIGH BIG 0.00 LOW WEAK BIG HIGH HIGH MEDIUM 1.00 LOW WEAK BIG HIGH HIGH VERYJSIG 0.00 LOW MEDIUM SMALL LOW LOW SMALL 0.91| LOW MEDIUM SMALL LOW LOW BIG 1.00 LOW Table 2: Some rules of the Rule Block "RB2" IF COSTS POLICY SEAS0NJ2 UNCERTAIN WEATHER THEN DoS PR0DUCTIC NORMAL GOOD HIGH VERY_BIG BAD 1.00 MEDIUM HIGH BAD LOW SMALL GOOD 1.00 LOW HIGH BAD LOW SMALL BAD 1.00 MEDIUM HIGH BAD LOW BIG GOOD 1.00 LOW HIGH BAD LOW BIG BAD 1.00 MEDIUM HIGH BAD LOW MEDIUM GOOD 1.00 LOW HIGH BAD LOW MEDIUM BAD 1.00 LOW 23 JET Three-phaye fodzy madel af adpnamcc production system Table3: Rules of Che Rule Block "RB3" IF THEN DEMAND PRODUCTION DoS SUPPLY VERY_L0W LOW 1.00 VERY_LOW VERY_L0W MEDIUM 1.00 LOW VERYJOW HIGH 1.00 MEDIUM HIGH LOW 1.00 VERY_LOW HIGH MEDIUM 1.00 LOW HIGH HIGH 1.00 HIGH LOW LOW 1.00 LOW LOW MEDIUM 1.00 MEDIUM LOW HIGH 1.00 HIGH MEDIUM LOW 1.00 LOW MEDIUM MEDIUM 1.00 HIGH MEDIUM HIGH 1.00 VERYJHIGH VERY.HIGH LOW 1.00 MEDIUM VERY_HIGH MEDIUM 1.00 HIGH VERY_HIGH HIGH 1.00 ' Table 4: Rules of Che Rule Block 'RB4' IF THEN * PRODUCTION SUPPLY DoS CAPACITY LOW VERY_LOW 1.00 EXTRJHIGH MEDIUM VERY_LOW 1.00 MEDIUM HIGH VERY_LOW 1.00 LOW LOW LOW 1.00 EXTRJHIGH MEDIUM LOW 1.00 MEDIUM HIGH LOW 1.00 HIGH LOW MEDIUM 1.00 MEDIUM MEDIUM MEDIUM 1.00 LOW HIGH MEDIUM 1.00 HIGH LOW HIGH 1.00 MEDIUM MEDIUM HIGH 1.00 HIGH HIGH HIGH 1.00 VERY_LOW LOW VERYJHIGH 1.00 LOW MEDIUM VERYJHIGH 1.00 HIGH HIGH VERYJHIGH 1.00 VERY_LOW 3.3 Defuzzification Defuzzification is the conversion of a given fuzzy quantity to a precise, crisp quantity. There are many procedures for defuzzification, which give different results. In our example, the fuzzy model is created with FuzzyTech 5.55i software, and we use the Centre of Maximum (CoM) defuzzification method. 3.4 Optimisation When the system structure is set, and membership functions and rules in all the rule blocks are defined, the model must also be tested and checked. JET 49 Janez Usenik, Meta Vidicek JETVol. £1 (2015 ) Issue 3 During optimization, the entire definition area of input data are verified. For optimisation, there are various methods. One of the most efficient methods is using neural nets during the neuro-fuzzy training to obtain good and regular results. 4 NUMERICAL EXAMPLE Starting with the fuzzy model using FuzzyTech software, we can simulate all possible situations interactively. Subsystems 1 and 2 are independent, and numerical examples can be made separately. Because subsystems are one-phased, neurofuzzy training can be used for each of them. Some results are given in Tables 5 and 6. Table 5: Some numerical results of the subsystem 1 DENSITY_01 MARKET PRICE SEASON_01 UNCERT_01 DEMAND 10 10 10 10 10 38 50 70 30 50 40 62 80 20 50 80 80 46 30 50 90 30 30 45 60 80 80 40 50 59 100 100 80 60 90 44 30 80 20 80 20 61 40 40 40 40 40 65 60 60 50 50 20 67 100 100 2 100 2 100 Table 6: Some numerical results of the subsystem 2 COSTS POLICY SEASON_02 UNCERT_02 WEATHER PRODUCEION 10 10 10 10 10 46 50 50 50 50 100 67 100 1 1 100 1 0 50 60 80 20 50 57 70 60 100 20 50 60 80 80 30 60 60 50 50 JET Three-phaze fuzzy model of a dynamic production system 80 30 30 60 60 34 30 80 80 10 50 70 30 80 90 50 100 82 30 80 90 60 80 71 With the interactive simulation, made possible by using FuzzyTech software, every situation can be simulated. The quality of the results depends on the expert who prepares a data file for the neuro-training procedure. After optimizing both of the subsystems in phase 1, the entire fuzzy system can be run in all three phases. Some numerical results are presented in Table 7. Table 7: Some numerical results ir three-phased fuaay system DENSITY_01 10 20 30 50 60 80 80 80 100 100 5 MARKET 10 40 40 20 80 80 50 50 50 100 5 PRICE 10 40 80 80 90 20 20 40 70 5 100 SEASON_01 10 10 20 20 50 50 80 80 60 100 5 UNCERTAINTY_01 10 40 40 80 80 50 50 20 20 5 100 DEMAND 38 41 37 40 45 61 61 53 57 100 2 COSTS 10 60 60 80 80 20 20 50 50 5 100 POLICY 10 50 50 20 20 80 80 40 40 100 5 SEASON_02 10 80 80 50 50 40 40 90 90 100 5 UNCERTAINTY_02 10 30 30 50 80 80 20 50 60 5 100 WEATHER 10 10 80 80 40 40 70 80 90 100 5 PRODUCTION 50 40 56 43 32 50 65 57 50 100 0 SUPPLY (weighted) 41 33 42 40 34 45 50 47 42 100 0 51 41 49 48 41 52 57 54 49 100 0 CAPACITY (weighted) 40 47 43 43 49 42 37 40 43 0 100 49 59 51 52 59 48 43 46 51 0 100 The data in the rows SUPPLY and CAPACITY are the basic information about the behaviour of our fuzzy system. For the extreme situations given in (data) columns 10 and 11, it can be observed that if demand is very big (maxima 100 units), and current production is zero then (of course) the supply from JET 26 Janez Usenik, Meta Vidicek JEVVol. 8 ) Issue 3 current production is zero and we have to activate stocks (extra capacities) in all 100 units; if demand is very small (near 0 units), and production is zero, then all demand is satisfied from stocks. Other results yield similar information. For example, in the first (data) column we have with respect to the conditions for demand and for current production, weighted supply from current production 51 units. In the case of the "negative" supply, we can activate stocks (i.e. additional capacities) in the other 49 units of goods. 5 CONCLUSION The fuzzy mathematical model of system control can be used in an energy technology system and in its subsystems. During the control process, a great deal of information must be processed, which can only be done if a transparent and properly developed information system is available. The solution depends on many numerical parameters. All data and numerical analysis can only be processed into information for control if high quality and sophisticated software and powerful hardware are available. The fuzzy approach in creating the mathematical model with which we are describing the system can be successful if we have a good robust base of expert knowledge for neural training. Experts can use fuzzy models for real numerical predictions. References [1] J. Usenik: Mathematical model of the power supply system control. Journal of Energy Technology, Vol. 2, Iss. 3, str. 29-46, Aug. 2009 [2] J. Usenik, M. Repnik: System control in conditions of discrete stochastic input processes, Journal of energy technology, Vol. 5, Iss. 1, pp. 37-53, Feb. 2012 [3] M. G. Thierry, A. Sala, K. Tanaka: Fuzzy control turns 50_ 10 years later, Fuzzy sets and systems 281 Elsevier, pp. 168-182, 2015 [4] J. Usenik: System control in conditions of fuzzy dynamic processes, , Journal of energy technology, Vol. 8, Iss. 1, pp. 35-49, Sept. 2015 [5] J. Usenik, M. Bogataj: A fuzzy set approach for a location-inventory model. Transp. plann. technol., Vol. 28, Iss. 6, pp. 447-464, 2005 [6] J. T. Ross: Fuzzy Logic with Engineering Applications, second edition, John Wiley&Sons Ltd,The Atrium, Southern Gate, Chichester, 2004 [7] H. J. Zimmermann: Fuzzy Set Theory - and Its Applications, 4th edition, Kluwer Academic Publishers, Dordrecht, 2001 [8] Cavallaro, F.: A Takagi-Sugeno Fuzzy Inference System for Developing a Sustainability Index of Biomass, Sustainability, Vol. 7, pp. 12359-12371, 2015 [9] J. Usenik, T. Turnsek: Modelling conflict dynamics in an energy supply system. Journal of energy technology, Vol. 6, iss. 3, pp. 35-45, Aug. 2013 52 JET Three-phaze fuzzy model of a dynamic production system [10] Prodanovic, P.: Water resource research reyurC, Fuaay set rorkirg methods ord multiple decision mokirg, Report 039, University of Western Ontario, 2001 [11] FuaayTech, Users Moruol, INFORM GmbH, Inform Software Corporation, 2001 JET 28