Audio. Digital and analog audio

Probably, everyone who has ever listened to an SDR receiver or transceiver could not remain indifferent to its reception, and especially to the convenience, which is manifested in the fact that stations on the band can not only be heard, but also seen. Range overview on the transceiver's SDR panorama allows you to quickly and visually find stations in the reception band, which greatly speeds up the search for correspondents during contests, and even during everyday work on the air. With the help of the “waterfall”, the history of signals on the range is visually tracked and you can easily switch to an interesting correspondent. In addition, the panorama itself shows us the frequency response of the received stations, their bandwidth and radiation width, which allows you to quickly find a free section on the range to call other radio amateurs.
This is only if we talk about the visual part of SDR, but also do not forget about signal processing, both for receiving and transmitting. Full control over the width and everything in the receive band. With the correct selection of the necessary parameters in the settings menu items, the transmission signal also sounds great.
But there is one circumstance to make SDR work, you need additional devices: a computer itself with a high-quality sound card, on which the main signal processing takes place, and a good monitor with a high screen resolution. Naturally, you need the appropriate software for it and for the SDR transceiver, which is not cheap. All this already entails certain specific requirements for computer knowledge from a radio amateur. Which is not always, and not for everyone, unfortunately present.
There is another drawback. If this is not noticeable for reception, then for transmission, due to the specific processing of the audio signal in the computer, there is a significant signal delay of more than 150 ms, which completely excludes the normal operation of self-control in all types of radiation. Saves only an additional control receiver or a friend who also has an SDR transceiver that will record the received signal.
Now, with the advent of a generation of affordable microprocessors from STM, it has become possible to develop devices that can partially replace some of the basic functions of large computers. Namely, DSP sound processing and transceiver control, as well as graphical display of information on the transceiver display.
As a result, the main components of such a transceiver, allow you to refuse an external computer . But at the same time, as on an external computer, a convenient service for managing the transceiver is stored, various modes of recording signals, both for receiving and transmitting, with subsequent playback of the recordings through headphones or on the air during transmission, saving the necessary information on an external SD- map, which is displayed on its own large display with a wide swath, as well as DSP processing and signal conditioning with all major types of radiation. Such transceivers provide high-quality signal reception, high slope filters with smooth adjustable boundaries, and an automatic Notch filter. They use multi-band graphic equalizers, compressors, reverbs for transmission, and most importantly, the minimum delay time is obtained. With an external synthesizer, the transceiver controllers easily work with analog SDRs. These modern transceivers widely use HiQSDR and HiQSDR-mini 2.0 radio paths, which are controlled by a separate SPI bus, or via a DSP board over the main SPI bus with a minimum of connecting wires.
A few years ago, the production of SDR transceivers began, operating on the principle of direct conversion of a radio frequency signal to an audio IF, in which a simplified (compared to the classical scheme) radio channel board and a specialized computer are located in one housing. The main focus here is on the software. The main cost of the finished product is also determined by the cost of the software. The Flex and Sun SDR hardware are built on exactly this principle.
At present, the principle of signal processing based on DSP methods has moved to the next stage of its evolution. A new method of direct digitization of a signal from an antenna with subsequent direct signal generation from a digit has appeared, which makes it possible to get rid of almost all types of problems inherent in both classic and SDR technologies with signal processing hardware.
Radio receivers and transceivers with direct signal digitization have the abbreviation DDC (for Digital Down-Converter). The reverse conversion from digital to analog is abbreviated as DUC (from Digital Up-Converter). We are talking about digital signal conversion by software. It should be noted right away that the abbreviation SDR (Software Define Radio) - software-defined radio - is only a general definition of a class of signal processing technologies, which includes DDC - architecture, as one of the methods.

Already today, with the advent of a generation of affordable microprocessors, it is possible to develop devices that can partially replace some of the basic functions of large computers. Namely, DSP sound processing and transceiver control, as well as graphical display of information on the transceiver display. The DDC architecture instantly digitizes the entire spectrum of signals from 0 Hz to frequencies that the ADC chip is capable of processing. The most modern ADC microcircuits today can operate in a band up to 1 GHz, but their cost is still very high today. At the same time, the most popular and relatively cheap ADC microcircuits digitize the spectrum with a band from 0 Hz to 60 ... 100 MHz, which is quite suitable for amateur radio tasks. After digitizing the spectrum of signals in the band 0 Hz - 30 ... 60 MHz, a very large digital data stream is obtained at the output of the ADC microcircuit, which is further processed by high-speed FPGA microcircuits. They programmatically implement the DDC/DUC algorithm, i.e. digital buck or boost converter.
The digital downconverter samples the required bandwidth spectrum and transfers it to a computer for processing - i.e. a digital stream is created with a significantly lower bandwidth and speed. In the computer, the program processing of the stream using DSP methods and the final demodulation of the signal take place.
In practice, it is very rarely necessary to work with the entire spectrum of signals in the 0 Hz - 30 ... 60 MHz band. The maximum bandwidth we need for processing is 10...50 kHz for demodulation of AM, FM signals and 3...5 kHz for SSB signals.
This most advanced signal processing method was implemented in TULIP-DSP amateur radio transceivers and the domestic analogue - Tulip-DDC / DUC.

