# Hardware-in-the-Loop Simulation for Spacecraft Formation Flying

Authors: Jinjun Shan; Piotr Wenderski
Journal: Journal of Control Science and Engineering
 (2010)

---

## Abstract

This paper presents a hardware-in-the-loop (HITL) simulation approach for multiple spacecraft formation flying. Considering a leader-follower formation flying configuration, a Fuzzy Logic controller is developed first to maintain the desired formation shape under external perturbations and the initial position offsets. Cold-gas on/off thrusters are developed to be introduced to the simulation loop, and the HITL simulations are conducted to validate the effectiveness of the proposed simulation configuration and Fuzzy Logic control.


---

## Body

## 1. Introduction

Multiple spacecraft formation flying (MSFF) missions have been areas of increased interest in the recent years. NASA and the U.S. Air Force have identified MSFF as an enabling technology for future missions. This is due to many inherent advantages the distributed design adds to the mission. By distributing payload on several spacecraft, (1) redundancy is added to the system that minimizes the risk of total mission failure; (2) several cooperating spacecraft can solve assignments which are more difficult and expensive, or even impossible with a single spacecraft; (3) the launch costs can be reduced by deploying small spacecraft in clusters or using inexpensive rocket vehicles.The ability to accurately control the relative position of the spacecraft in formation is key to the success of such missions. This results in stringent requirements on control algorithms and measurement systems. Several control strategies have been developed for spacecraft formation flying, for example, LQR [1], decentralized control [2], intelligent control [3], Fuzzy control [4], adaptive control [5–7], synchronization control [8–10], and so forth.Once a controller is developed for formation flying mission, it must be verified in order to apply it. One approach is to conduct hardware experiments, for example, TPF mission experiments at the Jet Propulsion Laboratory (JPL) [10]. However, this kind of hardware experiment is extremely expensive and time consuming. Here we propose a substitute approach for this purpose, for example, hardware-in-the-loop (HITL) simulation where some key components are replaced by physical systems and the rest can be done in pure numerical simulation. For the proposed hardware-in-the-loop simulation strategy in this paper, a cold-gas thruster system will be developed to replace the control actuator simulation block.The remainder of this paper is organized as follows. In Section2, dynamics modeling of formation flying is briefly introduced. Section 3 presents Fuzzy Logic control design. Section 4 presents the development of cold-gas thruster system and some test results. HITL simulation results are presented in Section 4.3. Finally, Section 5 offers some conclusions.


## 2. Dynamics Modeling

Dynamics modeling of spacecraft in formation has been studied in the previous work such as [4, 5, 9]. Considering the leader (ℒ) and the follower (ℱ) spacecraft shown in Figure 1, the relative motion can be described by [4]Figure 1
Relative motion of spacecraft and the earth.(1)mfq̈+C(ω)q̇+N(q,ω,ω̇,rl,ul)+fd=uf,
where q≜[x(t)y(t)z(t)]T∈ℝ3 is the relative position vector; uf≜[uxfuyfuzf]T∈ℝ3 and ul≜[uxluyluzl]T∈ℝ3 are the control vectors; C(ω)∈ℝ3×3 is the Coriolis-like matrix given by(2)C(ω)≜2mfω[010-100000].N(q,ω,ω̇,rl,ul)∈ℝ3 is a nonlinear term(3)N(q,ω,ω̇,rl,ul)≜[mfμ𝒦(x,y,z,rl)x-mfω2x+mfω̇y+mfmluxl𝒬-mfω2y-mfω̇x+mfmluylmfμ𝒦(x,y,z,rl)z+mfmluzl],
where  𝒬  denotes mfμ[𝒦(x,y,z,rl)(y+rl)-rl-2], and where mf and ml are the mass of the follower and the leader spacecraft, respectively; the orbit angular velocity ω=θ̇=n(1+ecosθ)2/(1-e2)3/2; the orbit angular acceleration ω̇=θ̈=-2n2esinθ(1+ecosθ)3/(1-e2)3 with orbital elements: semimajor axis a, eccentricity e, true anomaly θ, and mean motion n=μ/a3; 𝒦(x,y,z,rl)≜[x2+(rl+y)2+z2]-3/2; fd≜(mf/ml)fl-ff∈ℝ3 is the total, constant disturbance force difference vector.It was found that some special formation shapes (relative trajectory) can be formed if the initial conditions satisfy some relations [4]. For example, the formation shape will be symmetric with respect to x-axis if ẋ(0)=(-n(2+e)/(1+e)(1-e)3)y(0). In this paper, this symmetric relative motion will be considered as the desired formation shape to maintain.It has been shown previously [4, 11] that due to offsets in initial conditions and orbital perturbations such as J2, solar pressure, the closed formation shape cannot be kept, as shown in Figure 2. The simulation parameters are given in Table 1. The relative position errors are up to 25 m, 3 m, and 0.5 m in three axes after 50 hours. Obviously, active control is needed.Table 1
Simulation parameters.
ParameterValuea (km)16900e0.1i (deg)45n (rad/s)0.00028737T (hrs)6.0735ml (kg)1550mf (kg)410x(0) (m)0ẋ(0) (m/s)-0.0674y(0) (m)100ẏ(0) (m/s)0z(0) (m)50ż(0) (m/s)0Δx0,Δy0,Δz0 (m)10,0,-10Relative motion of spacecraft in formation withJ2 perturbation and initial offsets.
(a)
Three-dimensional relative trajectory(b)
Motion inxy plane(c)
Motion inxz plane


