Skip to content Skip to navigation

Connexions

You are here: Home » Content » Digital Signal Processing Problems

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

      What are tags? tag icon

      Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

    • External bookmarks
  • E-mail the author
  • Rate this module (How does the rating system work?)

    Rating system

    Ratings

    Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

    How to rate a module

    Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

    (0 ratings)

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual Connexions member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

This content is ...

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • Rice DSS - Braille display tagshide tags

    This module is included inLens: Rice University Disability Support Services's Lens
    By: Rice University Disability Support ServicesAs a part of collection:"Fundamentals of Electrical Engineering I"

    Comments:

    "Electrical Engineering Digital Processing Systems in Braille."

    Click the "Rice DSS - Braille" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

  • Featured Content display tagshide tags

    This module is included inLens: Connexions Featured Content
    By: ConnexionsAs a part of collection:"Fundamentals of Electrical Engineering I"

    Comments:

    "The course focuses on the creation, manipulation, transmission, and reception of information by electronic means. It covers elementary signal theory, time- and frequency-domain analysis, the […]"

    Click the "Featured Content" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

Recently Viewed

This feature requires Javascript to be enabled.

Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.

Digital Signal Processing Problems

Module by: Don Johnson

Summary: (Blank Abstract)

Note: Your browser may not currently support MathML. See our browser support page for additional details. You can always view the correct math in the PDF version.

Problem Set

Problem 1

Sampling and Filtering

The signal st s t is bandlimited to 4 kHz. We want to sample it, but it has been subjected to various signal processing manipulations.

  1. What sampling frequency (if any works) can be used to sample the result of passing st s t through an RC highpass filter with R=10kΩ R 10 kΩ and C=8nF C 8 nF ?
  2. What sampling frequency (if any works) can be used to sample the derivative of st s t ?
  3. The signal st s t has been modulated by an 8 kHz sinusoid having an unknown phase: the resulting signal is stsin2π f 0 t+φ s t 2 f 0 t φ , with f 0 =8kHz f 0 8 kHz and φ=? φ ? Can the modulated signal be sampled so that the original signal can be recovered from the modulated signal regardless of the phase value φφ? If so, show how and find the smallest sampling rate that can be used; if not, show why not.

Problem 2

Non-Standard Sampling

Using the properties of the Fourier series can ease finding a signal's spectrum.

  1. Suppose a signal st s t is periodic with period TT. If ck ck represents the signal's Fourier series coefficients, what are the Fourier series coefficients of stT2 s t T 2 ?
  2. Find the Fourier series of the signal pt p t shown in Figure 1.
  3. Suppose this signal is used to sample a signal bandlimited to 1THz 1 T Hz . Find an expression for and sketch the spectrum of the sampled signal.
  4. Does aliasing occur? If so, can a change in sampling rate prevent aliasing; if not, show how the signal can be recovered from these samples.

Figure 1
Pulse Signal
Pulse Signal (sig35.png)

Problem 3

A Different Sampling Scheme

A signal processing engineer from Texas A&M claims to have developed an improved sampling scheme. He multiplies the bandlimited signal by the depicted periodic pulse signal to perform sampling (Figure 2).

Figure 2
Figure 2 (sig47.png)
  1. Find the Fourier spectrum of this signal.
  2. Will this scheme work? If so, how should T S T S be related to the signal's bandwidth? If not, why not?

Problem 4

Bandpass Sampling

The signal st s t has the indicated spectrum.

Figure 3
Figure 3 (spectrum1.png)
  1. What is the minimum sampling rate for this signal suggested by the Sampling Theorem?
  2. Because of the particular structure of this spectrum, one wonders whether a lower sampling rate could be used. Show that this is indeed the case, and find the system that reconstructs st s t from its samples.

Problem 5

Sampling Signals

If a signal is bandlimited to WW Hz, we can sample it at any rate 1Ts>2W 1 Ts 2 W and recover the waveform exactly. This statement of the Sampling Theorem can be taken to mean that all information about the original signal can be extracted from the samples. While true in principle, you do have to be careful how you do so. In addition to the rms value of a signal, an important aspect of a signal is its peak value, which equals max{|st|} s t .

  1. Let st s t be a sinusoid having frequency WW Hz. If we sample it at precisely the Nyquist rate, how accurately do the samples convey the sinusoid's amplitude? In other words, find the worst case example.
  2. How fast would you need to sample for the amplitude estimate to be within 5% of the true value?
  3. Another issue in sampling is the inherent amplitude quantization produced by A/D converters. Assume the maximum voltage allowed by the converter is Vmax Vmax volts and that it quantizes amplitudes to bb bits. We can express the quantized sample QsnTs Q s n Ts as snTs+εt s n Ts ε t , where εt ε t represents the quantization error at the n th n th sample. Assuming the converter rounds, how large is maximum quantization error?
  4. We can describe the quantization error as noise, with a power proportional to the square of the maximum error. What is the signal-to-noise ratio of the quantization error for a full-range sinusoid? Express your result in decibels.

