\documentclass{article} \usepackage{amsmath} \usepackage{graphicx} \usepackage{listings} \usepackage{caption} \usepackage{subcaption} \usepackage{float} \usepackage[margin=1in]{geometry} \title{Analyzing and Operating on Discrete Time Signals in MATLAB\textsuperscript{\tiny\textregistered}} \author{Aidan Sharpe \& Elise Heim} \DeclareMathOperator{\sinc}{sinc} \begin{document} \begin{titlepage} \maketitle \end{titlepage} \begin{abstract} This lab includes a variety of exercises to enhance knowledge and understanding of digital signal responses. The first couple of exercises involved mathematically deducing the responses of signals. Then MATLAB\textsuperscript{\tiny\textregistered} was utilized to visually confirm calculated behavior. \end{abstract} \section{Introduction} MATLAB\textsuperscript{\tiny\textregistered} is a very helpful tool for visualizing different signals and better understanding their behavior. The first two tasks include modulating amplitude, and determining periodicity mathematically. Then MATLAB\textsuperscript{\tiny\textregistered} was used to plot different signals in order to verify their periodicity, and if applicable, their period. MATLAB\textsuperscript{\tiny\textregistered} was also used to plot discrete time signals in order to better understand their behavior. In addition, the boundedness of a signal was checked using MATLAB\textsuperscript{\tiny\textregistered} to plot the signal. The energy of an aperiodic signal was also observed using MATLAB\textsuperscript{\tiny\textregistered}, and plotted as a function of time. Finally, this lab utilized MATLAB\textsuperscript{\tiny\textregistered} to explore the functionality of the modulo operator. \section{Results \& Discussion} \subsection{Analysis of Amplitude Modulation} A message, $m(t)$, with a bandwidth, $B=2[\text{kHz}]$ modulates a cosine carrier with a frequency of 10[kHz]. The combined signal is $s(t) = m(t)\cos(20000\pi t)$. Using a Fourier transform on $s(t)$ reveals a maximum frequency at 12[kHz]. In fact, as seen in figure \ref{fig:AM_Fourier_Whitenoise}, by filling the band that $m(t)$ occupies with white noise, the Fourier transform of $s(t)$ contains white noise centered on the carrier frequency with twice the bandwidth of the original signal. The spike that occurs at 10[kHz] is the result of the original signal having a DC term and the carrier frequency having a value of 10[kHz]. \begin{figure}[h] \center \includegraphics[width=0.5\textwidth]{lab2_1a.png} \caption{The Fourier transform of a white noise signal carried at 10[kHz]} \label{fig:AM_Fourier_Whitenoise} \end{figure} When instead, $m(t)$ had a triangular spectrum of amplitude 1, the spectrum of $s(t)$ was two triangles touching at the base at 10[kHz] as seen in figure \ref{fig:carried_triangle}. \begin{figure}[h] \center \includegraphics[width=0.5\textwidth]{lab2_1b.png} \caption{The Fourier transform of a signal with a triangular spectrum carried at 10[kHz]} \label{fig:carried_triangle} \end{figure} \subsection{Periodicity and Sampling Frequency} Consider the signal $x(t) = \cos(2\pi t/7)$. Given the standard forms, $\cos(2\pi f t)$ and $\cos(\omega t)$, where f is linear frequency and $\omega$ is angular frequency, $f = {1\over7}$ and $\omega = {2\pi \over 7}$. Given sampling frequencies of 1[Hz], 2.5[Hz], 3[Hz], and $\pi$[Hz], the sampling theorem is satisfied. To determine if the sampled signal is periodic, the fundamental time period must be determined by \begin{equation} N = {2\pi \over \omega} \end{equation} where $N$ is the fundamental time period and $\omega$ is the angular frequency of the signal. Given $\omega = {2\pi \over 7}$, the fundamental time period is 7[s]. With sampling frequencies of 1[Hz], 2.5[Hz], and 3[Hz], the discrete signal is periodic. However, with a sampling frequency of $\pi$[Hz], the discrete signal is aperiodic. Determining whether a sampled periodic signal is periodic can be done by satisfying the condition: \begin{equation} aN = bT_s \label{eqn:periodicity_condition} \end{equation} where $a$ and $b$ are integers, $N$ is the fundamental time period, and $T_s$ is the sampling period. The period of the discrete signal if the condition is satisfied is the product of $a$ and $b$. Therefore, for $f_s=1$[Hz], there will be 7 samples per period, for $f_s =2.5$[Hz], there will be 35 samples per period, and for $f_s = 3$[Hz], there will be 21 samples per period. Seen in figure \ref{fig:periodic_sample}, the periodicity and samples per period for $f_s = 1$, 2.5, and 3[Hz] can be determined simply by counting the samples. For $f_s=\pi$[Hz], the aperiodic nature only becomes apparent after observing many samples. \begin{figure}[h] \includegraphics[width=\textwidth]{lab_2_2.png} \caption{Sampling a periodic signal at different frequencies} \label{fig:periodic_sample} \end{figure} \subsection{Plotting Discrete Time Signals} MATLAB\textsuperscript{\tiny\textregistered} can be very helpful for plotting complicated signals over specific intervals. Using the impulse, unit step, and the \verb|stem| command, one can plot a variety of signals. One such signal is $ \delta(n-5) - 2\delta(n-8) +6\delta(n-11)$ over the interval $0