## 3. Fuzzy Logic Control

Fuzzy Logic control [4] will be applied to spacecraft formation flying mission to maintain the desired symmetric formation shape under external perturbations and tested using our hardware-in-the-loop simulation facility. The implementation of Fuzzy Logic control needs determination of fuzzy variables and membership functions, establishment of fuzzy rules, fuzzy inference, and defuzzification.


### 3.1. Fuzzy Variables, Fuzzy Sets, and Membership Functions

Here, we choose the relative position errors (ex,ey,ez) and relative velocity errors (ėx,ėy,ėz) as the fuzzy variables (fuzzy inputs) to the Fuzzy Logic controller. The fuzzy sets for these two fuzzy variables are listed in Table 2 and consist of NL, NS, ZE, PS, and PL.Table 2
Fuzzy sets and output membership functions.
Fuzzy setMeaningNLNegative largeNSNegative smallZEZeroPSPositive smallPLPositive largeTwo kinds of membership functions, Triangular and Trapezoidal, are used for fuzzy variables. Figure3 illustrates the position error and velocity error membership functions.Membership functions of fuzzy inputs.
(a)
Position error membership function(b)
Velocity error membership function


### 3.2. Fuzzy Inference System and Fuzzy Rules

In our study, we use the Sugeno-type (or Takagi-Sugeno-type) fuzzy inference. Sugeno-type and Mamdani-type fuzzy inferences are similar in many aspects and the main difference is that the Sugeno output membership functions are either linear or constant. The five constant output membership functions are given in Table3.Table 3
Fuzzy output membership functions.
Fuzzy output MFMeaningNMNegative maximum,-1NLNegative large,-0.5ZEZero, 0PLPositive large, +0.5PMPositive maximum, +1Fuzzy rules consist of 25 If-Then rule statements as shown in Table4. Those rules are formed according to the common sense of how to control a system with position error and velocity error information [12]. Figure 4 shows the fuzzy surface of control output with respect to relative position error and relative velocity error.Table 4
Fuzzy rules.
If condition 1If condition 2Then statement(position errorex,y,z)(velocity errorėx,y,z)(control actionu)NLNLPMNLNSPLNLZEPLNLPSZENLPLZENSNLPLNSNSPLNSZEPLNSPSZENSPLZEZENLPLZENSZEZEZEZEZEPSZEZEPLNLPSNLZEPSNSZEPSZENLPSPSNLPSPLNLPLNLZEPLNSZEPLZENLPLPSNLPLPLNMFigure 4
Fuzzy output surface.


### 3.3. Defuzzification

By applying the fuzzy rules and the fuzzy inference system, the fuzzy output can be obtained. To determine exactly how much control force should be applied, defuzzification of the rules is needed. Defuzzification converts the fuzzy value to a single number and is the reverse process of fuzzification. For Segeno-type fuzzy inference used in this paper, the defuzzification is realized by weighted averaging of all rule outputs as [12](4)Z=∑i=1nwizi∑i=1nwi,
where zi and wi is the output level and the firing strength (weight) of the ith rule, respectively.The defuzzification results will be a value between-1 and +1, where -1 denotes the negative maximal control and +1 the positive maximal control. Considering the on-off thrusters used in this work, the maximal control is defined as the maximal thrust firing time with constant amplitude (acceleration), that is,  ±0.005 m/s2.


