Practical Studies Aims And Objectives Accounting Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

The transmitter in practice sends a known pattern in the data stream, so as to define the position of the start of the bit stream. This special word is known as synchronization word. There has been a lot of work done on the design of the optimal synchronization word, however this is an open ended issue which is specific to a certain environment. The length of the synchronization word is also a point of discussion in literature, but this is an established fact that with the increase of the length of the sync word a better detection of the start of the bit stream can be done. This paper compares the use of a 12-bit and 16-bit pattern for the sync word, and looks at the effect of having up to 2-bit error during the transmission. The part A of the following text investigates this further.

The Part B of this study is about the extraction of some frequency components from the summed signal. The butterworth and FIR filter are used as the candidates for the experiment. The butterworth is an Infinite impulse response filter, where as the FIR is a Finite impulse response filter. The results are presented for to give a better insight.

Methodology

The effect of the length of the synchronization symbol is studied. To start with, a signal is generated and after a certain fixed number of data pulses a set of synchronization pulses are inserted. This combined stream is then correlated to with the already known synchronization pulses to generate the position of these pulses. To make this interesting a bit is toggled in the received synchronization sequence, and then the correlation is performed. This error is taken further by introducing more than one bit errors. Finally this whole thing is examined in a critical way.

The second part is about the separation of different frequency components in a signal. For the sake of simplicity and as directed in the assignment, three different frequencies are used. These are then separated using a low pass, band pass and a high pass FIR filter. The separation through FIR is then compared with the separation using the Butterworth filter.

Results

This section is divided into two parts. In part A the results of the correlation are presented whereas in part B the filtering process and comparison is shown.

Part A:

Figure 1: output of correlator without any error is sync word, (sync word 12-bit)

Figure 2: Output of correlator with 1-bit error is sync word, (sync word length 12-bit)

Figure 3: Output of correlator with 2 bit error in sync word, (sync length 12-bit)

Figure 4: Output of correlator without any error is sync word, (sync length 16-bit)

Figure 5: Output of correlator with 1-bit error is sync length, (sync length 16-bit)

Figure 6: Output of correlator with 2-bit error, (sync length 16-bit)

Part B:

Figure 7: The waveforms of 1 kHz, 5 kHz and 10 kHz and the composite waveform

Figure 8: The composite waveform and its spectrum

Figure 9: Comparison of output after filtering through a low pass filter using FIR and butterworth filter

Figure 10: The output spectrum after filtering through the FIR filter

Figure 11: The comparison of the waveforms after filtering through the FIR and butter worth filter, used to separate 10 kHz tone

Critical Discussion of the results

Part A:

From Figure 1 to Figure 6, the part A of the assignment results are presented. In the mentioned figures the output of the correlator are presented. To start with a bit stream of 50 bits is taken. This bit stream is converted to line code in 5V and -5V. The reason for using the â€"ive amplitude to represent the 0 in here is that it helps in the correlation process. The initial size of the synchronization word is taken to be 12-bit. In Figure 1, the 12-bit synchronization is used. The output of the correlator shows a distinct peak at 37th index, which is the position of the sync word. The rest of the peaks are quite low in magnitude.

In figure 2 the received bit stream which is Tb in our case get a 1 â€" bit error in the sync word. When we correlate this with the original sync word, a distinct peak is still observable, but the margin between the adjacent peaks and the original are reduced in this case.

Taking this further and introducing a 2-bit error in the received sync word, the correlator gives a peak at 37th index but there is another equi-amplitude peak at position 40. Thus in this case the location of the sync word cannot be detected without ambiguity.

Now we consider this for a 16-bit sync word scenario and try to see the effects of the 1-bit and 2-bit errors during the transmission. Figure 4 which is without any transmission error identify the sync location with a sharp peak. In figure 5 we still get the peak at the position of the sync word, which is the 41st location. But the side peaks have gone up too and the probability of ambiguity is increased now.

In figure 6 the output of correlator after a 2-bit error during transmission is presented. The position of the sync is distinct in this case even after a 2bit error in the sync word

Part B:

The Figure 7 shows the three different tones of 1 kHz, 5 kHz and 10 kHz, and also the composite waveform is shown.

Figure 8 shows the time domain waveform and the spectrum of the composite signal. The three distinct peaks at 1kHz, 5kHz and 10kHz can be seen here. To make the things simple the peaks of the frequency component with maximum amplitude is normalized to 1V (0dB), and so are made the rest.

In figure 9 the comparison of the extraction of the 1kHz frequency component using the FIR filter and butter worth filter are presented. The results show that the peaks are extracted nearly at the same level.

