SORTING SYSTEM WITH BUFFER STOCK VISUALISATION USING MATLAB GUI AND VRML

Original scientific paper The paper describes the issue of an automated system of requirements processing visualisation. The sorting process of components is implemented by buffer stock using in this system. The system is realized by using the Matlab environment. The Matlab GUI elements are used for application design, which serves for system parameters definition and 2D process visualization. 3D visualization is processed by VRML, while system dynamics is controlled by Matlab commands. A series of experiments under various scenarios was performed. The experiments resulting in the system effectiveness analysis under various criteria based on defined system parameter changing.


Introduction
The aim of this work is to visualize an automated requirements handling system, where sorting of components is ensured by the use of components buffer stock.This system will be used as an experimental tool in education process in study programmes Applied Informatics and Automation in Industry and Automation and ICT Implementation in Processes of Institute of Applied Informatics, Automation and Mechatronics of Faculty of Materials Science and Technology in Trnava.Designed tool will serve for an effectiveness analysis of the proposed system under various criteria in case of defined system parameters changes.
Restrictive system requirements are: • variable number of components • variable size of input stack of components • vertical buffer stock with variable number of cells • operating manipulator with 3-axis motion • the possibility of using up to three actuators • variable requirements stack size • the possibility of requirements batch processing • the possibility of defined performance indicators monitoring • the control application with ─ process 2D visualization ─ process 3D visualization.

System design
The system is implemented using Matlab environment [1 ÷ 4].The Matrix Laboratory -Matlab is a powerful tool for technical computing, includes toolbox for 3D visualization and is mostly used for problems solving of laboratory exercises in our institute.In order to maximize the potential utilization of an implementation tool, the individual components of the system are implemented in the form of dynamic arrays (Fig. 1): A structure type variable, which contains a copy of the dynamic arrays of input tray and requirements tray from the previous simulation run is used to ensure simulation reproducibility with modified system settings (Fig. 2).The basic principle of the system operation which reflects specified priority rules for requirements handling is shown in Nassi-Shneiderman diagram form depicted in Fig. 3.

Figure 3 Request processing algorithm
Two methods for searching of free cell and requested component in buffer stock are used: ─ the FIND method direct implemented in Matlab (marked as DEFAULT), which scans the target array (tray) always from the beginning ─ the custom method (marked as RING) based on calculating the distance between defined elements and then selecting the element with minimum distance.
The requirement execution is realized either through predefined storage cell, or alternatively through any unused buffer stock cell (identified by the chosen search algorithm).
To avoid algorithm deadlock one of following two options is used: ─ one buffer stock cell is permanently defined for discarding only ─ component discarding is executed through any unused buffer stock cell, while next component storing is possible only in case if at least one cell remains unoccupied after storing process in buffer stock.

System visualization 4.1 Matlab GUI application
The system visualization is realized by Matlab tool GUIDE in the application form [1,2,5,7], whose interface is shown in Fig. 4.   The simulation progress and the resulting statistical information are stored in text form in the list box (log).For example, for 1 simulation cycle with 2 element types, ring-type of search, 2 × 2 stock size with discard cell, without default output cell, two-pieces input tray and three-element requirements tray, the resulting log is shown in Fig. 5.After the simulation, the simulation log can be exported into text file.

VRML virtual world
3D visualization of the system is implemented using VRML [6] combined with tool Matlab (Fig. 9) [8].The virtual reality model consists of a combination of several structures.

Statically defined structure of system
This structure is shown in Fig. 6 and consists of:   Dynamic scene generation is based on the principle of static scene basic coordinate system shown in Fig. 8.This experiment was performed 10 times to obtain the basic characteristics of the chosen system configuration, which makes it possible to derive scenarios for further experiments.Basic monitored characteristics, which are the basis for the next group of experiments, are in this case:

