# Connexions

You are here: Home » Content » Lab 7: System Response, Analog and Digital Filters

### Recently Viewed

This feature requires Javascript to be enabled.

# Lab 7: System Response, Analog and Digital Filters

## Response of Discrete-Time Systems

This lab involves analyzing the response of discrete-time systems. Responses are calculated for three different kinds of inputs; impulse, step and sine. Figure 1 shows the completed block diagram. Connect the input variable w to an Enum Control so that an input type (impulse, step or sine) can be selected. The response of this system to any discrete-time input x[n]x[n] size 12{x $n$ } {} can be written as

y[n]=ibix[ni]+iaiy[ni]y[n]=ibix[ni]+iaiy[ni] size 12{y $n$ = Sum cSub { size 8{i} } {b rSub { size 8{i} } x $n - i$ } + Sum cSub { size 8{i} } {a rSub { size 8{i} } y $n - i$ } } {}
(1)

For this example, consider five b’s and four a’s. The system output is displayed using a waveform graph.

Figure 2 shows the front panel of the above system. The front panel can be used to interactively select the input type and set the coefficients a and b. The system response for a particular type of input (impulse, step or sine) is shown in the waveform graph.

## Square Root

As another example of discrete-time systems, let us consider taking the square root of an integer number. Often computers and calculators compute the square root of a positive number AA size 12{A} {} using the following recursive equation:

y[n]=12y[n1]+x[n]y[n1]y[n]=12y[n1]+x[n]y[n1] size 12{y $n$ = { {1} over {2} } left (y $n - 1$ + { {x $n$ } over {y $n - 1$ } } right )} {}
(2)

If the input x[n]x[n] size 12{x $n$ } {} to this equation is set as a step function of amplitude A, then y[n]y[n] size 12{y $n$ } {} converges to the square root of A after several iterations.

Figure 3 shows the block diagram for a square root computation system. The number of iterations required to converge to the true value is shown in the output. The initial condition Initial value is set as a control. Figure 4 shows the corresponding front panel.

## Analog and Digital Filtering

In this section, let us examine a basic analog and digital filtering example by implementing a lowpass and a highpass filter in the analog and digital domains, respectively. Figure 5 shows the completed block diagram of the filtering system. For analog approximation of the signals, use a higher sampling rate (dw1=0.01). To detect whether the filtering is lowpass or highpass, use the Enum Control Analog filter type. Calculate the magnitude and phase response of these filters using equations provided in Chapter 7 for analog and digital filters. Set the values of R and C as controls, and display the responses using a Build Waveform function and a waveform graph.

For the digital case, use a lower sampling rate (dw2=0.001). With the Enum controls Digital filter type 1 and Digital filter type 2, select lowpass or highpass and FIR or IIR filter type. Use a Build Waveform function and a waveform graph to display the magnitude and phase responses of the digital filters. Figure 6 shows the front panel of this filtering system. For a better view of magnitude response of the digital filter, set the properties of the waveform graph as shown in Figure 7 .

## Lab Exercises

### Exercise 1

Bandpass and Bandstop Filters

Use the lowpass and highpass filters (both analog and digital) described in Analog and Digital Filtering section to construct bandpass and bandstop filters. The bandpass filter should be able to pass signals from 50 to 200 Hz and the bandstop filter should be able to stop signals from 150 to 400 Hz. Determine the values of R and C required for this analog filter design. Also, determine the values of the coefficients required for an equivalent IIR digital filter design.

#### Solution

Insert Solution Text Here

### Exercise 2

Noise Reduction

Use an analog lowpass filter to remove the high-frequency noise described in Noise Reduction example of Lab 5. Repeat using a digital lowpass filter.

#### Solution

Insert Solution Text Here

### Exercise 3

Frequency Division Multiplexing (FDM)

FDM is widely used in digital communication to simultaneously transmit multiple signals over a single wideband channel (for details, refer to (Reference)). For FDM communication, individual signals are multiplied with different carriers to avoid overlaps in the frequency domain. Their time domain processing and corresponding frequency spectrums are shown in Figure 8. Build a VI to implement an FDM communication system for three signals x1(t),x2(t)x1(t),x2(t) size 12{x rSub { size 8{1} } $$t$$ ,x rSub { size 8{2} } $$t$$ } {}and x3(t)x3(t) size 12{x rSub { size 8{3} } $$t$$ } {}. Use the files echo_1.wav and firetrucksiren.wav on the book website and a random noise with a frequency range of 20 Hz to 20 kHz to serve as these signals.

#### Solution

Insert Solution Text Here

### Exercise 4

FDM Detector

Build a VI to implement an FDM detector system for detecting the signal x1(t)x1(t) size 12{x rSub { size 8{1} } $$t$$ } {} as shown in Figure 9.

#### Solution

Insert Solution Text Here

## Content actions

PDF | EPUB (?)

### What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

#### Definition of a lens

##### Lenses

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

##### What is in a lens?

Lens makers point to 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 member, a community, or a respected organization.

##### What are tags?

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