Difference between revisions of "Signal Processing Basics"

From ESE497 Wiki
Jump to navigationJump to search
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
** Homework 7
 
** Homework 7
 
***Plot the Cross Correlation of the 2 channels from Homework 6 and see if the peak is shifted from the middle, the number of samples you measured from the previous step.
 
***Plot the Cross Correlation of the 2 channels from Homework 6 and see if the peak is shifted from the middle, the number of samples you measured from the previous step.
*** Plot the Spectrogram of Channel 0.
 
**** Hint: There is a good Spectrogram example that ships with LabVIEW. Go to Help -> Find Examples... and search for STFT -STFT Spectrogram Demo.vi. You can copy from this example and paste it into your code.
 
*** Create a subVI CalcCCPeak.vi that computes the relative delay between channels 0 and 1.
 
 
**** Hints:
 
**** Hints:
 
***** Functions -> Express -> Signal Analysis -> Conv & Corr -> Cross Correlation
 
***** Functions -> Express -> Signal Analysis -> Conv & Corr -> Cross Correlation
Line 10: Line 7:
 
***** Before you plot the Cross Correlation, extract the 1D array of scalars using the From DDT so that the X-Axis is in samples.
 
***** Before you plot the Cross Correlation, extract the 1D array of scalars using the From DDT so that the X-Axis is in samples.
 
***** Look at the help on the Cross Correlation for details.
 
***** Look at the help on the Cross Correlation for details.
 +
*** Plot the Spectrogram of Channel 0.
 +
**** Hint: There is a good Spectrogram example that ships with LabVIEW. Go to Help -> Find Examples... and search for STFT -STFT Spectrogram Demo.vi. You can copy from this example and paste it into your code.
 +
*** Create a subVI CalcCCPeak.vi that computes the relative delay between channels 0 and 1.
 +
<!--
 
*[[Media:SS_Tutorial_New.pdf|Tutorial]]
 
*[[Media:SS_Tutorial_New.pdf|Tutorial]]
 
**Homework 8- Finish task from tutorial.
 
**Homework 8- Finish task from tutorial.
 
***[http://www.mathworks.com/academia/student_center/tutorials/launchpad.html Matlab Tutorials]
 
***[http://www.mathworks.com/academia/student_center/tutorials/launchpad.html Matlab Tutorials]
 +
-->
 
<!-- ***[[Media:task1.zip|Solution]] -->
 
<!-- ***[[Media:task1.zip|Solution]] -->
 +
<!--
 +
 
**Homework 9- Use the Signal Processing Palette in LabVIEW to generate 2 sinusoid waveforms (Signal Processing -> Waveform Generation -> Sine Waveform) with two different frequencies. Add these together and implement 2 separate filters for this signal (Functions -> Express -> Signal Analysis -> Filter) to extract the original sinusoids. Plot these outputs in the time domain. Also, plot them in the frequency domain (Express-> Signal Analysis -> Spectral). Make sure you can identify the frequencies corresponding to the input sinusoids in the frequency domain. Next, add (as in addition) Gaussian White Noise to the sum of the 2 sinusoids (Signal Processing -> Waveform Generation -> Gaussian White noise). Plot the spectrum  of the unfiltered signal and identify the frequencies corresponding to signal and noise again. Increase the standard deveiation of the WGN and modify your filter to improve the quality of the filtered signal. Also, looking at the sum of the 2 sinusoids and the noise, what is the relationship between the Standard Deviation of the WGN and the amplitude of the noise. Plotting the histogram of the noise (Express -> Signal Analysis -> Histogram) might help? Note: If your graph X-axis is in absolute time instead of seconds, right click on the graph and select Properties -> Display Format -> X-Axis and set it to SI units.
 
**Homework 9- Use the Signal Processing Palette in LabVIEW to generate 2 sinusoid waveforms (Signal Processing -> Waveform Generation -> Sine Waveform) with two different frequencies. Add these together and implement 2 separate filters for this signal (Functions -> Express -> Signal Analysis -> Filter) to extract the original sinusoids. Plot these outputs in the time domain. Also, plot them in the frequency domain (Express-> Signal Analysis -> Spectral). Make sure you can identify the frequencies corresponding to the input sinusoids in the frequency domain. Next, add (as in addition) Gaussian White Noise to the sum of the 2 sinusoids (Signal Processing -> Waveform Generation -> Gaussian White noise). Plot the spectrum  of the unfiltered signal and identify the frequencies corresponding to signal and noise again. Increase the standard deveiation of the WGN and modify your filter to improve the quality of the filtered signal. Also, looking at the sum of the 2 sinusoids and the noise, what is the relationship between the Standard Deviation of the WGN and the amplitude of the noise. Plotting the histogram of the noise (Express -> Signal Analysis -> Histogram) might help? Note: If your graph X-axis is in absolute time instead of seconds, right click on the graph and select Properties -> Display Format -> X-Axis and set it to SI units.
 
*[[Media:DSP_ESE497.pdf|DSP Lecture by Dr. Jim Hahn]] (for reference)
 
*[[Media:DSP_ESE497.pdf|DSP Lecture by Dr. Jim Hahn]] (for reference)
 
*[[Media:DSPConfigurations.pdf|DSP Configurations Lecture by Dr. Jim Hahn]] (for reference)
 
*[[Media:DSPConfigurations.pdf|DSP Configurations Lecture by Dr. Jim Hahn]] (for reference)
 +
-->
 +
 
<!--
 
<!--
 
From Jim Hahn
 
From Jim Hahn

Latest revision as of 14:37, 22 January 2014

  • Cross Correlation
    • Homework 7
      • Plot the Cross Correlation of the 2 channels from Homework 6 and see if the peak is shifted from the middle, the number of samples you measured from the previous step.
        • Hints:
          • Functions -> Express -> Signal Analysis -> Conv & Corr -> Cross Correlation
          • This function requires that you extract the 2 channels from the DDT. To do this, use Functions -> Express -> Sig Manip -> From DDT -> Single Waveform -> Channel 0 and then again for Channel 1. Connect the outputs of these to the X and Y inputs.
          • Before you plot the Cross Correlation, extract the 1D array of scalars using the From DDT so that the X-Axis is in samples.
          • Look at the help on the Cross Correlation for details.
      • Plot the Spectrogram of Channel 0.
        • Hint: There is a good Spectrogram example that ships with LabVIEW. Go to Help -> Find Examples... and search for STFT -STFT Spectrogram Demo.vi. You can copy from this example and paste it into your code.
      • Create a subVI CalcCCPeak.vi that computes the relative delay between channels 0 and 1.