Rough Controller Synthesis

nonlinearities, due to saturation of the driver used (amplifier and chopper) and the nonlinear characteristics of the series excitation motor. Real results of the tests performed in this system will be shown. The results are derived from experiments that use conventional controllers with PI actions to regulate the speed and current of the system, and rough control algorithms also with proportional and integral actions for the same purposes. Discrete representations were used for the realizations of the control algorithms, where variable e represents the control loop error (of the speed and of the u symbolizes the output variable of the and a 1 , b and b 1 are the parameters for the classic PI controllers.


Background
An information system (IS) may be defined by S = (U,A), where U is a set of objects or observations (o i ) called universe and A is a set of conditional attributes (a j ). The generic tabular representation of an information systems is illustrated in Table 1, where decision attribute values are defined in the last column of the table for a given decision attribute (d i ) and its corresponding classification f(o i ,d i ). Generally rough sets deal with nominal values. For numerical attributes a discretization process is necessary, converting the values in nominal data. Some approaches may be utilized to minimize eventual effects of data quantization (Skowron and Son, 1995 : : : : ... A discernibility function is defined in (5), where the set formed by the minimum term of F(B) determines the reducts of B, which is defined as a set of minimum attributes necessary to maintain the same properties of an IS that utilizes all the original attributes of the system. There may be more than one reduct for the same set of attributes. For a large IS, the calculus of minimal reducts can consist a problem of complex computation, which rises with the amount of data of the process. Some approaches are utilized to deal with this kind of problem in reduct processing, for example, through similarity relations (Huang et al., 2007). In information systems with data in numerical values, it usually is not necessary to calculate the reducts, because all the variables of the condition attributes are the reducts themselves.
To transform a reduct into a decision rule, the values of the conditional attributes from the object class from which the reduct was originated are added to the corresponding attributes, and then the rule is completed with the decision attributes. For a determined reduct, an example of decision rule is illustrated in (6). The use of the rough set theory enables systematically that the decision rules have consice informations concerning the original information system, adequately treating eventual redundant, uncertain, or imprecise information in the data.

Example 1
As examples of the concepts expressed in this section and the following examples consider

Methodology
For a more adequate representation of the numerical applications, the illustrated form in Table 4 will be adopted for the information systems employed in this paper. The condition attributes are x i and their data are x N (k) . The decision attribute is y and their values are y (k) . x For numeric values in ranges defined in the table, that is, , the sentences s k and s m defined in (8) may be redefined by generic rule (9), or through the simplified form (10), where (g) = [x 1 (k) , x 1 (m) ], (g) = [x 2 (k) , x 2 (m) ], (g) = [x N (k) , x N (m) ] and (g) = [y (k) , y (m) ], considering that y (k) < y (m) .
To estimate numerical values in ranges of the data obtained in the rules, formula (11) will be used for numerical interpolations .

Example 2
In order to illustrate the concepts of this section and of those to follow, Table 5 will illustrate a simple example defined by the function y = x 1 + x 2 with x 1 and x 2 є [0, 1]. This table is the same as Table 2 from Example 1. The IS associated has two condition attributes (x 1 and x 2 ) of numerical values. Consequently, the reduct is defined by {x 1 , x 2 }, resulting in the same decision rules as those in (7), which can be written as (10), as proposed in the methodology presented in this section, and resulting in (12).

Fuzzy models
With the information of decision rules in form (12), it is simple to obtain the parameters of a corresponding fuzzy model. For modeling in linguistic (Mamdani) rules (14), two membership functions ( Fig. 1), triangular and equally spaced, can be defined in the interval [0, 1] for the input variables (x 1 and x 2 ), and another three functions ( Fig. 2) defined in interval [0, 2] for the output variable (y). Therefore, the resulting fuzzy rules are expressed by (15).
For modeling with functional (Takagi-Sugeno) rules (16), the membership functions can be the same as those in Figure 1 for the input variables. For the polynomial function coefficients of the information from the output variable, the same one can be calculated by (13), resulting in the rules expressed by (17). As an example of the calculation of the polynomial coefficient functions, using the decision rule in the form (12) with x 1 (k) = 0, x 1 (m) = 1, x 2 (k) = 0, x 2 (m) = 1, y (k) = 0 and y (m) = 2, where using (13) we have y = ((2 -0)/2)((x 1 -0)/(1 -0) + (x 2 -0)/(1 -0)) = x 1 + x 2 which defines the coefficients of (16). Other examples of fuzzy models obtained with this methodology are illustrated in Pinheiro et al., 2010. r n : IF x 1 = A n AND x 2 = B n THEN y n = c 0n + c 1n x 1 + c 2n x 2 (16)

Rough models
Another simpler modeling option, called rough modeling, directly concerns the representation given in (12), where the data can be interpolated by (13). The advantage of this modeling in relation to the fuzzy models is that it does not require numerical fuzzification and defuzzification procedures, which can be advantageous in real-time applications in control systems, for example. The advantage of fuzzy models is its greater ability to function approximation, which is usually related to the possible intersections between the membership functions of associated fuzzy sets.
If eventually more than one rule results in estimated values (for example, for data at the ends of the condition attributes), the resulting value is given by the arithmetic average of the same.

Software
There are free access computational tools developed specifically for the processing of rough sets, such as RSL (Rough Sets Library), Rough Enough, CI (Column Importance facility), Rosetta, etc. These tools allow the processing of data of generic information systems, providing decision rules in a format similar to (6), for example. Data with fractional numeric values can be properly quantized through some established techniques. The reducts that determine the decision rules can be manually selected or determined by some known methods from the data processing of the IS used.
The methodology proposed in this paper allows the use of decision rules derived from processing of information system, aimed at building fuzzy models or rough models in order to design rule-based controllers. Figure 3 illustrates the typical structure of a ruled-based controller with PI action (Proportional plus Integral). The variable "e" represents the input error information of the controller, variable "u" symbolizes the output of the same, and "T" denotes the sample time.

Rule-based controllers
Equation (21) expresses the discrete mathematical model of a PI controller with the respective proportional (Kp) and integral (Ki) gains. Many articles show the computational accomplishments of rule-based controllers, especially those that employ fuzzy logic. The actions of the fuzzy controllers can be PI, PD (proportional plus derivative), PID or Lead/Lad (Pinheiro & Gomide, 2000), depending on the context of their applications. The gains (proportional, integral, etc.) of fuzzy controllers are generally represented by scale factors that multiply the membership functions of the same, or are already fully incorporated in the expressions of their membership functions. Many control problems can be solved using a PI-controller (Astrom & Wittenmark, 1990) due to their applicability and easy tuning.

Example 4
With relation to Figure 3, if the rules are the same as those exemplified in items 3.2 and 3.3 (where the simple data of Example 2 was used), Figure 4 shows the response (u) of the respective fuzzy controllers (linguistic and functional) or of the rough controllers for a step change in the error (e). The sample time (T) used was one tenth of a second. The points on the graph illustrate the discrete values resulting from the rule-based controllers (being practically identical to each other). And for the purpose of exemplification, the solid line represents the response of a conventional controller continuous in time with unit gains (proportional and integral). Comparing the results, it is possible to note that the design of the rule-based controllers was well fit.
The next section of this article will deal with more complex problems and practical contexts. Application examples like those of control systems with adaptive gains, active suspension systems, and speed regulator and current control for electric motors will be shown.
Questions regarding stability analysis resulting from the application of rough controllers can be performed by harmonic balance techniques, for example, in the same way that these techniques are used in stability analysis of fuzzy controls (Pinheiro & Gomide, 1997;Rezek et al., 2010).

Application examples
This section provides some examples of applications of the methodology proposed to synthesize rule-based controllers, whose objective is to accomplish control loops appropriate for systems with nonlinear behavior, etc.

Example 5
This example includes a speed control loop of a system that operates in low rotations, which requires a controller with characteristics of adaptive gains due to the nonlinear effects of the controlled process. The block diagram illustrated in Figure 5 represents the controlled process with a transfer function (22) and two nonlinearities. The second nonlinearity, indicated by block (b), defines a dead-zone effect related to gear gaps of the system. The transfer function P(s), shapes an electric motor that drives the system. The poles of the same are related to the electrical part associated with resistance and inductance of the motor. The mechanical part is related to moments of inertia and friction of the machine with its mechanical charge. The nominal values of the parameters are: K = 2.55; c 0 = 0.73; c 1 = 1.74; d 0 = 0.73. The saturation levels are ±12, the range of the dead-zone is ±1. Figure 6 illustrates a typical control loop to regulate the speed of the process, which works within a specific rotation range.   Table 7 illustrates some suitable gain values in function with the intensity (x 1 ) of the error (e) of the control loop and its integral (x 2 ), in order to properly compensate the process. The mapping (or scheduling) of the gains can be defined as u = y = K p (x 1 )x 1 + K i (x 2 )x 2 . Figure 8 illustrates the values of this mapping, where the data relative to the information on the input variables are at the top part of the figure, with x 1 in black and x 2 in gray. The output information (u) of the controller is found below the graphic. The information in Figure 8 represent the table of the information system of the problem in question, where it is desired to design a rule-based controller that incorporates the scaling gains, aiming for an effective compensation of the controlled process. This paper will employ the Rosetta (Øhrn & Komorowski, 1997), a software for processing of data related to information systems in general. This is a simple use freely accessed tool (http://www.idi.ntnu.no/~aleks/rosetta/  Table 7. Adaptive gains in function of the error and its integral.  the tool: Import IS; Discretization → Equal frequency binning; → Intervals = 5; Reduction → Exhaustive calculation; Rule generator. The decision rules (the first three and the last two) that resulted from processing the data done by the software are shown below (23). The "*" symbol denotes the inferior and superior values of the data of the IS correspondent, that in this example are -2.6759 and 2.8149 for x 1 and -3.5027 and 2.7042 for x 2 .  (24) Figure 9 has the normalized responses of the control loop now using the rough controller designed by the rules (24). The responses tend to maintain the specified characteristics of overshoot and settling time for different set-point values, different from the conventional PI controller responses (whose responses are shown in Fig. 7). This shows that the rule-based controller incorporated the relationships (nonlinear) of the gains from Table 7 in function of the error and its integration. The performance of the controller has adaptive actions according to the intensity of the error information of the control loop.

Example 6
This example deals with an active suspension model used in automotive systems. Figure 10 illustrates a typical system known as ¼ model. The spring and damper of the structure are represented by coefficients K f and B, respectively. The parameter M s corresponds to the sprung mass of the vehicle. The M r is the mass of the wheel and tire and K p represents the elasticity of the same. d p , d r and d s are vertical displacement of the tire, wheel and body of the vehicle, respectively. The force F a represents the action exerted by an active damper aiming the imposition of determined dynamic characteristics in the suspension.
The system can be represented in state variables (25). Variable x 1 represents the vertical displacement of the suspended mass, x 2 represents the speed of the same, and its derivation is the corresponding acceleration. Variable x 3 represents the vertical displacement of the wheel, x 4 represents the speed of the same, and its derivation is the corresponding acceleration. Variable u 1 expresses a disturbance in the suspension, like the vertical displacement of the tire. The magnitude of u 2 represents the compensation force of the damper system.
There are some types of well-known strategies to control active suspension systems. Expression (26) defines a typical strategy. The magnitude of F a corresponds to the force developed by the active damper in the system. The same depends on values C on and C off defined for the coefficient of the damper system (obtained by controlled leaking of fluid of the damper by an electrically controlled valve) or by variations of magnetic characteristics of the fluid by a current-controlled induction), along with information of the absolute speed (V abs ) and relative speed (V rel ) of the process. V abs is the absolute speed of the sprung mass and V rel is the relative speed between the sprung mass and the mass of the wheel-tire set.
off rel abs  the acceleration of the sprung mass of the process for a sudden dislocation of 0.05 meters in the tire of the system. The results obtained indicate a better response (smaller acceleration) of the system using a rule-based controller in relation to the classical strategy. Therefore, just as in the fuzzy controller cited, the compensation force commanded by the rough controller can vary in wider operation ranges, since the rules incorporate the various operating conditions of the system (Fig. 11) in its generation procedure.

Example 7
This example shows a real application of control loops in cascade for speed regulation and current control in a drive system with a DC motor. Figure 13 shows a block diagram of the process in question. The motor is activated by a driver (chopper), which uses power transistor. Electronic circuits generate firing pulses to command the chopper and are controlled by a computer that performs the control algorithms of the system, in other words, two regulation loops in cascaded (Fig. 14) for the variables speed and current. Hall sensors provide information on the stator current (I a ) of the motor and the rotation (W) of the same, whose information are acquired by a data acquisition system coupled with the control computer. A synchronous machine operating as a generator feeds a set of electrical resistors switched by relays, and this set works as variable loads for the DC motor. This system has nonlinearities, mainly due to saturation of the driver used (amplifier and chopper) and the nonlinear characteristics of the series excitation motor. Real results of the tests performed in this system will be shown. The results are derived from experiments that use conventional controllers with PI actions to regulate the speed and current of the system, and rough control algorithms also with proportional and integral actions for the same purposes. Discrete representations equal to (28) were used for the realizations of the control algorithms, where variable "e" represents the control loop error (of the speed and of the current), "u" symbolizes the output variable of the controller in question, and "a 1 , b 0 and b 1 " are the parameters for the classic PI controllers.    The variables x 1 = e(t), x 2 = e(t−1), x 3 = u(t−1) and y = u(t) will be used to generate the rules of a rough controller for the current loop.
Rosetta was used with the following procedures performed in the tool: Import IS; Discretization → Equal frequency binning → Intervals = 3; Reduction → Manual Reducer; Rule generator. The rules obtained are shown below, the first three and the last two. Now that the rough controller has information on three inputs, numerical values in ranges of the data obtained in the rules can be interpolated by means of (11) with n = 3. The acquisition of rules for the rough controller in the speed loop is performed similarly as described for the current loop. Figure 16 shows the real result of a test performed on the described system. The responses of the speed regulation and of the current became better with rough controllers than with classic controllers, as much in the starting of the motor as in the load alterations of the same. There are smaller peaks in the current and speed, both in speed variations (such increasing the input reference in the starting of the motor, for example), and in load variation (in this case a reduction that occurred between 7 and 8 seconds in the test). The explanation for these characteristics is due to the fact that the rule-based controllers incorporate the various operating conditions of the system, generating rules to compensate suitably the nonlinearities of the system. Fig. 16. Real responses of the system with classic and rough controllers.

Conclusion
This paper has presented a new approach to design rule-based controllers using concepts about rough sets. The proposed methodology allows obtaining rule parameters in a systematic form and with simple computations, as much for fuzzy controllers as for rough controllers. Example 1 illustrates some basic concepts about rough sets. Using a simple linear function is shown in Example 2 how to apply the approach proposed in this chapter in the modeling of rule-based models. Example 3 shows how a rough model can estimate the values associated with a basic nonlinear function. The results obtained in Example 4 show the same values for a fuzzy model and a rough model, when the approach involves a linear function. In this example the linear function was associated with the function of a proportional-integral controller. These results can also be confronted with those obtained in the work referenced in Pinheiro et al., 2010. In Example 5 a practical context of adaptive gains is synthesized through a rough controller in the control of a nonlinear system. Example 6 deals with an active suspension model used in automotive systems. The methodology proposed in this paper was applied to generate a rule-based controller to control the suspension system in question. The results can be confronted with those obtained in the works referenced in Pinheiro et al., 2007 andDong et al., 2010. The dynamic responses obtained were similar to the works mentioned. An experimental application was shown in Example 7, an example of control loops in cascade for speed regulation and current control in a drive system with a DC motor. Two rough controllers were synthesized to regulate the speed and current in the system. The results can be compared with those obtained in the work referenced in Rezek et al., 2010. The dynamic responses obtained were similar to the work mentioned, where was used two fuzzy controllers for the same purposes. The results obtained in this work indicate that the methodology proposed is adequate for applications in real control systems. The impact of the rough controllers in relation to the fuzzy controllers is that it does not require fuzzification and defuzzification procedures, which can be advantageous in real-time applications for control systems. The application of LMI (linear matrix inequalities) techniques and Lyapunov functions will also be investigated to design rough controllers and to analyze the stability in control loops, the same way that these methods are applied in control systems that use functional fuzzy