Problem 6

Hardware Error

An A/D converter has a curious hardware problem: Every other sampling pulse is half its normal amplitude (Figure 4).

Figure 4
Figure 4 (sig42.png)
  1. Find the Fourier series for this signal.
  2. Can this signal be used to sample a bandlimited signal having highest frequency W=12T W 1 2 T ?

Problem 7

Simple D/A Converter

Commercial digital-to-analog converters don't work this way, but a simple circuit illustrates how they work. Let's assume we have a BB-bit converter. Thus, we want to convert numbers having a BB-bit representation into a voltage proportional to that number. The first step taken by our simple converter is to represent the number by a sequence of BB pulses occurring at multiples of a time interval TT. The presence of a pulse indicates a “1” in the corresponding bit position, and pulse absence means a “0” occurred. For a 4-bit converter, the number 13 has the binary representation 1101 ( 13 10 =1×23+1×22+0×21+1×20 13 10 1 2 3 1 2 2 0 2 1 1 2 0 ) and would be represented by the depicted pulse sequence. Note that the pulse sequence is “backwards” from the binary representation. We'll see why that is.

Figure 5
Figure 5 (sig10.png)

This signal serves as the input to a first-order RC lowpass filter. We want to design the filter and the parameters ΔΔ and TT so that the output voltage at time 4T 4 T (for a 4-bit converter) is proportional to the number. This combination of pulse creation and filtering constitutes our simple D/A converter. The requirements are

  • The voltage at time t=4T t 4 T should diminish by a factor of 2 the further the pulse occurs from this time. In other words, the voltage due to a pulse at 3T3T should be twice that of a pulse produced at 2T2T, which in turn is twice that of a pulse at TT, etc.
  • The 4-bit D/A converter must support a 10 kHz sampling rate.
Show the circuit that works. How do the converter's parameters change with sampling rate and number of bits in the converter?

Problem 8

Discrete-Time Fourier Transforms

Find the Fourier transforms of the following sequences, where sn s n is some sequence having Fourier transform S2πf S 2 f .

  1. -1nsn 1 n s n
  2. sncos2πf0n s n 2 f0 n
  3. xn=sn2ifneven0ifnodd x n s n 2 n even 0 n odd
  4. nsn n s n

Problem 9

Spectra of Finite-Duration Signals

Find the indicated spectra for the following signals.

  1. The discrete-time Fourier transform of sn=cos2π4nifn=-1010ifotherwise s n 4 n 2 n -1 0 1 0 otherwise
  2. The discrete-time Fourier transform of sn=nifn=-2-10120ifotherwise s n n n -2 -1 0 1 2 0 otherwise
  3. The discrete-time Fourier transform of sn=sinπ4nifn=070ifotherwise s n 4 n n 0 7 0 otherwise
  4. The length-8 DFT of the previous signal.

Problem 10

Just Whistlin'

Sammy loves to whistle and decides to record and analyze his whistling in lab. He is a very good whistler; his whistle is a pure sinusoid that can be described by sat=sin4000t sa t 4000t . To analyze the spectrum, he samples his recorded whistle with a sampling interval of TS=2.5×10-4 TS 2.5 10-4 to obtain sn=sanTS sn sa n TS . Sammy (wisely) decides to analyze a few samples at a time, so he grabs 30 consecutive, but arbitrarily chosen, samples. He calls this sequence xn xn and realizes he can write it as xn=sin4000nTS+θ ,   n=029 xn 4000n TS θ ,   n 0 29

  1. Did Sammy under- or over-sample his whistle?
  2. What is the discrete-time Fourier transform of xn xn and how does it depend on θθ?
  3. How does the 32-point DFT of xn xn depend on θθ?

Problem 11

Discrete-Time Filtering

