Loading [MathJax]/extensions/MathEvents.js
Coupled Cyber–Physical System Modeling and Coregulation of a CubeSat | IEEE Journals & Magazine | IEEE Xplore

Coupled Cyber–Physical System Modeling and Coregulation of a CubeSat

Open Access

Abstract:

We propose the application of state-space techniques to develop a novel coupled cyber-physical system (CPS) model and use feedback control to dynamically adjust CPS resou...Show More

Abstract:

We propose the application of state-space techniques to develop a novel coupled cyber-physical system (CPS) model and use feedback control to dynamically adjust CPS resource use and performance. We investigate the use of a gain scheduled discrete linear quadratic regulator controller and a forward-propagation Riccati-based controller to handle the discrete-time-varying system. We demonstrate the value of our approach by conducting a disturbance-rejection case study for a small satellite (CubeSat) application in which resources required for attitude control are adjusted in real-time to maximize availability for other computational tasks. We evaluate CPS performance through a set of metrics quantifying physical system error and control effort as well as cyber resource utilization and compare these with traditional fixed-rate optimal control strategies. Results indicate that our proposed coupled CPS model and controller can provide physical system performance similar to fixed-rate optimal control strategies but with less control effort and much less computational utilization.
Published in: IEEE Transactions on Robotics ( Volume: 31, Issue: 2, April 2015)
Page(s): 443 - 456
Date of Publication: 24 March 2015

ISSN Information:


SECTION I.

Introduction

Cyber–physical systems (CPS) are “engineered systems that are built from and depend upon the synergy of computational and physical components” [1]. While systems comprised of physical and computing (cyber) components have existed for decades, typically the design and analysis of the physical elements have not considered computational and communication elements and vice versa, except to ensure the minimum requirements imposed by one can be met by the other (e.g., a physical vehicle must carry, power, and dissipate heat from computing elements). Here, “physical” implies elements of the system occupying physical space, whereas “cyber” refers to the intangible “thinking” (computing) and “communicating” components of the system. This makes CPSs analogous to the mind–body paradigm in biological animals.

CPS as a field of study is growing rapidly. CPS research emphasizes the need for new models, abstractions, methods, metrics, and codesign techniques that encapsulate the system more holistically than was previously possible. While the depth offered by separately modeling and analyzing physical and cyber subsystem behaviors is useful, aberrant system behavior (i.e., when laws of compositionality or composability do not hold) may be undesirable at best and dangerous at worst. Accounting for as many subsystem interactions as possible can reduce the negative side effects of such behaviors as well as providing provable holistic system characteristics (e.g., stability) [2]. Integrated analyses can enable more efficient, safe, secure, and capable systems as we increase the level of autonomy in CPS devices and vehicles.

CPS typically requires an interacting suite of communication and processing tasks. This requirement can become a limiting factor forcing real-time System (RTS) engineers to design inflexible schedules. RTS designers traditionally aim to provide hard timing guarantees particularly for safety-critical physical system controllers, with best-effort execution of noncritical (soft real-time) tasks. For sampled-data control systems, this is done using periodic or time-triggered sampling of the system also known as Riemann sampling [3]. The effects of processor unavailability are rarely taken into account during the design of the physical system controller; therefore, hard timing guarantees are expected. Without taking computing system limitations into account, the controller may ask for more resources than are needed to achieve performance objectives. As a result, Riemann sampling may waste cyber resources during quiescent periods of physical system activity, in addition to providing suboptimal system performance [3], [4]. Event-triggered or Lebesgue sampling holds promise for better resource utilization and control performance at the expense of scheduling complexity for the RTS [3]. Perhaps more importantly, although there has been some recent work exploring event-based feedback control [4]–​[8], as well as a hybrid control approach that switches between Riemann and Lebesgue sampling [9] , Lebesgue sampling is still a largely unexplored area relative to Riemann sampling [3].

In the early 2000s, NASA and the Department of Defense (DoD) pushed to increase autonomous operations onboard spacecraft to help accomplish mission objectives more efficiently [10]. Due to their safety-critical nature guidance, navigation, and control (GNC) activities are traditionally allocated cyber resources in accordance with a worst-case-maneuver scenario. This has relegated science activities to utilization of remaining resources to accomplish science-related computing tasks. Typically, cyber resources onboard spacecraft are exceedingly scarce relative to modern desktop or laptop computers due to stringent radiation-hardened and certification requirements as well as limited onboard power and heat dissipation capability. EO-1 [11] was the first of a series of NASA missions entitled “Earth Observer” (EO) targeting both science and technology demonstration goals. It had two Mongoose M5 processors, one for command and data handling functions and one dubbed “Wideband Advanced Recorder Processor” (WARP). EO-1's Autonomous Sciencecraft Experiment was required to meet autonomy and science objectives utilizing 4 MIPS and 128 MB RAM of computing resources on the WARP processor alone [12]. Such difficulties have identified the clear need for resource reclamation such that GNC and other activities are allocated cyber resources in accordance with need to maximize mission productivity. However, spacecraft missions to-date have yet to run GNC tasks at slower rates than would be required for worst-case maneuver scenarios [13].

In this paper, we apply state–space techniques to the real-time feedback coregulation of physical actuation and real-time controller task rate of execution (or sampling rate) for attitude control of a small spacecraft (CubeSat). With this scheme, computational resources devoted to attitude control during quiescent periods can be directed to other tasks such as communication, data gathering/processing, or mission planning. Because linear feedback control is used to regulate sampling rate, computing complexity is O\left(1\right) thereby offering minimal overhead for scheduling resources.

We conduct a CubeSat case study simulating disturbance rejection to the 3-DOF attitude of the CubeSat which uses reaction microwheels as physical actuators for attitude control. The CubeSat has an onboard computer and real-time operating system (RTOS) with presumed schedulability restraints representing the cyber system. A modeling abstraction of control task execution rate is coupled to the state–space model for attitude control allowing the dynamic adjustment of that rate and forming a discrete-time-varying CPS model. We apply two new controllers to handle the discrete-time-varying system: a feedback controller where the gains are scheduled over the time-varying sampling rate of the system and a forward-propagation Riccati-based (FPRB) controller. Although LQR gains are often scheduled using high-performance bounded LQR (see[14], [15] ) in aerospace applications, we believe this to be the first time controller gains have been scheduled over a dynamically changing control task execution rate. We further hope to add more empirical evidence of the utility of (and forward-integration) FPRB controllers, the full understanding of which remains an open question in control theory [16]–​[19]. Finally, we evaluate coupled CPS performance in terms of physical tracking error, control effort, and CPU resource requirements for the control task.

We aim to provide the benefits of Riemann sampling: ease of RTS scheduling, hard timing guarantees, and the rich theory of digital control while also providing some of the benefits of Lebesgue sampling: as-needed cyber resource utilization. Our abstraction allows an engineer to treat scheduling of a control task as a control problem where interactions between cyber and physical states are represented in a common regulation framework.

In this paper, we further work in [20] and [21] by refining and simplifying the state–space representation of the cyber system and rigorously capture its form using digital control formulations. We also introduce two new controllers for discrete-time-varying systems: Gain-Scheduled Discrete Linear Quadratic Regulator (GSDLQR) and a FPRB controller discussed in Section IV-B. Alongside these new physical control laws, we introduce two cyber control laws for the cyber system as discussed in Section V-C . Metrics similar to those we developed in related work [22] are used to measure simulated performance of the proposed physical and cyber control laws applied to attitude control of our CubeSat. To our knowledge, this is the first time a dynamic sampling rate scheme has been investigated for a spacecraft.

SECTION II.

Background and Related Work

Although CPS research is, by necessity, multidisciplinary, CPS researchers have largely arisen from the control and RTS communities underscoring the importance of the interaction between computing and control functions in a system. Next, we first discuss the ter illustrate the obstacles resulting from controller implementation on a digital computer. We then discuss research aimed at overcoming those obstacles as it relates to CPS. This is followed by a discussion of CPS applied to aerospace systems and how our work relates.

A. Real-Time Systems and Digital Control

Since computing resources are finite, a simplifying assumption of infinitely-fast sampling rate is not realizable in practice. In a RTOS processor, time is allocated to tasks according to a schedule. If we use a RTOS to implement control of a system, the timing of reading sensors, calculation of control input, and output of the control signal is of paramount importance and can have an impact on both the design of the controller and the scheduling algorithm. In traditional control theory, one of two approaches to digital control are typically applied [23]:

  1. An engineer designs a continuous-time controller to meet appropriate timing, steady state, overshoot, and stability margin requirements. A sampling rate meeting design criteria is selected, and a discrete equivalent of the continuous controller is found. This method of design is called emulation.

  2. A sampling rate meeting design criteria is selected. The system is then discretized at that sampling rate, and digital control techniques are used to design an appropriate controller.

