Adaptive Attitude Control of a Rigid Body With Input and Output Quantization

In this article, the adaptive attitude-tracking problem of a rigid body is investigated, where the input and output are transmitted via a network. To reduce the communication burden in a network, a quantizer is introduced in both uplink and downlink communication channels. An adaptive backstepping-based control scheme is developed for a class of multiple-input and multiple-output (MIMO) rigid body systems. The proposed control algorithm can overcome the difficulty to proceed with the recursive design of virtual controls with quantized output vector, and a new approach to stability analysis is developed by constructing a new compensation scheme for the effects of the vector output quantization and input quantization. It is shown that all closed-loop signals are ensured uniformly bounded and the tracking errors converge to a compact set containing the origin. Experiments on a 2 degrees-of-freedom helicopter system illustrate the effectiveness of the proposed control scheme.

NOMENCLATURE d (·) Quantization error related to (·). e Tracking error, quaternion. f i g Gravitational force, expressed in i frame. g Gravitational acceleration.

g(q)
Moment caused by the gravitational force. G Error kinematics matrix. I Identity matrix. J Inertia matrix about the origin o, decomposed in the b frame. k (·) Positive constant related to (·). k Euler axis. l Length of quantization interval. m Mass of the rigid body. q Attitude.
q a,b Unit quaternion q in b frame relative to a frame. r b g Distance from the origin to the center of mass, decomposed in the b frame. R b a Rotation matrix from frame a to frame b. R Number of bits.

S(a)b
Cross product operator × between two vectors a and b, where S is skew-symmetric. T , Ψ, Φ Known nonlinear functions of q and ω. u Control input. V Lyapunov function candidate. τ d External disturbance. δ (·) Maximum bounded value for d (·) . ε Imaginary parts of a unit quaternion. η Real part of a unit quaternion. θ Unknown constant vector. λ max (·) Maximum eigenvalue of the matrix (·). λ min (·) Minimum eigenvalue of the matrix (·). υ Euler angle. ω Angular velocity. ω c b,a Angular velocity of frame a relative to frame b, expressed in frame c. R n Set of real numbers, dimension n. S 3 The non-Euclidean three-sphere. (·) Q Quantized signal of (·). · The L 2 -norm and induced L 2 -norm for vectors and matrices, respectively.
Vectors are denoted by small bold letters and matrices with capitalized bold letters.