A similar principle of signal formation is also used in the transceivers of a well-known company, which began producing new models back in 2015. A fragment of the block diagram of such a transceiver is presented below.

If earlier, a few years ago, even in such advanced transceivers like ICOM IC-756Pro3 and IC-7600, the method of sequential spectrum sweep was used and the process of updating the picture was noticeable - i.e. fast scanning, now the observation and signal processing takes place in a complex, in parallel, since the frequency tuning occurs instantly by the software method. Due to the fact that a large frequency section of 30 ... 60 MHz is immediately digitized, without losing tuning to the current radio station, it becomes possible to see what is happening in the neighboring section of the spectrum. Moreover, by calling the second virtual receiver, you can simultaneously hear what they are talking about on one and the second band. But two receivers is not the limit. It is possible to call three, five, ten ... as many receivers as you like. By mixing their sound in a certain way, you are aware of what is happening on the bands. A "cloud" graphics will allow you to quickly select the desired station.
The same applies to the spectrum display. In practice, it is rare when the entire 30 ... 60 MHz section is needed at once. If necessary, it is relatively easy to select the second, third, fourth, and in general, how many small streams are needed from the general digital stream and transfer them to a computer, thereby creating several reception channels at the same time. This method implements two, three, or as many "virtual receivers" as needed in the entire digitization band. For example, we create a separate panorama for the 40m band, a separate panorama for the 20m band and the rest of the bands ..., place them on a separate monitor, and now we have the opportunity to observe in real time the conditions of passage in the sections we have chosen.

On the one hand, the presence of mirror stripes is a disadvantage. Since the concept of DD refers to the entire spectrum of digitization, it is possible to significantly unload the input of the ADC by paying attention to the input circuits of the receiver, which are best made high-quality and tunable. As an alternative, use in the input circuits of a low-pass filter with a cutoff frequency of half the clock frequency or bandpass filters. They can additionally attenuate strong out-of-band signals far enough from the operating band. In this case, the possibility of reviewing the entire range of digitization is lost. Such preselection methods are justified if you plan to use a DDC receiver in conjunction with large antennas or in areas with difficult interference conditions.
On the other hand, this shortcoming provides a technological opportunity to implement by simple means not only reception on the HF band, but also on the VHF and even on the UHF bands. It is only necessary to make replaceable bandpass filters with LNA, bands equal to half the clock frequency.
For example, some DDC receivers have a switchable filter for the MW-LW range, and one of the WiNRADiO DDC receivers and the Perseus DDC receiver have flexibly configurable narrow-band filters.
Some 20 years ago, we could not even dream of anything like this, when the panoramic attachment to the transceiver was 2 times larger than the transceiver itself and cost 5-10 times more expensive. Not to mention the quality of service. The SDR technology that appeared in the early 2000s made it possible to look at the air and hear it in a completely different way. We saw a real live broadcast! Not a static "frozen" picture after a slow scan, namely, live broadcast in real time.
If, in order to see a truncated panorama of other bands in the first SDR transceivers with hardware signal conversion, it is necessary to have a separate receiving path for each band, then in the receiving path, made using modern DDC technology, both any of the range sections and the entire range are available. , and at the same time in parallel with individual sections of its sections. The implementation of all these possibilities is possible only thanks to the methods of DSP and direct signal digitization.
In the field of amateur radio, one of the most requested features at present and in the near future is spatial signal selection and phase noise cancellation techniques. Today, there is a phase method for signal selection and noise suppression, implemented in hardware. In addition, using mathematical algorithms, any functions for subtracting interfering and adding useful signals, formed by a pair, four or a large number of ADCs, are easily implemented.
With the use of these modern developments, it became possible to remotely control the transceiver and work remotely on the air. Modern methods of information transmission are capable of transmitting sufficiently large data streams and with virtually no loss. The overall flow of information from / to the transceiver is quite small. Using the IP stack, it becomes possible to use the transceiver as a network segment even without using a computer. By installing the transceiver outside a big city in a fairly quiet area, you can have access to the radio without leaving your apartment. By organizing guest access to the transceiver, you provide an opportunity for friends to work on the air. Another useful feature used by special services is the ability to record the entire radio broadcast, or specified pieces of the radio broadcast, on a computer hard drive with delayed processing. This feature allows you to quickly perform statistical signal processing, search for and monitor target signals, and perform many operations that the average user is not supposed to know about.

You can choose the radios you are interested in

65 nanometers is the next goal of the Zelenograd Angstrem-T plant, which will cost 300-350 million euros. The enterprise has already submitted an application for a soft loan for the modernization of production technologies to Vnesheconombank (VEB), Vedomosti reported this week, citing Leonid Reiman, chairman of the board of directors of the plant. Now Angstrem-T is preparing to launch a line for the production of chips with a 90nm topology. Payments on the previous VEB loan, for which it was purchased, will begin in mid-2017.

Beijing collapsed Wall Street

Key US indices marked the first days of the New Year with a record fall, billionaire George Soros has already warned that the world is waiting for a repeat of the 2008 crisis.

The first Russian consumer processor Baikal-T1 at a price of $60 is launched into mass production