Scenario No. 2
The basic setting of model is the same as in Scenario No. 1.The starting point is the simulation experiment, where the basic characteristic corresponds to the average value of previous experiment characteristics.The impact of combination of following system parameters changing is monitored: This experiment was performed 3 times for each combination of varying system parameters.The results obtained suggest that, at given configuration of the system, the average percentage store occupancy is almost 70 % and the percentage of the discarded elements is about 20 %.From Tab. 3 and Fig. 10 it is clear that in terms of time the search algorithm selection has not a significant impact on system efficiency.In terms of existence of fixed output or discarding cells it appears to be the most effective option, where the output or discarding cell is not defined, while item output and item eliminating are realized through an unused cell.This advantage is negatively balanced by necessity to ensure an additional elements flow control for each cell (successful exit / rejection).In terms of the trajectory length the RING search algorithm is more convenient (which has no significantly negative aspect in the time domain).Similarly as in the previous case, the most advantageous option is when no output or discarding cell is defined.

Conclusion
A process of visualization and analysis of automated system of requirements processing, in which components of input tray sorting is implemented by buffer stock, is presented in this article.As a simulation tool the Matlab software was used.System visualization was processed using the GUI directly in Matlab and 3D representation in the VRML language linked to the GUI.A basic group of experiments has been performed that serves as an example of using the created system to simulate different scenarios of different system configurations monitoring.
One of the main solution benefits is possibility of using it as an experimental tool in education process.
Possible directions for the future of the project: ─ providing of additional required cell selection algorithms based on various priority rules ─ the use of simulation optimization to determine the optimal parameters of the system according to defined criteria ─ physical realization of the system using automatic control hardware such as LEGO Mindstorms or PLC system in cooperation with Matlab ─ extension of more concurrent parallel storages.

Figure 1
Figure 1 System data structure

Figure 2
Figure 2 History data of last 3-cycles simulation 3 System control algorithm Following priority rules for incoming requests handling process were established: • priority rule number 1: the requirement is handled by components input tray • priority rule number 2: the requirement is handled by buffer stock.

Figure 4
Figure 4 System application GUIThe application allows defining:

─
the existence of a cell designed for direct output from input tray (out cell) ─ the existence of a cell designed for input tray element discard (discard cell) ─ the simulation speed (Pause).The application also allows the simulation experiment repeating with identically generated inputs tray and requirements try for: ─ type of search algorithm changing ─ the existence of output, respectively discard cells changing.The simulation repeating is not possible in case of input tray, requirements tray, buffer stock size changing, or number of component types in the system changing.Statistical information observed during the simulation: ─ the simulation duration ─ the manipulator trajectory length, which is given in relative units for elements horizontal and vertical spacing equal to 1 ─ average buffer stock occupancy ─ the number and percentage of discarded elements.

Figure 5
Figure 5 Simulation log example • system base • buffer stock frame with the first horizontal partition defining a base of the storage • the tray of: ─ components types ─ requirements (created as a clone of the component types tray using USE) ─ output (created as a clone of the component types tray using USE) • manipulator with possibility of moving in the x and y axes,

Figure 6 4 . 2 . 2
Figure 6 Statically defined part of system with manipulator detail 4.2.2Dynamically generated structure of system Dynamically generated structure is based on the external prototypes using Matlab commands for changing the properties Translation and material.Diffuse Color (Fig. 7) consisting of: ─ components

Figure 7
Figure 7 Dynamically generated part of system

Figure 8
Figure 8 The basic coordinate system of static sceneThe movement of the manipulator is due to dynamically created scene recalculated based on the Eq.(2)

Figure 9
Figure 9 Process visualization "in action"

─
the percentage of storage occupancy ─ the percentage of discarded elements.Additional characteristics are: ─ the duration of the simulation ─ path (relative) conducted by manipulator.

─
the empty cell searching algorithm while storing it into rack, respectively while identifying compliant element in storage ─ the existence of the output cell ─ the existence of the discarding cell.The primary monitored features in this case are: ─ the duration of the simulation ─ path (relative) conducted by manipulator.

Table 1
System parameters for Scenario No. 1

Table 2
Experiments results of Scenario No. 1

Table 3
Experiments results of Scenario No.