Brian Haddad: Difference between revisions

From Class Wiki
Jump to navigation Jump to search
No edit summary
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Contact Info:'''
'''Contact Info:'''


'''Email:''' brian.haddad(AT)wallawalla(dot)edu
'''Email:''' brianhaddad(AT)outlook(dot)com




'''Articles Added:'''
'''Articles Added:'''
*[http://focus.ti.com/lit/an/sloa093/sloa093.pdf Filter Design in 30 seconds]
*[http://focus.ti.com/lit/an/sloa093/sloa093.pdf Filter Design in 30 seconds]
*[http://en.wikipedia.org/wiki/Wikipedia:CHEAT Wikipedia Cheatsheet]
*[http://en.wikipedia.org/wiki/Wikipedia:CHEAT Wikipedia Formatting Cheatsheet]




=='''''Projects'''''==


== '''PSK31 Demodulation''' ==
Fall, 2012 [[Image:PSK31_sample.png|thumb|200px|PSK31]]
*Partner [[Denver Lodge]]


===<u>PSK31 Demodulation</u>===
Fall, 2012
'''''Abstract'''''
:This project demodulates at least two PSK31 signals with limited phase shifting.The approach filters the signals to find the peaks and interpolate them to connect the maximums and form the wave. This decoder can handle up to two signals simultaneously and with the same message and phase, but with different carrier frequencies. The decoder can also handle well above .1dB down noise.


Signals & Systems (ENGR 455)


'''''Introduction'''''
:PSK31 was developed by Peter Martinez (G3PLX) in 1998. PSK31 varies in amplitude and phase, but not frequency. This is extremely useful in amateur radio. PSK31 uses Varicode; a unique binary alphabet where no letter can be found in another. A transmission begins with several zeros so the decoder can synchronize to the exact frequency. The continuous zeros phase shift at a rate of 31.25 per second; hence the name. Each character begins with a 'one', and ends with double zeros ('00'). When there is constant phase, it is considered to be a 'one', when the phase shifts, it is a 'zero'.


[[PSK31 Demodulation]]
:Our project involved creating a "transmitter" to simulate a real signal that our decoder could identify the frequency and interpret the message. The transmitter uses a look-up-table to convert ascii characters to Varicode, then modulate the carrier frequency and add noise. The receiver does the same thing in reverse. The transmitter sends two signals simultaneously. To simulate a real signal, the signal is written to a .wav file to be read by the decoder. This ends the transmitter portion. The decoder begins by reading the .wav file and sending it to a Fourier transform so we can locate the frequencies the signal is transmitting on. Once the frequencies are determined, the signal goes through a bandpass filter at one of the identified carrier frequencies to remove the noise associated with it. The next step is finds the peaks of the signal or local maxima, and interpolates them to create a wave. (Figure 1, plot 3) shows the signal at this stage. Next, find the local minima and mirror it over the t-axis from that point to the end of the transmission(Figure 1, plot 4).
*Partner [[Denver Lodge]]


'''''Matlab Script'''''
:*Matlab Script:
:*BSD license

<pre>
% This section highlights the code. For the entire script, use the link above.
%
% This project is written by Brian Haddad and Denver Lodge.
% This is the main script in Matlab that will call different scripts
% with more specific functionality.
%
% PSK31 was developed by Peter Martinez...
% ...</pre>

<pre> % Global Variables
%--------------------------------------------------------
message = ('Hello'); % <----- enter your message
message = [message,' ']; % Appends spaces to the end for accuracy
phrase = message;
phase = 2*pi()*rand(1); %50.000*3.14159/100;
Fs = 80000; % Sample Rate
fc = 100; % Carrier Frequency
fc1 = 4000;
n = 0.0; % Pause time (seconds)
N = 32; % wavwrite N-bit (8,16,24,32)
noise = 3*10^(-10/20) %= 10 db down
frequencychoice=2
% -----------Variables from other scripts----------------
[t,v] = encode_psk31(message,phase,Fs,fc);
[t1,v1] = encode_psk31(phrase,phase,Fs,fc1);
%[t2,v2] = encode_psk31(phrase,phase,Fs,);
%[bitstream] = demod_to_bitstream(v,Fs);
%--------------------------------------------------------
% ...</pre>
<pre> finv_spec = ifft(spec);
[z]=findfreqs(v,Fs,200,.5);
z
bandsize=140*Fs/length(spec);
z=z-bandsize/2;
z2=z+bandsize;
W=2.*[z' z2']./Fs
%use corner frequencies to filter the signal.
Wn=W(frequencychoice,:)
[b,a]=butter(3,Wn);
%[b,a]=cheby1(3,.5,Wn);
finv=filter(b,a,v);
absfinv=abs(finv);
% ...</pre>

<pre> percent=percent*100/length(bits); % Displays the percentage of accuracy
percent % from the inbits to the outbits
outbits(1:15)
make_msg(inbits)
make_msg(outbits)
t0 = 0:1/Fs:1/31.25-1/Fs;
one = ones(size(t0));
zero = cos(pi*t0*31.25);</pre>



'''''Matlab Plots'''''
:These are the plots

:Figure 1 shows the process of the decoder.
[[Image:Figure_1.png|thumb|500px|center|Figure 1]]

:Figure 2 shows he Fourier transform of the signal; first with noise, then without. These graphs help identify the carrier frequencies.
[[Image:Figure_2.png|thumb|500px|center|Figure 2]]

:Figure 3 shows that the signal being sent to the wave file by the transmitter, is the same as the one being read by the decoder.
[[Image:Figure_3.png|thumb|500px|center|Figure 3]]
'''''Results'''''
:For now, the decoder can process multiple signals that have the same message and phase. These multiple signals can be transmitted on separate carrier frequencies. Very little improvement is needed to improve the decoder so it can receive multiple messages and phases simultaneously. The decoder can easily handle 0.1 dB down noise.

'''''Special Thanks'''''
:Dr. Rob Frohne
:Dick Benson

'''''References'''''
*[[https://github.com/frohro/PSK31-Simulation-Octave-Matlab | PSK31 Simulation Octave/Matlab]]
*[[http://www.mathworks.com/matlabcentral/fileexchange/2839-psk31-model-with-symbol-timing-and-carrier-recovery | PSK31 Model with Symbol Timing and Carrier Recovery]]

Latest revision as of 19:28, 26 January 2014

Contact Info:

 Email: brianhaddad(AT)outlook(dot)com


Articles Added:


Projects

PSK31 Demodulation

Fall, 2012

Signals & Systems (ENGR 455)


PSK31 Demodulation