In figure 10 the spectrum of the 5kHz extracted signal is presented. This spectrum is also normalized for simplicity. It can be seen that the extracted waveform do lie at 5kHz, but there is a slight rise in the side lobes.

The last figure, figure 11 compares the response of the FIR and butter worth filter used for extracting the s3 signal, which is a 10kHz tone. The extraction by both has nearly same results. However the butter worth filter promises a better stop band rejection.

Please note that in this simulation the sampling rate is taken to be 40kHz.

Conclusion

Part A:

The synchronization word can be detected well by the correlation technique; however the length of the sync word is of utmost importance. As we have observed in the simulations, the 12-bit sync word was not able to detect the toggling of two bits in the received sync word. However when we increased it to be 16-bit the performance improved and the position was detected without any ambiguity.

Part B:

The comparison of the butter worth filter with the FIR filter is presented; it is observed that there exist a huge difference between the order of the FIR and the butterworth filter. In comparison the FIR is fine with the high pass filter design. The butterworth promises a better stop band rejection, but due to the poles which exist in the butterworth , the instability is a concern which need to be taken care during the design.

Matlab Code

close all

clear all

clc

%% Part A

upsampling_ratio = 1;

% data= (randint(1,50,2)) % random bitstream of 50bits

data = [

0

1

0

1

1

1

0

1

1

0

0

1

1

0

1

0

0

1

0

1

1

1

1

1

0

0

0

1

1

1

1

1

0

0

1

1

0

0

0

1

0

0

1

0

0

1

0

0

1

1]';

x=5*data;

%% Generating the synchronization signal sync length 12 bits

sync= (2*[1 1 0 1 1 0 0 1 0 0 0 1 ] -1 )*5; % random bitstream of 50bits

%% stream

Tb = 5*(2*([x(1:(25)) sync x(25+(1:25))]/5)-1);

cor = xcorr(sync,Tb);

plot(cor((4:upsampling_ratio:length(Tb))));

title('sync without error (sync length 12bit)')

figure

% one bit error in sync

error_vec = [0 0 0 1 0 0 0 0 0 0 0 0];

sync1 = bitxor((sync/5+1)/2, error_vec)*5;

Tb = 5*(2*([x(1:(25)) sync1 x(25+(1:25))]/5)-1);

cor = xcorr(sync,Tb);

plot(cor);

title('sync with 1-bit error (sync length 12bit)')

figure

% one bit error in sync

error_vec = [0 0 0 1 0 0 0 0 0 1 0 0];

sync1 = bitxor((sync/5+1)/2, error_vec)*5;

Tb = 5*(2*([x(1:(25)) sync1 x(25+(1:25))]/5)-1);

cor = xcorr(sync,Tb);

plot(cor);

title('sync with 2-bit error (sync length 12bit)')

figure

%% Generating the synchronization signal sync length 12 bits

sync= (2*[1 1 0 1 1 0 0 1 0 0 0 1 0 1 1 0] -1 )*5; % random bitstream of 50bits

%% stream

Tb = 5*(2*([x(1:(25)) sync x(25+(1:25))]/5)-1);

cor = xcorr(sync,Tb);

plot(cor((4:upsampling_ratio:length(Tb))));

title('sync without error (sync length 16bit)')

figure

% one bit error in sync

error_vec = [0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0];

sync1 = bitxor((sync/5+1)/2, error_vec)*5;

Tb = 5*(2*([x(1:(25)) sync1 x(25+(1:25))]/5)-1);

cor = xcorr(sync,Tb);

plot(cor);

title('sync with 1-bit error (sync length 16bit)')

figure

% one bit error in sync

error_vec = [0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0];

sync1 = bitxor((sync/5+1)/2, error_vec)*5;

Tb = 5*(2*([x(1:(25)) sync1 x(25+(1:25))]/5)-1);

cor = xcorr(sync,Tb);

plot(cor);

title('sync with 2-bit error (sync length 16bit)')

% plot(stream(1:4:end))

%% Part B

Fs = 40000;

f1 = 1000;

f2 = 5000;

f3 = 10000;

s1 = 5*sin(2*pi*[0:1/Fs:400/Fs]*f1);

s2 = 3*sin(2*pi*[0:1/Fs:400/Fs]*f2);

s3 = 1*sin(2*pi*[0:1/Fs:400/Fs]*f3);

% axis([ 0 200 -2 5])

s = s1+s2+s3;

figure

subplot(4,1,1),plot(s1);

subplot(4,1,2),plot(s2);

subplot(4,1,3),plot(s3);

subplot(4,1,4),plot(s);

figure

subplot(2,1,1),plot(s);

xlabel('time (ms)');

ylabel('Amplitude (V)');

title ('the waveform');

set(gca,'XTick',0:100:400);

