# Digital Signal Processing

Digital Signal Processing is the process of representing signals in a discrete mathematical sequence of numbers and analyzing, modifying, and extracting the information contained in the signal by carrying out algorithmic operations and processing on the signal.
Digital signal processing (DSP) is the use of digital processing, such as by computers or more specialized digital signal processors, to perform a wide variety of signal processing operations. The digital signals processed in this manner are a sequence of numbers that represent samples of a continuous variable in a domain such as time, space, or frequency. In digital electronics, a digital signal is represented as a pulse train, which is typically generated by the switching of a transistor.
Digital signal processing and analog signal processing are subfields of signal processing. DSP applications include audio and speech processing, sonar, radar and other sensor array processing, spectral density estimation, statistical signal processing, digital image processing, data compression, video coding, audio coding, image compression, signal processing for telecommunications, control systems, biomedical engineering, and seismology, among others.
DSP can involve linear or nonlinear operations. Nonlinear signal processing is closely related to nonlinear system identification and can be implemented in the time, frequency, and spatio-temporal domains.
The application of digital computation to signal processing allows for many advantages over analog processing in many applications, such as error detection and correction in transmission as well as data compression. Digital signal processing is also fundamental to digital technology, such as digital telecommunication and wireless communications. DSP is applicable to both streaming data and static (stored) data.

## What is Digital Signal Processing?

### Digital

In digital communication, we use discrete signals to represent data using binary numbers.

### Signal

A signal is anything that carries some information. It’s a physical quantity that conveys data and varies with time, space, or any other independent variable. It can be in the time/frequency domain. It can be one-dimensional or two-dimensional. Here are all the major types of signals.

### Processing

The performing of operations on any data in accordance with some protocol or instruction is known as processing.

DSP take real-world signals like voice, audio, video, temperature, pressure, or position that have been digitized and then mathematically manipulate them. A DSP is designed for performing mathematical functions like "add", "subtract", "multiply" and "divide" very quickly.
Signals need to be processed so that the information that they contain can be displayed, analyzed, or converted to another type of signal that may be of use. In the real-world, analog products detect signals such as sound, light, temperature or pressure and manipulate them. Converters such as an Analog-to-Digital converter then take the real-world signal and turn it into the digital format of 1's and 0's. From here, the DSP takes over by capturing the digitized information and processing it. It then feeds the digitized information back for use in the real world. It does this in one of two ways, either digitally or in an analog format by going through a Digital-to-Analog converter. All of this occurs at very high speeds.
To illustrate this concept, the diagram  shows how a DSP is used in an MP3 audio player. During the recording phase, analog audio is input through a receiver or other source. This analog signal is then converted to a digital signal by an analog-to-digital converter and passed to the DSP. The DSP performs the MP3 encoding and saves the file to memory. During the playback phase, the file is taken from memory, decoded by the DSP and then converted back to an analog signal through the digital-to-analog converter so it can be output through the speaker system. In a more complex example, the DSP would perform other functions such as volume control, equalization and user interface.
A DSP's information can be used by a computer to control such things as security, telephone, home theater systems, and video compression. Signals may be compressed so that they can be transmitted quickly and more efficiently from one place to another (e.g. teleconferencing can transmit speech and video via telephone lines). Signals may also be enhanced or manipulated to improve their quality or provide information that is not sensed by humans (e.g. echo cancellation for cell phones or computer-enhanced medical images). Although real-world signals can be processed in their analog form, processing signals digitally provides the advantages of high speed and accuracy.
Because it's programmable, a DSP can be used in a wide variety of applications. You can create your own software or use software provided by ADI and its third parties to design a DSP solution for an application.

## A DSP contains these key components

• Program Memory: Stores the programs the DSP will use to process data
• Data Memory: Stores the information to be processed
• Compute Engine: Performs the math processing, accessing the program from the Program Memory and the data from the Data Memory
• Input/Output: Serves a range of functions to connect to the outside world

## Anti-Aliasing-Filter

