609 views

Uploaded by vinirox

- L09 Using Matlab Neural Networks Toolbox
- Matlab Notes
- Matlab Filters
- Dsp Lab Manual (1)
- Writing Fast MATLAB Code
- Modeling, Simulation and System Identification Using MATLAB®
- Audio Processing Using Matlab
- matlab ieee 2011 projects sBgc ( chennai, trichy)
- An Introduction to Digital Image Processing With Matlab
- Dspa Lab Manual
- Sampling & Quantization
- image quantization
- Dsp June 2012
- bscit-sem-5-6
- SR 350 Quick User Guide
- Implementation of Digital Filters in Programmable Logic
- Simulink® PLC Coder™ User’s Guide
- Syllabus Ece7
- 7thsemece
- 33. M.E.VLSI Design

You are on page 1of 37

1

OBJECT: Study of MATLAB and its tools

What Is MATLAB?

MATLAB is a high-performance language for technical computing. It integrates computation,

visualization, and programming in an easy-to-use environment where problems and solutions are

expressed in familiar mathematical notation. The name MATLAB stands for matrix laboratory.

Math and computation

Algorithm development

Data acquisition

Modeling, simulation, and prototyping

Data analysis, exploration, and visualization

Scientific and engineering graphics

Application development, including graphical user interface building

MATLAB is an interactive system whose basic data element is an array that does not require

dimensioning. This allows you to solve many technical computing problems, especially those

with matrix and vector formulations, in a fraction of the time it would take to write a program in

a scalar non-interactive language such as C or Fortran. MATLAB was originally written to

provide easy access to matrix software developed by the LINPACK and EISPACK projects.

Today, MATLAB engines incorporate the LAPACK and BLAS libraries, embedding the state of

the art in software for matrix computation.

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 large and complex application programs.

MATLAB Documentation

MATLAB provides extensive documentation, in both printable and HTML format, to help you

learn about and use all of its features. If you are a new user, start with this Getting Started book.

It covers all the primary MATLAB features at a high level, including many examples. To view

the online documentation, select MATLAB Help from the Help menu in MATLAB. Online help

appears in the Help browser, providing task-oriented and reference information about MATLAB

features.

1

The MATLAB documentation is organized into these main topics:

Desktop Tools and Development Environment — Startup and shutdown, the desktop, and

other tools that help you use MATLAB.

Analysis — Data analysis, including data fitting, Fourier analysis, and time-series tools.

Programming — The MATLAB language and how to develop MATLAB applications Graphics

Tools and techniques for plotting, graph annotation, printing, and programming

with Handle Graphics®3-D.

Visualization — Visualizing surface and volume data, transparency, and viewing and lighting

techniques creating.

Graphical User Interfaces — GUI-building tools and how to write callback functions External

Interfaces — MEX-files, the MATLAB engine, and interfacing to Java, COM, and the serial

port.

functions:

Functions — By Category —Lists all MATLAB functions grouped into categories Handle

Graphics

C and Fortran API Reference — Covers those functions used by the MATLAB external

interfaces, providing information on syntax in the calling language, description, arguments,

return values, and examples

Examples — An index of examples included in the documentation Release

2

Signal Processing Blockset

Signal Processing Blockset is a tool for digital signal processing algorithm simulation and code

generation. It adds frame-based processing to the Simulink® environment. Signal Processing

Blockset is made up of block libraries containing signal processing, linear algebra, and matrix

math blocks. All of the blocks support double- and single-precision floating-point data types.

Most blocks also support fixed-point and integer data types when you also have Simulink Fixed

Point. You can interconnect Signal Processing Blockset blocks to create sophisticated models

capable of simulating operations such as speech and audio processing, wireless digital

communications, radar/sonar, and medical electronics.Signal Processing Blockset requires

Simulink, a tool for simulating dynamic systems. Simulink is a model definition environment.

Use Simulink blocks to create a block diagram that represents the computations of your system

or application. Simulink is also a model simulation environment. Run the block diagram to see

