Вы находитесь на странице: 1из 11

Date: __________

Expt. No. __________ Page no.______

 TITLE: Propagation of a single channel OOK signal.

 OBJECTIVE:
To propagate a single channel OOK signal within a 100 km of a fully
compensated fiber and to observe the received output signal.

 SOFTWARE:
Program code is written in Matlab/ Octave programming language. Software
used is Matlab/Octave.

 THEORY:
Fiber-optic communication is a method of transmitting information from
one place to another by sending pulses of light through an optical fiber. The light forms
an electromagnetic carrier wave that is modulated to carry information. Fiber is preferred over
electrical cabling when high bandwidth, long distance, or immunity to electromagnetic
interference are required.
Optical fiber is used by many telecommunications companies to transmit telephone signals,
Internet communication, and cable television signals.

On-off keying (OOK) denotes the simplest form of amplitude-shift


keying (ASK) modulation that represents digital data at the presence or absence of a carrier
wave. In its simplest form, the presence of a carrier for a specific duration represents a binary one,
while its absence for the same duration represents a binary zero. Some more sophisticated schemes
vary these durations to convey additional information. It is analogous to unipolar encoding line
code.

Teacher’s Signature: ________________


Date: __________

Expt. No. __________ Page no.______

MATLAB (matrix laboratory) / Octave is software featuring a high-level programming


language, primarily intended for numerical computations. MATLAB allows matrix manipulations,
plotting of functions and data, implementation of algorithms, creation of user interfaces, and
interfacing with programs written in other languages, including C, C++, C#, Java, Fortran and
Python.

Typical uses include:

 Math and computation


 Algorithm development
 Modeling, simulation, and prototyping
 Data analysis, exploration, and visualization
 Scientific and engineering graphics
 Application development, including Graphical User Interface building.

The matrix-based MATLAB language is the world's most natural way to express computational
mathematics. Built-in graphics make it easy to visualize and gain insights from data. The desktop
environment invites experimentation, exploration, and discovery.

While other programming languages usually work with numbers one at a time, MATLAB operates
on whole matrices and arrays. Language fundamentals include basic operations, such as creating
variables, array indexing, arithmetic, and data types.

The MATLAB System

The MATLAB system consists of five main parts:

The MATLAB language.

This is a high-level matrix/array language with control flow statements, functions, data
structures, input/output, and object-oriented programming features. It allows both "programming in
the small" to rapidly create quick and dirty throw-away programs, and "programming in the large"
to create complete large and complex application programs.

The MATLAB working environment.

This is the set of tools and facilities that you work with as the MATLAB user or
programmer. It includes facilities for managing the variables in your workspace and importing and
exporting data. It also includes tools for developing, managing, debugging, and profiling M-files,
MATLAB's applications.

Handle Graphics.

This is the MATLAB graphics system. It includes high-level commands for two-
dimensional and three-dimensional data visualization, image processing, animation, and
presentation graphics. It also includes low-level commands that allow you to fully customize the
appearance of graphics as well as to build complete Graphical User Interfaces on your MATLAB
applications.

Teacher’s Signature: ________________


Date: __________

Expt. No. __________ Page no.______

The MATLAB mathematical function library.

This is a vast collection of computational algorithms ranging from elementary functions


like sum, sine, cosine, and complex arithmetic, to more sophisticated functions like matrix inverse,
matrix eigenvalues, Bessel functions, and fast Fourier transforms.

The MATLAB Application Program Interface (API).

This is a library that allows you to write C and Fortran programs that interact with
MATLAB. It include facilities for calling routines from MATLAB (dynamic linking), calling
MATLAB as a computational engine, and for reading and writing MAT-files.

In this simulation experiment we used a single channel OOK signal as input to a fiber and
finally compensated the signal using a dispersion compensating fiber.

 FLOWCHART:

Teacher’s Signature: ________________


Date: __________

Expt. No. __________ Page no.______

 OUTPUT:

Number of Symbol 64.

Teacher’s Signature: ________________


Date: __________

Expt. No. __________ Page no.______

