# Algorithm for minimum thruster usage to control three axes

In order to control 3 axes, the spacecraft has 4 thrusters. These thruster's torques can divide the space around the spacecraft into four regions. Consequently, by eliminating one of the thrusters, we can obtain reduced matrix 3*3. How can we compute or which method can we use to get the torque desired?

• – SF. Nov 28 '18 at 10:08
• – Russell Borogove Nov 28 '18 at 16:17
• Not a duplicate because the question asks for the method, but I would recommend editing at least the title because it has a different scope. – Mefitico Nov 28 '18 at 16:49
• Is no one going to pick up the request for an algorithm thing? (I will if no one does), or even on how to weigh constraints and goals to determine what constitutes a solution, or the control theoretic aspects (which arguably dominate the question, as OP ought to know, pushing something the other way based on how far it away from where you want it is the reason CT exists, try it in a spreadsheet with something on a spring) – Alec Teal Nov 28 '18 at 21:40

According to Marcel Sidi's book you can indeed control attitude in three axis with 4 thrusters, each of them oriented in the spaceccraft frame along a direction $$v_i$$, and supplying a torque of $$\tau_i$$. The total torque applied on the spacecraft is given then by:

$$T = \begin{bmatrix} v_1^T\\ v_2^T\\ v_3^T\\ v_4^T\\ \end{bmatrix} . \begin{bmatrix} f_1\\ f_2\\ f_3\\ f_4\\ \end{bmatrix} = M. \begin{bmatrix} f_1\\ f_2\\ f_3\\ f_4\\ \end{bmatrix}$$

Then if you know the torque $$T$$ you want to produce, you can find the torque per thruster with:

$$\begin{bmatrix} f_1\\ f_2\\ f_3\\ f_4\\ \end{bmatrix} = M^{\dagger}T + uK(M)$$

Where $$M^{\dagger}$$ is could be any right inverse for $$M$$, but use the pseudo-inverse because it minimizes the norm of the total torque. $$K(M)$$ is the kernel of the transformation ($$K(M).M = 0$$), such that $$u$$ is an arbitrary scalar (recommended to set to zero).

Up until here, I've assumed that both positive an negative torques could be produced by thrusters, when they actually only produce positive torques. This enters the less consolidated part of this algorithm. Sidi basically suggests (to my understanding) that one possibility is to define $$C_i$$ as the $$M$$ matrix with the i-th row eliminated. Then if the thrusters are properly placed compute :

$$f_i = C_i^{\dagger} T$$

Then out of the four possible $$f_i$$ one will have all positive terms. Then the torque is generated using only three of the thrusters.

• Intuitively I feel like the answer to is "yeah but I can only get positive thrust out of these thrusters" is "fine, wait until you rotate 180 degrees and then you have no problem" but I'm not sure how to prove that or if it's even accurate. – Roger Nov 28 '18 at 17:17
• @Roger: The "wait until you rotate 180°" parts is a contradiction to the goal of achieving (and maintaining) a commanded attitude. If you want to point solar panels to the Sun, you want to do it as fast as possible, and then keep them pointing to Sun. Waiting for the satellite to reorient itself is the same as allowing it to point whatever, and when convenient make it turn towards the sun, but without necessarily stopping when the target attitude is achieved.d – Mefitico Nov 28 '18 at 18:51
• Even if you only want stabilization, not specific orientation, if you wait for the satellite to turn 180 degrees your thrust vector turns 180 degrees and your arm from center of mass to the thruster does, so you'll produce the same torque instead of negative. – SF. Nov 28 '18 at 23:16

The explanation by Mefitico is along the right lines. The trick here is not to assume $$u=0$$. The thruster configuration can be chosen such that the kernal has all positive components. Then $$u$$ is selected to guarentee a positive solution, see

SanchezPena,R.S.and Alonso,R.andAnigstein,P.A.: Robust Optimal Solution to the Attitude/Force Control Problem, IEEE Transactions on aerospace and electronic systems,vol.36,No.3,pp.784-792,(2000)