@@ -20,21 +20,15 @@ \subsection{Sampling}
2020% where obj = AnalogSignal
2121% h = hold time in sec (sampling interval)
2222% x = resultant sampled AnalogSignal
23- %
24- % This function produces a 1D line plot of the provided discrete or digital
25- % signal in a "stairstep" fashion. In other words, each value in x (which
26- % is a y coordinate of the plotted point (n, x)) is connected by a straight
27- % line to the same y value at the next sample number (n+1, x), and then by
28- % a vertical line to the next sample value, (n+1, x+1).
2923\end {lstlisting }
3024
31- \paragraph {Step 2 .1 } Create an analog sine waveform ranging from -5 to
25+ \paragraph {Step 1 .1 } Create an analog sine waveform ranging from -5 to
32265V with a frequency of 200Hz and a duration of 2 seconds. Produce a
3327plot with X-axis limits set to make the waveform visible (i.e., don't
3428just make a 2s plot that tries (and fails) to show 400 cycles of the
3529sinusoid.
3630
37- \paragraph {Step 2 .2 } Use the \texttt {samplehold } method to produce
31+ \paragraph {Step 1 .2 } Use the \texttt {samplehold } method to produce
3832sampled versions of this signal at 300Hz, 500Hz, 1000Hz, and
39332000Hz. Use the Matlab \texttt {subplot } command, and the
4034\texttt {discreteplot } function provided with this class's Matlab code,
@@ -46,11 +40,11 @@ \subsection{Sampling}
4640why not (in other words, your answer to this question should not be
4741just `` yes'' or `` no'' )?
4842
49- \paragraph {Step 2 .3 } Let's look at aliasing in a little more detail
43+ \paragraph {Step 1 .3 } Let's look at aliasing in a little more detail
5044and with a lot more numerical precision. You'll recall from the text
5145that, once we sample a signal, we have limited the range of
5246frequencies that we can represent in our discrete signal to the range
53- $ 0 \leq \hat {\omega } \leq \pi / 2 $ , corresponding to a range of apparent
47+ $ 0 \leq \hat {\omega } \leq \pi $ , corresponding to a range of apparent
5448frequencies in the physical world of $ 0 \leq \omega ' \leq \omega _s/2 $
5549(or $ 0 \leq f' \leq f_s/2 $ ). Any frequency in the original signal
5650above $ f_s/2 $ will be \emph {aliased } into the range of possible
@@ -60,18 +54,18 @@ \subsection{Sampling}
6054plotted. Set up a figure that can hold three plots and plot this
6155analog signal in the top plot.
6256
63- \paragraph {Step 2 .4 } Sample this signal at 25Hz and use the
57+ \paragraph {Step 1 .4 } Sample this signal at 25Hz and use the
6458\texttt {discreteplot } function to plot the sampled signal in the
6559middle. Sample it at 15Hz and similarly plot that sampled signal at
6660the bottom.
6761
68- \paragraph {Step 2 .5 } Before examining the plots in detail, answer the
62+ \paragraph {Step 1 .5 } Before examining the plots in detail, answer the
6963following questions: For each of the two sampling frequencies, what is
7064the range of apparent frequencies that can be represented? For each,
7165will a sinusoid with $ f = 10 $ Hz be aliased? If so, what will be the
7266digital frequency and the apparent frequency of a 10Hz sinusoid?
7367
74- \paragraph {Step 2 .6 } Examine the plots and count the number of
68+ \paragraph {Step 1 .6 } Examine the plots and count the number of
7569up-and-down cycles in each. Don't worry that each cycle doesn't look
7670the same, or that every other cycle seems different; just count
7771each. You should see 10 cycles in the top graph; how many do you see
@@ -98,7 +92,7 @@ \subsection{Analog to Digital Conversion}
9892% otherwise, set ouput value range = input value range
9993\end {lstlisting }
10094
101- \paragraph {Step 3 .1 } Write a Matlab function that compares two signals
95+ \paragraph {Step 2 .1 } Write a Matlab function that compares two signals
10296by computing the \emph {signal to noise ratio } (SNR) that results from
10397changing one into the other (by quantization). Your function should do
10498this by first computing \emph {root mean squared } (RMS) error between
@@ -121,19 +115,19 @@ \subsection{Analog to Digital Conversion}
121115
122116
123117
124- \paragraph {Step 3 .2 } Use your code to compute the SNR for a
118+ \paragraph {Step 2 .2 } Use your code to compute the SNR for a
125119 quantized sinusoid. Generate an analog signal with with a range of 0
126120 to 5, frequency of 10Hz, and duration 2sec. Sample it at 25Hz. Use
127121 2, 4, 8, 12, and 16 bits quantization, and plot SNR on the Y-axis
128122 versus number of quantization bits on the X-axis.
129123
130- \paragraph {Step 3 .3 } Repeat Step 3.2 using a square waveform with
124+ \paragraph {Step 2 .3 } Repeat Step 3.2 using a square waveform with
131125 the same parameters.
132126
133- \paragraph {Step 3 .4 } Repeat Step 3.2 using a triangle waveform with
127+ \paragraph {Step 2 .4 } Repeat Step 3.2 using a triangle waveform with
134128 the same parameters.
135129
136- \paragraph {Step 3 .5 } As you double the number of bits used in
130+ \paragraph {Step 2 .5 } As you double the number of bits used in
137131 quantization, how does the SNR change? How does this compare to what
138132 your learned from the textbook? Refer to specific features of your
139133 plots from Steps~3.2--3.4 to justify your answer.
0 commit comments