Dzhanibekov Effect

MiRaTa CubeSat flipping in torque-free rotation with its body axes visible.

The red, green, and blue arrows show the spacecraft body \(x\), \(y\), and \(z\) axes. The Dzhanibekov effect is the instability of torque-free rotation near the intermediate principal axis. Here, the off-diagonal inertia terms tilt that axis; a small perturbation grows through the Euler Equations:

\[\dot{\boldsymbol{\omega}}^{\mathcal{B}} = -(\mathbf{J}^{\mathcal{B}})^{-1} \left(\boldsymbol{\omega}^{\mathcal{B}} \times \mathbf{J}^{\mathcal{B}}\boldsymbol{\omega}^{\mathcal{B}}\right).\]

The initial rate is nearly along that intermediate axis, with a small \(z\) component.

dzhanibekov_effect.py
import numpy as np
import ADCS

inertia = np.array([
    [0.0333, 0.0060, 0.0],
    [0.0060, 0.0333, 0.0],
    [0.0,    0.0,    0.00667],
])
satellite = ADCS.Satellite(mass=4.0, J_0=inertia)
initial_state = ADCS.State(
    w=np.deg2rad([3.5, -3.5, 0.1]),
    q=np.array([1.0, 0.0, 0.0, 0.0]),
)
orbit = ADCS.Orbital_State(
    ephem=ADCS.Ephemeris(),
    J2000=0.22,
    R=np.array([7000.0, 0.0, 0.0]),
    V=np.array([0.0, 7.5, 0.0]),
)
results = ADCS.simulate(
    x=initial_state, satellite=satellite, os0=orbit,
    dt=1.0, tf=180.0,
)

Choose a visualization:

Attitude plot

import matplotlib.pyplot as plt

ADCS.plot(results, ADCS.plots.AttitudePlot(), layout=(1, 1))
plt.show()

Godot animation

from ADCS.helpers.animations import animate_orbit_godot
from ADCS.helpers.animations.godot.overlays import Triad

animate_orbit_godot(
    results=results,
    overlays=[Triad(frame="body", px=110)],
    graphics_quality="high",
)

Full and diagonal inertia

Run the same initial state with either matrix. The diagonal version removes the coupling between the body \(x\) and \(y\) axes.

Full inertia

inertia = np.array([
    [0.0333, 0.0060, 0.0],
    [0.0060, 0.0333, 0.0],
    [0.0,    0.0,    0.00667],
])
MiRaTa flips with the full inertia matrix

Diagonal only

inertia = np.diag([
    0.0333, 0.0333, 0.00667,
])
MiRaTa rotates without an intermediate-axis flip using diagonal inertia

Angular velocity

Plot all three body-frame angular velocity components for each run:

import matplotlib.pyplot as plt

ADCS.plot(results, ADCS.plots.AngularVelocityPlotCombined(), layout=(1, 1))
plt.show()

Full inertia

Body angular velocity components with full inertia showing a flip

Diagonal only

Body angular velocity components with diagonal inertia remaining nearly constant

Tips and tricks

Inspect the angular velocity at any saved step:

run = results.first()
omega_body = run.state_hist[0].w