SERVFORU

Latest Post

Analysis of the Effect of Vignetting on MIMO Optical Wireless Systems Using Spatial OFDM

Abstract—The performance of pixelated multiple-input multiple output optical wireless communication systems can be impaired by vignetting, which is the gradual fall-off in illumination at the edges of a received image. This paper investigates the effect of vignetting for a pixelated system using spatial orthogonal frequency division multiplexing (OFDM). Our analysis shows that vignetting causes attenuation and intercarrier interference (ICI) in the spatial frequency domain. MATLAB simulations indicate that for a given constellation size, spatial asymmetrically clipped optical OFDM (SACO-OFDM) is more robust to vignetting than spatial dc biased opticalOFDM (SDCO-OFDM).Moreover, for the case of SDCO-OFDM, the very large zeroth subcarrier causes severe ICI in its neighbourhood causing flattening of the bit error rate (BER) curves. We show that this BER floor can be eliminated by leaving some of the lower spatial frequency subcarriers unused. The BER performance can also be improved by applying a vignetting estimation and equalization scheme. Finally, it is shown that equalized SACO-OFDM with 16-QAM has the same overall data rate as equalized SDCO-OFDM using 4-QAM, but requires less optical power.



Block diagram of a spatial OFDM system



                     Illustration of a pixelated MIMO wireless communication system



CONTACT FOR PROJECTS 
 

Hard Reset and Soft Reset for Nokia Lumia 930 Lumia 630



If you simply want to return phone to factory status, just go to 

Settings -> About, and choose Reset Your Phone.


 And if your phone is stuck when using some applications like whatsapp the phone may get hang this time use the soft reset expained below


SOFT RESET for Lumia 930,(Lumia 900,Lumia 920
  • Press and hold the volume keys, power button and camera together for 3-5 seconds
  • The phone should soft-reset .  some phones have 3 vibrations 
This option restores the .ini files from the ROM. Does not erase data (photos, videos, documents) or applications from a third party.
 
Lumia 630,Lumia 625
  • Press and hold the volume keys and power button together for 3-5 seconds
  • The phone should soft-reset

In some phones press and hold the POWER BUTTON FOR 10 Seconds
 

HOTSPOT Wi-Fi share with Android Devices from Linux Mint 17 Laptops



This is a quick tip to make your laptop as wi-fi hotspot . some people using ap-hotspot which doesnt work for me , so i found this new method which works pretty fine for me


Follow the steps

1.Open Terminal
2. run the command $ sudo synaptic

3 in synaptic search for plasma-nm




4. right click on the plasma-nm and mark for installation 

5. Afrer installation finished use Alt + f2


kde-nm-connection-editor

6. select wifi(shared) From the connection manager window

configure with custom names and wPA2 passkeys 




 

Edge Detection Technique by Fuzzy Logic CLA and Canny Edge Detector u sing Fuzzy Image Processing

 
Download Full paper at IJRITCC
 
Edge detection in an image is an major issue in image processing.Many hidden objects can be identified using edge detection which gives major clue in identifying actual truth behind the images. In this paper, double thresholding method of edge detection along with canny edge detector is used to identify the small objects in an images.Here threshold plays a major role which extracts the clear image from unclear picture 
 
CANNY EDGE DETECTION USING FUSSY LOGIC
 
 
Conclusion : 
 
Because of the uncertainties that exist in many aspects of image processing  , and as image are always dynamic , fuzzy processing is desirable . These uncertainties include additive and non- additive noise in low level image processing , imprecision in the assumptions underlying the algorithms , and  ambiguities in interpretation during high level image processing . For the common process of edge detection usually models edges as intensity ridges . Finally by increasing the threshold value greater than 50 and contrast can be improved . 
 
And here is the full program in matlab  for the same 
 
**************************************************
 
%%Start of coding, Symbols have their usual meaning 

%% Input Image 
clear all;
clc;
A=[];
piA=[];
%Using 16 fuzzy edge templets that show the possible direction of the edge
%s in the image and then calculating the divergence between the origin
%image and the 16 fuzzy templets.

%Take any one example and uncomment it ;
%Reading the pixel of the image using imread function of the matlab
% %for rice image
%  III = rgb2gray(imread('rice.tif'));%name of the image
% II = imcrop(III,[80 30 240 200]);

 %III = rgb2gray(imread('self_fig.tif'));%name of the image
%II = imcrop(III,[50 40 650 400]);
 III = rgb2gray(imread('canny1.tif'));%name of the image
 II = imcrop(III,[5 5 560 450]);
%%For Tree image;
 %III = rgb2gray(imread('1.2.03.tiff'));%name of the image
% %II = imcrop(III,[35 94 430 355]);

  %III = imread('1.4.09.tiff');%name of the image
% %For lena photo
% III = rgb2gray(imread('lena.tiff'));%name of the image
%  II = imcrop(III,[35 94 430 355]);

I = double(II);
[r,k] = size(I);%no of row and column is I

%% Selection of the 16 fuzzy templets
a=0.3; b=0.8;
t1 = [a a a; 0 0 0; b b b];
t2 = [a a b; a b 0; b 0 0];
t3 = [b b b; 0 0 0; a a a];
t4 = [b a a; 0 b a; 0 0 b];
t5 = [b a 0;b a 0; b a 0];
t6 = [a 0 b;a 0 b; a 0 b];
t7 = [0 0 0; b b b; a a a];
t8 = [0 b a; 0 b a; 0 b a];
t9 = [a a a; b b b;0 0 0]; 
t10 = [a b 0; a b 0;a b 0];
t11 = [0 0 0; a a a;b b b];
t12 = [0 a b; 0 a b; 0 a b];
t13 = [b b b; a a a; 0 0 0];
t14 = [b 0 a; b 0 a; b 0 a];
t15 = [b 0 0; b 0 a; a a b];
t16 = [0 0 b; 0 b a; b a a];

%% Initization of algo
xmax = max(max(max(I)));%maximum pixel/element of the image;
%converting into the fuzzy domain from the original image;
fim = I/xmax;%fim is the image data of the input image in the fuzzy domain,all value of the fim in the interval of [0 1];
%initializing the edge image as zeros matrix i.e black box;
fedgeim = zeros(r,k);%in fuzzy domain
%Increaing the boreder line of the iamge i.e to increase the row and column
%by 2 in the first and last by taking the mirror image of the immediate
%existing rows and columns respectively;
r1 = fim(2,:);%Copy of all element in the 2nd row of fim
r2 = fim(r-1,:);
c1 = fim(:,2);
c2 = fim(:,k-1);
b1 = [0 r1 0];
b2 = [0 r2 0];
b3 = [c1 fim c2];
bfim = [b1;b3;b2];%bfim = Border fuzzy image matix
bfim(1,1) = fim(1,1);
bfim(r+2, k+2) = fim(r,k);
bfim(1,k+2) = fim(1,k);
bfim(r+2,1) = fim(r,1);


%finding Hesitation degree or intuitionstic fuzzy index
%c = input("Enter the value of pi  ");
c= 0.2;
pibfim = c*(1-bfim);
pit1 = c*(1-t1);pit2 = c*(1-t2);pit3 = c*(1-t3);pit4 = c*(1-t4);pit5 = c*(1-t5);pit6 = c*(1-t6);pit7 = c*(1-t7);
pit8 = c*(1-t8);pit9 = c*(1-t9);pit10 = c*(1-t10);pit11 = c*(1-t11);pit12 = c*(1-t12);pit13 = c*(1-t13);
pit14 = c*(1-t14);pit15 = c*(1-t15);pit16 = c*(1-t16);

%Calculation of the maximum of the divergance value between the 16 templets
%and the original image of the same size let the original image denoted by
%A this A arew formed by taking the 3x3 matrix in the border matix i.e from
%bfim
%Considering the fuzzy templats as mask of size 3x3 and then we will slide
%this matix  in the fuzzy matrix i.e in the fim not inj the bfim
for i = 2:r+1
    for j = 2:k+1
        A = [bfim(i-1,j-1) bfim(i,j-1) bfim(i+1,j-1) ; bfim(i-1,j) bfim(i,j) bfim(i+1,j) ; bfim(i-1,j+1) bfim(i,j+1) bfim(i+1,j+1)];
        piA = [pibfim(i-1,j-1) pibfim(i,j-1) pibfim(i+1,j-1) ; pibfim(i-1,j) pibfim(i,j) pibfim(i+1,j) ; pibfim(i-1,j+1) pibfim(i,j+1) pibfim(i+1,j+1)];
        
        %3x3 matrix for determining the divergence with the tempelets t1,
        %t2...15,16.
        %we calculate the divergence of 3x3 matrix at a time and then
        %taking the minimun element of the matrix for all 16 fuzzy
        %tempelets;
        %d1 is a matrix of 3x3 = divergence with original matix and
        %fuzzy templets 1
        d1 = 2 - (1-A+t1).*exp(A-t1)-(1-t1+A).*exp(t1-A)+ 2- (1-(A-t1)+pit1-piA).*exp(A-t1-(pit1-piA))-(1-(pit1-piA)+A-t1).*exp(pit1-piA-(A-t1));
        min1 =min(min(d1));
        %d2 is the matix of 3x3 = divergence matix with orinigal matrix and fuzzy tempelts 2. 
        d2 = 2 - (1-A+t2).*exp(A-t2)-(1-t2+A).*exp(t2-A)+2-(1-(A-t2)+pit2-piA).*exp(A-t2-(pit2-piA))-(1-(pit2-piA)+A-t2).*exp(pit2-piA-(A-t2));
        min2 =min(min(d2));
        d3 = 2 - (1-A+t3).*exp(A-t3)-(1-t3+A).*exp(t3-A)+2-(1-(A-t3)+pit3-piA).*exp(A-t3-(pit3-piA))-(1-(pit3-piA)+A-t3).*exp(pit3-piA-(A-t3));
        min3 =min(min(d3));
        d4 = 2 - (1-A+t4).*exp(A-t4)-(1-t4+A).*exp(t4-A)+2-(1-(A-t4)+pit4-piA).*exp(A-t4-(pit4-piA))-(1-(pit4-piA)+A-t4).*exp(pit4-piA-(A-t4));
        min4 =min(min(d4));
        d5 = 2 - (1-A+t5).*exp(A-t5)-(1-t5+A).*exp(t5-A)+2-(1-(A-t5)+pit5-piA).*exp(A-t5-(pit5-piA))-(1-(pit5-piA)+A-t5).*exp(pit5-piA-(A-t5));
        min5 =min(min(d5));
        d6 = 2 - (1-A+t6).*exp(A-t6)-(1-t6+A).*exp(t6-A)+2-(1-(A-t6)+pit6-piA).*exp(A-t6-(pit6-piA))-(1-(pit6-piA)+A-t6).*exp(pit6-piA-(A-t6));
        min6 =min(min(d6));
        d7 = 2 - (1-A+t7).*exp(A-t7)-(1-t7+A).*exp(t7-A)+2-(1-(A-t7)+pit7-piA).*exp(A-t7-(pit7-piA))-(1-(pit7-piA)+A-t7).*exp(pit7-piA-(A-t7));
        min7 =min(min(d7));
        d8 = 2 - (1-A+t8).*exp(A-t8)-(1-t8+A).*exp(t8-A)+2-(1-(A-t8)+pit8-piA).*exp(A-t8-(pit8-piA))-(1-(pit8-piA)+A-t8).*exp(pit8-piA-(A-t8));
        min8 =min(min(d8));
        d9 = 2 - (1-A+t9).*exp(A-t9)-(1-t9+A).*exp(t9-A)+2-(1-(A-t9)+pit9-piA).*exp(A-t9-(pit9-piA))-(1-(pit9-piA)+A-t9).*exp(pit9-piA-(A-t9));
        min9 =min(min(d9));
        d10 = 2 - (1-A+t10).*exp(A-t10)-(1-t10+A).*exp(t10-A)+2-(1-(A-t10)+pit10-piA).*exp(A-t10-(pit10-piA))-(1-(pit10-piA)+A-t10).*exp(pit10-piA-(A-t10));
        min10 =min(min(d10));
        d11 = 2 - (1-A+t11).*exp(A-t11)-(1-t11+A).*exp(t11-A)+2-(1-(A-t11)+pit11-piA).*exp(A-t11-(pit11-piA))-(1-(pit11-piA)+A-t11).*exp(pit11-piA-(A-t11));
        min11 =min(min(d11));
        d12 = 2 - (1-A+t12).*exp(A-t12)-(1-t12+A).*exp(t12-A)+2-(1-(A-t12)+pit12-piA).*exp(A-t12-(pit12-piA))-(1-(pit12-piA)+A-t12).*exp(pit12-piA-(A-t12));
        min12 =min(min(d12));
        d13 = 2 - (1-A+t13).*exp(A-t13)-(1-t13+A).*exp(t13-A)+2-(1-(A-t13)+pit13-piA).*exp(A-t13-(pit13-piA))-(1-(pit13-piA)+A-t13).*exp(pit13-piA-(A-t13));
        min13 =min(min(d13));
        d14 = 2 - (1-A+t14).*exp(A-t14)-(1-t14+A).*exp(t14-A)+2-(1-(A-t14)+pit14-piA).*exp(A-t14-(pit14-piA))-(1-(pit14-piA)+A-t14).*exp(pit14-piA-(A-t14));
        min14 =min(min(d14));
        d15 = 2 - (1-A+t15).*exp(A-t15)-(1-t15+A).*exp(t15-A)+2-(1-(A-t15)+pit15-piA).*exp(A-t15-(pit15-piA))-(1-(pit15-piA)+A-t15).*exp(pit15-piA-(A-t15));
        min15 =min(min(d15));
        %d16 is the matix of 3x3 = divergence matix with orinigal matrix and
        %fuzzy tempelts 16.
        d16 = 2 - (1-A+t16).*exp(A-t16)-(1-t16+A).*exp(t16-A)+2-(1-(A-t16)+pit16-piA).*exp(A-t16-(pit16-piA))-(1-(pit16-piA)+A-t16).*exp(pit16-piA-(A-t16));
        min16 =min(min(d16));
        %Selecting the minimun divergence among the 16 divergence values
        %and is positioned at the center of the templets position for the
        %edge iamge i.e in edgeim.
        dd = [min1 min2 min3 min4 min5 min6 min7 min8 min9 min10 min11 min12 min13 min14 min15 min16];
        fedgeim(i-1,j-1) = max(dd);
    end
end
%We wil get the edge image in the fuzzy doamin as edgeim matrix So we have
%to tranforming back in the image pixel domain i.e in the intercal [1
% 255] domain 
fedgeimmax = max(max(fedgeim));
edgeim = double((1/fedgeimmax)*(fedgeim));
% edgeimage = uint8(edgeim); %this is the matrix of edge in the 1-255
% figure, imshow(edgeimage);
% figure, imshow(uint8(I));
 
%% Out put
tt = 255*edgeim;
ttt = uint8(tt);
subplot(2,2,1),imshow(uint8(I))
title('original image');
%figure, imshow(ttt);
subplot(2,2,2),imshow(ttt)
title('Edge without threshold');
%Set a threshold 
for i = 1:r
    for j = 1:k
        if ttt(i,j)>45 
            ed(i,j) = 255;
        else
            ed(i,j) = 0;
        end
    end
end
subplot(2,2,3),imshow(ed);
title('After applying threshold 45');
%applying the morphological oprators of matlab i.e bwmorph
med = bwmorph(ed,'thin');
subplot(2,2,4), imshow(med);
title('after applying morphological thin fun');
 
*************************************************************
 

Turn your Social media in to Paychecks with right Social Media Optimization Strategy

Social media optimization is the process of increasing the awareness of product or service or brand or event by using social media .

Social media includes all the common Twitter,  Facebook , Linkedin , Pinterest , Blogger etc which have large content contributions . To generate the viral publicity we need a unique user generated content base

mostly all business focused on listed in Google's first page results using SEO and keyword researchs to drive traffic in to their web portals. Social media have a faster impact over people than Google . Last month traffic to Blogger was more than 220 million . So its by attracting so of that traffic surely business can achieve more



When even before starting a business people and marketers do create a Facebook Fanpage , twitter handle and Youtube channel , not all business need all these .you can do better making your own online presence which is social media friendly to linking with your products and services

Social Meida is the online version of word of mouth advertising , so by engaging with your social media can make a positive change in the customer base

Being simple the users can communicate with you , being open and honest make you as favourite to your  customers . Merge the current marketing with social media . May be some them are familiar with your existing marketing campaigns link it with social media ,

 Mostly all business have an SEO strategy to make Google's Search Engine ranking priority list . Blogging is the perfect way to optimize the content to Google . Concentrate on making contents for your blog and don't stop there . Cut short the contents or make the headlines for Facebook and twitter updates .use the same for print and email marketing

You can make announcements  via your social media , and other great way of using social media is by offers .. give massive offer announcements which will surely increase number of the customers


If need a perfect SMO strategy contact  








 

Edge Detection in Image Processing - MATLAB program

Edge detection methods for finding object boundaries in images

Edge detection is an image processing technique for finding the boundaries of objects within images. It works by detecting discontinuities in brightness. Edge detection is used for image segmentation and data extraction in areas such as image processing, computer vision, and machine vision.

Prewitt Edge Detection
sobel Edge Detection
canny Edge Detection
log Edge Detection
robert Edge Detection

here is the program for the above edge detections 
 

Digital Steganography: Hiding Data within Data - MATLAB Program

Uses of Steganography

Steganography is a means of storing information in a way that hides that information’s existence. Paired with existing communication methods, steganography can be used to carry out hidden exchanges. Governments are interested in two types of hidden communications: those that support national security and those that do not. Digital steganography provides vast potential for both types. Businesses may have similar concerns regarding trade secrets or new product information. Avoiding communication in well-known forms greatly reduces the risk of information being leaked in transit.

Images as Carriers
Images are a good medium for hiding data (for details, see Pan, Chen, and Tseng 3 ). The more detailed an image, the fewer constraints there are on how much data it can hide before it becomes suspect. The JPHide/JPSeek package (http://linux01.gwdg.de/~alatham/stego.html) uses the coefficients in a JPEG to hide information. A newer method (http://www.know.comp.kyutech.ac.jp/BPCSe/BPCSe-principle.html) embeds data in visually insignificant parts of an image. Both of these methods alter the image; however, you can explore image degradation using different images and messages of varying length. An alternative, specific to GIF images, is to manipulate an image’s palette in order to hide data. Gifshuffle (http://www.darkside.com.au/gifshuffle/) does not alter the image itself in any visible way; rather, it permutes a GIF image’s color map, leaving the original image completely intact


Here is the matlab code for stegnography . both encode and decode 

download it from github https://github.com/ebine/stegnography/


 

Efficient Dilation, Erosion, Opening, and Closing Algorithms in MATLAB

Abstract 
We propose an efficient and deterministic algorithm for computing the one-dimensional dilation and erosion (max and min) sliding window filters. For a p-element sliding window, our algorithm computes the 1D filter using 1:5 þ oð1Þ comparisons per sample point. Our algorithm constitutes a deterministic improvement over the best previously known such algorithm, independently developed by van Herk [25] and by Gil and Werman [12] (the HGW algorithm). Also, the results presented in this paper constitute an improvement over the Gevorkian et al. [9] (GAA) variant of the HGW algorithm. The improvement over the GAA variant is also in the computation model. The GAA algorithm makes the assumption that the input is independently and identically distributed (the i.i.d. assumption), whereas our main result is deterministic. We also deal with the problem of computing the dilation and erosion filters simultaneously, as required, e.g., for computing the unbiased morphological edge. In the case of i.i.d. inputs, we show that this simultaneous computation can be done more efficiently then separately computing each. We then turn to the opening filter, defined as the application of the min filter to the max filter and give an efficient algorithm for its computation. Specifically, this algorithm is only slightly slower than the computation of just the max filter. The improved algorithms are readily generalized to two dimensions (for a rectangular window), as well as to any higher finite dimension (for a hyperbox window), with the number of comparisons per window remaining constant. For the sake of concreteness, we also make a few comments on implementation considerations in a contemporary programming language.
efficient Dilation, Erosion, Opening, and Closing Algorithms
Figure : The effect of the opening (top) and closing (bottom) filters. (Original image is shown on left frame, followed by the filtered image using rectangular windows sized 2x2, 4x4, 8x8, and 16x16.)


Paper link in IEEE


IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE,
VOL. 24, NO. 12, DECEMBER 2002


Here is the MATLAB code for the same paper is availabe on git hub 

 

Hard Resets and Soft resets for your NOKIA X, Nokia Xl , Nokia X+ ANDROID Phones

Nokia adds three models in android versions Nokia X,Nokia XL,Nokia X+

1. power off your nokia x
2.now wait for 15-20 seconds
3.now press the power button you will see nokia written on screen
4.now just press the volume up button for 5-6 seconds and poof
     
you are in nokia android recovery


wipe data ,cache and all from your Nokia ANDROID smartphone
 

How to Import Google/Gmail Contacts to Nokia X,X+ and XL Nokia Android Phones Working Trick


1. First of all login to Gmail and click on Contacts at the top left side of the page.
gmail contacts
2.  Now on the menu an option is labeled as More, just click on Export.
contact export
3. You will get a pop, here just choose your contacts, and export all your contacts in vCard format.
vCard Format Gmail
4.  Now copy vCard file to your Nokia X SD card by connecting the phone to your PC.
5. Use ASTRO File manager (preinstalled) to locate the vCard file and tap to open.
6. Once you have done this, your device will start importing your Gmail contacts to your Nokia X.
 

Unroot Your Nokia X, Nokia XL , Nokia X+

First of all what you need to do for unrooting Nokia X , Nokia XL and Nokia X+ is 






1. !oot your phone again with framaroot
2.if you get two supersu then remove that pre installed one with root permission.
3.if there is only one then no problem out there just unroot your phone again with framaroot.
4.BOOM now supersu will get vanished
 

Root your nokia X+,XL,X


To Root 



1. Download the Framaroot.apk on your Nokia X, Nokia X+, or Nokia XL;


2. Use the built-in Astro file manager, and browse to the folder where you downloaded Framaroot.apk, then tap on its icon to install;
3. Upon installation, start Framaroot. There are two root exploits to choose from - "Aragorn" and “Gandalf” - tap on "Gandalf";
4. Now reboot your Nokia X, Nokia X+, or Nokia XL, and you should be rooted.

 

Fin Trends over the world , and New era of smart rings starts here

Its new era with smart rings , here the RHLvision Technologies Pvt.Ltd  introduces new gadget called fin  that you can wear on your thumb as a ring and it will make your whole palm as a gesture interface,

Its waterproof tiny flexible sized device that may be a jewellery for the next generation , and with high battery efficiency of 1 week week ,and have a micro-USB charging port .Its support cross platform over 
 Windows, MAC, iOS, Android, Windows Phones.And it open developers platform to hack and make it use for as many possibilities , to make the hands free 


“People in today’s world are becoming more busy, but still they are wasting a lot of time interacting with their smart devices,” Rohildev Nattukallingal, founder of RHL Vision Technologies, the startup behind Fin,told Mashable. “Fin removes this interaction gap by allowing users to quickly interact with those devices.”

Its there in TechCrunch Hardware battle top 15 and featured and reviewed by most of the gadget doctors and said wowww to this awesome ring ,
Fin can be get on the retail market from this year end Rohil Dev ,the youngest speaker of #MWC14 told 
its now going to showcased over here in 
GSMA Mobile World Congress 2014  and   hope they will get awesome response with the live demo  of fin , here they have their two prototypes now and testing is done at their R&D labs at Indian Telecom Innovation Hub at cochin  



Recently they achieved their goal in  http://igg.me/at/wearfin Raised of $100,000 and solding out ,place the order for yours 




 

VibeApp Hack your email contacts , Grab everything you need to know about your email contacts

I was confused always when I get emails from unknowns , i stuck at finding the sender behind the craps , now I got a simple solution and that is vibeApp

And just in a simple hover the cursor over the email adress all about the email id is listed , everything the twitter handle , facebook  , linkedin  Google+, and even a web page they are most likely to be associated with


Hello Vibe is an application that more accurate and simple to use  know about the information about the email contacts , now its available for chrome and mac

Download it and know the people behind you
http://vibeapp.co/#/home
 

LINEAR BLOCKCODES

LINEAR BLOCKCODES
AIM
To detect and correct the error accruing in the transmitted data with the help
of linear block codes.
THEORY
A code is said to be linear if any two code word in the code, can be added in module 2 arithmetic to Produce a third codeword in the code. The (n-k) bits in the remaining portion are computed from the message bits in the accordance with the prescribed encoding rule that determines a mathematical structure of the code, then use frame to get the syndrome calculation.
The hamming weight of the code vector C is defined in the number of non zero elements in the code vector. The minimum distance of the linear block code is defiend in the smallest hamming distance between any pair of code vector in code.
Algorithm

  1. Get the generator matrix value.
  2. Calculate the order of given matrix.
  3. calculate the code word.
  4. calculate the minimum ha
  5. Get the received code word.
  6. Display the hamming code
  7. Display the syndrome of the code word.
  8. Calculate the error in the bit.
  9. Display the correlated code word.

    PROGRAM
    #######################################
    clc;
    clear all;
    close all;
    %input generator matrix
    g=input('enter the generator matrix:')
    disp('G=')
    disp('the order of linear block code for given generator mathrix is:');
    [n,k]=size(transpose(g))
    for i=1:2^k
        for j=k:-1:1
            if rem(i-1,2^(-j+k+1))>=2^(-j+k)
                u(i,j)=1;
            else
                u(i,j)=0;
            end
        end
    end
    u;
    disp('the possible code word are:');
    c=rem(u*g,2);
    disp('the minimum hamming distance dmin for given block code is:');
    d_min=min(sum((c(2:2^k,:))'))
    %code word
    r=input('enter the recieved code word:');
    p=[g(:,n-k+2:n)];
    h=[transpose(p),eye(n-k)];
    disp('hamming code');
    ht=transpose(h)
    disp('syndrome of a given code word is:');
    s=rem(r*ht,2)
    for i=1:1:size(ht)
        if(ht(i,1:3)==5)
            r(i)=1-r(i);
            break;
        end
    end
    disp('the error is in bit:');
    i;
    disp('the correct codeword is:');
    r;

    ###########################################################################
    OUTPUT
    Enter the generator matrix:[1000101;0100111;0010110;0001011]
    g =1000101
    0100111
    0010110
    0001011
    G = The order of linear block code for given generator mathrix is:
    n = 7
    k = 4
    The possible code word are:
    0000000
    0001011
    0010110
    0011101
    0000111
    0101100
    0110001
    0111010
    1000100
    1001110
    1010011
    1011000
    1100010
    1101001
    1110100
    1111111
    The minimum hamming distance dmin for given block code is:
    d_min =3
    Enter the received code word:[1000100]
    r=1000100
    Hamming code
    H=
    101
    111
    110
    011
    100
    101
    001

    Syndrome of t given codeword is:
    s=001
    The error is in bit :
    i=7
    The corrected code word is : r=100010.

    Result
    Thus the error is detected and corrected n the transmitted code by using linear block codes.



 

ESTIMATION OF PERIODOGRAM

ESTIMATION OF PERIODOGRAM
AIM
To estimate the power spectral density of a given signal using periodogram
in MATLAB.
THEORY
The power spectral density (PSD) of a WSS process is the Fourier transform of the autocorrelation sequence. Periodogram is a non-parametric method to estimate PSD
() = (k)
For an autocorrelation ergodic process and an unlimited amount of data, the autocorrelation sequence may be detemined by using the time average
(k) = (n+k)x*(n)
If x(n) is only measured over a finite interval, say n=1,2,…N-1, then the autocorrelation sequence must be estimated using with a finite sum
(r) = () (n+k)x*(n)
In order to ensure that the value of x(n) that is fully outside the interval [0,N-1] are excluded and written as follows
(k) = () (n+k)x*(n) k=0,1,2….,N-1.
Taking the discrete Fourier transform of rx^(k) leads to an estimation of the power spectrum known as the periodogram.
() = (k)
The periodogram
() = ()() = ()
Where XN(ejw) is the discrete time Fourirer transform of the N-point data sequence XN(n)
() = (n) =
ALGORITHM
STEP 1: Compute the value of x.
STEP 2: Perform periodogram function for x signal.
STEP 3: Using pwelch function, smoothen the output of periodogram signal.

STEP 4: Plot the graph for input and output signal


PROGRAM
##########################################################
clc;
clear all;
close all;
fs=1000;
t=0.1:1/fs:0.3;
x=cos(2*pi*t*200)+0.1*randn(size(t));
figure(1);
plot(x);
title('input signal');
xlabel('time');
ylabel('amplitude');
figure(2);
periodogram(x,[],'one sided',512,fs);
figure(3);
pwelch(x,30,10,[],fs,'one sided');
#############################################################

RESULT
 Thus the MATLAB program to estimate the power spectral density of given signal using periodogram is executed and output is plotted.


 

SIMULATION OF BLOCK CODES HAMMING AND CYCLIC CODES

SIMULATION OF BLOCK CODES
AIM
To simulate linear block coding techniques for hamming and cyclic code using MATLAB.
THEORY
HAMMING CODES
Consider a family of (n,k) linear block codes that have the following parameters.
Block length,n=2m-1
No.of.message bits k=2m-m-1
No. of parity bits, n-k=m, where m>=3.
These are so called Hamming codes. To illustrate the relations between the minimum distance dmin and the structure of the parity check matrix H. Consider the codeword 0110100,In the matrix multiplication is done, and the non-zero elements of this codeword “shift” out the second, third and fifth column of the matrix if yielding. An important property of hamming codes is that they satisfy the condition. t=1.This means that hamming codes are single error correcting binary perfect codes.
CYCLIC CODES
Cyclic codes form a sub class of linear block codes.A binary code is said to be cyclic code,if it exhibits two fundamental properties.
  1. LINEARITY PROPERTY
The sum of two codeword is also a codeword.
  1. CYCLIC PROPERTY
Any cyclic shift of codeword is also called a codeword.


ALGORITHM
HAMMING CODE
STEP 1: Start the program
STEP 2: Assign the number of parity bits m=4
STEP 3: Calculate the block length n from m=2m-1
STEP 4: Assign the number of message bits k such that n-k=m so k=11
STEP 5: The hamming code is (5,11)
STEP 6: Obtain the input signal message randomly the input message is in binary format
STEP 7: The parity bits are calculated for input message taken.
STEP 8: The parity bits are appended along the message bit to form the codeword.
STEP 9: The codeword formed is transmitted through AWGN channel
STEP10: The received signal is then decoded to retrieve the message
STEP 11: The BER is calculated for the retrieved message
STEP 12: For the various values of the SNR and its corresponding BER,the graph is
Plotted.
CYCLIC CODE
STEP 1: Start the program.
STEP 2: Assign the block length n=7.
STEP 3: Assign the message bits,k=4.
STEP 4: The cyclic code is (7,4)
STEP 5:Generate the polynomial.
STEP 6: Obtain the input message randomly.
STEP 7: The input message is in binary format.
STEP 8: The codeword is formed by appending the parity bits with the message bits.
STEP 9: The parity bits are calculated from the generation polynomial.
STEP10: The codeword formed is transmitted through AWGN channel.
STEP11: The received signal is then decoded with the help of generator polynomial

      Knowledge to retrieve the message.

PROGRAM

HAMMING CODE 
####################################
clc;
clear all;
close all;
m=4;
n=2^m-1;
k=11;
berf=[];
for i=1:10
    b=0;
    for j=1:50
        msg=randint(500,k,[0,1]);
        code=encode(msg,n,k,'hamming/binary');
        t=0:0.1:10;
        snr=0;
        y=awgn(code,i);
        y(find(y>0))=1;
        y(find(y<0))=0;
        msgop=decode(y,n,k,'hamming/binary');
        [number,b1]=biterr(msgop,msg);
        b=b+b1;
    end
    berf(i)=b/50;
end
semilogy(1:10,berf);
title('performance analysis in awgn for hamming codes');
xlabel('snr(db)');
ylabel('BER');

#######################################################################
CYCLIC CODES

clc;
clear all;
close all;
n=7;
k=4;
genpoly=cyclpoly(n,k,'max');
berf=[];
for i=1:10
    b=0;
    for j=1:50
        msg=randint(500,k,[0,1]);
        code=encode(msg,n,k,'cyclic/binary',genpoly);
        t=0:0.1:10;
        snr=0;
        y=awgn(code,i);
        y(find(y>0))=1;
        y(find(y<0))=1;
        msgop=decode(y,n,k,'cyclic/binary',genpoly);
        [number,b1]=biterr(msgop,msg);
        b=b+b1;
    end
    berf(i)=b/50;
end
semilogy(1:10,berf);
title('performance analysis in awgn for cyclic codes');
xlabel ('snr (db)');
ylabel ('BER');

#########################################################

RESULT
Thus the linear block coding technique for hamming code and cyclic code has been simulated using MATLAB.
 
 
Support : Ebin EPhrem | Ebin Ephrem | #Gabbarism
Copyright © 2011. Services | Embedded Support | Reviews | Virtual Technologys - All Rights Reserved
Template Created by ebinephrem.com Published by Ebin Ephrem
Proudly powered by Blogger