Indeed, humans typically spend a significant portion of their daily lives in bed. This time becomes even longer in cases where the human is unwell. This is particularly the case for sick or older people, who spend even more time in bed. Their physical activity or inactivity patterns provide useful signatures that reflect the “state” of the person under observation. In the frame of activity monitoring endeavors, behavioral situations that are abnormal (these situations are more/extremely rare within the observation time window) are the ones that are of the highest interest when compared to behavioral situations that are rather normal (these ones occupy most of the observation time window).
Monitoring humans in bed, e.g., in the context of “sleep monitoring”, is very important for a series of human-specific health conditions. For elderly people, for example, inadequate and irregular sleep (which can be inferred from physical movements on the bed while sleeping) is often related to serious diseases such as depression and diabetes. Indeed, in several cases, it is necessary to monitor the body positions and movements made while sleeping (or just while lying in bed) because of their relationships to either particular diseases (i.e., sleep apnea and restless legs syndrome) or particular anomalous behaviors of relevance w.r.t. the specific observation context of the human in bed. Analyzing movements (or, more generally, physical activities) during sleep can also help in determining both sleep (or laying down) quality and irregular sleeping (or laying down) patterns.
Lying in bed, especially for longer times or more than only some minutes, is generally motivated by the need to rest due to several health status-related contexts. For example, one is sick (different types of sickness, different levels of sickness), one is very tired, one is very old and weak, one is weak or tired, a lady one day or several hours before giving birth, a person in rehabilitation after either a chirurgical operation or a stroke, etc.
Moreover, it is well known that sleep plays an important role in the quality of life and contributes significantly to staying healthy, active and energetic. In special residences such as in the so-called nursing and retirement homes, periodic observation rounds (of the medical or nursing personnel) during the night are a major disruption for the residents and can cause distress and sleep deprivation. Thus, some intelligent technical system capable of reliably performing the monitoring endeavor of those named residents is most welcome.
Overall, it can be stated that sleep monitoring systems, to name a few illustrative use-cases, enable the recognition of sleeping disorders as early as possible for diagnosis and prompt treatment of diseases. Such smart monitoring systems can indeed provide healthcare providers with quantitative data about irregularities (in related positions and movements in bed) in sleeping periods (or more generally in laying periods) and durations. They can also provide detailed sleeping/laying profiles that depict periods of restlessness and interruptions, such as bed exits and bed entries due to either visiting the bathroom or performing other activities in the home.
Numerous sensor technologies exist that can be involved in the acquisition of data from a bed w.r.t. to movement and/or positions of the human lying in the bed. There are several monitoring devices available on the market that are used for sleep tracking or for more safety during the night. These sensor systems can be divided into wearables, such as smart watches and fitness trackers, sleep monitoring belts and devices that are placed on or under the mattress 
; devices that are attached to the pillow 
; smart bed sheets, mattresses and pillows 
; sleep monitoring devices that are placed beside the bed 
; and camera-based systems in the room 
. Furthermore, there are monitoring systems available and capable, for example, of measuring parameters of sleeping babies 
and people with epilepsy 
. Most of those devices are mainly configured as lifestyle gadgets for rather private applications. However, some manufacturers have already been offering special solutions for care institutions 
. Thereby, most existing sensor systems use piezoelectric sensors, accelerometers and/or radio-frequency identifiers to detect a series of relevant parameters. Indeed, the use of radio-frequency identifiers 
, air-pressure sensors 
, smart textiles 
, photoplethysmography 
and thermopiles 
has already been extensively researched, as described in several scientific papers. Some of those papers also discussed the use of piezoelectric sensors 
or load cells 
below the legs of a bed to monitor the parameters of a person lying in bed.
Sensors placed under each of the four bed legs are a representative example of the various sensor systems described in the previous paragraph. These types of sensors are particularly capable of measuring variables related to all forms of physical activity in the bed, e.g., through weight variations or motion detection. A monitoring system involving the data generated by such sensors can capture different activity-related physical variables through the use of more than one sensor type under each bed leg 
. The following are some examples of usual physical activities in the bed for which related variables can be detected by the various sensors (non-exhaustive list): sitting on the bed with feet on the ground, standing up from the bed with feet on the ground, sleeping on the bed, turning oneself in the bed, sitting in the bed (with feet in the bed), etc.
The comprehensive and holistic discussion of the abnormality concept in the overall observation context of the “monitoring of a human in bed” is motivated by a series of insights originating from a critical analysis of the relevant literature. First, overall, one realizes that there is a big and serious confusion regarding a comprehensive and universally solid, valid and accepted definition of the concept “anomaly”. What some authors call or understand under “anomaly” comes rather too close to other concepts of relevance such as “activity”, “event”, “abnormal behavior” and “behavior change”. Moreover, the “anomaly” definition becomes more complex in view of the fact that the system under observation (i.e., a human in bed) is in various system-related aspects very different from a pure technical machine as usually addressed in most of the relevant literature. It is also of special relevance that the context “human in bed” is itself a relatively diverse and broad universe where various fully different and interesting monitoring use-cases may be encountered. For example, alone, the specific human type/sample under observation may make a huge difference in the case settings. The following few examples may underscore this sensitive nuance: (a) the human under observation is a one-year-old baby or a small child between two and five years; (b) the human under observation is a healthy athletic fit young man; (c) the human under observation is a very old (90 years old) and sick person in a coma; (d) the human under observation is a pregnant woman awaiting to give birth within a couple of days, etc. One can assume from common knowledge that the physical activity patterns and their respective dynamic evolutions over time (short-term, average-term and long-term) for these human types are fully different from each other. Thus, the unsupervised-learning-related “anomaly” definition shall be robust w.r.t. those evident differences amongst different human samples under observation. Moreover, one can also ask whether the “anomaly” definition shall be “black” (meaning it assumes unsupervised learning or identification), “white” (meaning it assumes an expert-supported (or via a reference labeled dataset) supervised learning or identification), or “gray” (meaning a merging of “black” and “white” identification).
From the broad anomaly literature in the contexts of machines’ or technical systems’ observations, one learns that there are various types and forms of anomalies. Thus, just stating or detecting the presence/occurrence of an anomaly is not sufficient at all. One shall also specify the related anomaly type and/or form. An interesting question is whether all of those anomaly types and forms observed in the context of machines’ observations are also relevant and observable for the core context, “monitoring of a human in bed”.
Even after the “anomaly” concept has been well defined and assessed regarding type and form, another very sensitive and practically relevant dimension is its location of it in time. In any observation/monitoring endeavor, the time dimension fixes three regions, whereby each of them can also be divided into respective sub-regions: (a) past, (b) present/now/current and (c) future. If researchers consider the future, sub-regions can be near-future, middle-future and far-future. The specific measure of each of these sub-regions (for an illustration of the future) may be very dependent on the setting of the specific observation case. The “near future” may be some seconds, some minutes, some hours, or even some days, depending on the given human observation use-case. This suggests that the use-case engineer shall specify the various use-case related realistic/appropriate boundaries of the different time dimension-related sub-regions. Therefore, a given well-defined “anomaly” shall be placed in a specific sub-region of the time dimension. A very interesting question of relevance for science is that the detection of anomaly may happen/occur or be confirmed at various relative times. The relativity referred to here is the one between the time of occurrence (or time sub-region) of an anomaly and the time it is effectively detected/assessed/predicted.
2. General Context Description of the Monitoring of Humans in Bed, One Illustrative Example from the Practice
A typical state-of-the-art representative monitoring system of humans in bed can be described as follows. A good example of such a system is the one developed by the company “P.SYS system creation KG” 
. The aim of this monitoring system is to provide a user-friendly system that connects older people, or people who generally live independently, in the event of irregularities (in their daily behaviors) with help providers from their extended social environment in a timely and autonomous manner.
The core focus here is on the development and maturing of a bed monitoring system that detects irregularities in a person’s physical movement patterns while sleeping on a bed. For related sleeping patterns, the bed monitor collects data from sensors placed under the bed legs (see Figure 1). The signals form a superposition of body vibrations (movement, breathing, etc.), the weight distribution of the person lying in bed and external influences. The bed monitor can, respectively, be used in the care sector and subsequently also in private households in order to be able to detect exceptions that manifest themselves in deviations from a person’s normal sleeping behavior and to be able to react to them with an appropriate alarm.
Human in bed monitoring through signals generated by sensors placed under the bed. Under each of the four bed legs, two sensors are placed: one weight sensor and one motion sensor. Thus, eight sensor measurement values are generated continuously over time for further processing by the anomaly detection intelligent system 
Regarding the intelligent system implemented, it already realizes most of the features of the related state-of-the-art. Essentially, a model based on advanced statistical methods (such as hidden Markov models and others) was already developed, which independently learns the usual patterns in the data and reacts to exceptions. The developed algorithms work sequentially, with the observations being processed in real time. The data streams from the sensors are not stored in the model; only the model parameters are adjusted and stored using the observed data. Beyond detecting exceptions, one can also assess the quality (eventually in different quality levels) of the sleeping process and/or identify specific special events. This system can deal with subject-dependency, as it learns individual behavior and reacts to individual exceptions. It essentially learns from each individual user under observation on the bed (Figure 2).
Figure 2. There is a huge variety of possible static and/or dynamical activities of a human in bed, which are monitored through a sensor system such as the one presented in Figure 1. The intelligent system to process the sensor data is capable of detecting and, eventually, also predict normal activities and abnormal ones. (Source of the different image parts: Freepik).