1 Introduction

Fuzzy Logic Systems (FLS) are typically associated with specific local software/hardware solutions. They are employed in a variety of applications [1]. In some applications, the number of fuzzy sets, rules, and the system order (e.g., in non-singleton and type-2 systems) can make the computations too complex to be handled by a single stand-alone system [1].

Ambient-Assisted Living (AAL) comprises the use of technology and methods to assure the safety and well-being of the population. Ambient intelligence is the ability of technology to make decisions and act on behalf of the users, taking their preferences into consideration on the basis of the data available to it from all the connected sensors and systems embedded into the everyday devices surrounding the user. In particular, the case for implementing fuzzy logic systems for human fall detection applications in real time is focused. AmI is intuitive and pervasive; rather than asking the user for explicit commands, it can understand their context. It takes actions that are tailored to the users’ preferences. It is closely tied to ubiquitous computing, pervasive computing, human-centric computer interaction design, and context awareness. For example, a wearable sensor-based Fuzzy Decision Making (FDM) model enhances the prediction performance of various sportsperson actions, such as detecting abnormalities, through continuous tracking, and analysis of sports activities [2]. These applications are usually associated with limited storage and/or processing power in the local devices. Conversely, the deployment of stand-alone FLSs without SOA requires locally dedicated hardware/software systems with high computing power, which is impractical for such wearable devices [3]. Distributed architecture development for FLSs is a relatively novel field of research with minimal headway [4]. Apportioning the capacity of a FLS as web services improves suppleness, load balancing, and competent resource dissemination and offers superior significance. Cloud computing has recently gained prominence, which offers on-demand services with high processing capacity. Therefore, cloud computing can play a significant role in carrying out massive data processing. Integration of fuzzy logic with the SOA of the cloud offers high-quality applications [5].

This paper follows up on the initial presentation of a new SOA for developing FLSs on the cloud [referred to here as Fuzzy as a Service (FaaS)] [1]. This can collectively contribute to developing a new range of FLSs for many applications, including human fall detection. Under this architecture, FLSs are transformed into services that are globally accessible, thereby enabling transparency, system neutrality, load distribution, resource allocation, and cost efficiency. Also, such a web-based solution needs a web-based data language for exchanging information about FLSs [6]. A recently developed standard for this purpose is the IEEE-1855 (2016)—also known as Fuzzy Markup Language (FML) [7]. This standard will be used as a part of FaaS since it allows a FLS to be interpreted as both human intelligible and hardware independent. FML acts as a fundamental tool for the human readable and hardware-independent modeling of fuzzy logic controllers [8]. It also allows FLS designers to define their structures irrespective of their remnant interpretations and offers a set of facilities that accelerate the entire procedure of designing a fuzzy structure [9, 10]. It included complete data elements for executing Mamdani, TSK, Tsukamoto, and AnYa systems, as in its XML Schema Definition (XSD). The details of the FaaS software/hardware architecture for human fall detection applications have been explained in [1, 4]. In this paper, the main focus is on comparing the performances of local and service-oriented solutions when implementing fuzzy logic systems for different applications and some known Non-fuzzy Machine Learning solutions.

On the cloud side, the performance of FaaS on two service providers, i.e., Amazon Web Services (AWS) and Microsoft Azure, will be investigated. For the software library necessary to handle the FLS computations, a Java library called JFML [11] and a Python library called Simpful [12] is used.

The following are the primary contributions of this research:

  • Showcasing a group of cloud-based and real-time fuzzy systems for human fall detection application areas would not be practical to implement as stand-alone systems—therefore removing the design barriers that would stop implementing FLSs for such applications. To the best of our knowledge, our methodology uses cloud-based fuzzy systems for the first time in human fall detection. A wearable smartwatch is used in this research to collect health-related data.

  • Comparing the performance of classical stand-alone architectures with the proposed FaaS architecture for the above case studies on the cloud and real-time high sample rate scenarios.

The remainder of this paper is organized as follows. Section 2 focuses on related work followed by proposed architecture and motivation in Sect. 3. Section 4 explicates on the procedures used for carrying out the study and describes the various approaches used. Section 5 describes the experimental setup followed by Sect. 6 elaborates on the basis of the performed experiments. Finally, Sect. 7 concludes the paper with a future scope.

2 Related Work

