• Nem Talált Eredményt

Fuzzy Control

In document Obuda University ´ (Pldal 38-42)

2.2 Development of Linear and Fuzzy Control Approaches

2.2.2 Fuzzy Control

The original source is Odry et al. (2016a).

2.2.2.1 Fuzzy Logic Controllers

Lofti A. Zadeh introduced the fuzzy sets Zadeh (1965) by extending the classical two-valued logic{0,1}with the whole continuous interval [0,1]. This allows to introduce linguistic variables (such as small and large for reasoning about the current consumption) and associate them with membership functions. Fuzzy control is based on the application of these fuzzy sets, which result in that the inference mechanism of a FLC can be defined by simple IF-THEN linguistic rules. Hence, there is no need to define complex and precise models, instead the empirical rules and the approximate reasoning contribute to a heuristically defined control strategy. The FLC structure is depicted in Fig. 2.5 and its fundamental algorithm is composed of the following parts Wang (1997); K´oczy et al. (2000); Full´er (2000).

1. Fuzzification of the n-dimensional observation vector χ = (x1, x2, ..., xn) and calculation of the firing values of theith rule (i= 1, ..., r) defined as:

Ri : IFx1=X1i and ...and xn=Xni THENy=Bi. (2.21) Let χj denote the jth dimension of the observation vector, then the firing value γji rep-resents the fitting degree of the observation χj to the antecedent fuzzy setXji in the jth dimension of theith rule as

γji = max

χj {min{Xjj), Xjij)}}, (2.22) whereXjj) is the fuzzified observation.

2. Calculation of the applicability measure of theith rule, denoted byγi, as the minimum of the aforementioned firing values. This weight determines the significance of the consequent fuzzy set defined in the ith rule.

γi=minn

j=1 γji (2.23)

3. Calculation of the consequent fuzzy set Bi,∗ in the ith rule (i.e., assigning the so-called firing level to the output fuzzy set defined in each rule) as the minimum of the applicability measure γi and the fuzzy setBi defined inRi:

Bi,∗(y) = min γi, Bi(y)

. (2.24)

4. The summarized conclusion (total fuzzy output) is obtained as the union of allBi,∗ con-sequent fuzzy sets as:

B(y) =maxr

i=1 Bi,∗(y). (2.25)

5. In case of Mamdani architectures, the defuzzification process maps back the output fuzzy set to crisp domain. One of the common defuzzification techniques is the center of area (COA) method, which determines the COA of the summarized conclusion fuzzy setB(y).

The crisp output is calculated as:

yCOA= R

y∈BB(y)ydy R

y∈BB(y)dy . (2.26)

In case of zero-order Sugeno systems, constant singleton output membership functions define the conclusion in each rule, i.e., constant (not fuzzy) function y = κi constitutes the consequent in the ith rule in equation (2.21) instead of the fuzzy set Bi. This in-creases computational efficiency and enables the computation of the crisp output y0 as the weighted average over all rule outputs obtained in step 2:

y0 = Pr

i=1κi·γi Pr

i=1γi , (2.27)

whereκi denotes the consequent (constant) singleton defined in the ith rule.

Crisp

Fuzzification Linguistic control strategy Defuzzification Fuzzy Logic Controller (FLC)

Figure 2.5: Structure of the fuzzy logic controller National (2018).

2.2.2.2 Elaboration of the Control Strategy

The goal is to design a heuristic fuzzy control scheme that drives both wheels through the actuators (DC motors) such a way that the robot can perform the prescribed control task.

The developed fuzzy approach differs from the solutions given by Huang et al. (2011) and Xu et al.(2013a) in both the design and elaboration procedures. Namely, an expert oriented design approach is employed here, which uses those simple heuristic knowledge oriented tools (such as the definition of input-output relations with the help of linguistic variables and simple IF-THEN rules-based observations) that fuzzy logic meant to offer Wang (1997).

The elaboration of the fuzzy control strategy consists of defining the FLCs and a control scheme that satisfies the control requirements. This heuristic procedure starts by aggregating the deductions related to the behavior of the dynamical system using both observations and human common sense. In order to ensure the anti-sway control of the robot the following main deductions shall be implemented with the control scheme.

1. If the speed error (eν) is positive, then the control voltage (uν) shall be positive (and similarly the opposite scenario).

2. Moreover, the control voltage (uν) shall be modified (decreased or limited) in such a way to minimize the IB oscillations.

Based on both the aforementioned deductions and the results of LQG control, a control scheme that consists of three cascade-connected FLCs (hereinafter FLC1, FLC2, and FLC3) is proposed. This control scheme is depicted in Fig. 2.6, where the inputs and outputs of each FLC can be identified. Based on the aggregated initial deductions, both the corresponding input-output ranges and linguistic values are defined.

