Skip to content

ThomasGl/Signals-Some-Manipulations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 

Repository files navigation

Signals-and-some-manipulations

Introduction:

Let's assume we are given a signal x(t), continuous and differentiable.

exempli gratia :

x(t) = sin(t)

Now, regarding a practical analysis we can't generate a signal such that we get infinite precision. Thus, to address the signals in real life we can use sampling methods that shall render our signal in a very good approximation. Such a method will convert our signal from a continuous domain to a discrete one.

Also let us define a sampling interval T, and we will get a discrete signal x. Formulated as:

x[n] = x(nT)

Sampling Example:

In signal processing some tools are introduced for various reasons and to assist in different scenarios. Some of which are: Upsampling, Downsampling, Interpolating and Decimating.

Their definitions are given as:

Upsampling:

x_i[n] = x(nT/L)

Downsampling:

x_d[n] = x(nMT)

Interpolating:

We design a system using upsampling, such is given as:

\usetikzlibrary{arrows}
\begin{document}
\pagestyle{empty}
\tikzstyle{int}=[draw, fill=gray!8, minimum size=5em]
\tikzstyle{init} = [edge={to-,thin,black}]
\begin{tikzpicture}[node distance=5.5cm,auto,>=latex']
\node [int] (a) {$\uparrow L$};
\node (b) [left of=a,node distance=4cm, coordinate] {a};
\node [int] (c) [right of=a] {$\begin{gathered}\text{L.P.F.}\\ Gain=L\\\omega_{co}=\pi/L\end{gathered}$};
\node [coordinate] (end) [right of=c, node distance=4.5cm]{};
\path[->] (b) edge node {$x[n]$} (a);
\path[->] (a) edge node {$x_e[n]$} (c);
\draw[->] (c) edge node {$x_i[n]$} (end);
\end{tikzpicture}
\end{document}

Decimating:

We design a system using downsampling, given by:

\usetikzlibrary{arrows}
\begin{document}
\pagestyle{empty}
\tikzstyle{int}=[draw, fill=gray!8, minimum size=5em]
\tikzstyle{init} = [edge={to-,thin,black}]
\begin{tikzpicture}[node distance=5.5cm,auto,>=latex']
\node [int] (a) {$\begin{gathered}\text{L.P.F.}\\ Gain=1\\\omega_{co}=\pi/M\end{gathered}$};
\node (b) [left of=a,node distance=4cm, coordinate] {a};
\node [int] (c) [right of=a] {$\downarrow M$};
\node [coordinate] (end) [right of=c, node distance=4.5cm]{};
\path[->] (b) edge node {$x[n]$} (a);
\path[->] (a) edge node {$x_{\omega_{co}}[n]$} (c);
\draw[->] (c) edge node {$x_d[n]=x[nM]$} (end) ;
\end{tikzpicture}
\end{document}

Now let's take an e.g.

x[n] = \sum_{n=-25} ^{25} \big(\big2\frac {sin(\frac{8n}{\pi})}{n}\big)^\big2

That can be written as:

x[n] = \big[sinc(n\cdot \frac{\pi}{8})\big]^\big2 \cdot \big[8/2\pi\big]^\big2

Where \; n \in \mathbb{Z}\;|\; n\in[-25,25]

Now we could run the simulation on MATLAB and Python and get:

[MATLAB]: remark it was developed using of the MATLAB Signal Processing Toolbox

[Python]: remark it was developed using numpy, matplotlib and scipy libraries

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published