Abstract

The aerospace industry needs to be provided with system solutions to technologically challenging and mission-critical problems. Based on the industrial control point of view, development engineers must take costs and existing standards into account in order to effectively design, implement, and deploy control systems with reasonable costs. The customization and reusability are important factors associated with the production of new applications in order to reduce their costs, resources, and development time. In this work, the Model-Driven Architecture (MDA)/Model-Based Systems Engineering (MBSE) approach combined with the real-time Unified Modeling Language (UML)/Systems Modeling Language (SysML), Unscented Kalman Filter (UKF) algorithm, and hybrid automata is specialized to obtain a hybrid control model in order to conveniently deploy controllers of Quadrotor Unmanned Aerial Vehicles (Q-UAVs). This hybrid control model also provides a real-time capsule pattern, which allows the designed elements to be customizable and reusable in new applications of various multirotor UAVs of the Vertical Take-Off and Landing (VTOL) type. The Q-UAV dynamics and control architecture are combined with the MDA/MBSE specialization as follows: the Computation Independent Model (CIM) is defined by specifying the use-case model together with the UKF algorithm and hybrid automata to intensively gather the control requirements. The Platform Independent Model (PIM) is then designed by specializing the real-time UML/SysML’s features to obtain the main control capsules, ports, and protocols, together with their dynamic evolution. The detailed PIM is subsequently transformed into the PSM by open-source platforms to rapidly implement and deploy the Q-UAV controller. The paper ends with trial flights and deployment results that show good feasibility to be used for a trajectory-tracking controller of a low-cost Q-UAV. In this case study, the Q-UAV controller is implemented with the simulation model in the OpenModelica tool. The obtained simulation results then allow the main control elements and their properties to be defined, as well as building the implementation libraries in the Arduino environment based on C++ language to quickly perform the realization model in the ATMEGA32-U2 and STM32 Cortex-M4 microcontrollers.

1. Introduction

Unmanned Aerial Vehicles (UAVs) have been used in many military applications for a long time. Currently, UAVs, especially quadrotor UAVs (Q-UAVs), are also being developed rapidly in civilian applications to enhance economic effectiveness, e.g., online shipping in e-commerce, precision agriculture, environmental monitoring, mapping, and surveillance. The Q-UAV is one of the micro-UAV types of which operating modes are capable of Vertical Take-Off and Landing (VTOL) and hovering and horizontal flight, so they can handle turbulence due to, for example, wind more easily and are easier to design and realize by using a compact airframe [13].

Systems engineering is an approach that has been widely accepted in the aerospace and defense industry to provide system solutions to technologically challenging and mission-critical problems. The solutions often include the use of hardware and equipment, software, data, people, and facilities [4]. In addition, the low development costs must be taken into account in the construction of applications. Thus, reusability must also be considered in the new development lifecycle of various applications for UAVs, such as the VTOL. According to the Object Management Group (OMG) [5], Unified Modeling Language (UML) has been standardized for analyzing and designing visual system components in the software industry. In addition, System Modeling Language (SysML) [6] is a UML profile for systems engineering that has been also standardized by OMG. SysML is used for analyzing, designing, verifying, and validating the development artifacts of industrial systems in various domains. Nevertheless, both UML and SysML lack the constructs for precise modeling of timing and communication evolutions between the control objects for real-time and embedded systems, e.g., the Q-UAV controller. Furthermore, the OMG has also standardized the Model-Driven Architecture (MDA) [7, 8] whose main idea is to separate the specifications of system operations from the details of the way that a system uses the capabilities of its platform. On the other hand, Model-Based Systems Engineering (MBSE) has been formalized by INCOSE [9, 10] to support the modeling of system requirements, design, analysis, verification, and validation artifacts in the development life cycle of complex systems.

In addition, the problem of designing autonomous flight controllers for Q-UAVs is equally challenging because these controllers are closely connected with the dynamic models [1113]. Hence, the Q-UAV controller can be considered to be a model that combines discrete and continuous behaviors named the Hybrid Dynamic System (HDS), and it can be modeled by hybrid automata (HA) [1416].

