Theory of functional systems
The theory of functional systems is a model that describes the structure of conduct, which was established by Russian and Soviet biologist and physiologist Pyotr Anokhin. Overview
Functional systems were put forward by Anokhin as an alternative to the predominant concept of reflexes. Contrary to reflexes, the endpoints of functional systems are not actions themselves but adaptive results of these actions. In contrast to reflexes, which are based on linear spread of information from receptors to executive organs through the central nervous system, functional systems are self-organizing non-linear systems composed of synchronized distributed elements. "The principle of functional systems": association of private mechanisms of the body in a holistic system of adaptive behavioral act, the establishment of "integrative unity". There are two types of functional systems: 
 System of the first type provide homeostasis due to internal (existing) resources of the body, inside its boundaries (e.g. blood pressure). System of a second type supports homeostasis due to a change of behavior, interaction with the outside world and are the basis of different types of behavior. Stages of the behavioral act 

Afferent synthesis
Any excitement in the central nervous system there is in interaction with other excitations: the brain analyzes these excitations. Synthesis determines the following factors: 
Motivation 
Pad afferentation (excitation caused by conditioned and unconditioned stimuli) 
Situational afferentation (arousal from familiar surroundings, causing a reflex, and dynamic stereotypes) 
Memory (of species and individual) 
Decision-making 
 The formation of action result acceptor (creating the ideal image and its retention goals, presumably, at the physiological level is circulating in the ring interneuron excitation) 
Efferent synthesis (or the stage of the program, integration of somatic and autonomic excitations in a single behavioral act. The action is formed, but is not manifested externally) 
Action (program execution behavior) 
Evaluation result of the action 
At this stage, comparison of the actual running of the ideal image created during the formation of acceptor result of the action (the reverse occurs afferentation) based on a comparison of the action, or adjusted, or terminated. Meeting the needs (authorizing termination of stage) 

Choice of targets and methods of achieving them are the key factors that regulate behavior. According to Anokhin, in the structure of the behavioral act afferent feedback compared with the acceptor of the result gives a positive or negative situational emotions affect the correction or termination of action (another type of emotion, leading emotions, are associated with satisfaction or dissatisfaction needs in general, with the formation of the target). In addition, the behavior affect the memories of positive and negative emotions. In general, behavioral act is characterized by meaningful and active role of the subject. References

Literature  
 N. N. Danilov, A. L. Krylov Physiology of higher nervous activity. - Rostov-na-Donu: Feniks, 2005. - S. 239-251. - 478. - (Textbooks MSU). - 5000 copies. -  

Physiology
Homeostasis