In either case, the assumption is then made that the RTOS can guarantee the sampling rate chosen.

Assume \tau _{1} is a control task implemented on an RTOS. That is, assume \tau _{1} receives sensor values from the A/D converter, obtains an updated system state estimate \mathbf {x}_{p}, computes the control input \mathbf {u}_{p}, and outputs the control signal to the D/A converter. In addition, assume that the control input is applied at the completion of the task and is held for T_{\tau _{1}} seconds, which is the period of task \tau _{1}. Note that T_{\tau _{1}} is the control task period or sampling period and that \frac{1}{T_{\tau _{1}}}=r_{\tau _{1}} is the sampling rate or control task execution rate. In a preemptive RTOS containing multiple high-priority tasks, timing is unpredictable. We do not know precisely when the control task will be executed or whether it will be preempted by a higher priority task. We only know that it will complete by its deadline which we assume is T_{\tau _{1}}. We demonstrate this in Fig. 1. In this schedule, each task has a periodic rate at which it must be executed, but because the tasks are preemptable higher priority tasks may be serviced first. Schedule feasibility is determined based on the worst-case execution time of a task \tau \left({\rm WCET}\left(\tau \right)\right) and total system utilization. In a preemptive scheduling paradigm, the delays for the physical system being controlled are \begin{equation*} \dot{\mathbf {x}}_{p}\left(t,\Delta t\right)=\mathbf {A}_{p}\mathbf {x}_{p}\left(t,\Delta t\right)+\mathbf {B}_{p}\mathbf {u}_{p,{\rm ZOH}}\left(t,\Delta t\right) \end{equation*} View SourceRight-click on figure for MathML and additional features.where \Delta t\in \left[{\rm WCET}\left(\tau _{1}\right),T_{\tau _{1}}\right] and \mathbf {u}_{p,{\rm ZOH}}\left(t,\Delta t\right) represents the zero-order held (ZOH) control input at time t which is held for task period T_{\tau _{1}}. In the preemptive RTOS, the delay is dictated by context switches between tasks, the task period T_{\tau _{1}}, any tasks that preempted \tau _{1}, and the computation time required to complete \tau _{1}.

Fig. 1. - Preemptive scheduling on a single processor.
Fig. 1.

Preemptive scheduling on a single processor.

Traditional digital control leverages the sampled-data system assumption that the reading of sensors, calculation of control input, and output of the control signal happens instantaneously and always with a current estimate of the physical system state. That control input is then “held” for the entire sampling time until the next cycle. In other words, it is assumed there is no delay in the system. The problem of control under the varying delays associated with digital real-time control have been studied extensively in the Digital Control, Networked Control Systems, Automotive, Aerospace, and RTS communities [23]–​[31].

B. Cyber–Physical System Foundations

From the cyber perspective, RTS research focuses on task scheduling to provide guarantees of hard-deadline tasks and the best effort and execution of soft-deadline tasks. Offline static schedulers as well as online dynamic schedulers have been proposed to provide provable timing guarantees for given task sets [32] . Some RTS-centric CPS research has attempted to redefine task execution and scheduling paradigms to accommodate and provide guarantees for classes of tasks suited for more dynamic CPS, for example, tasks with varying periodicity [8], [33]. Anytime control [34]–​[36] tries to improve controller accuracy as a function of available cyber resources. In feedback scheduling [37]–​[41], cyber resource allocation is modified in real time according to the evolving needs of the tasks requiring these resources; however, specifics of how these tasks compute their resource needs are abstracted out of the scheduling problem.

The control systems community has established a theory of hybrid systems to simultaneously capture continuous and discrete state models. In a hybrid system, a finite state machine represents discrete system modes potentially having different sets of dynamics, constraints, and controllers. This formulation has provided the ability to model systems that switch between different controllers, potentially with different task rates, and that “jump” or switch through discontinuities or nonlinearities [42], [43]. Control-theoretic analyses of hybrid systems has focused on characterizing reachability and guaranteeing stability of all reachable states. Stability has been an important topic in hybrid systems research and has followed traditional Lyapunov-based energy proofs [44]. Research in this area has primarily focused on handling the “jumps” typically representing nonlinearities in system dynamics rather than changes in control task execution rate.

The research most related to our work has come from researchers who have examined event-triggered control and time-varying control and sampling to reduce the number of sampling instants. Bini and Buttazzo recently proposed an optimal control formulation to optimize both control inputs and sampling pattern trajectory, a computationally feasible quanitzation-based method to estimate or approximate the optimal control solution, and proved optimality for first-order systems [45]. Varying time control is proposed by Kowalska and Mohrenschildt wherein a similar optimal control problem over control inputs and sampling instants is solved for a receding horizon with a computationally tractable algorithm [46] but loss of optimality guarantee [45]. Our work is similar by allowing for variable sampling instants, but whereas their work focuses on optimality over a planned trajectory, our technique focuses on increasing robustness to system disturbances and deviations from planned trajectories through proportional feedback control which determines the sampling rate. Additionally, our feedback coregulation scheme could be used to supplement optimal sampling pattern techniques by accepting the optimal sampling pattern as the reference trajectory and using feedback coregulation to offer minor adjustments based on aberrant conditions.

C. Aerospace Cyber–Physical System

Safety-critical aerospace systems require task schedules executing on RTOSs that have been analyzed offline to show hard deadlines are met and that soft real-time tasks will receive sufficient attention for effective mission accomplishment. To date, aerospace systems, particularly low-cost platforms such as CubeSats and small Unmanned Aircraft Systems, have additional cyber resources beyond what would be minimally required if a RTOS was used. This allows tasks to be executed in a best-effort or soft real-time mode as would be provided by an embedded Linux distribution. This speeds design and development in that the full suite of Linux-based tools and kernel modules can be used. This simple execution strategy can be successful so long as tasks either underutilize available cyber resources or the system is never placed at risk by missing one or more deadlines.

Large spacecraft systems have typically addressed the problem of physical and cyber resource utilization through task scheduling. For an orbiting spacecraft, science payload data collection must often occur within a relatively short time window (e.g., a few minutes for low earth orbit [47]). During this window, the system must maximize its efforts to collect science data. There is generally a short time window during which the system can prepare resources for this intense data collection activity. Traditionally, such task scheduling problems have been addressed by ground operators manually constructing plans with write and check procedures [47]. The Continuous Activity Scheduling, Planning, Execution, and Replanning planner was used onboard EO-1 to optimize science activities based on incoming data [12]. An iterative repair algorithm was used to improve task execution schedule. This science planner was highly successful and has continued to evolve for infusion into additional missions. Other planners include the Automated Scheduling and Planning Environment where scheduling is combined with mission planning [48] and the Heuristic Scheduling Testbed System [49].

We present this related work to create awareness that the work presented in this paper couples cyber and physical systems in the regime of equations of motion rather than models used for task scheduling. That is, at the feedback control level, cyber and physical resources are balanced dynamically rather than at a higher planning level presumed in [45] and [46] and in traditional satellite task scheduling. Our approach does not replace traditional planning, but rather supplements it by allowing reactive reallocation of resources within the reference trajectories commanded by the planner.

D. Our Previous Work

In [21] and [20], we first formulated a holistic CPS control system for coregulation through the addition of cyber “states” to the state–space formulation of traditional inverted pendulum and spring-mass-damper control systems. The additional states were used to govern sampling rate thereby fitting into a dynamic scheduling paradigm. In hybrid systems, NCS, and digital control, the sampling rate is chosen, designed, and analyzed offline, a priori, or in the case of optimal sampling control sampling instants are chosen for a receding horizon. Our formulation instead allows for the dynamic adjustment of the sampling rate in response to disturbances (or changes in tracking error) by adjusting cyber resources in conjunction with physical system performance.

The cyber model used in [21] and [20] was a double integrator which limited the response of the cyber system. However, a digital device capable of reallocating its resources in discrete intervals via task scheduling or varying CPU voltage would be capable of applying an “impulse” to the system that enables sampling rate to step between values. In this manuscript, we propose a model more closely matching this reality.

SECTION III.

CubeSat Equations of Motion

Attitude control of a class of picosatellites called “CubeSat” [50] is a compelling CPS challenge because of the unstable system dynamics and widely-varying pointing accuracy requirements for data collection and communication versus quiescent drift periods. Typically, science data can be collected much faster than it can be communicated, a problem confounded by constraints on orbital windows in which a ground station is accessible. This requires the CubeSat to devote substantial effort to manipulating data onboard, as was done with EO-1 [12], to improve science output. CubeSats, therefore, usually contain substantial computing power for their size. At any given time, computational activities on a CubeSat can easily consume 10%–50%1 of available energy resources, motivating the need for CPS codesign techniques that coregulate both cyber and physical resources.