The Baikal Electronics company at the beginning of 2016 promises to launch the Russian Baikal-T1 processor worth about $60 into industrial production. Devices will be in demand if this demand is created by the state, market participants say.

MTS and Ericsson will jointly develop and implement 5G in Russia

PJSC "Mobile TeleSystems" and Ericsson signed agreements on cooperation in the development and implementation of 5G technology in Russia. In pilot projects, including during the 2018 World Cup, MTS intends to test the developments of the Swedish vendor. At the beginning of next year, the operator will start a dialogue with the Ministry of Telecom and Mass Communications on the formation of technical requirements for the fifth generation of mobile communications.

Sergey Chemezov: Rostec is already one of the ten largest engineering corporations in the world

In an interview with RBC, the head of Rostec, Sergey Chemezov, answered burning questions: about the Platon system, the problems and prospects of AVTOVAZ, the interests of the State Corporation in the pharmaceutical business, spoke about international cooperation in the face of sanctions pressure, import substitution, reorganization, development strategies and new opportunities in difficult times.

Rostec is "protected" and encroaches on the laurels of Samsung and General Electric

The Supervisory Board of Rostec approved the "Development Strategy until 2025". The main tasks are to increase the share of high-tech civilian products and catch up with General Electric and Samsung in key financial indicators.

Converting an analog signal to digital form is a complex of three operations: sampling, quantization and encoding.

Discretization is the replacement of a continuous analog TV signal S(t) by a sequence of samples (samples) of this signal (Fig. 2). These samples are taken at times separated from each other by an interval T, which is called the sampling interval. The reciprocal of the sampling interval is called the sampling rate. The most common is uniform discretization with a constant period, based on the Kotelnikov theorem. According to this theorem, any continuous signal S(t) having a limited frequency spectrum (0...f gp) can be represented without loss of information by the values ​​of this signal S di . taken at discrete times t n =nT (n=1,2,3,... -- integers) provided that T?0.5/t rp (T -- period, or sampling interval). The minimum allowable sampling rate according to Kotelnik t d.min \u003d 2f gp.

It is clear that the smaller the sampling interval (the higher the sampling frequency), the smaller the differences between the original signal and its sampled copy. The step structure of the sampled signal can be smoothed with a low pass filter. Thus, the restoration of the analog signal from the sampled one is carried out.

Sampling when converting an analog signal to digital form is followed by a quantization process, which consists in replacing the instantaneous reading values ​​S di obtained after discretization with the nearest values ​​from a set of individual fixed levels (Fig. 3). Quantization is also a sampling of the signal S q , but not in time, but in level. The fixed levels to which samples are "attached" are called quantization levels. The dynamic range of signal change S(t), divided by quantization levels into separate ranges of values ​​(quantization steps), forms a quantization scale.

The latter can be both linear and non-linear, depending on the transformation conditions. The rounding of the reading to the nearest level (upper or lower) is determined by the position of the quantization threshold within the quantization step.

The sampled and quantized signal S dq is already digital. Indeed, if the amplitude of the pulses of the sampled signal S d can take any arbitrary values ​​within the initial dynamic range of the signal S(t), then the quantization operation has led to the replacement of the possible values ​​of the signal amplitude by a limited number of values ​​equal to the number of quantization levels. Thus, the quantized sample of the signal is expressed by some number determined by the number of quantization levels.

To transmit such a signal over communication channels, it is best to convert it to a binary form, i.e. write down each value of the signal level in binary notation. In this case, the number (level value) is converted into a code combination of characters "0" or "1" (Fig. 4). This is the third, final oneration for converting the analog signal S(t) into digital S dq , called coding .

All these three operations are performed by one technical device - an analog-to-digital converter (ADC). The reverse conversion of a digital signal to analog is done in a device called a digital-to-analog converter (DAC). Analog-to-digital and digital-to-analog converters are indispensable blocks of any digital systems for transmitting, storing and processing information.

When directly encoding a television signal, code combinations are created with a frequency equal to the sampling frequency (sampling frequency f d). Each code combination corresponds to a certain sample and contains a certain number m of binary symbols (bits). The codewords may be transmitted in parallel or serial form. For transmission in parallel form, it is necessary to use k communication lines (in Fig. 4 k = 4).


Codeword symbols are simultaneously transmitted over the lines within the sampling interval. For transmission in serial form, the sampling interval must be divided into sub-intervals-cycles. In this case, the word symbols are transmitted sequentially over one line, and one clock cycle is allocated for the transmission of one word symbol.

When transmitting digital information over communication channels, the transmission rate is the number of transmitted binary symbols per unit of time. The unit of speed is 1 bit/s. Will the digital bit rate be the product of the sample rate? q and the number of binary symbols in one discrete sample m:

If the upper limit frequency of the TV signal is 6 MHz, then the minimum sampling frequency, according to the Kotelnikov theorem, is 12 MHz. As a rule, in digital television systems, the frequency f d is chosen slightly higher than the minimum allowable. This is due to the need to unify the digital TV signal for various television standards. In particular, a sampling rate of 13.5 MHz is recommended for studio digital equipment.

The number of signal quantization levels should be chosen not less than the maximum number of brightness gradations, distinguishable by the eye, which, depending on the observation conditions, ranges from 100...200. Hence m=6.6...7.6.

