Signal Processing Lab

yakzephyrAI and Robotics

Nov 24, 2013 (3 years and 6 months ago)

106 views




Signal Processing Lab


“信号处理实验室”实验指导书

(
英文
)









Contents

2D FFT

................................
................................
................................
................................
.......................

19

ALIASING
................................
................................
................................
................................
.................

22

AMPLITUDE MODULATION

................................
................................
................................
...............

27

AMPLITUDE VS POWER SPECTRUM

................................
................................
...............................

31

AUTOCORRELATION

................................
................................
................................
...........................

34

BITS VS RESOLUTION

................................
................................
................................
..........................

39

CEPSTRUM

................................
................................
................................
................................
..............

42

CLIPPING

................................
................................
................................
................................
.................

46

CONSTANT PERCENTAGE BANDWIDTH FILTER

................................
................................
.......

49

CONVOLUTION

................................
................................
................................
................................
......

54

CONVOLUTION FREQUENCY

................................
................................
................................
............

61

CROSSCORRELATION

................................
................................
................................
.........................

64

DECONVOLUTION

................................
................................
................................
................................

68

DELTA FUNCTION

................................
................................
................................
................................

71

EVEN AND ODD FUNCTIONS

................................
................................
................................
.............

74

FFT BANDWIDTH

................................
................................
................................
................................
..

78

FFT EVEN
-

ODD
................................
................................
................................
................................
.....

82

FFT LINEARITY

................................
................................
................................
................................
.....

86

FILTER RESPONSE TIME

................................
................................
................................
....................

89

FIR FILTER (Finite Impulse Response)

................................
................................
................................

92

FREQUENCY AVERAGING

................................
................................
................................
.................

96

FREQUENCY MODULATION

................................
................................
................................
............

101

FREQUENCY SHIFT

................................
................................
................................
............................

105

IIR
FILTERS (Inf
inite Impulse Response)

................................
................................
..........................

109

LEAKAGE

................................
................................
................................
................................
..............

117

LIN


LOG FREQUENCY SCALES

................................
................................
................................
....

121

LOW PASS FILTER

................................
................................
................................
..............................

124


MEDIAN FILTER

................................
................................
................................
................................
..

129

ORBITS

................................
................................
................................
................................
...................

133

ORDER TR
ACKING

................................
................................
................................
.............................

137

PARSEVAL’S THEOREM
................................
................................
................................
....................

142

PHASE IN TIME AND FREQUENCY

................................
................................
................................

146

PICKET FENCE EFFECT

................................
................................
................................
....................

149

RESONANCE

................................
................................
................................
................................
.........

154

RIDING & BEATING

................................
................................
................................
............................

158

RMS



PEAK
-
CREST

................................
................................
................................
...........................

161

SIGNAL DIFFERENTIATION

................................
................................
................................
............

164

SIGNAL INTEGRATION

................................
................................
................................
.....................

167

SINGLE POLE FILTER

................................
................................
................................
........................

171

SQUARE & SINC FUNCTIONS

................................
................................
................................
..........

175

STROBOSCOPE

................................
................................
................................
................................
....

179

TIME DOMAIN AVERAGING (TWO SIGNALS)

................................
................................
............

182

TIME DOMAIN AVERAGING NOISE

................................
................................
...............................

186

TIME SCALING FFT

................................
................................
................................
............................

190

TIME SHIFTING FFT

................................
................................
................................
...........................

194

TIME VS FREQUENCY

................................
................................
................................
.......................

197

TOTAL HARMONIC DISTORTION

................................
................................
................................
..

201

TRANSFER FUNCTION

................................
................................
................................
.......................

204

TRANSIENTS

................................
................................
................................
................................
.........

207

TRANSMISSIBILITY

................................
................................
................................
............................

210

WAVES & SPECTRA

................................
................................
................................
............................

214

WINDOWS FOR FREQUENCY ANALYSIS

................................
................................
.....................

219

WINDOWS AMPLITUDE

................................
................................
................................
....................

223

WINDOWS COMPARISON

................................
................................
................................
.................

226

WINDOWS OVERLAPPING

................................
................................
................................
...............

228

WINDOWS: NOISE FLOOR

................................
................................
................................
................

233

WINDOWS RESOLUTION

................................
................................
................................
..................

236



2D FFT


Many important signal processing problems involve the processing of multidimensional
signals. All the properties of signals and s
ystems can be extended to the
multidimensional case. The two
-
dimensional discrete Fourier transform is a very useful
tool to analyze two
-
dimensional signals such as photographs and seismic array data.


A two
-
dimensional discrete Fourier transform can be im
plemented by using a one
-
dimensional transform first on the rows and then on the columns or vice versa.


Figure 1 shows an example of the two
-
dimensional Fourier transform. Part (a) shows the
picture of
Jean Baptiste Fourier
. Part (b) shows the magnitude p
lot of the two
-
dimensional Fourier transform of (a). Part (c) shows the phase plot of the 2D Fourier
transform of (a).



Figure 1.

(a) Picture of Fourier, (b) magnitude spectrum and (c) phase spectrum.

Figure 2 shows a square function. This function is t
he one used in the simulator.



Figure 2.

3D square function.


The Simulator



1.

Delay Y:

Slide control for the delay of the pulse in the Y coordinate.

2.

Delay X
: Slide control for the delay of the pulse in the X coordinate.

3.

Width X:

Slide control for the wid
th of the pulse in the X coordinate.

4.

Width Y:

Slide control for the width of the pulse in the Y coordinate.

5.

Image Graph:

display of the signal in time or space domain.

6.

Magnitude of 2D FFT:

Intensity graph display of the magnitude of the 2D
-
FFT
of

the Signal.

7.

Return to Menu:

Return to main menu

8.

Show Help:

General description of this VI
.


Practice with the simulator


1.

Set different values for width and delay for the two
-
dimensional square function and
observe the magnitude 2D FFT plot.


2.

Set both

widths of the signal to 1. Can you tell what happen with the 2D FFT plot?
(Clue: Delta function).


Related Topics




FFT Bandwidth



FFT Even


Odd



FFT Linearity



Frequency shift



Picket Fence Effect



Scaling Time



Time shift




Time Vs. Frequency


ALIASING


“False

low
-
frequency signals produced in a data sampling process when the sampling
rate is less than twice the frequency of the highest frequency component contained in the
sample”
1


Aliasing is the phenomenon where in effect a high frequency component takes on
the
identity of a lower frequency. It occurs because the time function was not sampled at a
sufficiently high rate.


In figure 1, a 4 Hz signal is being read, using a 5 Hz sampling rate. When the collection
of sampled points is plotted, a 1 Hz signal is ob
tained as a result of aliasing.


To avoid aliasing the sampling rate must be at least two times bigger than the highest
frequency component of the sampled signal. Harry Nyquist
2

discovered this rule that is
called the
Nyquist sampling rule
.





1

MIT93, page 523.

2

Nyquist, Harry

(b. 1889, Nilsby, Sweden
-

d. 1976, Harlingen, Texas, U.S.)

American physicist and electrical and communications engineer, a prolific inventor who made
fundamental theoretical and practical contrib
utions to telecommunications. (
Encyclopedia Britannica)
.



Figure 1.

Al
iasing effect in signal sampling.


In order to acquire a signal that has a rich spectrum of frequencies and there is the need
of avoiding aliasing, these steps had to be followed:


1.

Select the signal’s highest frequency that it’s going to be analyzed. For e
xample:
5000Hz.