I. INTRODUCTION
A TTITUDE control of rigid bodies has been widely addressed in the literature, see e.g. [1]- [9], and with applications in marine systems in [10], unmanned aerial vehicles (UAVs) in [11], helicopters in [12], underwater vehicles in [13], and other robotic systems. Rigid body systems are utilized in numerous important applications such as transportation [14], inspection [15], search and rescue [16], and remote sensing [17]. In [6], a robust adaptive controller is proposed for the attitude tracking problem of rigid bodies in the presence of uncertain parameters and where the attitude is represented by rotation matrices. In [7], an adaptive attitude tracking controller is developed for rigid body systems in the presence of unknown inertia and gyro-bias. In [8], an adaptive controller is proposed for a leader-following attitude consensus problem for multiple rigid body systems subject to jointly connected switching 0278-0046 © 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
networks in the presence of uncertain parameters. In [9], an adaptive backstepping controller is proposed for the trajectory tracking of a rigid body with unknown mass and inertia based on dual-quaternions. Chen et al. [11] proposed a robust nonlinear controller for quadrotor UAVs, which combines the slidingmode control technique and the backstepping control technique.
In [12], adaptive backstepping control is proposed for pitch and yaw control of a 2 degrees-of-freedom (DOF) helicopter system. Yan and Yu [13] investigated the sliding-mode tracking control of underwater vehicles. Quantized control has attracted considerable attention in recent years, due to its theoretical and practical importance in practical engineering, where digital processors are widely used and signals are required to be quantized and transmitted via a common network to reduce the communication burden. However, most of the works on quantized feedback control are concerned with either input quantization [18]- [25] or state quantization [26], [27].
In practice, it is common that both the inputs and the states of rigid bodies are quantized due to actuator and sensor limitations. Control of rigid bodies with quantized signals is a potential problem and has received attention with a demand on stability and reliability. For example, the remote control of a group of vehicles or robots, where the signals are transmitted over a shared network using quantization techniques. Attitude stabilization with input quantization is investigated in [28] using a fixed-time sliding-mode control. Trajectory tracking control for autonomous underwater vehicles with the effect of quantization is investigated in [13] using a sliding-mode controller, where the considered systems are completely known. In [29], adaptive tracking control is proposed for underactuated autonomous underwater vehicles with input quantization.
Uncertainties and nonlinearities always exist in many practical systems. Research on adaptive control of rigid bodies with either input quantization or state quantization using backstepping technique has received attention; see for examples, [29]- [31]. In [30], an adaptive backstepping control scheme with quantized inputs is presented for a 2 DOF helicopter system, considering a uniform quantizer. In [29], adaptive backstepping is investigated for tracking control for underactuated autonomous underwater vehicles with input quantization. An adaptive backstepping controller is proposed for formation tracking control for a group of UAVs with quantized inputs in [31]. Actually, the above-cited attitude control approaches do not consider the problem which takes both the input quantization and state quantization into account.
In this article, we aim to solve the attitude tracking of uncertain nonlinear rigid body systems with both input and output quantization. The system is modeled as a nonlinear multiple-inputmultiple-output (MIMO) system, with challenges in controller design due to its nonlinear behavior, its cross-coupling effect between inputs and outputs, and with uncertainties both in the model and the parameters. A uniform quantization is used for signals in order to reduce the communication burden. A new backstepping-based adaptive controller and a new approach to stability analysis are proposed. The full state vector is considered in the stability, that is often forgotten for quaternion-based attitude control, where the scalar part of the quaternion is left out. The proposed method is tested on a 2 DOF helicopter system from Quanser. It is analytically shown how the choice of quantization level affects the tracking performance, where a higher quantization level increases the tracking error. The experiments on the helicopter system illustrate the proposed scheme.
With aforementioned features, the main contributions of this article are summarized as follows.
r As far as we are concerned, this is the first work which solves the adaptive control problem for rigid body systems with unknown parameters and with both input and output quantization, where a bounded type of quantizer is considered, meanwhile guaranteeing that the attitude error and velocity error will converge to a compact set. Compared with [24] where only input quantization is considered, and [27] where only state quantization is considered, this research studies both input and output quantization problems. The main challenge is that the designed controller and virtual controls can only utilize quantized states and both the effects of input and output quantization introduce numerous residual terms that need to be dominated. Additionally, the quantization causes discrete phenomenona that complicate the controller design and stability analysis. To overcome this difficulty, differentiable virtual controls are first designed by assuming that the system has no quantization. Their partial derivatives multiplied by the quantized signals are then utilized to complete the design of virtual controls for the case with quantized input and output.
r Compared to backstepping control of single-input-singleoutput (SISO) systems with either input or state quantization in [23]- [25], [27], [32], this article considers MIMO uncertain systems with both input and output quantization. The challenge is that the control problem becomes more complicated for MIMO systems due to the coupling among various inputs and outputs. It becomes even more difficult to deal with when there exist uncertain parameters in the coupling matrix and both inputs and outputs are quantized. To overcome the difficulty, a new backstepping-based adaptive controller and a new approach to stability analysis are proposed, where the effects of both output and input quantization are compensated for.

A. Attitude Dynamics
The attitude of a rigid body can be represented by, e.g., Euler angles in [13], [30], (modified) Rodrigues parameters, rotation matrices in [3], [6], or quaternions in [4], [7], [9], where each representation has different properties. Any threeparameter representations have some kind of singularity, where, e.g., Euler angles (roll-pitch-yaw) have kinematic singularities since it is not possible to describe the angular velocity for all angles, and with the potential problem of gimbal lock. Practical applications are often represented by unit quaternions, since this has a nonsingular parameterization. With a desire of a singularity-free representation of the attitude, which is important for agile systems, unit quaternions are used in this article.
We describe the orientation of a rigid body in the body frame b, relative to an inertial frame i, by a unit , that is a complex number, where η = cos(υ/2) ∈ R and ε = k sin(υ/2) ∈ R 3 . Considering a fully actuated rigid body, the equations of motion for the attitude dynamics are defined asq where the angular velocity and is positive definite, the unknown constant vector θ ∈ R 3 , the control allocation matrix B ∈ R 3×3 , the control input u ∈ R 3 , and where where , and the matrix S(·) is the skewsymmetric matrix given by If r b g = 0 ⇒ g(q) = 0 and the rotation is about the center of mass. In applications, such as underwater vehicle dynamics, the equations of motion is described by a rotation about a point o, that is not the center of mass [33].
The orientation between two frames can be described by a rotation matrix given as and the rotation matrix R ∈ SO(3) that is a special orthogonal group of order 3, and has the property The derivative of a rotation matrix can be expressed as [33] Attitude and angular velocities are assumed to be measurable after quantization, and for the control allocation matrix, it is assumed that det(B) = 0, i.e., the matrix is invertible.