Obviously, the number of characters in a code combination can only be an integer, which means that the bit length of the code combination is m=7 (or 8). In the first case, the code combination can carry information about 128 possible signal levels (gradations of brightness), in the second case - 256. If we take m = 8, then the digital information transmission rate

V n \u003d 13.5 8 \u003d 108 (Mbps).

If we take into account that, in addition to the luminance signal, color information must be transmitted, then the total bit rate will double and will be equal to 216 Mbps. Such a high speed should have both TV signal conversion devices and communication channels.

It is not economically feasible to transmit such a large digital stream over communication channels, so the next task is to "compress" the digital TV signal. There are reserves for reducing the digital stream without compromising the quality of the reproduced image. These reserves are contained in the specifics of the TV signal, which has significant information redundancy. This redundancy is usually divided, despite some conventionality of such a division, into statistical and physiological.

Statistical redundancy is determined by the properties of the image, which is not in the general case a chaotic distribution of brightness, but is described by laws that establish certain relationships (correlation) between the brightness of individual elements. The correlation between neighboring (in space and time) image elements is especially high. Knowledge of correlations allows not transmitting the same information repeatedly and reducing the digital flow.

The second type is physiological redundancy - due to the limitations of the human visual apparatus. Accounting for physiological redundancy allows us not to transmit in the signal that information that will not be perceived by our vision.

Similarly, the imperfection of the human hearing aid allows you to "get rid" of redundant audio information in the signal.

Analog signals are the primary source of information from the environment. Digitizing a signal is always accompanied by a loss of quality. This is a disadvantage of digital technologies.

Digitization of a signal has three stages: sampling, quantization, coding. Their interaction is shown in the figure.

Sampling

Coding

Quantization

Discretization is the division of arguments into equal sections. Every dependency has an argument and a function. The argument is given, and the function changes in a certain way depending on the argument. There may be one argument, or there may be several. So, if this is some kind of sound signal, then time is the argument (we draw). When digitizing an image, we have two arguments: width and height (we draw). In both cases, the arguments are split into equal parts.

Quantization - splitting the domain of existence of a function also into equal sections, the number of which is 2 8 N , where 8Nis the quantization bit length. That is, the number of sections is equal to the number of possible combinations of binary digits in one, two, three, etc. bytes.

In practice, bit sizes 1, 2, 3, 4 are used, then the area of ​​existence of the function is divided into 2 8 = 256, 2 16 = 65 536, 2 24 = 16 777 216, 2 32 = 4 294 967 296 sections. Functions can also be one or more. For example, in a black and white image, there is only one function - 256 shades of gray. And in the RGB model there are three functions: 256 gradations of red, green and blue.

Encoding is the splitting of a signal in accordance with the accepted sampling and quantization rules. Within each elementary section of the argument, the function remains constant and this section is assigned a binary code on the scale of functions, consisting of 8, 16, 24, etc. binary digits.

The result is a stepped curve, which approaches the real signal with increasing bit depth. Steps can be smaller, but never turn into a smooth line. (see file "DigitizationA1").

This disadvantage, of course, is insurmountable, but in digital technologies it is possible to increase the accuracy of digitization to the level of sensitivity of measuring an analog signal. And then the impact of digitization will be minimized.

2.3. Text data encoding

2.3.1. Text encoding systems There are two encoding systems: ascii-based and Unicode.

In the coding system ASCII(American Standard Code for Information Interchange) Each character is represented by one byte, which allows 256 characters to be encoded.

There are two encoding tables in ASCII - basic and extended. The base table fixes the values ​​​​of codes from 0 to 127, and the extended table refers to characters with numbers from 128 to 255. This is enough to express all the characters of English and Russian, both lowercase and uppercase, as well as punctuation marks, with various combinations of eight bits, symbols for basic arithmetic operations and generally accepted special characters that can be observed on the keyboard.

The first 32 codes of the base table, starting from zero, were given to hardware manufacturers (primarily manufacturers of computers and printing devices). This area contains so-called control codes, which do not correspond to any language characters, and, accordingly, these codes are not displayed either on the screen or on printing devices, but they can be controlled by how other data is output. Starting from code 32 to code 127, there are symbols of the English alphabet, punctuation marks, numbers, arithmetic operations and auxiliary symbols, all of which can be seen on the Latin part of the computer keyboard.

The second, extended part is given to national coding systems. There are many non-Latin alphabets in the world (Arabic, Hebrew, Greek, etc.), including the Cyrillic alphabet. In addition, German, French, Spanish keyboard layouts are different from English.

The English part of the keyboard used to have many standards, but now they have all been replaced by a single ASCII code. For the Russian keyboard, there were also many standards: GOST, GOST-alternative, ISO (International Standard Organization - International Institute for Standardization), but these three standards have actually already died out, although they can be found somewhere, in some antediluvian computers or networks. 12

The main character encoding of the Russian language, which is used in computers with the Windows operating system is called Windows-1251, it was developed for Cyrillic alphabets by Microsoft. Naturally, the vast majority of Russian-language texts are encoded in Windows-1251. By the way, encodings with a different four-digit number were developed by Microsoft for other common alphabets: Windows-1250 for extended Latin (various national Latin letters), Windows-1252 for Hebrew, Windows-1253 for Arabic, etc.