how your system behaves. All of the blocks in Signal Processing Blockset are designed for use

with the blocks in the Simulink libraries. If you are new to Simulink, read Getting Started with

Simulink to better understand its functionality. You can use Signal Processing Blockset and

Simulink to develop your signal processing concepts and to efficiently revise and test these

concepts until your design is production-ready. You can also use Signal Processing Blockset in

conjunction with Real-Time Workshop® to automatically generate code for real-time execution

on DSP hardware.

Required Products

Signal Processing Blockset is part of a family of products from The MathWorks. You need to

install the following products to use Signal Processing Blockset:

MATLAB

Simulink

Signal Processing Toolbox

MATLAB

You can use MATLAB to open model files and view Signal Processing Blockset demos. You

can import signal values from the MATLAB workspace into signal processing models and

export signal values from signal processing models to the MATLAB workspace.

Simulink

Simulink provides an environment that enables you to create a block diagram to model your

physical system. You can create these block diagrams by connecting blocks and using graphical

user interfaces (GUIs) to edit block parameters.

Signal Processing Toolbox provides basic filter capabilities. You can design and implement

filters using the Filter Design and Analysis Tool (FDA Tool) and use them in your signal

processing models.

3

Blocks — By Category

Estimation : Perform spectrum estimates a autoregressive -modeling

Filtering : Design, create, and work with filters

Math Functions : Perform linear algebra and basic math calculations

Quantizers : Design and implement quantization schemes

Signal Management : Perform basic signal processing operations

Signal Operations : Control signal attributes, buffer signals, and index signals

Signal Processing Sinks : View or log signals

Signal Processing Sources : Generate discrete-time signals

Statistics : Perform statistical computations on signals

Transforms : Compute transforms

Estimation:

estimates

Linear Prediction:

Autocorrelation LPC Determine coefficients of Nth-order forward linear

predictors

recursion

pairs or line spectral frequencies

coefficients or cepstral coefficients to linear

prediction coefficients

coefficients or reflection coefficients to linear

prediction coefficients

4

Parametric Estimation

parameters using Burg method

parameters using Covariance method

parameters using modified covariance method

parameters using Yule-Walker method

Method

covariance method

periodogram method

modified covariance method

Yule-Walker autoregressive (AR) method

Filtering

Filter Design Toolbox Design and implement single- and multi-rate FIR and

IIR filters

5

Adaptive Filters

Block LMS Filter Compute filtered output, filter error, and filter weights for given

input and desired signal using Block LMS adaptive filter algorithm

Fast Block LMS Filter Compute filtered output, filter error, and filter weights for given

input and desired signal using Fast Block LMS adaptive filter

algorithm

Kalman Adaptive Filter Compute filter estimates for inputs using Kalman adaptive filter

algorithm

LMS Filter Compute filtered output, filter error, and filter weights for given

input and desired signal using LMS adaptive filter algorithm

RLS Filter Compute filtered output, filter error, and filter weights for given

input and desired signal using RLS adaptive filter algorithm

6

Filter Designs

Digital Filter Filter each channel of input over time using static or

time-varying digital filter implementations

Digital Filter Design Design and implement digital FIR and IIR filters

block or Sum gain, and Delay blocks

filtering

filtering

Multirate Filters

Dyadic Analysis Filter Bank Decompose signals into sub-bands with smaller bandwidths

and slower sample rates

Dyadic Synthesis Filter Bank Reconstruct signals from sub-bands with smaller bandwidths

and slower sample rates

Two-Channel Analysis Subband Filter Decompose signal into high-frequency subband and low-

frequency Subband

Two-Channel Synthesis Subband Filter Reconstruct signal from high-frequency subband and low-

frequency subband

Quantizers

Scalar Quantizer Decoder Convert each index value into quantized output value

Scalar Quantizer Design Start Scalar Quantizer Design Tool (SQDTool) to design

scalar quantizer using Lloyd algorithm

7

Scalar Quantizer Encoder Encode each input value by associating it with index