B. Problem Statement
We consider a control system as shown in Fig. 1, where the outputs ε, ω and input u are quantized at the encoder side to be sent over the network. It is noted that q = [η, ε ] . To reduce the communication burden, we have limited the feedback part of the quaternion to only contain ε, as η can be reconstructed due to the unity of the quaternion. The network is assumed noiseless, so that the quantized output signals ε Q , ω Q are recovered and sent to the controller, and the quantized input signal u Q (t) is recovered and sent to the plant.
Only the quantized output ε Q , ω Q are measured, and the quantized value of η is calculated as to ensure that the property of unit quaternion, (q Q ) q Q = 1, is fulfilled, where the quantized attitude is given by Remark 1: If the state variable η is quantized and sent over the network, we cannot ensure that q Q is a unit quaternion, and a correction/scaling will be needed to ensure this. Since η Q can be calculated based on the value of ε Q and knowledge of the sign of η(t 0 ) and the assumption of sign continuity of η(t) based on derivative, we can do the calculation after the network communication. This will also save bandwidth by sending less data over the network.
Remark 2: If we are close to, or at η = 0, we might end up with (ε Q ) ε Q > 1, and a scaling is needed to ensure we have a unit quaternion.
Let q i,d = q d and ω i i,d = ω d be the desired attitude and angular velocity. The control objective is to design a control law for is satisfied, and where all the signals in the closed-loop system are uniformly bounded. To achieve the objective, the following assumptions are imposed. Assumption 1: The desired attitude q d (t), the desired angular velocity ω d (t), and the desired angular acceleratioṅ ω d (t) are known, piecewise continuous, and bounded functions, Assumption 2: The unknown parameter vector θ is bounded by θ ≤ k θ , where k θ is a positive constant. Also, θ ∈ C θ , where C θ is a known compact convex set.

C. Quantizer
The quantizer considered in this article has the following property: where y is a scalar signal and δ y > 0 denotes the quantization bound. A uniform quantizer is chosen, which has intervals of fixed length and is defined as follows: where y 0 > 0, y 1 = y 0 + l 2 , y i+1 = y i + l, l > 0 is the length of the quantization interval, and sgn(y) is the sign function. The uniform quantization y Q ∈ U = {0, ±y i }, and a map of the quantization for y i > 0 is shown in Fig. 2. Clearly, the property in (13) is satisfied with δ y = max{y 0 , l 2 }. When a vector is quantized, we have (15) and so each vector element is bounded by (13), and we have Other bounded quantizers such as hysteresis-uniform quantizer and logarithmic-uniform quantizer as presented in [27] can also be considered.
Remark 3: Communication in a network only has to occur when the quantization levels change. Thus, a higher value for length of the quantization intervals requires less data transmission.

III. CONTROLLER DESIGN
In this section, we will design adaptive feedback control laws for the rigid body using backstepping technique.

A. Without Quantization
We first consider the case that the output and input are not quantized. For our model, two steps are included, where the control signal is designed in the last step. We begin with a change of coordinates to the error variables. The tracking error e is defined by the quaternion product is the inverse rotation given by the complex conjugate. If q i,b = q i,d then e = [±1 0 3 ] , where 0 3 is the zero vector of dimension three. Because there exist two different equilibria using quaternion coordinates, global stability cannot be achieved, even though e and −e represent the same physical attitude [2]. We include one further assumption as follows. Assumption 3: We assume that sgn(η(t 0 )) = sgn(η(t)) ∀t ≥ t 0 .
Remark 4: Assumption 3 is imposed to avoid the problem when the attitude error is close to E = {e ∈ S 3 :η = 0}.
The relative error kinematics iṡ where T (·) is defined in (3) and the angular velocity error is Following the backstepping design procedure, the change of coordinates is introduced as where z 1+ is the equilibrium point whenη(t 0 ) ≥ 0 and z 1− is the equilibrium point whenη(t 0 ) < 0 and where α is a virtual controller designed in step 1 as where C 1 ∈ R 3×3 is a positive definite matrix and For ease of notation, we denote z 1 = z 1± further in the article.
In step 2, the final controller u(t) and parameter update lawθ are designed as where C 2 ∈ R 3×3 and Γ ∈ R 3×3 are positive definite matrices. We choose a Lyapunov function candidate as whereθ is the estimated value of θ, and the unknown parameter error isθ = θ −θ. The derivative of V can be computed aṡ By applying the LaSalle-Yoshizawa theorem [34], it follows that all signals are uniformly bounded and asymptotic tracking is achieved as (z 1 (t), z 2 (t)) → (0, 0) as t → ∞. The angular velocity error and the angular velocity are bounded by where z = [z 1 , z 2 ] .

