A “bdot” (or $\mathbf{\dot{B}}$) attitude controller is used to detumble a spacecraft using just a magnetometer and torque rods. It does not require any other ratesensing instruments like gyros. The controller is usually implemented as a derivative controller acting on the sensed magnetic field $\mathbf{B}$. The control torque in the body frame is defined as:
where $\mathbf{\dot{B}}_i$ is the component of the derivative of $\mathbf{B}$ about the $i$ axis. $\mathbf{\dot{B}}$ is computed using a digital differentiator filter from discrete samples of $\mathbf{B}$.
Caveats

This method will obviously only work when the spacecraft is operating within a magnetic field (e.g. in nearEarth space)

The sampling cadence should be set up such that the use of the torque rods do not cause errors in magnetometer measurements. This can be ensured by sampling the data when the torque rods are not energized. That should also be sufficient delay after the rods are turned off in order to avoid residual effects from the rods’ magnetic fields.