What is DSP?
DSP (Digital Signal Processing) is a subject of science and technology about all kinds of analysis, filtering, processing of digital signal. In this case we are talking about processing them with special kinds of computer algorithms.
Difference between analog and digital signals
If we take an analog signal we can observe that in particular part of it, no matter how much we „zoom” to it there is continuity and it’s values are continous, which means that between let’s say that we have a function which is a curve between two points: 1 and 2. There is infinitely many values in between, we can say that this function has „infinite resolution”.
So, if we start taking a snapshot of signal every t (let it be 0.1s = 100ms) consisting of signal value at given time, then we are sampling it. We can save them to some kind of memory for further processing. Time between samples is sampling period, knowing the period we can calculate sampling frequency.
If we have a signal rated at 1kHz, then if we want to sample it and being able to reproduce the signal we need to sample it at least twice the frequency of input. This is known as Nyquist–Shannon theorem.
In theory we could sample the signal at 1kHz, but that might bring some undesirable consequences. Let’s say that the signal is a sinewave. If we take samples at 1kHz there is a chance that we will be constantly reading 0, because our period of sampling will be the same as period of sinewave, also we might be taking the same samples over and over.
Digital signal is a signal that has definite value in a time-period. There are no values inbetween two points, it has a resolution, which tells us how precise we can determine the value at given time.
Process of sampling an analog signal
Comparison between analog and digital signal
Resolution of a digital signal is expressed in bits. The more bits the better we can express a signal. For example: we have a digital signal that has 4-bit resolution and a digital signal that has 8-resolution. In first case we have 2^4 = 16 possible values for the second one we have 2^8 = 255 values. To better illustrate what does it mean, let’s imagine that we have an analog signal that can have values from 0-5V and we want to sample it. If our device has resolution of 4-bit then we can have 16 steps between 0 and 5V. One step will have value of 0.3125V or about 312.5mV, but if we can sample at 8-bit resolution then we will have 255 steps, one step will have value of 0.0196V or 19.6mV which is way better than 312mV per step. It will allow us to sample a signal more precisely.
By now we know basic definitions about DSP, in next article I will talk about Z-Transform and basics of digital filters.
Sources:
Richard G. Lyons - Understanding digital signal processing