This chapter presents an ethologically inspired model realized with a fuzzy rule interpolation fuzzy automaton (introduced in REF _Ref366247252 \r \h , REF _Ref366247254 \r \h , REF _Ref366252238 \r \h and REF _Ref366247256 \r \h ). First, the ethological inspiraton for humanrobot interaction is presented, after that a brief overview on behaviourbased control, then some words on fuzzy automata can be found. After introducing the necessary prerequisites, the ethological test procedure, the suggested structure of the model is described in details. Some samples from the rule bases of the fuzzy automaton along with example simulation executions are described.
In recent years there has been an increased interest in the development of HumanRobot Interaction (HRI). Researchers have assumed that HRI could be enhanced if these intelligent systems were able to express some pattern of sociocognitive and socioemotional behaviour (e.g. REF _Ref361667391 \r \h \* MERGEFORMAT ). Such approach needed an interaction among various scientific disciplines including psychology, cognitive science, social sciences, artificial intelligence, computer science and robotics. The main goal has been to find ways in which humans can interact with these systems in a ‘natural’ way. Recently HRI has become very user oriented, that is, the performance of the robot is evaluated from the user’s perspective. This view also reinforces arguments that robots do not only need to display certain emotional and cognitive skills but also showing features of individuality. Generally however, most socially interactive robots are not able to support longterm interaction with humans, and the interest shown toward them wears out rapidly.
The design of socially interactive robots has faced many challenges. Despite major advances there are still many obstacles to be solved in order to achieve a naturallike interaction between robots and humans. The ‘uncanny valley’ effect: Mori REF _Ref361656179 \r \h \* MERGEFORMAT assumed that the increasing similarity of robots to humans will actually increase the chances that humans refuse interaction (will be frightened from) very humanlike agents. Although many take this effect for granted only little actual research was devoted to this issue. Many argue that once an agent passes certain level of similarity, as it is the case in the most recent visual characters in computer graphics, people will treat them just as people REF _Ref361667499 \r \h \* MERGEFORMAT . However, in the case of 3D robots, the answer is presently less clear, as up do date technology is very crude in reproducing naturallike behaviour, emotions and verbal interaction. Thus for robotics the uncanny valley effect will present a continuing challenge in the near future.
In spite of the huge advances in robotics current socially interactive systems fail both with regard to motor and cognitive capacities, and in most cases can interact only in a very limited way with the human partner. This is a major discrepancy that is not easy to solve because there is a big gap between presently available technologies (hardware and software) and the desire for achieving humanlike cognitive and motor capacities. As a consequence recent socially interactive robots have only a restricted appeal to humans, and after losing the effect of novelty the interactions break down fast.
The planning and construction of biologically or psychologically inspired robots depends crucially of the current understanding of human motor and mental processes. However, these are one of the most complex phenomena of life. Therfore it is certainly possible that human mental models of abilities like ‘intention’, ‘human memory’ etc., which serve at present as the underlying concepts for control socially interactive robots, will be proved to be faulty.
Because of the goal of mimicking a human, socially interactive robots do not utilize more general human abilities that have evolved as general skills for social interaction. Further, the lack of evolutionary approach in conceptualizing the design of such robots hinders further development, and reinforces that the only goal in robotics should be the produce ‘as humanlike as possible’ agents.
In order to overcome some of the challenges presented above ethologically inspired HRI models can be applied. The concept of ethologically inspired HRI models allows the study of individual interactions between animals and animals and humans. This way of handling HumanRobot Interaction is based on the concept that the robot acts like an animal companion to human. According to this paradigm the robot should not be molded to mimic the human being, and form humantohuman like communication, but to follow the existing biological examples and form interspecies interaction. The 20.000 year old humandog relationship REF _Ref361667925 \r \h \* MERGEFORMAT is a good example for this paradigm of the HRI, as interaction of different species. One good reason of this approach in HRI is the lack of the ‘uncanny valley’ effect REF _Ref361656179 \r \h \* MERGEFORMAT , i.e. there is no need to buit robots which have any similarities to humans.
Such robots do not have to rely on the exact copy of human social behaviour (including language, etc.) but should be able to produce social behaviours that provide a minimal set of actions on which humanrobot cooperation can be achieved. Such basic models of robots could be improved with time making the HRI interaction more complex.
In ethological modeling, mass of expert knowledge exists in the form of expert’s rules. Most of them are descriptive verbal ethological models. The knowledge representation of an expert’s verbal rules can be very simply translated to the structure of fuzzy rules, transforming the initially verbal ethological models to a fuzzy model. On the other hand, in case of the descriptive verbal ethological models, the ‘completeness’ of the rulebase is not required (thanks to the descriptive manner of the model), which makes implementation difficulties in classical fuzzy rule based systems. For that reason for fuzzy modell we use low computational demand Fuzzy Rule Interpolation (FRI) methods like FIVE REF _Ref385680017 \r \h . The application of FRI methods fits well the conceptually sparse rulebased (‘incomplete’) structure of the existing descriptive verbal ethological models.
The main benefit of the FRI method adaptation in ethological model implementation is the fact, that it has a simple rulebased knowledge representation format. Because of this, even after numerical optimization of the model, the rules remain ‘human readable’, and helps the formal validation of the model by the ethological experts. On the other side due to the FRI base, the model has still low computational demand and fits directly the requirements of the embedded implementations.
For implementing ethologically inspired HRI models the classical behaviourbased control structure is suggested, described in the followings.
The main building blocks of Behaviourbased Control (BBC, a comprehensive overview can be found in REF _Ref358152640 \r \h ) are the behaviour components themselves. The behaviour components can be copies of typical human or animal behaviors, or can be artificially created behaviours. The actual behaviour response of the system can be formed as one of the existing behaviour component, which gives the best match to the actual situation, or a fusion of the behaviour components based on their suitability for the actual situation. Encoding the behaviour components can be realized with e.g. simple reflexive agents, which assign an output response to each input situation.
In case when more than one behaviour components are simultaneously competing for the same ‘actuator’ the aggregation or selection of the behaviour components is necessary. Handling multiple behaviour components in a BBC system can be done in two ways. The first is the competitive way, when the behaviour components are assigned with priorities, and the behaviour component with the highest priority takes precedence, while the behaviours with lower priorities are simply ignored. The second is the cooperative way when the outputs are fusioned based on various criteria.
This structure has two main tasks. The first is a decision of which behaviour is needed in an actual situation, and the levels of their necessities in case of behaviour fusion. The second is the way of the behaviour fusion. The first task can be viewed as an actual system state approximation, where the actual system state is the set of the necessities of the known behaviours needed for handling the actual situation. The second is the fusion of the known behaviours based on these necessities. In case of the suggested fuzzy behaviour based control structures both tasks are solved by FRI systems. If the behaviours are also implemented on FRI models, the behaviours together with the behaviour fusion modules form a hierarchical FRI system.
The application of FRI methods in direct fuzzy logic control systems gives a simplified way for constructing the fuzzy rule base. The rule base of a fuzzy interpolationbased model, is not necessarily complete, it could contain the most significant fuzzy rules only without risking the chance of having no conclusion for some of the observations. The model always gives a usable conclusion even if there are no rules defined for the actual observations. In other words, during the construction of the fuzzy model, it is enough to concentrate on the main actions (rules could be deduced from the others could be intentionally left out from the model, radically simplifying the rule base creation, saving time consuming work.).
For demonstrating the main benefits of the FRI model in behaviourbased control, here the focus is only on the many cases most heuristic part of the structure, on the behaviour coordination. The task of behaviour coordination is to determine the necessities of the known behaviours needed for handling the actual situation.
In the suggested behaviourbased control structure for achieving the decision related to the relevance of the behaviour components this work adapts the concept of the finite state fuzzy automaton REF _Ref361677815 \r \h \* MERGEFORMAT (see Fig. 61 and the next chapter for more details), where the state of the finite state fuzzy automaton is the set of the suitabilities of the component behaviours. This solution is based on the heuristic, that the necessities of the known behaviours for handling a given situation can be approximated by their suitability. And the suitability of a given behaviour in an actual situation can be approximated by the similarity of the situation and the prerequisites of the behaviour. (Where the prerequisites of the behaviour is the description of the situations where the behaviour is applicable). This case instead of determining the necessities of the known behaviours, the similarities of the actual situation to the prerequisites of all the known behaviours can be approximated.
The system consists (see Fig. 61) of not only the fuzzy automaton but the behaviour fusion component and various component behaviours implemented on fuzzy logic controllers (FLC). The state variables characterize the relevance of the component behaviours. The statetransition rule base of the automaton applies fuzzy rule interpolation for statetransition evaluation. The previous states are fed back to the automaton and the conclusion given by the automaton is used as weights in the behaviour fusion component for determining the final conclusion of the BBC. The conclusion of the fuzzy automaton will be the new system state for the next step of the behaviour fusion. The behaviour fusion component can be also implemented by fuzzy reasoning (e.g. using fuzzy rule interpolation), or simply as a weighted sum. The symptom evaluation (from the terminology of fault classification) components provide a kind of preprocessing for the automaton based on the gathered observations. These components also can employ FRI techniques.
Therefore the first step of the system state approximation is determining the similarities of the actual situation to the prerequisites of all the known behaviours. The task of symptom evaluation is basically a series of similarity checking between an actual symptom (observations of the actual situation) and a series of known symptoms (the prerequisites – symptom patterns – of the behaviour components). These symptom patterns are characterizing the systems states where the corresponding behaviours are valid. Based on these patterns, the evaluation of the actual symptom is done by calculating the similarity values of the actual symptom (representing the actual situation) to all the known symptoms patterns (the prerequisites of the known behaviours). There are many existing methods for fuzzy logic symptom evaluation. For example fuzzy classification methods e.g. the Fuzzy cMeans fuzzy clustering algorithm REF _Ref361758798 \r \h can be adopted, where the known symptoms patterns are the cluster centers, and the similarities of the actual symptom to them can be fetched from the fuzzy partition matrix. On the other hand, having a simple situation, the fuzzy logic symptom evaluation could be an FRI model too.
One of the main difficulties of the system state approximation is the fact, that most cases the symptoms of the prerequisites of the known behaviours are strongly dependent on the actual behaviour of the system. Each of the behaviours has its own symptom structure. In other words, for the proper system state approximation the approximated system state is needed itself. A very simple way of solving this difficulty is the adaptation of fuzzy automaton. This case the state vector of the automaton is the approximated system state, and the statetransitions are driven by fuzzy reasoning (‘Fuzzy Reasoning (statetransition rule base)’ on Fig. 61), as a decision based on the previous actual state (the previous iteration step of the approximation) and the results of the symptom evaluation.
As mentioned previously, the structure of the proposed model follows the behaviorbased control concept REF _Ref358152640 \r \h , i.e. the actual behavior of the system is formed as a fusion of the known component behaviors appeared to be the most appropriate in the actual situation. For behavior coordination in the applied model the concept of the ‘Fuzzy Automaton’ is adapted. Numerous versions and understanding of the fuzzy automaton can be found in the literature (a good overview can be found in REF _Ref286655753 \r \h ). The most common definition of Fuzzy Finitestate Automaton (FFA, summarized in REF _Ref286655753 \r \h ) is defined by a tuple (according to REF _Ref363657503 \r \h , REF _Ref286655753 \r \h and REF _Ref288780404 \r \h ):
$$\tilde{F}=\left(Q,\Sigma ,\delta ,R,Z,\omega \right)$$, 
(6.1) 
where Q is a finite set of states, Q={q1,q2,...,qn}, Σ is a finite set of input symbols, Σ={a1,a2,...,am}, $$R\in Q$$ is the (possibly fuzzy) start state of $$\tilde{F}$$, Z is a finite set of output symbols, Z={b1,b2,...,bn}, $$\delta :Q\times \Sigma \times Q\to \left[0,1\right]$$ is the fuzzy transition function which is used to map a state (current state) into another state (next state) upon an input symbol, attributing a value in the fuzzy interval [0,1] to the next state, and $$\omega :Q\to Z$$ is the output function which is used to map a (fuzzy) state to the output.
Extending the concept of FFA from finite set of input symbols to finite dimensional input values turns to the following:
$$\tilde{F}=\left(S,X,\delta ,P,Y,\omega \right)$$, 
(6.2) 
where S is a finite set of fuzzy states, $$S=\left\{{\mu}_{s1},{\mu}_{s2},\mathrm{...},{\mu}_{sn}\right\}$$, X is a finite dimensional input vector, $$X=\left\{{x}_{1},{x}_{2},\mathrm{...},{x}_{m}\right\}$$, $$P\in S$$ is the fuzzy start state of $$\tilde{F}$$, Y is a finite dimensional output vector, $$Y=\left\{{y}_{1},{y}_{2},\mathrm{...},{y}_{l}\right\}$$, $$\delta :S\times X\to S$$ is the fuzzy statetransition function which is used to map the current fuzzy state into the next fuzzy state upon an input value, and $$\omega :S\times X\to Y$$ is the output function which is used to map the fuzzy state and input to the output value. See e.g. on Fig. 62.
In case of fuzzy rule based representation of the statetransition function $$\delta :S\times X\to S$$, the rules have $$n+m$$ dimensional antecedent space, and n dimensional consequent space. Applying classical fuzzy reasoning methods, the complete statetransition rule base size can be approximated by the following formula:
$$\leftR\right=n\cdot {i}^{n}\cdot {j}^{m}$$, 
(6.3) 
where n is the length of the fuzzy state vector S, m is the input dimension, i is the number of the term sets in each dimensions of the state vector, and j is the number of the term sets in each dimensions of the input vector.
According to (6.3) the statetransition rulebase size is exponential with the length of the fuzzy state vector and the number of the input dimensions. Applying FRI methods for the statetransition function fuzzy model can dramatically reduce the rule base size. See e.g. REF _Ref358152171 \r \h , where the originally exponential sized statetransition rule base of a simple heuristical model turned to be polynomial thanks to the FRI.
In case of direct application of the suggested FRI based Fuzzy Automaton for behaviorbased control structures, the output function $$\omega :S\times X\to Y$$ can be decomposed to parallel component behaviors and an independent behavior fusion. In this case the structure of the above introduced fuzzy automaton can turn to a very similar form as it is expected in behaviorbased control (see Fig. 63 and Fig. 61). Some more details of the model implementation can be found in REF _Ref366247252 \r \h , REF _Ref366247254 \r \h and REF _Ref366247256 \r \h .
The ethological test procedure presented here has been developed for studying the affiliative relationship between a dog and its owner. The procedure is made up from seven episodes, each lasting 2 minutes, where the dog is in different situations: first with the owner, then with a stranger, or alone (according to a predefined protocol). Through the test, the dog’s behavior is evaluated mainly focusing on dogs’ responses related to their proximity seeking with the owner REF _Ref307389263 \r \h .
In the first episode of the test, the dog and the owner are in the test room. First the owner is passive, and then he/she stimulates playing. The second episode is where the stranger comes into the room and starts to stimulate play with the dog. Then the owner leaves the room, so in the third episode the dog is separated from the owner; the stranger tries to play with the dog then sits for a while and offers petting. The owner comes back in the beginning of the fourth episode, this is the first reunion. Meanwhile the stranger leaves the room and the dog is with the owner for two minutes. Then the owner also leaves, so in the fifth episode the dog is alone in the room. In the next episode the stranger returns and tries to stimulate playing or comfort the dog by petting it. The returning of the owner marks the beginning of the last episode. The stranger leaves the room, the owner interacts with the dog for two minutes and the test ends.
During evaluation, ethologists record predefined behavioral variables for describing the dogs’ responses related to both the owner and the stranger and they analyze data to reveal significant differences in behaviors showed towards the two persons.
This complex ethological model has been implemented based on the presented structure. The agent controlled by the model is the representation of the dog, other participants in the test are behaving according to a programmed scenario or are controlled by a human operator. This agent can execute a set of behaviours (moving towards specified objects, pick up or drop the toy object, wag its tail, etc.), some of them can be active and executed in parallel in the same time, but most of them are blocking each other, this latter situation is handled by the behaviour fusion component.
The model is basically designed for simulating the dog’s behaviour in the test described in REF _Ref307389263 \r \h \* MERGEFORMAT , but the model is flexible enough to react in an ethologically correct way for arbitrary situations. A simplified block diagram of the structure of a possible simulation framework is shown in Fig. 64.
A screenshot of a possible simulation framework is shown in Fig. 65, where a room can be seen viewed from above, where the interactions take place. The humans are symbolized with squares, the blue square represents the owner of the dog, the magenta square represents a human unfamiliar (stranger) to the dog. The dog is represented by two circles, the large circle is the body of the dog, the smaller circle is the head of the dog, which is useful for visualizing the direction of the dog A thin green line on the dog’s body represents the tail of dog, which can change its length and also its angle (tail wagging). The color of the dog is dynamically changing showing the actual anxiety level of the dog. The room has a door where the human participants can leave or enter the room, the dog cannot go outside. Also a toy object is present (small blue circle, with a hole inside), which can be picked up and dropped by all the participants.
In the followings some example behaviours from the system and their definitions are presented.
The first example behaviour set is built upon two separate component behaviours, namely ‘DogExploresTheRoom’ and ‘DogGoesToDoor’. The ‘DogExploresTheRoom’ is an exploration dog activity, in which the dog ‘looks around’ in an unknown environment (see the track marked with white in Fig. 66). The ‘DogGoesToDoor’ is a simple dog activity, in which the dog goes to the door, and than stands (sits) in front of it (waiting for its owner to show up again). The definition of the related statetransition FRI rules of the fuzzy automaton acts as behaviour coordination in this example.
The states concerned are the following:
‘Hidden’ states, which have no direct task in controlling any of the above mentioned behaviours, but has an importance in the statetransition rule base: ‘Missing the owner mood of the Dog’ (DogMissTheOwner) and ‘Anxiety level of the Dog’ (DogAnxietyLevel).
‘Normal’ states, which have a direct task in controlling the corresponding ‘DogExploresTheRoom’ and ‘DogGoesToDoor’ behaviours: ‘Going to the door mood of the Dog’ (DogGoesToDoor) and ‘Room exploration mood of the Dog’ (DogExploresTheRoom).
As a possible rule base structure for the statetransitions of the fuzzy automaton, the following is defined (considering only the states and behaviours for this example):
Statetransition rules related to the missing the owner mood (state) of the Dog:
If OwnerInTheRoom=False Then DogMissTheOwner=Increasing
If OwnerInTheRoom=True Then DogMissTheOwner=Decreasing
Statetransition rules related to the anxiety level (state) of the Dog:
If OwnerToDogDistance=Small And Human2ToDogDistance=High Then DogAnxietyLevel=Decreasing
If OwnerToDogDistance=High And Human2ToDogDistance=LowThen DogAnxietyLevel=Increasing
Statetransition rules related to the going to the door mood (state) of the Dog:
If OwnerInTheRoom=False And DogMissTheOwner=High Then DogGoesToDoor=High
If OwnerInTheRoom=True Then DogGoesToDoor=Low
Statetransition rules related to the room exploration mood (state) of the Dog:
If DogAnxietyLevel=Low And OwnerStartsGame=False And ThePlaceIsUnknown=High Then DogExploresTheRoom=High
If ThePlaceIsUnknown=Low Then DogExploresTheRoom=Low
If DogAnxietyLevel=High Then DogExploresTheRoom=Low
The text in italic represent the linguistic terms (fuzzy sets) of the FRI rule base.
Also it should be noted that the rule base is sparse, containing the main statetransition FRI rules only.
A sample run of the example is introduced in Fig. 66 and in Fig. 67. At the beginning of the scene, the owner is in the room and the stranger is outside. The place is unknown for the dog (‘ThePlaceIsUnknown=High’ in the rule base). According to the above rule base, the dog starts to explore the room (see Fig. 66). After a little while the owner of the dog leaves the room, and then the stranger enters and stays inside (dashed white tracks in Fig. 67). As an effect of the changes (according to the above statetransition rule base), the anxiety level of the dog and the ‘Missing the owner’ state is increasing and as a result, the dog goes to and stays at the door (white track in Fig. 67), where its owner has left the room. See the state changes in Fig. 68.
Fig. 68 shows the values of four state variables on a time scale (iteration number). Two immediate changes can be seen which are both caused by events related to the movement of the owner. First when the dog realizes that the owner is heading for the door (around the 200th iteration) the exploration rate drops rapidly and the rate of the ‘DogGoesToOwner’ behaviour component is high, till the owner finally leaves the room (around the 250th iteration). When the owner had left the room, the‘DogGoesToDoor’ behaviour component will be active, causing the value of the ‘Missing the owner’ state to increase. At the same time the anxiety level of the dog also increases with the leaving of the owner.
In the second example the ‘DogGoesToOwner’ behaviour will be presented in details from another point of view than the previous example. As its name suggests, this behaviour component is responsible for determining the need to go to the owner for the dog. The description of this behaviour component is more complex than the rule base in the previous example. The complete rule base for the ‘DogGoesToOwner’ behaviour is shown in REF _Ref364164389 \h , where the last column means the consequent part, all the other columns are antecedent dimensions (the ‘x’ value in the rule description means that the value of that antecedent is omitted while reasoning – does not have effect in the rule). The explanation of the terms used in the rule base is the following (‘observation’ in this case means that the value is gathered (measured) directly from the environment, ‘previous state’ means that the value was calculated in the previous iteration as a conclusion of a rule base):
dgtd – previous state – dog goes to door rate (zerolarge) – see Fig. 612 for the corresponding fuzzy partition
dgto – previous state – dog goes to owner rate (zerolarge) – see Fig. 612 for the corresponding fuzzy partition
oir – observation – owner is inside (truefalse) – see Fig. 69 for the corresponding fuzzy partition
ddo – observation – distance between dog and owner (zerolarge) – see Fig. 610 for the corresponding fuzzy partition
dgtt – previous state – dog goes to toy rate (zerolarge) – see Fig. 69 for the corresponding fuzzy partition
dgro – previous state – dog greets owner rate (zerolarge) – see Fig. 69 for the corresponding fuzzy partition
dpmo – previous state – dog’s playing mood rate with the owner (zerolarge) – see Fig. 69 for the corresponding fuzzy partition
dpms – previous state – dog’s playing mood rate with the stranger (zerolarge) – see Fig. 69 for the corresponding fuzzy partition
danl – previous state – dog’s anxiety level (zerolarge) – see Fig. 611 for the corresponding fuzzy partition
ogo – observation – owner is going outside (truefalse) – see Fig. 69 for the corresponding fuzzy partition
dgto (consequent) – next state – dog goes to owner rate (zerolarge) (output)
# 
dgtd 
dgto 
oir 
ddo 
dgtt 
dgro 
dpmo 
dpms 
danl 
ogo 
dgto 
1 
dgtdl 
x 
oirt 
x 
x 
x 
x 
x 
x 
x 
dgtoz 
2 
dgtdz 
x 
oirt 
x 
dgttz 
dgrol 
x 
dpmsz 
x 
ogof 
dgtol 
3 
dgtdz 
x 
oirt 
x 
dgttz 
x 
x 
dpmsz 
danll 
ogof 
dgtol 
4 
dgtdz 
x 
oirt 
x 
dgttz 
x 
dpmol 
x 
x 
ogof 
dgtol 
5 
dgtdz 
x 
oirt 
x 
x 
x 
x 
x 
x 
ogot 
dgtol 
6 
dgtdz 
x 
oirt 
x 
x 
dgroz 
dpmoz 
x 
danlz 
ogof 
dgtoz 
7 
x 
x 
oirf 
x 
x 
dgroz 
x 
x 
x 
ogof 
dgtoz 
8 
dgtdz 
x 
x 
x 
dgtth 
dgroz 
x 
dpmsz 
x 
ogof 
dgtoz 
9 
dgtdz 
x 
x 
x 
x 
dgroz 
x 
dpmsl 
x 
ogof 
dgtoz 
10 
dgtdz 
dgtol 
oirt 
ddoz 
dgttz 
dgroz 
dpmoz 
dpmsz 
x 
ogof 
dgtoz 
11 
dgtdz 
dgtol 
oirt 
ddol 
dgttz 
x 
x 
dpmsz 
x 
x 
dgtol 
The rules can be interpreted as the following textual description, in the corresponding order:
dog goes to door do not go to owner
dog should greet the owner go to owner
dog is nervous go to owner
dog's playing mood with owner is high go to owner
owner is going out of the room go to owner (follow the owner)
dog is calm and dog is not playing and not greeting do not go to owner
owner outside do not go to owner (can’t go to the owner)
dog is going to the toy do not go to owner
dog's playing mood with stranger is high do not go to owner
already going to owner and owner is near do not go to owner (arrived at the owner)
already going to owner and owner is far going to owner (keep on going)
The presented rule base is suitable to define a complex behaviour component with only eleven rules in spite of the relatively high antecedent dimension count (ten variables) thanks to the usage of FRI. In Fig. 69 through Fig. 612 the fuzzy partitions used for the various antecedents are presented. From top to bottom the curves in the mentioned figures show the membership functions, the scaling functions REF _Ref385687747 \r \h and the reconstructed membership functions (based on the scaling function). As it can be seen most of the fuzzy partitions are simple (six of the nine antecedents use the same simple fuzzy partition), consisting of only two triangular fuzzy sets with their cores at 0 and 1, and steepness of 1 on the right and the left side respectively. This is true also for the other rule bases in the model, most of the antecedent variables are defined by fuzzy partitions exactly like the one shown in Fig. 69.
Most of the behaviour components defined in the system are responsible for coordinating the movement (heading direction) of the dog, which must be aggregated by some kind of behaviour fusion. The simulation uses a simple weighted sum of the currently required behaviour components for determining the movement vector of the agent. Other behaviour components can be executed in parallel with movement related components. Also there are rule bases which are responsible for calculating the rate of behaviour components which are not directly executed, but instead their values are used by other rule bases as input values (in a hierarchical manner). E.g. the ‘DogGreetsOwner’ component is not executed directly, as shown in REF _Ref364164389 \h \* MERGEFORMAT . the consequent of ‘DogGreetsOwner’ is used as an input value in the rule base of the ‘DogGoesToOwner’ behaviour component, hence the actual output behaviour will be triggered by the activation of the ‘DogGoesToOwner’ behaviour component.
The model can be customized for different types of dogs. The system provides three factors for customization (‘Parameters’ in Fig. 64), which can be set in the interval [0,1]: ‘Anxiety’, ‘Acceptance’, and ‘Attachment’. The ‘Anxiety’ parameter defines the level of anxiety of the dog on a scale between calm and nervous, ‘Acceptance’ defines the level of the dog’s acceptance towards the stranger (between friendly and unfriendly), ‘Attachment’ defines the level of attachment of the dog to its owner (between weak and strong attachment). In fact these parameters are not directly used in the behaviour description rule bases. Secondary variables are calculated first based on the three parameters. Then these secondary parameters are used in the corresponding fuzzy rule bases. The three external parameters (‘Anxiety’, ‘Attachment’, ‘Acceptance’) mentioned earlier are used as antecedents in various rule bases, which have the task of determining the values of secondary parameters. These secondary parameters are then directly used as antecedents in the rule bases of the fuzzy automaton driving the simulation. These calculated secondary parameters are the following:
Play without the owner (when the owner is outside)
Do not play with the stranger (even when it could be possible)
Run in circles (caused by anxiety) when stranger is inside
Run in circles (caused by anxiety) when the dog is alone
Base rate of greeting the stranger
Base rate of greeting the owner
Base rate of following the stranger, when he/she is leaving the room
Base rate of greeting the owner, when he/she is leaving the room
Base rate of stress (anxiety)
Base rate of standing at the door
Base rate of standing at the door, even when the owner is inside
Base rate of passivity
This hierarchical strategy is useful for minimizing the input dimensions of the rule bases (one input variable is used instead of three input values in this case), hence fewer rules are required. The values of the secondary parameters are also calculated using fuzzy rule interpolation, each secondary parameter having its own rule base for determining the exact value based on the three input parameters. These are calculated at the time of initialization before starting the simulation, but can be also adjusted while the simulation is running, allowing the operator to switch between different types of dogs in realtime.
A distinct, but important part of the framework is the so called observer module (see Fig. 64), which has the task of evaluating the model (the correctness of the constructed rule bases) itself. The observer module only gets information from the environment (just what an outsider would see), no data about the inner states of the fuzzy automaton or behaviour weights are supplied to the observer. Based on these observations the observer module is able to determine what kind of activity is going on in the simulation. It can distinguish among ‘playing’, ‘exploring’, ‘standing at door’ and ‘passive’ states. If the dog is in contact (close the human and looking at the human) with the owner or the stranger, that is also measured and logged. Furthermore a special scoring system developed by ethologists used for evaluating the separation and reunion episodes (human leaves dog / human comes back) is also implemented in the observer module. Also the overall time spent in the various states along the different episodes is measured. A summary of the measurements and the scores is calculated at the end of the simulation, which can be directly used by ethologist experts to evaluate the simulated dog in the same manner as they would with real dogs.
[1] 
D. Calisi, A. Censi, L. Iocchi és D. Nardi, „OpenRDK: a modular framework for robotic software development,” in Intelligent Robots and Systems, 2008. IROS 2008. IEEE/RSJ International Conference on, 2008. 
[2] 