set(gca,'XTickLabel',{'0 ms','.25 ms','0.5 ms','0.75 ms','1 ms'});

set(gca,'YTick',-10:4:10);

set(gca,'YTickLabel',{'-10 V','6 V','-2 V','2 V','6 V','10 V'});

sig = abs(fftshift(fft(s)));

subplot(2,1,2),semilogy(sig./max(abs(sig)),'r');

title ('Composite spectrum');

set(gca,'XTick',1:50:401);

set(gca,'XTickLabel',num2str(([0:50:400]*40/400)'-20));

% set(gca,'YTick',0:100:1000);

% set(gca,'YTickLabel',num2str(([0:100:1000]/200)'));

xlabel('frequency (kHz)');

ylabel('magnitude');

figure

%% lowpass filter design to remove s1

b = fir1(20,3000/(Fs/2)); % Lowpass filter with cutoff at 3k

sig = abs(fftshift(fft(filter(b,1,s))));

semilogy(sig./max(abs(sig)),'r');

title ('Spectrum of filtered s1');

set(gca,'XTick',1:50:401);

set(gca,'XTickLabel',num2str(([0:50:400]*40/400)'-20));

legend('FIR','butterworth')

% set(gca,'YTick',0:100:1000);

% set(gca,'YTickLabel',num2str(([0:100:1000]/200)'));

xlabel('frequency (kHz)');

ylabel('magnitude');

hold on

%% butterworth filter design for s1

[b,a] = butter(20,2000/(Fs/2)); % lowpass filter with cutoff at 3k

sig = abs(fftshift(fft(filter(b,a,s))));

semilogy(sig./max(abs(sig)));

figure

%% highpass filter design to remove s2

b = fir1(40,[3000 7000]/(Fs/2)); % Highpass filter with cutoff at 3k

sig = abs(fftshift(fft(filter(b,1,s))));

semilogy(sig./max(abs(sig)),'r');

title ('Spectrum of filtered s2');

set(gca,'XTick',1:50:401);

set(gca,'XTickLabel',num2str(([0:50:400]*40/400)'-20));

legend('FIR')

%set(gca,'YTick',0:100:1000);

% set(gca,'YTickLabel',num2str(([0:100:1000]/200)'));

xlabel('frequency (kHz)');

ylabel('magnitude');

% hold on

% b = butter(7,[3000 7000]/(Fs/2)); % Highpass filter with cutoff at 3k

% sig = abs(fftshift(fft(filter(b,1,s))));

% plot(sig./max(abs(sig)));

% return

figure

%% highpass filter design to remove s3

b = fir1(40,8000/(Fs/2),'high'); % Highpass filter with cutoff at 3k

sig = abs(fftshift(fft(filter(b,1,s))));

semilogy(sig./max(abs(sig)),'r');

title ('Spectrum of filtered s3');

set(gca,'XTick',1:50:401);

set(gca,'XTickLabel',num2str(([0:50:400]*40/400)'-20));

%

% set(gca,'YTick',0:100:1000);

% set(gca,'YTickLabel',num2str(([0:100:1000]/200)'));

xlabel('frequency (kHz)');

ylabel('magnitude');

hold on

[b,a] = butter(40,8000/(Fs/2),'high'); % Highpass filter with cutoff at 3k

sig = abs(fftshift(fft(filter(b,a,s))));

semilogy(sig./max(abs(sig)));

legend('FIR','butterworth')

Writing Services

Essay Writing
Service

Find out how the very best essay writing service can help you accomplish more and achieve higher marks today.

Assignment Writing Service

From complicated assignments to tricky tasks, our experts can tackle virtually any question thrown at them.

Dissertation Writing Service

A dissertation (also known as a thesis or research project) is probably the most important piece of work for any student! From full dissertations to individual chapters, we’re on hand to support you.

Coursework Writing Service

Our expert qualified writers can help you get your coursework right first time, every time.

Dissertation Proposal Service

The first step to completing a dissertation is to create a proposal that talks about what you wish to do. Our experts can design suitable methodologies - perfect to help you get started with a dissertation.

Report Writing
Service

Reports for any audience. Perfectly structured, professionally written, and tailored to suit your exact requirements.

Essay Skeleton Answer Service

If you’re just looking for some help to get started on an essay, our outline service provides you with a perfect essay plan.

Marking & Proofreading Service

Not sure if your work is hitting the mark? Struggling to get feedback from your lecturer? Our premium marking service was created just for you - get the feedback you deserve now.

Exam Revision
Service

Exams can be one of the most stressful experiences you’ll ever have! Revision is key, and we’re here to help. With custom created revision notes and exam answers, you’ll never feel underprepared again.