Sie sind auf Seite 1von 6

DSP REVIEW QUESTIONS Q1) Build a subVI to compute the product, sum, and difference of two given square

matrices A and B with and without using the MathScript feature of LabVIEW. Q2) Build a subVI to compute and display the roots of a quadratic equation ax2 + bx + c = 0 for given coefficients a, b, and c with and without using the MathScript feature of LabVIEW. Q3) Build a subVI to generate the first 20 numbers of the Fibonacci sequence and store them using an indexing array with and without using the MathScript feature of LabVIEW. Q4) Build a subVI to compute the sum of the first n natural numbers for a specified value of n with and without using the MathScript feature of LabVIEW. Q5) With and without using the MathScript feature, build a VI to generate two sinusoid signals with the frequencies f1 Hz and f2 Hz and the amplitudes A1 and A2, based on a sampling frequency of 8000 Hz with the number of samples being 256. Set the frequency ranges from 100 Hz to 400 Hz and set the amplitude ranges from 20 to 200. Generate a third signal with the frequency f3 = (mod (lcm (f1, f2), 400) + 100) Hz, where mod and lcm denote the modulus and least common multiple operation, respectively, and the amplitude A3 being the sum of the amplitudes A1 and A2. Use the same sampling frequency and number of samples as used for the first two signals. Display all the signals using the legend on the same waveform graph and label them accordingly. When the MathScript feature is not being used, it is easier to use Express VIs. Q6) With and without using the MathScript feature, build a VI to check whether a given positive integer n is a prime number and display a warning message if it is not a prime number. Q7) With and without using the MathScript feature, build a VI to generate two sinusoid signals, the same as the ones in Question Q6. Generate a third signal with the frequency f3 = (gcd (f1, f2) + mean (f1, f2)) Hz, where gcd and mean denote the greatest common divisor and the average operation, respectively, and the amplitude A3 being the sum of the amplitudes A1 and A2. Use the same sampling frequency and number of samples as used for the first two signals. Display all the signals using the legend on the same waveform graph and label them accordingly. When the MathScript feature is not being used, it is easier to use Express Vis. Q8) With and without using the MathScript feature, build a VI to generate the first n prime numbers and store them using an indexing array. Display the outcome. Q9) With and without using the MathScript feature, build a VI to generate the signal given by the following equation with the frequency f Hz and amplitude A based on a sampling frequency of 4000 Hz with the number of samples being 200. Set the frequency range from 1 Hz to 1000 Hz and the amplitude range from 0 to 25. Generate the quantized bit stream and display it together with the quantization error. Also, reconstruct an analog signal using the above-sampled signal by performing a convolution operation with a sinc function as specified by Equation (3.7) in the textbook.

Q10) With and without using the MathScript feature, build a VI to compute m, the number of cycles over which DFT must be computed, as indicated by Equation

with analog frequency f, sampling frequency fs, and total number of samples N. Specify the data types of the controls - analog frequency, sampling frequency, and total number of samples - to be DBL, I32, and I32, respectively. The VI should also issue a warning message in case m is not an integer due to improper sampling. Q11) With and without using the MathScript feature, build a VI to generate the signal given by Equation with the frequencies f1 Hz and f2 Hz and the amplitude A with the number of samples being 300. Compute the sampling frequency as (4 * max (f1, f2)). Set the frequency ranges from 1 Hz to 1 KHz and the amplitude range from 0 to 40. Generate the quantized bit stream and display it together with the quantization error. Also, reconstruct an analog signal using the above-sampled signal by performing a convolution operation with a sinc function as specified by Equation (3.7) in the textbook. Q12) With and without using the MathScript feature, build a VI to compute m similar to Q9. In case of improper sampling, the VI should compute and display the nearest possible analog frequency fnew and total number of samples Nnew for having an integer number of cycles mnew. In the absence of improper sampling, use fnew = f, Nnew = N, and mnew = m. Hint: If m is not an integer, then round it to the nearest integer mnew and then recompute Nnew. If Nnew is not an integer, round it to the nearest integer and compute fnew by using the updated values of mnew and Nnew for the specified sampling frequency. Q13) Using the MathScript feature, build a VI to eliminate the frequency component f2 Hz from the composite signal given by Equation The composite signal in the Equation consists of three sinusoids with frequencies f1 Hz, f2 Hz, f3 Hz, and amplitudes A1, A2, A3, respectively. It is based on a sampling frequency of 8500 Hz with the number of samples being 400. Set the f1 Hz, f2 Hz, and f3 Hz frequency ranges to 20 Hz 60 Hz, 150 Hz 240 Hz, and 700 Hz 900 Hz, respectively. Set the A1, A2, and A3 amplitude ranges to 25, 710, and 1215, respectively. Generate the composite signal and display it together with the filtered signal. Also, display the FFT spectrum of the composite signal and the filtered signal. Q14) Using the MathScript feature, build a VI to decompose the composite signal given by Equation into its individual frequency components. The composite signal in the Equation consists of three sinusoids with frequencies f1 Hz, f2 Hz, f3 Hz, and amplitudes A1, A2, A3, respectively. It is based on a sampling frequency of 7500 Hz with the number of samples being 400. Set the f1 Hz, f2 Hz, and f3 Hz frequency ranges to 40 Hz 80 Hz, 250 Hz 360 Hz, and 850 Hz 1000 Hz, respectively. Set the A1, A2, and A3 amplitude ranges from 38, 1420, and 22