B. Quantized Input and Output
When the outputs ε and ω and input u are quantized with the property (13), we have The quantization error of the quaternion can be expressed as where d ε is the quantization error and bounded by d ε ≤ k ε δ ε from (28) and where k ε > 1 is a positive constant, and d η is bounded from the unity property of unit quaternion. If q Q = q and there is no quantization error, then d q = [1 0 0 0] . The tracking error with the quantized value of the unit quaternion, e Q , is given by and can also be described by (33) where the value of dε depends on the quantization error that is bounded by (28). If there is no quantization error, dε = 0. The quantized angular velocity ω Q is expressed as where d ω is the quantization error and is bounded by (29). To propose a suitable control scheme, the quantized input u Q (t) is decomposed into two parts where d u is the quantization error of the input, which is bounded by (30). The adaptive controller is designed as where Proj{·} is the projection operator given in [34], and where R Q b is the rotation due to the quantization error. It is noted that the following manipulation is used in (42).
The projection operator Proj{·} in (38) ensures that the estimates and estimation errors are nonzero and within known bounds, that is, θ ≤ k θ and θ ≤ k θ , and has the property −θ Γ −1 Proj(τ ) ≤ −θ Γ −1 τ , which are helpful to guarantee the closed-loop stability.
Remark 6: Only the quantized output can be used in the designed controller. Since the quantized output is used in the design of the virtual controller α Q in (42), the derivative of the virtual controller is discontinuous and cannot be used in the design of the controller. Instead, a functionᾱ Q is used in (46), which is designed as if the output is not quantized.

IV. STABILITY ANALYSIS
To analyze the closed-loop system stability, we first establish some preliminary results as stated in the following lemma.
Theorem 1: Considering the closed-loop adaptive system consisting of the plant (1)-(2) with output and input quantization satisfying the bounded properties (28)- (30), the adaptive controller (36)-(37), the update law (38), and Assumptions 1-3. If the gain matrices C 1 and C 2 and quantization parameters δ ε , δ ω , and δ u are chosen to satisfy where c 0 is the minimum eigenvalue of C 0 = min{G C 1 G, C 2 }, k is a positive constant, and δ V 1 is defined as then, all signals in the closed-loop system are ensured to be uniformly bounded. The error signals will converge to a compact set, i.e., Proof: Consider the Lyapunov function candidate Following (36)-(38), the derivative of (73) is given aṡ Using (30), the term containing the quantization error from the input in (74) satisfies By using (5), (34), (38), (44), (51), (27), and Assumption 2, the last terms in (74) satisfy the inequality By using Young's inequality, the properties in Lemma 1, (75), (76), and Assumption 1, (74) becomeṡ From (73) and (77) and by applying the LaSalle-Yoshizawa theorem, it follows that z 1 , z 2 , andθ are bounded and satisfy (68) under condition (66). From (37) and Lemma 1, it follows that the control input u, where only the quantized output is measured, also is bounded. Thus, all signals in the closed-loop system are bounded. Tracking of the desired reference signal is achieved, with a bounded tracking error given in (68).
Remark 7: The value of δ Q depends on the quantization parameters, and higher values of the quantization intervals will increase δ Q . If there is no quantization, δ Q = 0. In principle, the quantization level can be chosen arbitrarily as long as inequality (66) is satisfied, where δ V 1 depends on the quantization parameters δ ω and δ ε , and c 0 depends on the control design parameters. Therefore, (66) provides some insights on how to choose these quantization parameters.
Next, we consider the case where external disturbances τ d , assumed unknown but bounded by τ d ≤ k τ d , are present to the system, and the attitude dynamics are described by Corollary 1: Let Assumptions 1-3 hold. Consider the closedloop adaptive system consisting of the plant (1), (78) with output and input quantization satisfying the bounded properties (28)- (30), the adaptive controller (36)-(37), and the update law (38). Choosing the gain matrices C 1 and C 2 and quantization parameters δ ε , δ ω , and δ u to satisfy (66), all signals in the closed-loop system are ensured to be uniformly bounded. The error signals will converge to a compact set, i.e., where The proof follows along the same lines as the proof of Theorem 1.
Remark 8: The proposed control method considered in this article needs information of all system states, which is reasonable for rigid body systems where the attitude and the angular  velocity are measured by sensors. If some states are not available, an observer will be needed. Another limitation is that only a bounded type of quantizer is considered in this article, where the quantization error is bounded. The proposed method can be extended to compensate for unbounded quantization error caused by the logarithmic or hysteresis quantizers.

