## 4 Structure of the Control System  
### General Multilayered Structure  
The above presentation shows that from the control point of view the electromagnetic mill installation is a complex multi-input and multi-output plant, which should meet different objectives. These objectives need control system intervention in diversified moments of time that depends on different dynamics of the system elements. Thus multi-rate control schemes should be applied. Multi-rate control follows from different control horizon that is related to the certain control objective and creates a hierarchical structure of the control system, as shown in Figure 12a. Multi-rate control is realized using suitable hardware and communication nets, which is presented in Figure 12b [8]. For each of the subsystem presented in Figure 12a, specific objectives are formulated.  
Production and management system is responsible for determination of the installation output according to specific parameters of the feed. It also determines the parameters of the product quality as product granulation, its humidity and temperature, and other physical and chemical properties, if necessary. Other parameters, which are determined in management layer, are: average time of grinding, type, and mass of grinding media in the working chamber (including possible range), cut-off grain size for main classifier, and limit values (including hysteresis) of the plant states for safety and fault detection subsystems. Both of these subsystems are the part of management layer because they are responsible for emergency stops of the system. To carry out this task, the respective measurements of the plant states need to be passed to the management layer, which is presented in Figure 12a. The example of task realized by fault detection system is presented in Section 4.2.  
All of the objectives that are related to the management system are realized with the longest horizon when compared with other layers. Granulation and other parameters of the product are measured (usually using indirect way--see Section 3.2) relatively rarely when compared with other layers. The only exception is safety and fault detection subsystems, which reacts immediately and needs continuous measurement. Assignment these function to management layer does not destroy  
Figure 11: Active power of electromagnetic mill of 100 mm diameter: (**a**) grinding media mass 600 g—black line, 400 g—red line, 200 g—blue line; and, (**b**) frequency 50 Hz, measured active power and its linear model.  
order of the layer where lower position means a shorter horizon of control: reaction of safety and fault detection subsystems depends on the plant specific state and can never happen (infinite horizon).  
Optimization layer is fed with parameters that are determined by the management layer. The main role of optimization layer is to keep requirements concerning the production using a minimal amount of energy. This mostly relates to electromagnetic mill supply and heat recovery subsystem.  
Supervisory control layer determines the set-points of the controllers that operate in the direct control. The entire system is inter-correlated which causes big troubles in dynamic control of the plant states. Thus, the supervisory controllers decrease the dynamic of the inter-correlated variables and make the direct control simpler.  
Figure 12: General structure of the multilayered control system for the electromagnetic mill installation: (**a**)—hierarchy of the objectives; and, (**b**)—hardware of the control system.