astronaut Want a kit for talking to a satellite? Click here! telescope
Click here to watch Nyan Sat live!

Imagine that you're a satellite operator and you are in charge of a weather satellite orbiting the Earth. In order to make the satellite useful, you would need a way to communicate with it. For instance, you might want to receive images from the satellite so the weather station can forecast the weather for next week. You might also want to send commands to the satellite to change its course, or simply to monitor the health of the satellite. All this requires a robust communication system that can facilitate reliable data transfer from Earth to a machine in space.

A major part of this communication system is a satellite modem (a.k.a. a sat modem), a device used to encode digital information on an analog wave. Recall that when you modulate, you convert digital bits into analog signals. When you demodulate, you perform the reverse operation – convert analog signals to digital bits. A modem allows your computer to focus on the higher-level information and form the packet, then delegate the work of transmission to the modem and let it handle the analog side of things.

Satellite Modem Internals

Internally, the satellite modem performs a series of digital transformation on the data before the digital data is converted to analog signals. Here's a high level overview of what happens to the packet once it gets into the modem pipeline:

In the transmission pipeline, the data gets loaded into a queue. Depending on the protocol, the modem may add extra overhead in an optional framing block. The packet would then be encoded with a specific forward error correction (FEC) encoding scheme set by the user and shaped with a series of digital filters. At the end, the data gets modulated with a specified modulation scheme (in the example, it's QPSK), and mixed with the desired intermediate frequency. The output of the pipeline would be RF signal at the intermediate frequency, and can subsequently be unconverted to a different satellite frequency band for transmission.

The exact reverse happens in the reception pipeline. In this case, the operator needs to know the framing protocol, the FEC decoding scheme, the modulation scheme and intermediate frequency used beforehand in order to construct a sensible receive pipeline. When the analog signal comes into the the Receive circuits, it would downconvert the signal from the intermediate frequency back to base band. Afterwards, the signal is demodulated, decoded and deformed. Since the satellite is moving relatively quickly, there is an extra doppler buffer to take that into account.

Setting Up our own satellite modem

At Red Balloon, we purchased and played around with a CDM600 modem. It is a very versatile modem that supports different kinds of framing, error correction and modulation schemes. However, setting the device up proved to be a pain. Originally we wanted to connect a hostPC to the CDM600 directly. There is a variety of data input ports on the device, but none of them are easy to connect to a modern PC with ethernet or UART. It either requires an extra license, or the data port is simply deprecated for a very long time. Therefore, we ended up using the G703 data port on the modem with a T1 card that connects to a Cisco router. A raspberry pi is used to communicate with the intermediate Cisco router in order to send packets to the modem. At the reception end, we have a USRP setup with GNURadio to demodulate the signal.

Building your own Demodulator

Now, knowing how a sat modem transform bits into analog signals, an interesting technical exercise would be to do it the other way round, i.e. to demodulate the signal that is coming from the modem. The modem is set to transmit data in differential BPSK schema at 2048 kbps at 70MHz. With that in mind a GNURadio flowgraph is built. First we use the USRP source block to receive the signal at 70MHz, which is subsequently filtered with a low pass filter at twice the symbol rate (2048 kbps). A Costas Loop is used for timing recovery of the signal and a rational resampled is used to sample the signal from 10MHz down to 2048 kbps, which is the corresponding symbol rate. Since the modulation scheme is known to us, a constellation decoder and differential decoder is used to recover the bits. The last few blocks are added to recover the exact data and to stream it nicely to the TCP port.