Another, less common encoding is called KOI-8(information exchange code, eight digits). Its origin dates back to the 60s of the XX century. Then there were no personal computers, the Internet, Microsoft and much more. But in the USSR there were already quite a few computers, and for them it was necessary to develop a Cyrillic encoding standard.

Today, the KOI-8 encoding is widespread in computer networks in the territory of the former USSR and in the Russian-speaking sector of the Internet. It happens that some text of the letter or something else is not readable, which means that you need to switch from KOI-8 or another encoding to Windows-1251.

In the 90s, the largest software manufacturers: Microsoft, Borland, the same Adobe decided to develop a different text encoding system, in which each character would be assigned not 1, but 2 bytes. She got the name Unicode.

With 2 bytes, 65,536 characters can be encoded. This array turned out to be enough to place in one table all the national alphabets that exist on Earth. In addition, many different service symbols are included in Unicode: barcodes, Morse code, flag alphabet, Braille alphabet (for the blind), currency signs, geometric shapes, and much more.

In total, Unicode has more than 90 pages, each containing a national or official alphabet. And about 5 thousand more characters are occupied by the so-called "general purpose area", unfilled, left as a reserve.

The largest page (about 70% of all Unicode) is occupied by Chinese characters, which in China are typed using keyboard sets. In India alone there are 11 different alphabets, there are many exotic names in Unicode, for example: the Canadian Aboriginal script. In general, consideration of national scripts is quite entertaining from the point of view of geography and history.

The benefits of Unicode are clear. The system standardizes all national and service text characters. Eliminates confusion due to different national standards. Even fonts are created for all alphabets, such as Arial Unicode.

Since the encoding of each character in Unicode is given not 8, but 16 digits, the size of the text file increases by about 2 times. This was once an obstacle to the introduction of the 16-bit system. And now, with the current level of development of computer technology, increasing the size of text files does not matter much. Texts take up very little space in computer memory.

Cyrillic takes places in Unicode from 768 to 923 (basic characters) and from 924 to 1023 (extended Cyrillic, various rare national letters). If the program is not adapted to Cyrillic Unicode, then it is possible that text characters are recognized not as Cyrillic, but as extended Latin (codes from 256 to 511). And in this case, instead of text, a meaningless set of exotic characters appears on the screen.

This is possible if the program is outdated, created before 1995. Or a rare one, the Russification of which no one took care of. It is also possible that the Windows OS installed on the computer is not fully configured for Cyrillic. In this case, you need to make the appropriate entries in the registry.

EXPLANATORY NOTE

"Digital signal processing"

Completed by: Chunikhin V.A.

Group: 5401 С349

Checked by: Kapustin A.S.



INTRODUCTION 7

CONCLUSION. 34

APPENDIX A.. 36


TK - terms of reference

AM - amplitude modulation

PF - bandpass filter


INTRODUCTION


CONVERSION OF MODULATED SIGNAL INTO ADDITIONAL RANGE. PROCEDURE FOR OBTAINING A DISCRETE-ANALYTICAL SIGNAL (HILBERT TRANSDUCER)

A digital Hilbert converter (DCT) is a linear discrete system that generates a pair of discrete Hilbert-conjugated signals at the output (the phases of the signals differ by ) in a given operating band.



In our case, the operating band was selected according to the low-frequency envelope of the modulated oscillation, Figure 21.

Figure 21 - LF signal envelope

This graph was obtained as follows:

A_m=abs(complex(x));

plot(t,A_m,"r-");grid on;

ylim([-0.5 9.5]);

title("Low Envelope");

Let us determine the frequency band, formula (10).

where is the duration of the entire pulse.

The CPG can be implemented on the basis of FIR filters of the 3rd and 4th types, the LPFC of which provides a phase shift of . Preference is given to the FIR filter of the 3rd type, since it allows you to get an impulse response (IR), every second report which is equal to zero, thereby reducing the number of arithmetic operations when calculating the response of the CPG, which is very important when it is implemented, for example, on a digital signal processor (DSP).

On the basis of a type 3 FIR filter, only a band-pass filter (BPF) can be synthesized, while the specific requirements for the frequency response of the DPG, in comparison with the requirements for the frequency response of the PF, will be as follows:

1) The frequency response of the CPG must be symmetrical about the middle of the main frequency band to obtain IR, every second sample of which is equal to zero. Therefore, the requirements for the frequency response of the CPG are set symmetrically with respect to .

2) The operating bandwidth of the CPG should not exceed the bandwidth of the PF.

3) The maximum allowable deviation in the operating band should not be less than the maximum allowable deviation in the PV.

4) The maximum allowable deviation in the PP does not need to be set too rigidly, since the effectiveness of the CPG is evaluated in the work area.

According to the requirements for the frequency response, we will synthesize a CPG (TF) of the minimum order using the firgr function based on a type 3 FIR filter ('hilbert') with the parameter m equal to 'mineven':


plot_fir(R,b,Fs1);

Our R parameter, which sets the filter order, ends up being 24. The frequencies were chosen as follows:

fs1=220; - sampling frequency

fk1=10; - cutoff frequency PZ1

ft1=20; - cutoff frequency PP1

ft2=92; - cutoff frequency PP2

fk2=102 – limiting frequency of PZ2

The following function was used to display the graphs:

function plot_fir(R,b,Fs1)

% R-order FIR filter

% Fs1 - sample rate

fm=0:((Fs1/2)/200):Fs1/2;

As a result, we got the following IR, frequency response and phase response, Figure 22.


Figure 22 - Characteristics of SG


This procedure was implemented by multiplying the modulated signal by , where 38 MHz is the frequency to which the shift occurred.

This was obtained as follows in the MATLAB software package:

x1=z1.*cos(2*pi*38000000*t);

Spectrum Acquisition:

NFFT=2^nextpow2(length(x1));

y=fft(x1,NFFT)/length(x1);

plot(f,2*abs(y(1:NFFT/2+1)));

xlim();

title("AFC shifted");

plot(f,2*abs(y(1:NFFT/2+1)));

xlim();

title("Signal shifted");

Let's depict the given spectrum, Figure 23.


Figure 23 - The spectrum of the modulated signal after the shift

As can be seen from Figure 23, the spectrum is symmetrical about 3.8 MHz, which means that this is indeed an AM spectrum.

Next, we need to send our signal to the PG, where at the output we should observe two signals that differ in phase by a quarter of the period, then we will get an orthogonal complement of the signal, which analytically looks like this, formula (11).


The function in MATLAB that implements this operation is the pg function.

where x1 is the modulated signal shifted in frequency.

Let's draw graphs showing .

plot(t,real(pg),"k"),grid on

plot(t,image(pg),"--")

We depict the result in Figure 24.

Figure 24 - The result of the passage of the signal through the SG on an enlarged scale


CONCLUSION

In the course of the work, the basic principles of digital signal processing were studied: digitization, obtaining a discrete spectrum, transferring the spectrum to higher frequencies, and so on. The skills of the MATLAB software package were obtained: creating functions, controlling frequency and time vectors, issuing graphs, describing graphs, modulating processes, creating filters. These skills are essential for developers of various digital systems. The essence of the work was to digitize the analog signal, pass it through the simplest communication channel and receive it at the output of the system.


APPENDIX A

MATLAB program listing

SG characteristics construction function:

function plot_fir(R,b,Fs1)

% Plotting FIR Filter Characteristics

% R-order FIR filter

% b-vector of transfer function coefficients

% a=-coefficient of the denominator of the transfer function

% Fs1 - sample rate

subplot(3,1,1),stem(n,b,"fill","MarkerSize",3),xlabel("n"),...

title("Impulse Response"), grid on;

fm=0:((Fs1/2)/200):Fs1/2;

H=freqz(b,a,fm,Fs1);MAG=abs(H);PHASE=angle(H);

subplot(3,1,2),plot(fm,MAG),xlabel("f(Hz)"),title("MAGNITUDE"),grid on;

subplot(3,1,3),plot(fm,PHASE),xlabel("f(Hz)"),title("PHASE"),grid on;

Main program code:

%% Pulse parameters

dF=80e6; % Sampling frequency, Hz

dt=1/dF; % Sampling interval, sec

%% Formation of an array of time readings

%% Square wave

x1=3*rectpuls(t-ti1/2,ti1);

plot(t,x1,"k"),grid;

title("Rectangular Pulse");

ylim([-0.5 3.5]);

stem(t,x1,"k."),grid;

title("Rectangular pulse (digit)");

ylim([-0.5 3.5]);

NFFT=2^nextpow2(length(x1));

y1=fft(x1,NFFT)/length(x1);

f=dF/2*linspace(0,1,NFFT/2+1);

plot(f,2*abs(y1(1:NFFT/2+1)));

title("frequency response");

ylabel("y1(f)");

plot(f,angle(y1(1:NFFT/2+1)));

title("PFC");

ylabel("y1(f)");

%% Sine pulse

x2=4*sin(pi*(t-t11)/12e-3).*(t>=t11).*(t<=t22);

plot(t,x2,"k"),grid;

title("Sine pulse");

ylim([-0.5 4.5]);

stem(t,x2,"k."),grid;

title("Sine pulse (digit)");

ylim([-0.5 4.5]);

NFFT=2^nextpow2(length(x2));

y2=fft(x2,NFFT)/length(x2);

f=dF/2*linspace(0,1,NFFT/2+1);

% Plot single-sided amplitude spectrum

plot(f,2*abs(y2(1:NFFT/2+1)));

title("frequency response");

ylabel("y2(f)");

plot(f,angle(y2(1:NFFT/2+1)));

title("PFC");

ylabel("y2(f)");

%% Triangular pulse

plot(t,x3,"k"),grid;

title("Triangle pulse");

ylim([-0.5 3.5]);

stem(t,x3,"k."),grid;

title("Triangle pulse (digit)");

ylim([-0.5 3.5]);

NFFT=2^nextpow2(length(x3));

y3=fft(x3,NFFT)/length(x3);

f=dF/2*linspace(0,1,NFFT/2+1);

% Plot single-sided amplitude spectrum

