{"id":266,"date":"2021-12-25T02:17:39","date_gmt":"2021-12-25T09:17:39","guid":{"rendered":"https:\/\/shmalex.com\/?p=266"},"modified":"2021-12-26T00:38:15","modified_gmt":"2021-12-26T07:38:15","slug":"decoding-airband-signals-with-matlab","status":"publish","type":"post","link":"https:\/\/electronsandxploits.com\/?p=266","title":{"rendered":"Decoding Airband Signals with MATLAB"},"content":{"rendered":"\n<p>     The goal of this project is to analyzed an RF data file (.dat) that included airband AM signals captured around Palo Alto Airport ATIS, using an RTL-SDR tunner centered at 135.5 MHz. Through the use of Matlab and provided functions the 10 second data file was analyzed with a spectrogram function that allowed to visualize the provided data file. After scanning the data file and locating the distinct signal, the signal was demodulated using complex down conversion. To recover the signal a Butterworth or Chebyshev filter was used, the Butterworth seemed to work a bit better for this project. The signal was then decimated to remove any unneeded data using the built in function, and the audio sample was saved as a .wav file for playback.<\/p>\n\n\n\n<p>Signal = 135.1Mhz<br>Frequency 135.10000 SFO DEPARTURE AREA D- SUTRO SECTION WEST DEPARTURE. Audio transcript: \u201c337 Compass 5857\u201d<br>Who: Compass airline flight 5857, (either requesting heading or correction on radio 133.7 since aircraft is departing) <br>Aircraft : https:\/\/flightaware.com\/live\/flight\/CPZ5857<\/p>\n\n\n\n<div class=\"wp-block-image is-style-default\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"463\" height=\"554\" src=\"https:\/\/electronsandxploits.com\/wp-content\/uploads\/2021\/12\/AMband2.png\" alt=\"\" class=\"wp-image-268\" srcset=\"https:\/\/electronsandxploits.com\/wp-content\/uploads\/2021\/12\/AMband2.png 463w, https:\/\/electronsandxploits.com\/wp-content\/uploads\/2021\/12\/AMband2-251x300.png 251w\" sizes=\"auto, (max-width: 463px) 100vw, 463px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"472\" height=\"350\" src=\"https:\/\/electronsandxploits.com\/wp-content\/uploads\/2021\/12\/AMband1.png\" alt=\"\" class=\"wp-image-269\" srcset=\"https:\/\/electronsandxploits.com\/wp-content\/uploads\/2021\/12\/AMband1.png 472w, https:\/\/electronsandxploits.com\/wp-content\/uploads\/2021\/12\/AMband1-300x222.png 300w\" sizes=\"auto, (max-width: 472px) 100vw, 472px\" \/><\/figure><\/div>\n\n\n\n<figure class=\"wp-block-audio\"><audio controls src=\"https:\/\/electronsandxploits.com\/wp-content\/uploads\/2021\/12\/flight.wav\"><\/audio><figcaption>Decoded Audio File<\/figcaption><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted has-accent-color has-black-background-color has-text-color has-background\" style=\"font-size:12px\">%%MATLAB CODE%%\n%Find AM signals in sample.\nsample=load_complex(flight135.dat'); %load sample audio file.\nsec=4; %change starting time of sample audio \nds=disp_spec(sample,sec*2048000,1024,2000); %spectrogram display.\nfs=2; %sampling frequency\nnf=1024; % block size for transform\nf=linspace(-.5,.5,nf)*fs; %spectrum frequency range\nk=abs(ds(:,nf\/fs)); %absolute values for the plotted column\nplot(f,k)%plot spectrum vs frequency\n%Demodulation of captured signal\ncent=-1; %plug in value of the Mhz you would like to center\nt = (1:length(sample)).\/fs; %d time sample\ndm = sample.*exp(2*j*pi*cent*t)'; %Center the frequency around 0 \ndisp_spec(dm,sec*2048000,1024,2000); % Display spectrogram to check if centered. \n%Build Butterworth filter and decode.\nf3dB=25000; %input cutoff frequency.\n[b,a]=butter(7,f3dB\/(2*pi*8000\/2));%7th order butterworth lowpass filter normalize sample freq\ndmd=filter(b,a,dm); %filter demodulated spectrum\ndmdd=decimate(dmd,256,'fir'); %reduce sample rate by 256 \nvoice=abs(dmdd).\/max(abs(dmdd)); %normalize the audio signal\nsound(voice,8000) %play audio signal\naudiowrite(flight135.wav,voice,8000);%save audio sample rename wav file freq <\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The goal of this project is to analyzed an RF data file (.dat) that included airband AM signals captured around Palo Alto Airport ATIS, using an RTL-SDR tunner centered at 135.5 MHz. Through the use of Matlab and provided functions the 10 second data file was analyzed with a spectrogram function that allowed to visualize [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":269,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-266","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-projects","post_format-post-format-image"],"_links":{"self":[{"href":"https:\/\/electronsandxploits.com\/index.php?rest_route=\/wp\/v2\/posts\/266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/electronsandxploits.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/electronsandxploits.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/electronsandxploits.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/electronsandxploits.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=266"}],"version-history":[{"count":17,"href":"https:\/\/electronsandxploits.com\/index.php?rest_route=\/wp\/v2\/posts\/266\/revisions"}],"predecessor-version":[{"id":295,"href":"https:\/\/electronsandxploits.com\/index.php?rest_route=\/wp\/v2\/posts\/266\/revisions\/295"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/electronsandxploits.com\/index.php?rest_route=\/wp\/v2\/media\/269"}],"wp:attachment":[{"href":"https:\/\/electronsandxploits.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/electronsandxploits.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/electronsandxploits.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}