Following on from the above points, the MDA/MBSE’s features can be specialized by combining them with the real-time UML [1720] together with the SysML (i.e., real-time UML/SysML) to depict the analysis and design components of control systems in detail. This study focuses on the development of a hybrid control model that integrates the Q-UAV dynamics specialized for the MDA/MBSE together with real-time object paradigms and the HA, which permits us to conveniently implement the Q-UAV controller. This model also allows the designed control components to be closely customized and reused for deploying new control applications of various UAV types capable of VTOL. In this work, the Q-UAV dynamics and control architecture are combined with the specialization of MDA/MBSE features, composed of the Computation Independent Model (CIM), Platform Independent Model (PIM), and Platform Specific Model (PSM). The control system permits a Q-UAV to track the desired trajectories. In detail, the CIM consists of the use-case model defined closely with an implemented function block diagram, the supplemented Unscented Kalman Filter (UKF) algorithm, and HA to accurately meet the control requirements for a Q-UAV controller. Based on the defined CIM, the PIM is designed by specifying the real-time UML/SysML that allows a real-time capsule pattern to be created to model the real-time control elements with their timing evolutions in detail. The detailed PIM components are then transformed into PSMs by using open-source platforms such as OpenModelica [21] and Arduino [22] in order to rapidly implement and deploy the Q-UAV controller. Finally, a trajectory-tracking controller of an application of Q-UAV is deployed and used to test the ATMEGA U2 and STM32-Cortex-M4 microcontrollers, which are linked with the Inertial Measurement Unit (IMU) MPU6000 with a working frequency of 100 Hz [23] and GPS Ublox Neo 6M with a working frequency of 10 Hz [24]. This controller is trialed through different experimental scenarios and is compared to existing solutions.

In this study, we followed the method of our author introduced in Van Hien et al. [25]. The main contributions of this paper are summarized as follows: (1)The MDA/MBSE approach combined with the real-time UML/SysML, UKF algorithm, and hybrid automata is specialized to conveniently analyze, design, implement, and deploy the Q-UAV controller(2)The main designed control capsules can be customized and reused for various UAV types capable of VTOL(3)The open-source platforms are used to rapidly implement and deploy the controller(4)A trajectory-tracking controller of a low-cost Q-UAV is developed and tested

The rest of this paper is organized as follows: The second section introduces the related works that inspired us to build an MDA/MBSE-oriented development life cycle for Q-UAV controllers. The Q-UAV dynamic model and control architecture are introduced in the third section. The fourth section presents the details of MDA/MBSE-based development to conveniently realize and deploy Q-UAV controllers, including the CIM, PIM, and PSM components. In the fifth section, this specialized model is applied to a case study. Conclusions and future work are shown in the final section.

2.1. Structural Approaches for Q-UAV Controllers

In the present design of complex systems, many applications use standard control methods together with soft-computing approaches to make them more effective for controllers of such systems [2630]. These have also been applied to the construction of Q-UAV controllers; for example, some of the main control methods and assessments for Q-UAV applications are summarized in Table 1.

The assessment results of the above control approaches suggest the use of a combination of PID and backstepping, the so-called Integral Backstepping (IB) technique. This is used to implement the continuous evolution of the Q-UAV controller by a functional block diagram in the fourth section.

In addition, the above traditional control models are based on structural approaches that focus on database-driven architecture. Hence, the designed control components could be difficult to customize and reuse for realizing new controllers of different UAVs of the VTOL type and for deploying them appropriately into various software and hardware platforms. To achieve this goal, model-driven approaches can be specialized to conveniently perform the whole development lifecycle focused on control systems such as the Q-UAV controller.

2.2. Model-Driven Approaches and Applications