2.

Use an analog anti
-
aliasing filter to cut the frequencies higher than the frequency
selected in the prior step. Figure 2 shows the response of a 5000Hz filter. It doesn't
totally filter frequencies over 5000Hz and those frequencies will pr
oduce aliasing.

3.

Use a sampling speed larger than two times the upper limit frequency. It is
recommended to use a sampling rate 2.56 times the higher frequency. For the
example the sampling frequency will be 12.800 Hz (2.56 x 5000).

4.

Acquire 2
n

samples at th
e sampling frequency rate. The number of samples is a
power of two as a requirement of the fast Fourier transform (FFT). For the example
the number of samples will be 2
10
=1024.



Figure 2.

Anti
-
aliasing filter response.


5.

Apply the FFT to the sample.

6.

Take t
he first 400 lines of the spectrum (frequencies from 0 to 5000 Hz) and discard
the last 112 lines (frequencies from 5000 to 6400 Hz). This last interval contains
aliasing and the attenuated data. See figure 2.


Aliasing can be seen in western movies where
a slowing stagecoach wheel will appear to
rotate backward, stop, and the rotate forward at a decreasing speed as the stagecoach
comes to halt. The backward rotation is caused by a film
-
framing speed that is slower
than the time required for a spoke to rota
te into the position occupied by the adjacent
spoke when the previous frame was exposed.


The most important application of aliasing is the strobe light used to stop high
-
speed
motion. The strobe
-
flashing rate is the measuring speed. When the flash rate eq
uals the
rotational speed, there seems to be no motion at all. By varying the flash rate slightly,
the motion can be moved forward or backward in slow motion.


The Simulator


1.

Frequency of the Signal to be Acquired:

Slide control of the frequency of the

signal to be acquired.

2.

Cycles:

Digital indicator of the frequency of the signal to be acquired.

3.

Sampling Frequency:

Slide control of the sampling frequency.

4.

Sampling Freq./Signal Freq.:

Digital indicator of the ratio sampling frequency /
signal f
requency.

5.

ALIASING:

Warning lamp for aliasing. When there is aliasing the lamp turns
red.

6.

Return to Menu:

Return to Main Menu

7.

Show Help:

General description of this VI.


8.

Original and Acquired signals:

Graph of the original signal to be acquired
and
the acquired signal in the time domain.

9.

Signal Spectrum and acquired Signal Spectrum:

Amplitude spectrum of the
original signal to be acquired, and amplitude spectrum of the signal acquired.


Practice with the simulator


1.

Put the Frequency of the sig
nal to be Acquired in 10 Hz.

2.

Move the sampling frequency slider to a High value. See what happens with the
plots.

3.

Move the sampling frequency slider to a Low value. See what happens with the plots
and the Aliasing lamp.

4.

Move the sampling frequency and try
to obtain a 0.5, 1, 1.5, 2 and 2.5 in the
Sampling Freq./Signal Freq. indicator. See what happens with the plots.


Related Topics




Clipping



Stroboscope



Waves & spectra


AMPLITUDE MODULATION



Modulation
: The modification of one signal by another in either
amplitude or
frequency. Amplitude modulation produces a variation in amplitude plus side
-
bands
around the carrier at the frequency of the modulating signal”
1


Figure 1.

Amplitude modulation example.





1

MIT93, page 538.


“Ordinarily, the transmission of a message signal (be i
t in analog or digital form) over a
band
-
pass communication channel (e.g., telephone line, satellite channel) requires a shift
of the range of frequencies contained in the signal into other frequency ranges suitable
for transmission, and a corresponding sh
ift back to the original frequency range after
reception. For example, a radio system must operate with frequencies of 30kHz and
upward, whereas the message signal usually contains frequencies in the audio frequency
range, so some form of frequency
-
band sh
ifting must be used for the system to operate
satisfactorily. A shift of the range of frequencies in a signal is accomplished by using
modulation, defined as the process by which some characteristic of a carrier is varied in
accordance with a modulation wa
ve. The message signal is referred to as the modulating
wave, and the result of the modulation process is referred to as the modulated wave. At
the receiving end of the communication system, we usually require the message signal to
be recovered. This is ac
complished by using a process known as demodulation, or
detection, which is the inverse of the modulation process”
1
.


Amplitude modulation is often confused with
beating
, but both phenomena’s are very
different.





1

HAY89, page 260.


The Simulator



1.

Frequency of Tone:

Slid
e control of the frequency of the modulating signal.

2.

Frequency of Carrier Signal:

Slide control of the frequency of the carrier
signal.

3.

Modulation Factor:

Slide control of the modulation factor.

4.

Overmodulation:

Overmodulation warning lamp.

5.

Return
to Menu:

Return to main menu

6.

Show Help:

General description of this VI.

7.

Modulated Signal:

Modulated signal in time domain.

8.

Spectrum of Modulated Signal:

Modulated signal in frequency domain.


Practice with the simulator



1.

Set the frequency of modul
ating signal in 0 Hz and carrier signal in 50 Hz.

2.

Gradually increase the frequency of the modulating signal and watch the plots.

3.

Set the frequency of modulating signal in 10 Hz and gradually increase and decrease
the frequency of the carrier signal.

4.

Increa
se the modulation factor and observe the amplitude of the signal in the time
and frequency domain.

5.

Set the frequency of modulating signal in 10 Hz and gradually move the frequency
of the carrier signal to values under 10 Hz.


Related Topics




Frequency Modu
lation



Ridding and Beating



AMPLITUDE VS POWER SPECTRUM


The amplitude spectrum is the result of applying the FFT to a time signal. It displays all
the frequencies contained in the signal and their respective amplitude value. The power
spectrum is obtaine
d by squaring the amplitude spectrum.


The power spectrum is used to analyze the power of the signal. For example, if the
amplitude spectrum shows the current in a signal, the power spectrum shows the power
it dissipates.


As shown in figure 1, the power s
pectrum enhances those frequencies with a large
amplitude value .


Figure 1.

Power and amplitude spectra of the same signal.



The Simulator



1.

Signal:

Graph of the signal in the time domain.

2.

Wave Type:

Menu ring to select the type of signal.

3.

Freq
uency:

Slide control of the frequency of the signal.

4.

Cycles:

Digital indicator of the number of cycles in the time window.

5.

Return to Menu:

Return to main menu

6.

Show Help:

General description of this VI.

7.

Power Spectrum:

Graph of the power spectru
m of the signal.

8.

Amplitude Spectrum:

Graph of the amplitude spectrum of the signal.

9.

Phase:

Slide control and indicator of the phase of the signal.



Practice with the simulator


1.

Try different wave
-
types and frequencies and compare the spectra plots
.

2.

See what happen with the high amplitude frequencies and with the low amplitude
frequencies.


Related Topics




Waves & Spectra



AUTOCORRELATION


The autocorrelation function is a tool to compare a signal with itself. It makes a copy of
a signal and super
imposes it over the original signal at each point across it, calculating a
value that indicates how well both signals fit with each other. The autocorrelation plot
shows the level of correlation in the points that were analyzed.


The autocorrelation value
goes from

1 to +1. A value of +1 indicates perfect
correlation. A value of zero indicates that there is no correlation between the signals
compared. A value of

1 indicates an inverse correlation.


Autocorrelation plot is symmetrical to the center (0), an
d its value is always +1 because
of the comparison of the signal with itself in the same point.


