## 4 Structure of the Control System
### Optimization  
The electromagnetic grinding is a complex process, thus the formulation of the optimization problem is done in a top-down manner. To do so, the parameters that influence product quality and serves as the decision variables are specially selected [20]. Number of parameters were analysed: inverter frequencies (output frequency and basic frequency), parameters of the feed (volumetric flow, density, humidity, temperature, granulation), parameters of the air volumetric flow through the grinding chamber (total air volumetric flow through the grinding chamber, temperature of the air flow, humidity), parameters of the recycle flow (recycle air volumetric flow, recycle grinded material mass flow, granulation parameters of the recycle), and parameters of the grinding medium (mass, parameters as size, type of the ferromagnetic material etc.). Analysis shown in [20] proved that the most important impact on installation running costs is active power supplying the electromagnetic mill. On the other hand, output and primarily basic frequencies of the inverter shapes active power. It is assumed in the optimization task that the parameters of the feed, air stream through the working chamber, parameters of the recycle and grinding media are constant and are not necessarily given if optimization is concerned because all of them are hidden in the cumulated mass curve that  
Figure 16: Models for pneumatic transporting system: (**a**) example of data; and, (**b**) model of the working chamber stream. All of the axes are expressed in V as the output of the measurement unit. gives rise the constraints: chosen points of the curve need to fit the assumed range. In this way, an optimization task is formulated with criterion function (active power), constraints (points of the granulation curve), and decision variables (output and basic frequency of the inverter). Figure 17a presents a model of the relation between active power and two mentioned frequencies. Despite that the active power may reach very small values, some regions of the characteristic presented in Figure 17a cannot be reached. Further research [22] extended conclusion [20], with additional constraints. Figure 17b presents the distribution of the magnetic induction inside the working chamber (the electromagnetic mill of 100 mm diameter, but with a removed transporting pipe to measure the magnetic induction in a wider distance) as a function of the output frequency. Similar result is obtained for the basic frequency. It is obvious that both of the frequencies need to be narrowed down to a range around standard 50 Hz to keep the induction larger than the lowest feasible. But, the problem is deeper and concerns the current that supplies the coils. To keep induction in a given range, two inequalities need to be fulfilled: \(\omega_{o}\leq a_{l}\omega_{b}-b_{l},\ \omega_{o}\geq a_{p}\omega_{b}-b_{p}\) where \(\omega_{o}\), \(\omega_{b}\) are output and basic frequencies and \(a_{l}\), \(b_{l}\), \(a_{p}\), \(b_{p}\) are parameters following from assumed feasible induction. Another constraint follows from a safety reason: the output frequency always needs be to less than the basic frequency with known extend due to a possible breakdown of the coils. Figure 18a presents all of the constraints that pick up the feasible region that is presented in Figure 18b. Dedicated searching algorithm has been developed to find the minimum of the active power with respect to the constraints. Algorithm bases on establishing active constraints and unidimensional searching using golden section method [22]. Figure 17: (**a**) Model of the active power dependence on output and basic frequencies for mill 100 mm of diameter and mass of grinding media 200 g; and, (**b**) distribution of the magnetic induction in the working chamber for the same mill with basic frequency equal 50 Hz. Figure 18: (**a**) All of the constraints in optimization task; and, (**b**) feasible region. The optimization algorithm has been tested on 100 mm diameter electromagnetic mill installation.