As previously stated, the MDA has been standardized by OMG for system design, development, and implementation. The three main goals of the MDA are portability, interoperability, and reusability through an architectural separation of concerns. Furthermore, Model-Based Systems Engineering (MBSE) is the formalized application of modeling that is used to support system requirements and for design, analysis, verification, and validation activities beginning in the conceptual design phase and continuing throughout development and later life cycle phases [9, 10]. MDA is a system development paradigm that emphasizes the use of rigorous visual modeling techniques throughout the system development life cycle (SDLC), and MBSE is a specialization of MDA that applies MDA principles and best practices to systems engineering applications [25, 50]. Following the above model-based approaches, Ragavan et al. [51] proposed the Bond Graph-based Unified Meta-Modeling Framework (BG-UMF) to lead the complexity in model transformation, analysis, validation, verification, and automatic code generation, which are focused on the conceptual design and development of executable models for large engineering systems. Herrera et al. [52] introduced the complex UML/MARTE (Modeling and Analysis of Real-Time and Embedded Systems) methodology to design embedded systems, which brought out a new integration of Model-Driven Engineering (MDE), electronic systems, and space exploration technologies. This platform could capture the set of possible design solutions by using the UML and the standard MARTE profile. Many industrial applications based on the real-time UML/SysML and model-driven approaches for complex control systems can be found in [8, 25, 50, 5356].

In particular, the demands of system complexity and design productivity for embedded control systems must be managed by simplifying and reusing the design. Thus, these systems need to be verified as early as possible in the development process to reduce the cost and effort in the context of MBSE [57]. To achieve these goals, the UML profile for SystemVerilog (UMLSV) [58, 59] and a novel Natural Language Processing (NLP) framework [60] were developed to completely model the design and verification requirements of systems.

In this section, we cited the structural realizations for Q-UAV controllers and the model-based approaches for industrial control systems that could be used to create a hybrid control model based on the MDA/MBSE approach and real-time UML/SysML to conveniently deploy the Q-UAV controller.

3. Q-UAV Dynamics and Control Architecture

3.1. Q-UAV Dynamic Model for Control

The aim of modeling the dynamics of Q-UAV is to find differential equations that relate a system’s outputs (position and orientation) to its inputs (force and torque vectors). As determined from a large field of guidance, the navigation and control of aerial vehicles presented in [6164], the 6 DoF dynamic model of a Q-UAV in the body coordinate frame can be written as equation system (1). Here, , , and are inertia moments; , , and are, respectively, Roll, Pitch, and Yaw (RPY) angles; presents the rotor inertia; is a set of hub forces; is a set of rolling moments; presents the thrust force (); is the overall residual propeller angular speed; is the fuselage area; is the propulsion group cost factor; is the air density; presents the drag moment; and are, respectively, the vertical distance and horizontal distance of the propeller center to the Center of Gravity (CoG); and , , and define the position in the body coordinate frame.

In this study, we proposed the following assumptions: the hub forces and rolling moments were ignored, and thrust and drag coefficients were considered constants in order to comply with the real-time constraints of the embedded control loop. The evolution of the control system can be rewritten in state-space form with the input vector and state vector as equations (2)–(4).

Here, is the control input () that is described by a set of equations (3), is the propeller angular rate, and and are, respectively, the thrust and drag factors.

is a 12-dimensional state vector that is used to describe the motion of Q-UAV and is written as shown in

A discrete state-space representation is required to model the Q-UAV controller in order to use a recursive estimation filter of motion states, e.g., the Extended Kalman Filter (EKF) or UKF; the developed system can be then described by a set of equations (5):

Here, is the vector of state variables at the th instant of ; and are, respectively, the inputs and outputs of the system; , , and are, respectively, the measurement function, additive process, and measurement noise.

In fact, the EKF has been widely accepted as a standard tool in the control and machine-learning communities. In this study, we used the UKF to estimate the altitude, position, attitude, and velocity control of the Q-UAV. This addresses many of the approximation issues of the EKF and consistently achieves an equal or better level of performance at a comparable level of complexity. The performance benefits of UKF-based algorithms have been demonstrated in a number of application domains, including state estimation, dual estimation, and parameter estimation [65, 66]. There are a number of clear advantages to the UKF, e.g., the mean and covariance of the state estimate are calculated to second-order or better, as opposed to first-order in the EKF. This allows more accurate implementation of the optimal recursive estimation equations, which is the basis for both the EKF and the UKF. While equations specifying the UKF may appear more complicated than the EKF, the actual computational complexity is equivalent. More detail about the use of the UKF algorithm for the Q-UAV controller will be provided in the fourth section.

