https://publicpagestutorbin.blob.core.windows.net/%24web/%24web/assets/Vector_3_18e566da35.png

Signals And Systems Homework Help | Signals And Systems Assignment Help

Excel in Exams with Expert Signals And Systems Homework Help Tutors.

https://publicpagestutorbin.blob.core.windows.net/%24web/%24web/assets/Frame_1_7db546ad42.png

Trusted by 1.1 M+ Happy Students

WhatsApp Support

Get Instant
Online Homework Help
via WhatsApp

Get instant homework help from top tutors—just a WhatsApp message away. 24/7 hw help support for all your academic needs!

A
S
M
R
★★★★★
2M+ students trust TutorBin
Your WhatsApp Number
phone
or
⚡ Instant reply
🔒 100% private
👨‍🏫 Top tutors
🌍 All subjects
*Get instant homework help from top tutors—just a WhatsApp message away. 24/7 support for all your academic needs!
2M+ Students Helped24/7 Live SupportExpert TutorsAll Subjects CoveredInstant Response100% ConfidentialTop Rated ServiceMoney-back Guarantee2M+ Students Helped24/7 Live SupportExpert TutorsAll Subjects CoveredInstant Response100% ConfidentialTop Rated ServiceMoney-back Guarantee

Master Signals and Systems with Expert Homework Assistance


Why Choose tutorbin.com?

  • Expertise: Leverage Ahmed's extensive knowledge and experience in Matlab and Signals and Systems for homework that not only meets but exceeds academic expectations.
  • Personalized Assistance: Receive tailored homework help that addresses your specific challenges and learning objectives, ensuring a deeper understanding of the subject matter.

How to Get Help

Whether you're struggling with a complex Signals and Systems assignment or simply looking to enhance your understanding of the subject, Expert is here to guide you through. Visit Tutorbin.com to explore our services or reach out directly via email or phone for prompt, personalized support.

Take the first step towards academic success in Signals and Systems with expert homework help from Tutorbin.com.

Recently Asked Signals And Systems Questions