Figure 1.

Original signal (a), signal comparison at 2 shows high correlation (b), signal comparison at 1
shows low correlation(c) and autocorrelation plot (d
).


The most useful applications of the autocorrelation are:




To detect periodicity on a signal. If the autocorrelation plot is periodic, then the
signal is periodic.



To eliminate noise from a signal. See figure 2.




Figure 2.

Using autocorrelation to eli
minate noise from a signal.


The autocorrelation of a time series at lag L is given by:

)
1
(
)
(
)
1
)(
(
)
)(
(
2
1
1
2

















n
n
Y
Y
n
L
n
L
n
Y
Y
Y
Y
L
n
r
n
i
i
n
i
i
L
i
i
L
i
i
L

Where

L: Lag

n: number of samples.


Y: vector of samples


Y
i
: sample in the position i



The Simulator


1.

Type of signal:
Menu ring to select
the signal type.

2.

Frequency of the Signal:

Slide to control the frequency of the signal.

3.

Noise Amplitude:

Slide to control the amplitude of the white noise to be added
to the signal.

4.

Return to Menu:

Return to Main Menu

5.

Pause:

Stop the execution
in order to examine the graphs in detail

6.

Show Help:

General description of this VI

7.

Signal + White Noise:

Time domain graph of the signal plus noise to be
autocorrelated.

8.

Autocorrelation:

Autocorrelation of the Signal + Noise in the time domain.




Practice with the simulator


1.

Set the Noise Amplitude to 0 in order to try different signals and appreciate a clean
autocorrelation plot.

2.

Gradually increase the Noise Amplitude and see how the autocorrelation plot is
affected.

Try different signals, frequen
cies and Noise Amplitudes and compare the differences
between the autocorrelation plots.


Related Topics




Crosscorrelation



BITS VS RESOLUTION


The conversion of an analog signal to a digital signal is a basic need for signal
processing using digital inst
ruments like the personal computer (PC).


Most sensors produce analog signals that vary when the measured variable changes. For
example, a thermocouple that measures temperatures from 0 to 100ºC and produces a
signal from 0 to 5V. To analyze the signal pro
duced by the thermocuple on a computer,
it must be digitalized because computers only work with discrete values.


“The resolution in analog
-
digital conversion is the number of bits that an analog to
digital converter (ADC) uses to represent the analog sign
al. The higher the resolution,
the higher the number of divisions the voltage range is broken into, and therefore, the
smaller the detectable voltage change. Figure 1 shows a sine wave and its corresponding
digital image as obtained by a 3
-
bit ADC. A 3
-
bit

converter divides the analog range
into 2
3

= 8 divisions. Each division is represented by a binary code between 000 and
111. Cleary the digital representation is not a good representation of the original analog
signal because information was lost in the c
onversion. By increasing the resolution to 16
bits, however, the number of codes from ADC increases from 8 to 65,536, so you can
obtain an extremely accurate digital representation of the analog signal.



Figure 1.
Digitized Sine Wave with 3
-
bits Resoluti
on”
1
.




1

The measurement and automation catalog 2001. National Instruments,page 246.


Dynamic Range


The dynamic range is the ratio between the largest and the smallest values that the ADC
can read. The ratio can be expressed in voltage decibels. The equation for the dynamic
range of an ADC is given by:










2
2
log
20
n
Range
Dynamic

where
n is the number of bits.


The Simulator



1.

Bits:

Digital indicator of the number of bits in the A/D conversion.

2.

A/D Bits:

Slide control of the number of bits in the A/D conversion.

3.

Resolution:

Resolution of the A/D conversion.

4.

Minimum voltage:

Minimum volt
age expressed in milivolts.


5.

Return to Menu:

Return to main menu

6.

Show Help:

General description of this VI.

7.

Acquired Signal:

Signal acquired in the time domain. The box 1 is enlarged in
Zoom 1.

8.

Zoom 1:

Enlarged view of Box 1.

9.

Zoom 2:

Enlarged view of Box 2.

10.

Zoom 3:

Enlarged view of Box 3.


Practice with the Simulator


1.

Try different resolutions sliding the bits control and compare the acquired signal and
its respective zoom plots.

2.

Compare the dynamic range values for each resolution.



CEPSTRUM


“Cepstrum ana
lysis is the name given to a range of techniques all involving functions
which can be considered as a
spectrum of a logarithmic spectrum
. In fact, the cepstrum
was first defined as far back as 1963 as the power spectrum of the logarithmic power
spectrum. I
t was proposed at that time as a better alternative to the
autocorrelation

function for the detection of echoes in seismic signals. Presumably because it was a
spectrum of a spectrum, the authors coined the word
ceps
trum by paraphrasing
spec
trum
and at the

same time proposed a number of other terms derived in a similar manner. A
list of the most common is as follows:




Cepstrum from Spectrum



Quefrency from Frequency



Rahmonics from Harmonics



Lifter from Filter



Gamnitude from Magnitude



Saphe from Phase”
1
.


Th
e main idea of cepstrum is to reduce to a single component a fundamental frequency
and its harmonics.


To see how cepstrum works see figure 1. A signal X (figure 1
-
a) is converted to its
frequency domain by a Fourier transform. The frequency domain plot (
figure 1
-
b) shows
the fundamental frequency of the signal X 5Hz and its odd harmonics 15Hz, 25Hz,
35Hz, and so on. The plot from figure 1
-
c is obtained calculating the logarithm of the
Fourier transform of signal X. The result is that the difference of amp
litudes between the
fundamental frequency and its harmonics is reduced and the result is a periodic signal
with a period of 10Hz (separation between harmonics). If this new signal is considered



1

RAN87, page 271.


as a time function, and its spectrum is obtained (figure 1
-
d),

the result will be a
fundamental quefrency of 100 ms and other quefrencies because the signal from figure
1
-
c is not sinusoidal.



Figure 1.

Simulation of the cepstrum process.


Cepstrum is used principally to detect periodic structures in signals, like
families of
harmonics or sidebands with uniform spacing. It is ideally suited to the analysis of
complex signals such as generated by gearboxes.



The Simulator



1.

Signal:

Graph display of signal in time domain.

2.

Log. of Power Spectrum:

Graph display
of the logarithm of the power spectrum
of the signal.

3.

Return to Menu:

Return to main menu

4.

Pause:

Stop the execution in order to examine the graphs in detail.

5.

Show Help:

General description of this VI.

6.

Power Spectrum:

Graph display of the power
spectrum of the signal.

7.

Cepstrum:

Graph display of the magnitude of the cepstrum of the signal.

8.

Frequency:
Slide control and digital display for the frequency of the signal.

9.

Wave Type:

Menu to select wave type.



Practice with the simulator


1.

Tr
y different signal frequencies and compare the plots.


Related Topics


Waves & Spectra



CLIPPING


“The truncation or flattening of the positive and/or negative portions of the signal,
normally caused by overloading electronic circuits and machinery proble
ms”
1
.


“In certain situations, false or misleading signals can be present. For example, when a
sinusoid is clipped (as occurs when the input to the real
-
time analyzer is overloaded
slightly), it can cause a string of harmonics. The amplitude of the harmoni
cs is normally
quite low”
2
.


The clipping effect makes that a sinusoid wave behaves like a square waveform with
harmonics in the spectrum.



Figure 1.

Clipped signal in time and frequency domain.




1

TAY94, page 344.

2

TAY94, page 17.


The Simulator



1.

Signal:
Graph of the signal in the time

domain.


2.

Clipping Level:
Slide control of the clipping level.

3.

Frequency:
Slide control of the frequency of the signal.

4.

Phase Indicator:
Digital indicator of phase.

5.

Cycles:

Digital indicator of the total number of cycles of the signal in the ti
me
window.

6.

Phase:
Slide control of the phase of the signal in degrees.

7.

Return to menu:

Return to main menu.

8.

Show Help:

General description of this VI.

9.

Frequency Spectrum:
Graph of the amplitude spectrum of the signal.


10.


Phase Spectrum:
Phase

spectrum of the signal in the frequency domain.

Practice with the simulator


1.

Set an integer number for the signal cycles setting to zero the fine control.

2.

Move the clipping level control to its upper position and observe the spectrum.
Observe the fundamen
tal frequency.

3.

Gradually move down the clipping level control and observe the plots. See what
happens with the fundamental frequency.

4.

Observe what happens with the fundamental frequency when the clipping is lower
than zero.

5.

Move the fine control to obtain
a fractional number of cycles and observe the plots.


Related Topics




Aliasing



Total Harmonic Distortion



CONSTANT PERCENTAGE BANDWIDTH FILTER


A few years ago frequency analyzers had two problems to calculate a spectrum using the
Fourier transform: first
, the digital processors embedded in frequency analyzers were too
slow calculating the Fourier transform (FT). Second, the algorithm for the calculation of
the FT was not efficient. Because of that situation analyzers used analog filters to
calculate spect
ra.


Analyzers used two kinds of filters: constant absolute bandwidth filter and constant
relative (percentage) bandwidth filter. Both filters are band
-
pass. The difference is that
the constant bandwidth filter gives uniform resolution and separation on a
linear
frequency scale and the constant percentage filter gives uniform resolution on a
logarithmic frequency scale.


Band pass filters have a range of frequencies that pass through the filter. For the constant
bandwidth filter this range is a constant val
ue of hertz (For example 6Hz). For the
constant percentage bandwidth filter this range is a percentage of the center frequency
(For example 10%).



Figure 1.

Difference between constant absolute bandwidth and constant percentage bandwidth filters.



As sho
wn in figure 1, a constant percentage bandwidth filter keeps its resolution in all
the frequencies of the spectrum at logarithmic scale. The constant bandwidth filter has
very good resolution at high frequencies and not so good at low frequencies.


The pro
cess to obtain the spectrum from a time signal with band
-
pass filters consists of
using as many filters as lines of resolution are wanted. See the next example:


Suppose that one need a 20 line resolution spectrum, containing frequencies between 0
and 1000

Hz.


Using constant bandwidth filters is very easy: Just separate the filters by the bandwidth.
In this case each line of resolution will represent 50 Hz (1000Hz / 20 lines of resolution).
In this case the first line of the spectrum is going to represent
a range of frequencies
between 0 and 50 Hz, the second line is representing frequencies between 50 and 100Hz,
and so on.


Using constant percentage bandwidth filter is a little bit complex. See the next example:




First obtain the percentage of separation
between frequencies calculating the 20
th

root of 1000. In this case the result is 1,41 approximately.



Signal must be passed through a filter for each value of 1,41
n

for n = 1 to 20. So the
first filter is in 1,41 Hz, the second filter is in 1,41
2

= 1,98 Hz
, and so on.



Measure the signal’s amplitude obtained with each filter. Plot each amplitude value
in a logarithmic plot of amplitude vs. frequency. This is the spectrum of the signal.


This process seems to be very complicated and expensive because of the h
uge quantity
of filters needed. But one filter can be used to filter in many frequency ranges, by
changing the sampling rate. For example, if a filter is designed to pass through
frequencies around 100Hz and a signal is sampled at half speed, the filter is

going to
pass through frequencies around 50Hz.



Comparing the resolution of the first line of both spectra (0
-
50Hz for constant bandwidth
filters and 0
-
1,41Hz for constant percentage bandwidth filters) is easy to see which one
has better resolution in low

frequencies. With high frequencies the effect results
inverted. See this effect graphically in figure 2.



Figure 2.

Comparison of the spectra obtained with constant absolute bandwidth filters

and constant percentage bandwidth filters.


The FT behaves l
ike a constant bandwidth filter, because it has uniform resolution in a
linear frequency scale.



To calculate the central frequency (f
c
) of a (a) constant bandwidth filter and of a (b)
constant percentage bandwidth filter use the following equations:

(a)
2
u
l
c
f
f
f




(b)
u
l
c
f
f
f


where f
l
and f
u

are respectively the lower and upper frequencies of the bandwidth
interval.


The Simulator



1.

Graph Constant Bandwidth:

display of a constant bandwidth spectrum.

2.

Return to Menu:

Return to

main menu

3.

Run Cycle:

Control button to run cycle

4.

Show Help:

General description of this VI


5.

Constant % Bandwidth:

Graph display of a constant percentage bandwidth
spectrum.

6.

Bandwidth:

: Digital control for the percentage of bandwidth (0.5% to 23 %).

7.

Freque
ncy Bins:

Digital indicator of the number of frequency bins.


Practice with the simulator


1.

Set the percentage bandwidth of the filter in 3%.

2.

Run an execution cycle and compare the response of both techniques in low and high
frequency using the zoom tool.

3.

C
hange the percentage bandwidth of the filter to higher and lower values between
the range of 0,5 to 23,0% and compare the responses, running a few cycles.

4.

Use a percentage bandwidth of 0,63% to obtain the same number of lines than the
constant bandwidth sp
ectrum (512).


Related Topics




FFT Bandwidth



Filter Response Time



IRR Filter



Low Pass Filter



Median Filter



Single Pole Filter Step By Step


CONVOLUTION


Convolution between two time functions
f
(t) and
h
(t) is defined as:










d
t
h
f
t
g
)
(
)
(
)
(


It is sym
bolically represented as:

)
(
)
(
)
(
t
h
t
f
t
g




“The convolution procedure can be summarized as:

1.

Folding
: Take the mirror image of
h
(

) about ordinate axis


h
(
-

).

2.

Displacement
: Shift
h
(
-

) by the amount of
t
.

3.

Multiplication
: Multiply the shifted funct
ion
h
(t
-

) by
f
(

).

4.

Integration
: Area under the product of
h
(t
-

) and
f
(

) is the value of the convolution
at time
t
.”
1


The convolution function obeys the
commutative

property, where
f
(t) *
h
(t) =
h
(t) *
f
(t).


To understand how convolution works see figu
re 1 where a function
f
(t) is convolved
with a shifted delta function (
see related topic Delta function
).





1

BRI74, page 51.



Figure 1.

Convolution with a Delta function.


It can be said that the general effect of convolving a function with a delta function is to
shift its

origin to the origin of the delta function.


Figure 2 shows the convolution of two different functions (2
-
a) and (2
-
b). The (2
-
c) part
shows the result of applying the four steps mentioned before at every t. Finally the (2
-
d)
part shows the sum of all the

functions in figure 2
-
c.




Figure 2.

Convolution of two time functions
.


“One major application of this relationship is to the case where
f
(t) represents an input
signal to a physical system and
h
(t) the impulse response of the system.
g
(t) will then be
the output of the system”
1
.






1

RAN87,
page 50.



Figure 3.

Impulse function convolution.


Convolution Theorem


Possibly the most important and powerful tool in modern scientific analysis is the
relation between convolution and Fourier transform.


The convolution theorem i
s defined as:


If f(t) has the Fourier transform F(f) and h(t) has the Fourier transform H(f), then
f(t)*h(t) has the Fourier transform F(f)H(f).

FT [
f
(t) *
h
(t) ] =
F(f) H(f)


In simpler words a convolution in the time domain is equivalent to a multiplic
ation in
the frequency domain.


See figure 4 for a graphical representation of the Convolution Theorem. Observe that in
this case the convolution is done in the frequency domain.




Figure 4.

Graphical example of the frequency convolution theorem.





The S
imulator



1.

Signal X:

Graph of the signal X in the time domain.

2.

Signal Y:

Menu ring to select the type of signal Y.

3.

Width:

Width of pulse in signal Y.

4.

Delay:

Delay of pulse in signal Y.

5.

Return to Menu:

Return to main menu

6.

Show Help:

Gener
al description of this VI.

7.

Signal Y:

Graph of the signal Y in the time domain.

8.

Convolution X * Y:

Graph of the convolved signals in the time domain.



Practice with the simulator


1.

Signal X is composed by many delta functions and its being convolved w
ith impulse
function Y. Try different properties of signal Y like the signal type (square or sinc),
the impulse width and the impulse delay and observe the results in the convolution
plot.


Related Topics




Convolution frequency



Deconvolution



Delta function



CONVOLUTION FREQUENCY


The convolution theorem says that when two functions are convolved in the time
domain, their respective Fourier transforms get multiplied as shown in the following
equation:


FT [
f
(t) *
h
(t) ] =
F(f) H(f)


See the
Convolution

top
ic for a detailed explanation.


This simulator is intended to analyze the behavior of the frequency domain when the
convolution is done in time domain.


The Simulator



1.

Signal Y Frequency Domain:

Graph display of signal Y in the frequency domain.

2.

Signal Y
:
Control to choose signal Y. It has two choices : Square and Sinc.

3.

Signal Y frequency:
Slide control for the frequency of signal Y.

4.

Signal X Frequency Domain:

Graph display of signal X in the frequency domain.

5.

Convolution X*Y Frequency Domain:
Graph displ
ay of convolution X*Y in
frequency domain.

6.

Return to Menu:
Return to main menu

7.

Show Help:
General description of this VI.


Practice with the simulator



1.

Remember that the plots are showing the spectrum of signals X and Y. Signal X is a
pulse function in tim
e and frequency domains. Signal Y can be a square or a sinc
function.

2.

Set signal Y to square and try different width values. See how the convolution
spectrum behaves.

3.

Now set the signal Y to sinc and use different values of delta t, comparing the results
i
n the convolution spectrum.


Related Topics




Convolution


CROSSCORRELATION


“The correlation coefficient is a measure of linear association between two variables.
Values of the correlation coefficient are always between
-
1 and +1. A correlation
coefficient

of +1 indicates that two variables are perfectly related in a positive linear
sense, a correlation coefficient of
-
1 indicates that two variables are perfectly related in a
negative linear sense, and a correlation coefficient of 0 indicates that there is
no linear
relationship between the two variables”
1
.



Correlation
: A measure of similarity between two dynamic signals accomplished in
the time domain”
2
.


The crosscorrelation function compares two different signals calculating a correlation
value for ever
y point of one signal compared with the other. As shown in figure 1, two
functions are being compared. In the match position 15 the functions are very similar to
each other and the correlation plot indicates a value closer to +1. A different situation
occu
rs in the match position 35 where the functions differ from each other. In this case
the correlation value is closer to zero.





1

Encyclopedia Britannica

2

MIT93, page 528.



Figure 1.

Crosscorrelation between two functions.


The cross
-
correlation function is used extensively in pattern recognition an
d signal
detection. It allows comparing two signals to discover a relation between them. Radar
uses crosscorrelation to detect different objects. The radar has a library of previously
recorded echoes from different aircrafts. When an unknown echo is detect
ed, it uses
crosscorrelation to compare it with all the patterns in the library. Crosscorrelation
process determines which pattern is the one that fits better with the unknown echo, and
discovers what kind of aircraft is the one that is producing the unkno
wn signal.


If we designate the two series as Y
1i

and Y
2i

and define n* as the number of overlapped
positions between the two chains, the cross
-
correlation for match position m is:


]
)
(
*
][
)
(
*
[
*
2
2
2
2
2
1
2
1
2
1
2
1











Y
Y
n
Y
Y
n
Y
Y
Y
Y
n
r
m


Where

n*: number of overlapped positions.

Y
1
: ser
ies 1 vector of samples

Y
2
: series 2 vector of samples


The Simulator


1.

Signal 1:
Menu to select type of signal as Signal 1.

2.

Frequency of Signal:

Slide to control frequency of Signal 1.

3.

Noise Amplitude:

Slide to control white noise amplitude in Si
gnal 1.

4.

Signal 2:
Menu to select type of signal as Signal 2.

5.

Frequency of Signal:

Slide to control frequency of Signal 2.

6.

Noise Amplitude:

Slide to control white noise amplitude in Signal 2.

7.

Return to Menu:

Return to main menu.

8.

Pause:

Stops
the execution in order to examine the graphs in detail.

9.

Show Help:

General description of this VI.

10.

Signal 1 + White Noise:

Signal 1 plus white noise in time domain.

11.

Signal 2 + White Noise:

Signal 2 plus white noise in time domain.


12.

Crosscorre
lation:

Crosscorrelation of Signal 1 + noise and Signal 2 + noise in
time domain.


Practice with the simulator


1.

Set the Frequencies of the both signals at the same value. See how the
crosscorrelation plot shows a clear waveform.

2.

Change the signal type (sin
e, square…) and see how the crosscorrelation plot keeps a
clear waveform.

3.

Add noise to the signals and see how the crosscorrelation eliminates it.

4.

Gradually change the signal 1 frequency and see the crosscorrelation plot.

5.

Try different kinds of signals wit
h different frequencies and watch the results in the
crosscorrelation plot.


Related Topics




Autocorrelation


DECONVOLUTION


Deconvolution is the inverse function of convolution. If
g
(t) =
f
(t) *
h
(t),
g
(t)
deconvolved with
f
(t) equals
h
(t) and
g
(t) deconv
olved with
h
(t) equals
f
(t).


Let’s see an example of a deconvolution application:


There is a system with a photocell that reads bar codes. The photocell is passed across a
black line drawn over a white paper and it responses as shown in figure 1
-
a. When
the
photocell is passed across a bar code, the result obtained is as shown in figure 1
-
b. The
function in figure 1
-
b is the result of a convolution between a square function (bar code)
and the photocell response (figure 1
-
a). So the result of reading a bar

code (figure 1
-
b)
can be deconvoled with the photocell response function (figure 1
-
a) to obtain the
original bar code shown in figure 1
-
c.



Figure 1.

Deconvolution application.


The Simulator



1.

Original Signal X:

Menu ring to select the original sig
nal.

2.

Frequency:

Slide control and digital indicator of the frequency of the original
signal.

3.

Weight Y:

Menu ring to select the weight signal.

4.

Width:
Indicator of the witdh of the signal.

5.

Width:

Slide control and digital indicator of the width of t
he weight signal.

6.

Return to Menu:

Return to main menu

7.

Show Help:

General description of this VI.

8.

Original Signal X:

Graph of the original signal in time domain.

9.

Original Signal Y:

Graph of the weight signal in time domain.

10.

Adquired Signal

(Convolution X * Y):

Graph of the acquired signal in time
domain. This is the convolution of original and weight signals.

11.

Deconvolved Signal:
Graph of the deconvolved signal (acquired signal
deconvolved with weight signal).


Practice with the simulato
r


1.

Set the original signal X in Square and the Signal Y in Hanning.

2.

Observe how the acquired signal is rounded in the edges because of the Signal Y
function and how the Deconvolved signal is squared again.

3.

Try different signals and frequencies and observe
how well deconvolution works in
each case.


Related Topics




Convolution



Delta Function


DELTA FUNCTION


The
Dirac
1

delta function, denoted by

(t), is defined as having zero amplitude
everywhere except at t=0, where it is infinitely large in such way that
it contains unit
area under its curve.


The amplitude spectrum of the delta function


(t
-

), is the same for every

. But the
complex spectrum of the function rotates over the frequency axis like a spiral.



Figure 1.

Delta function in the time domain (a
) and in the frequency domain (b)


The delta function can be defined by two properties:


1 )



( t ) = 0, t


0

2 )