CubeSat missions are accomplished with a 1\hbox{-}3\, {\hbox{kg}} satellite containing major onboard subsystems such as attitude control, communication, power distribution, generation, and storage, command and data handling, and payload. Pointing may require rotational movements once or more per orbit depending upon the mission. A spacecraft in a 500\, {\hbox{km}} circular orbit spends 38% of its time in eclipse meaning that energy can be generated during the other 62% of the orbital period. Since a typical time period for a \hbox{500}\,\hbox{-}\hbox{km} altitude orbit is about 95\, {\hbox{min}}, this poses a challenge for energy utilization. Data transmission requires energy that depends on multiple factors such as data rate, signal strength, antenna size and type, etc. These factors provide motivation for communication and position-aware computing. In this study, we focus on making the cyber system (i.e., RTS) able to regulate the attitude control sampling rate so that it can achieve appropriate balance between that and resource availability for other tasks such as science data handling.

A. Equations of Motion

The equations of motion for attitude control of a CubeSat can be developed using Euler equations for rigid body kinematics and dynamics with a diagonal inertia matrix \mathbf {J} . The equations used in this paper assume a circular orbit and small perturbations about the equilibrium point about which the equations of motion are linearized. The dynamics about the pitch (subscript 2) axis are represented as \begin{eqnarray} \dot{\theta}_{2} & =&\omega _{2}\nonumber\\ \dot{\omega}_{2} & =&\frac{3\omega _{o}^{2}\left(J_{3}-J_{1}\right)}{J_{2}}\theta _{2}+\frac{M_{2}}{J_{2}} \end{eqnarray} View SourceRight-click on figure for MathML and additional features.where the body-fixed pitch axis is assumed to be aligned with one of the principal axes of the spacecraft. The torque applied \left(M_{2}\right) is equal to and opposite in direction to the rate of change of angular momentum of the microwheel ({\rm i.e.,}\, \dot{H}_{2}^{w}=-M_{2}). The angular velocity for a circular orbit is \omega _{o}=\sqrt{\frac{\mu}{R^{3}}} where \mu is the gravitational constant, and R is the radius of the orbit.

The dynamics about roll (subscript 1) axis and yaw (subscript 3) axis are represented by \begin{eqnarray} \dot{\theta}_{1} & =&\omega _{1}-\omega _{o}\theta _{3}\nonumber\\ \dot{\theta}_{3} & =& \omega _{3}-\omega _{o}\theta _{1}\nonumber\\ \dot{\omega}_{1} & =& \frac{\omega _{o}\left(J_{2}-J_{3}\right)}{J_{1}}\omega _{3}+\frac{3\omega _{o}^{2}\left(J_{3}-J_{2}\right)}{J_{1}}\theta _{1}+\frac{M_{1}}{J_{1}}\\ \dot{\omega}_{3} & =& \frac{\omega _{o}\left(J_{1}-J_{2}\right)}{J_{3}}\omega _{1}+\frac{M_{3}}{J_{3}}\nonumber \end{eqnarray} View SourceRight-click on figure for MathML and additional features.where roll and yaw axes are assumed to be aligned with the principal axes of the spacecraft perpendicular to each other and perpendicular to the pitch axis. Note that the equations of motion are linearized about an equilibrium point where the body-fixed axes of the spacecraft are aligned with a local vertical local horizontal (LVLH) reference frame. Hence, \left(\omega _{1},\omega _{2},\omega _{3}\right) are components of the perturbation about the equilibrium point in the angular velocity vector with respect to an inertial frame expressed in the body-fixed frame of reference. \theta _{1},\theta _{2}, and \theta _{3} are perturbations of the 3-2-1 Euler angles that define the spacecraft attitude with respect to the LVLH coordinate frame. The torque applied \left(M_{1},M_{3}\right) is equal to and opposite in direction to the rate of change of angular momentum of the microwheel \left({\rm i.e.}\, \dot{H}_{1}^{w}=-M_{1}\, {\hbox{and}}\, \dot{H}_{3}^{w}=-M_{3}\right).

We can rewrite the open-loop equations in state–space form \begin{equation*} \dot{\mathbf {x}}_{p}=\mathbf {A}_{p}\mathbf {x}_{p}+\mathbf {B}_{p}\mathbf {u}_{p} \end{equation*} View SourceRight-click on figure for MathML and additional features.where the states and controls are \begin{eqnarray*} \mathbf {x}_{p} & =&\left(\theta _{1},\theta _{2},\theta _{1}\theta _{3},\omega _{1},\omega _{2},\omega _{3},H_{1}^{w},H_{2}^{w},H_{3}^{w}\right)\\ \mathbf {u}_{p} & =&\left(M_{1},M_{2},M_{3}\right) \end{eqnarray*} View SourceRight-click on figure for MathML and additional features.and matrices \mathbf {A}_{p} and \mathbf {B}_{p} are taken from (1) and (2). The CubeSat considered is similar to the RAX-2 CubeSat developed and deployed by the Michigan Exploration Lab (MXL) in the University of Michigan Aerospace Engineering Department [51]. It has mass of 3\, {\hbox{kg}} with dimensions of 30\, {\hbox{cm}}\times 10\, {\hbox{cm}}\times 10\, {\rm cm} and inertia matrix \mathbf {J}={\hbox{diag}}\left(0.005,0.025,0.025\right)\, {\hbox{Kg}}\cdot {\rm m}^{2}. The altitude of the spacecraft is assumed to be 500\, {\hbox{km}} above Earth's surface which results in an orbital angular velocity \omega _{o}=0.0011\, \frac{\rm rad}{\rm s}. Because this work also introduces a cyber system model, we use the subscript “p ” to indicate that these equations depict the physical system.

Depending on the configuration of the spacecraft, the linearized system can either be stable or unstable [52]. For our CubeSat, the system matrix \mathbf {A}_{p} has unstable poles; thus, it requires active control to stabilize.

SECTION IV.

Discrete CubeSat Model

As discussed in Section II-A, there are several sources for uncertain delays when implementing a controller on an RTOS. Nevertheless, the traditional sampled-data assumption of no delay is reasonable to make under most scenarios. In a modern digital control system, it is likely that dedicated A/D and D/A converters remove conversion delays, and we assume that a predictive algorithm can always provide the current physical system state at the moment the control output is calculated thereby removing the delay in state estimation. This assumption allows us to leverage digital control theory to discretize the CubeSat model and design digital controllers.

A. Discrete CubeSat Model

If we assume the control task is a hard-deadline task and that execution deadlines are always satisfied by the RTS, we can discretize the system for a given sampling period. In the most general case, the discrete system matrices may vary due to parameter changes, uncertainty in dynamics, or in our case, a time-varying sampling rate. We reflect the discrete-time-varying nature of the system using the variable k, representing an execution cycle of the control task. Assuming a ZOH, we can write the physical system as \begin{equation*} \mathbf {x}_{p}\left(k+1\right)=\mathbf {\Phi}_{p}\left(k\right)\mathbf {x}_{p}\left(k\right)+\mathbf {\Gamma}_{p}\left(k\right)\mathbf {u}_{p}\left(k\right) \end{equation*} View SourceRight-click on figure for MathML and additional features.where \begin{eqnarray} \mathbf {\Phi}_{p}\left(k\right) & =& e^{\mathbf {A}_{p}T_{\tau _{1}}\left(k\right)}\nonumber\\ \mathbf {\Gamma}_{p}\left(k\right) & =& \int _{0}^{T_{\tau _{1}}\left(k\right)}e^{\mathbf {A}_{p}\eta}d\eta \mathbf {B}_{p}. \end{eqnarray} View SourceRight-click on figure for MathML and additional features.We note that in traditional digital control theory, a constant sampling period is assumed and the resulting system would be \begin{equation*} \mathbf {x}_{p}\left(k+1\right)=\mathbf {\Phi}_{p}\mathbf {x}_{p}\left(k\right)+\mathbf {\Gamma}_{p}\mathbf {u}_{p}\left(k\right) \end{equation*} View SourceRight-click on figure for MathML and additional features.in which system matrices \mathbf {\Phi}_{p} and \mathbf {\Gamma}_{p} are constant over each cycle [23].

B. Physical System Control Laws

The design of feedback controllers for a system that can dynamically adjust its own sampling rate is a relatively new area for research [45], [46]. As a result, we borrow from strong foundations in digital, optimal, and nonlinear control and seek to apply them to discrete-time-varying systems. We propose two controllers: a GSDLQR and a FPRB controller.

1) Gain Scheduled DLQR Control

