# What is the math behind Magnetorquers?

I'm trying to better understand the mathematics behind how torque rods work. I know that even if you have 3 axis of magnetic torquers, in effect there is only 2 axis of control, and I'm trying to figure out how all of this works exactly. Specifically, let's assume the following hypothetical situation:

I have a location of a satellite in LEO, and the magnetic field vector for said satellite. I have magnetorquers on the satellite of a known strength, and I'm trying to determine how much control authority I have in various directions. How much control authority do I have, given a magnetic field in body coordinates, and 3 equal strength magnetorquers in orthogonal vectors lined up with the body axis?

A set of three orthogonally aligned torque rods wired up so they can generate a magnetic dipole field of either sign (i.e. flip the North and South poles) can generate a magnetic field of arbitrary orientation (up to the maximum vector sum of the dipole moment of each rod individually).

This artificial field interacts with the Earth's magnetic field to produce a net external torque on the vehicle that will tend to line up the fields. Mathematically, the torque is provided in the direction of:

$\mathbf{\tau}=\mathbf{\mu}\times\mathbf{B}$, where $\tau$ is the torque on the satellite, $\mathbf{B}$ is the ambient magnetic field, and $\mu$ is the magnetic field of the satellite

This torque only has two degrees of freedom, i.e. instantaneously the torque rods will tend to align the vehicle and Earth fields, with no control of the rotation of the vehicle around its magnetic poles. (see below for proof)

However, remember that the magnetic field lines around the Earth are themselves a dipole field, which is a toroidal shape. This means as the spacecraft orbits the Earth it encounters a diversity of Earth magnetic field orientations and in general the time-averaged effect of this field diversity enables full 3-axis control.

That said, the field is weak, so the actual torque produced by torque rods is very small. It's completely unsuitable for agile spacecraft (e.g. imagers), for which attitude control effectors like reaction wheels or control moment gyros are typically used. Torque rods are used to desaturate these effectors which accumulate momentum due to disturbance torques like atmospheric drag, and to de-spin satellites (e.g. due to tip-off rates at launch vehicle separation).

### Proof of the ineffectiveness of torque rods in the absence of magnetic field diversity

Torque rods rely on the change in direction of the Earth's magnetic field, which is especially problematic in equatorial orbits because (to first order) the field has a constant inertial direction. Equating the control torque with the rigid-body rotational equations of motion:

$$\mathbf{\mu}\times\mathbf{B}=\mathbf{\tau}=\mathbf{I\alpha+\omega}\times\mathbf{I\omega}$$

where $\mathbf{I}$ is the moment of inertia tensor, $\mathbf{\omega}$ is the vector body rates, and $\mathbf{\alpha}$ is the vector of body accelerations (i.e. $\dot{\omega}$), all in an arbitrary inertial reference frame. Moment of inertia matrices are always real and symmetric and can thus be decomposed / rotated into a principle reference frame.