We can find the input-output relation for a discrete-time filter much more easily than for analog filters. The key idea is that a sequence can be written as a weighted linear combination of unit samples.

  1. Show that xn=ixiδni x n i i x i δ n i where δn δ n is the unit-sample. δn=1ifn=00otherwise δ n 1 n 0 0
  2. If hn h n denotes the unit-sample response—the output of a discrete-time linear, shift-invariant filter to a unit-sample input—find an expression for the output.
  3. In particular, assume our filter is FIR, with the unit-sample response having duration q+1 q 1 . If the input has duration NN, what is the duration of the filter's output to this signal?
  4. Let the filter be a boxcar averager: hn=1q+1 h n 1 q 1 for n=0q n 0 q and zero otherwise. Let the input be a pulse of unit height and duration NN. Find the filter's output when N=q+12 N q 1 2 , qq an odd integer.

Problem 12

A Digital Filter

A digital filter has the depicted unit-sample reponse.

Figure 6
Figure 6 (sig48.png)
  1. What is the difference equation that defines this filter's input-output relationship?
  2. What is this filter's transfer function?
  3. What is the filter's output when the input is sinπn4 n 4 ?

Problem 13

A Special Discrete-Time Filter

Consider a FIR filter governed by the difference equation yn=13xn+2+23xn+1+xn+23xn1+13xn2 y n 13 x n 2 23 x n 1 x n 23 x n 1 13 x n 2

  1. Find this filter's unit-sample response.
  2. Find this filter's transfer function. Characterize this transfer function (i.e., what classic filter category does it fall into).
  3. Suppose we take a sequence and stretch it out by a factor of three. xn=sn3ifm,m=-101:n=3m0otherwise x n s n 3 m m -1 0 1 n 3 m 0 Sketch the sequence xn x n for some example sn s n . What is the filter's output to this input? In particular, what is the output at the indices where the input xn x n is intentionally zero? Now how would you characterize this system?

Problem 14

Simulating the Real World

Much of physics is governed by differntial equations, and we want to use signal processing methods to simulate physical problems. The idea is to replace the derivative with a discrete-time approximation and solve the resulting differential equation. For example, suppose we have the differential equation ddtyt+ayt=xt t y t a y t x t and we approximate the derivative by ddtyt|t=nTynTyn1TT t n T t y t y n T y n 1 T T where TT essentially amounts to a sampling interval.

  1. What is the difference equation that must be solved to approximate the differential equation?
  2. When xt=ut x t u t , the unit step, what will be the simulated output?
  3. Assuming xt x t is a sinusoid, how should the sampling interval TT be chosen so that the approximation works well?

Problem 15

The DFT

Let's explore the DFT and its properties.

  1. What is the length-KK DFT of length-NN boxcar sequence, where N<K N K ?
  2. Consider the special case where K=4 K 4 . Find the inverse DFT of the product of the DFTs of two length-3 boxcars.
  3. If we could use DFTs to perform linear filtering, it should be true that the product of the input's DFT and the unit-sample response's DFT equals the output's DFT. So that you can use what you just calculated, let the input be a boxcar signal and the unit-sample response also be a boxcar. The result of part (b) would then be the filter's output if we could implement the filter with length-4 DFTs. Does the actual output of the boxcar-filter equal the result found in the previous part?
  4. What would you need to change so that the product of the DFTs of the input and unit-sample response in this case equaled the DFT of the filtered output?

Problem 16

The Fast Fourier Transform

Just to determine how fast the FFT algorithm really is, we can take advantage of MATLAB's fft function. If x is a length-NN vector, fft(x) computes the length-NN transform using the most efficient algorithm it can. In other words, it does not automatically zero-pad the sequence and it will use the FFT algorithm if the length is a power of two. Let's count the number of arithmetic operations the fft program requires for lengths ranging from 2 to 1024.

  1. For each length to be tested, generate a vector of random numbers, calculate the vector's transform, and determine how long it took. The program illustrates the computations.
  2. Plot the vector of computation times. What lengths consume the most computations? What complexity do they seem to have? What lengths have the fewest computations?

Listing 1
Program

		
		for n=2:1024,
		  x = randn(1,n);
		  t_start = cputime;
		  fft(x);
		  time(n) = cputime - t_start;
		end
		
		

Problem 17

DSP Tricks

