0% found this document useful (1 vote)
1K views

DSP Test1 Cheatsheet

- Bandwidth is defined as the highest frequency minus the lowest frequency. Normal speech has a bandwidth of 3-4 kHz. - MATLAB consists of 3 windows: Command, Workspace, and Command History. MATLAB is matrix-friendly and useful for rapid prototyping. - Signals can be corrupted if sampled at too low of a rate relative to their frequency content. The sampling rate must be greater than twice the highest frequency component to avoid aliasing. - The Fourier transform decomposes a signal into its constituent frequencies. Fourier analysis converts a signal from the time domain to the frequency domain, while Fourier synthesis performs the inverse operation.

Uploaded by

201003489
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
1K views

DSP Test1 Cheatsheet

- Bandwidth is defined as the highest frequency minus the lowest frequency. Normal speech has a bandwidth of 3-4 kHz. - MATLAB consists of 3 windows: Command, Workspace, and Command History. MATLAB is matrix-friendly and useful for rapid prototyping. - Signals can be corrupted if sampled at too low of a rate relative to their frequency content. The sampling rate must be greater than twice the highest frequency component to avoid aliasing. - The Fourier transform decomposes a signal into its constituent frequencies. Fourier analysis converts a signal from the time domain to the frequency domain, while Fourier synthesis performs the inverse operation.

Uploaded by

201003489
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 3

** sound can be heared

** Bandwidth = highest bandwidth - lowest bandwidth


** Frequency Range of normal speech is 3~4 kHz of bandwidth.
** MATLAB: Matrix labortory.
** Matrix: Ordered arrangement of elements in rows and columns
** MATLAB Window consist of 3 Sub-windows:
1)Command Window. 2) Workspace / Data History. where the variables is stored. 3)Command History window.
** >>path // list all the present toolboxes i have installed.
** >>a=round(rand(10)*100) < Gives a matrix of size <10*10> with #s between 0-100.
** >>b=round(rand(10,2)*100) < Gives a matrix of size <10*2> 10 COLs and 2 ROWs with #s between 0-100.
** >>c=zeros(size(a)) < Gives a matrix zeros of size <10*10>
** >>for i=1:10
for j=1:10
// stands for COL
c(i,j)=a(i,j)+b(i,j); // They need to be of the same size a & b
end
end
** in the case of Matrix addition and Subtraction they need to be of the same size. While in Multiplication # of COLs of
the 1st need to be EQUAL # of ROWs of the 2nd.
** Generating Random Signal of 100 Values: n=rand(100,1); // Gives a Matrix of 100 Rows and 1 COL with #s
Ranges between 0-1.
** >>m=randn(100,1); // Generates a random #s varies between -2 and 2.
** >>rand Gives a uniform form distribution (0~1) while randn Gives a bell shaped Distribution (-2~2).
** >>fft() // Gives the Fast Fourier transform of a function.
** >>Why MATLAB? 1-Rapid Prototyping Can check each line separately. 2-Matrix Friendly. other Advantages are
in PPT1.
** >>Why Not MATLAB? 1- Nested loops because makes the program ver slow. 2- large scale system such as large
satellite images.
** Time Frequency Analysis: shows at what time what frequency appears.
** ! dir // You can use any dos commands in Matlab but you need to precede it by !
** b=10*a+n // where a and n are a 5*5 Matrix. what if we say plot(b); // Each Col will be represented by a separate
signal waveform ( 5 colors) . In this case you can use a 3-D representation methods such as sur(), surfl(), mesh()
where the mesh have gaps like the real mesh, and surfl() is smoother than surf().
** t = 0: 2*pi/1000 : 2*pi
x= 5*sin (2*pi*10*t + 0)
plot (t,x)

//

A* sin(2*pi*f*t + phase)

OR

A* sin(w*t + phase)

** if we increase the Frequency too much the signal will be corrupted for example x= 5*sin (2*pi*100*t + 0) .
because of how fast is the signal is different than how fast is the sampling.
Thus a simple solution is to have t=0:(2*pi)/1000000:pi;
** Corruption might be because of wrong sampling rate.