The usage of fuzzy systems in disciplines as broad as decision-making, control systems, and image identification has driven the establishment of numerous software development tools that assist in their practical implementation. Both proprietary and open-source development platforms and libraries have been used to design fuzzy systems. Dedicated embedded systems or on-premise PCs are mostly utilized to develop such systems [13]. Cloud computing, on the contrary, allows for a new way of distributing computer resources, which will be particularly valuable for fuzzy systems [14]. Research works around the types of stand-alone or cloud-based software architectures for fuzzy systems are briefly reviewed below.

There are a number of open-source software tools/libraries for implementing fuzzy logic systems that are focused on classification, regression, or decision support systems. FuzzyR, a multipurpose fuzzy reasoning toolkit written in R, supports Type 1 and Type 2 FLSs [15]. FuzzyLite is a compendium of C++ libraries for fuzzy control [16]. Fispro is a GUI C++ software designed for data-driven FLS applications [17]. Juzzy [18] is a Java-based library implementing Type 1 and Type 2 fuzzy systems [19].

The JFML library is an open-source Java library that provides a full implementation of IEEE 1855-2016 FML and the capability to import/export fuzzy systems in conformity with other standards [3]. JFML has a classified structure that combines the standard’s extension techniques, making future updates easier to integrate. JFML employs the JAXB Java architecture to offer a quick and straightforward mechanism to read and write FLSs in compliance with the FML standard [20]. In addition, a Python wrapper for JFML was released, thereby permitting FML-compliant FLSs to be defined using Python scripts for the JFML library. This technique, however, necessitates the Py4J framework [21], which allows the Python interpreter to programmatically access Java objects in a JVM.

Soto-Hidalgo et al. [3] developed a new JFML module that facilitates the designer to develop and implement different components of Fuzzy Rule-Based Systems (FRBSs), including inputs, outputs, rule base, membership functions, operators, and learning elements, all on an embedded platform using IEEE Std 1855-2016. The new module supported Wi-Fi, Bluetooth, and USB connection types, thus enabling the implementation of FRBSs on a remote computer or embedded system [22].

Simpful, an all-purpose Python toolkit for defining, analyzing, and interpreting fuzzy inference systems, was introduced by Spolaor et al. [12]. It provides a simple application programming interface (API) that allows for the easy creation of fuzzy sets and fuzzy rules and the execution of fuzzy inference. Unlike competing libraries, fuzzy rules were encoded as strings of plain text, making Simpful-built FLSs more straightforward to read and inspect. Users could construct fuzzy sets in the universe of discourse/degree of membership space as polygons, parametric functions, or even arbitrary customized functions.

To address the gap between practitioners and researchers in each level of the estimation of a fuzzy model, Fuchs et al. [23] proposed pyFUME, which dynamically constructs fuzzy systems from data. It is a collection of classes and methods for precedent set and associated parameter estimations of a Takagi-Sugeno (TS) fuzzy system from data with the Simpful library. Royon et al. [24] proposed a cloud-based scheme based on semantic technology for service-oriented FLSs, namely fsschema. The proposal sought to accomplish three objectives: a detailed specification of cloud services for fuzzy systems based on semantic technology, service configuration, and model utilization in cloud platforms for integrating with other services. This scheme defined all the components of an FRBS and considered all aspects of cloud computing administration that a cloud provider must consider for the service’s development and future use by end-users. The approach was built on the Semantic Web and the usage of ontologies and vocabularies, which allowed fuzzy system modeling to be readily extended and completed, showcasing the portability of fuzzy system services among cloud providers.

This study particularly uses JFML and Simpful to implement three different cloud-based fuzzy systems on two cloud service providers to exhibit the potential and merits of sharing fuzzy systems across open and distributed architectures. The details are provided in the next section.

3 The Proposed Architecture of FaaS

A rising interest inspires cloud-based service architecture for fuzzy logic systems utilizing FML in distributed applications of fuzzy logic systems within an AmI context.

3.1 Motivation

The possibility of implementing FLSs in a decentralized AmI context motivates a service-oriented approach to FLSs. In the first section, a number of general architectural design features are examined, followed by a concise description of the utilized specific software components and the generated functionality in order to meet the specified requirements [3].

3.1.1 The Importance of Utilizing a Distributed Fuzzy System

Components of a fuzzy logic system need to be distributed widely in an AmI environment for sensors to be able to gather input data, processors to be able to run the system, and actuators (also known as output devices) to be able to be deployed in various locations across the environment [1]. To achieve efficiency, reusability, and adaptability, it is necessary to distribute not just input and output devices but also processing power, among several servers. This strategy may need complex load balancing, which is not attainable with static hardware and software solutions.