Infinite horizon DLQR controllers are designed assuming a fixed sampling rate and constant system matrices. For a given stabilizing sampling rate, because our system is completely controllable it is possible to compute an infinite horizon DLQR controller with a finite cost where the cost function is given by \begin{equation} J=\frac{1}{2}\sum _{k=0}^{\infty}\mathbf {x}_{p}^{{\rm T}}\left(k\right)\mathbf {Q}\mathbf {x}_{p}\left(k\right)+\mathbf {u}_{p}^{{\rm T}}\left(k\right)\mathbf {R}\mathbf {u}_{p}\left(k\right). \end{equation} View SourceRight-click on figure for MathML and additional features.The resulting optimal control law is given by \begin{equation*} \mathbf {u}_{p}\left(k\right)=-\mathbf {K}_{p}\mathbf {x}_{p}\left(k\right) \end{equation*} View SourceRight-click on figure for MathML and additional features.where \begin{equation*} \mathbf {K}_{p}=\left(\mathbf {R}+\mathbf {\Gamma}_{p}^{{\rm T}}\mathbf {P}\mathbf {\Gamma}_{p}\right)^{-1}\mathbf {\Gamma}_{p}^{{\rm T}}\mathbf {P}\mathbf {\Phi}_{p} \end{equation*} View SourceRight-click on figure for MathML and additional features.and \mathbf {P} is the positive definite solution to the discrete-time algebraic Riccati equation (DARE) \begin{equation} \mathbf {P}=\mathbf {Q}+\mathbf {\Phi}_{p}^{{\rm T}}\left(\mathbf {P}-\mathbf {P}\mathbf {\Gamma}_{p}\left(\mathbf {R}+\mathbf {\Gamma}_{p}^{{\rm T}}\mathbf {P\Gamma}_{p}\right)^{-1}\mathbf {\Gamma}_{p}^{{\rm T}}\mathbf {P}\right)\mathbf {\Phi}_{p}. \end{equation} View SourceRight-click on figure for MathML and additional features.In the simulations carried out for our work, \mathbf {Q}=100\mathbf {I}_{9} and \mathbf {R}=10^{5}\mathbf {I}_{3} where \mathbf {I}_{n} is the n\times n identity matrix.

Consider the effect of sampling rate on the DLQR gains for our CubeSat system in Table I computed while holding the \mathbf {Q} and \mathbf {R} matrices constant. Higher sampling rates result in larger gains while lower sampling rates result in smaller gains [53]. While lower sampling rates conserve energy, most often system robustness suffers as a result. This trend has been explored and quantified in the literature [31], [54]. For our CubeSat, we specify upper and lower bounds for sampling rate. We choose a maximum sampling rate r_{\tau,\max} for which we can guarantee that the control task is schedulable and a minimum sampling rate r_{\tau,\min} for which we can still guarantee physical system stability have \begin{eqnarray*} r_{\tau _{1},\max} & =&10\, {\rm Hz}\\ r_{\tau _{1},\min} & =&0.1\, {\rm Hz}. \end{eqnarray*} View SourceRight-click on figure for MathML and additional features.To illustrate the relationship between sampling rate and gain, we computed the matrix norm of DLQR gains for the CubeSat discretized at r_{\tau _{1},\max},\, r_{\tau _{1},\min} and an intermediate rate r_{\tau _{1}}=1.0\, {\rm Hz} (see [55]). These gains are listed in Table I.

TABLE I Scaling Factor Comparison for Normalized DLQR CubeSat Gains
Table I- Scaling Factor Comparison for Normalized DLQR CubeSat Gains

Because this study focuses on the dynamic adjustment of sampling rate, and since DLQR gains vary significantly over the range of possible rates, a constant DLQR gain will yield suboptimal results. Gain scheduling is a technique traditionally applied to nonlinear systems where the complexity of the nonlinear system prevents or greatly complicates the design of feasible controllers. In this paradigm, a nonlinear system is linearized about operating points or equilibrium points and linear system control designs and techniques can be applied. The effects of nonlinearities in the system are then mitigated by “scheduling”2 the designed gains via an interpolating scheme to compute gains at intermediate operating points [56], [57].

We use this strategy as inspiration for developing a gain scheduling scheme over operating points of the cyber system (i.e., sampling rates). We design DLQR controllers for the CubeSat at discrete sampling rates between r_{\tau _{1},\min} and r_{\tau _{1},\max} where each sampling rate is an operating point of the CPS. We then “schedule” the appropriate DLQR gains for the CubeSat corresponding to the commanded sampling rate r_{\tau _{1}}\left(k\right) as illustrated in Fig. 2. This paradigm ensures that the DLQR gain used to compute the next control input corresponds with the newly commanded sampling period for the control task.

Fig. 2. - Gain scheduling over $r_{\tau _{1}}\left(k\right)$
 (sampling rate).
Fig. 2.

Gain scheduling over r_{\tau _{1}}\left(k\right) (sampling rate).

2) FPRB Control

The optimal DLQR control is found by either propagating the DARE in (5) backward from a final condition for finite-horizon control, or by finding the steady-state positive definite solution to the DARE for infinite-horizon control. Now suppose we know system matrices \mathbf {\Phi}_{p}\left(k\right) and \mathbf {\Gamma}_{p}\left(k\right)\, k=1,2,3,\ldots,N. We could then propagate the DARE in (5) backward from a final condition to obtain the optimal discrete-time-varying control [58]. Since we do not know how the sampling rate will evolve (i.e., it is dynamically adjusted based on error in the physical system trajectory as described in Section V), we do not know the system matrices in advance.

Forward-Integration Riccati-Based control is an emerging control design method wherein the solution to the forward-in-time control Riccati equation is used to compute the control gain. While research is still investigating the stability and performance guarantees of this method, it has empirically shown to be effective in controlling a wide array of systems [16], [17]. We apply this strategy to our discrete-time-varying CubeSat attitude control problem by computing \begin{equation*} \mathbf {u}_{p}\left(k\right)=-\mathbf {K}_{p}\left(k\right)\mathbf {x}_{p}\left(k\right) \end{equation*} View SourceRight-click on figure for MathML and additional features.where \begin{equation*} \mathbf {K}_{p}\left(k\right)=\left(\mathbf {R}+\mathbf {\Gamma}_{p}^{{\rm T}}\left(k\right)\mathbf {P}\left(k\right)\mathbf {\Gamma}_{p}\left(k\right)\right)^{-1}\mathbf {\Gamma}_{p}^{{\rm T}}\left(k\right)\mathbf {P}\left(k\right)\mathbf {\Phi}_{p}\left(k\right) \end{equation*} View SourceRight-click on figure for MathML and additional features.and \mathbf {P}\left(k\right) is found iteratively using the forward-in-discrete-time algebraic Riccati equation as \begin{equation*} \begin{aligned}\mathbf {P}\left(k\right)= & \mathbf {Q}+\mathbf {\Phi}_{p}^{{\rm T}}\left(k\right)\left(\mathbf {P}\left(k-1\right)-\mathbf {P}\left(k-1\right)\mathbf {\Gamma}_{p}\left(k\right)\vphantom{\left(\Gamma _{p}^{{\rm T}}\right)^{-1}}\right.\\ & \left(\mathbf {R}+\mathbf {\Gamma}_{p}^{{\rm T}}\left(k\right)\mathbf {P}\left(k-1\right)\mathbf {\Gamma}_{p}\left(k\right)\right)^{-1}\\ & \left.\vphantom{\left(\Gamma _{p}^{{\rm T}}\right)^{-1}}\mathbf {\Gamma}_{p}^{{\rm T}}\left(k\right)\mathbf {P}\left(k-1\right)\right)\mathbf {\Phi}_{p}\left(k\right) \end{aligned} \end{equation*} View SourceRight-click on figure for MathML and additional features.with initial-time boundary condition \mathbf {P}\left(0\right)\ge \mathbf {0}. As before, in the simulations carried out for this study, \mathbf {Q}=100\mathbf {I}_{9} and \mathbf {R}=10^{5}\mathbf {I}_{3}. As will be shown in Section VIII, this controller is effective and only requires the forward-propagation of the DARE.

SECTION V.

Cyber–Physical System Model

Having designed controllers for a discrete-time-varying CubeSat model, we now present our state–space cyber model, two cyber controllers, and couple this model to the state–space CubeSat model via feedback control.

A. State–Space Cyber Model

