B Dot Algorithm
B Dot Algorithm
0.1.1 B-dot control law Figure 1: Filter for estimating the time derivative of the B-field.
Ḃˆ
S
ωc s
Hcont (s) = = (3)
mmt = −C Ḃ S
(1) B s + ωc
S
Where mmt is the magnetic dipole moment vector to be generated by the magnetic actuators Discrete time estimation
in the three axes of the spacecraft. C is a controller gain and Ḃ is the time derivative of the
In reality, the controller will be implemented on a computer and therefor needs to be discrete.
magnetic field vector. The controller gain is negative in order to actuate opposite the rotation
Using pole-zero matching and gain matching the transferfunction of the Ḃ-estimator can be
thus taking kinetic energy out of the system.
written in the z-domain as shown in equation (4).
The reason that Ḃ can be used directly without any cross product is that the changes in the B-
field that the controller seeks to minimize are caused by a rotation of the spacecraft and hence
the derivative of the B-field is perpendicular to the field vector. This means that the control law pcont = −ωc pdisc = e−ωc Ts
gives an output to the actutors which is a dipole moment perpendicular to the B-field. zcont = 0 zdisc = 1
Ḃ can be written as equation (2).
z−1
Hdisc (z) = K (4)
Ḃ ≈ B × ωsc
S S O
(2) z − e−ωc Ts
ωc
The gain is matched in center of the bandwith, that is at ω0 = 2 and the gain correction K is
computed as follows:
given the assumption that the direction and magnitude of the B-field with respect to the orbit
fixed coordinate system, OB, is constant. This assumption leads to the conclusion that the rate
of change of the B-field in the spacecraft refence frame is mainly due to the rotation of the Kcont kHcont (s)k
K= = − jω Ts (5)
spacecraft. Kdisc kHdisc(z)k s= jω0 ,z=e 0
bdot.tex,v 1.12 2004/05/16 17:34:48 kkla01 Exp bdot.tex,v 1.12 2004/05/16 17:34:48 kkla01 Exp
Group number please 0.1 Detumbling controller based on B-dot 3 4
0.1.3 Periodic measurement and actuation to the torque excerted by the magnetorquers. Hence, the change in energy is
The control law described in section 0.1.1 is stated without any constraints to the measured
Ėkin = Oωsc T scNmt (7)
B-field or the output to the magnetic actuators. However, using the actuators while trying to
measure the B-field with the magnetometer causes a disturbance to the measurements that in- Including the control law into equation (7) and using (2) a simple expression for the change in
troduces a feedback in the control loop which cannot easily be estimated. In order to dodge kinetic energy can be acheived:
this potential problem the actuators and the sensor are not used simultaniously but a periodic
time-sharing policy is adopted.
The period of the control/measurement cycle is Tcycle = Tsensor + Tactuator . During the period Ėkin = ωsc T (−C SḂ × SB)
O
Tsensor the sensor readings are fed to the discrete Ḃ-estimation filter which settles to an estimate = −C Oωsc T ( SḂ × SB)
of the rate of change of the B-field. During the rest of the time of the cycle period, Tactuator , = −C Oωsc T (S( SḂ) SB)
the output from the controller is held at a constant value yielding a constant magnetic dipole = C Oωsc T (S( SB) SḂ)
moment from the actuators. All readings from the magnetometer are discarded in the actuation
= C(S( SB) SḂ)T Oωsc
period and the input to the estimation filter is held at zero. Figure 2 illustrates the principle.
T
= C SḂ (S( SB)T Oωsc )
T
= −C SḂ (S( SB) Oωsc )
T
= −C SḂ ( SB × Oωsc )
T
= −C SḂ SḂ
= −Ck SḂk2 (8)
Figure 2: Periodic measurement and actuation. Equation (8)3 describes the change of rotational kinetic energy of the spacecraft when applying
the Ḃ control law. This equation is negative definite thus proving that energy is dissipated from
the system during detumbling. The control gain C determines the rate of energy dissipation and
can be selected according to the detumbling requirements and electrical power constraints etc.
0.1.4 Stability of the B-dot controller The result of the Lyapunov analysis also shows that energy dissipation in the detumbling phase
is proportional to k Ḃk2 which means that angular rates are reduced rapidly after initiating B-dot
In order to analyze stability of the detumbling controller the ideal1 continuous time Ḃ-controller control and slowly converging over time.
is first considered.
bdot.tex,v 1.12 2004/05/16 17:34:48 kkla01 Exp bdot.tex,v 1.12 2004/05/16 17:34:48 kkla01 Exp
Group number please 0.1 Detumbling controller based on B-dot 5 6
Figure 3 illustrates the problem. A simlutaion has been made with some pre-selected values of ωc and C which are based on
the suggested values from [acs-cubesat] in which a similar control problem is handled. Setting
ωc = 0.7 and C = −11000 the control law including the Ḃ yields the behavior illustrated in the
simulation results of figure 4 and 5. The satellite is detumbling from an initial angular velocity
of [0.20.20.2] rad
s .
Figure 4 shows the norm of the angular velocity of the satellite during the simulation. The an-
gluar velocity norm is monotonously decreasing as predicted by the Lyapunov analysis, which
seems resonable when observing the phase of the estimated Ḃ in figure 5.
Figure 3: The B-dot vector and the estimated B-dot vector used in the Lyapunov stability anal-
ysis. The absolute angle between thees vectors must be less than 90◦ in order for the
stability analysis to be valid.
S
Ḃˆ ωc s
= (10)
S 1
Ḃ s s + ωc
Sˆ
Ḃ ωc
= (11)
S
Ḃ s + ωc
Figure 4: Result of a simulation with the continuous time B-dot controller enabled after t=1000
seconds. The graph shows the norm of the angular velocity of the satellite while detum-
This transferfunction has a phase in the interval [0◦ ; −90◦ [ and a phase of −45◦
at the bandwidth
bling.
frequency. The interpretation of this is that when the rate of change of Ḃ is large the angle
between SḂ and SḂˆ increases and stability becomes marginal; i.e. the phase margin decreases. Figure 5 shows that the phase of the estimated derivative of the B-field is approximately in the
interval [0◦ ; 20◦ ] which gives a margin of 70◦ to the dangerous 90◦ that may cause instability.
Phase of estimated B-dot The phase of (11) is dependant on the rate of change of Ḃ, that is
the size of B̈. Equation (12) expresses B̈ with the assumption there are no spinning momentum Stability using periodic measurement and actuation
wheels in the spacecraft. Also, it is assumed that the geomagnetic field is constant in the inerital
coordinatesystem to start with in order to simplify the equations. As described in section 0.1.3 the derivative of the B-field cannot be estimated during the ac-
tuation period due to magnetic disturbances from the magnetorquers. This means that the Ḃˆ
estimate will be constant for the period of actuation. As torque is applied when actuating the
S
Ḃ = SB × Sωsc actual Ḃ will change thus creating a difference between Ḃ and Ḃˆ which is equivalent to a change
S
B̈ = SḂ × Sωsc + SB × Sω̇sc in the angle between these. This angle must be added to the phase of the Ḃˆ -estimation filter
S
ω̇sc = I −1 ( SNctrl − Sωsc × I Sωsc ) when considering stability.
S
B̈ = SḂ × Sωsc + SB × (I −1 ( SNctrl − Sωsc × I Sωsc )) (12) According to figure 5 the maximum additional angle allowed is approximately 70◦ . The figure
shows that the period of Ḃ is at least 20 s. Hence, the maximum time allowed for the controller
70◦ ◦
It is clear that the phase increases with the actuation torque which is propotional to the controller to use a constant estimate of Ḃ is 360 ◦ 20 s = 3.8 s which potentially (worst case) adds 70 to
gain C and the size of Ḃ and inverse propotional to the inertia of the satellite. Also, there will the anlge between Ḃ and Ḃˆ . There are no requirements to the time of measuring the B-field
be a contribution to the rate of Ḃ from the local variations in the B-field caused by the change between actuation regarding stability of the system. However, the measurement time should be
of position of the spacecraft (i.e. its position in orbit). Measurement noise and pure time delay long enough for the filter to settle to an acceptable estimate of Ḃ, otherwise the error introduced
from the magnetometer may add even more phase to the estimated Ḃ. here will also contribute to the phase of Ḃˆ .
bdot.tex,v 1.12 2004/05/16 17:34:48 kkla01 Exp bdot.tex,v 1.12 2004/05/16 17:34:48 kkla01 Exp
Group number please 0.1 Detumbling controller based on B-dot 7 8
0.1.5 Implementation
The controller is implemented in simulink to test it together with the AAUSAT-II simulation
library.
0.1.6 Test
Coming soon.
Figure 5: Result of a simulation with the continuous time B-dot controller enabled after t=1000
seconds. First graph is the real derivaties of the B-field. Second graph is the estimated
derivative. Third graph is the angle between B-dot and the estimated B-dot. Last graph is
the dotproduct of the two first. The peaks in the graphs are caused by bugs in the Rømer
IGRF simulation software.
bdot.tex,v 1.12 2004/05/16 17:34:48 kkla01 Exp bdot.tex,v 1.12 2004/05/16 17:34:48 kkla01 Exp