1
)
(
dt
t



This function is used to analyze more complex functions, separating them into simple
functions and using the pri
nciple of superposition.




1

D
irac, Paul Adrien M.
(b. 1902, Bristol, Gloucestershire, England


d. 1984, Tallahassee, Florida, U.S).

He was a theoretical physicist known for his work in quantum mechanics and for his theory of the
spinning electron. In 1933 he shared the Nobel Prize for Physics with the Austrian physicist Erwin
Schrödinger. (
Encyclopedia Britannica)


The Simulator



1.

Delay:

Time delay indicator of the delta pulse.

2.

Delta Pulse:

Delta function in time domain.

3.

Wait:

Control of the velocity to change the delay of the delta function.

4.

Show Help:

General description of this
VI.

5.

Pause:

Stops the execution in order to examine the graphs in detail.

6.

Return to Menu:

Return to main menu.


7.

Amplitude Spectrum:

Amplitude spectrum of delta function.

8.

3D View of the FFT 3
-
D:

representation of the complex FFT transform of the
d
elta function.


The dots represent the tips of the complex vectors and the red line is the loci of
their tails.


9.

3D View of the FFT 3
-
D:

representation of the complex FFT transform of the
delta function.

Each line is a representation of a complex vector
, and frequency increases to the
right.


Practice with the simulator


1.

See how no matter where the pulse is located, the amplitude spectrum remains the
same.

2.

Watch the 3D plots. The red one shows the vector ending points. The yellow one
shows the entire ve
ctors.

3.

Pause the execution of the simulator and use the zoom tool in different parts of the
plots.


Related Topics




Convolution



Deconvolution


EVEN AND ODD FUNCTIONS


An even function is one that seems to be reflected in the Y
-
axis. Mathematically
speaking
, an even function is every function that obey this property:

)
(
)
(
x
f
x
f



The following are examples of even functions:

).
cos(
)
(
,
)
(
,
1
)
(
2
x
x
h
x
x
g
x
f




The Fourier transform of an even function is real and even. The imaginary part of the
frequency doma
in is equal to zero.


An odd function obeys to this property:

)
(
)
(
x
f
x
f




The following are examples of odd functions:

).
sin(
)
(
,
)
(
,
)
(
3
x
x
h
x
x
g
x
x
f




The Fourier transform of an odd function is odd and imaginary. The real part of the
frequency domain
is equal to zero.


Every function can be converted to a sum of an even and an odd function as shown in
figure 1.


Figure 1.

Division of a function into even and odd components. Function a = b + c.


The causal function in figure 1
-
a is divided in two funct
ions: the even function shown in
figure 1
-
b and the odd function shown in figure 1
-
c.


The Simulator



1.

Signal:
Graph of signal in time domain.

2.

Show Help:

General description of this VI.

3.

Return to Menu:

Return to main menu

4.

Frequency of signal:

S
lide control and digital indicator of the frequency of the
signal.

5.

Phase of signal:
Slide control and digital indicator of the phase of the signal.

6.

Even or Odd:

Slide indicator of even or odd signal.

7.

Real part of FFT:

Graph of real part of Fourier

transform of the signal.

8.

Imaginary part of FFT:

Graph of imaginary part of Fourier transform of the
signal.




Practice with the simulator


1.

Set the phase of the signal in 90º and

90º to obtain even functions.

2.

Move the phase to 0º and 180º to obtain odd

functions.

3.

Compare the plots.


Related Topics




FFT Even Odd



Waves & Spectra



FFT BANDWIDTH


“The term bandwidth originates from the use of bandpass filters, which have the
property of passing only that part of the total power whose frequency lies within
a finite
range (the bandwidth). The concept can be understood from considerations of the so
-
called “ideal filter” whose power transmission characteristics are illustrated in figure 1.
This filter transmits, at full power, all components lying within its pa
ssband of width B
and attenuates completely all components at other frequencies.



Figure 1.

Ideal filter.


The concept of bandwidth can also be extended to mean the degree of frequency
uncertainty associated with measurement. This applies directly to the

case of the ideal
filter, in the sense that the frequency of a transmitted component can only be said to lie
somewhere in the bandwidth”
1


When a signal is sampled a collection of data points is obtained. Applying the fast
Fourier transform to the sample
generates a new collection of data (spectrum) containing
half of the points of the sample. Each data point contained in the spectrum is called Bin.
Each bin represents an interval of frequencies and this interval is called bandwidth. A
narrower interval in
dicates a better resolution spectrum. A spectrum where each bin
represents one hertz (1Hz bandwidth) has better resolution than a spectrum where each
bin represent 4 hertz (4Hz bandwidth).



Bandwidth
: In an FFT analyzer, the real bandwidth (frequency resol
ution) is equal to:
(frequency span / number of lines) x window equivalent noise bandwidth.


Figure 2 shows the difference between two spectra. The spectrum in figure 2
-
a has 512
bins of resolution and a bandwidth of 1Hz. Because the spectrum shows frequen
cies
between 0 and 512 Hz, each bin represents 1 hertz. The spectrum in figure 2
-
b has 64
bins of resolution and a bandwidth of 8 Hz. This means that each bin from the spectrum
represents a range of 8 hertz.



Figure 2.

FFT Bandwidth comparison.







1

RAN87 page 33.


The Simul
ator



1.

Signal:

Graph display of the signal in time domain.

2.

Milliseconds to wait:

Slide control for the time between displays ( Milliseconds ).

3.

Frequency Spectrum:

Graph display of the amplitude spectrum of the signal.

4.

Frequency Spectrum:

Graph display of
the amplitude spectrum of the signal with a
variable bandwidth.

5.

FFT Size:

Menu control for the size of the FFT.

6.

Bandwidth:

: Digital indicator of bandwidth.

7.

Return to Menu:

Return to main menu

8.

Pause:

Stop the execution in order to examine the graphs in det
ail.

9.

Show Help:

General description of this VI.



Practice with the simulator


1.

Set different FFT Size values (number of data samples that enter to the FFT
function) and compare the spectra.

2.

Reduce the execution speed or use the Pause button to analyze the p
lots.

3.

Use the zoom tools to view specific frequencies in the spectra.


Related Topics




2D
-
FFT




Constant Percentage Bandwidth Filter



FFT Even


Odd



FFT Linearity




Frequency shift

Time shift



Picket Fence Effect



Scaling Time



Time Vs. Frequency



FFT EVEN
-

O
DD


A signal can be Real, Imaginary or Complex (Real and Imaginary). It can also have the
property of being even or odd. When the Fourier transform is applied to a signal, the
properties of the transformed signal depend on the properties of the input signa
l.


The following table shows some properties of the Fourier transform for complex
functions.


Time Domain



Frequency Domain

Real




Real part even, imaginary part odd.

Imaginary



Real part odd, imaginary part even.

Real even, imaginary odd

Real

Real odd
, imaginary even

Imaginary

Real and even



Real and even

Real and odd



Imaginary and odd

Imaginary and even


Imaginary and even

Imaginary and odd


Real and odd

Complex and even


Complex and even

Complex and odd


Complex and odd




Figure 1.

Even and odd f
unctions with their respective real and imaginary Fourier transform.


The Simulator



1.

Frequency of Signal:

Slide control and digital indicator of the frequency of the
signal.

2.

Real part of Signal:
Menu ring to select the real part of the signal (zero
, odd,
even, real).

3.

Imaginary part of Signal:

Menu ring to select the imaginary part of the signal
(zero, odd, even, imaginary).

4.

Return to Menu:

Return to main menu

5.

Show Help:

General description of this VI.

6.

Real part of Signal:

Real part of s
ignal in time domain.

7.

Real part of FFT:

Real part of signal in frequency domain.

8.

Type of Signal:
Indicator of type of signal.


9.

Imaginary part of Signal:

Imaginary part of signal in time domain.

10.

Imaginary part of FFT:

Imaginary part of signa
l in frequency domain.

11.

Type of Signal:
Indicator of type of signal



Practice with the simulator


1.

Use the menu rings real part of signal and imaginary part of signal and try different
kind of signals and compare its spectra.


Related Topics




2D
-
FFT



Even

& odd functions



FFT Bandwidth



FFT Linearity



Frequency
Effect



Picket Fence



Scaling Time Shift



Time Shift



Time Vs. Frequency



Waves & Spectra


FFT LINEARITY


Linearity is one of the Fourier transform properties. It enunciates that if two signals are
added in

the time domain, their respective amplitude spectrums will be added in the
frequency domain.


If
x(t)

and
y(t)

have the Fourier transforms
X(f
) and
Y(f)
, respectively, then the sum
x(t)
+ y(t)

has the Fourier transform
X(f) + Y(f)
.


F[x(t) + y(t)] = F[x(t
)] + F[y(t)]


Figure 1 clearly illustrates the linearity property.


Figure 1.

Fourier transform linearity property.



The Simulator



1.

Frequency of signal 1:
Slide control and digital indicator of signal 1 frequency.

2.

Frequency of signal 2:

Slide cont
rol and digital indicator of signal 2 frequency.

3.

Return to Menu:

Return to main menu

4.

Show Help:

General description of this VI.

5.

Signal 1 & Signal 2:

Signal 1 and 2 in the time domain.

6.

Spectra of Signal 1 & Signal 2:

Signal 1 and 2 in the freque
ncy domain.

7.

Signal 1 + Signal 2:

Signal 1 + Signal 2 in the time domain.

8.

Spectrum of Signal 1 + Signal 2:

Signal 1 + Signal 2 in the frequency domain.



Practice with the simulator


1.

Set different frequency values for signals 1 and 2. Compare the ampl
itude spectra
plots.

2.

Set equal frequency values for signals 1 and 2, and watch how the amplitude
spectrum of the sum of the signals is twice higher than the other spectrum.


Related Topics




2D
-
FFT



FFT Even
-

Odd



FFT Bandwidth



Frequency Shift



Picket fence E
ffect



Scaling Time



Time Vs. Frequency



Time Shift



Waves & Spectra



FILTER RESPONSE TIME


Every filter, no matter its type or characteristics, takes a time to respond when a signal is
passed through it because it needs to perform calculations over the input

signal in order
to do the filtering.


During the response time the filter output contains errors, that gradually disappear until
the expected response appears on the output.


Figure 1 shows an example of filter response time. Observe how the amplitude of
the
frequency starts at zero and gradually reaches a higher value until it turns stable.



Figure 1.
Filter Response Time.


The filter response time is inversely proportional to the bandwidth of the filter. For
example, a band reject filter used to filter

frequencies from 90 to 110Hz takes less time
to response than a filter with a bandwidth from 98 to 102Hz.


The Simulator



1.

Filter type:

Menu to change the type of filter.

2.

Lower cutoff frequency:

Slide control and digital indicator of the lower cuto
ff
frequency.

3.

Side band attenuation (dB):

Indicator of the side band attenuation in dB.

4.

Order:

Control and digital indicator of the order of the filter.

5.

Return to Menu:

Return to main menu

6.

Show Help:

General description of this VI.

7.

Signal:

Sine signal 100 Hz. Time domain.

8.

Filtered signal:

Filtered signal. Time domain.

9.

Topology:
Selector of filter type.


10.

Pass Band Ripple:
Control for the pass band ripple.

11.

Upper cutoff frequency:

Slide control and digital indicator of the uppe
r cutoff
frequency.


Practice with the simulator


1.

Try different filter types varying the value of the cut frequency and observe the filter
response.

2.

Compare the filter responses by using different filter orders.


Related Topics




Constant Percentage Bandwid
th Filter



IRR Filter



Low Pass Filter



Median Filter



Single Pole Filter Step By Step


FIR FILTER (Finite Impulse Response)


The FIR filter is also known as non recursive filter, convolution filter or moving
-
average
filter since the exit of the filter can be
expressed like one convolution:







1
0
n
k
k
i
k
i
x
h
Y


where
x

represents the entrance sequence to be filtered, Y represents the output and
h

represents the coefficients of filter.


In this type of filters there is no recursion: The exit depends only on

the entrance and not
on previous values of the exit. The answer is a weighted sum of previous and present
values of the input response. Is has finite duration, so if the input stays at 0 during n
periods the output also will be 0.


FIR Filters have linear

phase response: the output answer has a constant delay, so these
filters are always stable. The disadvantage of FIR filters is that for some particular
specifications they need an filter order greater than a IIR filter.


Comparison IIR
-

FIR


Although IIR

filters are good, they have some drawbacks like not being able to take
advantage of the FFT in the implementation, because to do this a finite number of points
is necessary


Some advantages of FIR filters with respect to IIR filters are:


-

Linear phase r
esponse

-

Implementation in a recursive and non recursive way


-

Implementation using the FFT

-

Non recursive FIR filters, are always stable (its response has constant delay)


One disadvantage of the FIR filter is that a high number of points N is required
to come
near to an ideal filter.


The Simulator



1.

Filter Type:

Menu selector of type of filter.


2.

Taps:

Digital control for the number of taps of the filter. Increasing taps will
improve the filter's ability to attenuate frequency components in its stopband

and to
reduce ripple in its passband.

3.

Window:

Menu control for the type of window applied.

Smoothing windows decrease ripple in the filter passband and improve the filter's
ability to attenuate frequency components in the filter stopband.

4.

Magnitude Displa
y:

Switch to select linear or logarithmic magnitude display.

5.

Low frequency cutoff:

Slide control for the low cutoff frequency. The low cutoff
frequency f
l
must observe the Nyquist criterion 0


f
l


0.5 fs when fs is the sampling
frequency.

6.

High frequency c
utoff:

Slide control for the high cutoff frequency
.
The simulator
ignores this parameter when filter type is lowpass or highpass.

7.

Return to menu:

Return to main menu.

8.

Show Help:

General description of this simulator.

9.

Magnitude:
Frequency domain graph of th
e magnitude response of the filter.

10.

Phase:

Graph of the Phase of the filter in frequency domain.


Practice with the Simulator


1.

Compare the different windows for the same specifications.

2.

For the same type of window change the value of Taps and watch the po
les.

3.

For the same type of filter change the value of the cut off frequency and observe the
behavior.

4.

Compare the plots in linear and logarithmic scale.


Related Topics




IRR Filter



Median Filter




Filter Response Time



Constant Percentage Bandwidth Filter



S
ingle Pole Filter Step By Step


FREQUENCY AVERAGING


“In dynamic signal analyzer, digitally averaging several measurements improves
statistical accuracy and reduces the level of random asynchronous components”
1
.


Signal averaging is a technique usually use
d to obtain a noiseless signal. It can be
applied in both domains: time and frequency. The time domain averaging process is
more complex because it needs to use a trigger in order to capture the signal at the same
phase value on each sample. The frequency
domain average is very simple because it
just averages the spectra never worrying about the phase. All the spectra averaged must
have the same sampling rate and number of bins.


Figure 1 shows how the frequency averaging eliminates the unpredictable behavi
or of
noise turning it into a constant line covering all frequencies in the spectrum.


Frequency averaging doesn’t take noise components near to zero as time domain
averaging does. But time averaging remove all the frequencies not synchronized with the
tr
igger no matter if those frequencies contain important information of the signal.





1

MI
T93, page 524.



Figure 1.

Frequency averaging.


The Simulator




1.

Signal in Time Domain:

Graph display of the signal in time domain.

2.

Signal Frequency:

Slide control for the frequency of th
e signal.

3.

Noise Amplitude:

Slide control for the noise amplitude.

4.

Number Of Averages:

Slide control for the number of frequency domain averages.

5.

Amplitude Spectrum:.

Graph display of the signal in frequency domain.

6.

Averaged Amplitude Spectrum:

Graph displa
y of the averaged signal in frequency
domain.

7.

Pause:

Stop the execution in order to examine the graphs in detail.

8.

Return to Menu:

Return to main menu

9.

Show Help:

General description of this VI.

10. Wave Type:

Menu to select the type of signal.

11. Restart

Averaging:
Button to restart averaging.

Practice with the simulator


1.

Set the noise amplitude at 60.

2.

Try different values for the number of averages and observe the spectra.

3.

Increase and reduce the noise amplitude and see how the averaged spectrum noise
c
ontent varies.


Related Topics




Time Domain Averaging two signals



Windows Overlap





FREQUENCY MODULATION


Frequency modulation (FM) is a nonlinear modulation process. Consequently, unlike
amplitude modulation, the spectrum of a FM wave is not related in
a simple manner to
that of the modulating wave.


The purpose of FM is to send information over a carrier signal by varying its frequency
with a modulating signal.


If both signals are pure sine tones, then the spectrum produced consists of the carrier
freq
uency f
c

plus pairs of sidebands equally spaced about the carrier at a frequency
distance equal to the modulating frequency f
m
.


The strength of the sidebands depends on the MODULATION INDEX, which is the
ratio of the amplitude to the frequency of the modu
lating signal. Note that the amplitude
of the modulating signal equals the maximum frequency deviation

f of the resulting
wave. That is, the stronger the amplitude of the modulating signal, the greater the
number of sidebands which contribute significantly to the spectrum.


FM has the characteristic to contain very low noise level compared to the one cont
ained
in AM. Anyone who has tuned an FM receiver has probably noticed the “quieting” of
background noise of FM reception. This characteristic makes wideband FM preferable
to AM for high
-
quality transmission.




Figure 1.

Frequency modulation example.


An e
xample of FM is the violinist's vibrato, where the length of a string (and therefore
the resulting pitch) is rapidly altered by a fast oscillating movement of the finger and
wrist.