35, respectively. Generate the composite signal and display it together with the filtered signals. Also, display the FFT spectrum of the composite signal and the filtered signals. Q15) Without using the MathScript feature, build a VI to estimate the order of the Butterworth IIR filter with a sampling frequency of 8000 Hz based on the frequency, ripple, and filter type specifications. Display the estimated filter order, the cascaded filter coefficients together with the magnitude and phase response of the filter. Also, find the inverse filter and check its stability. Issue a warning message if it becomes unstable. Q16) Without using the MathScript feature, build a VI to estimate the order of the Chebyshev IIR filter with a sampling frequency of 8000 Hz based on the frequency, ripple, and filter type specifications. Display the estimated filter order, the cascaded filter coefficients together with the magnitude and phase response of the filter. Also, find the inverse filter and check its stability. Issue a warning message if it becomes unstable. Q17) With and without using the MathScript feature, build a VI to design an IIR elliptic bandpass floating-point filter based on a sampling frequency of 8000 Hz. Set the passband response as 0.1dB and stopband attenuation as 60 dB. Use a passband frequency range of 16002400 Hz and a stopband frequency range of 12002800 Hz. Generate the fixed-point filter using the DFD toolkit by quantizing the coefficients of the floating-point filter. Convert the fixed-point filter coefficients to Q15 format and find out the number of scaling required to avoid overflow. Compare the magnitude response of the filter before and after coefficient scaling. Use the scaled coefficients to filter the composite signal given by Equation

This composite signal consists of three sinusoids with the number of samples being 128. Set the frequency range as 03500 Hz for each of the frequencies f1 Hz, f2 Hz, and f3 Hz. Generate the composite signal and display it together with the filtered signal. Also, display the FFT spectrum of the composite and filtered signals. Q18) With and without using the MathScript feature, build a VI to design an IIR Chebyshev bandpass floating-point filter based on a sampling frequency of 8000 Hz. Set the passband response as 0.1dB and stopband attenuation as 60 dB. Use a passband frequency range of 13002700 Hz and a stopband frequency range of 10003000 Hz. Generate the fixed-point filter using the DFD toolkit by quantizing the coefficients of the floating-point filter. Convert the fixed-point filter coefficients to Q15 format and find out the number of scaling required to avoid overflow. Compare the magnitude response of the filter before and after coefficient scaling. Use the scaled coefficients to filter the composite signal given by Equation

This composite signal consists of three sinusoids with the number of samples being 128. Set the frequency range as 04000 Hz for each of the frequencies f1 Hz, f2 Hz, and f3 Hz. Generate the composite signal and display it together with the filtered signal. Also, display the FFT spectrum of the composite and filtered signals. Q19) With and without using the MathScript feature, build a VI to compute the equivalent decimal magnitude of 16-bit integers using the following formats: (i) Q15, (ii) Q12, and (iii) Q10. For example, in the case of Q12 format, the 4 MSB bits of a 16-bit integer should correspond to the integer part of the number and the remaining 12 bits to the fractional part of

the number. For negative integers, first generate the 2s-complement bits; then use these bits to compute the equivalent decimal magnitude, followed by negation to obtain the final result. Q20) With and without using the MathScript feature, build a VI to compute the equivalent decimal magnitude of 32-bit integers using the following formats: (i) Q25, (ii) Q23, and (iii) Q20. For example, in the case of Q25 format, the 7 MSB bits of a 32-bit integer should correspond to the integer part of the number and the remaining 25 bits to the fractional part of the number. For negative integers, first generate the 2s-complement bits; then use these bits to compute the equivalent decimal magnitude, followed by negation to obtain the final result. Q21) Build a VI graphically to implement the inverse system identification problem shown in the following Figure