3.1.2 Openness and Ease of Access

These are regular FLS application benefits, not only for AmI. Most FLS computing tools are best for single-station applications, such as MATLAB and R tools and libraries [1, 3]. A cloud-based method where the FLS is accessible as a Web Service eliminates the need for users/clients to have specialized software, libraries, programming/scripting languages, or servers. This promotes user autonomy, which is vital for research or teaching when accessing and exchanging software tools and data. This can also include user-created FLS repositories for other applications. This design also helps create cross-platform solutions. Any web-connected device may access FLS computations from anywhere [15, 25].

3.1.3 Utilization of Computed Results

To prevent repeated calculations, a server can log the inputs received from and outputs communicated to numerous input/output devices for a single FLS. Cached outputs can be reused for future requests from the same user or any other user with the same input parameters. For example, this is conceivable if inputs to a system were processed recently. The idea of a single FLS for a certain application may also be assigned and recovered by several other apps in other scenarios. This is only feasible if an FLS server can receive requests for FLS definitions and input/output history.

3.1.4 Scalability of Fuzzy Logic System

Artificial intelligence and fuzzy logic can create an intelligent system in an AmI environment using cloud-based service-oriented architectures. When a system becomes more complicated, precise categorical statements about that system lose their significance, and meaningful statements can no longer be made with precision and categorization. It is possible to get over this constraint by employing fuzzy logic’s linguistic approach, which makes fuzzy systems exceedingly scalable and suitable for integration into complicated frameworks, like AmI environments [3]. Fuzzy rule bases relating to diverse components of the environment will be built as stand-alone systems and integrated into the artificial intelligence ecosystem without effort in these cases.

3.2 Hardware Architecture

Our suggested system uses Web-connected devices to build a cloud-based service-oriented architecture for fuzzy logic systems. The primary advantage of employing these sensors is that they can be linked to any device, including IoT devices [3, 26]. In addition, these sensors can provide real-time data that can be utilized for predicting. In contrast, Amazon AWS and Microsoft Azure web services were utilized for server-side architecture. The benefit of Web Services is that real-time data are gathered from the sensors and analyzed using a cloud service, providing instantaneous results.

3.3 IEEE 1855-2016

An XML-based data exchange format for fuzzy logic systems, known as IEEE 1855-2016 (or Fuzzy Markup Language—FML), was introduced in [3] and standardized in [1, 27]. It is a human-comprehensible, platform-independent, and Web-compatible way to represent a FLS. This type of FLS could previously be defined using a portion of IEC61131 specifically devoted to fuzzy controllers (known as FCL). IEEE-1855 has the benefit of directly relating to logic in server-side development. Multiple programming languages (e.g., Java) can be encapsulated in a local program logic description of an IEEE-1855 FLS using a stylesheet language translator (XSLT) that requires only a little server-side effort. As seen in [3], IEEE-1855 allows several users to monitor the same FLS while simultaneously communicating with the environment. This standard’s specifications are outside the scope of this article and may be found in [3]. The current IEEE 1855-2016 standard supports definitions of FLS but does not recommend how the input and output data should be exchanged between client and server. Accordingly, we have extended the FML standard described in the next section of our research.

3.4 API Design

FLSRequest, FLSResponse, and their subelements are proposed extensions to the original IEEE-1855 format. The IEEE-1855 standard has been thoughtfully crafted to provide a simple expansion, allowing the original language to be adapted to many application circumstances. The alternative is that a single schema can support all answers and requests to or from the server. When the schema for the newly necessary items is paired with the standard IEEE-1855 template, it may be possible to generate an expanded schema. The root element of the expanded schema would be identical to that of the original schema. In addition, the original subelements, i.e., KnowledgeBase and RuleBase, [3] and [28], would be added to the root element, along with two extra complex-type elements for managing FLS requests and responses.