V. EXPERIMENTAL RESULTS
The proposed controller was tested on the Quanser Aero helicopter system, shown in Fig. 3. This is a two-rotor laboratory equipment for flight control-based experiments. The setup has a horizontal position of the main thruster and a vertical position of the tail thruster, which resembles a helicopter with two propellers driven by two dc motors. This is a MIMO system with 2 DOF, and the helicopter can rotate around two axes where each input affects both rotational directions. The body-fixed coordinate frame is visualized in Fig. 3, and the inertial frame is coinciding with the body frame when q = [±1 0 0 0] . The mathematical model is described by (1) and (2), and the parameters used for simulation and experiments are shown in Table I The objective was to track a sinusoidal signal where r d = 0, p d = 40π/180 sin(0.1πt), and y d = 100π/180 sin(0.05πt), given in Euler angles, that was converted to a quaternion, and also to track the angular velocities as given in (12), and see how the system was affected by quantization of the output and the input. The inputs have limits of ± 24 V. The length of the quantization interval for the outputs were chosen as l ε k = l ω k = 2/(2 R − 1), k = 1, 2, 3, and for the inputs   l u k = 48/(2 R − 1), k = 1, 2, 3, where R is the number of bits transmitted in the communication. The system was tested with different values for R. The performance of the proposed control system was also tested subject to an external disturbance, where we set a fan to blow wind at the helicopter system.

A. Results
The results from test without quantization are shown in Figs. 4-6, showing the error in attitudeε, the error in angular velocity ω e , and the input u, respectively. From Figs. 4 and 5, tracking of the desired reference signals is achieved and the tracking errors are bounded. The value ofε (·) is within [−0.02 + 0.02], which corresponds to an error of about ±0.04 rad or ±2.3 deg in Euler angles. The input signal in Fig. 6 is also bounded.
The system was then tested with quantized output and input. We tested with different values for R, and plots for quantization levels chosen as R = 8 for the output, and R = 6 for the input, are shown in Figs. 7-11, which include the outputs q Q and ω Q , the error in attitudeε Q , the error in angular velocity ω Q e , and the input u Q , respectively. The desired states are shown with a dotted line, and measured values from tests on the helicopter    model are shown with a solid line. The results show that tracking is achieved and that all signals are uniformly bounded, in accordance with the findings of Theorem 1. Next, an external disturbance was added to the system in form of wind, where the input and outputs were quantized. Figs. 12-14 show the attitude errorε Q , the angular velocity error ω Q e , and the input u Q , respectively. As can be seen from the plots, the errors in attitude and angular velocity are kept close to zero during tracking of the reference signals in presence of an external disturbance.

B. Comparing Results
To compare the results with and without quantization, the total tracking error, z track , and the total use of energy, u total , were measured, where    where t 0 and t f define the start and end of the experiment, respectively. The experiments were run for 50 s. The tracking error and total use of energy for different values of R are shown in Tables II and III.  From Table II, it is observed that for higher quantization levels, the tracking error increases. This is according to the findings of Theorem 1. For high values of R, i.e., for small quantization intervals, the system does not show a big difference in performance compared to when using continuous signals. A lower value for R is also possible, and will require less data transmission, but with the cost of higher tracking error, and also with more chattering for the input. The system is more affected by quantization of the output than of the input in terms of tracking error. Table IV compares the tracking error and total   TABLE II  TRACKING ERROR FOR DIFFERENT QUANTIZATION LEVELS   TABLE III  TOTAL ENERGY USE FOR DIFFERENT QUANTIZATION LEVELS   TABLE IV  TRACKING ERROR AND TOTAL USE OF ENERGY WITH AND WITHOUT EXTERNAL DISTURBANCE use of energy when an external disturbance was added. The quantization levels were chosen as R = 8 for the output, and R = 6 for the input. From this experiment, the tracking error increased when a disturbance was introduced, in accordance with the findings of Corollary 1, and also the total use of energy increased. By choosing a small quantization interval, the communication burden over a network can be reduced, and still achieves a good performance.

VI. CONCLUSION
In this article, an adaptive backstepping control scheme was developed for attitude tracking using quaternions where the output and the input were quantized. The quantizer considered satisfied a bounded condition and so the quantization error was bounded. The full state was considered in the stability analysis, and with the use of constructed Lyapunov functions, all signals in the closed-loop system were shown to be uniformly bounded and also tracking of a given reference signal was achieved. Experiments on a 2-DOF helicopter system supported the proof, where a uniform quantizer was tested for the system. As illustrated in the experiment, it is possible to reduce the communication burden over the network by including quantization, where a suitable quantization level must be chosen, depending on the performance requirement for the application.