3.2. General Control Architecture for a Q-UAV

There are three main systems within the physical structure of a Q-UAV as follows: the guidance system is used to provide the desired path for the Q-UAV to track, the navigation system is responsible for estimating the current state of the Q-UAV, and the control system is used to calculate and apply the control forces and moments to conduct this Q-UAV. These subsystems have missions to be accomplished, yet they must also cooperatively operate to allow the Q-UAV to fulfill its tasks, even in the presence of unknown environmental disturbances. Figure 1 shows a general block definition diagram in SysML, which captures how these subsystems interact.

As previously stated, control systems and their actuators can be considered models including discrete events and continuous behaviors that can be named HDSs. Furthermore, controlled systems do not always have the same behavior because they are associated with validity hypotheses that need to be checked at any moment, as well as security forces to envisage events and behaviors different from nominal behaviors. In this paper, we are also interested in analyzing and designing an industrial HDS (IHDS). This IHDS contains two parts, which are the HDS controller and controlled HDS. These parts mutually exchange periodic signals and episodic events. The episodic event is either external or internal.

Figure 2 shows the block diagram of an IHDS. Here, and are, respectively, output and input events; and are, respectively, output and input signals; is a sampling period of the evolution model for control; and Actor1, Actor2, and Actor are descriptions of a coherent set of roles that users (i.e., persons or involved external systems) play when they interact with the developed IHDS.

As shown by the above Q-UAV dynamic and general control architecture together with the described characteristics of the IHDS, controllers of Q-UAVs are then considered as IHDSs whose dynamic behaviors can be modeled by HA. These control systems have continuous/discrete parts and they have interactions, such as those with motional components, e.g., horizontal transferring, VTOL, and rotation, external interacting events from the guidance and navigation system, and environmental disturbances. In this study, we are interested in developing a trajectory-tracking controller of Q-UAVs, so this hybrid dynamic model can be used to form control algorithms combined with a specific guidance law such as the Line-Of-Sight (LOS) guidance implemented in [6770].

4. Model-Driven Development for a Q-UAV Controller

As previously stated, the CIM, PIM, and PSM components of MDA/MBSE combined with the real-time UML/SysML are specialized for analyzing and designing control components of complex control systems, e.g., the Q-UAV controller, in detail. Following the above-described Q-UAV dynamics and general control architecture for the real-time UML/SysML specifications, we specialize the MDA/MBSE approach in detail for deploying the Q-UAV controller that consists of the following three models: CIM, PIM, and PSM. This separates the operation specifications of the system from the details of the way that the system uses the capabilities of its platform. All of the artefacts and activities in CIM, PIM, and PSM for a Q-UAV controller will be detailed in the next subsections.

4.1. CIM for a Q-UAV Controller

In the CIM, object collaborations with the real-time UML/SysML are based on the use case model, together with the specifications of continuous behaviors including the implemented functional block diagram, the IB, and UKF algorithms, and HA in order to closely depict the control requirements for a Q-UAV controller.

The main use case model of a Q-UAV controller is defined as shown in Figure 3. It encompasses an example of trajectory-tracking scenarios and the local state machine of the “Track a desired trajectory” use case, which are, respectively, shown in Figures 4(a) and 4(b)). In Figure 4(a), the “loop(5)” fragment is a value typically seen in the practice of LOS guidance, as shown in [71],

where (i)MDS is the Measurement-cum-Display System, consisting of the guidance and navigation systems, because both of them essentially act as a signal supplier for the controllers of Q-UAV(ii)AES is the Air Environment System including disturbances generated by the weather(iii)The “Track a desired trajectory” use case is performed for tracking the desired trajectory for the vehicle to follow(iv)The “Ensure safety” use case is used to maintain system safety when one of its components fails or its supplied power is low or there is bad weather(v)The “Configure” use case permits users or maintainers to configure and update control parameters for starting up the controllers(vi)The “Maintain” use case is performed for maintaining the whole system which includes activities, e.g., error identification and correction of the whole physical Q-UAV or periodical maintenance

