## 4 Structure of the Control System
### Supervisory Control  
One of the most important objectives that is realized by the supervisory control layer is the balancing of the pneumatic transporting system. The problem follows from the fact, that air stream which transports solid particles is not measured. Moreover, flows that should be controlled are not the same as inlet streams, which can be measured in a simple way. The stream trough the working chamber is a composition of the main air stream and recycle stream. The stream trough the main classifier is the composition of both mentioned streams and the additional air stream. All of these streams are filled with solid particles. In order to estimate these unknown streams, the respective models have been identified [13]. Figure 16a presents an example of data and Figure 16b presents a set of identified models of the working chamber stream. Similar models have been identified for inflow to the main classifier and recycle.  
Upper control layers (management and optimization) determines the operating points for the installation, which results in the set-points of the streams (flows) through the working chamber, main classifier and recycle. However, not all the possible values of these set points are reachable by the system only by changing the flap position before the air streams are mixed. These constraints not only follow from restricted flap positions, but also from cross-relations between flap positions and air flows. Thus, the task of the supervisory control algorithm is to check whether the three required values are reachable. If they are not, then the closest are taken. Special algorithm that checks the constraints and searches for the solution was developed and presented in [13]. It performs in two steps. Firstly, inflow to the main classifier and stream trough the working chamber is checked. The solution gives positions of the flaps in the main air stream and recycle. Then, all three flaps (main, recycle, and additional) are adjusted in order to meet the requirements concerning recycle stream. Such a construction of searching algorithm follows from the importance of streams: the least important is recycle, which only supports the shifting of the recycling material back into the working chamber without the responsibility of its parameterization.  
Other tasks of the supervisory layer refer to data fusion. The most important measurement concerns the granulation of the product. Granulation measurement is mainly realized in the management layer using vision methods (indirect granulation measurement). This measurement is realized periodically and the period depends on the certain properties of grinded material. The period is significantly longer than control system reaction time in the lower layers. Thus, if the deviation of the granulation is small or changes are enough slow, then the re-parameterization of the lower layers is possible. However, in a case of violent disturbances, information concerning granulation change should be obtained faster in the system. As mentioned in the previous sections, there are two additional indirect measurements of the granulation, which are tested for electromagnetic mill: vibrational and moisture-based. Both are relative and give proper information about changes, rather than providing accurate measurement. The idea is to combine three of the used methods. Vision based method gives the reference and periodically feeds both supervisory algorithms of indirect granulation measurement in order to tune them. In this way, properly calibrated indirect granulation measurements can do the job much better before the next probe is processed by the vision method.  
The similar task performs supervisory algorithm that controls the moisture of the product with respect to the ground material humidity in the context of the final granulation. Yet again, the horizon of the task places this algorithm in the supervisory layer because the reaction of granulation on changes in grinding material humidity is much slower than the humidity control that is realized in the direct layer [14].