Sammy is faced with computing lots of discrete Fourier transforms. He will, or course, use the FFT algorithm, but he is behind schedule and needs to get his results as quickly as possible. He gets the idea of computing two transforms at one time by computing the transform of sn=s1n+s2n s n s1 n s2 n , where s1n s1 n and s2n s2 n are two real-valued signals of which he needs to compute the spectra. The issue is whether he can retrieve the individual DFTs from the result or not.

  1. What will be the DFT Sk Sk of this complex-valued signal in terms of S1k S1 k and S2k S2 k , the DFTs of the original signals?
  2. Sammy's friend, an Aggie who knows some signal processing, says that retrieving the wanted DFTs is easy: “Just find the real and imaginary parts of Sk Sk .” Show that this approach is too simplistic.
  3. While his friend's idea is not correct, it does give him an idea. What approach will work? Hint: Use the symmetry properties of the DFT.
  4. How does the number of computations change with this approach? Will Sammy's idea ultimately lead to a faster computation of the required DFTs?

Problem 18

Discrete Cosine Transform (DCT)

The discrete cosine transform of a length-NN sequence is defined to be Sck=n=0N1sncos2πnk2N Sc k n 0 N 1 sn 2nk 2N Note that the number of frequency terms is 2N1 2N 1 : k=02N1 k 0 2N 1 .

  1. Find the inverse DCT.
  2. Does a Parseval's Theorem hold for the DCT?
  3. You choose to transmit information about the signal sn s n according to the DCT coefficients. You could only send one, which one would you send?

Problem 19

A Digital Filter

A digital filter is described by the following difference equation: yn=ayn1+axnxn1 , a=12 yn a y n 1 a xn x n 1 , a 1 2

  1. What is this filter's unit sample response?
  2. What is this filter's transfer function?
  3. What is this filter's output when the input is sinπn4 n 4 ?

Problem 20

Another Digital Filter

A digital filter is determined by the following difference equation. yn=yn1+xnxn4 y n y n 1 x n x n 4

  1. Find this filter's unit sample response.
  2. What is the filter's transfer function?
  3. Find the filter's output when the input is the sinusoid sinπn2 n 2 .

Problem 21

Yet Another Digital Filter

A filter has an input-output relationship given by the difference equation yn=14xn+12xn1+14xn2 y n 14 x n 12 x n 1 14 x n 2 .

  1. What is the filter's transfer function? How would you characterize it?
  2. What is the filter's output when the input equals cosπn2 n 2 ?
  3. What is the filter's output when the input is the depicted discrete-time square-wave (Figure 7)?

Figure 7
Figure 7 (sig36.png)

Problem 22

A Digital Filter in the Frequency Domain

We have a filter with the transfer function H2πf=-2πfcos2πf H 2 f 2 f 2 f operating on the input signal xn=δnδn2 xn δn δ n 2 that yields the output yn yn.

  1. What is the filter's unit-sample response?
  2. What is the discrete-Fourier transform of the output?
  3. What is the time-domain expression for the output?

Problem 23

Digital Filters

A discrete-time system is governed by the difference equation yn=yn1+xn+xn12 y n y n 1 x n x n 1 2

  1. Find the transfer function for this system.
  2. What is this system's output when the input is sinπn2 n 2 ?
  3. If the output is observed to be yn=δn+δn1 y n δ n δ n 1 , then what is the input?

Problem 24

Digital Filtering

A digital filter has an input-output relationship expressed by the difference equation yn=xn+xn1+xn2+xn34 y n x n x n 1 x n 2 x n 3 4 .

  1. Plot the magnitude and phase of this filter's transfer function.
  2. What is this filter's output when xn=cosπn2+2sin2πn3 x n n 2 2 2 n 3 ?

Problem 25

Detective Work

The signal xn x n equals δnδn1 δ n δ n 1 .

  1. Find the length-8 DFT (discrete Fourier transform) of this signal.
  2. You are told that when xn x n served as the input to a linear FIR (finite impulse response) filter, the output was yn=δnδn1+2δn2 y n δ n δ n 1 2 δ n 2 . Is this statement true? If so, indicate why and find the system's unit sample response; if not, show why not.

Problem 26

A discrete-time, shift invariant, linear system produces an output yn=1-100 y n 1 -1 0 0 when its input xn x n equals a unit sample.

  1. Find the difference equation governing the system.
  2. Find the output when xn=cos2πf0n x n 2 f0 n .
  3. How would you describe this system's function?

Problem 27

Time Reversal has Uses

A discrete-time system has transfer function H2πf H 2 f . A signal xn x n is passed through this system to yield the signal wn w n . The time-reversed signal w-n w n is then passed through the system to yield the time-reversed output y-n y n . What is the transfer function between xn x n and yn y n ?

Problem 28

Removing “Hum”