Number of Symbol 32.

Teacher’s Signature: ________________


Date: __________

Expt. No. __________ Page no.______

Din = 15 ps/nm. (Dispersion given of fiber 1)

comp.length = 0.5 * comp. fiber length (DCF fiber length)

 CONCLUSION:
Thus, we have studied and simulated the single channel OOK signal in MATLAB/
OCTAVE and observed the various waveforms.

Teacher’s Signature: ________________


Date: __________

Expt. No. __________ Page no.______

 TITLE: Digital Image Processing Using MATLAB / OCTAVE.

 OBJECTIVE:
To read and process a digital image using MATLAB/ OCTAVE.

 SOFTWARE:
Program code is written in Matlab/ Octave programming language. Software
used is Matlab/Octave.

 THEORY:

Image processing is a method to perform some operations on an image, in


order to get an enhanced image or to extract some useful information from it. It is a type of signal
processing in which input is an image and output may be image or characteristics/features
associated with that image. Nowadays, image processing is among rapidly growing technologies. It
forms core research area within engineering and computer science disciplines too.
Image processing basically includes the following three steps:

 Importing the image via image acquisition tools;


 Analysing and manipulating the image;
 Output in which result can be altered image or report that is based on image analysis.

There are two types of methods used for image processing namely, analogue and
digital image processing. Analogue image processing can be used for the hard copies like printouts
and photographs. Image analysts use various fundamentals of interpretation while using these
visual techniques.

Digital image processing techniques help in manipulation of the digital images by using
computers. As a subcategory or field of digital signal processing, digital image processing has
many advantages over analog image processing. It allows a much wider range of algorithms to be
applied to the input data and can avoid problems such as the build-up of noise and signal distortion
during processing. The three general phases that all types of data have to undergo while using
digital technique are pre-processing, enhancement, and display, information extraction.

Basic image processing with MATLAB

a. Read, write, and show image:


imread() function is used for reading image. imread() function only needs an
image file.
I = imread(‘path/filename.file_extension');

Teacher’s Signature: ________________


Date: __________

Expt. No. __________ Page no.______

imwrite() function is used to create an image. This function only requires a new
image file name with extension.

The matrix variable of image is showed using imshow() function.


b. Image mirroring:
Mirroring technique is the rotating of reversed image on the horizontal axis.
B = flip(A,dim) reverses the order of the elements in A along dimension dim.
For example, if A is a matrix, then flip(A,1)reverses the elements in each column,
and flip(A,2) reverses the elements in each row.

c. Brightness enhancement:

Brightness of an image is adjusted with adding or subtracting a certain value to gray


level of each pixel.

d. Negative:
Intensity values of image are reversed as linear for negative image.
B=imcomplement(I); complements an image I.

 CODING:

clear all;
clc;
I=imread('s.jpg'); % Read Image S
n=I+150; % Add Brightness To original Image S
m=imcomplement(I); % Complement the Image S
h=fspecial('motion',50); % Approximates the linear motion of a camera
G=imfilter(I,h,'replicate'); % Added Linear Motion To Image S
I_1=imread('v.jpg');% Read Image V
F=flipdim(I_1,2); % Mirroring the Image V
subplot(2,3,1);imshow(I);title('Original image (s)');
subplot(2,3,2);imshow(n);title('Brightness Added');
subplot(2,3,3);imshow(m);title('Negative Image');
subplot(2,3,4);imshow(G);title('Motion Blurr');
subplot(2,3,5);imshow(F);title('Mirror image (v)');
subplot(2,3,6);imshow(I_1);title('original image (v)');

Teacher’s Signature: ________________


Date: __________

Expt. No. __________ Page no.______

 FLOWCHART:

Teacher’s Signature: ________________


Date: __________

Expt. No. __________ Page no.______

 OUTPUT:

Teacher’s Signature: ________________


Date: __________

Expt. No. __________ Page no.______

 CONCLUSION:
Thus, we have studied the various tools or commands used in image processing in
MATLAB/ OCTAVE and implement those tools and processed the input images.

Teacher’s Signature: ________________