In the developed application, several methods accomplish the activities mentioned above. Such methods are as follows:

  • createFLS(): This is a mechanism for feeding the Fuzzy logic system into the application. The FLS is the foundation since it contains all the necessary information and values and a unique URI. The FLS incorporates two major components: knowledge and rule bases. The knowledge base contains fuzzy variables with low, medium, and high values. In addition, the system comprises several rules that govern how the output is created.

  • setInput(): Once the FLS has been formed, there would be a need to configure the user’s input as XML, CSV, or sensor data. To do this, the application’s setInput() function is called. For XML-based services, the service name “setInput” and the unique URI to run the function on the appropriate system are supplied. These values are then saved in the database and used to generate the appropriate output.

  • getOutput(): A new column called “Output” was added to hold the results of each record. This function returns the desired result based on the FLS, and the input was given using the setInput function. It creates outcomes based on the rules supplied by the fuzzy system. To launch the “getOutput” function, it is necessary first to check that the “setInput” method has been called and its values have been saved in the database. An error is obtained if setInput method does not appropriately receive values. Furthermore, the outcome will be “Output variable does not exist.” In the case of CSV and sensor-based output, the output is immediately shown in the same CSV file.

4 Methodology

This section explains the design setting of human fall detection implementation, including the data collection, the non-fuzzy machine learning model, and the FaaS. Then the performance measure and comparison methodology will be presented. In order to implement FLS for fall detection, the following approaches were used.

4.1 Data Collection

For this research, an experimental dataset was compiled using a linear accelerometer and gyroscope sensors connected to a smartwatch and a smartphone. A Fossil generation 5-wear OS smartwatch and One plus 7 smartphone with a three-axis linear accelerometer and gyroscope was used as wearable sensor for the data collection. \(A_x\), \(A_y\), \(A_z\), \(W_x\), \(W_y\), and \(W_z\) are the six data columns shown in Fig. 1. In order to collect data, a time series approach was used, and the data capture rate was 419 Hz. Orientation and angular rotation were determined by gyroscope sensors, while linear accelerometer sensors identified fall or non-fall. In addition to labels for fall and non-fall, it contained information on the time and human movement positioning along three axes.

Fig. 1
figure 1

Dataset with a few instances of feature-extracted data

4.2 Data Processing and Feature Extraction

Falls are often identified in a horizontal plane. The direction of movement during a fall can be in either direction when using wearable devices. Calculating the magnitude of the linear accelerometer, or (\(SVM_{A}\)), requires the following steps: [1, 4], which are displayed in (Eq. 1).

$$\begin{aligned} S V M_{A}=\sqrt{A_{x}^{2}+A_{y}^{2}+A_{z}^{2}} \end{aligned}$$
(1)

Linear accelerations in the x-, y-, and z-directions are described by \(A_x\), \(A_y\), and \(A_z\). Moreover, the magnitude value exceeding 6.0 indicates the possibility of fall occurrence. The program will compile 1000 data samples, gathering data on typical user behaviors before and after the occurrence. Before the fall, the first 950 data samples (expected to take 1.5 s) and 50 data samples will be gathered from the present location. 950 data samples (estimated duration 1.5 s) and the following 50 data samples will be taken after the fall. Be aware that the average of the 50 samples taken before and after the fall is being considered. The process of choosing data samples is illustrated in [1] detail. The Delta of the 950 data samples collected following the incident is used to perform the first analysis (DA). For calculating the DA, the XYZ accelerometer will have both start and end coordinates [4], which is shown below in (Eq. 2)

$$\begin{aligned} \Delta A=\cos ^{-1}\left( \frac{\left( A_{x s} \times A_{x E}\right) +\left( A_{y s} \times A_{y E}\right) +\left( A_{z s} \times A_{z E}\right) }{\sqrt{\left( A_{x S}^{2}+A_{y S}^{2}+A_{z S}^{2}\right) \times \left( A_{x E}^{2}+A_{y E}^{2}+A_{y E}^{2}\right) }}\right) \end{aligned},$$
(2)

where average accelerations along all three axes are denoted by the notation \(A_{x_S}\), \(A_{y_S}\), and \(A_{z_S}\). In contrast, average accelerations along all three axes at the endpoint are denoted by \(A_{x_E}\), \(A_{y_E}\), and \(A_{z_E}\). Since hand rotation is commonly utilized in situations involving falls, the data acquired by a gyroscope may be used to estimate the device’s angular speed in three dimensions (degrees per second). It is possible because of the nature of the gyroscope. The unit can move in any direction during the fall; because of this, the directionless \(SVM_{G}\) takes into consideration the unit’s potential to move in any direction; because of this, the amount of rotation, which SVMG represents, is calculated by making use of [1, 4]

$$\begin{aligned} S V M_{G}=\sqrt{G_{x}^{2}+G_{y}^{2}+G_{z}^{2}} \end{aligned},$$
(3)