### 3.4. Simulation Results

Fuzzy Logic control is then used to maintain the desired symmetric formation shape. Figure5 shows the simulation results with the control interval of 200 seconds and the maximum thruster firing time of 2 seconds. The position errors have been controlled within ±0.1 m in all three axes using Fuzzy Logic control. To reduce the fuel consumption, the control interval is increased from 200 seconds to 1000 seconds but keep the maximum thruster firing time unchanged. The results are shown in Figure 6. Comparing Figure 6 with Figure 5, it can be clearly seen that much less fuel is needed to maintain the desired formation shape; however the position errors go up to be within ±0.5 m in all three axes. A tradeoff must be made between the control performance and the fuel consumption.Simulation results using Fuzzy Logic control (control interval: 200 seconds; maximum firing time: 2 seconds).
(a)
Three-dimensional relative trajectory(b)
Position error inx-axis(c)
Control signal inx-axis(d)
Position error iny-axis(e)
Control signal iny-axis(f)
Position error inz-axis(g)
Control signal inz-axisSimulation results using Fuzzy Logic control (control interval: 1000 seconds; maximum firing time: 2 seconds).
(a)
Three-dimensional relative trajectory(b)
Position error inx-axis(c)
Position error iny-axis(d)
Position error inz-axis(e)
Control signal inx-axis(f)
Control signal iny-axis(g)
Control signal inz-axis


## 3.1. Fuzzy Variables, Fuzzy Sets, and Membership Functions

Here, we choose the relative position errors (ex,ey,ez) and relative velocity errors (ėx,ėy,ėz) as the fuzzy variables (fuzzy inputs) to the Fuzzy Logic controller. The fuzzy sets for these two fuzzy variables are listed in Table 2 and consist of NL, NS, ZE, PS, and PL.Table 2
Fuzzy sets and output membership functions.
Fuzzy setMeaningNLNegative largeNSNegative smallZEZeroPSPositive smallPLPositive largeTwo kinds of membership functions, Triangular and Trapezoidal, are used for fuzzy variables. Figure3 illustrates the position error and velocity error membership functions.Membership functions of fuzzy inputs.
(a)
Position error membership function(b)
Velocity error membership function


## 3.2. Fuzzy Inference System and Fuzzy Rules

In our study, we use the Sugeno-type (or Takagi-Sugeno-type) fuzzy inference. Sugeno-type and Mamdani-type fuzzy inferences are similar in many aspects and the main difference is that the Sugeno output membership functions are either linear or constant. The five constant output membership functions are given in Table3.Table 3
Fuzzy output membership functions.
Fuzzy output MFMeaningNMNegative maximum,-1NLNegative large,-0.5ZEZero, 0PLPositive large, +0.5PMPositive maximum, +1Fuzzy rules consist of 25 If-Then rule statements as shown in Table4. Those rules are formed according to the common sense of how to control a system with position error and velocity error information [12]. Figure 4 shows the fuzzy surface of control output with respect to relative position error and relative velocity error.Table 4
Fuzzy rules.
If condition 1If condition 2Then statement(position errorex,y,z)(velocity errorėx,y,z)(control actionu)NLNLPMNLNSPLNLZEPLNLPSZENLPLZENSNLPLNSNSPLNSZEPLNSPSZENSPLZEZENLPLZENSZEZEZEZEZEPSZEZEPLNLPSNLZEPSNSZEPSZENLPSPSNLPSPLNLPLNLZEPLNSZEPLZENLPLPSNLPLPLNMFigure 4
Fuzzy output surface.


## 3.3. Defuzzification

By applying the fuzzy rules and the fuzzy inference system, the fuzzy output can be obtained. To determine exactly how much control force should be applied, defuzzification of the rules is needed. Defuzzification converts the fuzzy value to a single number and is the reverse process of fuzzification. For Segeno-type fuzzy inference used in this paper, the defuzzification is realized by weighted averaging of all rule outputs as [12](4)Z=∑i=1nwizi∑i=1nwi,
where zi and wi is the output level and the firing strength (weight) of the ith rule, respectively.The defuzzification results will be a value between-1 and +1, where -1 denotes the negative maximal control and +1 the positive maximal control. Considering the on-off thrusters used in this work, the maximal control is defined as the maximal thrust firing time with constant amplitude (acceleration), that is,  ±0.005 m/s2.


