Software Defined Radio (SDR)

  • Tutorial
“Such technologies can cost a myriad state.
Imagine controlling any device ... just sending commands using radio waves.
This is the future, Watson. ”

Sherlock Holmes -2009

It is difficult to imagine today's world without computers and various electronic devices. But after the invention of the transistor, only 56 years have passed. Despite the fact that people have owned electricity since the end of the 18th century, it is simply amazing how quickly computers, phones, the Internet and other benefits of civilization burst into our lives, so familiar to us, but about which - about 30 years ago, humanity could only dream of. Millions of people have received the most powerful tool for self-realization and self-expression in their hands - it's true - have you ever thought - how great is it that we can just take and realize our idea without any special material investments? The computer allowed smart and talented people to realize themselves, the Internet gave access to petabytes of information, allowed millions of people to communicate with each other, find like-minded people, learn,

A bit of theory (yeah - how can we talk about such a complicated thing without it)


Let's start with the fact that Maxwell wrote his famous equations and analyzing them - he predicted the existence of radio waves, which Hertz later confirmed. These equations tell us that an alternating magnetic field generates an electric one, and an alternating electric field generates a magnetic one, forming an electromagnetic wave, which it once emitted, turned off the transmitter, and the wave still lives and flies into space. An electric field can generate not only an alternating magnetic field, but also a charge, which follows from the Maxwell equation (Gauss law)

A charge generates a field, if we take 2 charges at a certain distance from each other and one of them starts to jerk with some frequency, then after a while - the second starts to twitch at the same frequency - here two charges behave identically to two floats in water - if we want to transfer information from one side of the lake to the other - we place a float on both sides and start tugging on one of them - a wave will begin to spread from it, which after a while will reach the other side and rest on that side on the other side the float will begin to oscillate. In the case of water, we can see the wave itself. An electric field - generally speaking it is not clear what it is - cannot be seen, cannot be touched, it is a kind of abstraction, with the help of which everything is conveniently explained, and since we can’t see and touch the abstraction - we can only judge its presence by the action of the field on the charges - by analogy with floats - we can only look at the float. If there is no wind on the lake - the float rests when there is no wave, but in reality this almost does not happen - the breeze blows - there is a slight ripple in the water, somewhere a fish or a frog splashed with water, someone else got alongside our float and starts to jerk it transmitting his information, or someone threw a stone into the water and waves come from all this, they are reflected from the coast and stones, add up, strengthen each other and weaken and we can judge all this composition of events only by looking at the float. Welcome to the radio broadcast. If there is no wind on the lake - the float rests when there is no wave, but in reality this almost does not happen - the breeze blows - there is a slight ripple along the water, somewhere a fish or a frog splashed with water, someone else got alongside our float and starts tugging at them transmitting his information, or someone threw a stone into the water and waves come from all this, they are reflected from the coast and stones, add up, strengthen each other and weaken and we can judge all this composition of events only by looking at the float. Welcome to the radio broadcast. If there is no wind on the lake - the float rests when there is no wave, but in reality this almost does not happen - the breeze blows - there is a slight ripple in the water, somewhere a fish or a frog splashed with water, someone else got alongside our float and starts to jerk it transmitting his information, or someone threw a stone into the water and waves come from all this, they are reflected from the coast and stones, add up, strengthen each other and weaken and we can judge all this composition of events only by looking at the float. Welcome to the radio broadcast. they are reflected from the coast and stones, add up, strengthen each other and weaken, and we can judge all this composition of events only by looking at the float. Welcome to the radio broadcast. they are reflected from the coast and stones, add up, strengthen each other and weaken, and we can judge all this composition of events only by looking at the float. Welcome to the radio broadcast.

"World" "Lenin" "USSR" or - how to send a message to extraterrestrial civilizations

So - in order to send a radio wave - we need to move the charge in space from one point to another with a certain frequency, and it is logical that if we pull a lot of charges at once - each one will generate a wave, they all add up and form one big mega wave . It is also logical that the larger the amplitude in space we will move the charge - the greater the amplitude of the wave. Our task is to make the charges periodically run from one point in space to another, and so far - within the framework of our primitive model (and I’m not going to load you with complex models) —it is desirable that they do this in a straight line.