where \(G_x\), \(G_y\), and \(G_z\)z are the speeds of rotation along the X-, Y-, and Z-axis, respectively. In the above analysis (3), the value of \(SVM_{G}\) is obtained for the fuzzy classification of all data.

4.3 Fuzzy Logic System Design

When constructing fuzzy logic systems, fuzzy logic rules and member variables were specified and provided to the system in an XML format. The program allows users to enter data in one of three ways: XML, CSV, or sensor data based. The flow of the fuzzy logic fall detection process is depicted in [1]. The stand-alone fuzzy system architecture using mobile application is presented in Fig. 2.

4.3.1 Fuzzy Sets and Rules

In explicit testing, the fuzzy logic system accepts the inputs and generates vagueness-dependent output through a series of phases. The three steps of a conventional fuzzy logic technique are fuzzification, rule base, and de-fuzzification. In order to fuzzify, each input value must be represented as a fuzzy membership function, fuzzy input set, and compounding.

Fig. 2
figure 2

System architecture of stand-alone fuzzy system using Mobile application

Fuzzification: In the fuzzy set context, fuzzification translates new data into a collection of fuzzy membership grades (Low, Medium, and High). The system accepts the input data from two sources: DA and \(SVM_{G}\). Depending on the DA value of each membership, the DA value is given to a particular turning point, such as 20, 45, or 90. In most instances, falls occur at an angle of 90 degrees; nevertheless, inevitable falls can occur at \(<90\) degrees, and the wrist-worn sensor cannot determine the precise DA.

  • Fuzzify each input value as a function of fuzzy membership: The output functions of fuzzy logic can be quantified if the necessary rules are followed. In order to obtain “crisp” performance values, de-fuzzify the ambiguous outputs.

  • Fuzzy input set \(SVM_{G}\) is the initial input, comprising three values: Low, Medium, and High.

  • Compounding: It is a moderate angle if you select a minimum angle that results in a 45 fall. The minimum angle is 20, and the maximum angle is 90. In order to determine the size of any membership from 0 to 180, the sensor must be able to calculate the lowest and maximum angles. In other words, when the angle is greater than 45 degrees, a fall occurs more frequently.

100 is assigned a low value, 250 is a moderate value, and 400 is a high value. As seen in Fig. 1, an occurrence is referred to as a fall if it has a severe impact based on its magnitude.

A set of 9 rules, as shown in [1], have been defined. The output from the fuzzy set is obtained. The output includes two options, fall and not fall, based on the inputs and the rule base. Defuzzification is the process of deciding the output based on the aggregated input. The centroid approach, which identifies the center of the region of the fuzzy set and returns the corresponding value, is the most often used as the de-fuzzification method.

4.3.2 Stand-Alone Architecture

The System architecture of a stand-alone fuzzy system using a smartwatch and mobile applications to create output based on real-time input supplied to the system. As shown in Fig. 2, this architecture takes input directly from wearable devices or input data from any public dataset. It aims at the time required for processing data over the smartwatch and phone compared to the cloud. The raw data will be processed and parsed in XML or CSV format or taken directly through the device sensor at a fixed interval. The FLS contains all necessary information and values and a unique URI. The FLS comprises two major components: a knowledge base and a rule base. Once the FLS is formed and listed, the XML data provided by the user can be configured using the setInput(). The getOutput() returns the desired result based on the FLS and the input that was provided using the setInput(). It creates outcomes based on the rules supplied by the fuzzy system.

Fig. 3
figure 3

The suggested architecture includes data collecting, data processing, feature extraction, and a fuzzy logic system

4.3.3 Cloud-Based Architecture

The framework of the proposed method, including data acquisition, data processing, feature extraction, and fuzzy logic system, is shown in Fig. 3. This architecture takes input directly from wearable devices or data from wearable devices passed on to mobile applications or web-connected devices. This real-time data are transmitted over the cloud using the IEEE 1855-2016 standard. This system architecture is implemented over the cloud using the Amazon web service with Java library as JFML and Azure web service with python library as Simpful. The real-time data will be passed through either of these modules. The real-time data will be fuzzified, rule-based decisions will be taken, and later the data will be de-fuzzified, and the health status will be passed on to the monitoring station. The monitoring station will raise the alarm if required based on the health status.

4.4 Non-Fuzzy Logic System