## 3.4. Simulation Results

Fuzzy Logic control is then used to maintain the desired symmetric formation shape. Figure5 shows the simulation results with the control interval of 200 seconds and the maximum thruster firing time of 2 seconds. The position errors have been controlled within ±0.1 m in all three axes using Fuzzy Logic control. To reduce the fuel consumption, the control interval is increased from 200 seconds to 1000 seconds but keep the maximum thruster firing time unchanged. The results are shown in Figure 6. Comparing Figure 6 with Figure 5, it can be clearly seen that much less fuel is needed to maintain the desired formation shape; however the position errors go up to be within ±0.5 m in all three axes. A tradeoff must be made between the control performance and the fuel consumption.Simulation results using Fuzzy Logic control (control interval: 200 seconds; maximum firing time: 2 seconds).
(a)
Three-dimensional relative trajectory(b)
Position error inx-axis(c)
Control signal inx-axis(d)
Position error iny-axis(e)
Control signal iny-axis(f)
Position error inz-axis(g)
Control signal inz-axisSimulation results using Fuzzy Logic control (control interval: 1000 seconds; maximum firing time: 2 seconds).
(a)
Three-dimensional relative trajectory(b)
Position error inx-axis(c)
Position error iny-axis(d)
Position error inz-axis(e)
Control signal inx-axis(f)
Control signal iny-axis(g)
Control signal inz-axis


## 4. Hardware-in-the-Loop (HITL) Simulation

### 4.1. Cold-Gas Thruster Development

Hardware-in-the loop simulation is proposed to test control strategies for spacecraft formation flying where we will replace some simulation blocks with real hardware. In this work, we will replace control actuator block with a cold-gas thruster. The hardware consists of a thruster and its associated electronics, as shown in Figure7. The thruster was constructed out of a solenoid valve and a nozzle. Two solenoid valves have been chosen: (a) Burkert type 0330 2-way normally opened valve; (b) SMC VDW21-5G valve. Four different nozzles were used, two for each type of valve. The solenoid valve was attached to a Nitrogen gas tank via air tubing and fittings. A two-stage regulator is used to manually adjust the pressure of the gas. The electronics involved include a data acquisition and control (DAC) card (ADLINK PCI-9221), Velleman K6714 universal relay card, and a power supply. A digital scale, Acculab ATILON ATL-8201-I, is used to measure the thrust and the measurement is sent to computer via RS-232 serial port and to MATLAB program. This scale has a maximum weight capacity of 8200 g, an accuracy of 0.1 g, and update time ~0.1 seconds.Figure 7
Thruster test system.MATLAB and SIMULINK is used to run thruster tests and HITL simulations with the Real-Time Workshop (RTW). Two types of SIMULINK S-Function blocks were used: one is toconnect, read, format, and close the connection to the serial port and scale; the other is to connect to the DAC card's digital ports and send either 1 or 0, which corresponds to 5 V or 0 V digital output, to the ports. By sending out a ±5 V signal to DAQ card's digital port, the relay is turned on and consequently the thruster is “fired” for a specific amount of time. SIMULINK S-Function then gathers the thrust measurement from the serial port and the string data is converted to a thrust measurement for postprocessing.


### 4.2. Thruster Test

#### 4.2.1. Thrust versus Pressure Test

Two types of thruster tests are conducted. The first one is to determine the relationship between the generated thrust and gas pressure. The thruster is run for duration between 1 seconds and 5 seconds, with pressures 12~40 psi and 20~100 psi for the SMC and Burkert valve, respectively. This test aims to show any dependencies between the thrust and inlet pressure of the valve. Figure 8 shows the result of an experimental run.Figure 8
On/off test of Burkert solenoid valve for pressure range 20–100 psi.Using these tests, a thrust versus pressure profile is generated for different setups. Small human error differences arose in the tests due to the fact that the pressure was adjusted manually on the regulator and might not been exactly the same for all runs. However, the errors are small, that is, less than 10 mN. All of the test runs show that the setups studied have a portion of their thrust profiles linearly dependent on pressure. The thrust ranged from 0.2 N to 1.4 N for Burkert and 0.018 N to 0.11 N for SMC thrusters over their respective pressure ranges. Plots of thrust-pressure profiles can be seen in Figure9.Thrust-pressure profile.
(a)
SMC valve(b)
Burkert valve