The I/o signal is applying to the antialiasing filter.this is a lowpass filter used to remove the high-frequency noise and Band limit the Signal

## Sample&Hold

this device provides the input to the ADC and will be required if the i/o signal was not proper and flute.

## A/D conveter

this a conveter which converts the Analog S/g to the digital.

## DSP

this gives the better quality signal

## D/A Conveter

this device reconvenes the signal from digital S/g to the Analog.

## Reconstruction filter

this filter is used to construct the signal properly after the signal processing.

## Block diagram of a DSP system

The first step is to get an electrical signal. The transducer (in our case, a microphone) converts sound into an electrical signal. You can use any transducer depending upon the case. Once you have an analog electrical signal, we pass it through an operational amplifier (Op-Amp) to condition the analog signal. Basically, we amplify the signal. Or limit it to protect the next stages. The anti-aliasing filter is an essential step in the conversion of analog to a digital signal. It is a low-pass filter. Meaning, it allows frequencies up to a certain threshold to pass. It attenuates all frequencies above this threshold. These unwanted frequencies make it difficult to sample an analog signal.
The next stage is a simple analog-to-digital converter (ADC). This unit takes in analog signals and outputs a stream of binary digits. The heart of the system is the digital signal processor. These days we use CMOS chips (even ULSI) to make digital signal processors. In fact, modern processors, like the Cortex M4 have DSP units built inside the SoC. These processor units have high-speed, high data throughputs, and dedicated instruction sets. The next stages are sort of the opposite of the stages preceding the digital signal processor.
The digital-to-analog converter does what its name implies. It’s necessary for the slew rate of the DAC to match the acquisition rate of the ADC. The smoothing filter is another low-pass filter that smoothes the output by removing unwanted high-frequency components. The last op-amp is just an amplifier. The output transducer is a speaker in our case. You can use anything else according to your requirements.

## Advantages of a Digital Signal Processing

• DSP has a high level of accuracy. The filters designed in DSP have firm control over output accuracy as compared to analog filters.
• The reconfiguration in an analog system is very much tough because the entire hardware and its component will have to be changed. On the contrary, a DSP reconfiguration is much more comfortable as only the code, or the DSP program needs to be flashed after making the changes according to the requirements.
• The combination of DSP interfaced with FPGA helps in designing the protocol stack of the whole wireless system like WiMAX, LTE, etc.
•  Implementation in digital is much more cost effective than its analog counterpart.
• Digital circuits can be easily reproduced in huge quantities cost effectively.
• Accessible transportation is possible because digital signals can be processed offline.
• Using the DSP method sophisticated signal processing algorithms can be implemented.

## Disadvantages of a Digital Signal Processing

• When using DSP, there is a need for using anti-aliasing filter before ADC ( Analog To Digital Converter) as well as using a reconstruction filter after DAC (Digital to Analog Converter). Due to the use of this extra two modules viz. ADC and DAC, the complexity of DSP based hardware increases.
• Digital Signal Processing(DSP) processes the signal at high speed and comprises of more top internal hardware resources.
• Each DSP has a different hardware architecture and software instructions.
• One needs to cautiously use the IC as per hardware and software requirements as most of the DSP chip is very expensive.
• Only in a synchronized communication system, the detection of digital signals is possible but it not so in the case of analog systems.
• Higher bandwidth is required for digital communication than analog for transmission of the same information.

## Applications

• General application areas for DSP include
• Audio signal processing
• Audio data compression e.g. MP3
• Video data compression
• Computer graphics
• Digital image processing
• Photo manipulation
• Speech processing
• Speech recognition
• Data transmission
• Sonar
• Financial signal processing
• Economic forecasting
• Seismology
• Biomedicine
• Weather forecasting

## What is sampling of signals ?

In signal processing, sampling is the reduction of a continuous-time signal to a discrete-time signal. A common example is the conversion of a sound wave to a sequence of samples. A sample is a value or set of values at a point in time and/or space.

## What is linear convolution ?