Expert help when you need it
  • Q1: Signal Processing First Lab 03: AM and FM Sinusoidal Signals T Pre-Lab and Warm-Up: You should read at least the Pre-Lab and Warm-up sections of this lab assignment and go over all exercises in the Pre-Lab section before going to your assigned lab session. Verification: The Warm-up section of each lab must be completed during your assigned Lab time and the steps marked Instructor Verification must also be signed off during the lab time. One of the laboratory instructors must verify the appropriate steps by signing on the Instructor Verification line. When you have completed a step that requires verification, simply demonstrate the step to the TA or instructor. Turn in the completed verification sheet to your TA when you leave the lab. Lab Report: It is only necessary to turn in a report on Section 4 with graphs and explanations. You are asked to label the axes of your plots and include a title for every plot. In order to keep track of plots, include your plot inlined within your report. If you are unsure about what is expected, ask the TA who will grade your report. 1 Introduction The objective of this lab is to introduce more complicated signals that are related to the basic sinusoid. These signals, which implement frequency modulation (FM) and amplitude modulation (AM), are widely used in communication systems such as radio and television, but they also can be used to create interesting sounds that mimic musical instruments. There are a number of demonstrations on the CD-ROM that provide examples of these signals for many different conditions. 2 Pre-Lab We have spent a lot of time learning about the properties of sinusoidal waveforms of the form: x(t) = A cos(2π fot + 6) = Re { Aejøej 2π fot} (1) In this lab, we will extend our treatment of sinusoidal waveforms to more complicated signals composed of sums of sinusoidal signals, or sinusoids with changing frequency. 2.1 Amplitude Modulation If we add several sinusoids, each with a different frequency (fk) we can express the result as: N N xr(t) = Σ Ak cos (27 fxt + ox) = 3 {[(Anej øk) c2m fit } j2π k=1 k=1 McClellan, Schafer, and Yoder, Signal Processing First, ISBN 0-13-065562-7. Prentice Hall, Upper Saddle River, NJ 07458. ©2003 Pearson Education, Inc. (2) where Arejk is the complex amplitude of the kth complex exponential term. The choice of f/ will deter- mine the nature of the signal for amplitude modulation or beat signals we pick two or three frequencies very close together. See Chapter 3 for a more detailed discussion of beat signals. CD-ROM Chap3 Demos FM Syn- thesis 2.2 Frequency Modulated Signals We will also look at signals in which the frequency varies as a function of time. In the constant-frequency sinusoid (1) the argument of the cosine is also the exponent of the complex exponential, so the angle of this signal is the exponent (2π fot +). This angle function changes linearly versus time, and its time derivative is 2π fo which equals the constant frequency of the cosine in rad/sec. A generalization is available if we adopt the following notation for the class of signals represented by a cosine function with a time-varying angle: x(t) = A cos(v(t)) = {Aej(t)} The time derivative of the angle from (3) gives a frequency in rad/sec wi(t) = (t) (rad/sec) d dt but we prefer units of hertz, so we divide by 2π to define the instantaneous frequency: 1 d fi(t) = 2/(t) (Hz) 2π dt 2.4 MATLAB Synthesis of Chirp Signals The following MATLAB code will synthesize a chirp: = 11025; 2.3 Chirp, or Linearly Swept Frequency A chirp signal is a sinusoid whose frequency changes linearly from a starting value to an ending one. The formula for such a signal can be defined by creating a complex exponential signal with quadratic angle by defining (t) in (3) as fsamp dt dur = 1.8; tt = 0 : dt: dur; psi XX = real ( 7.7*exp(j*psi) ); soundsc (xx, fsamp); T y(t) = 2ñµt² + 2π fot + þ The derivative of ½(t) yields an instantaneous frequency (4) that changes linearly versus time. fi(t) = 2ut + fo - The slope of fi(t) is equal to 2µ and its intercept is equal to fo. If the signal starts at time t 0 secs., then fo is also the starting frequency. The frequency variation produced by such a time-varying angle is called frequency modulation. This kind of signal is an example of an frequency modulated (FM) signal. More generally, we often consider them to be part of a larger class called angle modulation signals. Finally, since the linear variation of the frequency can produce an audible sound similar to a siren or a chirp, the linear-FM signals are also called "chirps." = = 1/fsamp; 2*pi* (100 + 200*tt + 500*tt.*tt); (3) (4) McClellan, Schafer, and Yoder, Signal Processing First, ISBN 0-13-065562-7. Prentice Hall, Upper Saddle River, NJ 07458. ©2003 Pearson Education, Inc. (a) Determine the total duration of the synthesized signal in seconds, and also the length of the tt vector (number of samples). 2 CD-ROM FM Syn- thesis CD-ROM Spectrograms Sounds: Wide- band FM (b) In MATLAB, signals can only be synthesized by evaluating the signal's defining formula at discrete instants of time. These are called samples of the signal. For the chirp we do the following: x(tn) = А cos(2πµt² + 2π fotn + 0) where tn nT, represents discrete time instants. In the MATLAB code above, what is the value for tn? What are the values of A, µ, fo, and o? = (c) Determine the range of frequencies (in hertz) that will be synthesized by the MATLAB script above. Make a sketch by hand of the instantaneous frequency versus time. What are the minimum and maximum frequencies that will be heard? (d) Listen to the signal to determine whether the signal's frequency content is increasing or decreasing (use soundsc()). Notice that soundsc () needs to know the sampling rate at which the signal samples were created. For more information do help sound and help sound (). 3 Warm-up The instructor verification sheet may be found at the end of this lab. The "Beat Control GUI" is part of the SP First toolbox. 3.1 Beat Control GUI To assist you in your experiments with beat notes and AM signals, the tool called beatcon has been created. This user interface controller will exhibit the basic signal shapes for beat signals and play the signals. A small control panel will appear on the screen with buttons and sliders that vary the different parameters for the beat signals. It can also call a user-written function called beat.m. Experiment with the beat con control panel and use it to produce a beat signal with two frequency components at 850 Hz and 870 Hz. Demonstrate the plot and sound to your TA. Instructor Verification (separate page) 3.2 Function for a Chirp Use the code provided in the warm-up as a starting point in order to write a MATLAB function that will synthesize a "chirp" signal according to the following comments: function MYCHIRP 응 응 usage: 응 응 f1 = £2 = dur = T 응 응 fsamp % 응 = XX = tt = [xx,tt] = mychirp f1, f2, dur, fsamp) generate a linear-FM chirp signal XX = mychirp f1, f2, dur, fsamp) starting frequency ending frequency total time duration sampling frequency (OPTIONAL: default is 11025) (vector of) samples of the chirp signal vector of time instants for t=0 to t=dur McClellan, Schafer, and Yoder, Signal Processing First, ISBN 0-13-065562-7. Prentice Hall, Upper Saddle River, NJ 07458. ©2003 Pearson Education, Inc. 3 CD-ROM beatcon.m if( nargin < 4 ) fsamp = 11025; T -- Allow optional input argument end As a test case, generate a chirp sound whose frequency starts at 2500 Hz and ends at 500 Hz; its duration should be 1.5 sec. Listen to the chirp using the soundsc function. Include a listing of the mychirp.m function that you wrote. Instructor Verification (separate page) 3.3 Advanced Topic: Spectrograms It is often useful to think of signals in terms of their spectra. A signal's spectrum is a representation of the frequencies present in the signal. For a constant frequency sinusoid as in (1) the spectrum consists of two components, one at 2π fo, the other at -2 fo. For more complicated signals, the spectrum may be very interesting and, in the case of FM, the spectrum is considered to be time-varying. One way to represent the time-varying spectrum of a signal is the spectrogram (see Chapter 3 in the text). A spectrogram is found by estimating the frequency content in short sections of the signal. The magnitude of the spectrum over individual sections is plotted as intensity or color on a two-dimensional plot versus frequency and time. When unsure about a command, use help. There are a few important things to know about spectrograms: 1. In MATLAB the function specgram will compute the spectrogram, as already explained in a recent lecture. Type help specgram to learn more about this function and its arguments. 2. Spectrograms are numerically calculated and only provide an estimate of the time-varying frequency content of a signal. There are theoretical limits on how well spectrograms can actually represent the frequency content of a signal. A later lab will treat this problem when we use the spectrogram to extract the frequencies of piano notes. 3. A common call to the function is specgram (xx, 1024, fs). The second argument¹ is the window length which could be varied to get different looking spectrograms. The spectrogram is able to "see" the separate spectrum lines with a longer window length, e.g., 1024 or 2048.² 4. If you are working at home, you might not have the specgram () function because it is part of the "Signal Processing Toolbox." In that case, use the function plotspec (xx, fs) which was loaded when you installed the SP First toolbox. = McClellan, Schafer, and Yoder, Signal Processing First, ISBN 0-13-065562-7. Prentice Hall, Upper Saddle River, NJ 07458. ©2003 Pearson Education, Inc. ● Note: The argument list for plot spec () has a different order from specgram, because plotspec () uses an optional third argument for the window length (default value is 256). In addition, plotspec () does not use color for the spectrogram; instead, darker shades of gray indicate larger values with black being the largest. In order to see what the spectrogram produces, run the following code: fs=8000; xX cos (3000*pi* (0:1/fs:0.5)); specgram (xx, 1024, fs); colorbar or, if you are using plotspec (xx,fs): fs=8000; xx = cos (3000*pi* (0:1/fs:0.5)); plotspec (xx, fs,1024); colorbar Notice that the spectrogram image contains one horizontal line at the correct frequency of the sinusoid. 'If the second argument is made equal to the "empty matrix" then its default value of 256 is used. 2Usually the window length is chosen to be a power of two, because a special algorithm called the FFT is used in the computa- tion. The fastest FFT programs are those where the signal length is a power of 2. CD-ROM 4 Sounds & Spec- trograms 4 Lab Exercise: Chirps and Beats For the lab exercise and lab report, you will synthesize some AM and FM signals. In order to verify that they have the correct frequency content, you will use the spectrogram. Your lab report should discuss the connection between the “time-domain" definition of the signal and its "frequency-domain" content. 4.1 Beat Notes In the section on beat notes in Chapter 3 of the text, we analyzed the situation in which we had two sinusoidal signals of slightly different frequencies; i.e., x(t) = A cos(2π (fc − ƒ^)t) + B cos(2π(fc + ƒ^)t) In this part, we will compute samples of such a signal and listen to the result. (a) Write an M-file called beat.m that implements (5) and has the following as its first lines: function %BEAT 응 응 응 응 olo olo olo olo 응 응 응 % 응 010 010 응 usage: [xx, tt] = beat (A, B, fc, delf, fsamp, dur) samples of the sum of two cosine waves compute [xx, tt] = T --Second Output: A = amplitude of lower frequency cosine B = amplitude of higher frequency cosine fc = center frequency delf = frequency difference fsamp sampling rate dur = XX = beat (A, B, fc, delf, fsamp, dur) total time duration in seconds output vector of samples tt = time vector corresponding to xx (5) Include a copy of your M-file in your lab report. You might want to call the syn_sin () function written in Lab 2 to do the calculation. The function should also generate its own time vector, because that vector can be used to define the horizontal axis when plotting. (b) To assist you in your experiments with beat notes, a tool called beat con has been created. This user interface controller is able to call your function beat.m, if you check the box Use External beat() in the lower left-hand corner of the GUI. Therefore, before you invoke beatcon you should be sure your M-file is free of errors. Also, make sure that your beat.m function is on the MATLAB path. Test the M-file written in part (a) via beatcon by using the values A=10, B=10, fc=1000, delf=10, fsamp=11025, and dur=1 secs. Plot the first 0.2 seconds of the resulting signal. De- scribe the waveform and explain its properties. Hand in a copy of your plot with measurements of the period of the "envelope" and period of the high frequency signal underneath the envelope. McClellan, Schafer, and Yoder, Signal Processing First, ISBN 0-13-065562-7. Prentice Hall, Upper Saddle River, NJ 07458. ©2003 Pearson Education, Inc. (c) (Optional)³ Experiment with different values of the frequency difference f▲. Listen to the sounds (there is a button on beat con that will do this for you automatically) and think about the relationship between the sound and waveform. 3"Optional" means that you do not have to include this in your lab report. 5 CD-ROM beatcon.mSee Answer
  • Q2: Signal Processing First Lab 09: Encoding and Decoding Touch-Tone Signals Pre-Lab and Warm-Up: You should read at least the Pre-Lab and Warm-up sections of this lab assignment and go over all exercises in the Pre-Lab section before going to your assigned lab session. Verification: The Warm-up section of each lab must be completed during your assigned Lab time and the steps marked Instructor Verification must also be signed off during the lab time. One of the laboratory instructors must verify the appropriate steps by signing on the Instructor Verification line. When you have completed a step that requires verification, simply demonstrate the step to the TA or instructor. Turn in the completed verification sheet to your TA when you leave the lab. Lab Report: It is only necessary to turn in a report on Section 4 with graphs and explanations. You are asked to label the axes of your plots and include a title for every plot. In order to keep track of plots, include your plot inlined within your report. If you are unsure about what is expected, ask the TA who will grade your report. 1 Introduction This lab introduces a practical application where sinusoidal signals are used to transmit information: a touch-tone dialer. Bandpass FIR filters can be used to extract the information encoded in the waveforms. The goal of this lab is to design and implement bandpass FIR filters in MATLAB, and to do the decoding automatically. In the experiments of this lab, you will use firfilt (), or conv (), to implement filters and freqz () to obtain the filter's frequency response.¹ As a result, you should learn how to characterize a filter by knowing how it reacts to different frequency components in the input. 1.1 Review In a previous lab, you learned about both L-Point Average and Nulling Filters. Another very important FIR filter is known as the Band-Pass Filter (BPF). For the rest of the lab, you will learn how to design these filters and how to use them to do certain tasks for you. One practical example is the dual tone multiple frequency (DTMF) signals used to dial a telephone. Read the following Background section before coming to the lab to speed up the sign-off process in the lab. 1.2 Background: Telephone Touch Tone Dialing Telephone touch-tone² pads generate dual tone multiple frequency (DTMF) signals to dial a telephone. When any key is pressed, the sinusoids of the corresponding row and column frequencies (in Fig. 1) are generated and summed, hence dual tone. As an example, pressing the 5 key generates a signal containing the sum of the two tones at 770 Hz and 1336 Hz together. The frequencies in Fig. 1 were chosen (by the design engineers) to avoid harmonics. No frequency is an integer multiple of another, the difference between any two frequencies does not equal any of the frequencies, and the sum of any two frequencies does not equal any of the frequencies.³ This makes it easier to detect exactly which tones are present in the dialed signal in the presence of non-linear line distortions. 'If you are working at home and do not have the function freqz.m, there is a substitute available in the SP First toolbox called freekz.m. 2Touch Tone is a registered trademark ³More information can be found at: http://www.genave.com/dtmf.htm, or search for "DTMF" on the Internet. McClellan, Schafer, and Yoder, Signal Processing First, ISBN 0-13-065562-7. Prentice Hall, Upper Saddle River, NJ 07458. 2003 Pearson Education, Inc. 1 FREQS 1209 Hz 1336 Hz 1477 Hz 1633 Hz 697 Hz 1 2 3 A 770 Hz 4 5 6 B 852 Hz 7 8 9 C 941 Hz * 0 # Ꭰ Figure 1: Extended DTMF encoding table for Touch Tone dialing. When any key is pressed the tones of the corresponding column and row are generated and summed. Keys A-D (in the fourth column) are not implemented on commercial and household telephone sets, but are used in some military and other signaling applications. 1.3 DTMF Decoding There are several steps to decoding a DTMF signal: 1. Divide the time signal into short time segments representing individual key presses. 2. Filter the individual segments to extract the possible frequency components. Bandpass filters can be used to isolate the sinusoidal components. 3. Determine which two frequency components are present in each time segment by measuring the size of the output signal from all of the bandpass filters. 4. Determine which key was pressed, 0-9, A-D, *, or # by converting frequency pairs back into key names according to Fig. 1. It is possible to decode DTMF signals using a simple FIR filter bank. The filter bank in Fig. 2 consists of eight bandpass filters which each pass only one of the eight possible DTMF frequencies. The input signal for all the filters is the same DTMF signal. 697 Hz Y1[n] 770 Hz Y2[n] 852 Hz Y3 [n] x[n] ° 1477 Hz Y6 [n] 1633 Hz Y7[n] Figure 2: Filter bank consisting of bandpass filters (BPFs) which pass frequencies corresponding to the eight DTMF component frequencies listed in Fig. 1. The number is each box is the center frequency of the BPF. McClellan, Schafer, and Yoder, Signal Processing First, ISBN 0-13-065562-7. Prentice Hall, Upper Saddle River, NJ 07458. 2003 Pearson Education, Inc. 2 Here is how the system should work: When the input to the filter bank is a DTMF signal, the outputs from two of the bandpass filters (BPFs) should be larger than the rest. If we detect (or measure) which two outputs are the large ones, then we know the two corresponding frequencies. These frequencies are then used as row and column pointers to determine the key from the DTMF code. A good measure of the output levels is the peak value at the filter outputs, because when the BPF is working properly it should pass only one sinusoidal signal and the peak value would be the amplitude of the sinusoid passed by the filter. More discussion of the detection problem can be found in Section 4. 2 Pre-Lab 2.1 Signal Concatenation In a previous lab, a very long music signal was created by joining together many sinusoids. When two signals were played one after the other, the composite signal was created by the operation of concatenation. In MATLAB, this can be done by making each signal a row vector, and then using the matrix building notation as follows: XX = ( xx, xxnew ]; where xxnew is the sub-signal being appended. The length of the new signal is equal to the sum of the lengths of the two signals xx and xxnew. A third signal could be added later on by concatenating it to xx. 2.1.1 Comment on Efficiency = In MATLAB the concatenation method, xx [ XX, xxnew ], would append the signal vector xxnew to the existing signal xx. However, this becomes an inefficient procedure if the signal length gets to be very large. The reason is that MATLAB must re-allocate the memory space for xx every time a new sub-signal is appended via concatenation. If the length xx were being extended from 400,000 to 401,000, then a clean section of memory consisting of 401,000 elements would have to be allocated followed by a copy of the existing 400,000 signal elements and finally the append would be done. This is clearly inefficient, but would not be noticed for short signals. An alternative is to pre-allocate storage for the complete signal vector, but this can only be done if the final signal length is known ahead of time. 2.1.2 Encoding from a Table Explain how the following program uses frequency information stored in a table to generate a long signal via concatenation. Determine the size of the table and all of its entries, and then state the playing order of the frequencies. Determine the total length of the signal played by the soundsc function. How many samples and how many seconds? ftable = fs 8000; [1;2;3;4;5]*[80,110] XX = [ ] ; disp(' Here we go through the Loop keys = rem (3:12, 10) + 1; for ii = 1:length(keys) kk = keys (ii); XX = [xx, zeros (1,400)]; krow = ceil (kk/2); kcol = rem (kk-1, 2) + 1; XX = [xx, cos (2*pi* ftable (krow, kcol) * (0:1199)/fs) ]; McClellan, Schafer, and Yoder, Signal Processing First, ISBN 0-13-065562-7. Prentice Hall, Upper Saddle River, NJ 07458. 2003 Pearson Education, Inc. 3 end soundsc (xx, fs); 2.2 Overlay Plotting Sometimes it is convenient to overlay information onto an existing MATLAB plot. The MATLAB command hold on will inhibit the figure erase that is usually done just before a new plot. Demonstrate that you can do an overlay by following these instructions: (a) Plot the magnitude response of the 5-point averager, created from HH=freqz (ones (1,5)/5,1,ww) Make sure that the horizontal frequency axis extends from ―π to +π. (b) Use the stem function to place vertical markers at the zeros of the frequency response. hold on, stem (2*pi/5* [−2,-1,1,2],0.3*ones (1,4), 'r.'), hold off 3 Warm-up: DTMF Synthesis 3.1 DTMF Dial Function Write a function, dtmfdial.m, to implement a DTMF dialer based on the frequency table defined in Fig. 1. A skeleton of dtmfdial.m is given in Fig. 3. In this warm-up, you must complete the dialing code function xx = dtmfdial (keyNames, fs) %DTMFDIAL Create a signal vector of tones which will dial 응 == % usage: 응 응 ... 응 a DTMF (Touch Tone) telephone system. XX = dtmfdial (keyNames, fs) keyNames XX = fs = vector of characters containing valid key names sampling frequency signal vector that is the concatenation of DTMF tones. dtmf.keys ['1','2' = 3' '4'' 5 'A'; '6','B' ; ירי 8', '9', 'C' ; '*', '0','%','D′]; dtmf.colTones = ones (4,1) * [1209,1336,1477,1633]; dtmf.rowTones = [697;770;852; 941] *ones (1,4); Figure 3: Skeleton of dtmfdial.m, a DTMF phone dialer. Complete this function with additional lines of code. so that it implements the following: 1. The input to the function is a vector of characters, each one being equal to one of the key names on the telephone. The MATLAB structure called dtmf contains the key names in the field dtmf.keys which is a 4 × 4 array that corresponds exactly to the keyboard layout in Fig. 1. McClellan, Schafer, and Yoder, Signal Processing First, ISBN 0-13-065562-7. Prentice Hall, Upper Saddle River, NJ 07458. 2003 Pearson Education, Inc. 2. The output should be a vector of samples with sampling rate fs = 8000 Hz containing the DTMF tones, one tone pair per key. Remember that each DTMF signal is the sum of a pair of (equal am- plitude) sinusoidal signals. The duration of each tone pair should be exactly 0.20 sec., and a silence, about 0.05 sec. long, should separate the DTMF tone pairs. These times can be declared as fixed code in dtmfdial. (You do not need to make them variable in your function.) 3. The frequency information is given as two 4×4 matrices (dtmf.colTones and dtmf.rowTones): one contains the column frequencies, the other has the row frequencies. You can translate a key such as the 6 key into the correct location in these 4 × 4 matrices by using MATLAB's find function. For example, the key 6 is in row 2 and column 3, so we would generate sinusoids with frequencies equal to dtmf.colTones (2,3) and dtmf.rowTones (2,3). To convert an key name to its corresponding row-column indices, consider the following example: [ii,jj] = find('3' ==dtmf.keys) Also, consult the MATLAB code in Section 2.1 above and modify it for the 4×4 tables in dtmfdial.m. 4. You should implement error checking so that an illegitimate key name is rejected. Your function should create the appropriate tone sequence to dial an arbitrary phone number. When played through a telephone handset, the output of your function will be able to dial the phone. You could use specgram to check your work.4 Instructor Verification (separate page) 3.2 Simple Bandpass Filter Design The L-point averaging filter is a lowpass filter. Its passband width is controlled by L, being inversely proportional to L. It is also possible to create a filter whose passband is centered around some frequency other than zero. One simple way to do this is to define the impulse response of an L-point FIR as: h[n] = ẞcos (ŵen), 0 ≤ n <L where L is the filter length, and ŵ is the center frequency that defines the frequency location of the passband. For example, we pick ŵc = 0.2π if we want the peak of the filter's passband to be centered at 0.2π. Also, it is possible to choose ẞ so that the maximum value of the frequency response magnitude will be one. The bandwidth of the bandpass filter is controlled by L; the larger the value of L, the narrower the bandwidth. This particular filter is also discussed in the section on useful filters in Chapter 7 of SP First. (a) Generate a bandpass filter that will pass a frequency component at ŵ = 0.2π. Make the filter length (L) equal to 51. Figure out the value of ẞ so that the maximum value of the frequency response magnitude will be one. Make a plot of the frequency response magnitude and phase. Hint: use MATLAB's freqz () function to calculate these values. (b) The passband of the BPF filter is defined by the region of the frequency response where |H(ejŵ)| is close to its maximum value of one. Typically, the passband width is defined as the length of the frequency region where |H(e³)| is greater than 1/√2 = 0.707. Note: you can use MATLAB's find function to locate those frequencies where the magnitude satisfies |H(e³ŵ)| ≥ 0.707 (similar to Fig. 4). 4In MATLAB the demo called phone also shows the waveforms and spectra generated in a DTMF system. McClellan, Schafer, and Yoder, Signal Processing First, ISBN 0-13-065562-7. Prentice Hall, Upper Saddle River, NJ 07458. 2003 Pearson Education, Inc. 5See Answer
  • Q3: Signal Processing First Lab 07: Sampling, Convolution, and FIR Filtering Pre-Lab and Warm-Up: You should read at least the Pre-Lab and Warm-up sections of this lab assignment and go over all exercises in the Pre-Lab section before going to your assigned lab session. Verification: The Warm-up section of each lab must be completed during your assigned Lab time and the steps marked Instructor Verification must also be signed off during the lab time. One of the laboratory instructors must verify the appropriate steps by signing on the Instructor Verification line. When you have completed a step that requires verification, simply demonstrate the step to the TA or instructor. Turn in the completed verification sheet to your TA when you leave the lab. Lab Report: It is only necessary to turn in a report on Section 3 with graphs and explanations. You are asked to label the axes of your plots and include a title for every plot. In order to keep track of plots, include your plot inlined within your report. If you are unsure about what is expected, ask the TA who will grade your report. 1 Pre-Lab The goal of this lab is to learn how to implement FIR filters in MATLAB, and then study the response of FIR filters to various signals, including images and speech. As a result, you should learn how filters can create interesting effects such as blurring and echoes. In addition, we will use FIR filters to study the convolution operation and properties such as linearity and time-invariance. In the experiments of this lab, you will use firfilt( ), or conv ( ), to implement 1-D filters and conv2() to implement two-dimensional (2-D) filters. The 2-D filtering operation actually consists of 1-D filters applied to all the rows of the image and then all the columns. 1.1 Two GUIS This lab involves on the use of two MATLAB GUIs: one for sampling and aliasing and one for convolution. 1. con2dis: GUI for sampling and aliasing. An input sinusoid and its spectrum is tracked through A/D and D/A converters. 2. dconvdemo: GUI for discrete-time convolution. This is exactly the same as the MATLAB functions conv() and firfilt ( ) used to implement FIR filters. 1.2 Overview of Filtering For this lab, we will define an FIR filter as a discrete-time system that converts an input signal x[n] into an output signal y[n] by means of the weighted summation: M CD-ROM Chap 4 demos con2dis CD-ROM Chap 5 demos dconvdemo y[n] = [ bk x[n = k] - k=0 (1) Equation (1) gives a rule for computing the nth value of the output sequence from certain values of the input sequence. The filter coefficients {bk} are constants that define the filter's behavior. As an example, consider McClellan, Schafer, and Yoder, Signal Processing First, ISBN 0-13-065562-7. Prentice Hall, Upper Saddle River, NJ 07458. 2003 Pearson Education, Inc. 1 the system for which the output values are given by u[n] = - \}x[n] + ¹³x[n − 1] + ¾½³x[n − 2] (2) = }} {x[n] + x[n − 1] + x[n − 2]} This equation states that the nt 2th value of the output sequence is the average of the nth value of the input sequence x[n] and the two preceding values, x[n − 1] and x[n – 2]. For this example the b₁'s are bo b₁ = ½³, and b₂ = ½³. - - CD-ROM MATLAB has a built-in function, filter( ), for implementing the operation in (1), but we have also supplied another M-file firfilt( ) for the special case of FIR filtering. The function filter implements a wider class of filters than just the FIR case. Technically speaking, the firfilt function toolbox implements the operation called convolution. The following MATLAB statements implement the three-point averaging system of (2): nn = 0:99; XX = cos( 0.08*pi*nn ); bb = [1/3 1/3 1/3]; уу = firfilt (bb, xx); %<--Time indices %<--Input signal %<--Filter coefficients %<--Compute the output In this case, the input signal xx is a vector containing a cosine function. In general, the vector bb con- tains the filter coefficients {b} needed in (1). These are loaded into the bb vector in the following way: bb = [b0, b1, b2, ... , bм]. In MATLAB, all sequences have finite length because they are stored in vectors. If the input signal has, for example, L samples, we would normally only store the L samples in a vector, and would assume that x[n] = 0 for n outside the interval of L samples; i.e., we do not have to store any zero samples unless it suits our purposes. If we process a finite-length signal through (1), then the output sequence y[n] will be longer than x[n] by M samples. Whenever firfilt( ) implements (1), we will find that length (yy) = length (xx)+length (bb)-1 In the experiments of this lab, you will use firfilt( ) to implement FIR filters and begin to understand how the filter coefficients define a digital filtering algorithm. In addition, this lab will introduce examples to show how a filter reacts to different frequency components in the input. 1.3 Pre-Lab: Run the GUIS The first objective of this lab is to demonstrate usage of the two GUIs. First of all, you must download the ZIP files for each and install them. Each one installs as a directory containing a number of files. You can put the GUIs on the matlabpath, or you can run the GUIs from their home directories. 1.4 Sampling and Aliasing Demo In this demo, you can change the frequency of an input signal that is a sinusoid, and you can change the sampling frequency. The GUI will show the sampled signal, x[n], it spectrum and also the reconstructed output signal, y(t) with its spectrum. Figure 1 shows the interface for the con2dis GUI. In order to see the entire GUI, you must select Show All Plots under the Plot Options menu. In the pre-Lab, you should perform the following steps with the con2dis GUI: (a) Set the input to x(t) = cos(40πt) SP First firfilt.m McClellan, Schafer, and Yoder, Signal Processing First, ISBN 0-13-065562-7. Prentice Hall, Upper Saddle River, NJ 07458. 2003 Pearson Education, Inc. 2 - 6x Figure No. 1 Plot Options Exit 1 0.5 -0.5 0 -1 b 0 Input: cos(2 16.1 t) 0.5 0 cos(2π 0.81 n) 0.5 0 Output: cos(2 3.9 t) www.www W 0.1 0.2 -0.5 -1 0.3 0.4 0.5 0 1 2 3 4 5 6 7 8 9 10 Time (sec) Continuous Time Spectrum Time (samples) Discrete Time Spectrum -0.5 -1 0 0.1 0.2 0.3 0.4 0.5 Time (sec) Continuous Time Spectrum 1 1 1 ALIASING! 0.8 0.8 0.8 0.6 0.4 0.2 0.6 0.4 0.2 0.6 0.4 0.2 0 0 -20 -10 0 f (Hz) 10 20 -1 -0.5 0 0.5 1 -20 -10 0 10 20 20 Rad/sec C Radian f = 10/1 f (Hz) f = 16.1 (Hz) Phase = 0.0 = 20.0 (Hz) 16.1 20 0 Figure 1: Continuous to discrete demo interface. (b) Set the sampling rate to fs = 24 samples/sec. (c) Determine the locations of the spectrum lines for the discrete-time signal, x[n], found in the middle panels. Click the Radian button to change the axis to from ŷ to ŵ. (d) Determine the formula for the output signal, y(t) shown in the rightmost panels. What is the output frequency in Hz? 1.5 Discrete-Time Convolution Demo In this demo, you can select an input signal x[n], as well as the impulse response of the filter h[n]. Then the demo shows the “flipping and shifting” used when a convolution is computed. This corresponds to the sliding window of the FIR filter. Figure 2 shows the interface for the dconvdemo GUI. In the pre-lab, you should perform the following steps with the dconvdemo GUI. (a) Click on the Get x[n] button and set the input to a finite-length pulse: x[n] = (u[n] − u[n — 10]). - (b) Set the filter to a three-point averager by using the Get h[n] button to create the correct impulse response for the three-point averager. Remember that the impulse response is identical to the bk's for an FIR filter. Also, the GUI allows you to modify the length and values of the pulse. (c) Use the GUI to produce the output signal. McClellan, Schafer, and Yoder, Signal Processing First, ISBN 0-13-065562-7. Prentice Hall, Upper Saddle River, NJ 07458. 2003 Pearson Education, Inc. 3 Discrete Convolution Demo v2.03 Plot Options Help 1 Signal 0.8 Flipped Signal 0.6- 0.5 0 Input 1 -x Impulse Response 0.4 0.2 n 0 0 0 20 40 0 5 10 0 ↑ n = 4 0.5 Multiplication 0.4 Get x[n] Get h[n] Flip x[n] Flip h[n] 0.3- 0.25 Signal Axis: 0.1- o = x[k] 0 ↓ n = 4 2.5 Linear Convolution 2- 1.5 1- 0.5 o = h[n-k] Multiplication Axis: x[k]h[n-k] Convolution Axis: y[n] = x[k]h[n-k] Close Help 0 -25 -20 -15 -10 -5 0 5 10 15 20 25 Figure 2: Interface for discrete-time convolution GUI. (d) When you move the mouse pointer over the index “n” below the signal plot and do a click-hold, you will get a hand tool that allows you to move the “n”-pointer. By moving the pointer horizontally you can observe the sliding window action of convolution. You can even move the index beyond the limits of the window and the plot will scroll over to align with “n.” 1.6 Filtering via Convolution You can perform the same convolution as done by the dconvdemo GUI by using the MATLAB function firfilt, or conv. The preferred function is firfilt. (a) For the Pre-Lab, you should do the filtering with a 3-point averager. The filter coefficient vector for the 3-point averager is defined via: bb = 1/3*ones (1,3); Use firfilt to process an input signal that it a length-10 pulse: 1 for n = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 = x[n] = { 0 elsewhere xn={ NOTE: in MATLAB indexing can be confusing. Our mathematical signal definitions start at n = 0, but MATLAB starts its indexing at “1”. Nevertheless, we can ignore the difference and pretend that MAT- LAB is indexing from zero, as long as we don't try to write x[0] in MATLAB. Thus we can generate the length-10 pulse and put it inside of a longer vector via xx [ones (1,10), zeros(1,5)]. = McClellan, Schafer, and Yoder, Signal Processing First, ISBN 0-13-065562-7. Prentice Hall, Upper Saddle River, NJ 07458. 2003 Pearson Education, Inc. (b) To illustrate the filtering action of the 3-point averager, it is informative to make a plot of the input signal and output signals together. Since x[n] and y[n] are discrete-time signals, a stem plot is needed. One way to put the plots together is to use subplot (2,1,*) to make a two-panel display: nn = first:last; %--- use first=1 and last=length(xx) subplot(2,1,1); stem (nn, xx(nn)) subplot (2,1,2); stem(nn, yy(nn), 'filled') xlabel('Time Index (n)') --Make black dots This code assumes that the output from firfilt is called yy. Try the plot with first equal to the beginning index of the input signal, and last chosen to be the last index of the input. In other words, the plotting range for both signals will be equal to the length of the input signal (which was "padded" with five extra zero samples). (c) Explain the filtering action of the 3-point averager by comparing the plots in the previous part. This filter might be called a “smoothing” filter. Note how the transitions in x[n] from zero to one, and from one back to zero, have been "smoothed." 2 Warm-up 2.1 Sampling and Aliasing Use the con2dis GUI to do the following problem: (a) Input frequency is 12 Hz. (b) Sampling frequency is 15 Hz. (c) Determine the frequency of the reconstructed output signal (d) Determine the locations in ŵ of the lines in the spectrum of the discrete-time signal. Give numerical values. Instructor Verification (separate page) (e) Change the sampling frequency to 12 Hz, and explain the appearance of the output signal. 2.2 Discrete-Time Convolution In this section, you will generate filtering results needed in a later section. Use the discrete-time convolution GUI, dconvdemo, to do the following: - - (a) Set the input signal to be x[n] = (0.9)" (u[n] — u[n — 10]). Use the “Exponential” signal type within Get x[n]. (b) Set the impulse response to be h[n] = d[n] − 0.96[n — 1]. Once again, use the “Exponential” signal type within Get h[n]. (c) Illustrate the output signal y[n] and explain why it is zero for almost all points. Compute the numerical value of the last point in y[n], i.e., the one that is negative and non-zero. Instructor Verification (separate page) McClellan, Schafer, and Yoder, Signal Processing First, ISBN 0-13-065562-7. Prentice Hall, Upper Saddle River, NJ 07458. 2003 Pearson Education, Inc. 5See Answer
  • Q4:Problem 4. (20 pts.) The frequency response of a continuous time LTI system is given by the following magnitude and phase profile: *Hw) | Hiws/ ™/2 -600 + Goon -600 -"/₂ What is the steady state time domain output y(t) for input x(t) = cos (1000πt) + 2 cos (50) πt) + 3 cos (500mt) GOUT X(+) het) Hiw)See Answer
  • Q5:3. A discrete-time signal x [n] is known to be a sinusoid x [n] = A cos (@on + p) The values of x [n] are tabulated below for 0 ≤ n ≤ 4: no 1 2 3 x [n] 2.4271 2.9002 | 2.9816| 2.6603 1.9798 Plot x [n], then determine the numerical values of A, , and oSee Answer
  • Q6:1. Consider the sawtooth signal x (t) below. x(t) -3 -1 0 2 3 Use Fourier analysis to verify the following coefficient values (show all work): -2 ak = 1 ½, k = 0 2' 2πk, k#0 HINT: You may need to integrate by parts.See Answer
  • Q7:4. Convert the following complex numbers to polar form (rejº): a) −3+j3 b) 1-j√√3 c) 3+ j4 d) j8See Answer
  • Q8:9.1. For each of the following integrals, specify the values of the real parameter o which ensure that the integral converges: *e-Ste-(o+jw)t dt (a) lo (c) S -5te-(o+jw)t dt e-5\t\e-(o+ jw)t dt (e) е (b) [e-Ste-(a+jw)t dt (d) e-Ste-(a+jw)t dt (f) [_e=5\t\e-(o+jw)t dtSee Answer
  • Q9:7.3. The frequency which, under the sampling theorem, must be exceeded by the sam- pling frequency is called the Nyquist rate. Determine the Nyquist rate corresponding to each of the following signals: (a) x(t) = 1 + cos(2,000mt) + sin(4,000mt) (b) x(t)=sin(4,000) (c) x(t) = at sin(4,000) WISee Answer
  • Q10:7.2. A continuous-time signal x(t) is obtained at the output of an ideal lowpass filter with cutoff frequency w 1,000. If impulse-train sampling is performed on x(1), which of the following sampling periods would guarantee that x(1) can be recovered from its sampled version using an appropriate lowpass filter? (a) 7 0.5 x 10-3 (b) T = 2x 10-3 (c) T = 10-4See Answer
  • Q11:7.5. Let x(t) be a signal with Nyquist rate wo. Also, let y(t) = x(t)p(t-1), Chap. 7 Problems where p(t) = 8(t-nT), and 7 < 2π wo 557 Specify the constraints on the magnitude and phase of the frequency response of a filter that gives x(1) as its output when y(t) is the input.See Answer
  • Q12:6.28. (a) Sketch the Bode plots for the following frequency responses: (ii) 1 - (jw/10) (iv) (vi) (i) (iii) (v) 1 + (jw/10) 16 (jw+2)* (jw/10)-1 1+jw (vii) (ix) (xi) 1-(jos/10) 1+ jw 1+{jw/10) 1+ jw 1-(jw/10) (jw)²+(jw)+1 1+ jw + (jw)² (jw+10)(10jw+1) [Cjw/100+1)][(jar)² + jw+1)] (b) Determine and sketch the impulse response and the step response for the sys- tem with frequency response (iv). Do the same for the system with frequency response (vi). (viii) (x) 10+5jw+10(jw)² 1+(jw/10) 1- jw + (jw)² The system given in (iv) is often referred to as a non-minimum-phase system, while the system specified in (vi) is referred to as being a minimum phase. The corresponding impulse responses of (iv) and (vi) are referred to as a non-minimum-phase signal and a minimum-phase signal, respectively. By comparing the Bode plots of these two frequency responses, we can see that they have identical magnitudes; however, the magnitude of the phase of the system of (iv) is larger than for the system of (vi). We can also note differences in the time-domain behavior of the two sys- tems. For example, the impulse response of the minimum-phase system has more of its energy concentrated near t = 0 than does the impulse response of the non-minimum-phase system. In addition, the step response of (iv) initially has the opposite sign from its asymptotic value as t → ∞, while this is not the case for the system of (vi). The important concept of minimum- and non-minimum-phase systems can be extended to more general LTI systems than the simple first-order systems we have treated here, and the distinguishing characteristics of these systems can be described far more thoroughly than we have done.See Answer
  • Q13:(2+ja)(1+ja) .6.28. (a) Sketch the Bode plots for the following frequency responses: (1) 1 + (joo/10) (ii) 1-(jw/10) (iii) 16 (iv) (10) 1+ ja 1+0/10) w/10-1 (v) (vi) 1-(10) (ja)²+(jo)+1 1 + jw + (jo)² j+1010+1) C100+1+ jau + 1 )| (b) Determine and sketch the impulse response and the step response for the sys- tem with frequency response (iv). Do the same for the system with frequency response (vi). (vii) (ix) (xi) (viii) 10+5+10) 1+(ja/10) (x) 1-jw + (jw)? The system given in (iv) is often referred to as a non-minimum-phase system, while the system specified in (vi) is referred to as being a minimum phase. The corresponding impulse responses of (iv) and (vi) are referred to as a non-minimum-phase signal and a minimum-phase signal, respectively. By comparing the Bode plots of these two frequency responses, we can see that they have identical magnitudes; however, the magnitude of the phase of the system of (iv) is larger than for the system of (vi). We can also note differences in the time-domain behavior of the two sys- tems. For example, the impulse response of the minimum-phase system has more of its energy concentrated near t=0 than does the impulse response of the non-minimum-phase system. In addition, the step response of (iv) initially has the opposite sign from its asymptotic value as →, while this is not the case for the system of (vi). The important concept of minimum- and non-minimum-phase systems can be extended to more general LTI systems than the simple first-order systems we have treated here, and the distinguishing characteristics of these systems can be described far more thoroughly than we have done.See Answer
  • Q14:3.13. Consider a continuous-time LTI system whose frequency response is H(jw) = [*_h(t)e~jou dt = If the input to this system is a periodic signal x(1) {₁ with period T 1, sin(4w) W 0 ≤t<4 -1, 4 ≤ t < 8 = 8, determine the corresponding system output y(t).See Answer
  • Q15:1.3. Determine the values of P. and E. for each of the following signals: (a) x() = eu(1) m/4) (d) x[n] (u[n] (b) xy(t) = (e) x[n] (2/8) (C) x)(I) = cos(1) (f) x[n] = cos(n)See Answer
  • Q16:1.1. Express each of the following complex numbers in Cartesian form (x + jy): {e/", e, em, em, em, √2√√2 √2-194√2 14 V FERRA inSee Answer
  • Q17:3) For a periodic signal x[n] with Fourier series coefficients a, following information is given: i. ii. iii. ak = -ak-4 x[2n + 1] = (-1)" Fundamental period = 8See Answer
  • Q18:1.23. Determine and sketch the even and odd parts of the signals depicted in Figure P1.23. Label your sketches carefully. The line x(t)-2t for t < 0 x(t) (a) x(t) L (b) x(t) 2- (c) 1 2 The line x(t) = tfort > 0 Figure P1.23See Answer
  • Q19:1.2. Express each of the following complex numbers in polar form (re", with - < 0 ≤ π): 5, -2, -3j, - j, 1+j, (1-j²,j(1 − j), (1 + j)/(1 − j), (√2 + j√√2)/ (1 + j√3).See Answer
  • Q20:1.1. Express each of the following complex numbers in Cartesian form (x + jy): ej", ei, ei, ei, eism12, √√2e114, √√Zze19m14, √√2e-19m14, √√2e-jm/4See Answer
View More

Popular Subjects for Signals And Systems

You can get the best rated step-by-step problem explanations from 65000+ expert tutors by ordering TutorBin Signals And Systems homework help.

Get Instant Signals And Systems Solutions From TutorBin App Now!

Get personalized homework help in your pocket! Enjoy your $20 reward upon registration!

Claim Your Offer

Sign Up now and Get $20 in your wallet

Moneyback

Guarantee

Free Plagiarism

Reports

$20 reward

Upon registration

Full Privacy

Full Privacy

Unlimited

Rewrites/revisions

Testimonials

TutorBin has got more than 3k positive ratings from our users around the world. Some of the students and teachers were greatly helped by TutorBin.

"After using their service, I decided to return back to them whenever I need their assistance. They will never disappoint you and craft the perfect homework for you after carrying out extensive research. It will surely amp up your performance and you will soon outperform your peers."

Olivia

"Ever since I started using this service, my life became easy. Now I have plenty of time to immerse myself in more important tasks viz., preparing for exams. TutorBin went above and beyond my expectations. They provide excellent quality tasks within deadlines. My grades improved exponentially after seeking their assistance."

Gloria

"They are amazing. I sought their help with my art assignment and the answers they provided were unique and devoid of plagiarism. They really helped me get into the good books of my professor. I would highly recommend their service."

Michael

"The service they provide is great. Their answers are unique and expert professionals with a minimum of 5 years of experience work on the assignments. Expect the answers to be of the highest quality and get ready to see your grades soar."

Richard

"They provide excellent assistance. What I loved the most about them is their homework help. They are available around the clock and work until you derive complete satisfaction. If you decide to use their service, expect a positive disconfirmation of expectations."

Willow

TutorBin helping students around the globe

TutorBin believes that distance should never be a barrier to learning. Over 500000+ orders and 100000+ happy customers explain TutorBin has become the name that keeps learning fun in the UK, USA, Canada, Australia, Singapore, and UAE.