The slang word “hum” represents power line waveforms that creep into signals because of poor circuit construction. Usually, the 60 Hz signal (and its harmonics) are added to the desired signal. What we seek are filters that can remove hum. In this problem, the signal and the accompanying hum have been sampled; we want to design a digital filter for hum removal.

  1. Find filter coefficients for the length-3 FIR filter that can remove a sinusoid having digital frequency f0 f0 from its input.
  2. Assuming the sampling rate is fs fs to what analog frequency does f0 f0 correspond?
  3. A more general approach is to design a filter having a frequency response magnitude proportional to the absolute value of a cosine: |H2πf| |cosπfN| H 2 f f N . In this way, not only can the fundamental but also its first few harmonics be removed. Select the parameter NN and the sampling rate so that the frequencies at which the cosine equals zero correspond to 60 Hz and its odd harmonics through the fifth.
  4. Find the difference equation that defines this filter.

Problem 29

Digital AM Receiver

Thinking that digital implementations are always better, our clever engineer wants to design a digital AM receiver. The receiver would bandpass the received signal, pass the result through an A/D converter, perform all the demodulation with digital signal processing systems, and end with a D/A converter to produce the analog message signal. Assume in this problem that the carrier frequency is always a large even multiple of the message signal's bandwidth W W.

  1. What is the smallest sampling rate that would be needed?
  2. Show the block diagram of the least complex digital AM receiver.
  3. Assuming the channel adds white noise and that a bb-bit A/D converter is used, what is the output's signal-to-noise ratio?

Problem 30

DFTs

A problem on Samantha's homework asks for the 8-point DFT of the discrete-time signal δn1+δn7 δ n 1 δ n 7 .

  1. What answer should Samantha obtain?
  2. As a check, her group partner Sammy says that he computed the inverse DFT of her answer and got δn+1+δn1 δ n 1 δ n 1 . Does Sammy's result mean that Samantha's answer is wrong?
  3. The homework problem says to lowpass-filter the sequence by multiplying its DFT by Hk= 1ifk=0170otherwise H k 1 k 0 1 7 0 and then computing the inverse DFT. Will this filtering algorithm work? If so, find the filtered output; if not, why not?

Problem 31

Stock Market Data Processing

Because a trading week lasts five days, stock markets frequently compute running averages each day over the previous five trading days to smooth price fluctuations. The technical stock analyst at the Buy-Lo--Sell-Hi brokerage firm has heard that FFT filtering techniques work better than any others (in terms of producing more accurate averages).

  1. What is the difference equation governing the five-day averager for daily stock prices?
  2. Design an efficient FFT-based filtering algorithm for the broker. How much data should be processed at once to produce an efficient algorithm? What length transform should be used?
  3. Is the analyst's information correct that FFT techniques produce more accurate averages than any others? Why or why not?

Problem 32

Digital Filtering of Analog Signals

RU Electronics wants to develop a filter that would be used in analog applications, but that is implemented digitally. The filter is to operate on signals that have a 10 kHz bandwidth, and will serve as a lowpass filter.

  1. What is the block diagram for your filter implementation? Explicitly denote which components are analog, which are digital (a computer performs the task), and which interface between analog and digital worlds.
  2. What sampling rate must be used and how many bits must be used in the A/D converter for the acquired signal's signal-to-noise ratio to be at least 60 dB? For this calculation, assume the signal is a sinusoid.
  3. If the filter is a length-128 FIR filter (the duration of the filter's unit-sample response equals 128), should it be implemented in the time or frequency domain?
  4. Assuming H2πf H 2 f is the transfer function of the digital filter, what is the transfer function of your system?

Problem 33

Signal Compression

Because of the slowness of the Internet, lossy signal compression becomes important if you want signals to be received quickly. An enterprising 241 student has proposed a scheme based on frequency-domain processing. First of all, he would section the signal into length-NN blocks, and compute its NN-point DFT. He then would discard (zero the spectrum) at half of the frequencies, quantize them to bb-bits, and send these over the network. The receiver would assemble the transmitted spectrum and compute the inverse DFT, thus reconstituting an NN-point block.

  1. At what frequencies should the spectrum be zeroed to minimize the error in this lossy compression scheme?
  2. The nominal way to represent a signal digitally is to use simple bb-bit quantization of the time-domain waveform. How long should a section be in the proposed scheme so that the required number of bits/sample is smaller than that nominally required?
  3. Assuming that effective compression can be achieved, would the proposed scheme yield satisfactory results?

Comments, questions, feedback, criticisms?

Send feedback