Linear convolution is a mathematical operation done to calculate the output of any Linear-Time Invariant (LTI) system given its input and impulse response. Circular convolution is essentially the same process as linear convolution. x(n) is the input signal, and h(n) is the impulse response of the LTI system

## What is dynamic system ?

A dynamical system is a system in which a function describes the time dependence of a point in a geometrical space.

## What is static system ?

A static system is a system in which output at any instant of time depends on the input sample at the same time. In other words, the system in which output depends only on the present input at any instant of time then this system is known as the static system.

## What are the applications of DSP?

Digital signal processing has a wide variety of applications in various fields

• Digital filtering
• Spectral analysis
• speech processing
• Image processing
• Disk and robot control
• Telecommunications
• Consumer Electronics
• Biomedical Engineering
• Military application

## What are the components of digital signal processing?

### 1. Anti-Aliasing-Filter

The I/o signal is applied to the antialiasing filter. It is a lowpass filter used to remove high-frequency noise and band limit the signal

### 2. Sample and hold

This device provides the input to the ADC and will be necessary if the i/o signal is not correct and not fluted.

### 3. A/D converter

It is a converter that converts analog S/g to digital.

### 4. DSP

It gives better signal quality

### 5. D/A converter

This device recombines the signal from digital S/g to analog.

### 6. Reconstruction filter

This filter is used to properly shape the signal after signal processing.

## What is signal processing?

Signal processing refers to the analysis, interpretation and manipulation of signals such as noise, image time-varying measurement values ​​and sensor data.

For example biological data such as electrocardiogram, control system signals, telecommunication transmission signals such as radio signals and many others.

## What are the categories of signal processing?

### 1. Analog Signal Processing

Analog signal processing is basically the filtering of signals. For non-digitized signals such as classical radio, telephone, radar and television systems. These include linear electronic circuits such as passive filters, active filters, additive mixers, integrators, and delay lines. It also includes non-linear circuits such as compound, multipliers (frequency mixers and voltage-controlled amplifiers), voltage-controlled filters, voltage-controlled oscillators, and phase-locked loops.

### 2. Digital Signal Processing

A digital signal processor consists of an anti-aliasing filter, an analog to digital converter (ADC), a digital filter represented by a transfer function H(z), a digital to analog converter, and a reconstruction filter. For digitized signals, processing is done by general-purpose computers or digital circuits such as ASICs, field-programmable gate arrays, or specialized digital signal processors (DSP chips).

## What are the types of filters?

### 1. Analog filters

Analog filters take an analog signal as input and process the signal and finally give an analog output. An analog filter is constructed using resistors, capacitors, active elements, etc

### 2. Digital filters

A digital filter processes and generates digital data. A digital filter consists of components such as adders, multipliers and delay units. Digital filters are far superior in terms of performance compared to analog filters.

### Types of digital filters

Generally speaking, two types of digital filters exist.

• FIR Filters (Finite Impulse Response Filters)
• IIR Filters (Infinite Impulse Response Filters)

FIR filter

A digital filter whose impulse response is of finite duration is known as finite impulse response filter. The response of an FIR filter depends only on the current and past input patterns. These FIR filters are also called non recursive filters. So, the impulse response sequence in FIR is of finite duration, i.e. it has finite number of non-zero terms.

• FIR filters can be designed with precise linear phase. These linear phase filters are important for applications where frequency dispersion due to non-linear phase is dangerous. (for example speech processing and data transmission)
• FIR filters are stable
• Round off noise can be removed in FIR filter
• FIR filters can be efficiently implemented in multirate DSP systems
• FIR filters reduce the computational complexity

• A large number of impulse response samples are required to estimate sharp cutoff FIR filters, which will complicate the process at slow speeds.
• The delay of linear phase FIR filters can sometimes cause problems in some DSP applications
•  IIR filters
• A digital filter whose impulse response is of infinite duration is known as an infinite impulse response filter. The response of an IIR filter is a function of current and previous input signal samples and previous output signal samples.
• It is also called recursive filter.