plot(f,2*abs(y3(1:NFFT/2+1)));

title("frequency response");

ylabel("y3(f)");

plot(f,angle(y3(1:NFFT/2+1)));

title("PFC");

ylabel("y3(f)");

%% keystone pulse

plot(t,x4,"k"),grid;

title("Trapezoid impulse");

ylim([-9.5 0.5]);

stem(t,x4,"k."),grid;

title("Trapezoid pulse (digit)");

ylim([-9.5 0.5]);

NFFT=2^nextpow2(length(x4));

y4=fft(x4,NFFT)/length(x4);

f=dF/2*linspace(0,1,NFFT/2+1);

% Plot single-sided amplitude spectrum

plot(f,2*abs(y4(1:NFFT/2+1)));

title("frequency response");

ylabel("y4(f)");

plot(f,angle(y4(1:NFFT/2+1)));

title("PFC");

ylabel("y4(f)");

%% Total impulse

plot(t,x,"k"),grid;

title("Total Momentum (Recovered)");

title("Total impulse (digit)");

NFFT=2^nextpow2(length(x));

y=fft(x,NFFT)/length(x);

f=dF/2*linspace(0,1,NFFT/2+1);

plot(f,2*abs(y(1:NFFT/2+1)));

title("frequency response");

plot(f,angle(y(1:NFFT/2+1)));

title("PFC");

%% Amplitude Shift Keying

Fc=dF*5; % carrier frequency

t1=(0:length(x)*FsdF-1)/Fs;

% formation of AMn-signal

s_ask=x(floor(dF*t1)+1.*cos(2*pi*Fc*t1));

plot(t1,s_ask,"k"),grid;

ylim([-9.5 4.5]);

title("amplitude keying");

NFFT=2^nextpow2(length(s_ask));

y6=fft(s_ask,NFFT)/length(s_ask);

f=dF/2*linspace(0,1,NFFT/2+1);

plot(f,2*abs(y6(1:NFFT/2+1)));

title("frequency response");

%%AM (via ammod function)

t=-1e-5:dt:28.3e-3; % time axis reports

fc=10000; % carrier frequency

z1=ammod(x,Fc,dF,0,13);

plot(t,z1),grid;

title("Amplitude modulation");

NFFT=2^nextpow2(length(z1));

y5=fft(z1,NFFT)/length(z1);

f=dF/2*linspace(0,1,NFFT/2+1);

plot(f,2*abs(y5(1:NFFT/2+1)));

title("frequency response");

A_m=abs(complex(x));

plot(t,A_m,"r-");grid on;

ylim([-0.5 9.5]);

title("Low Envelope");

%% Frequency Offset

x1=z1.*cos(2*pi*38000000*t);

NFFT=2^nextpow2(length(x1));

y=fft(x1,NFFT)/length(x1);

f=dF/2*linspace(0,1,NFFT/2+1);

plot(f,2*abs(y(1:NFFT/2+1)));

xlim();

title("AFC shifted");

plot(f,2*abs(y(1:NFFT/2+1)));

xlim();

title("Frequency response shifted (larger scale)");

title("Signal shifted");

%% SG characteristics

fk1=10;ft1=20;ft2=92;fk2=102; f=;

d2=0.1;d1=0.05;ripple=;

Firpmord(f,m,ripple,Fs1);

Firgr(("mineven",R),f0,m0,ripple,"hilbert");

plot_fir(R,b,Fs1);

plot(t,real(pg),"k"),grid on

plot(t,imag(pg),"r-.")

legend("Real Part","Imaginary Part")

xlim()

plot(t,yout),grid on;

EXPLANATORY NOTE

to the course work on the discipline

"Digital signal processing"

Completed by: Chunikhin V.A.

Group: 5401 С349

Checked by: Kapustin A.S.


1. Carry out sampling, digitization of a given signal;

2. Limit the spectrum of a discrete signal;

4. Convert the modulated signal to an additional frequency range;

5. Implement the procedure for obtaining a discrete-analytical signal (PG);

6. Demodulate the received signal and compare it with the original signal.

Let's depict the form of a given signal according to the variant, Figure 1.

Figure 1 - The form of a given signal

We will set the signal parameters in the form of tables 1 and 2.

Table 1 - Time parameters of the signal


Explanatory note: 43 pages, 28 figures, 4 sources, 2 tables.

DISCRETIZATION, SPECTRUM, MODULATION, HILBERT TRANSFER, DEMODULATION.

In this paper, the object of study will be our given signal. The following transformations will be carried out with it: its digitization, spectrum limitation, modulation, spectrum transfer to the RF region, obtaining a discrete analytical signal and demodulation. In other words, the simplest channel will be considered, with the help of which the electrical equivalent of our information is achieved by digital means. When modulating this path, the MATLAB R2014a software package will be used - this is a high-level language and an interactive environment for programming, numerical calculations and visual results. With MATLAB, you can analyze data, develop algorithms, create models and applications. Its application is in great demand in signal processing and communications all over the world. Therefore, the choice of the software environment fell on him. All written code is presented in Appendix A.


INTRODUCTION 7

1. DIGITIZING THE ANALOGUE SIGNAL .. 8

2.LIMITING THE SPECTRUM OF THE DISCRETE SIGNAL .. 14