#### 4.2.2. Thruster Characterization Test

Thruster characterization tests are conducted by reading a digital pulse with a length of 20 seconds and duty cycle of 50%. In this test the on and off times are measured as well as the consistency of the thrust. The turn on time is defined as the time it takes to reach maximum thrust from 0 N, where as the off time is measured as time it takes to reach 0 N at the end of the burn time. The Burkert valves were tested at 60 psi where as SMC valves at 28 psi. Figure10 shows the resulting thrust profiles. It can be seen that the turn on signal generated by the pulse at 5 seconds and ending at 15 seconds mark, as well as the resulting thrust profile for the same 10 seconds turn on time. The tests were repeated 5 times and a delay between the turn on time and the actual thrust can be seen. This delay is on the order of 0.4 seconds and 0.7 seconds for the Burkert and SMC thruster, respectively.Thruster characterization test.
(a)
Burkert valve at 60 psi(b)
SMC valve at 28 psiThe lag is mainly due to the digital scale, which must stabilize the measurement before readout. The higher lag time of the SMC thruster is due to the solenoid valve itself. The valve might not turn on as fast therefore this lag difference would also contribute to the turn on time. In the following hardware-in-the-loop tests, the simulations will be run with control interval more than 200 seconds, which would make the delay insignificant.


### 4.3. HITL Simulation Results

To validate the effectiveness of the proposed HITL simulations, we apply the designed Fuzzy Logic controller to maintain the desired formation flying shape. The basic idea is to replace the thruster SIMULINK block with the developed cold-gas thruster. The computed control command is sent to DAC card to turn on or off the thruster. The thrust measurement is sent back to the dynamic model in SIMULINK to form the closed loop. In order to compare with the simulation results, the parameters and initial conditions in Table1 are used in the HITL simulations. Since only one high-accuracy scale is available, the cold-gas thruster is used in x-axis only. Thrusters for the other two axes are simulated by SIMULINK blocks and are of constant amplitude. The thruster operates at 60 psi to produce approximately force of 0.8 N. The HITL simulations are run for 15 hours for safety reason. Figures 11 and 12 show the simulation results for control interval of 200 seconds and 1000 seconds, respectively. For these two simulations, the maximum thruster firing time is 2 seconds. For comparison, the numerical simulation results are plotted in the same figures together with the HITL simulation results. It can be seen that the spacecraft stay in the desired formation shape with Fuzzy Logic controller, even with J2 perturbation and initial position offsets. Also, the results show that the difference between the HITL and numerical simulations is small when compared.HITL simulation results with Fuzzy Logic control (control interval: 200 seconds; maximum firing time: 2 seconds).
(a)
Three-dimensional relative trajectory(b)
Position error inx-axis (with cold-gas thruster)(c)
Position error iny-axis(d)
Position error inz-axis(e)
Control signal inx-axis (with cold-gas thruster)(f)
Control signal iny-axis(g)
Control signal inz-axisHITL simulation results with Fuzzy Logic control (control interval: 1000 seconds; maximum firing time: 2 seconds).
(a)
Three-dimensional relative trajectory(b)
Position error inx-axis (with cold-gas thruster)(c)
Position error iny-axis(d)
Position error inz-axis(e)
Control signal inx-axis (with cold-gas thruster)(f)
Control signal iny-axis(g)
Control signal inz-axis


## 4.1. Cold-Gas Thruster Development

