Research Article  Open Access
Jinjun Shan, Piotr Wenderski, "HardwareintheLoop Simulation for Spacecraft Formation Flying", Journal of Control Science and Engineering, vol. 2010, Article ID 572526, 13 pages, 2010. https://doi.org/10.1155/2010/572526
HardwareintheLoop Simulation for Spacecraft Formation Flying
Abstract
This paper presents a hardwareintheloop (HITL) simulation approach for multiple spacecraft formation flying. Considering a leaderfollower formation flying configuration, a Fuzzy Logic controller is developed first to maintain the desired formation shape under external perturbations and the initial position offsets. Coldgas 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.
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, () redundancy is added to the system that minimizes the risk of total mission failure; () several cooperating spacecraft can solve assignments which are more difficult and expensive, or even impossible with a single spacecraft; () 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, hardwareintheloop (HITL) simulation where some key components are replaced by physical systems and the rest can be done in pure numerical simulation. For the proposed hardwareintheloop simulation strategy in this paper, a coldgas thruster system will be developed to replace the control actuator simulation block.
The remainder of this paper is organized as follows. In Section 2, dynamics modeling of formation flying is briefly introduced. Section 3 presents Fuzzy Logic control design. Section 4 presents the development of coldgas 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]
where is the relative position vector; and are the control vectors; is the Coriolislike matrix given by
is a nonlinear term
where denotes , and where and are the mass of the follower and the leader spacecraft, respectively; the orbit angular velocity ; the orbit angular acceleration with orbital elements: semimajor axis , eccentricity , true anomaly , and mean motion ; ; 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 axis if . 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 , 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.

(a) Threedimensional relative trajectory
(b) Motion in 𝑥 𝑦 plane
(c) Motion in 𝑥 𝑧 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 hardwareintheloop 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 () and relative velocity errors () 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.

Two kinds of membership functions, Triangular and Trapezoidal, are used for fuzzy variables. Figure 3 illustrates the position error and velocity error membership functions.
(a) Position error membership function
(b) Velocity error membership function
3.2. Fuzzy Inference System and Fuzzy Rules
In our study, we use the Sugenotype (or TakagiSugenotype) fuzzy inference. Sugenotype and Mamdanitype 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 Table 3.