In the use case model, industrial maneuvering constraints, e.g., the maximum tilted angle, velocity, altitude, and other safety modes of the Q-UAV, need to be set up. In this study, a functional block diagram must be built to model the continuous dynamics of the Q-UAV controller, because the real-time UML/SysML lacks the constructs for depicting internal continuous models for each state situated in the state machine diagram. Thus, we propose an implemented functional block diagram to gather the internal continuous behaviors of the Q-UAV controller, as shown in Figure 5,

where (i)Desired trajectory and take-off/landing are events that are used for providing, respectively, the desired position and altitude to the blocks of position and altitude control(ii), are desired rotational speeds, which are applied to the four motors(iii) and are the overall output forces and moments acting on the Q-UAV

As previously mentioned, the UKF algorithm is used to estimate the altitude, position, attitude, and velocity control. Following the Q-UAV dynamics in equation systems (1)–(5), the application details of the UKF algorithm for a Q-UAV controller are shown in Algorithm 1.

FunctionUKF algorithm              StepUKF update
StepUKF predict                     Data:
Data:                 Result:
Result:                    
     
                  
End                           
                           
                           
                           end

In Algorithm 1, denotes an estimate; is the state covariance; and are, respectively, the covariance matrices of process and measurement noise, assumed to be zero mean stationary white noise with zero cross-correlation; the state is recursively estimated starting from the assumed initial conditions as and ; and the Unscented Transform (UT) is a deterministic sampling technique that allows us to compute the mean and the covariance matrix of a random variable. It undergoes a generic nonlinear transformation by propagating a minimum set of its samples and exploiting the knowledge of the mean and the covariance of the starting variable.

In addition, the IB expansion combined with the CLF for Q-UAV controllers is well used in many Q-UAV control applications, for instance [72, 73]. PID regulators can be applied to the functional block of motor control to reduce the inertial and delay time caused by the physical Q-UAV actuators in the whole system’s evolution.

In the CIM, hybrid automata (HA) are specified to present the mathematical implementation model of the Q-UAV controller consisting of terms such as the situations, continuous state variables, event, transition, global continuous behavior, and invariants. An HA of the Q-UAV controller () is established by data as follows:

Here, is a set of operation modes called the situations of , e.g., the modes of hovering, transferring, taking off, and landing; is the initial situation; is the continuous state-space of continuous elements of the Q-UAV, e.g., the control blocks of a motor, position, altitude; is the initial value of this space; is a set of external interacting events for triggering movement from the current situation to the reached situation, which is issued from the guidance and navigation systems as well as environmental disturbances for the Q-UAV controller; is a set of transitions between the situations that are linked via appropriate events ; is called the invariant term of the situation and is used for verifying when the situation is ; the continuous state must be then ; and is the global continuous model issued from the 6 DoF dynamic model in equations (1)–(5) and the implemented functional block diagram (Figure 5). The global evolution of the continuous state is performed when a new situation is reached in the operation modes of the Q-UAV. The details of HA specialization and its hypotheses for the evolution of a control system can be seen in previous reports [74, 75].

4.2. PIM for a Q-UAV Controller

The above-defined CIM is transformed into a PIM that is based on the use case approach [5, 6], real-time UML profile [1720], and IBM Rational Rose RealTime or IBM Rational Software Architect RealTime tools [76]. The goal of the PIM is to closely build up the real-time control capsules, ports, protocols, and their timing evolutions, which allow the precise behaviors and structures of the Q-UAV controller to be designed. From the above-defined CIM components, the five main control capsules have been specialized to participate in the HA evolution of the Q-UAV controller: the continuous part’s capsule, the discrete part’s capsule, the internal interface’s capsule, the external interface’s capsule, and the Instantaneous Global Continuous Behavior (IGCB’s capsule). Figures 68 indicate the real-time capsule pattern for the Q-UAV controller by using the real-time UML’s collaboration, class, and sequence diagrams.