Well - take a metal pin, cut it in the center and insert the alternator in the center - during the first half-cycle - there will be a plus on one pin, on the other 0. The electrons that are in any metal and just wait to be kicked are here they will run to the plus until they compensate for it and make it on this pin 0, but then the second half-cycle comes and the electrons start to run from one pin to another, passing through the voltage generator. The generator in the center of the stick is certainly good, but not very convenient (I want to solder the generator, and reluctantly climb the roof forever). Not a problem - we hook two wires to the sticks and take them to our apartment, while the wires are also antennas, because charges run in space along them, but the wires are very close and the charges run in different directions, waves, generated by each wire are in antiphase and kill each other, so that only the pin remains as the working part and everything looks as if the charges themselves run from one end of the antenna to the other. So - we figured out the transmission - for the reception we need to sit and wait until the wave arrives and starts pulling our electrons in the antenna, those running from one end to the other will run through the detector, the detector has some resistance, the current is converted to this resistance into voltage, and we can measure and amplify the voltage already (actually in real schemes it’s far from it, but I won’t load you with such things as wave resistance and line matching, in general it’s all quite complicated, so consider it now,

Level 2 - Modulation

It’s certainly fun and interesting to look at convulsing floats, but it quickly bothers and you want to talk to your beloved grandmother, but we know how to send an unreasonable wave into space - in order to transmit some kind of information using a wave - it needs to be modulated - for example, we can pull the float with a small amplitude - this will correspond to a logical 0, with a large amplitude - a logical 1. Or we can pull more often or less - the main thing is to agree - what our codes mean. Now a little simple (and not so) mathematics - there are 3 types of modulation:
Amplitude
Frequency
Phase
Pictures can be viewed in this article:
Modulationbut I will probably dwell on some points from mathematics, without which - in my opinion, understanding something at a normal level is problematic.
So - we want to transmit some kind of time-varying signal

that has a spectrum,

and generally speaking - it would be desirable to be able to move this spectrum, because if we all use the same frequency band - the spectra of different radio stations will overlap and the information will be distorted. There is a technological background (for example, 50 hertz from the mains), noise of the form 1 / f and so on - in the low-frequency region it is very inconvenient for us to transmit. In addition, different frequencies have different propagation features, which is described in the above article. Having some level of mathematical culture, you can see that if you multiply the initial function bycomplex exponent - the signal spectrum will shift by the frequency that stands in the exponent indicator the

signal spectrum after multiplication is obtained as follows:

But unfortunately the complex exponent is a mathematical abstraction, there are no real signals satisfying our needs, but there is a cosine to be satisfied with - we multiply the signal by cosine

we make the change of the formula of Euler


substitute, transform and get a little something

and finally

turns out that the original spectrum is divided into two - one Upolu right, second left along the frequency axis, and the one that gets in the negative frequency region is reflected with respect to 0, and in the end we get the following picture:

there is a slight discrepancy between the written formulas - the fact that I multiplied cosine just a signal, and is multiplied usually at 1 + mx (t) , where m - some factor - if it turns out that the two symmetrical spectra of the carrier frequency is added
Transmit A pure AM signal - irrational due to redundancy - it occupies a 2 times larger frequency band than the original spectrum - the place in the frequency band is expensive, therefore one of the side bands along with part of the carrier is suppressed by the filter - the

carrier itself does not carry no information - therefore it’s not scary if we reduce it, even save a little on the transmitter power.
Well - now we are able to transmit a useful signal in the frequency band we need. The main difference between the modulations from each other is noise immunity - amplitude modulation transmits the original spectrum as it is only in another frequency band, and in the frequency band where we move the original spectrum there are interference that sums up with the useful signal and spoils it. In addition - the signal amplitude will vary depending on the distance to the transmitter, if there are buildings - reflections will occur, we will receive the same signal with a delay and hear an echo. Frequency modulation occupies a large frequency band in the spectrum and due to this has high noise immunity - if on the fingers - we smear useful information over a wide frequency band and if interference occurs at some frequency that will ruin the signal, then it will spoil only a small part of it, because the signal is smeared over the spectrum. In fact, a lot can be said about modulations and other things, especially about the transmission of digital signals, but there is a lot of mathematics in there and so as not to frighten them much, I will not discuss the issue in more detail in this article.

The essence of SDR technology

Generally speaking, it’s very cool that mathematics made it possible for us to move the spectrum back and forth like this - without this opportunity, I hardly wrote this article at all now, there would be no cell phones, free Wi-Fi at McDonald's and other joys of life. Our grandfathers - to extract information, they did all kinds of analog circuits that did the mathematical transformation we needed, such as this:

but since we have such a thing as a computer - we don’t have to think - how would we plug a couple of transistors, so that the output signal depends on the input according to the dependence we need - we just take and program the formula we need. Only now we would have to receive a signal in digital form, so that there was something to work on - for this SDR is responsible. It digitizes an analogue radio signal (or vice versa, makes an analogue of digital if it is a question of transmission). As we recall, we transmit the signal in the high-frequency region, and for digitizing the signal we need to have an ADC, which according to Kotelnikov’s theoremmust have a sampling rate of at least two times the maximum signal frequency. Although modern ADCs already allow you to digitize a radio frequency signal directly - this is a little unreasonable - having the ability to move the frequency as we want to - put a super-expensive thresher at 2 GHz, which will digitize the signal directly. Recall - as we generally received the high-frequency spectrum - multiplied by the cosine and the spectrum went up and down by the frequency of this cosine. And what actually prevents us from doing the same thing again? We multiply the signal from the antenna by cosine - again the spectrum is divided into 2 - one creeps into the low frequency region, the other into the high region, we cut off the high-frequency spectrum with a filter, and the low-frequency - we digitize, even though the ADC of the sound card is now that we can digitize any frequency - The ADC speed affects only the width of the digitized band. Well, then - after digitization, we can already create our own receiver using programming - we do not even need knowledge of radio engineering, only mathematics, the care of radio engineers - for the signal to go to the computer. Actually in the following articles, if the topic is of interest - I’m going to talk about both the iron part of the SDR receiver and the software, you can also about modern methods of transmitting and encoding information. Well, in conclusion - this is how my amateur radio SDR - Softrock RX / TX Ensemble II works, which I received as a gift, using an PC sound card as an ADC, I did not record my work video, so I post it on YouTube - my receiver works the same way, the first photo in the article - it is The concern of radio engineers is for the signal to enter the computer. Actually in the following articles, if the topic is of interest - I’m going to talk about both the iron part of the SDR receiver and the software, you can also about modern methods of transmitting and encoding information. Well, in conclusion - this is how my amateur radio SDR - Softrock RX / TX Ensemble II works, which I received as a gift, using an PC sound card as an ADC, I did not record my work video, so I post it on YouTube - my receiver works the same way, the first photo in the article - it is The concern of radio engineers is for the signal to enter the computer. Actually in the following articles, if the topic is of interest - I’m going to talk about both the iron part of the SDR receiver and the software, you can also about modern methods of transmitting and encoding information. Well, in conclusion, this is how my amateur radio SDR, Softrock RX / TX Ensemble II, which I received as a gift, using an PC sound card as an ADC, I didn’t record my work video, so I post it on YouTube - my receiver works the same way, the first photo in the article - it is

Also popular now: