Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
26 views
DSP Lab File
DSP LAB FILE
Uploaded by
mdshahnawaz1639
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save DSP Lab File For Later
Download
Save
Save DSP Lab File For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
26 views
DSP Lab File
DSP LAB FILE
Uploaded by
mdshahnawaz1639
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save DSP Lab File For Later
Carousel Previous
Carousel Next
Save
Save DSP Lab File For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 14
Search
Fullscreen
digital Signal Processing Lab Name: Khushi Ranj Trade: GEC-29 Registration No.: 2130573 Institute: Sant Longowal Institute of Engineering and Technology Teacher In-char; “Alka Singla INDEX SL] Name of the Document [Page [Date of | Date of, | No no. | exp. | ale a [3-s UJor hs ENS > Ht ]e9 25) (1. | Introduction to MATLAB . | Generation of Discrete Time Signal \ "3 | Shifting of Signals po 19 )03/x3 | \ + | Verification of Sampling Theorem both ] in time and frequency domains, 5S. | Linear Convolution of two given sequences 6. Circular Convolution of two given __Sequences using summation formula Linear convolution from circular ‘convolution with zero padding —__ a 8. Linear and Circular Convolution by DFT land IDFT method ___ fee; [Po-?*Exp No. D0! Signa! Processing tb . ate POPC TS es To implement LP FIR filter for a given sequence |? a2 oF g Wt Ee —_[To implement HP FIR filter fora given sequence |r-34 Zo. M2 7 uy LC LE 1.Introduction to MATLAB AIM: To get familiarise with basic elements of MATLAB, MATLAB windows and general commands APPARATUS REQUIRED: Software used: Matlab Online THEORY: MATLAB stands for Matrin Laboratory is fourth generation high level programming language and interactive environment for numerical computation, visualization and programming. Desktop-basics: Desktop includes these panels: ~ Current Folder: for accessing file. ~ Command Window: Enter commands at the command line, indicated by the prompt. &) Workspace: Explore data that you create import files. As you work in MATLAB, you issue commands that create variable and call functions. For eg.- Create a variable named by typing this statement ast Matlab adds variable ‘a’ to the workspace and displays the result in the command 2" Exp No. Date:emo. Digital Signal Processing Lob . ote: PCEC-713 Example Cod clear all X= input("Enter these numbers"); SE((1)> x(3) && x(1) > X(2)) {printf ("%d is the largest number", x(1)) else if x (2) > x(3) && x(2) > x(1) fprintf ("9d is the largest number", x(2)) else fprinti("96d is the largest number", x(3)) end , Input: Enter there numbers. 123 Output: 3 is the largest number ‘Types of Files: There are of files in MATLAB three different types (2) M.files (2) MAT. Files (3) MEX. files Milles: These are standard ASCII text files with a (.m) extension to the file name. Any Program written ina MATLAB editor is saved as mJfiles, Manfiles: It provides access to any data you saved. Opening the file starts the import wizard to load the data into the matlab workspace, mexcfiles: It controls compiled executable code that exten some manner. ids MATLAB functionality in You execute these files just as you would write script program. The original code is written in either FORTRAM or C++ and compiled for a specific platform, MATLAB commands: MATLAB commands for managing a session, Variable: You can create new variable in the works pace by running MATLAB Code or RARE enter existing variables. To create new variable enter the variable name in the Command window, followed by an equal sign (=) and the value you want to assign to the variable. Ex: >>> ast peB osotot sional Processing tab : PCEC-713 ‘Command Purpose la —~*+| clears command window exist check for existence of variables global declare variable to the global Took for ‘Search for a Key word quit ‘stops MATLAB, PRECAUTIONS: 1. fix problems in code 2. View code analyzer messages 3. Check code for errors and warnings using the code analogy. 4. Enable continuous code checking RESULT: We have got familiar with the basic elements of MATLAB, Exp Mo. Date:AIM: Digital Signal Processing Lab : Exp No, PCEC TIS Date: 2.Generation of Discrete Time Signal ~ ‘To generate a discrete time signal sequence (Impulse, Unit Step, Ramp, Exponential, Sine, Cosine, Rising and decaying exponential) using MATLAB function APPARATUS REQUIRED: © Software- MATLAB THEORY: In signal processing experiments, we need the help of some fundamental signals such as impulse, unit step, ramp wave, exponential wave, sine wave, cosine wave, etc. A digital signal can be either a deterministic signal that can be predicted with certainity, or a random signal that is unpredictable. Due to ease in signal generation and need for predictability, deterministic signal can be used for system simulation studies. Standard forms of some deterministic signals that are frequently used in DSP are discussed below: . Impulse: The simplest signal is the unit impulse signal which is defined as, 6(n)=1forn=0 =Ofornz0 . Step: The general form of step function is, u(n} fornz0 =O forn<0 |. Ramp: This signal is given by, r(n)=nfornz0 =Oforn<0 . Exponential: The decaying exponential is a basic signal in DSP whose general formis, x(n) =anforalln. . Sine: A sinusoidal sequence is defined as, x(n) = sin(n) . Cosine: A cosine sequence is defined as, x(n) = cos(a) . Rising exponential: A rising exponential is given by, . . .© Digital Signol Processing Lob, : Exp Na, Digito! Signo! Processing Lob, fp h PCEC-713 8. Decaying exponenti; A decaying exponential is given by, PROCEDURE: 1. Start the MATLAB program. 2. Open new M-file 3. Typethe program 4, Save in current directory S. Compile and Run the program 6. Ifany error occurs in the program correct the error and run it again 7 8. . For the output see command window\ Figure window Stop the program. . PROGRAM & OUTPUT: delta =(n ‘stem(n, delta); title(Impulse Signal’); xlabel(‘n’); ylabel(‘Amplitude’); Unit Step Signal: = -10:10; u=(n>=0); stem(n, u); tide(Unit Step Signal’); xlabel(n); ylabel( Amplitude’);Degital Signal Processing Lab, PCECT13 . fap to. ote: Ramp Signal: n=-10:10; rent (n>=0): stem(n.r): title(‘Ramp Signal’); sdabel('n}; ylabel( Amplitude’); Exponential Signal: n=-10:10; alpha = 05: x=alpha*n: stem(n. x}: utle( Exponential Signal’): xtabel('n'): ylabel( Amplitude’); ‘Sine Signal n= 0:01:10; fel xesin(2pta): plor{n, x): dithe(Sine Signal}; {LeDPBS Spe Marreny Lod - ae Ntabel( Time’) vladei(Amplirade’}; Cosine Signal (Similar to the sine signal): R= OML10: fei; | xe cos(? pitta): Plog{a x): te(Casine Signal): i wiabel( Time): siabel[ Amplitude): Decaying Exponential Signal (Sisnilar to the exponential signal): neeaiie aipha = OS: a ep(aipha* a}Digital Signa! Processing tab . Exp No... Pac TA3 Date: plor(n, x): tide(Decaying Exponential Signal’ xtabel( Time’); ylabel Amplitude’); RESULT: Thus the MATLAB programs for functional sequence of a signal (Impulse, Unit Step, Ramp, Exponential, Sine, Cosine. Rising and Decaying exponential) using MATLAB fonction written and the results were plotted \Digitol Signal Processing Lob. : Expo. . PCEC-713 Date: 3, Shifting of Signals AIM: Write a program in MATLAB to generate and plot the sequences: (shifted signals) over the indicated interval. APPARATUS REQUIRED: Software: MATLAB . THEORY: Shifting signals in MATLAB typically involves changing the time or frequency axis of a signal to create a new version of the signal that is shifted in time or frequency. This can bbe useful in various signal processing and communication applications. ‘Time shifting involves moving a signal along the time axis. Suppose you have a signal x(t), and you want to create a shifted version of x.shifted(t), delayed by a certain amount of tine T seconds. The basic theory Involves applying a time shift operation as follows: xshifted(t) = x{t-T) Sequences given are: 1 x(n)=25(n¢2)- 6(n-4), -5
=n0) 3 SU end Problem1 Code: MATLAB Dawelprotiern | m ~ _ ee 1 } Xproblemi:2*impulse(n42)-impulse(n-4) 2 q Kusing impulse function 3 4 Ly1,n1}=impseq(-2,-5,5)5 s [y2,n2]}=impseq(4,-5,5)5 6 ye2*yl-y2; 7 | neni; & sten(n,y, filled’, black’); 3 | xlabel(‘n*);] 18 ylabel(*x(n)")5 wn title("1. output’); 12 grid on; 13 | print("-clipboard" ,*-dmeta’) i i. Digital Signal Processing Lob, . fp Wo PEC TY bate Problem? Code: MATLAD Deweppnatiern? m [I Xprobhem2:x(ny=n(u(n)-u(n-10)) +10%exp(-0.3(-10))" (uln-A8) ule 2)) 2 2b ausing untt step function 3 | nto; 4 | n2e20; 5 nemdinds 6 | xden. *(unttstepfun(O,nt,n2)-unitstapfun(1a,ni402))5 7 | xze20%exp(-0..3*(n-10)) 4 s | xSeunit stepfun(10,n1,n2) -unitatepfun(20,n1,n2)5 ° yenten2 x33 10 | stem(nsy, Filled, “black"): 21 | xlabel(*n* a2 | ylabel(‘x(n)"), a | title("2. output 24 | grid on; 35 | print (clipboard *-daeta") Problem 3 Code: BETAS Oweprstiend m : i Zx(n)ecos(0.O4nn)10.2u(n), O¢ence50 where w(n) 15 @ Gaussian Random 2 Xsequence with zero mean end unit variance 3 | 5 | itn) 40, 2*randn(size(m)); 6 7 | title( “Sequence tn Problem 3° 2 xlabel ('n"); 9 | ylabel (x(n) D5No. “_pigital Signal Processing lab. . nae Date: PCEC-713 Sequence In Problem 3 RESULT: ‘The sequences over the indicated interval are shifted and plotted. va
You might also like
DSP Lab-01
PDF
No ratings yet
DSP Lab-01
28 pages
DSP Lab Manual 2010
PDF
0% (1)
DSP Lab Manual 2010
53 pages
Lab Manual
PDF
No ratings yet
Lab Manual
40 pages
Bio-Signal Processing Lab. Lec 1
PDF
No ratings yet
Bio-Signal Processing Lab. Lec 1
36 pages
biosign nov9
PDF
No ratings yet
biosign nov9
17 pages
Digital Signal Processing Lab Manual Part 1
PDF
No ratings yet
Digital Signal Processing Lab Manual Part 1
24 pages
DSP Lab Manual - MATLAB
PDF
No ratings yet
DSP Lab Manual - MATLAB
46 pages
Lab 2
PDF
No ratings yet
Lab 2
11 pages
DSP LAB REPORT 1
PDF
No ratings yet
DSP LAB REPORT 1
14 pages
Digital Signal Processing Lab Manual
PDF
100% (1)
Digital Signal Processing Lab Manual
58 pages
DSP Lab Manual 2020
PDF
No ratings yet
DSP Lab Manual 2020
126 pages
Digital Signal Processing Lab Manual
PDF
No ratings yet
Digital Signal Processing Lab Manual
12 pages
DSP Part1.Doc
PDF
No ratings yet
DSP Part1.Doc
10 pages
ComputerExercisesDSP PDF
PDF
No ratings yet
ComputerExercisesDSP PDF
404 pages
Signals Lab Record(Mk)
PDF
No ratings yet
Signals Lab Record(Mk)
22 pages
Ec3492-Digital Signal Processing Laboratory
PDF
No ratings yet
Ec3492-Digital Signal Processing Laboratory
80 pages
Ec 6511 Digital Signal Processing Lab Manual PDF
PDF
No ratings yet
Ec 6511 Digital Signal Processing Lab Manual PDF
88 pages
Ninevah University College of Electronics Engineering Systems & Control Engineering Department SCE3201 Digital Signal Processing-I Lab
PDF
No ratings yet
Ninevah University College of Electronics Engineering Systems & Control Engineering Department SCE3201 Digital Signal Processing-I Lab
5 pages
Soft Lab - Iii Ec506
PDF
No ratings yet
Soft Lab - Iii Ec506
34 pages
DSP Lab Manual
PDF
No ratings yet
DSP Lab Manual
22 pages
Lab Manual
PDF
No ratings yet
Lab Manual
88 pages
DSP Lab1
PDF
No ratings yet
DSP Lab1
7 pages
LOKESH - DSP Practical File (251901018 ECE A)
PDF
No ratings yet
LOKESH - DSP Practical File (251901018 ECE A)
25 pages
PDF File For Oled Full Report
PDF
No ratings yet
PDF File For Oled Full Report
31 pages
Digital Signal Processing Lab Manual
PDF
No ratings yet
Digital Signal Processing Lab Manual
24 pages
Digital Signal Processing Lab Manual
PDF
No ratings yet
Digital Signal Processing Lab Manual
171 pages
DSP Lab Report11708039
PDF
No ratings yet
DSP Lab Report11708039
20 pages
Digital Signal Processing Laboratory: Experiment No.3
PDF
No ratings yet
Digital Signal Processing Laboratory: Experiment No.3
15 pages
Signals Lab Manual
PDF
No ratings yet
Signals Lab Manual
34 pages
Dsp Lab Manual 2023 (1)
PDF
No ratings yet
Dsp Lab Manual 2023 (1)
35 pages
DSP LAB File 20bec095
PDF
No ratings yet
DSP LAB File 20bec095
19 pages
Digital Signal Processing Manual
PDF
100% (1)
Digital Signal Processing Manual
106 pages
DSP Lab Manual
PDF
100% (1)
DSP Lab Manual
54 pages
Basic Signals and Systems PDF
PDF
No ratings yet
Basic Signals and Systems PDF
7 pages
Matlab Ss Soln
PDF
No ratings yet
Matlab Ss Soln
7 pages
DSP Manual
PDF
No ratings yet
DSP Manual
88 pages
Digital Signal Processing
PDF
No ratings yet
Digital Signal Processing
24 pages
Matlab Signal
PDF
50% (2)
Matlab Signal
48 pages
DSP Lab Manual
PDF
No ratings yet
DSP Lab Manual
41 pages
Corrected DSP Lab Outputs
PDF
No ratings yet
Corrected DSP Lab Outputs
61 pages
DSP Lab Manual 2018-2019-1
PDF
0% (1)
DSP Lab Manual 2018-2019-1
55 pages
Lab # 2: Basic Operations On Discrete-Time: Sequences
PDF
No ratings yet
Lab # 2: Basic Operations On Discrete-Time: Sequences
9 pages
DSP Lab Manual final
PDF
No ratings yet
DSP Lab Manual final
114 pages
EC3492-DIGITAL SIGNAL LABORATORY Manual
PDF
100% (1)
EC3492-DIGITAL SIGNAL LABORATORY Manual
48 pages
LAB MANUAL Updated PDF
PDF
No ratings yet
LAB MANUAL Updated PDF
45 pages
DOC-20250403-WA0044.
PDF
No ratings yet
DOC-20250403-WA0044.
50 pages
Laboratory 1: Discrete-Time Signals in MATLAB
PDF
No ratings yet
Laboratory 1: Discrete-Time Signals in MATLAB
8 pages
Signal Analysis Using MATLAB
PDF
No ratings yet
Signal Analysis Using MATLAB
8 pages
Ninevah University College of Electronics Engineering Systems & Control Engineering Department SCE3201 Digital Signal Processing-I Lab
PDF
No ratings yet
Ninevah University College of Electronics Engineering Systems & Control Engineering Department SCE3201 Digital Signal Processing-I Lab
5 pages
Ec8562-Digital Signal Processing Laboratory-1953309632-Ec8562-Digital-Signal-Processing-Lab
PDF
No ratings yet
Ec8562-Digital Signal Processing Laboratory-1953309632-Ec8562-Digital-Signal-Processing-Lab
80 pages
DSP Lab Manual EC8562 (R 2017)
PDF
No ratings yet
DSP Lab Manual EC8562 (R 2017)
82 pages
GSM Based Temperature Monitering and Control
PDF
No ratings yet
GSM Based Temperature Monitering and Control
5 pages