In Figure 6, the discrete part’s capsule consists of the situations and transitions in the HA of the Q-UAV controller; the continuous part’s capsule contains the continuous state-space ; the IGCB’s capsule builds up concrete global continuous behaviors as , where is derived from equations (1)–(4) and the implemented functional block diagram (Figure 5) can be implemented in for estimating the values of the position, altitude, attitude, and velocity of the Q-UAV; the internal interface’s capsule permits the tool to generate internal events in the HA evolution; and the external interface’s capsule is an intermediary that receives or sends episodic events and periodic signals between the Q-UAV controller and their interacting systems, such as the AES and MDS.

In Figure 8, the messages exchanged between the main control capsules, which are defined by the protocols (Figure 7), are synchronous, and the interval between two adjacent timeout messages indicates the sampling period () of the IGCB’s capsule. The external interface’s capsule receives periodic signals coming from external continuous components. It then gives the ContinuousElement message to the IGCB’s capsule so that the IGCB’s capsule can call all of the continuous elements corresponding to the concrete “IGCB:IGCB1.” During the call of the IGCB’s capsule, the external interface’s capsule can receive an event named “3: InputEvent” issued from the MDS or AES, and this event, named “ee1: DetectedEvent”, is given to the discrete part’s capsule. The discrete part’s capsule then memorizes and later processes this event. If the IGCB’s capsule receives the LastContinuousTerminal message coming from the continuous part’s capsule, it gives the ContinuousEvolution message to the continuous part’s capsule so that the internal interface’s capsule can receive all updated variables. The internal interface’s capsule then verifies the invariant () of the situation . In this case, there is a generated internal event. The internal interface’s capsule gives this event to the discrete part’s capsule, which permits the IGCB’s capsule to identify the concrete “IGCB:IGCB2” and give output signals to the external interface’s capsule. At the end of this sampling period, the external interface’s capsule gives the output event and control signals to the external environment of the Q-UAV operating with its concrete”IGCB:IGCB2.”

Tools such as HyTech, CheckMate, PHAver, and HSolver [77] can be used to test a hybrid automaton to verify the generally dynamic behaviors of the Q-UAV controller. At this moment, formal tools, such as IBM Rational Test RealTime [76], also exist to directly test a capsule collaboration. This tool permits us to validate a set of input sequences and defined objects in order to make sure the behaviors of the system are well modeled. Moreover, we can find software tools such as IBM Rational Rose RealTime and IBM Rational Software Architect RealTime [76], which can be used to support the formal reuse of designed control components. They permit us to undergo reverse engineering of applications to track the requirements of the developed systems. In particular, we can also use the SystemVerilog tool [58, 59] and a novel NLP framework [60] to completely validate the control requirements and design models of the developed system.

In addition, the reusability is very important when implementing controllers for different applications of UAVs of the VTOL type because it can reduce the development time and cost. The specializations, which permit the capsule collaboration of a developed Q-UAV to be customizable and reusable in the new control application for various UAVs of the VTOL type, are summarized in Table 2.

4.3. PSM for a Q-UAV Controller

To realize and deploy the Q-UAV controller, the PIM is first implemented in the PSM (i.e., the simulation model) that is transformed from the above-built PIM by using tools such as the IBM Rational Rose RealTime or IBM Rational Software Architect RealTime [76] or Papyrus for Real-Time (Papyrus-RT) [78] and Modelica/OpenModelica [21, 79]. Here, the IBM Rational provides a rich set of capabilities delivered as part of a collaborative and integrated range of products to support the real-time UML design of industrial software systems. Papyrus-RT is an industrial-grade, complete open-source modeling environment that is used for the development of complex, software-intensive, real-time, embedded, and cyber-physical systems. It acts as an implementation of the real-time UML together with editors, a code generator for C++, and a supporting runtime system. In addition, OpenModelica is an open-source modeling and simulation environment intended for industrial and academic usage. It is an object-oriented declarative multidomain modeling language that is used for complex dynamic systems. The OpenModelica environment allows most of the expression, algorithm, and function parts of Modelica to be executed interactively, as well as equation models and Modelica functions to be compiled into efficient C/C++ codes. The simulation results in OpenModelica allow us to theoretically assess the control performance and to choose the properties of control elements before they are deployed.