[3] 

[4] 
„OpenRTMaist robot middleware official web page,” [Online]. 
[5] 
N. Ando, S. Kurihara, G. Biggs, T. Sakamoto, H. Nakamoto és T. Kotoku, „Software deployment infrastructure for component based rtsystems,” Journal of Robotics and Mechatronics, %1. kötet23, %1. szám3, 2011. 
[6] 
N. Ando, T. Suehiro és T. Kotoku, „A software platform for component based rtsystem development: Openrtmaist,” in Simulation, Modeling, and Programming for Autonomous Robots, Springer, 2008. 
[7] 
N. Ando, T. Suehiro, K. Kitagaki, T. Kotoku és W.K. Yoon, „RTmiddleware: distributed component middleware for RT (robot technology),” in Intelligent Robots and Systems, 2005.(IROS 2005). 2005 IEEE/RSJ International Conference on, 2005. 
[8] 

[9] 
M. Quigley, K. Conley, B. Gerkey, J. Faust, T. Foote, J. Leibs, R. Wheeler és A. Y. Ng, „ROS: an opensource Robot Operating System,” in ICRA workshop on open source software, 2009. 
[10] 
K. Saito, K. Kamiyama, T. Ohmae and T. Matsuda, "A microprocessorcontrolled speed regulator with instantaneous speed estimation for motor drives," IEEE Trans. Ind. Electron., vol. 35, no. 1, pp. 9599, Feb. 1988. 
[11] 
A. G. Filippov, "Application of the theory of differential equations with discontinuous righthand sides to nonlinear problems in autimatic control," in 1st IFA congress, 1960, pp. 923925. 
[12] 
A. G. Filippov, "Differential equations with discontinuous righthand side," Ann. Math Soc. Transl., vol. 42, pp. 199231, 1964. 
[13] 
Van, Doren and Vance J., "Loop Tuning Fundamentals," Control Engineering. Red Business Information, July 1, 2003. 
[14] 
C. Chan, S. Hua and Z. HongYue, "Application of fully decoupled parity equation in fault detection and identification of dcmotors," IEEE Trans. Ind. Electron., vol. 53, no. 4, pp. 12771284, June 2006. 
[15] 
F. Betin, A. Sivert, A. Yazidi and G.A. Capolino, "Determination of scaling factors for fuzzy logic control using the slidingmode approach: Application to control of a dc machine drive," IEEE Trans. Ind. Electron., vol. 54, no. 1, pp. 296309, Feb. 2007. 
[16] 
J. Moreno, M. Ortuzar and J. Dixon, "Energymanagement system for a hybrid electric vehicle, using ultracapacitors and neural networks," IEEE Trans. Ind. Electron., vol. 53, no. 2, pp. 614623, Apr. 2006. 
[17] 
R.E. Precup, S. Preitl and P. Korondi, "Fuzzy controllers with maximum sensitivity for servosystems," IEEE Trans. Ind. Electron., vol. 54, no. 3, pp. 12981310, Apr. 2007. 
[18] 
V. Utkin and K. Young, "Methods for constructing discountnuous planes in multidimensional variable structure systems," Automat. Remote Control, vol. 31, no. 10, pp. 14661470, Oct. 1978. 
[19] 
K. Abidi and A. Sabanovic, "Slidingmode control for high precision motion of a piezostage," IEEE Trans. Ind. Electron., vol. 54, no. 1, pp. 629637, Feb. 2007. 
[20] 
F.J. Lin and P.H. Shen, "Robust fuzzy neural network slidingmode control for twoaxis motion control system," IEEE Trans. Ind. Electron., vol. 53, no. 4, pp. 12091225, June 2006. 
[21] 
C.L. Hwang, L.J. Chang and Y.S. Yu, "Networkbased fuzzy decentralized slidingmode control for catlike mobile robots," IEEE Trans. Ind. Electron., vol. 54, no. 1, pp. 574585, Feb. 2007. 
[22] 
M. Boussak and K. Jarray, "A highperformance sensorless indirect stator flux orientation control of industion motor drive," IEEE Trans. Ind. Electron., vol. 53, no. 1, pp. 614623, Feb. 2006. 
[23] 
D. C. Biles And P. A. Binding, „On Carath_Eodory's Conditions For The Initial Value Problem,” Proceedings Of The American Mathematical Society, %1. kötet125, %1. szám5, pp. 1371{1376 S 00029939(97)039427 , 1997. 
[24] 
Filippov, A.G., „Application of the Theory of Differential Equations with Discontinuous Righthand Sides to Nonlinear Problems in Automatic Control,” in 1st IFAC Congr., pp. 923925, Moscow, 1960. 
[25] 
Filippov, A.G., „Differential Equations with Discontinuous Righthand Side,” Ann. Math Soc. Transl., %1. kötet42, pp. 199231, 1964. 
[26] 
Harashima, F.; Ueshiba, T.; Hashimoto H., „Sliding Mode Control for Robotic Manipulators",” in 2nd Eur. Conf. On Power Electronics, Proc., pp 251256, Grenoble, 1987. 
[27] 
P. Korondi, L. Nagy, G. Németh, „Control of a Three Phase UPS Inverter with Unballanced and Nonlinear Load,” in EPE'91 4th European Conference on PowerElectronics, Proceedings vol. 3. pp. 3180184, Firenze, 1991. 
[28] 
P. Korondi, H. Hashimoto, „Park Vector Based Sliding Mode Control K.D.Young, Ü. Özgüner (editors) Variable Structure System, Robust and Nonlinear Control.ISBN: 1852331976,” SpringerVerlag, %1. kötet197, %1. szám6, 1999. 
[29] 
P.Korondi, H.Hashimoto, „Sliding Mode Design for Motion Control,” in Studies in Applied Electromagnetics and Mechanics, ISBN 90 5199 487 7, IOS Press 2000.8, %1. kötet16, 2000. 
[30] 
Satoshi Suzuki, Yaodong Pan, Katsuhisa Furuta, and Shoshiro Hatakeyama, „Invariant Sliding Sector for Variable Structure Control,” Asian Journal of Control, %1. kötet7, %1. szám2, pp. 124134, 2005. 
[31] 
P. Korondi, JX. Xu, H. Hashimoto, „Sector Sliding Mode Controller for Motion Control,” in 8th Conference on Power Electronics and Motion Control Vol. 5, pp.52545259. , 1998. 
[32] 
Xu JX, Lee TH, Wang M, „Design of variable structure controllers with continuous switching control,” INTERNATIONAL JOURNAL OF CONTROL, %1. kötet65, %1. szám3, pp. 409431, 1996. 
[33] 
Utkin, V. I., „Variable Structure Control Optimization,” SpringerVerlag, 1992. 
[34] 
Young, K. D.; Kokotovič, P. V.; Utkin, V. I., „A Singular Perturbation Analysis of HighGain Feedback Systems,” IEEE Trans. on Automatic Control, %1. kötet, összesen: %2AC22, %1. szám6, pp. 931938, 1977. 
[35] 
Furuta, K., „Sliding Mode Control of a Discretee System,” System Control Letters, %1. kötet14, pp. 145152, 1990. 
[36] 
Drakunov, S. V.; Utkin, V. I., „Sliding Mode in Dynamics Systems,” International Journal of Control, %1. kötet55, pp. 10291037, 1992. 
[37] 
Young, K. D., „Controller Design for Manipulator using Theory of Variable Structure Systems,” IEEE Trans. on System, Man, and Cybernetics, %1. kötet, összesen: %2Vol SMC8, pp. 101109, 1978. 
[38] 
Hashimoto H.; Maruyama, K.; Harashima, F.: ", „Microprocessor Based Robot Manipulator Control with Sliding Mode",” IEEE Trans. On Industrial Electronics, %1. kötet34, %1. szám1, pp. 1118, 1987. 
[39] 
Sabanovics, A.; Izosimov, D. B., „Application of Sliding Modes to Induction Motor,” IEEE Trans. On Industrial Appl., %1. kötet17, %1. szám1, p. 4149, 1981. 
[40] 
Vittek, J., Dodds, S. J., „Forced Dynamics Control of Electric Drive,” EDIS – Publishing Centre of Zilina University, ISBN 8080700877, Zilina, 2003. 
[41] 
Utkin, V.I.; „Sabanovic, A., „Sliding modes applications in power electronics and motion control systems,” Proceedings of the IEEE International Symposium Industrial Electronics, %1. kötetVolume of tutorials, pp. TU22  TU31, 1999. 
[42] 
Sabanovic, A, „Sliding modes in power electronics and motion control systems,” in The 29th Annual Conference of the IEEE Industrial Electronics Society, IECON '03, Vol. 1, Page(s):997  1002, 2003. 
[43] 
SiewChong Tan; Lai, Y.M.; Tse, C.K., „An Evaluation of the Practicality of Sliding Mode Controllers in DCDC Converters and Their General Design Issues,” in 37th IEEE Power Electronics Specialists Conference, PESC '06. Page(s):1  7, 2006. 
[44] 
Slotine,J.J., „Sliding Controller Design for NonLinear Systems,” Int. Journal of Control, %1. kötet40, %1. szám2, pp. 421434, 1984. 
[45] 
Sabanovic A., N. Sabanovic. K. Jezernik, K. Wada, „Chattering Free Sliding Modes,” The Third Worksop on Variable Structure Systems and Lyaponov Design , Napoly, Italy, 1994. 
[46] 
Korondi, H.Hashimoto, V.Utkin , „Direct Torsion Control of Flexible Shaft based on an Observer Based Discretetime Sliding Mode,” IEEE Trans. on Industrial Electronics, %1. szám2, pp. 291296, 1998. 
[47] 
Boiko, I.; Fridman, „ L Frequency Domain Input–Output Analysis of SlidingMode Observers,” IEEE Transactions on Automatic Control, %1. kötet51, %1. szám11, pp. 17981803, 2006. 
[48] 
Comanescu, M.; Xu, L., „Slidingmode MRAS speed estimators for sensorless vector control of induction Machine,” IEEE Transactions on Industrial Electronics, %1. kötet53, %1. szám1, p. 146 – 153 , 2005. 
[49] 
Furuta.K. , Y.Pan, „Variable structure control with sliding sector,” Automatica, %1. kötet36, pp. 211228, 2000. 
[50] 
Suzuki S, Pan Y, Furuta K, „VScontrol with timevarying sliding sector  Design and application to pendulum,” ASIAN JOURNAL OF CONTROL, %1. kötet6, %1. szám3, pp. 307316, 2004. 
[51] 
Korondi Péter, „Tensor Product Model Transformationbased Sliding Surface Design,” Acta Polytechnica Hungarica, %1. kötet3, %1. szám4, pp. 2336, 2006. 
[52] 
Vadim Utkin, Hoon Lee, „The Chattering Analysis,” EPEPEMC Proceedings 36, 2006. 
[53] 
Koshkouei, A.J.; Zinober, A.S.I., „Robust frequency shaping sliding mode control” Control Theory and Applications,” IEE Proceedings, %1. kötet147, %1. szám3, p. 312 – 320, 2000. 
[54] 
HASHIMOTO, H., and KONNO, Y., „‘Sliding surface design in thefrequency domain’, in ‘Variable Structure and Lyapunov control’,ZINOBER, A.S.I. (Ed.) (),,” SpringerVerlag, Berlin, pp. 7584, 1994. 
[55] 
Koshkouei, A.J.; Zinober, A.S.I., „Adaptive backstepping control of nonlinear systems with unmatched uncertainty,” in Proceedings of the 39th IEEE Conference on Decision and Control, pp. 4765 – 4770, 2000 . 
[56] 
Kaynak, O.; Erbatur, K.; Ertugnrl, M., „The fusion of computationally intelligent methodologies and slidingmode controlA survey,” IEEE Transactions on Industrial Electronics, %1. kötet48, %1. szám1, p. 4 – 17, 2001. 
[57] 
Lin, F.J.; Shen, P., „H Robust Fuzzy Neural Network SlidingMode Control for Two,” Axis Motion Control System IEEE Transactions on Industrial Electronics, %1. kötet53, %1. szám4, p. 1209 – 1225 , 2006. 