Skip to content

Commit d6c5ffe

Browse files
authored
Update README.md
1 parent e5cbdc1 commit d6c5ffe

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,32 @@ After iterating for every bit in the 16bit sequence, we obtain the FSK signal wh
3939
![Demodulated output](/FSK_screencaps/FSKdemod.png)
4040

4141
## Explanation of FSK_compression.py :
42-
This code uses the functions defined in FSK.py for modulation and demodulation and uses it for a practical application of FSK in digital Data Compression using concepts from FFT Image Compression techniques.
42+
This code uses the functions defined in FSK.py for modulation and demodulation and uses it for a practical application of FSK in **digital Data Compression using concepts from FFT Image Compression techniques.**
4343
The inspiration for this section comes from a brilliant explanation of FFT Image Compression by University of Washington : https://cosmolearning.org/video-lectures/fft-image-compression/
4444

45-
Similar to Image Compression, we use a 1 Dimentional bit stream instead of 2 Dimentional images. As the video above explains, if we create random numbers for each pixel of an image, we obtain white noise. That image will look like TV static and the FFT of such an image gives no significant peaks and thus cannot be compressed. Most natural images have an order in the pixels while going sequentially and rarely have abrupt value changes. These images FFT gives few significant Peaks. Truncating all minor values and transmitting only the Peak Values is sufficient to reconstruct the image at the receiver using IFFT thus significantly saving bandwidth. An image is more compressible if the pixels are more ordered rather than random, a detailed picture of a rainforest is less compressible than a picture of the night sky.
45+
Similar to Image Compression, we use a 1 Dimentional bit stream instead of 2 Dimentional images. As the video above explains, if we create random numbers for each pixel of an image, we obtain white noise. That image will look like TV static and the FFT of such an image gives no significant peaks and thus cannot be compressed. **Most natural images have an order in the pixels while going sequentially and rarely have abrupt value changes. These images FFT gives few significant Peaks. Truncating all minor values and transmitting only the Peak Values is sufficient to reconstruct the image at the receiver using IFFT thus significantly saving bandwidth.** An image is more compressible if the pixels are more ordered rather than random, a detailed picture of a rainforest is less compressible than a picture of the night sky.
4646

47-
In our case we are using a random 16bit sequence, this randomness and lack of order prevents the use of direct FFT compression of digital datastreams as there would be a lot of peaks. Horrible for compression. This is where FSK comes in.
47+
In our case we are using a random 16bit sequence, this randomness and lack of order prevents the use of direct FFT compression of digital datastreams as there would be a lot of peaks. Horrible for compression. **This is where FSK comes in.**
4848

49-
FSK converts the Bit Sequence to 2 quantifiable frequencies , `fskFreq1` and `fskFreq2`, the frequency spectrum of FSK only contains 2 peaks making it highly compressible.compression contains the function `FFTcompression(fftsig,threshold)` This function takes 2 arguments FFT of FSK signal(Frequency spectrum) and threshold. It truncates all values below Threshold in amplitude to zero thus truncating all the minor peaks in the spectrum it returns this truncated Frequency Spectrum.
49+
**FSK converts the Bit Sequence to 2 quantifiable frequencies** , `fskFreq1` and `fskFreq2`, the frequency spectrum of FSK only contains 2 peaks making it highly compressible.compression contains the function `FFTcompression(fftsig,threshold)` This function takes 2 arguments FFT of FSK signal(Frequency spectrum) and threshold. It truncates all values below Threshold in amplitude to zero thus truncating all the minor peaks in the spectrum it returns this truncated Frequency Spectrum.
5050

51-
This truncated FFT spectrm if transmitted can save significant bandwidth in comparison to complete FSK sequence.
51+
**FSK with the same bit stream as used to explain FSK.py :**
52+
53+
![FSK](/FSK_screencaps/FSK_updated.png)
54+
55+
**The frequency spectrum after truncating all amplitudes below 10 to zero :**
56+
![FFT_compressed](/FSK_screencaps/fskComprFFT.png)
57+
58+
59+
This truncated FFT spectrm if transmitted can save significant bandwidth in comparison to complete FSK.
5260

5361
When we compute IFFT of this truncated FFT Spectrum, we obtain a distorted version of the input FSK sequence. This distortion arises due to discontinuities in the FSK spectrum at the input generally when bit changes.
5462

5563
This distorted FSK is distorted more in the amplitude and waveshape and the frequency domain is rather unaffected due to existence of major peaks in FFT spectrum.
5664

5765
Thus using a standard demodulation of FSK (Zero Crossing Detectior) gives the input waveform.
5866

67+
**Demodulating the IFFT of Compressed frequency spectrum yeilds :**
68+
![Compresssed_detection](/FSK_screencaps/fskComprDemod.png)
69+
5970

0 commit comments

Comments
 (0)