The resulting dataset includes both positional and response variables. A response variable is a multi-category variable with labels, which include fall and not fall. In order to build a model, it is necessary to determine the dataset’s abstract qualities capable of producing the desired result. It is, first, essential to identify the dataset’s abstract properties. As a result, we have compared the non-fuzzy machine learning model’s performance with that of the artificial neural network model using a model selection approach [4]. A classification approach known as a random forest classifier is used to learn an ensemble. The Random Forest classification method was used to construct an algorithm that classifies fall or not fall. As part of developing the model, the dataset was arbitrarily divided into a 70:30 split and randomly assigned to training and testing.

4.5 UI Design

5 Experimental Results

The latest version of smartwatch (Fossil Generation 5) and android phone was used to create an output based on real-time input supplied to the system. Various devices have been employed to assess the correctness of the system (Figs. 4, 5).

Fig. 4
figure 4

UI screen for Android Mobile application

Fig. 5
figure 5

Real-time human health monitoring and processing result using A Create FLS, B Set Input, and C Get Output methods

5.1 Fuzzy Stand-Alone Scenario

The system was tested with a file worth 10,000 samples using smartwatch and mobile phone. The evidence shows that the application is unable to handle after 5000 samples using smartwatch; hence, time required to process 5000 samples is 10 min 01 s using smartwatch and 2 min and 59 s using mobile phone to process 10,000 samples. The result might vary depending upon the device and android specifications.

5.2 Non-fuzzy Machine Learning-Based Scenario

The system was tested with a file worth 10,000 samples using a smartwatch and mobile phone. The evidence shows that the time required to process and generate results is 37 min and 02 s using a smartwatch and 1 min 41 s using a mobile phone using a random forest classifier.

Non-fuzzy Machine Learning is crucial for finding intrinsic or internal data properties and predicting behavior. On the other hand, non-fuzzy machine learning is not well suited for dynamic factors in a real-time situation. It can only forecast using previously taught factors, and re-learning is required every time a new element is added. In contrast, the Fuzzy System may learn incrementally and interactively in real time. Another disadvantage of non-fuzzy Machine Learning is its lack of interpretability, which is exacerbated by the difficulty in explaining how it works.

Furthermore, having sufficient data for training is a significant challenge in non-fuzzy Machine Learning. On the other hand, a Fuzzy System can be created with a limited amount of data because non-fuzzy machine learning is susceptible to overfitting and underfitting; test accuracy may misguide model performance with real-time data. On the other hand, the Fuzzy System is unaffected by underfitting or overfitting issues. In the case of enormous amounts of data, non-fuzzy machine learning necessitates high computational power during the learning process in contrast to fuzzy systems.

5.3 Real-Time Scenario (Sensor Based) via Cloud

Accelorometer and gyroscope sensors were used to perform the experiment, which helped in fetching data in real time at certain time intervals. Figure 6 shows the snapshot of smartwatch for different methods, namely Non-fuzzy machine learning (Non-fuzzy), Real-time fuzzy with Azure and Simpful, Real-time fuzzy with AWS and JFML, and Fuzzy Stand-alone. Testing was performed in a real-time environment with a various number of samples in an increasing manner. The obtained data (i.e., 10,000 samples) were fed to AWS as well as Microsoft Azure.

  1. 1.

    AWS: It is possible to construct virtual computers and operate them on one of Amazon’s data centers using the Elastic Compute Cloud (EC2) service. Through AWS with JFML, 10,000 samples were processed, and the desired results were generated using smartwatch is 18 min 31 s and 45 s using mobile phone.

  2. 2.

    Microsoft Azure: Through Microsoft Azure with simpful, 10,000 samples were processed, and the desired results were generated within 20 min 50 s and 1 min 37 s using mobile phone.

Fig. 6
figure 6

Snapshot of fall detection output using Smartwatch. A Non-fuzzy machine learning using cloud, B Fuzzy with simpful libraries and Azure, and (C) Fuzzy with JFML libraries and AWS (D) Fuzzy stand-alone

6 Discussion

The difference between the processing time that is taken for the collected data and given as an input to the ML model (Non-fuzzy) and Fuzzy model as shown in Fig. 7A and Table 1. Similarly, Fig. 7B and Table 2 show the number of samples that can be processed per second concerning 1000 samples, 2000 samples, 3000 samples, 4000 samples, 5000 samples, 7500 samples, and 10,000 samples processed with a smartwatch.