In this study, the PIM with optimized control elements in the simulation model was updated to obtain a new PIM for the deployment model of Q-UAV called PIM+. Finally, this PIM+ was transformed into the new PSM+ (i.e., the realization model) by using various specific platforms based on the object-oriented Implementation Development Environment (IDE), e.g., the Arduino’s IDE [22], to construct a Q-UAV controller with compatible microcontrollers, e.g., the ATMEGA32-U2 and STM32 Cortex-M4 microcontrollers [22]. The above PIM-PSM transformations were performed through round-trip engineering (i.e., forward and reverse engineering) of the intermediate C++ codes, including about 80% of the generated codes and 20% of the hand-crafted codes issued from the models depicted in IBM Rational Rose RealTime or IBM Rational Software Architect RealTime or Papyrus-RT, OpenModelica tools, and the Arduino’s IDE. The transformation rules that were used to convert the PIM into the PSM or the PIM into the PSM and vice versa through the round-trip engineering of the intermediate C++ codes can be found in the authors’ reports [50, 74, 75].

In addition, the above-defined HA can be automatically implemented by using the State pattern described in [80, 81]. The State pattern represents either of the following cases: (i) an object’s behavior depends on its state, and the object must change its behavior at run-time depending on that state, and (ii) operations have large, multipart, conditional statements that depend on the object’s state. This state is usually represented by one or more enumerated constants. Often, several operations contain this same conditional structure. The State pattern puts each branch of the conditional structure in a separate class. This lets us treat the object’s state as an object in its own right that can vary independently from other objects. Following this pattern, the detailed implementation structure and codes of HA have been found in the author’s report [74] to enhance the significant programming effectiveness of the control program of Q-UAV.

5. Application

5.1. Physical System Configurations

Based on the above-proposed hybrid model, a trajectory-tracking controller that permits a low-cost Q-UAV to reach and follow the predetermined trajectory was developed. Figure 9 shows the Computer-Aided Design (CAD) model of this Q-UAV used for the case study. The main operational parameters of the Q-UAV are summarized in Table 3.

5.2. Results of Control Implementation

All elements of the analysis and design models were created to allow the implementation of the trajectory-tracking controller of this Q-UAV. Here, we present some of the control simulation results that were obtained through the following simulation cases: the guidance system addressed a desired event of taking-off to the Q-UAV with an altitude of 15 m; the transient control response in the -direction is illustrated in Figure 10(a); Figure 10(b) shows the transient control response in the -direction when the Q-UAV received the desired event of transferring with a desired distance of 15 m in the -direction from the current position. All of the obtained simulation results allow the control performance of the system to be assessed theoretically within the control criteria such as the admissible timing response, the transition, and static errors. The assessed simulation results permitted us to choose the designed control elements and their properties that were used to perform the deployment phase.

In this case study, the defined state-space models presented in equation systems (4) and (5) were implemented by the UKF algorithm (Algorithm 1) to predict the motion states corresponding to the sensors installed on this Q-UAV, such as the IMU MPU6000 with a working frequency of 100 Hz [23] and the GPS Ublox Neo 6M with a working frequency of 10 Hz [24]. The ATMEGA32-U2 and STM32 Cortex-M4 microcontrollers [22] were used on the main board, and the control program was installed with Arduino’s IDE [22] based on C++ language. The Q-UAV installation for trial flights is shown in Figure 11.

The main test cases and obtained results for the Q-UAV are illustrated and were used to assess the control performance of this Q-UAV as follows: (i)First test scenario: the Q-UAV autonomously reached and followed a desired polygon-shaped trajectory with heading angles of about 90° and 110° and an average velocity of 2.5 m/s (Figure 12). The maximum trajectory error was about 1.40 m against each Way-Point (WP) position at these heading angles.(ii)Second test case: the Q-UAV was capable of Vertical Take-Off and Landing (VTOL) with a maximum altitude of 480 m (Figure 13); the landed position error was 0.30 m against the initial take-off position(iii)Third test scenario: the Q-UAV autonomously reached and followed a desired zigzag-lined trajectory with various heading angles and an average velocity of 2.5 m/s (Figure 14). The maximum trajectory error was about 1.20 m against each WP position at these heading angles