Hardware-in-the loop simulation is proposed to test control strategies for spacecraft formation flying where we will replace some simulation blocks with real hardware. In this work, we will replace control actuator block with a cold-gas thruster. The hardware consists of a thruster and its associated electronics, as shown in Figure7. The thruster was constructed out of a solenoid valve and a nozzle. Two solenoid valves have been chosen: (a) Burkert type 0330 2-way normally opened valve; (b) SMC VDW21-5G valve. Four different nozzles were used, two for each type of valve. The solenoid valve was attached to a Nitrogen gas tank via air tubing and fittings. A two-stage regulator is used to manually adjust the pressure of the gas. The electronics involved include a data acquisition and control (DAC) card (ADLINK PCI-9221), Velleman K6714 universal relay card, and a power supply. A digital scale, Acculab ATILON ATL-8201-I, is used to measure the thrust and the measurement is sent to computer via RS-232 serial port and to MATLAB program. This scale has a maximum weight capacity of 8200 g, an accuracy of 0.1 g, and update time ~0.1 seconds.Figure 7
Thruster test system.MATLAB and SIMULINK is used to run thruster tests and HITL simulations with the Real-Time Workshop (RTW). Two types of SIMULINK S-Function blocks were used: one is toconnect, read, format, and close the connection to the serial port and scale; the other is to connect to the DAC card's digital ports and send either 1 or 0, which corresponds to 5 V or 0 V digital output, to the ports. By sending out a ±5 V signal to DAQ card's digital port, the relay is turned on and consequently the thruster is “fired” for a specific amount of time. SIMULINK S-Function then gathers the thrust measurement from the serial port and the string data is converted to a thrust measurement for postprocessing.


## 4.2. Thruster Test

### 4.2.1. Thrust versus Pressure Test

Two types of thruster tests are conducted. The first one is to determine the relationship between the generated thrust and gas pressure. The thruster is run for duration between 1 seconds and 5 seconds, with pressures 12~40 psi and 20~100 psi for the SMC and Burkert valve, respectively. This test aims to show any dependencies between the thrust and inlet pressure of the valve. Figure 8 shows the result of an experimental run.Figure 8
On/off test of Burkert solenoid valve for pressure range 20–100 psi.Using these tests, a thrust versus pressure profile is generated for different setups. Small human error differences arose in the tests due to the fact that the pressure was adjusted manually on the regulator and might not been exactly the same for all runs. However, the errors are small, that is, less than 10 mN. All of the test runs show that the setups studied have a portion of their thrust profiles linearly dependent on pressure. The thrust ranged from 0.2 N to 1.4 N for Burkert and 0.018 N to 0.11 N for SMC thrusters over their respective pressure ranges. Plots of thrust-pressure profiles can be seen in Figure9.Thrust-pressure profile.
(a)
SMC valve(b)
Burkert valve


### 4.2.2. Thruster Characterization Test

Thruster characterization tests are conducted by reading a digital pulse with a length of 20 seconds and duty cycle of 50%. In this test the on and off times are measured as well as the consistency of the thrust. The turn on time is defined as the time it takes to reach maximum thrust from 0 N, where as the off time is measured as time it takes to reach 0 N at the end of the burn time. The Burkert valves were tested at 60 psi where as SMC valves at 28 psi. Figure10 shows the resulting thrust profiles. It can be seen that the turn on signal generated by the pulse at 5 seconds and ending at 15 seconds mark, as well as the resulting thrust profile for the same 10 seconds turn on time. The tests were repeated 5 times and a delay between the turn on time and the actual thrust can be seen. This delay is on the order of 0.4 seconds and 0.7 seconds for the Burkert and SMC thruster, respectively.Thruster characterization test.
(a)
Burkert valve at 60 psi(b)
SMC valve at 28 psiThe lag is mainly due to the digital scale, which must stabilize the measurement before readout. The higher lag time of the SMC thruster is due to the solenoid valve itself. The valve might not turn on as fast therefore this lag difference would also contribute to the turn on time. In the following hardware-in-the-loop tests, the simulations will be run with control interval more than 200 seconds, which would make the delay insignificant.


## 4.2.1. Thrust versus Pressure Test

Two types of thruster tests are conducted. The first one is to determine the relationship between the generated thrust and gas pressure. The thruster is run for duration between 1 seconds and 5 seconds, with pressures 12~40 psi and 20~100 psi for the SMC and Burkert valve, respectively. This test aims to show any dependencies between the thrust and inlet pressure of the valve. Figure 8 shows the result of an experimental run.Figure 8
On/off test of Burkert solenoid valve for pressure range 20–100 psi.Using these tests, a thrust versus pressure profile is generated for different setups. Small human error differences arose in the tests due to the fact that the pressure was adjusted manually on the regulator and might not been exactly the same for all runs. However, the errors are small, that is, less than 10 mN. All of the test runs show that the setups studied have a portion of their thrust profiles linearly dependent on pressure. The thrust ranged from 0.2 N to 1.4 N for Burkert and 0.018 N to 0.11 N for SMC thrusters over their respective pressure ranges. Plots of thrust-pressure profiles can be seen in Figure9.Thrust-pressure profile.
(a)
SMC valve(b)
Burkert valve