Fig. 7
figure 7

Fall detection using smartwatch. A Total time required to process the samples and B Number of samples processed per second

Table 1 Number of samples processed per second using smartwatch
Table 2 Average processing time (in seconds) with respect to number of samples using Smartwatch

Figure 8A and Table 3 show the difference between the processing time that is taken for the collected data and given as an input to the ML model (Non-fuzzy) and Fuzzy model. It was observed that for average processing times of 1000 samples, 2000 samples, 3000 samples, 4000 samples, 5000 samples, 7500 samples, and 10,000 samples, Similarly, as shown in Fig. 8B and Table 4, the number of samples processed per second was calculated by supplying 1000 samples, 2000 samples, 3000 samples, 4000 samples, 5000 samples, 7500 samples, and 10,000 samples.

Fig. 8
figure 8

Fall detection using mobile phone. A Total time required to process the samples. B Number of samples processed per second

Table 3 Average processing time (in seconds) with respect to number of samples using Smartphone
Table 4 Number of samples processed per second using smartphone

Non-real-time fuzzy logic-based system results depend on device hardware/software processing power. Only the intended user can view the results, but no other users will get a notification about the same. It is inaccessible from anywhere; hence, the main objective of this research work does not get satisfied completely.

The present work deals with implementing a service-oriented approach within a cloud computing architecture for human fall detection, especially for elderly people. This system architecture is implemented over the cloud using Amazon Web Service with Java library as JFML and Azure Web Service with Python library as Simpful. Wearable sensors like gyroscopes and accelerometers connected to a smartwatch and Android-based phones are used for collecting the data to make a decision based on a fuzzy logic system governed by fuzzy rules. Distributed fuzzy systems are utilized as a new method to enjoy advantages, like efficiency, reusability, scalability, and adaptability. The necessary API is designed to implement a service-oriented approach. A comparison of detection efficiencies has been made among the existing fuzzy logic-based stand-alone architectures and non-fuzzy ML-based decision-making methods with the implemented architecture. The study included the use of four approaches which is elaborated in Table 5, i.e., machine learning (non-fuzzy), fuzzy stand-alone, real-time fuzzy with AWS and JFML, and real-time fuzzy with Azure and Simpful libraries on a dataset with a train and test split ratio of 70:30. The analysis of the four approaches on the dataset is shown in Fig. 9 and Table 6.

Table 5 Comparative analysis of real-time and non-real-time human fall detection
Table 6 Summary of real-time and non-real-time human fall detection system
Fig. 9
figure 9

Comparative analysis of human fall detection

7 Conclusion and Future work

This study performed a comparative analysis of stand-alone and cloud-based systems wherein different approaches were used. Based on these findings, it can be concluded that the suggested SOA can manage real-time data using cloud computing with datasets for human fall detection using a complex fuzzy rule-based framework utilizing FML. The developed system was regarded as having relatively good efficiency and response time. The distributed fuzzy logic systems, as proposed, provide the following impacts compared to their stand-alone counterpart:

  • Reusability

  • Adaptability

  • Efficiency

  • Openness and ease of access

  • Effective communication of the processed output to several receivers at a time

  • Can handle an extensive amount of data

  • Computational cost reduces

  • Dependencies on local computational elements decreases

  • Complex load balancing

The architecture may be extended to a broader region even though it was designed with human fall detection. Additionally, this study attempted to make it easier for clients to flexibly transmit relatively complex computational tasks to dedicated servers. Utilizing virtualized cloud services offers the devices a remarkable level of flexibility. To demonstrate the value of fuzzy logic and IEEE-1855 in a practical setting, such as forensic science, future work on an artificial intelligence system for investigating crime scenes and the automatic reconstruction of criminal dynamics will build on the recommended architecture. Additionally, fuzzy services like fuzzy ontologies and fuzzy querying of fuzzy databases can be taken into account. A suitable alternative for implementation would be to expand web services to the semantic web due to the close relationship between FML and fuzzy ontologies. In addition to the primary advantage of making FaaS internationally available, this type of architecture offered several other advantages, including the ability to share networks, maintain control over hardware and software, reuse data, provide load balancing among FLS devices, and reduce costs.

The proposed technique, however, utilizes an FML file to train fuzzy systems from data. Therefore, we want to enhance VisualFML in future by incorporating a module that supports the learning of fuzzy systems in accordance with IEEE Std 1855-2016.