𝜃1

Figure 2.6: Block diagram of the applied control structure.

The design and tuning of each FLC is performed on an intuitive, heuristic manner. The mem-bership functions related to the control variables are chosen with triangular and trapezoidal shapes, because those are commonly used in fuzzy control design. For the inputs of each FLC, three membership functions are chosen (by iterative tuning), uniformly distributed across their universes of discourse (see Fig. 2.7).

The control scheme is constructed using different PD-type and PI-type FLCs which are interconnected in cascade way. Table 2.2 summarizes the inference mechanism of the employed FLCs. Using the fuzzy sets N (negative), P (positive) and Z (zero) the fuzzy rules for the PD-type and PI-type FLCs are shown in Table 2.3. The exact antecedents and the consequent related to the tables are defined in the next paragraphs. The proposed architectures execute weighted average defuzzification. Since, the Ts = 0.01 s sampling time in taken into account (which equals to the sampling time of the applied sensors on the real robot), therefore, as an example θ3,k denotes the discrete time domain equivalent of the sampled signal θ3(t): θ3,k = θ3(kTs).

𝑒𝜉 deg/s

Figure 2.7: Membership functions of the employed FLCs.

Table 2.2: Properties of the employed controllers.

AND method

OR

method Implication Aggregation Defuzzification

MIN MAX MIN MAX Weighted

average

Table 2.3: Rule base of PD and PI-type FLCs.

PD-type

FLC1 is responsible for the linear speed control of robot. The input (antecedent of each rule) of the controller is the speed erroreν,kd,k−νk, while the output (or consequent) is the variation of the command voltage ∆uν,k. As a result of iterative tuning±0.35 ms−1 and±3 V are established for the universes of discourse ofeν and ∆uν, respectively. Since the acceleration of the robot causes the oscillation of the IB (and we keep in mind that the differential term increases the sensitivity), a PI-type FLC is employed, whose fuzzy rules are defined in Table 2.3. Moreover, weighted average defuzzification is applied, therefore, the crisp control voltage uν,k for the speed control of the robot in the kth epoch is defined as:

uν,k =uν,k−1+ P3

i=1γi(eν,k)·κi P3

i=1γi(eν,k) , (2.28)

where γi(eν,k) returns the membership degree of the antecedent eν,k in the ith-rule and κi is the singleton consequent.

The aforementioned controller (FLC1) only partly ensures the linear displacement of the robot. Since the oscillation of the IB is not compensated, therefore the linear speed might fluctuate. The task of FLC2 is to suppress the IB oscillations. Since oscillation occurs when-ever the robot accelerates, FLC2 is designed such a way to decrease the control voltage uν whenever oscillation is sampled. In this way the acceleration is restricted which results in the suppression of the oscillation. The inputs of the controller are the oscillation error eθ3,k and its time derivative eω3,k, while the output of the controller is the control voltage uθ3,k. The applied triangular and trapezoidal membership functions are shown in Fig. 2.7. The universes of discourse of the input variables are defined based heuristic knowledge; for the oscillation error and its time derivative±15 deg and±220 degs−1 ranges are defined, respectively, while for the output control voltage±0.6 V is established. The employed fuzzy rules define a PD-type FLC (see Table 2.3). Similarly to FLC1, the crisp output of the controller is calculated using the weighted average method as:

uθ3,k = P9

i=1min γi(eθ3,k), γi(eω3,k)

·κi P9

i=1min (γi(eθ3,k), γi(eω3,k)) , (2.29) where γi(eθ3,k) andγi(eω3,k) are the ith-rule fired membership function values and κi denotes the singleton value of the consequent weighting factor of the ith rule (see Fig. 2.7).

FLC3 controls the yaw rate of the robot. The input of the controller is the error eξ,k = ξd,k −ξk, while the output is the variation of the control voltage ∆uξ,k. The universes of discourse of the input and output variables are chosen heuristically as ±30 degs−1 and±1.5 V, respectively. The linguistic variables and membership functions are depicted in Fig. 2.7. By combining the output with an integrator, as depicted in Fig. 2.6, a PI-type FLC is employed, whose rule base is given in Table 2.3. The crisp control voltage of FLC3 is given as:

uξ,k =uξ,k−1+ P3

i=1γi(eξ,k)·κi P3

i=1γi(eξ,k) . (2.30)

The control voltages of the motors can be identified based on Fig. 2.6:

u1=uν+uθ3 −uξ,

u2=uν+uθ3 +uξ. (2.31)

2.2.3 Initial Control Performances

In document Obuda University ´ (Pldal 38-42)