Originally published on Ribbrish
More than once, have I been in conversations that follow a similar template.
Inquisitive person without a background in science (let us use “Them” to qualify that person the sake of gender neutrality.): So what is your PhD on?
Them: What area in electronics?
Me: Wireless communication.
Them: What topic in wireless communication do you work on?
Me: Spectrum sensing for cognitive radio.
Them(Sounding or atleast pretending to sound interested ): What exactly is this spectrum sensing for cognitive radios?
Me: <throws around some technical gibberish>
Them: Oh so it repairs televisions automatically (yes this is an actual response)
Me (defeated and vowing never to attempt to give a nontechnical explanation of spectrum sensing again): Yes.
But despite these conversations the know-it-all inside me refuses to keep quiet, and here I am trying to write a semitechnical blog post on Spectrum sensing hoping to get the message through at least once.
The communication spectrum, as anyone remotely aware of the 2G (zero loss) scam can tell, is an extremely rare but precious resource, required for any form of wireless communication, and due to the large number of wireless users and larger number of applications is extremely scarce. But at the same time grossly underutilized. In fact, studies have shown that it is less than 40% used. Therefore, in order to counter the spectrum crunch, as well as underutilization, it has been proposed to use the spectrum opportunistically. That is, instead of buying the licence, (and paying bribes for) anyone wishing to use a spectrum band can simply look at the spectrum band to see whether someone else is already using it or not. If not, then the band is free to use and can be used by the said user. Imagine something like waking up in a hostel with an exceptionally full stomach and rushing to the bathroom to occupy a vacant stall. In case all the stalls are occupied, then one can obviously wait one of them to get free while mouthing obscenities at the top of one’s voice but yes this is the basic idea behind spectrum sensing more or less. You see which stall is empty and occupy it to do your business. There is just a simple twist, the system to tell the occupancy is buggy. That is, we can never exactly be sure that someone is inside, also there are no latches, so we can barge in to disturb someone’s privacy. The only method to test the occupancy of the stall is then to sense the amount of stink rising from a particular stall, assuming that the stink reduces considerably after flushing, we can say that a highly stinking stall may definitely be occupied whereas a stink free stall may definitely be free. Again, this gives us a binary mechanism to test the presence of a user in the band of interest. However, like the spectrum energy, stink is also subjective. That is, its intensity varies from person to person, and may still linger around even after flushing. Moreover, stink from neighbouring stalls may also “cloud” one’s judgement. So there you are filled up to the brim, standing in front of a few partially stinking stalls deciding whether to go in or not.
The choice that one now faces is a tough one, whether to barge into the stall and find someone already sitting there and in addition to increasing one’s knowledge of profanities also add a desire to puke to the already strong summons by nature. Or, to wait there risking soiling one’s only clean pair of pyjamas. This is a hard choice to make, as both the decisions involve certain costs. We decide on whether to go inside a stall or not based on the level of stinkiness, our own urgency and our prior experiences, however as long as there is ambiguity in the level of stink, we can never be sure of the occupancy and may decide that if the observed levels of stink are above a certain level then we don’t go inside, else we go inside like a king to claim our throne. So now Since I would have have grossed most of you out, we can come back to spectrum sensing.
The major goal of spectrum sensing is to detect the presence of a user in a band in the presence of noise(stink). This noise can be due to a variety of reasons which go beyond the scope of this little blog. However, this noise clouds the judgement of a spectrum sensor and we can only declare a user to be present in the band of interest if a measure of stikiness (it can be energy or the cyclostationarity, but don’t ask me what is cyclostationarity) of the band is exceeded. Now, since this measurement is noisy, our decision can be erroneous, that is we can interfere with the transmission of a user not detected, or we can miss out on a chance to transmit our data sensing false occupancy of the band. Noisier our measurements, more is a chance of missed detection (interfering with a current user) or false alarm (staying idle and soiling our pants while a slot was available.) However, there is no technique that can make a correct detection certain while forcing false alarm to zero. If we are cautious about interfering with others, we will lose some good opportunities to transmit, and if we are aggressive about acquiring spectrum bands, we may end up disturbing others. However, an extreme of both of these ideologies will be bad. Following either extreme, we may end up using every opportunity but at the same time causing serious trouble to other users, or we may not trouble anyone but not get any work done either. It is therefore required to select the threshold of “stinkiness” so as to maximize the opportunities while minimizing the interference. The priorities between selfishness and altruism, that is giving weights to either of these policies may be subject to the system design, and are unique to each system. Depending on the application, some systems may proactively decide to acquire bands and some others may decide to wait until they are certain.
All of the approaches for spectrum sensing are correct, and there is no one telling a system what to do except its own requirements. Both missed detection and false alarm are costs which have to be borne by the system, and the best a system designer can do is to minimize a weighted sum of these costs, i.e. find a combination of these costs that hurts the least. Such a combination will again be unique to each system while some systems, like quoted by the Don Corleone in Mario Puzo’s Godfather “Let a hundred criminals walk free instead of imprisoning an innocent man”, the others may simply want to lock up a few innocents while protecting the majority of the innocents from a hundred criminals. There can be strong arguments in both the directions. One side shows us the kids caught in crossfire while the other shows us kids killed in mass shootings. One side wants to disarm the security forces to stop them from hurting civilians the other wants better weapons to counter ones attacking them. Both the sides right in their own regard and yet none completely. Both thinking that their threshold minimizes their version of the cost while totally forgetting about the fact that someone else might have different weights attached to the probabilities of detection and false alarm. That is, different people have different scales for different costs, with no cost function being universally good or universally bad. The only bad system design in this case can be a one cost function fits all design, regardless of system requirements, and sadly that is what we humans are upto, everywhere. Thinking our optimizations of the cost functions are the only optimizations that exist in this world and therefore are the only rational ones.
As an afterthought, I had seen an advertisement long ago, Superman and Batman standing back to back with the captions, “He protects the innocent, He punishes the guilty” written underneath them, and it is now that I realise that the world needs both. Equally, yet in different measures depending on the situation.
Special thanks to Venu who initiated this, and to Aditi who was the first one to read this.