The vibration produced by some mechanical systems is sometimes frequency m
odulated.
For example, the tooth gear wearing or the excessive play in the bearings holding it, can
produce frequency modulation.



The Simulator


1.

Frequency of Carrier:

Slide control of carrier's frequency.

2.

Frequency of Tone:

Slide control of modulat
ing signal's frequency.

3.

Amplitude Spectrum

of Modulated Signal:

Modulated signal in frequency
domain.

4.

Modulation Index:

Slide control for the modulation index.

5.

Return to Menu:

Return to main menu

6.

Show Help:

General description of this VI.

7.

F
requency Modulated Signal:

Modulated signal in time domain.




Practice with the simulator


1.

Set the frequency of modulating signal to 2,00 Hz, the modulation index to 0,5 and
watch the amplitude spectrum plot. Use the zoom tools in order to appreciate it
b
etter.

2.

Gradually move the frequency of modulating signal (integer part) to different values
and compare the results.

3.

Now use fractional values in the frequency of the modulating signal and see how the
spectrum lost the symmetry.

4.

Use different values of the

modulating index and compare the plots obtained.

5.

Move the frequency of carrier signal and see how the modulation pattern is displaced
trough the spectrum.


Related Topics




Amplitude Modulation



Ridding and Beating



FREQUENCY SHIFT