** t=0: (2*pi)/x : (2*pi) ;


x=1000;
what is the Sample size ( # of Samples)? N= 1001

** assume t2=t1 meaning it do a complete 1 cycle in the time where t1 is in its half of the cycle meaning when
t1 have a complete 1 cycle t2 have 2 cycles. Therefore t2 happens more frequently than t1 and have shorter

wavelength.

Fast Fourier Transform


X1=fft(x); // Gives complex numbers and strange graph thus better to ta abs
X1=fft(x,N); // Converts the X signal into N frequency points. and gives a complex Numbers thus better to use
instead of plot(X1) the following:
plot(abs(X1));
plot(fftshift(abs(X1)));
** To plot 2 graphs in MATLAB we use
>> hold
// will hold the plot of X1
>>plot(fftshift(abs(X2)),r);

DSP
** Analog: Continuous function V of continuous variable t. V(t)
Ex: time,space.
** Digital: Discrete function Vk of Discrete Sampling variable tk. where k is an integer Vk=V(tk)
** Misnomers
- Analog: Continuous time Continuous Amplitude
- Discrete: Discrete time Continuous Amplitude
- Quantized: Continuous time Discrete Amplitude
- Digital: Discrete time Discrete Amplitude
** Why Digital??
simpler no need to do integration only addition & subtraction is enough.
because our computer is a digital system.
** Digital cheaper than Analog.
** Applications of DSP?
Doctors Answer - Phones. - Mother and Child heart beats Monitoring System.
slides Answer is: - Predicting a systems output. - Implementing a certain processing task. -Studying a certain signal.
** DSP Hardware?
- (GPP) General purpose processors, micro-controllers. - (DSP) Digital Signal Processors. - (PLD, FPGA)
Programmable logic . are faster, real time DSPing.
** DSP Software?
- Programmable languages: Pascal, C/C++. - High level Languages: MATLAB, Mathcad,Mathmatica. -Dedicated
tools(ex:filter design s/w packages).
** DSP SYSTEM :
1) Analog Signal > 2) Antialiasing Filter from Noise (LPF) > 3) A/D > 4) Processing > 5) D/A > 6)
(Reconstruction)Filter (LPF)
LPF is used for smoothing.
DSP SYSTEM Decisions: see the slides
DSP Applications and Algorithms are in the slides.

Sampling
** Sampling: is how fast must we sample * a continuous signal to preserve its info content.
** Sampling Theorem= A signal s(t) with Maximum Freq Fmax can be recovered if sampled at frequency
fs>2fmax
** Fourier Series: Any Periodic signal can be generated by a combination of sine and cosine signals
** Square Wave can be generated by a combination of sine and cosine signals

** Antialiasing used to remove the noise after acquiring the Signal.

ADC
** The More the Bits the More is the Resolution, the More Precision.
** The minimum change in LSB.
** Types of ADC? 1) Flash Type. 2) Successive Approximation 3) Counter Based Single Ramp, Dual
Ramp, Sigma Ramp.
** Successive Approximation: 8 bits means also at 8 clock cycles needed.
** Convolution: check the slides. 1) Inversion 2) Shifting 3)Multiplying 4) Summiation.

** From Time domain to Frequency domain >(Analysis) ** From Frequency domain to Time domain >
(Synthesis)
** In the Frequency Domain, angle-time is not important what is important is the the Frequencies & its
Magnitude.
** Fourier said that a signal can be decomposed into a sum of sinusoids.
** Fourier Synthesis of Square Wave : look in the Phone
T= 2*pi;
d=1000; // displacement # of points from 0 to 2pi
N=101;
// as we increase N the graph becomes more squared
k=0:T/d:T;
f=[zeros(size(k))];
for n=1:2:N
fn=4/(pi*N) * sin(2*pi*n*k/T);
f=f+fn;
plot(k,f)
pause(0.1);
end

You might also like