3. SELECTION OF MODULATION AND CALCULATION OF MODULATED FREQUENCY.. 21

4. CONVERSION OF THE MODULATED SIGNAL INTO THE ADDITIONAL RANGE. PROCEDURE FOR OBTAINING A DISCRETE-ANALYTICAL SIGNAL (HILBERT TRANSDUCER) 24

5. DEMODULATION OF THE RECEIVED SIGNAL AND COMPARISON OF IT WITH THE ORIGINAL SIGNAL.. 31

CONCLUSION. 34

LIST OF USED SOURCES.. 35

APPENDIX A.. 36


LIST OF USED ABBREVIATIONS

FFT - fast fourier transform (fast Fourier transform)

AFC - amplitude-frequency characteristic

PFC - phase-frequency response

IR - impulse response

TK - terms of reference

AM - amplitude modulation

BAM - balanced amplitude modulation

CPG - Digital Hilbert Converter

FIR - Finite Impulse Response

DSP - Digital Signal Processing

PF - bandpass filter

DLP - digital low-pass filter


INTRODUCTION

In the modern world, analog circuitry has already remained in the background, now circuitry is more like a LEGO constructor, which you need to properly assemble and know the characteristics of this “constructor”. However, before assembling, it is necessary to develop this device, simulate it, consider, for example, its impulse response, probe it with various complex signals depending on customer requirements, and so on. These devices consist of various digital systems. A digital system is understood as the conversion of an analog signal into a sequence of numbers with subsequent processing of this sequence.

Digital filtering allows you to implement more complex signal processing algorithms than analog filtering. For example, a specialized microprocessor or microcontroller can process a sequence of numbers.

The course work aims to instill in students practical skills in the field of discrete and digital signal processing.


DIGITIZATION OF THE ANALOGUE SIGNAL

In order to switch to digital mode, you need to select the sampling rate. According to the Kotelnikov theorem, it is found as follows, formula (1).

However, when working with real signals, this frequency is not enough and formula 1 is transformed into the following form, formula (2).

where in turn takes any integers.

In our work, it makes no sense to consider the entire set of pulses to find the (upper frequency) spectrum, you can consider only the one with the widest spectrum, that is, the narrowest in the time domain. In this signal, this is a trapezoidal pulse whose duration is only . We depict this impulse in Figure 2.


Figure 2 - Trapezoidal impulse

When constructing this impulse, the following mathematical description was used in the Mathcad program, formula (3).


Now, using the Fourier transform (FFT), let's move to the frequency domain, formula (4).

Let's build the frequency response, Figure 3.


Figure 3 - Frequency response of a trapezoidal pulse

Now let's take the upper frequency according to the pulse duration, formula (5).

To prove that according to formula (1) the sampling frequency will not be enough, let's try to work with it first, that is .

Once you have chosen the sampling rate, which will most likely need to be increased in the future, since there will be errors during recovery at 2 kHz, you can move on to MATLAB.


In order to depict our signal on the time axis with a sampling interval in MATLAB, you need to specify an array of time samples. It is set as follows: t=-1e-5:dt:28.3e-3.

Now let's set our impulses one by one and simply sum them up at the end - we get the initial impulse.

Rectangular pulse:

ti1=7e-3; % Pulse duration

x1=3*rectpuls(t-ti1/2,ti1);

Sinusoidal impulse:

x2=4*sin(pi*(t-t11)/12e-3).*(t>=t11).*(t<=t22);

Triangular pulse:

x3=3*tripuls((t-t22)-4e-3,8e-3);

Trapezoidal impulse:

x4=-9*trapmf(t,);

Total momentum:

To display the graph, the plot function is used, it looks like this: plot(t,x,"k");

Where t is the array of timestamps we set up at the beginning, x is the signal itself, and 'k' means the graph will be black. Let's depict the given graph in Figure 4.


Figure 4 - Total impulse (restored)

Restoration occurs using the Kotelnikov theorem, formula (6).

As can be seen from Figure 4 with this discretization, the rectangle looks more like a trapezoid, the second zero is gone, and the trapezoid resembles a triangle, so the recovery occurred with a big error. From this we conclude that it is necessary to increase the sampling frequency. Through experimental selection, our sampling frequency had to be increased by a factor of 50, since at a lower sampling frequency the information about the leading edge of the trapezoid was not clear, it looked like a vertical line. This is due to the fact that, according to the assignment, we have a very small time interval of this front, only 0.08ms. Let's depict the restored signal in Figure 5.

Figure 5 - Total pulse (recovered) after upsampling

Let's depict it in a discrete form, Figure 6.

Figure 6 - The total impulse in digital form

As can be seen from this figure, a lot of readings were required for a good restoration, for clarity, we will also depict the leading edge of the trapezoid on an enlarged scale, we will show how many samples were needed to accurately restore it, Figure 7.

Figure 7 - The leading edge of the trapezoid in discrete form

The figure shows that it took 9 samples to accurately reconstruct the leading edge.

Thus, we have digitized our pulse, here we can summarize that the designer has to choose a sufficiently large sampling rate to accurately restore the waveform in order to save all information about it. Especially if the waveform is rapidly changing.