value of quantization region

output

given, zero-based index value

Vector Quantizer Design Design vector quantizer using Vector Quantizer Design

Tool (VQD Tool)

Vector Quantizer Encoder For given input, find index of nearest codeword based on

Euclidean or weighted Euclidean distance measure

Signal Management

buffering

Signal Operations

Constant Ramp Generate ramp signal with length based on input dimensions

frames

values

minimum or maximum

8

Repeat Resample input at higher rate by repeating values

Triggered Signal From Workspace Import signal samples from MATLAB® workspace when

triggered

periods

Variable Integer Delay Delay input by time-varying integer number of sample periods

Zero Crossing Count number of times signal crosses zero in single time step

To Multimedia File Write video frames and/or audio samples to multimedia file

To Wave File Write audio data to file in Microsoft Wave (.wav) format

defined data

9

Signal Processing Sources

From Audio Device Read audio data from computer's audio device

From Multimedia File Read video frames and/or audio samples from compressed

multimedia file

From Wave File Read audio data from Microsoft Wave (.wav) file

Identity Matrix Generate matrix with ones on main diagonal and zeros elsewhere

N-Sample Enable Output ones or zeros for specified number of sample times

Statistics

10

Math Functions

processing applications

Transforms

fast Fourier transform (FFT)

method

RESULT:

We can say that MATLAB is a right hand of designs in engineering. It is very

helpful to study the various systems before practical implementation on them.

11

ASSIGNMENT NO. 2

OBJECT: Realizing a given block diagram having multiplier,

adder/subtractor and system (discrete or continuous with given impulse

response. Calculating output for given input

In Multiplier Block:

DSP constant: 20

Sine Wave Amplitude: 0.1

12

Adder block

In Adder Block:

DSP constant: 1

Sine Wave Amplitude: 1

13

Subtractor block

In Subtractor block:

DSP constant: 1

Sine Wave Amplitude: 1

14

Division block

In Division Block:

Sine Wave Amplitude: 20

DSP Constant: 20

adder/subtractor and system (discrete or continuous with given impulse response).

15

ASSIGNMENT NO. 3

OBJECT: To simulate the transmitter and receiver for BPSK.

PN Sequence:

1000011

Sine wave:

Amplitude: 1

Frequency: 10 Hz

Cutoff frequency of low pass filter: 10Hz

16

2nd order filter o/p

17

ASSIGNMENT NO. 4

OBJECT: To generate waveform (sine, cosine, square, triangular).

Cosine Wave:

clc;

clear all;

close all;

f=input('enter frequency');

timeperiod=1/f;

a=1;

t=0:0.001:2;

y=a*cos(2*pi*f*t);

plot(t,y);

Enter frequency>> 1

Cos Wave

18

Sine Wave:

clc;

clear all;

close all;

f=input('enter frequency');

timeperiod=1/f;

a=1;

t=0:0.001:2;

y=a*sin(2*pi*f*t);

plot(t,y);

Sine Wave

19

Square Wave:

clc;

clear all;

close all;

t=0:.01:2;

n=input('enter n');

f=input('enter frequency');

y=0;

for s=1:n

y=y+sin(2*pi*f*(2*s-1)*t)/(pi*(2*s-1));

s=s+1;

end

plot(t,y);

Enter n >>200

Enter frequency>> 1

Square Wave

20

Triangular Wave:

clc;

clear all;

close all;

t=0:.01:2;

n=input('enter n');

f=input('enter frequency');

y=0;

for s=1:n

a=[8/(pi.^2)]*[(-1).^(0.5*(s-1))/(s.^2);

y=y+a*sin(2*s*pi*f*t);

s=s+1;

end

plot(t,y);

Enter n >>200

Enter frequency >>1

Triangular Wave

21

ASSIGNMENT NO.5

OBJECT: To simulate the following Windows at different window

length.

1. Rectangular

2. Hanning

3. Hamming

4. Blackman

1. Blackman window

22

(b) Window length=51

23

2. Rectangular window

24

(c) Window length=101

3. Hamming window

(a) Window length=31

25

(b) Window length=51

26

4. Hanning window

(a) Window length=31

27

(c) Window length=101

length.

28

ASSIGNMENT NO. 6

OBJECT: To design IIR low pass butterworth filter.

clc;

clear all;

close all;

format long;

rp=input('enter the passband ripple');

rs=input('enter the stopband ripple');

wp=input('enter the passband frequency');

ws=input('enter the stopband frequency ');

fs=input('enter the sampling frequency');

w1=2*wp/fs;

w2=2*ws/fs;

[n,wn]=buttord(w1,w2,rp,rs);

[b,a]=butter(n,wn);

w=0:.01:pi;

[h,om]=freqz(b,a,w);

m=20*log10(abs(h));

an=angle(h);

subplot(2,1,1);

plot(om/pi,m);

ylabel('gain in db--->');

xlabel('normalised frequency--->');

subplot(2,1,2);

plot(om/pi,an);

ylabel('phase in radians--->');

xlabel('normalised frequency--->');

enter the stopband ripple 50

enter the passband frequency 1200

enter the stopband frequency 2400

enter the sampling frequency 10000

29

RESULT: We have designed IIR low pass butterworth filter.

30

ASSIGNMENT NO. 7

OBJECT: To design IIR high pass butterworth filter.

clc;

clear all;

close all;

format long;

rp=input('enter the passband ripple');

rs=input('enter the stopband ripple');

wp=input('enter the passband frequency');

ws=input('enter the stopband frequency ');

fs=input('enter the sampling frequency');

w1=2*wp/fs;

w2=2*ws/fs;

[n,wn]=buttord(w1,w2,rp,rs);

[b,a]=butter(n,wn,'high');

w=0:.01:pi;

[h,om]=freqz(b,a,w);

m=20*log10(abs(h));

an=angle(h);

subplot(2,1,1);

plot(om/pi,m);

ylabel('gain in db--->');

xlabel('normalised frequency--->');

subplot(2,1,2);

plot(om/pi,an);

ylabel('phase in radians--->');

xlabel('normalised frequency--->');

enter the stopband ripple 50

enter the passband frequency 1200

enter the stopband frequency 2400

enter the sampling frequency 10000

31

RESULT: We have designed IIR high pass butterworth filter.

32

ASSIGNMENT NO. 8

OBJECT: To design FIR low pass and high pass filters.

clc;

clear all;

close all;

b=fir1(50,0.48,'low');

freqz(b,1,512);

33

FIR high pass filter

clc;

clear all;

close all;

b=fir1(50,0.48,'high');

freqz(b,1,512);

34

RESULT: We have designed FIR low pass and high pass filter.

35

ASSIGNMENT NO. 9

OBJECT: To find the Linear convolution of two sequences.

Programming:

clc;

clear all;

close all;

x=input('enter first sequence');

y=input('enter second sequence');

subplot(3,1,1);

stem(x);

subplot(3,1,2);

stem(y);

z=conv(x,y);

subplot(3,1,3);

stem(z);

enter second sequence>> [1 2 3]

36

ASSIGNMENT NO. 10

OBJECT: To find the Circular convolution of two sequences.

Programming:

clc;

clear all;

close all;

x=input('enter first sequence');

y=input('enter second sequence');

subplot(3,1,1);

stem(x);

subplot(3,1,2);

stem(y);

z=x*y;

subplot(3,1,3);

stem(z);

enter second sequence>> [1 ; 2 ; 3 ; 4 ; 5]

37

- L09 Using Matlab Neural Networks ToolboxUploaded byLakmalWeerasinghe
- Matlab NotesUploaded bychandra sekhar
- Matlab FiltersUploaded byDebasish Deka
- Dsp Lab Manual (1)Uploaded byapi-26783388
- Writing Fast MATLAB CodeUploaded bysir_jon43
- Modeling, Simulation and System Identification Using MATLAB®Uploaded byMohsensor
- Audio Processing Using MatlabUploaded byYogyogyog Patel
- matlab ieee 2011 projects sBgc ( chennai, trichy)Uploaded bysathish20059
- An Introduction to Digital Image Processing With MatlabUploaded byitssiraj
- Dspa Lab ManualUploaded byPonty Prasad
- Sampling & QuantizationUploaded byapi-3819017
- image quantizationUploaded bydeeptakshd
- Dsp June 2012Uploaded bygobichand7
- bscit-sem-5-6Uploaded byNawab Hacker
- SR 350 Quick User GuideUploaded byAnonymous q8EusUC
- Implementation of Digital Filters in Programmable LogicUploaded byanteys
- Simulink® PLC Coder™ User’s GuideUploaded byVictor Colpo Navarrete
- Syllabus Ece7Uploaded byShubhendu Pandey
- 7thsemeceUploaded byRajeevRaiBhatia
- 33. M.E.VLSI DesignUploaded byThahsin Thahir
- Newsletter Hardware 02Uploaded byJuan Hincapie
- Dsp320 Experimental ManualUploaded byKsrinivas Rao
- Swept vs FftUploaded byAnonymous NzGbEc1Jyq
- Lab5Uploaded byShreyash Sill
- Solution Final Sem1 0809Uploaded byBink Bonk
- Matlab_intro2Uploaded byNaeem Gul
- ELCE401 Course Information for Students-Fall 2014Uploaded bylulu1990
- FamUploaded byarun@1984
- Comparative Analysis of Noise Signal on Application of FIR Filter 1Uploaded byInternational Journal of Innovative Science and Research Technology
- A High-Performance FIR Filter Architecture for Fixed and Reconfigurable Applications - 2016Uploaded bymtechprojects

- G140 DRIVERS E-ME-TUploaded byjroman33
- FC-PH-3_9.1Uploaded bytlidia
- Panasonic kxtg3411bxh service manualUploaded byAman
- Electro Magnetic Waves and Transmission LinesUploaded bymnsuryasandeep
- SLV-L49_XUploaded bylondon335
- 7520mk1opsman Dale 7500Uploaded byArturo Marcos Garcia
- HY-LCT-MANUAL.pdfUploaded byNebojsa Arsenijevic
- Chapter 10 Information and Forward Error Correction StudentsUploaded byFarooq Bushnaq
- 487E_PF00168Uploaded byPandiyan
- meggerUploaded bylovy85
- 8315faUploaded bytanmaysutaria
- 33-240 ControlExperiments LabVIEWUploaded byManasiSarkar
- Zte Bts ManualUploaded byDiwakar Mishra
- Datasheet_80C85_(Oki).pdfUploaded byJosé Adelino
- TOP209.pdfUploaded byguiodaniel
- PF KFD2 DWB Ex1.D Under Over Speed MonitorUploaded byNC
- 16 MarksUploaded byzgxfsbjbn
- CDM-625 Advanced Satellite Modem UpdateUploaded byMohammed Albagir
- Interfacing of 8V Hall Effect Sensor With Microcontroller to Measure RPM - Electrical Engineering Stack ExchangeUploaded byDiyaNegi
- Tm500 Lte-A 3gpp Lte TestUploaded bySmith Kumar
- SATELLITE & MOBILE COMMUNICATIONUploaded byLizy Abraham
- ReleaseNotes MasterUploaded bybelhadj39
- Samsung SV-DVD440Uploaded byvideoson
- 0502 Cutler 36Uploaded byDevRishi C. Vijan
- 73335908 3G Radio Network Planning Guideline RAS06 RU10 v 1 0Uploaded byRadiowiec
- DiodeUploaded byPaul Adrian Pua
- hw4aUploaded byBelayneh Tadesse
- Home-Brew Spectrum AnalyzerUploaded byStarLink1
- APB505_091026Uploaded byjennymika
- Mcb Cap SwitchingUploaded bytceterex