The frequency shifting

consist of moving the frequency of a signal to a different value.


To shift a frequency the time function must be multiplied by a cosine function. After this
the amplitude spectrum of the signal is going to have two frequencies: one equal to the
original
frequency plus the cosine frequency and the other equal to the original
frequency minus the cosine frequency.


For example: If a signal of 100Hz is multiplied by a cosine signal of 20Hz, the result is a
signal with two frequencies: 80Hz and 120Hz.


Figure
1 shows first a signal and its spectrum. Then it shows two cases of the signal
multiplied by a cosine function and its spectrum. Observe how the frequency is shifted.




Figure 1.

Frequency shifting in FFT.


This process is commonly known as
modulation
.



T
he Simulator



1.

Signal Frequency:

Slide control and digital indicator and control of signal
frequency.

2.

Cosine Frequency (Fk):

Slide control and digital indicator and control of cosine
frequency.

3.

Return to Menu:
Return to main menu

4.

Show Help:

Ge
neral description of this VI.

5.

Signal:

Signal in time domain.

6.

Signal * COS (2p Fk t):

Signal multiplied by COS (2*pi Fk t) in time domain.

7.

Signal Spectrum:

Signal in frequency domain.

8.

Spectrum of Signal * COS( 2p Fk t ):

Signal multiplied by COS

(2*pi Fk t) in
frequency domain.



Practice with the simulator


1.

Set the signal frequency control to 100Hz and the cosine frequency to 0Hz. Observe
that the signal is not affected.

2.

Gradually move the cosine frequency and watch the spectra.

3.

If the cosine f
requency is higher than the signal frequency the left component in the
spectrum is going to be reflected because of the
aliasing

effect.


Related Topics




2D
-
FFT



FFT Bandwidth



FFT Even
-

Odd



FFT Linearity



Picket Fence Effect



Scaling Time



Time Shift



Time Vs.

Frequency



Waves & Spectra



IIR
FILTERS (Infinite Impulse Response)


This type of filter is recursive, this means that the exit depends not only on the present
input but in addition depends on previous values of the output (filter with feedback).


The gen
eral equation that characterizes IIR filters, is
:




















1
1