The proposed coregulation scheme is applicable to both RTOS and non-RTOS (traditional Linux) operating system environments. In the case of a non-RTOS (embedded Linux) environment, timers would activate threads in accordance with each proposed sampling rate; differences between predicted and actual task completion time may be more substantial than on a RTOS but such differences are analogous to realistic disturbances impacting physical system states and control commands. In this paper, for simplicity we assume an RTOS that frequently updates its ordered priority queue based on arriving (new or modified) tasks. As such, we assume the RTOS also has the capability to nearly instantaneously (ignoring context switch time) modify the priority and sampling rate of the control task. For this study, we assume that the sampling rate can be regulated any time the control task is not running or in an interrupted state (i.e., it has completed a cycle and has not started a new one). To apply state feedback, we require a cyber model represented by an ordinary differential equation. This has the added benefit of providing “memory” or filtering. The cyber model of sampling rate is \begin{equation*} \dot{x}_{c}=u_{c} \end{equation*} View SourceRight-click on figure for MathML and additional features.where x_{c} is the cyber state representing the frequency of the control task \tau _{1} \left(\rm{i.e.}\, x_{c}=r_{\tau _{1}}={1}/{T_{\tau _{1}}}\right), and u_{c} a forcing term adjusting the rate of change of the sampling rate. This implies that x_{c} has units {1}/{s}, or Hz, and u_{c} has units {1}/{s^{2}}.

B. Open-Loop Cyber–Physical System Model

We augment the continous-time physical system with our proposed cyber model forming the open-loop CPS equations \begin{equation*} {\left[\begin{array}{c}\dot{\mathbf {x}}_{p}\\ \dot{x}_{c} \end{array}\right]}={\left[\begin{array}{c@{\quad}c}\mathbf {A}_{p} & 0\\ \mathbf {0} & 0 \end{array}\right]}{\left[\begin{array}{c}\mathbf {x}_{p}\\ x_{c} \end{array}\right]}+{\left[\begin{array}{c@{\quad}c}\mathbf {B}_{p} & 0\\ 0 & 1 \end{array}\right]}{\left[\begin{array}{c}\mathbf {u}_{p}\\ u_{c} \end{array}\right]}. \end{equation*} View SourceRight-click on figure for MathML and additional features.Since the cyber model will also be implemented on a digital computer, we can apply the formula in (3) to specify the CPS model as a set of difference equations as follows: \begin{equation} \begin{aligned}{\left[\begin{array}{c}\mathbf {x}_{p}\left(k+1\right)\\ x_{c}\left(k+1\right) \end{array}\right]} & ={\left[\begin{array}{c@{\quad}c}\mathbf {\Phi}_{p}\left(k\right) & 0\\ \mathbf {0} & 1 \end{array}\right]}{\left[\begin{array}{c}\mathbf {x}_{p}\left(k\right)\\ x_{c}\left(k\right) \end{array}\right]}\\ & +{\left[\begin{array}{c@{\quad}c}\mathbf {\Gamma}_{p}\left(k\right) & 0\\ 0 & T_{\tau _{1}}\left(k\right) \end{array}\right]}{\left[\begin{array}{c}\mathbf {u}_{p}\left(k\right)\\ u_{c}\left(k\right) \end{array}\right]} \end{aligned} \end{equation} View SourceRight-click on figure for MathML and additional features.and note again that x_{c}\left(k\right)=r_{\tau _{1}}\left(k\right)={1}/{T_{\tau _{1}}\left(k\right)}. Because T_{\tau _{1}}\left(k\right)={1}/{x_{c}\left(k\right)} and \mathbf {\Phi}_{p}\left(k\right) and \mathbf {\Gamma}_{p}\left(k\right) are functions of x_{c} [as per (3)], the system is now nonlinear.

C. Cyber System Control Law

To design a control law for the new cyber model, we must examine dependences between the cyber and physical systems. In the closed-loop system, performance is directly dependent on the execution rate of the control task due to the ZOH nature of the RTOS implementation. System state \mathbf {x}_{p} is fed back into the cyber system from which we can compute the performance metric \mathbf {x}_{p}-\mathbf {x}_{p,r} where \mathbf {x}_{p,r} is the physical state reference trajectory. We want the cyber system to in turn adjust sampling rate based on the performance of the physical system.

As a result, we design a two-part control law for the cyber system. One part reacts to off-nominal disturbance conditions in the physical system, and the other drives the task execution rate to a reference rate. We introduce two versions of the cyber control law for comparison in our results. In Version One, u_{c,1}\left(k\right), we include the control input scaling such that \begin{equation} u_{c,1}\left(k\right)=\mathbf {\mathbf {K}}_{cp}\left(k\right)\left(\mathbf {x}_{p}\left(k\right)-\mathbf {x}_{p,r}\right)-k_{c}\left(x_{c}\left(k\right)-x_{c,r}\right). \end{equation} View SourceRight-click on figure for MathML and additional features.where x_{c,r} is the cyber system reference trajectory (i.e., a desired sampling rate for \tau _{1}), and k_{c} is a gain. For u_{c,1}, \mathbf {K}_{cp} has units necessary to cancel physical state units \begin{align*} \mathbf {K}_{cp}= & \left[{\begin{array}{c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c}\displaystyle\frac{1}{{\rm s}^{2}} & \displaystyle\frac{1}{{\rm s}^{2}} & \displaystyle\frac{1}{{\rm s}^{2}} & \displaystyle\frac{1}{\rm s} & \displaystyle\frac{1}{\rm s} & \displaystyle\frac{1}{\rm s}\end{array}}\vphantom{\displaystyle\frac{1}{N\cdot m\cdot s^{3}}}\right.\\ & \displaystyle\hphantom{[}\left.{\begin{array}{c@{\quad}c@{\quad}c}\displaystyle\frac{1}{{\rm N}\cdot {\rm m}\cdot {\rm s}^{3}} & \displaystyle\frac{1}{{\rm N}\cdot {\rm m}\cdot {\rm s}^{3}} & \displaystyle\frac{1}{{\rm N}\cdot {\rm m}\cdot {\rm s}^{3}}\end{array}}\right] \end{align*} View SourceRight-click on figure for MathML and additional features.and k_{c} has units {1}/{\rm s}. In Version Two, u_{c,2}\left(k\right), we eliminate the scaling and the nonlinearity in the cyber system so that the cyber controller is equally aggressive regardless of its current sampling rate. Therefore \begin{eqnarray} u_{c,2}\left(k\right)&= & \frac{1}{T_{\tau _{1}}\left(k\right)}\mathbf {K}_{cp}\left(k\right)\left(\mathbf {x}_{p}\left(k\right)-\mathbf {x}_{p,r}\right)\nonumber\\ && -\, \frac{1}{T_{\tau _{1}}\left(k\right)}k_{c}\left(x_{c}\left(k\right)-x_{c,r}\right). \end{eqnarray} View SourceRight-click on figure for MathML and additional features.For u_{c,2} \mathbf {K}_{cp} and k_{c} now have units \begin{eqnarray*} \mathbf {K}_{cp}&= & \left[{\begin{array}{c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c}\displaystyle\frac{1}{\rm s} & \displaystyle\frac{1}{\rm s} & \displaystyle\frac{1}{\rm s} & \dim & \dim & \dim \end{array}}\vphantom{\displaystyle\frac{1}{{\rm N}\cdot {\rm m}\cdot {\rm s}^{3}}}\right.\nonumber\\ && \hphantom{[}\left.{\begin{array}{c@{\quad}c@{\quad}c}\displaystyle\frac{1}{{\rm N}\cdot {\rm m}\cdot {\rm s}^{2}} & \displaystyle\frac{1}{{\rm N}\cdot {\rm m}\cdot {\rm s}^{2}} & \displaystyle\frac{1}{{\rm N}\cdot {\rm m}\cdot {\rm s}^{2}}\end{array}}\right]\\ k_{c}&= & \dim \end{eqnarray*} View SourceRight-click on figure for MathML and additional features.where \dim indicates the quantity is dimensionless. Note that if there is nonzero error in the physical system, the cyber system should increase the sampling rate. Therefore, \mathbf {K}_{cp} is specified as a gain vector with \begin{equation*} \mathbf {K}_{cp}\left(k\right)=\left\lbrace {\begin{array}{c@{\quad}c}k_{cp,i}, & {\hbox{if}}\, x_{p,i}\left(k\right)-x_{p,i,r}\ge 0\\ -k_{cp,i}, & {\hbox{if}}\, x_{p,i}\left(k\right)-x_{p,i,r} < 0 \end{array}}\right. \end{equation*} View SourceRight-click on figure for MathML and additional features.\forall k_{cp,i}\in \mathbf {K}_{cp},\, x_{p,i}\in \mathbf {x}_{p},\, x_{p,i,r}\in \mathbf {x}_{p,r}. This control law allows the cyber system to adjust its resources in accordance with the performance of the physical system as it simultaneously targets a reference execution rate. In practice, it is likely a trajectory planner would update reference trajectories for both the physical and cyber system to meet mission and performance requirements.

D. Closed-Loop Cyber–Physical System Model

Now that we have discrete controllers for both the physical and cyber system, we can write the closed-loop equations of the full CPS model using (6)–​(8). Since we are regulating \mathbf {x}_{p} to zero, \mathbf {x}_{p,r}=\mathbf {0} and for u_{c,1} we have \begin{eqnarray} \mathbf {x}_{p}\left(k+1\right)&= & \left(\mathbf {\Phi}_{p}\left(k\right)-\mathbf {\Gamma}_{p}\left(k\right)\mathbf {K}_{p}\left(k\right)\right)\mathbf {x}_{p}\left(k\right)\nonumber\\ x_{c}\left(k+1\right) & = & T_{\tau _{1}}\left(k\right)\mathbf {K}_{cp}\mathbf {x}_{p}\left(k\right)\nonumber\\ && +\left(1-T_{\tau _{1}}\left(k\right)k_{c}\right)x_{c}\left(k\right)+T_{\tau _{1}}\left(k\right)k_{c}x_{c,r}. \qquad \end{eqnarray} View SourceRight-click on figure for MathML and additional features.For u_{c,2}, we have \begin{eqnarray} \mathbf {x}_{p}\left(k+1\right)&= & \left(\mathbf {\Phi}_{p}\left(k\right)-\mathbf {\Gamma}_{p}\left(k\right)\mathbf {K}_{p}\left(k\right)\right)\mathbf {x}_{p}\left(k\right)\nonumber\\ x_{c}\left(k+1\right)&= & \mathbf {K}_{cp}\mathbf {x}_{p}\left(k\right)+\left(1-k_{c}\right)x_{c}\left(k\right)+k_{c}x_{c,r}.\quad \end{eqnarray} View SourceRight-click on figure for MathML and additional features.

SECTION VI.

Cyber–Physical System Metrics

We demonstrate the effectiveness of our proposed methodology by analyzing and comparing simulation results against fixed-rate optimal control strategies. Measuring holistic CPS performance requires the development of additional metrics to evaluate more than traditional control performance indicators (e.g., rise time, settling time, etc.). To appropriately compare results, we utilize three metrics that account for both physical and cyber performance.

A. Physical State Metric

To gauge the effectiveness of the control and rate of the control task on the physical system, we examine the time-average squared error of physical state \mathbf {x}_{p}. Let \mathbf {m}_{p} represent the metric for physical state, and let subscript j indicate the j^{{\rm}}th entry in the state vector. In addition, let x_{pj,r} be the reference trajectory for the j^{{\rm}}th physical state. We then compute time-averaged physical state error as \begin{equation} \mathbf {m}_{p}={\left[\begin{array}{c}\displaystyle\frac{1}{t_{{\rm f}}}\int _{0}^{t_{{\rm f}}}\left(x_{p1}\left(t\right)-x_{p1,r}\left(t\right)\right)^{2}dt\\ \vdots \\ \displaystyle\frac{1}{t_{{\rm f}}}\int _{0}^{t_{{\rm f}}}\left(x_{pj}\left(t\right)-x_{pj,r}\left(t\right)\right)^{2}dt \end{array}\right]} \end{equation} View SourceRight-click on figure for MathML and additional features.where t_{{\rm f}} is the final time. This metric provides an assessment of how well the CubeSat attitude and angular velocities are being regulated by the RTS. To facilitate comparison, we also make use of a normalized physical state metric wherein we leverage the inherent discrete nature of the simulation to normalize the metric for each physical state \begin{equation} \mathbf {m}_{p,n}={\left[\begin{array}{c}\displaystyle\frac{1}{t_{{\rm f}}x_{p1,\max}^{2}}\sum\limits_{i=1}^{n}t_{i}\left(x_{p1,i}-x_{p1,r}\right)^{2}\\ \vdots \\ \displaystyle\frac{1}{t_{{\rm f}}x_{pj,\max}^{2}}\sum\limits _{i=1}^{n}t_{i}\left(x_{pj,i}-x_{pj,r}\right)^{2} \end{array}\right]} \end{equation} View SourceRight-click on figure for MathML and additional features.where j is the jth state, and there are n discrete samples of the state.

B. Cyber Rate Metric

In this study, we focus attention on regulating the sampling rate. Although in a RTS many tasks would consume resources, we assume that utilization of the control task is proportional to utilization of the total RTS. Lower utilization could result in reduced energy requirements for the RTS (e.g., with a voltage scaling CPU) or the liberation of resources that can be devoted to other tasks. For this metric, we select a maximum sampling rate x_{c,{\rm max}}=r_{\tau _{1},\max} under which the complete RTS remains schedulable (i.e., can meet all hard real-time task deadlines). We define our metric to be the time-averaged percent of maximum sampling rate as \begin{eqnarray} m_{c} & =&\frac{1}{t_{{\rm f}}x_{c,\max}}\sum _{i=1}^{n}t_{i}x_{c,i}\nonumber\\ & =&\frac{1}{t_{{\rm f}}x_{c,\max}}\sum _{i=1}^{n}1\nonumber\\ & =&\frac{n\left(n+1\right)}{2t_{{\rm f}}x_{c,\max}} \end{eqnarray} View SourceRight-click on figure for MathML and additional features.where n is the number of time slices from time t\in \left[0,t_{{\rm f}}\right]. This metric was chosen over the traditional RTS utilization definition (as described in Section VII) because it allows us to easily compare and analyze different controller designs independent of the RTOS implementation.

C. Control Effort Metric

An important measure of system performance is how much physical control effort is expended to meet performance requirements. This effort, a function of both sampling rate and control gain, requires energy expenditure for the CPS and therefore minimizing control effort can improve endurance and mission performance. An important consideration in the design of an energy efficient control law is the sampling rate. Generally, as sampling rate increases higher gain values can be tolerated while the system remains stable, while slower sampling rates require lower gains [31].

We are interested in minimizing control effort while maintaining closed-loop stability and trajectory tracking, captured in physical metric (12). It is common in optimal control to minimize \mathbf {u}^{{\rm T}}\mathbf {u} as in the DLQR cost function in (4). Because energy expenditure is generally a monotonically increasing function of control, minimizing control effort reduces energy expenditure. Our metric for control effort in this context only includes effort for the physical system \mathbf {u}_{p} given that we do not throttle CPU clock rate or turn cores ON/OFF. Taking the DLQR cost term as a cue and due to the discrete nature of the control input caused by the ZOH, we define a control effort metric as the discrete time squared average \begin{equation} \mathbf {m}_{up}={\left[\begin{array}{c}\displaystyle\frac{1}{t_{{\rm f}}}\sum _{i=1}^{n}t_{i}u_{p1,i}^{2}\\ \vdots \\ \displaystyle\frac{1}{t_{{\rm f}}}\sum _{i=1}^{n}t_{i}u_{pj,i}^{2} \end{array}\right]} \end{equation} View SourceRight-click on figure for MathML and additional features.where j is the j^{{\rm}}th control input.

SECTION VII.

CubeSat Case Study

To develop a realistic case study of attitude control of a CubeSat, we summarize the CubeSat literature with focus on simulating responses to disturbances. We then describe our CubeSat cyber model.

A. Physical Characteristics and Setup

Low-earth orbit presents a challenging environment due to the potential for plasma-induced and magnetic disturbances, high velocity debris and meteoroids, atmospheric drag, radiation, solar wind, and dust [59]–​[63]. All are sources of disturbance on attitude and orbit of a CubeSat. Generally, a CubeSat has three reasons to adjust its attitude: scientific data acquisition, communication with a ground station, or to maximize solar energy harvesting. Pointing activities must be planned and carried out within narrow time constraints, and it is critical that controllers be capable of rejecting disturbances to achieve these goals. As discussed in Section II-B, optimal control input and sampling pattern algorithms [45], [46] have been proposed to schedule controller sampling rate and conserve computing resources; however, these algorithms do not attempt to deal with disturbances which are more effectively handled by feedback control [45] . In this paper, we have proposed such a CPS feedback control formulation and therefore focus on highlighting its ability to deal with disturbances.

Our tests generate system responses to initial conditions representing an impulsive disturbance due to an impact or other transient event that perturbs the attitude and corresponding angular rates of the CubeSat. The controller objective is then to restore both attitude and angular rates to a zero reference state. The initial conditions on the physical state representing this disturbance are defined as \begin{equation*} \mathbf {x}_{p0}={\left[\begin{array}{c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c}0.1 & 0.5 & 0.2 & 0.02 & 0.01 & 0.005 & 0 & 0 & 0\end{array}\right]} \end{equation*} View SourceRight-click on figure for MathML and additional features.where states (1, 2, 3) are roll, pitch, and yaw in the LVLH reference frame, states (4, 5, 6) are elements of the angular velocity vector, and states (7, 8, 9) represent angular momentum of each of three reaction microwheels used in control. Because we are regulating states to zero, the reference trajectory is \begin{equation*} \mathbf {x}_{p,r}={\left[\begin{array}{c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\end{array}\right]}. \end{equation*} View SourceRight-click on figure for MathML and additional features.

In a \hbox{500}\,\hbox{-}\hbox{km} orbit altitude (see[64], [65]) above Earth's surface, our simulated CubeSat spends roughly 62% of its orbit (59 min) in sunlight during which energy is collected via solar panels, producing about 7\, {\rm W} of power, and stored in a 7.4\, {\rm V} , 4.4\, {\rm Ah} LiOn battery [66], [67]. While it is possible to store energy in the microwheels (see[68], [69]), we assume they are used strictly for attitude control and that energy for control of the microwheels is only delivered from the battery system [67] . We also assume that the solar energy harvesting is sufficient during each orbital period to replenish the energy expended during eclipse. We use one reaction wheel for each axis of rotation which has characteristics (similar to [70]–​[72]) shown in Table II.

TABLE II Reaction Microwheel Characteristics
Table II- Reaction Microwheel Characteristics

B. Cyber Characteristics and Setup

Current trajectories of CubeSat development suggest that the time will come when the majority of computationally intense tasks onboard a CubeSat will be those associated with autonomous decision making and science data handling [73]–​[75]. However, at present, GNC tasks still consume a nontrivial portion of cyber resources. With this in mind, we posit that significant savings can be realized by adjusting GNC tasks in accordance with pointing performance.

We assume the computing platform onboard the CubeSat is running a RTOS capable of dynamically adjusting the period of the control task as long as the control task is not running or in an interrupted state. As discussed in Section IV-B, we set hard limits on the cyber rate based on the maximum schedulability for the control task and the performance requirements of the CubeSat. For our particular system, we choose \begin{eqnarray*} x_{c,{\rm max}} & =&r_{\tau _{1},\max} =10\, {\rm Hz}\\ x_{c,{\rm min}} & =&r_{\tau _{1},\min} =0.1\, {\rm Hz}. \end{eqnarray*} View SourceRight-click on figure for MathML and additional features.Such hard limits are similar to saturation limits on typical physical actuators, and rates outside this range are not allowed. RTS utilization is defined as \begin{equation*} U_{{\rm RTS}}=\sum _{i=1}^{n}\frac{e_{\tau _{i}}}{P_{\tau _{i}}} \end{equation*} View SourceRight-click on figure for MathML and additional features.where e_{\tau _{i}} is the worst-case execution time of \tau _{i} \left({\rm WCET}\left(\tau _{i}\right)\right), P_{\tau _{i}} is the period of task \tau _{i}, and n is the number of tasks [32]. In Earliest Deadline First (EDF) scheduling, U_{{\rm RTS}}\le 1 implies a valid schedule such that all deadlines will be met [32]. Assuming EDF scheduling and recalling that \tau _{1} is the attitude control task, we assume that without \tau _{1}, U_{{\rm RTS}}=0.70 and that {\rm WCET}\left(\tau _{1}\right)=0.03\, {\rm s}. Therefore \begin{alignat*}{2} U_{{\rm RTS}}\left(x_{c,\max}\right) & =U_{{\rm RTS}}+0.03x_{c,\max} & & =1\\ U_{{\rm RTS}}\left(x_{c,\min}\right) & =U_{{\rm RTS}}+0.03x_{c,\min} & & =0.703 \end{alignat*} View SourceRight-click on figure for MathML and additional features.which implies a significant reduction in cyber resource utilization when we reduce the sampling rate.

Ideally, a system utilizing our proposed feedback CPS control scheme would supply initial and reference trajectories for the cyber system analogous to those supplied to the physical system. Cyber state reference trajectories may be specified implicitly in the form of a nominal planning algorithm or through an optimal control scheme as in [45]. Here, through testing, we explicitly define the initial and reference cyber states as \begin{eqnarray*} x_{c0} & =&0.3\, {\rm Hz}\\ x_{c,r} & =&0.3\, {\rm Hz} \end{eqnarray*} View SourceRight-click on figure for MathML and additional features.to help illustrate the differences in controller behavior and demonstrate good cyber resource reclamation. With the 0.3\, {\rm Hz} reference rate, U_{{\rm RTS}}\left(0.3\right)=0.709, resulting in a 29.1% cyber resource utilization savings relative to the maximum rate.

Cyber gains would be best selected using an optimal control scheme or alternatively using rules of thumb similar to those in classical control (e.g., Ziegler-Nichols, Nyquist stability criterion, or meeting rise time, settling time, overshoot, and steady state criteria) [76]. In this study, we have manually tuned the gains using the error criteria discussed in Section VI as guides to develop gains which appropriately capture the utility of our method. The error criteria could be used to formulate an optimal control problem to choose optimal gains, but we leave this for future work. \mathbf {K}_{cp} was determined by manual tuning as \begin{equation*} \mathbf {K}_{cp}={\left[\begin{array}{c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c}1 & 1 & 1 & 1 & 1 & 1 & 0 & 0 & 0\end{array}\right]}. \end{equation*} View SourceRight-click on figure for MathML and additional features.Similarly, the control gain of the cyber system was tuned to \begin{equation*} k_{c}=0.5. \end{equation*} View SourceRight-click on figure for MathML and additional features.Our simulation is executed over a 20-s interval which is sufficient in our case to observe disturbance rejection behavior.

SECTION VIII.

CubeSat Cyber–Physical System Simulation Results

We illustrate the utility of our variable-rate control laws by comparing them with fixed-rate DLQR controllers and with each other in our CubeSat case study. We first offer some specifics of our Matlab simulation. In the results, we use as baseline designs DLQR controllers designed at fixed sampling rates r_{\tau _{1},\max}, r_{\tau _{1},\min}, and r_{\tau _{1}}=1\, {\rm Hz}. We first compare time response plots of GSDLQR control against a fixed \hbox{1}\,\hbox{-}\hbox{Hz} DLQR control design. We then compare time response plots of FPRB control against GSDLQR control and fixed\hbox{1}\,\hbox{-}\hbox{Hz} DLQR control. Finally, to compare all designs, we use the evaluation metrics presented in Section VI and tabulate the results.

A. Simulation

MATLAB offers two primary methods of control system simulation, continuous, and discrete. In the case of continous time systems, ordinary differential equation solvers such as ode45 can be used to simulate linear and nonlinear system response to initial values. Specifically aimed at control design for both discrete and continous linear systems lsim provides the system response to a user defined control input. All of MATLAB's simulation techniques assume either a purely continuous system or a discrete system executed at a single sampling rate. Our proposed technique, however, requires a mechanism for simulating a system with a time-varying sampling rate.

To manage this difficulty we use a fourth-order Runge-Kutta variable time step ordinary differential equations solver, namely MATLAB's ode45, to solve each time-varying discrete step of the simulation. At each discrete step (integration cycle) of the simulation the “initial condition” is the final state from the previous integration cycle, and the control input is held constant during that cycle. As the control loop execution rate x_{c} changes according to the cyber system dynamics, the length of an integration cycle changes. Because MATLAB ode45 is a one-step solver, we can piece together the output from multiple executions of ode45 based only upon the “initial conditions” \mathbf {x}_{p,\hbox{prev}} , as shown in Algorithm 1. We have chosen a highly accurate integrator to enable us to look into the true system response including “ripple” or transients between discrete (sample-and-hold) cycles [23], [77].

Algorithm 1: Algorithm for Simulation of CPS

Initialize variables

while t < t_{\rm{final}} do

% {\tt Propagate\,\, the\,\, cyber\,\, system}

x_c = x_c + T_{\tau _1}u_c

{\tt tspan}| = \left[t, t+\frac{1}{x_c}\right]

% {\tt Propagate\,\, the\,\, physical\,\, system}

\mathbf {K}_p = {\tt computeKp}\left(t, \mathbf {x}_{p,prev}, x_c\right) {\tt \hbox{\%} either\,\, Gain}

{\tt scheduled\,\, or\,\, FPRB\,\, control}

[t,x_p] = {\rm ode45}\left({\tt @CPSmodel}\left(\right), {\tt tspan}, \mathbf {x}_{p,prev}\right)

\mathbf {x}_{p,prev} = {\tt x_p(end,:)}

% {\tt Collect\,\, the\,\, states\,\, and\,\, inputs}

end while

B. Gain-Scheduled Discrete Linear Quadratic Regulator Cyber–Physical System Designs

GSDLQR control was applied to the CubeSat CPS as discussed in Section IV-B1 and simulated with initial state disturbance-induced error specified in Section VII . In Fig. 3, we show the response of states \theta _{p,1} (roll angle), and \omega _{p,1} (angular velocity in roll direction), the physical control for roll u_{p,1}, and the cyber state x_{c}. In Fig. 3(a), cyber controller u_{c,1} (7) is used, and in Fig. 3(b), u_{c,2} (8) is used.

Fig. 3. - Gain scheduled DLQR CPS comparisons. (a) GSDLQR using $u_{c,1}$
. (b) GSDLQR using $u_{c,2}$
. (c) Traditional DLQR control at $1\, {\rm Hz}$
.
Fig. 3.

Gain scheduled DLQR CPS comparisons. (a) GSDLQR using u_{c,1} . (b) GSDLQR using u_{c,2}. (c) Traditional DLQR control at 1\, {\rm Hz}.

Recall that the state x_{c} is the sampling rate of the system for the next time step. Because x_{c0}=0.3\, {\rm Hz} , the system does nothing for T_{\tau _{1}}\left(0\right)=3.\bar{3}\, {\rm s} while waiting for the next update to observe the error in the physical states. At time t=3.\bar{3}\, {\rm s}, the controller executes and computes a new sampling rate that is higher due to the large physical state error. As \mathbf {x}_{p} approaches zero, the reference value, the cyber controller begins to push the sampling rate down to x_{c,r}.

There are minor differences between using cyber controllers u_{c,1} and u_{c,2} as seen in Fig. 3. In the equations for u_{c} (7) and (8), there is balance between the errors in the physical states forcing x_{c} high and the error in the cyber state forcing it low. That balance is scaled by T_{\tau _{1}}=\frac{1}{x_{c}} as seen in (6). Hence, when x_{c} is high, u_{c} is less forceful thereby attenuating that balance, and when x_{c} is low (e.g., < 1), that balance is magnified. This effect is seen in the more gradual slopes of x_{c} both ramping up and ramping down in Fig. 3(b) which has the added benefit of resulting in lower control effort and cyber resource utilization while providing similar physical system performance (this is shown in more detail in Table III).

TABLE III Comparison of CPS Control Designs
Table III- Comparison of CPS Control Designs

C. Forward-Propagation Riccati-Based Cyber–Physical System Designs

We now select u_{c,1} as the controller for the cyber system and show comparisons of our FPRB design from Section IV-B2 with the GSDLQR controller also using u_{c,1} . In Fig. 4, we show time response plots for the same states and control \left(\theta _{1},\,\omega _{1},\, u_{p,1},\, x_{c}\right). In Fig. 4(a), we show FPRB control using u_{c,1} and in Fig. 4 (b) GSDLQR control using u_{c,1}. We then show the fixed-rate DLQR at 1\, {\rm Hz} in Fig. 4(c) for reference.

Consider the physical control effort \left(u_{p,1}\right) applied by FPRB and GSDLQR control. Despite having nearly identical physical and cyber state trajectories, the control effort for GSDLQR spikes very low initially, and only subsequently follows a trajectory similar to that of FPRB. The FPRB controllers generally exert much less control effort on the physical system for nearly identical responses in physical and cyber states than the DLQR controllers, suggesting FPRB out-performs GSDLQR and fixed-rate \left(1\, {\rm Hz}\right) DLQR control.

Fig. 4. - FPRB CPS Comparisons. (a) FPRB using $u_{c,1}$
. (b) GSDLQR using $u_{c,1}$.
 (c) Traditional DLQR Control at $1\, {\rm Hz}$.
Fig. 4.

FPRB CPS Comparisons. (a) FPRB using u_{c,1}. (b) GSDLQR using u_{c,1}. (c) Traditional DLQR Control at 1\, {\rm Hz}.

D. Design Comparisons

In this section, the metrics presented in Section VI are used to evaluate the effectiveness of all presented controller designs. We investigate three baseline DLQR controllers at r_{\tau _{1},\max},\, r_{\tau _{1}}=1\, {\rm Hz} and r_{\tau _{1},\min} and simulate them in the traditional manner using the chosen sampling rate. The first baseline design r_{\tau _{1},\max} represents a system design wherein CubeSat pointing performance is most valued and RTS bandwidth is plentiful. The design assuming r_{\tau _{1},\min} represents the opposite extreme where cyber resources are scarce and more highly valued than attitude pointing accuracy. This may be appropriate where cyber resources are prioritized to favor tasks such as communication or science data collection. Finally, we choose r_{\tau _{1}}=1\, {\rm Hz} as a compromise between these two extremes.

In Table III, we show a comparison of the different designs using our metrics. Table III reveals some important tradeoffs between control strategies. The DLQR fixed-rate controller at 1\, {\rm Hz} controls the physical states very well while using reasonable physical and cyber control effort. GSDLQR controllers offer a significant savings in cyber effort but result in higher error in physical state trajectories and a very large amount of physical control effort cost (see column 4) even exceeding the fixed rate \hbox{10}\hbox{-}\hbox{Hz} controller.

The FPRB controllers show promise in balancing cyber and physical cost metrics via online rather than a priori specification. On the cyber side, FPRB CPS using u_{c,2} (i.e., the last row in Table III), when compared with the maximum fixed-rate \hbox{10}\hbox{-}\hbox{Hz} controller, achieves slightly poorer physical control, most of the error of which occurs in the transient portion during time t=\left[0,\,3.3\bar{3}\right] before the controller responds. However, at that expense it achieves significantly lower cyber resource utilization. In fact, RTS utilization goes from U_{{\rm RTS}}\left(10\right)=1 to U_{{\rm RTS}}\left(0.613\right)=0.718, a 28.2% savings in RTS cyber resource utilization.

On the physical side, as seen in column four of Table III, the FPRB controllers use significantly less control effort over our 20\, {\rm s} simulation than all but the lowest effort controller (DLQR@0.1\, {\rm Hz}). If we assume a constant power bias to operate the electronics, the mechanical power of each wheel is \begin{equation*} P_{i}=\Omega _{i}u_{p,i} \end{equation*} View SourceRight-click on figure for MathML and additional features.where \Omega _{i} is the angular speed of the ith wheel [78]. The total mechanical power for all wheels is [78] \begin{equation*} P_{{\rm total}}=\left|P_{1}\right|+\left|P_{2}\right|+\left|P_{3}\right|. \end{equation*} View SourceRight-click on figure for MathML and additional features.FPRB CPS using u_{c,1} (i.e., the sixth row in Table III) gives us 12.2% savings in average total power and a 44.1% savings in peak power compared with the fixed-rate DLQR \hbox{10}\hbox{-}\hbox{Hz} controller.

Finally, in Fig. 5, we show a plot of the same metrics in Table III as we sweep over reference sampling rates x_{c,r}. We assume that the reference sampling rate is given as part of a higher level planning algorithm or perhaps as part of an optimization strategy as discussed in Section VII-B. As expected, physical trajectory error metrics go down with increased sampling rate, while cyber rate and control effort metrics go up.

Fig. 5. - Metrics with changing reference sampling rate $x_{c,r}$
.
Fig. 5.

Metrics with changing reference sampling rate x_{c,r} .

SECTION IX.

Conclusion

Research in CPS demands creative approaches to develop new models and abstractions to couple interacting cyber and physical control strategies. To this end, we propose an abstraction to couple CPS control that builds upon linear state–space feedback control. The physical dynamics state–space model is augmented with an abstracted model of the cyber system, and a control formulation is proposed to dynamically regulate cyber resources based on physical state error. We have applied our coregulation approach to attitude control of a small satellite system (CubeSat) and conducted a disturbance-rejection case study based on that platform.

Our CPS controller enables the cyber system, specifically the attitude controller, to operate at a lower sampling rate than might otherwise be chosen based on a single worst-case condition yet still retaining robustness to disturbances. This strategy can free cyber resources thereby allowing the cyber system to reallocate resources to other tasks, or to conserve energy by reducing processor clock speed or turning off cores. We have also devised baseline GSDLQR and FPRB control law formulations, proposed evaluation metrics, and investigated the performance of the controllers in simulation. Results indicate that FPRB formulations can indeed dynamically balance cyber and physical resource use via our coregulation scheme.

While this representation makes progress toward a holistic CPS representation for coregulation, there are important issues requiring further investigation. In this study, we did not provide a formal optimization scheme to determine the best values for the gains \mathbf {K}_{cp} or k_{c}. Future work is also needed to explore alternative performance metrics, domain models, and disturbances to provide additional insight into the tradeoffs between GSDLQR, FPRB, and fixed-rate digital control. Additionally, a critical component for future use of this proposed system will be establishing formal stability guarantees for the CPS. Finally, our results and proposed system would be strengthened by experimental verification in a real CubeSat or similarly complex robotic platform.

ACKNOWLEDGMENT

The authors would like to thank Ali Nasir of the Pakistan Space and Upper Atmosphere Research Commission, as well as Dennis Bernstein and Ilya Kolmanovsky of the Aerospace Engineering Department, University of Michigan, for valuable input, advice, and suggestions.

References

References is not available for this document.