2012年8月30日星期四

Brief Explanation of Digital Signal Processing Compression Encryption and File Translation

It happens that many people have no idea what Digital Signal Processing means, although they hear more and more often these words, today. Considering the name, Digital Signal Processing, people are lead towards thinking that this procedure deals with digital signals. No; Digital Signal Processing is a method of improving the quality of the analog signals, only. Indeed, the naming used is rather improper, because it relates to all types of digital processing, only that the methods, and the techniques used in DSP deal only with signals that are analog in nature. In the digital signals case, we can only compress, encrypt, and translate them to other digital formats; these (different) procedures do not require any DSP techniques. Using the DSP name when referring to digital signals causes confusion.

Let’s take Wholesale Etceteras Game each of these one step at a time, and using few practical examples. Suppose that we have an old vinyl record and we want to copy its analog signal on a digital CD, to better protect that recording--CDs are a lot more reliable to hold information unaltered, over time. This means that we need to convert the analog signal to digital format, and the best way of doing it is by using DSP techniques, as follows. First, we need an analog-to-digital hardware module to convert the analog signal into digital format--this is typically a “codec”--then we select a specific scanning frequency, to accomplish this task. Because we work with audio frequencies, a 40 KHz scanning frequency should be sufficient, and please note that the scanning frequency needs to be at least RC Helicopters double than the maximum frequency of the original analog signal--the analog audio signals have frequencies within the range of 10 Hz to 16 KHz. After scanning, we have the copy of the analog vinyl record, in digital data format, expressed as a series of digital integer values in binary format.

Unfortunately, our vinyl record is fairly old, and it has a lot of noise on it; this noise is also present on the digital copy, and it needs to be filtered out, before we burn the digital CD. The next step is to take the digital copy--please note this: the digital copy represents the analog signal--and we apply to it a mathematical transformation function: in this way, we change digital data from “time-domain” to the “frequency-domain”. This is done gradually, by chopping digital data into frames of 512, 1024, RC Helicopters or 4096 integers in size, and transforming one frame at a time. Once we have the data in frequency-domain, it is easy to filter the noise out, and to select/amplify only the audio frequencies we want; for this we use digital firmware or software filters, which are, in fact, known mathematical algorithms.

Once the signal is properly filtered, we need to change it back to time-domain, and we do this by using a second transformation function. Now we are able to listen our record, filtered of (any) noise. If we are satisfied with the quality of the recording, we can burn the CD; otherwise, we could repeat the above procedure, until results are exactly what we expect them to be. Digital Signal Processing ends here.

Now, we have a CD holding a digital signal--an audio file in this particular case. It happens that our audio digital file takes too many memory bytes to store, and we cannot afford this. We want our digital file to use the smallest amount of memory, so that we can transfer the file quickly over the Internet, or we would like to store as many records as we can in a small MP3 player, for example. For this we need a “compression” technique, and, implicitly, an Screen Protectors “encryption” one.

There are very many compression/encryptions methods available, and very many will be developed into the future. Basically, the digital signal is in fact a series of integers--an integer is 2 bytes; one byte is 8 bits; each bit is either 0 or 1--and each integer represents one mathematical value in the range of 0 to 65535. Now, we see that each digit in the range 0 to RC Helicopters 65535 is repeated a number of times, in the entire digital audio file. This information is very important, because it helps us to convert our series of integers into a mathematically encrypted structure, by means of a software compression/encryption “key”. Instead of using, for example, the integer 23501 for 1522 times RC Helicopters in our digital audio file, we use only the information about that integer, meaning that we store only the value 1522, one single time, corresponding to the integer 23501.

The compression/encryption key--this is in fact another mathematical algorithm--it is responsible for taking the initial digital file and breaking it into frames of integers; for replacing each integer with the number of times it is used; and for storing the code needed to reconstitute the initial series of integers, which is the original digital file. Commonly, the key works with a special memory structure, named a “binary-tree”. In this binary-tree, the position of each number represents how many times an integer appears in the entire file, and it also holds the information needed to reconstitute the frames, and then the entire audio digital file.

Once the digital audio file is in binary-tree format its size becomes dramatically smaller--it is compressed--and we can use it for memory storage, or for fast file transfer. In this binary-tree format data is also encrypted, in addition to being compressed, and we need that compression/encryption key, in order to reconstitute the initial digital signal; otherwise, there is no way we could “decipher” that binary-tree.

Now, what else can we do to our digital audio file? Well, there are many audio file formats, and we might need to change our digital audio file from one format to another. The simplest audio file format holds data as series of bits, of 0s and 1s. Another type may have data grouped in small packages, in series of bytes, integers, or doubles. This last type of data grouping allows for another level of information compressing; however, in order to change from one file format to the other we need appropriate hardware, firmware, or software data read/write drivers. Changing the file format it is named “translation” or “conversion”, and this is a lot easier to implement.

Basically, this is all that we do to analog and digital signals. As you can see there is a lot of mathematics involved, but the good news is that all these mathematical routines and algorithms are standard. A developer does not necessarily need to know a lot of mathematics, in order to perform his job fairly well. These standard mathematical algorithms have been developed and optimized by groups of engineers and programmers, and we all use them. However, if you intend to develop proprietary algorithms, in order to achieve more spectacular effects, you need to study very well these DSP, compression/encryption, and translation techniques. For more information please check my home site, and try to discover other related articles I wrote, in various publications on the Internet.

O G POPA is Professional Engineer in BC, Canada. His home site is Corollary Theorems at http://www.corollarytheorems.com