## 4.2.2. Thruster Characterization Test

Thruster characterization tests are conducted by reading a digital pulse with a length of 20 seconds and duty cycle of 50%. In this test the on and off times are measured as well as the consistency of the thrust. The turn on time is defined as the time it takes to reach maximum thrust from 0 N, where as the off time is measured as time it takes to reach 0 N at the end of the burn time. The Burkert valves were tested at 60 psi where as SMC valves at 28 psi. Figure10 shows the resulting thrust profiles. It can be seen that the turn on signal generated by the pulse at 5 seconds and ending at 15 seconds mark, as well as the resulting thrust profile for the same 10 seconds turn on time. The tests were repeated 5 times and a delay between the turn on time and the actual thrust can be seen. This delay is on the order of 0.4 seconds and 0.7 seconds for the Burkert and SMC thruster, respectively.Thruster characterization test.
(a)
Burkert valve at 60 psi(b)
SMC valve at 28 psiThe lag is mainly due to the digital scale, which must stabilize the measurement before readout. The higher lag time of the SMC thruster is due to the solenoid valve itself. The valve might not turn on as fast therefore this lag difference would also contribute to the turn on time. In the following hardware-in-the-loop tests, the simulations will be run with control interval more than 200 seconds, which would make the delay insignificant.


## 4.3. HITL Simulation Results

To validate the effectiveness of the proposed HITL simulations, we apply the designed Fuzzy Logic controller to maintain the desired formation flying shape. The basic idea is to replace the thruster SIMULINK block with the developed cold-gas thruster. The computed control command is sent to DAC card to turn on or off the thruster. The thrust measurement is sent back to the dynamic model in SIMULINK to form the closed loop. In order to compare with the simulation results, the parameters and initial conditions in Table1 are used in the HITL simulations. Since only one high-accuracy scale is available, the cold-gas thruster is used in x-axis only. Thrusters for the other two axes are simulated by SIMULINK blocks and are of constant amplitude. The thruster operates at 60 psi to produce approximately force of 0.8 N. The HITL simulations are run for 15 hours for safety reason. Figures 11 and 12 show the simulation results for control interval of 200 seconds and 1000 seconds, respectively. For these two simulations, the maximum thruster firing time is 2 seconds. For comparison, the numerical simulation results are plotted in the same figures together with the HITL simulation results. It can be seen that the spacecraft stay in the desired formation shape with Fuzzy Logic controller, even with J2 perturbation and initial position offsets. Also, the results show that the difference between the HITL and numerical simulations is small when compared.HITL simulation results with Fuzzy Logic control (control interval: 200 seconds; maximum firing time: 2 seconds).
(a)
Three-dimensional relative trajectory(b)
Position error inx-axis (with cold-gas thruster)(c)
Position error iny-axis(d)
Position error inz-axis(e)
Control signal inx-axis (with cold-gas thruster)(f)
Control signal iny-axis(g)
Control signal inz-axisHITL simulation results with Fuzzy Logic control (control interval: 1000 seconds; maximum firing time: 2 seconds).
(a)
Three-dimensional relative trajectory(b)
Position error inx-axis (with cold-gas thruster)(c)
Position error iny-axis(d)
Position error inz-axis(e)
Control signal inx-axis (with cold-gas thruster)(f)
Control signal iny-axis(g)
Control signal inz-axis


## 5. Conclusions

In this paper, a cold-gas thruster is developed and used for hardware-in-the-loop simulation. With the proposed simulation strategy, various HITL simulation tests can be done. To validate the effectiveness, a Fuzzy Logic controller is designed and applied to maintain the desired formation flying shape under external perturbations. Both numerical and HITL simulations are conducted and the results verified the effectiveness of Fuzzy Logic controller and also showed that HITL simulation is an effective engineering verification approach for spacecraft formation flying control. Moreover, this proposed HITL simulation approach can be used for test of other space subsystems.



---

*Source: 572526-2010-04-07.xml*