Decoding Lunar Flashlight – Daniel Estévez
Lunar Flashlight is a 6U NASA cubesat whose mission is to detect the presence of water ice on completely shadowed areas of the lunar south pole. It was launched on December 11 2022 along with Hakuto-R M1 (to which I devoted my previous post). It travels utilizing a low-energy switch to lunar orbit, so it should arrive to the Moon in a number of months.
The day after the launch, AMSAT-DL made an IQ recording of the X-band beacon of Lunar Flashlight at 8457.27 MHz with the 20 metre antenna at Bochum observatory. The recording was carried out on 2022-12-12 17:08:54 UTC and lasts 3 minutes 2 seconds. On this put up I’ll analyse the recording.
Modulation and coding
The modulation utilized by Lunar Flashlight is PCM/PM/bi-phase-L. Because of this the telemetry is Manchester encoded and part modulated with a residual provider. The nominal baudrate might be 48 kbaud. To be extra exact, I’ve measured 48077 baud. Coding is r=1/6 CCSDS Turbo code with 8920 bit frames. That is the CCSDS coding that gives the perfect Eb/N0 efficiency.
The determine under reveals the GNU Radio flowgraph that I’ve used to decode this recording. The flowgraph makes use of the Turbo decoder block from gr-dslwp and a few blocks from gr-satellites.
In some unspecified time in the future within the recording, there’s a frequency soar of roughly 121 kHz. That is most likely attributable to the spacecraft locking or unlocking to an uplink provider from the groundstation. The recording is due to this fact processed in two segments, utilizing completely different File Supply blocks for every of the segments. Within the second section there may be really a second, a lot smaller, frequency soar. Because of this, the PLL bandwidth for the second section is ready to 100 Hz, in order that the soar might be tracked accurately. For the primary section, a PLL bandwidth of 25 Hz is used, which supplies much less jitter.
The determine under reveals the GUI of the decoder flowgraph. The highest left plot is the spectrum on the output of the PLL, displaying the actual and imaginary components individually. I don’t know why there’s a vital quantity of modulation energy on the actual half (moreover the residual provider). This solely occurs initially of the recording. Just a few seconds earlier than the frequency soar the facility in the actual half disappears. It briefly seems once more for a number of seconds a while after the frequency soar.
The highest proper plot reveals the constellation plot. We see that the SNR is nice and there are few bit errors. The underside plot reveals a time area plot of the stream of symbols and the correlations with the 192-bit ASM.
AOS frames
Lunar Flashligh transmits CCSDS AOS Space Data Link frames utilizing spacecraft ID 0x81
. This ID is assigned to the return link of Lunar-Flashlight in SANA registry. The ahead hyperlink has assigned a unique spacecraft ID, 0x36B
. We have now seen this tendency to make use of completely different spacecraft IDs for the ahead and return hyperlinks in a lot of the cubesats which have been launched to the Moon on the tip of 2022.
Solely digital channel 2 is in use. There is no such thing as a Operational Management Discipline or AOS Insert Zone, however there’s a Body Error Management Discipline (CRC-16), as really helpful for Turbo coded frames. The GNU Radio flowgraph checks this CRC-16. On this recording, just one body was misplaced, because of the frequency soar taking place mid-frame.
The determine under reveals a raster map of all of the AOS frames. No construction is instantly recognizable.
The frames include CCSDS Space Packets utilizing the M_PDU protocol. The Area Packets belong to a number of APIDs and have completely different sizes. Usually all of the packets from the identical APID have the identical measurement, however APIDs 1 and 98 which can be an exception to this. All of the packets have the secondary header flag asserted.
I’ve decided that the secondary header comprises a 48-bit timestamp that signifies the variety of (2^{-16}) second ticks elapsed because the J2000 epoch 2000-01-01 12:00:00. Curiously, the packets in every APID are despatched with timestamps that differ by as much as a few minutes, as if some APIDs have been buffered or delayed or used a unique time supply.
The plots under attempt to illustrate this. The APIDs are separated in three plots solely to make the plots much less busy. In every plot, skinny gray strains are proven within the background for all of the APIDs for simpler reference. Within the foreground, 4 colored strains for 4 APIDs are proven. The x-axis represents the Area Packet relative quantity, which corresponds to the order wherein the Area Packets have been obtained. Because the recording begins at 17:08:54 UTC, I’d say that the APIDs 0, 1, 2, 3, 8,11, and 13 are despatched near actual time, and the opposite APIDs are delayed by one or two minutes. APID 7 is specifically fascinating as a result of its delay adjustments in some unspecified time in the future.
APID 6 most likely comprises some type of real-time telemetry, judging by the truth that it’s despatched recurrently and by the appears of its raster map, proven right here.
The Jupyter notebook comprises raster maps of all of the APIDs.
APID 1 is specifically fascinating. It comprises Area Packets of 4 completely different lengths: 33, 94, 1021, and 2041 (these are the values of the Area Packet information size fields). The packets of various lengths are despatched in a daily sequence, as we will see within the raster map. Shorter frames have been padded with zeros on the finish, that are proven as a purple color. First there’s a size 33 packet and a size 94 packet. Then there are a bunch of size 2041 packets. Lastly there’s a size 1021 packet, and the sequence repeats once more.
Though it isn’t simple to see the construction of the info on this raster map, we will see a diagonal sample. It seems that within the packets of size 2041, the section from byte 28 of the payload to six bytes earlier than the tip of the packet comprises a concatenation of Area Packets of size 165 bytes. Since 165 doesn’t divide the dimensions of this section, the packets that grow to be fragmented on the finish of a packet proceed within the subsequent packet. Equally, the packets of size 1021 additionally include Area Packets beginning at byte 28.
All the Area Packets which can be encapsulated in APID 1 belong to APID 113. Trying on the timestamps of those encapsulated packets, we see that they correspond to pre-recorded telemetry which is being replayed. The timestamps are spaced roughly 10 seconds aside, and on this recording they cowl from 7:40:29 to 9:48:22. That is most likely a time interval throughout which the spacecraft wasn’t being tracked by any grounstation, so now {that a} groundstation is monitoring, all of the recorded information is downlinked on demand.
The following determine reveals the raster map of those packets. As we are going to see within the subsequent part, they include telemetry for the ADCS, and doubtless different subsystems.
It’s fascinating that the full size of the packets with information size discipline 2041 (as soon as we bear in mind the dimensions of the Area Packet Main Header) is 2048 bytes. This recommend that that is the utmost Area Packet measurement for this spacecraft, so when replayed telemetry packets are being despatched, they’re encapsulated in Area Packets which can be as giant as attainable. Every switch comes preceded by some type of announcement, that are the 2 shorter packets. Because the switch doesn’t replenish an integer variety of size 2041 packets, the final packet is shorter, which explains the size 1021 packets.
Though the one clue that we’ve got on this information is the truth that digital channel 2 is used, we all know that Lunar Flashlight makes use of the IRIS radio, as a result of it’s talked about in this paper. We have now been seeing within the final sequence of posts that a lot of the cubesats which have been launched to the Moon use this radio, which has numerous distinguishing options, together with utilizing digital channel 2 for the telemetry and 0xdc
as a filler byte for under idle information and idle packets.
ADCS telemetry
The APID 113 packets encapsulated in APID 1 include ADCS telemetry. The strategies we are going to comply with on this evaluation are similar to these I used for Hakuto-R M1. Bytes 90 to 106 in these packets interpreted as big-endian int32
include the angle quaternions. These are in scalar-last format, and use a scale issue of (2cdot 10^9). As we are going to see, they encode the rotation from the spacecraft physique body to ICRF (or an analogous system, resembling equatorial J2000). Because of the truth that APID 1 replays pre-recorded telemetry, we will see the evolution of the angle over the course of two hours.
The jumps that we will see within the quaternion information correspond to a change of signal within the (i, j, okay) elements with the objective of constructing the scalar part all the time optimistic. We have now additionally seen this behaviour in different spacecraft.
The following determine reveals the relative axis of rotation in spacecraft physique coordinates. This has been computed because the axis of rotation of (q(t)^{-1}q(t_0)), the place (q(t)) are the spacecraft physique to ICRF quaternions proven above, and (t_0) is the primary timestamp within the information. We see that the axis of rotation is fixed and near the spacecraft Z-axis.
Subsequent we plot the relative rotation angle. This has been unwrapped, since over the course of two hours the spacecraft completes 5 revolutions. The rotation angle adjustments nearly as a linear slope, which signifies that the rotation price is nearly fixed.
Bytes 72 to 84 include the gyroscope angular velocity as big-endian int32
. This agrees with the quaternion information, because the rotation occurs largely within the Z-axis and its angular velocity is roughly fixed, however oscillates in a sinusoidal vogue.
We are able to compute the norm of the gyroscope vector, which signifies the full angular velocity, and attempt to match it with the time spinoff of the rotation angle computed with the quaternions. This helps us test the consistency of the info and discover the dimensions issue for the gyroscopes. The plot under reveals good settlement, and makes use of a gyroscope scale issue of (-1.118cdot 10^{-9}). I haven’t been in a position to clarify this scale issue when it comes to a pleasant quantity and an applicable alternative of models (rad, deg, rpm, and many others.).
There are another telemetry fields that present sinusoids that are most likely associated to the ADCS. I haven’t been capable of finding the that means of those fields. Their plots are proven within the Jupyter pocket book.
We have now seen that the spacecraft is rotating slowly about its Z-axis, at a price of roughly 2.5 revolutions per hour. This appears to be a deliberate spin stabilization configuration. Under we will see a picture of Lunar Flashlight. We see that every one the photo voltaic panels level in a single path. Subsequently, it’s fairly doubtless that this path is alongside the Z-axis, and the spacecraft is slowly rotating across the Z-axis whereas preserving its photo voltaic panels pointed to the Solar.
I’ve taken from NASA HORIZONS the spacecraft’s place in heliocentric ICRF coordinates at 07:30 TDB and used that to compute the Solar vector from the standpoint of the spacecraft. Notice that we will assume the Solar vector to be nearly fixed in the course of the 2 hours of information we’ve got. The determine under reveals the ICRF coordinates of the Z-axis of Lunar Flashlight and of the Solar vector. We see that the Z-axis oscillates, because the spacecraft’s rotation axis shouldn’t be completely aligned with the Z-axis. Nevertheless, this oscillation is effectively centred on the Solar vector. This confirms our concept the the spacecraft Z-axis is orthogonal to the airplane the place the photo voltaic panels lie and that the Photo voltaic panels are being pointed on to the Solar.
In actual fact, the paper Systems Integration and Test of the Lunar Flashlight Spacecraft confirms our understanding of the spacecraft physique axes definition, because it contains the determine reproduced right here.
Our subsequent query is what occurs with the spacecraft antennas. The paper signifies that:
Lunar Flashlight has two pairs of planar patch antennas, one on the propulsion system (+Z) facet and one on the payload radiator (−Z) facet.
Systems Integration and Test of the Lunar Flashlight Spacecraft, web page 11
The above photograph confirmed the antennas on the +Z facet, that are in the course of the spacecraft physique, between the photo voltaic panels. The antennas on the -Z facet might be seen on this different photograph. Notice that right here the photo voltaic panels are folded over the spacecraft physique.
I’ve additionally taken from HORIZONS the spacecraft place in geocentric ICRF coordinates at 7:30 TDB to be able to compute the Earth vector as seen from the spacecraft. We additionally assume that this vector doesn’t change a lot throughout 2 hours. The angle between the Solar and Earth vectors is 23 levels. The spacecraft is pointing its photo voltaic panels, and therefore its antennas on the +Z facet, in the direction of the Solar. Because the Earth shouldn’t be too far off from the Solar from the standpoint of the spacecraft, it could actually use its +Z facet antennas to speak with Earth. The plot under reveals the angles between the Z-axis and the Solar and the Earth.
The antennas of Lunar Flashlight are low-gain circularly polarized patch antennas for X-band. This paper signifies that the antennas are “two pairs of INSPIRE-heritage low-gain antennas”. INSPIRE is simply one other identify for the IRIS radio. Within the paper X-Band electronics for the INSPIRE Cubesat deep space radio we will see extra particulars about these antennas. The following determine is taken from this paper and reveals the radiation sample for the obtain antenna (7.2 GHz). The radiation sample for the transmit antenna (8.4 GHz) can be comparable.
We are able to see that the acquire discount at 23 levels from boresight is round 1 dB, which isn’t a lot. This reveals why the spacecraft can afford to level its photo voltaic panels and antennas on to the Solar on this case. I ponder how the spacecraft angle can be configured for conditions wherein the Solar-spacecraft-Earth angle is way bigger. Most likely it is dependent upon whether or not the spacecraft is being tracked by a groundstation (prioritizing pointing the antennas to Earth) or not (prioritizing pointing the photo voltaic panels to the Solar).
Code and information
The GNU Radio flowgraph and Jupyter pocket book used on this put up might be present in this repository. It additionally comprises the AOS frames decoded from the IQ recording.