by modifying the system identification VI appearing in Figure 6-5 in the textbook. Generate the desired signal by setting the delay equal to one-half the order of the unknown system. Verify the inverse system identification VI for the system orders 12 and 16. Q22) Build a VI to implement the LMS VI shown in Figure L6-2 (see the textbook) in a hybrid fashion by using the MathScript feature. Q23) Build a VI to implement the time varying channel shown in Figure L6-9 (see the textbook) by using the MathScript feature. Q24) Build a VI to implement and verify the noise cancellation system shown in Figure L6-8 (see the textbook) in a hybrid fashion as in Q22 and Q23. Q25) Build a VI to show the difference between the FFT and STFT transformations on a 512point composite signal consisting of the following four components added together: (i) a 215 Hz sinusoidal signal sampled at 1200 Hz, (ii) a 125 Hz sinusoidal signal sampled at 1200 Hz with a phase shift of 90 degrees, (iii) a chirp signal sampled at 1200 Hz with linearly increasing frequency from 150 Hz to 200 Hz, and (iv) an impulse signal having an amplitude of 5 at the 75th and 240th samples. Generate the composite signal with and without using the MathScript feature. For each case, compute and display both FFT and STFT. Observe the STFT output for varying levels of frequency bins and time window widths. Also, compare the STFT output for different userdefined windows such as Hanning and Hamming windows.

Q26) Build a VI to show the difference between the FFT and STFT transformations on a 512point composite signal consisting of the following four components added together: (i) a 175 Hz sinusoidal signal sampled at 1500 Hz, (ii) a 225 Hz sinusoidal signal sampled at 1500 Hz with a phase shift of 90 degrees, (iii) a chirp signal sampled at 1500 Hz with linearly increasing frequency from 350 425 Hz, and (iv) an impulse signal having an amplitude of 10 at the 165th and 235th samples. Generate the composite signal with and without using the MathScript feature. For each case, compute and display both FFT and STFT. Observe the STFT output for varying levels of frequency bins and time window widths.Also, compare the STFT output for different userdefined windows such as Chebyshev and Kaiser-Bessel windows. Q27) Build a VI to show the four-level DWT transformation on a 512-point composite signal consisting of four components each having 128 samples, namely three sinusoidal signals with increasing frequencies 125 Hz, 235Hz, 455Hz, and a chirp signal with linearly increasing frequency from 500 Hz to 700 Hz. Use a sampling frequency of 8000 Hz. Generate the composite signal with and without using the MathScript feature. For each case, compute and display the four-level wavelet decomposition and reconstruction of the composite signal. Q28) Build a VI to show the five-level DWT transformation on a 512-point composite signal consisting of four components each having 128 samples, namely three sinusoidal signals with increasing frequencies 165 Hz, 295Hz, 575Hz, and a chirp signal with linearly increasing frequency from 700 Hz to 900 Hz. Use a sampling frequency of 8000 Hz. Generate the composite signal with and without using the MathScript feature. Also, extract the wavelet decomposed outcomes for each stage of the filter bank with and without using the MathScript feature. For each case, compute and display the five-level wavelet decomposition and reconstruction of the composite signal. Q29) Build a DSP6x C program to implement the LMS VI shown in Figure L6-2 (see the textbook). Q30) Write a DSP6x C program to generate a sine wave with a frequency of 3000 Hz. Verify your result using Code Composer to plot the 32 most recently output samples in both the time and frequency domains. Q31) Write a DSP6x C polling-based program such that when DIP switch #3 is pressed down, LED #3 turns on and a 500 Hz cosine wave is generated for 5 seconds. Q32) Write a DSP6x C interrupt-driven program that maintains a buffer containing the 128 most recent input samples read at a sampling frequency of 16 kHz from the AIC23 codec, using the MIC IN socket on the DSK. Halt the program and plot the buffer contents using Code Composer. Q33) Write a DSP6x C program that reads input samples from the left-hand channel of the AIC23 codec ADC at a sampling frequency of 16 kHz using function input_left_sample() and, just after it has been read, writes each sample value to the right-hand channel of the AIC23 codec DAC using function output_right_sample() . Q34) Implement a suppressed carrier amplitude modulation scheme using an external input to modulate a 2 kHz carrier signal generated using a lookup table. Use a sampling frequency of

8 kHz. Test your results using a sinusoidal input signal with an amplitude less than 0.35 V and a frequency less than 2 kHz (a higher frequency input signal will cause aliasing). Use an oscilloscope with an FFT function or a spectrum analyzer to display the signal generated. Q35) Write a DSP6x C program to generate a sine wave of frequency 666 Hz and turn on LED #0 while DIP switch #0 is pressed down, generate a sine wave of frequency 1.33 kHz and turn on LED #1 while DIP switch #1 is pressed down, generate a sine wave of frequency 2 kHz and turn on LED #2 while DIP switch #2 is pressed down, and generate a sine wave of frequency 2.667 kHz and turn on LED #3 while DIP switch #3 is pressed down. Use a sampling frequency of 8 kHz and a 12-point lookup table to generate the sine waves.

Das könnte Ihnen auch gefallen