Following the comparison between the above-obtained experimental data and the existing experimental results presented in [74], in which the EKF algorithm was used to implement the same physical Q-UAV model, the trajectory-tracking controller of this Q-UAV had an improved stabilized trajectory error, which decreased by about 0.2–0.4 m. From this case, we also found that the UKF can provide considerable improvement over the EKF in the control implementation for VTOL-type UAVs.

6. Conclusions and Future Work

This paper presented a hybrid control that can be used to conveniently realize controllers for Q-UAVs whose global behaviors mean that they can be considered industrial HDSs (IHDSs). This model is mainly based on the specialization of MDA/MBSE features combined with the real-time UML/SysML, UKF algorithm, and HA to closely implement and realize the control parts of the system. The Q-UAV dynamics and control architecture were firstly adapted for the control and combined with the specialization of MDA/MBSE features including the CIM, PIM, and PSM components. In the CIM, the use case model was specialized with continuous behaviors, the UKF algorithm, and HA to closely capture the requirements of the analysis for a Q-UAV controller. The PIM was built to obtain a detailed design model by specifying the control capsules, ports, and protocols enclosed with their timing evolutions in order to model the behaviors and structures of the Q-UAV controllers in detail. The designed PIM components were also used to create a real-time capsule pattern that can be customized and reused in new UAV applications, of which operating modes are capable of VTOL, hovering, and horizontal flight. The updated PIM with the optimized control elements of the simulation model (PIM+) was then transformed into PSM+ through the round-trip engineering of the intermediate C++ codes in order to form a Q-UAV controller with compatible microcontrollers. Based on this proposed hybrid control model, a trajectory-tracking controller of a low-cost quadrotor UAV was deployed and tested out on the Arduino ATMEGA U2 and STM32-Cortex-M4 microcontrollers.

Furthermore, the above-developed control application confirms that the MDA/MBSE approach combined with the real-time UML/SysML provides a framework for, and enables, tools to be provided to specify a system independently of the platform that supports it, specify platforms, choose a particular platform for the system, and transform the system’s specifications into one for a particular platform. However, the real-time UML/SysML versions lack the constructs required for modeling internal continuous behaviors for each state on the state machine diagram, so an implemented functional block diagram must then be defined in the CIM to model continuous behaviors for industrial HDSs such as the Q-UAV controller with events issued from outside.

We only applied the above-proposed control model in the low-cost Q-UAV controller and intend to implement it in new control applications for autonomous coordinated vehicles. Eventually, if we get positive feedback, we will investigate our application strategy to make it more effective. This will permit us to create controllers to effectively balance the search and target response in cooperative teams of a VTOL-type UAV with an unmanned ship and multiple autonomous underwater vehicles for ocean exploration. This will be specialized with design and verification models of safety-critical systems, as indicated by [5860].

Abbreviations

CIM:Computation Independent Model
MDE:Model-Driven Engineering
CLF:Control Lyapunov Functions
NLP:Natural Language Processing
DoF:Degrees of Freedom
OMG:Object Management Group
GPS:Global Positioning System
PID:Proportional–Integral–Derivative
HA:Hybrid automata
PIM:Platform Independent Model
HDS:Hybrid Dynamic Systems
PSM:Platform Specific Model
IB:Integral Backstepping
Q-UAV:Quadrotor Unmanned Aerial Vehicles
IDE:Implementation Development Environment
SDLC:System Development Life Cycle
IGCB:Instantaneous Global Continuous Behavior
SMC:Sliding-Mode Control
IMU:Inertial Measurement Unit
SysML:System Modeling Language
LQ:Linear Quadratic
UKF:Unscented Kalman Filter
LOS:Line-Of-Sight
UML:Unified Modeling Language
MBSE:Model-Based Systems Engineering
UMLSV:UML profile for SystemVerilog
MDA:Model-Driven Architecture
WP:Way-Point.

Data Availability

No data were used to support this study.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This work was supported by the Centennial SIT Action for the 100th anniversary of Shibaura Institute of Technology to enter the top ten Asian Institute of Technology.