Fuzzy rules consist of 25 IfThen rule statements as shown in Table 4. 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.

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 Segenotype fuzzy inference used in this paper, the defuzzification is realized by weighted averaging of all rule outputs as [12]
where and is the output level and the firing strength (weight) of the th rule, respectively.
The defuzzification results will be a value between and +1, where denotes the negative maximal control and +1 the positive maximal control. Considering the onoff thrusters used in this work, the maximal control is defined as the maximal thrust firing time with constant amplitude (acceleration), that is, m/s^{2}.
3.4. Simulation Results
Fuzzy Logic control is then used to maintain the desired symmetric formation shape. Figure 5 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 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 m in all three axes. A tradeoff must be made between the control performance and the fuel consumption.
(a) Threedimensional relative trajectory
(b) Position error in 𝑥 axis
(c) Control signal in 𝑥 axis
(d) Position error in 𝑦 axis
(e) Control signal in 𝑦 axis
(f) Position error in 𝑧 axis
(g) Control signal in 𝑧 axis
(a) Threedimensional relative trajectory
(b) Position error in 𝑥 axis
(c) Position error in 𝑦 axis
(d) Position error in 𝑧 axis
(e) Control signal in 𝑥 axis
(f) Control signal in 𝑦 axis
(g) Control signal in 𝑧 axis
4. HardwareintheLoop (HITL) Simulation
4.1. ColdGas Thruster Development
Hardwareinthe 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 coldgas thruster. The hardware consists of a thruster and its associated electronics, as shown in Figure 7. The thruster was constructed out of a solenoid valve and a nozzle. Two solenoid valves have been chosen: (a) Burkert type 0330 2way normally opened valve; (b) SMC VDW215G 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 twostage regulator is used to manually adjust the pressure of the gas. The electronics involved include a data acquisition and control (DAC) card (ADLINK PCI9221), Velleman K6714 universal relay card, and a power supply. A digital scale, Acculab ATILON ATL8201I, is used to measure the thrust and the measurement is sent to computer via RS232 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 seconds.
MATLAB and SIMULINK is used to run thruster tests and HITL simulations with the RealTime Workshop (RTW). Two types of SIMULINK SFunction blocks were used: one is to connect, 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 SFunction 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 1240 psi and 20100 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.
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 thrustpressure profiles can be seen in Figure 9.
(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. Figure 10 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.
(a) Burkert valve at 60 psi
(b) SMC valve at 28 psi
The 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 hardwareintheloop 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 coldgas 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 Table 1 are used in the HITL simulations. Since only one highaccuracy scale is available, the coldgas thruster is used in 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 perturbation and initial position offsets. Also, the results show that the difference between the HITL and numerical simulations is small when compared.
(a) Threedimensional relative trajectory
(b) Position error in 𝑥 axis (with coldgas thruster)
(c) Position error in 𝑦 axis
(d) Position error in 𝑧 axis
(e) Control signal in 𝑥 axis (with coldgas thruster)
(f) Control signal in 𝑦 axis
(g) Control signal in 𝑧 axis
(a) Threedimensional relative trajectory
(b) Position error in 𝑥 axis (with coldgas thruster)
(c) Position error in 𝑦 axis
(d) Position error in 𝑧 axis
(e) Control signal in 𝑥 axis (with coldgas thruster)
(f) Control signal in 𝑦 axis
(g) Control signal in 𝑧 axis
5. Conclusions
In this paper, a coldgas thruster is developed and used for hardwareintheloop 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.
References
 R. H. Vassar and R. B. Sherwood, “Formationkeeping for a pair of satellites in a circular orbit,” Journal of Guidance, Control, and Dynamics, vol. 8, no. 2, pp. 235–242, 1985. View at: Google Scholar
 J. R. Carpenter, “Decentralized control of satellite formations,” International Journal of Robust and Nonlinear Control, vol. 12, no. 23, pp. 141–161, 2002. View at: Publisher Site  Google Scholar
 S. R. Vadali, S. S. Vaddi, and K. T. Alfriend, “An intelligent control concept for formation flying satellites,” International Journal of Robust and Nonlinear Control, vol. 12, no. 23, pp. 97–115, 2002. View at: Publisher Site  Google Scholar
 J. Shan, H.T. Liu, and G. Liu, “Dynamics and fuzzy control for formation flying with elliptical reference orbits,” in Proceedings of the AIAA Guidance, Navigation, and Control Conference and Exhibit, vol. 3, pp. 1477–1489, Providence, RI, USA, August 2004, AIAA paper 2004–5025. View at: Google Scholar
 M. S. de Queiroz, V. Kapila, and Q. Yan, “Adaptive nonlinear control of multiple spacecraft formation flying,” Journal of Guidance, Control, and Dynamics, vol. 23, no. 3, pp. 385–390, 2000. View at: Google Scholar
 H. Pan and V. Kapila, “Adaptive nonlinear control for spacecraft formation flying with coupled translational and attitude dynamics,” in Proceedings of the 40th IEEE Conference on Decision and Control (CDC '01), vol. 3, pp. 2057–2062, Orlando, Fla, USA, December 2001. View at: Google Scholar
 H. Wong, H. Pan, M. de Queiroz, and V. Kapila, “Adaptive learning control for spacecraft formation flying,” in Advances in Dynamics and Control, S. Sivasundaram, Ed., pp. 15–27, Boca Raton, Fla, USA, CRC Press, 2004. View at: Google Scholar
 P. K. C. Wang, F. Y. Hadaegh, and K. Lau, “Synchronized formation rotation and attitude control of multiple freeflying spacecraft,” Journal of Guidance, Control, and Dynamics, vol. 22, no. 1, pp. 28–35, 1999. View at: Google Scholar
 H.T. Liu, J. Shan, and D. Sun, “Adaptive synchronization control of multiple spacecraft formation flying,” Journal of Dynamic Systems, Measurement and Control, vol. 129, no. 3, pp. 337–342, 2007. View at: Publisher Site  Google Scholar
 D. Scharf, F. Hadaegh, J. Keim, A. Morfopoulos, A. Ahmed, and Y. Brenman, “Flightlike ground demonstrations of precision maneuvers for spacecraft formations,” in Proceedings of the AIAA Guidance, Navigation, and Control Conference and Exhibit, Honolulu, Hawaii, USA, August 2008, AIAA2008–6665. View at: Google Scholar
 V. Kapila, A. G. Sparks, J. M. Buffington, and Q. Yan, “Spacecraft formation flying: dynamics and control,” Journal of Guidance, Control, and Dynamics, vol. 23, no. 3, pp. 561–564, 2000. View at: Google Scholar
 P. Wenderski, Formation flying hardwareintheloop simulation using a coldgas thruster, M.S. thesis, York University, Toronto, Canada, October 2009.
Copyright
Copyright © 2010 Jinjun Shan and Piotr Wenderski. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.