$$\mathbf{\mu}\times\mathbf{B}=\mathbf{Q\Lambda Q}^{-1}\mathbf{\alpha}+\mathbf{\omega}\times\mathbf{Q\Lambda Q}^{-1}\mathbf{\omega}$$ $$\mathbf{RQ\Lambda}^{-1}\mathbf{Q}^{-1}(\mathbf{\mu}\times\mathbf{B})=\mathbf{R\alpha}+\mathbf{RQ}(\mathbf{\Lambda}^{-1}\mathbf{Q}^{-1}\mathbf{\omega}\times\mathbf{Q}^{-1}\mathbf{\omega})$$ $$\mathbf{R\mu'}\times\mathbf{RB'}=\mathbf{R\alpha}$$ $$\mathbf{\mu''}\times[0, 0, Bz]=\mathbf{\alpha'}$$

where $\mathbf{\mu}$ and $\mathbf{B}$ are rotated into the principle axes and the matrix math has shown there is no gyroscopic coupling between the axes of rotation in the principle frame because the $\mathbf{\omega}\times\mathbf{I\omega}$ term cancels. (We could have started at this step by choosing the principle reference frame to start, but many seem comforted by starting with the full EOM.) We've additionally rotated by $\mathbf{R}$, selected so that the Earth's magnetic field only acts in the z-axis.

The vector $\mathbf{\mu}$ is our torque rod control input, which we may point in any direction by combining the effect of three orthogonal rods. This means the double rotation of $\mathbf{\mu}$ to $\mathbf{\mu''}$ has to be accounted for by the control system, but has no bearing on controllability. We can now expand the cross product and show despite the ability to point $\mathbf{\mu}$ in an arbitrary direction, the resultant acceleration (in the frame where the z-axis is aligned to magnetic North) has the form $[kx, kz, 0]$, which shows we can only control the angular accelerations about the x- and y-axes, but never z.

From the initial equation $\mathbf{\mu}\times\mathbf{B}$ we know a toque cannot be generated in the direction of $\mathbf{B}$; thus, any initial angular momentum in that direction is uncontrollable, but spacecraft kinematics can be counterintuitive, so sometimes the math is helpful.

• "...so sometimes the math is helpful." That's a bit of an understatement. Indeed! Math is very frequently helpful in spaceflight. – uhoh Oct 9 '16 at 0:22

Basically, most magnetorquers function something like bar magnets that can be dialed to select how powerful, and what direction, they pull in. The math behind them turns out to be really simple. $\mathbf{\tau}=\mathbf{\mu}\times\mathbf{B}$, where $\tau$ is the torque on the satellite, $\mathbf{B}$ is the ambient magnetic field, and $\mu$ is the magnetic field of the satellite. Usually, there are 3 axis of magnetorquers, which means that $\mu$ can effectively be set to anything within a certain range, although the torque will be applied differently depending on exactly where the magnetorquer is placed. The full analysis will be easier to apply by measuring one magnetorquer at a time, but I'm going to assume that their torque lines up with the rotational vectors reasonably well, allowing for all of them to be handled.

Essentially, what happens when you turn on the magnetorquer is that there is a torque applied to move the spacecraft to line up with the magnetic field vector. Like a compass needle, the magnet will line up with the north pole of the magnet lining up to the south magnetic field. Without resistance, it will overshoot the pole, making it difficult to exactly line up on an axis.

Furthermore, one must consider that there are in effect only 2 axis of rotation. If you are lined up perfectly with the magnetic field, you cannot control your rotation about the field. There is always one axis that you cannot rotate about, although you might be able to mitigate it with some effort.
{"ft_lang_label":"__label__en","ft_lang_prob":0.84629774,"math_prob":0.99374324,"size":4374,"snap":"2020-34-2020-40","text_gpt3_token_len":1090,"char_repetition_ratio":0.17185354,"word_repetition_ratio":0.0,"special_character_ratio":0.23411065,"punctuation_ratio":0.07780612,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99913377,"pos_list":[0,1,2],"im_url_duplicate_count":[null,9,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-09-20T05:53:34Z\",\"WARC-Record-ID\":\"<urn:uuid:47a9a738-88ad-4656-aafb-b19e7ad50951>\",\"Content-Length\":\"166140\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:8b4e2eb3-49ff-4c13-bde1-4e08ab02e26d>\",\"WARC-Concurrent-To\":\"<urn:uuid:60c17cdf-e256-4449-9325-cc698892342e>\",\"WARC-IP-Address\":\"151.101.193.69\",\"WARC-Target-URI\":\"https://space.stackexchange.com/questions/2239/what-is-the-math-behind-magnetorquers\",\"WARC-Payload-Digest\":\"sha1:GF7PRHM5AP2NRFAJF6SWAF5F2J6KKG6Y\",\"WARC-Block-Digest\":\"sha1:36HAEAXG4Q3GWWFWSS4NW6JWPRKC4VHE\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-40/CC-MAIN-2020-40_segments_1600400193391.9_warc_CC-MAIN-20200920031425-20200920061425-00499.warc.gz\"}"}