Mnesors for automatic control

Mnesors are defined as elements of a semimodule over the min-plus integers. This two-sorted structure is able to merge graduation properties of vectors and idempotent properties of boolean numbers, which makes it appropriate for hybrid systems. We ap…

Authors: Gilles Champenois

Mnesors for automatic control
Mnesors for Automatic Control Gilles C HAMPENOIS Collège Saint-André, Saint-Maur, France gilles_champenois@yahoo.fr ABSTRACT . Mnesors are defined as elements of a semimodule over the min-plus integers. This two-sorted structure is able to merge graduation properties of vectors and idempotent properties of boolean numbers, which makes it appropriate for hybrid systems. We apply it to the control of an inverted pendulum and design a full logical controller, that is, without the usual algebra of real numbers. "Thus the theory of control in engineering, whether human or animal or mechanical, is a chapter in the theory of messages." Norbert Wiener (1894-1964) I. INTRODUCTION Machines generally must be controlled or constrained to achieve a certain goal by a human pilot or by an automat which is called a controller. When constant action of the pilot is required, we call it continous control or, in the case of the automat, feedback control. For example, the cars can have their speed kept more or less constant by the driver or by an electronic controller. But to those basic tasks, feedback controllers have added new functionalities. They generally take over supervision tasks. For instance, some car electronic systems can alert on a possible danger of collision. That is what one calls discrete event control. Unfortunately, the two cases, continous and discrete control, are based on two different kinds of computing. The former is based on real number computing, the latter on boolean numbers, and each with completely different mathematical operations. Still they have to interact. So it is clearly needed to find a common standard, that is, common computing operations on common numbers. Although software could help by putting both continous and discrete variables in boolean format (coded by 0 or 1), their mixture is clearly artificial. In fact it brings nothing to help the design. Basically, variables are of completely different meaning. So we must say that numerical technology fails to fill the gap here. Control theory alone is made to do the job. For that, we must find some control laws that can combine continous and discrete variables into a single format with common operations. Fuzzy control [1] positively made the way towards a unified control by dropping the regular algebra of real numbers and instead by using logical rules of numerical calculus. We want to continue the work and propose a logical controler based on the mnesor calculus (mnesor controller). Its main advantage is to merge linear properties of vectors and boolean properties. Again we see a number of reasons to apply this calculus to automatic controllers: full compatibility between discrete and continous control, minimized computing resources, linear control. All this makes it appropriate tools for hybrid systems and HMI systems. We’ll finish with the inverted pendulum example. II. THE MIN-PLUS INTEGERS The usual operations on integers are the addition ( € + ) and multiplication ( € × ). Still we want to reconsider that with a different pair of operations (written € ⊕ , ⊗ ): the minimum and the addition: € x ⊕ y = min x , y ( ) and € x ⊗ y = x + y . But for the sake of simplicity they are respectively renamed addition and multiplication. EXAMPLE . € 1 ⊕ 2 = 1 € 2 ⊗ − 3 = − 1 Such numbers are called flat numbers and are written € 0 ( ) , + 1 ( ) , + 2 ( ) , etc. and for the negative integers: € 0 ( ) , − 1 ( ) , − 2 ( ) etc. € − 1 ( ) is also written € + 1 ( ) − 1 . Their set is denoted by € G o . Whenever the sum € x ⊕ y is equal to € y itself, we say that € x is inferior to € y . Thus compared to the standard ordering the order here is reverse. Unlike standard ordering where € − 1 ( ) ≤ 0 ( ) ≤ + 1 ( ) , positive numbers on the scale are given the lower position and we can write € − 1 ( ) f 0 ( ) f + 1 ( ) as it is shown graphically below: € 0 ( ) € − 1 ( ) f 0 ( ) € + 1 ( ) p 0 ( ) FIGURE 1 . The ordering of flat numbers III. FLAT MNESORS Let € M o be a commutative monoid with an identity element € 0 ∈ M o . We assume that there exists an external multiplication (for all € x ∈ M o and € λ ∈ G o , € x λ ∈ M o ) with four properties (see properties 1-2-3-4 below). € x 0 ( ) = x (1) € x + y ( ) λ = x λ + y λ (2) € x λ ( ) µ = x λ ⊗ µ ( ) (3) € x λ ⊕ µ ( ) = x λ + x µ (4) That’s formally what defines a semimodule over the flat numbers. The elements are named mnesors and precisely flat mnesors. Furthermore, we add a unary function ( € x → x the conjugate of € x ) which is: involutive, € x = x (5) compatible with the external multiplication, € x λ = x λ − 1 (6) Idempotence . We prove first that the addition of mnesors is idempotent PROOF . In € x + x , we substitute € x τ for € x . Thus € x + x = x τ + x τ = x τ ⊕ τ ( ) = x τ = x Ordering . The ordering is defined as follows: the mnesor € x is inferior to the mnesor € y (written € x ≤ y ) if and only if € x can be written as € x = y λ where € λ p 0 ( ) . PROOF . Obviously reflexive and transitive. Antisymmetric: € x ≤ y and € y ≤ x , that is € x = y λ and € y = x µ . Then € x + y = x + x µ = x 0 ( ) + x µ = x 0 ( ) ⊕ µ ( ) = x 0 ( ) = x and € x + y = y λ + y = y . Then € x = y . We prove next that for all € x in € G o , € x λ ≤ x µ whenever € λ p µ . PROOF . As the addition in € G o returns one of the operands, for example we can write € λ ⊕ µ = µ . So, € x λ + x µ = x λ ⊕ µ ( ) = x µ Empty mnesor . The mnesor identity € 0 is called the empty mnesor and it verifies the identity € 0 λ = 0 whenever € λ p 0 ( ) PROOF . € 0 λ = 0 + 0 λ = 0 0 ( ) + 0 λ = 0 0 ( ) ⊕ λ ( ) = 0 0 ( ) = 0 (Internal) multiplication . The product of the mnesors € x and € y is the mnesor € x × y defined as € x × y = x + y . The operation is associative, commutative and idempotent. Two properties hold: € x × y ( ) λ = x λ ( ) × y λ ( ) , € x × x λ ( ) = x λ , with € λ p 0 ( ) PROOF . € x × y ( ) λ = x + y ( ) λ = x + y ( ) λ − 1 = x λ − 1 + y λ − 1 = x λ + y λ = x λ ( ) × y λ ( ) € x × x λ ( ) = x + x λ − 1 = x 0 ( ) + λ − 1 ( ) = x λ IV. NUMBERS FOR QUALITATIVE REASONING As far as the usual algebra holds, a number is without ambiguity either positive or negative. But if we now consider AI, its status is not that clear. It can be more or less positive, larger or not, more or less precise. Isn’t 2,00 € more precise than two euros? Following an example from [1], isn’t the number € 1 less positive than the number 10? More generally, numbers appear with fuzzy qualities: being positive, negative, large, centered, precise, etc. We assume here that there exist two fuzzy sets, € PST and € NGT , one for positivity and the other one for negativity. Let’s now give an interpretation of the external multiplication. We have seen that € PST expresses positivity. € PST multiplied by € 2 expresses positivity too but with a stronger constraint. Generally, the larger the integer, the less € PST multiplied by it will be matched by a given number, or equivalently, the less positive this number will appear. For example, if € 10 matches € PST well, it matches € PST times € 2 less because the positivity constraint is higher in € PST times € 2 than in € PST alone. Now what do the addition and the (internal) multiplication of mnesors mean? Adding mnesors relaxes each operand by simply returning the mnesor with the softer constraint. For example, the addition of € PST to € PST times € 2 returns € PST which is the less constrained mnesor. Compared with the addition, the multiplication has the opposite effect by returning a more constraint mnesor. For instance, the product of € PST by € PST times € 2 is the more constrained mnesor of both, that is the latter. Within the general framework of mnesors, we add a couple of rules: Every flat mnesor is linear with € PST , € NGT or € ALL = 0 € x = PST λ or € x = NGT λ or € x = ALL λ (7) The conjugate of € PST is € NGT and vice-versa, € PST = NGT (8) The sum of a mnesor inferior or equal to € x to the supplement of € x , € x λ + x = x for € λ p 0 ( ) but € λ ≠ 0 ( ) (9) € x + x = ALL (10) Further rules can be deduced: € x + ALL = ALL € x × ALL = x , € x × 0 = 0 , € x × x = 0 , € x λ ( ) × x µ ( ) = x min λ , µ ( ) . PROOFS . € x + ALL = x + x + x = x + x = ALL € x × ALL = x + ALL = x + 0 = x = x € x × 0 = x + 0 = x + ALL = ALL = 0 € x × x = x + x = x + x = ALL = 0 € x λ × x µ = x λ + x µ = x λ − 1 ⊕ µ − 1 ( ) = x λ − 1 ⊕ µ − 1 ( ) − 1 = x min λ , µ ( ) V. AN APPLICATION TO AUTOMATIC CONTROL Our inverted pendulum is made of a mass point (mass € m ) at the upper extremity of a vertical weightless bar (length € a ). A cart (position € x ) moves the other extremity on the x-axis and help it to return back to the vertical position against gravity ( € g ). € θ and € ω are respectively the angle of the bar with the vertical and its rate (see below). FIGURE 2 . A simple inverted pendulum € x € θ € a = 1 m € m ⋅ a ⋅ ′ ′ θ = m ⋅ g ⋅ sin θ ( ) + m ⋅ ′ ′ x € g = 10 ms − 2 We have to stabilize the pendulum around the vertical, that is, to keep both variables € θ and € ω close to zero through the direct control of € ′ ′ x (as control variable, € ′ ′ x is renamed € u ). We want to compare two different control laws: the first one (P(I)D law) is based on the usual algebra and is simply computed as € u = − 10 θ − 5 ω (bound to the € ± 30 ms − 2 interval). The other one is based on the mnesor theory. We first performed the simulation of the pendulum controled by the P(I)D law. The error, rate and control signals are then pictured below: 10,00 0,00 -10,00 400 ms 20,00 10,00 0,00 -10,00 400 ms 30,00 20,00 10,00 0,00 -10,00 -20,00 400 ms FIGURE 3. A P(I)D control law Theta signal (deg) Control signal (m/s/s) Rate signal (deg/s) Now we want to compare with the mnesor control law. First converting values of € u , θ , ω into three mnesors ( € U , Ξ , Ω ) is needed. The mnesor € Ξ (resp. € Ω ) is equal to € PST λ whenever € θ is positive and is equal to € NGT λ whenever € θ is negative. The more € θ (resp. € ω ) is, the less € λ is. In details have a look at the diagram below. 0 -1 -2 -3 omega (deg/s) if € ω > 0 € Ω = PST λ ω if € ω < 0 € Ω = NGT λ ω FIGURE 4. € ω -to- € Ω converter € λ ω f 0 ( ) 0 -1 -2 -3 theta (deg) FIGURE 5. € θ -to- € Ξ converter € λ θ f 0 ( ) if € θ > 0 € Ξ = PST λ θ if € θ < 0 € Ξ = NGT λ θ If € u , θ , ω are positive (resp. negative), then € U , Ξ , Ω are given € PST ( € NGT ) mnesor. We recall that multiplying two mnesors means choosing the more constrained of both ( € PST × NGT λ = PST and € NGT × PST λ = NGT if € λ f 0 ( ) ). If one is as positive but the other one is negative, the multiplication returns zero ( € PST × NGT = 0 ). So whenever theta and rate are of different signs, the control is zero. The mnesor control € U is calculated as follows: € U = Ξ × Ω Then it is converted back to real values (see below). 30 20 10 0 lambda_u: 0/-1/-2 FIGURE 6. € U -to- € u converter € u (m/s/s) If € U = PST λ u € u > 0 If € U = NGT λ u € u < 0 The error, rate and control signals are pictured below: 1,00 0,00 -1,00 -2,00 -3,00 -4,00 -5,00 -6,00 -7,00 -8,00 -9,00 -10,00 400 ms Theta signal (deg) 7,00 6,00 5,00 4,00 3,00 2,00 1,00 0,00 -1,00 400 ms Rate signal (deg/s) 30,00 20,00 10,00 0,00 -10,00 -20,00 -30,00 400 ms Control signal (m/s/s) FIGURE 7. Mnesor control law CONCLUSION One can notice the similarity to fuzzy control. But here the theory is completely axiomatized. Fuzzification (what we call real-to-mnesor conversion) seems more natural and defuzzification much more simple. REFERENCES 1. ZADEH L. (1965), Fuzzy Sets

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment