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
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.
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]:
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.
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
\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*}
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.
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
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
\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}
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}
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*}
\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*}
Depending on the configuration of the spacecraft, the linearized system can either be stable or unstable
[52]. For our CubeSat, the system matrix
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
\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*}
\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}
\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*}
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}
\begin{equation*}
\mathbf {u}_{p}\left(k\right)=-\mathbf {K}_{p}\mathbf {x}_{p}\left(k\right)
\end{equation*}
\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*}
\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}
Consider the effect of sampling rate on the DLQR gains for our CubeSat system in
Table I computed while holding the
\begin{eqnarray*}
r_{\tau _{1},\max} & =&10\, {\rm Hz}\\
r_{\tau _{1},\min} & =&0.1\, {\rm Hz}.
\end{eqnarray*}
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
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
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*}
\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*}
\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*}
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*}
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*}
\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}
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
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,
\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}
\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*}
\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}
\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*}
\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*}
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
\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}
\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}
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
\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}
\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}
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
\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}
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
\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}
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*}
\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*}
In a
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*}
\begin{equation*}
U_{{\rm RTS}}=\sum _{i=1}^{n}\frac{e_{\tau _{i}}}{P_{\tau _{i}}}
\end{equation*}
\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*}
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*}
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.
\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*}
\begin{equation*}
k_{c}=0.5.
\end{equation*}
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
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
To manage this difficulty we use a fourth-order Runge-Kutta variable time step ordinary differential equations
solver, namely MATLAB's
Algorithm 1: Algorithm for Simulation of CPS
Initialize variables
while
%
%
%
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
Gain scheduled DLQR CPS comparisons. (a) GSDLQR using
Recall that the state
There are minor differences between using cyber controllers
C. Forward-Propagation Riccati-Based Cyber–Physical System Designs
We now select
Consider the physical control effort
FPRB CPS Comparisons. (a) FPRB using
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
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
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
On the physical side, as seen in column four of Table III, the FPRB
controllers use significantly less control effort over our
\begin{equation*}
P_{i}=\Omega _{i}u_{p,i}
\end{equation*}
\begin{equation*}
P_{{\rm total}}=\left|P_{1}\right|+\left|P_{2}\right|+\left|P_{3}\right|.
\end{equation*}
Finally, in Fig. 5, we show a plot of the same metrics in
Table III as we sweep over reference sampling rates
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
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.