aboutsummaryrefslogtreecommitdiffstats
path: root/doc/thesis/chapters/theory.tex
blob: 4a7a30ed2a713781df2663ec598bfc6df26b9cf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
% vim: set ts=2 sw=2 noet spell:

\chapter{Theory}

\begin{figure}
	\centering
	\resizebox{\linewidth}{!}{
		\input{figures/tikz/overview}
	}
	\caption{
		Block diagram for a general wireless communication system with annotated signal names. Frequency domain representations of signals use the uppercase symbol of their respective time domain name.
		\label{fig:notation}
	}
\end{figure}

\section{Overview}

The first two sections will briefly introduce mathematical formulations of the modulation schemes and of the channel models used in the project. The notation used is summarised in \figref{fig:notation}. For conciseness encoding schemes and (digital) signal processing calculations are left out and discussed later. Thus for this section \(m_e = m\).
\skelpar[4]{Finish overview of the chapter.}

\skelpar[3]{Discuss notation \(m(n) = m(nT)\) in discrete time and some other details.}

%% TODO: A section on maths?
% \section{Signal space and linear operators}

\section{Quadrature amplitude modulation (\(M\)-ary QAM)}

\begin{figure}
	\centering
	\resizebox{\linewidth}{!}{
		\input{figures/tikz/qam-modulator}
	}
	\caption{
		Block diagram of a \(M\)-ary QAM modulator.
		\label{fig:quadrature-modulation}
	}
\end{figure}

Quadrature amplitude modulation is a family of modern digital modulation methods, that use an analog carrier signal. The simple yet effective idea behind QAM is to encode extra information into an orthogonal carrier signal, thus increasing the number of bits sent per unit of time (symbol) \cite{Gallager,Kneubuehler,Mathis,Hsu}. A block diagram of the process is shown in \figref{fig:quadrature-modulation}.

%% TODO: Quick par on "we will dicusss M-Ary QAM, M is 2^something"

\subsection{Modulation of a digital message}

\paragraph{Bit splitter}

As mentioned earlier, quadrature modulation allows sending more than one bit per unit time. The first step to do it is to use a so called bit splitter, that converts the continuous bitstream \(m(n)\) into pairs of chunks of \(\sqrt{M}\) bits. The two bit vectors of length \(\sqrt{M}\), denoted by \(\vec{m}_i\) and \(\vec{m}_q\) in figure \ref{fig:quadrature-modulation}, are called in-phase and quadrature component respectively\cite{Hsu}. The reason will become more clear later.

\paragraph{Binary to level converter}

%% TODO: explain why gray code

Both bit vectors \(\vec{m}_i, \vec{m}_q \in \{0,1\}^{\sqrt{M}}\) are sent through a binary to level converter. It's purpose is to reinterpret the bit vectors as numbers, usually in gray code, and to convert them into analog waveforms, which we will denote with \(m_i(t)\) and \(m_q(t)\) respectively. Mathematically the binary to level converter can be described as:
\begin{equation}
	m_i(t) = \text{Level}(\vec{m}_i) \cdot p(t),
\end{equation}
i.e. a pulse function\footnote{Typically a root raised cosine to optimize for bandwidth \cite{Hsu}.} \(p(t)\) scaled by the interpreted binary value, written here using a ``Level'' function. So at this point a level of each analog waveform is encodes \(\sqrt{M}\) bits per unit time, and there are two of such waveforms.


\paragraph{Mixer}

Having analog level signals, it is this now possible to mix them with radio frequency carriers. Because there are two waveforms, one might expect that two carrier frequencies are necessary, however this is not the case. The two component \(m_i(t)\) and \(m_q(t)\) are mixed with two different periodic signals \(\phi_i(t)\) and \(\phi_q(t)\) that have the same frequency \(\omega_c = 2\pi / T\). How this is possible is explained in the next section.


\subsection{Orthogonality of carrier signals}

Before explaining how the two carrier signals are generated, we first need to discuss some important mathematical properties \(\phi_i\) and \(\phi_q\) need to have, in order to modulate two messages over the same frequency \(\omega_c\). The two carriers need to be \emph{orthonormal}\footnote{Actually orthogonality alone would be sufficient, however then the left side of \eqref{eqn:orthonormal-condition} would not equal 1, and an inconvenient factor would be introduced in many later equations \cite{Gallager,Hsu}.} to each other, mathematically this is expressed by the conditions
\begin{subequations} \label{eqn:orthonormal-conditions}
	\begin{align}
		\langle \phi_i, \phi_q \rangle
			&= \int_T \phi_i \phi_q^* \, dt
			= 0, \text{ and } \label{eqn:orthogonal-condition} \\
		\langle \phi_k, \phi_k \rangle
			&= \int_T \phi_k \phi_k^*  \,dt = 1,
			\text{ where } k \text{ is either } i \text{ or } q. \label{eqn:orthonormal-condition}
	\end{align}
\end{subequations}
Provided these rather abstract conditions, let's define a new signal 
\begin{equation}
	s = m_i\phi_i + m_q\phi_q.
\end{equation}
%% TODO: is this assumption correct?
Notice that assuming \(m_i\) and \(m_q\) are constant\footnote{This is an approximation assuming that the signal changes much slower relative to the carrier.} over the carrier's period \(T\),
\begin{align*}
	\langle s, \phi_i \rangle = \int_T s \phi_i^* \,dt
		&= \int m_i \phi_i \phi_i^* + m_q \phi_q \phi_i^* \,dt \\
		&= m_i \underbrace{\int_T \phi_i \phi_i^* \,dt}_{1}
			+ m_q \underbrace{\int_T \phi_q \phi_i^* \,dt}_{0} = m_i,
\end{align*}
which effectively means that it is possible to isolate a single component \(m_i(t)\) out of \(s(t)\). The same of course works with \(\phi_q\) as well resulting in \(\langle s, \phi_q \rangle = m_q\). Thus (remarkably) it is possible to send two signals on the same frequency, without them interfering with each other. Since each signal can represent one of \(\sqrt{M}\) values, by having two we obtain \(\sqrt{M} \cdot \sqrt{M} = M\) possible combinations.

A graphical way to see what is happening, is to observe a so called \emph{constellation diagram}. An example is shown in \figref{fig:qam-constellation} for \(M = 16\). The two carrier signals \(\phi_i\) and \(\phi_q\) can be understood as bases of a coordinate system, in which the two amplitude levels of the two modulated messages, determine a position in the grid.

\paragraph{Example}

A concrete example for \(M = 16\): if the message is 1110 the bit splitter creates two values \(\vec{m}_q = 11\) and \(\vec{m}_i = 10\); both are converted into analog amplitudes (symbols) \(m_q = 3\) and \(m_i = 4\); that are then mixed with their respective carrier, resulting in \(s(t)\) being the point inside the bottom right sub-quadrant of the top right quadrant (blue dot in \figref{fig:qam-constellation}).

In \figref{fig:qam-constellation} the dots of the constellation have coordinates that begin on the bottom left corner, and are nicely aligned on a grid. Both are not a necessary requirement for QAM, in fact there are many schemes (for example when \(M = 32\)) that are arranged on a non square shape, and place the dots in different orders. The only constraint that most QAM modulators have in common, with regards to the geometry of the constellation, is that between any two adjacent dots (along the axis, not diagonally) only one bit of the represented value changes (gray code). This is done to improve the bit error rate (BER) of the transmission.

\begin{figure}
	\hfill
	\begin{subfigure}{.4\linewidth}
		\input{figures/tikz/qam-constellation}
		\caption{16-QAM\label{fig:qam-constellation}}
	\end{subfigure}
	\hfill
	\begin{subfigure}{.4\linewidth}
		\input{figures/tikz/psk-constellation}
		\caption{8-PSK\label{fig:psk-constellation}}
	\end{subfigure}
	\hfill
	\caption{
		Examples of constellation diagrams. Each dot represents a possible location for the complex amplitude of the passband signal.
	}
\end{figure}

\subsection{Construction of orthogonal carrier signals}

Knowing why there is a need for orthogonal carriers, we should now discuss which functions satisfy the property described by \eqref{eqn:orthogonal-condition}. If \(\phi_i\) is a real valued signal (which is typical) it is possible to find a function the quadrature carrier using the \emph{Hilbert transform} (sometimes called Hilbert filter):
\begin{equation}
	\hilbert g(t) = g(t) * \frac{1}{\pi t}
		= \frac{1}{\pi} \int_\mathbb{R} \frac{g(\tau)}{t - \tau} \,d\tau
		= \frac{1}{\pi} \int_\mathbb{R} \frac{g(t - \tau)}{\tau} \,d\tau.
\end{equation}
The Hilbert transform is a linear operator that introduces a phase shift of \(\pi / 2\) over all frequencies \cite{Hsu,Gallager}, and it is possible to show that given a real valued function \(g(t)\) then \(\langle g, \hilbert g \rangle = 0\) \cite{Kschischang,Kneubuehler}. There are many functions that are Hilbert transform pairs, however in practice the pair \(\phi_i(t) = \cos(\omega_c t)\) and \(\phi_q(t) = \hilbert \phi_i(t) = \sin(\omega_c t)\) is always used.

\paragraph{Oscillator and phase shifter}

\skelpar[4]{Give a few details on how the carrier is generated in practice.}

\subsection{Spectral properties of a QAM signal}

\skelpar[4]{Spectral properties of QAM}

\section{Phase shift keying (\(M\)-PSK)}

\skelpar[6]{Explain PSK (assuming the previous section was read).}

% PSK is a popular modulation type for data transmission\cite{Meyer2011}. With a bipolar binary signal, the amplitude remains constant and only the phase will be changed with phase jumps of 180 degrees, which can be seen as a multiplication of the carrier signal with $\pm$ 1. That is alow known as binary phase shift keying.

% \begin{figure}
% 	% TODO: Better Image
% 	% https://sites.google.com/site/billmahroukelec675/bipolar-phase-shift-keying
% 	\includegraphics[width=5cm]{./image/BPSK2.png}
% \end{figure}

% Two bits are modulated at ones with the same bandwidth as a 2-PSK so more informations are transmitted at the same time. \cite{Meyer2011}
%TODO: Image Signal Raum 
% Most times there is noise and the points on the constellation diagram become a surface. If the surfaces overlap there will be a problem with decoding. 

\subsection{Quadrature PSK (QPSK)}

\skelpar[2]{QPSK = 4-PSK = 4-QAM}

\section{Multipath fading}

In the previous section, we discussed how the data is modulated and demodulated at the two ends of the transmission system. This section discusses what happens between the sender and receiver when the modulated passband signal is transmitted wirelessly.

In theory because wireless transmission happens through electromagnetic radiation, to model a wireless channel one would need to solve Maxwell's equations for either the electric or magnetic field, however in practice that is not (analytically) possible. Instead what is typically done, is to model the impulse response of the channel using a geometrical or statistical model, parametrized by a set of coefficients that are either simulated or measured experimentally \cite{Gallager}.

In our relatively simple model we are going to include an additive white Gaussian noise (AWGN) and a Rician (or Rayleighan) fading; both are required to model physical effects of the real world. The former in particular is relevant today, as it mathematically describes dense urban environments.

\subsection{Geometric model}

The simplest way to understand the multipath fading, is to consider it from a geometrical perspective. \figref{fig:multipath-sketch} is a sketch a wireless transmission system affected by multipath fading. The sender's antenna radiates an electromagnetic wave in the direction of the receiver (red line), however even under the best circumstances a part of the signal is dispersed in other directions (blue lines).

\begin{figure}
	\centering
	\input{figures/tikz/multipath-sketch}
	\caption{
		Sketch of channel with multipath fading.
		\label{fig:multipath-sketch}
	}
\end{figure}

The problem is that, as is geometrically evident, some paths are longer than others. Because of this fact, the signal is seen by the receiver multiple times with different phase shifts \cite{Gallager,Messier}. To mathematically model this effect, we describe the received signal \(r(t)\) as a linear combination of delayed copies of the sent signal \(s(t)\), each with a different attenuation \(c_k\) and phase shift \(\tau_k\):
\begin{equation} \label{eqn:geom-multipath-rx}
	r(t) = \sum_k c_k s(t - \tau_k).
\end{equation}

The linearity of the model is justified by the assumption that the underlying electromagnetic waves behave linearly (superposition holds) \cite{Gallager}. How many copies of \(s(t)\) (usually referred to as ``taps'' or ``rays'') should be included in \eqref{eqn:geom-multipath-rx}, depends on the precision requirements of the model.

A further complication arises, when one end (or both) is not stationary. In that case the lengths of the paths change over time, and as a result both the delays \(\tau_k\) as well as the attenuations \(c_k\) become functions of time: \(\tau_k(t)\) and \(c_k(t)\) respectively \cite{Gallager,Messier}. Even worse when the velocity at which the device is moving is high, then Doppler shifts of the electromagnetic wave frequency become non negligible \cite{Gallager}.

\begin{figure}
	\centering
	\input{figures/tikz/multipath-impulse-response}
	\caption{
		LTV impulse response of a multipath fading channel.
		\label{fig:multipath-impulse-response}
	}
\end{figure}

We have thus observed that the arrangement can be modelled as a linear time-\emph{varying} system (LTV), if the sender or the receiver (or anything else in the channel) is moving, and as a linear time \emph{invariant} (LTI) system if the geometry is stationary. Regardless of which of the two cases, linearity alone is sufficient to approximate the channel as finite impulse response (FIR) filter \cite{Messier}. We can rewrite LTV version of equation \eqref{eqn:geom-multipath-rx} using a convolution product as following:
\begin{align*}
	r(t) = \sum_k c_k(t) s(t - \tau_k(t)) &= \sum_k c_k(t) \int_\mathbb{R} s(\tau) \delta(\tau - \tau_k(t)) \,d\tau \\
		&= \int_\mathbb{R} s(\tau) \sum_k c_k(t) \delta(\tau - \tau_k(t)) \,d\tau = s(\tau) * h(\tau, t),
\end{align*}
obtaining a new function
\begin{equation} \label{eqn:multipath-impulse-response}
	h(\tau, t) = \sum_k c_k(t) \delta(\tau - \tau_k(t)),
\end{equation}
that describes the \emph{channel impulse response} (CIR). This function depends on two time parameters: actual time \(t\) and convolution time \(\tau\). To better understand \(h(\tau, t)\), consider an example shown in figure \ref{fig:multipath-impulse-response}. Each stem represents a weighted Dirac delta, so each series of stems of the same color, along the convolution time \(\tau\) axis, is a channel response at some specific time \(t\). Along the other \(t\) axis we see how the entire channel response changes over time\footnote{In the figure only a finite number of stems was drawn, but actually the weights \(c_k(t)\) of the Dirac deltas change continuously.}. Notice that the stems are not quite aligned to the \(\tau\) time raster (dotted lines), that is because in \eqref{eqn:multipath-impulse-response} not only the weights \(c_k\) but also the delays \(\tau_k\) are time dependent.

\subsection{Spectrum of a multipath fading channel}

With a continuous time channel model we can now discuss the spectral properties of a fading channel since the frequency response is the Fourier transform of the impulse response, mathematically \(H(f, t) = \fourier h(\tau, t)\). In this case however \(h(\tau, t)\) depends on two time variables, but that is actually not an issue, it just means that the frequency response is also changing over time. Hence we perform the Fourier transform with respect to the channel (convolution) time variable \(\tau\) to obtain
\begin{equation} \label{eqn:multipath-frequency-response}
	H(f, t) = \int_\mathbb{R} \sum_k c_k(t) \delta(\tau - \tau_k(t)) e^{-2\pi jf\tau} \, d\tau
	= \sum_k c_k(t) e^{-2\pi jf \tau_k(t)}.
\end{equation}

Equation \eqref{eqn:multipath-frequency-response} shows that the frequency response is a periodic complex exponential, which has some important implications. Notice that if there is only one tap (term), the magnitude of \(H(f, t)\) is a constant (with respect to \(f\)) since \(|e^{j\alpha f}| = 1\). This means that the channels attenuates all frequencies by the same amount, therefore it is said to be a \emph{frequency non-selective} or \emph{flat fading} channel. Whereas in the case when there is more than one tap, the taps interfere destructively at certain frequencies and the channel is called \emph{frequency selective}. To illustrate how this happens, plots of the frequency response of a two tap channel model are shown in \figref{fig:multipath-frequency-response-plots}. On the left is the magnitude of \(H(f, t)\), which presents periodic ``dips'', and on the right complex loci for the two taps (red and blue), as well as their sum (magenta), over the frequency range near the first dip (2 to 2.5 MHz) are shown.

\begin{figure}
	\centering
	\resizebox{\linewidth}{!}{
		\input{figures/tikz/multipath-frequency-response-plots}
		% \skelfig[width = .8 \linewidth, height = 3cm]{}
	}
	\caption{
		Frequency response of a multipath fading channel.
		\label{fig:multipath-frequency-response-plots}
	}
\end{figure}

\subsection{Quantifying dispersion}

Having discussed how multipath fading affects communication systems, the next important step is to be able quantify its effects to be able to compare different multipath channels to each other.

An intuitive parameter to quantify how dispersive channel is, is to take the time difference between the fastest and slowest paths with significant energy. What in the literature is called \emph{delay spread}, and is denoted here by \(T_d\). Consequently, a low delay spread means that all paths have more or less the same length, while a high delay spread implies that there is a large difference in length among the paths. Thus \(T_d\) could be be defined as
\begin{equation}
	T_d = \max_{k} (\tau_k(t)) -  \min_{k} (\tau_k(t)),
\end{equation}
as is done in \cite{Gallager}. However since in reality some paths get more attenuated than others (\(c_k(t)\) parameters) it also not uncommon to define the delay spread as a weighted mean or even as a statistical second moment (RMS value), where mean tap power \(\expectation\{|c_k(t)|^2\}\) is taken into account \cite{Mathis,Messier}. More sophisticated definitions of delay spread will be briefly mentioned later in section \ref{sec:statistical-model}.

Another important parameter for quantifying dispersion is \emph{coherence bandwidth}, a measure how 

\subsection{Discrete-time model} \label{sec:discrete-time-model}

% TODO: discuss the "bins" of discrete time

Since in practice signal processing is done digitally, it is meaningful to discuss the properties of a discrete-time model. To keep the complexity of the model manageable some assumptions are necessary, thus the sent discrete signal \(s(n)\)\footnote{This is an abuse of notation. The argument \(n\) is used to mean the \(n\)-th digital sample of \(s\), whereas \(s(t)\) is used for the analog waveform.} is assumed to have a finite single sided bandwidth \(W\). This implies that in the time-domain signal is a series of sinc-shaped pulses each shifted from the previous by a time interval \(T = 1 / (2W)\) (Nyquist rate):
\begin{equation}
	s(t) = \sum_n s(n) \sinc(t/T - n)
\end{equation}
The waveform \(s(t)\) is then convolved with the CIR function \(h(\tau, t)\) (with respect to \(\tau\)) from the continuous time model resulting in the waveform at the receiver
\begin{align*}
	r(t) &= \int_ \mathbb{R} \sum_n s(n) \sinc(\tau / T - n) \sum_k c_k(t) \delta(\tau - \tau_k(t)) \,d\tau \\
	&= \sum_n s(n) \sum_k c_k(t) \sinc(t/T - \tau_k(t)/T - n),
\end{align*}
which is then sampled at the Nyquist rate of \(2W = 1/T\), resulting in a set of samples\footnote{Again, the abusing notation \(r(m)\) means the \(m\)-th digital sample of \(r(t)\), i.e. \(r(mT)\).}:
\[
	r(m) = \sum_n s(n) \sum_k c_k(mT) \sinc(m - \tau_k(mT)/T - n).
\]
Finally the substitution \(l = m - n\) eliminates the sender's sample counter \(n\) (unknown to the receiver) and reformulates \(r(m)\) as a discrete convolution product of with a discrete CIR function \(h_l(m)\):
\begin{equation}
	r(m) = \sum_l s(m - l) \sum_k c_k(mT) \sinc(l - \tau_k(mT)/T) 
	= \sum_l s(m - l) h_l (m).
\end{equation}
This result is very similar to the continuous time model described by \eqref{eqn:multipath-impulse-response} in the sense that each received digital sample is a sent sample convolved with a different discrete channel response (because of time variance). To see how the discrete CIR
\begin{equation} \label{eqn:discrete-multipath-impulse-response}
	h_l(m) = \sum_k c_k(mT) \sinc(l - \tau(mT)/T)
\end{equation}
is different from \eqref{eqn:multipath-impulse-response} consider again the plot of \(h(\tau,t)\) in \figref{fig:multipath-impulse-response}. The plot of \(h_l(m)\) would have discrete axes with \(m\) replacing \(t\) and \(l\) instead of \(\tau\), and because of the finite bandwidth in the \(l\) axis instead of Dirac deltas there would be superposed sinc functions.

\begin{figure}
	\centering
	\input{figures/tikz/tapped-delay-line}
	\caption{
		Fading channel as a tapped delay line.
		\label{fig:tapped-delay-line}
	}
\end{figure}

From a signal processing perspective \eqref{eqn:discrete-multipath-impulse-response} can be interpreted as a simple tapped delay line, schematically drawn in \figref{fig:tapped-delay-line}, which confirms that the presented mathematical model is indeed a FIR filter. Simple multipath channels can be simulated with just a few lines of code, for example the data for the static fading channel in \figref{fig:multipath-frequency-response-plots} is generated in just four lines of Python. The difficulty of fading channels in practice lies in the estimation of the constantly changing parameters \(c_k(t)\) and \(\tau_k(t)\).


\subsection{FIR filter simulation with fractional delays} \label{sec:fractional-delay}
% TO Do quelle: http://users.spa.aalto.fi/vpv/publications/vesan_vaitos/ch3_pt1_fir.pdf

\begin{figure}
	\centering
	\begin{subfigure}{.45\linewidth}
		\includegraphics[width=\linewidth]{./figures/screenshots/Fractional_delay_6}
		\caption{Pulse with an integer delay of 6 samples.}
	\end{subfigure}
	\hskip 5mm
	\begin{subfigure}{.45\linewidth}
		\includegraphics[width=\linewidth]{./figures/screenshots/Fractional_delay_637}
		\caption{Pulse with a fractional delay of 6.37 samples.}
	\end{subfigure}
	\caption{\label{fig:fractional-delay-sinc-plot}}
\end{figure}

As in \ref{sec:discrete-time-model} mentioned a FIR filter can be used to simulate a discrete time model of multipath fading. But with a FIR filter the delays can only be an integer multiple of the the sample rate. When the delays are noninteger an approximation has to be done. 

In the example shown in \figref{fig:fractional-delay-sinc-plot}. For a integer delays in the sinc function all sample values are zero except the one by the delayed sample, which is the amplitude value, here one. When the delay is a fractional number all samples are non-zero. In theory this filter is notrealizable because its noncasual and the impulse respond is infinity long. This problem can't be solve by adding them because of the imaginary part.

To desing a noninteger digital delay FIR Filter a least square integral error design approximation could be chosen.  

Where the transfare function is given as:

\begin{equation} \label{eqn:transfer-function-FIR}
	H(z)=\sum_{n=0}^{N} h(n) z^{-n}
\end{equation}
The Order of the filter is given with the help of \(N\), this value only contains integer coefficients.
To be mention for the approximation is that the error decreases with a higher filter order.


The error function between the ideal frequency respond an the approximation should be minimized, for the best possible approximation:
  
\begin{equation} \label{eqn:error-function}
		E\left(e^{j \omega}\right)=H\left(e^{j \omega}\right)-H_{\mathrm{id}}\left(e^{j \omega}\right)
\end{equation}

The impulse respond of such a least squared fractional delay filter in \eqref{eqn:impuls-respond}. Only positive values are used to make the sinc-function casual. 

\begin{equation} \label{eqn:impuls-respond}
	h(n)= \begin{cases}\operatorname{sinc}(n-D), & 0 \leq n \leq N \\ 0, & \text { otherwise }\end{cases}
\end{equation}

To simplify the calculation, the assumption was made that the filter order is an odd number. With this assumption the exact order for the filter can be found out with the help of the integer delay \(D_{\text {int }}\):
\begin{equation} \label{eqn:filter-order}
	N = 2 D_{\text {int }} + 1
\end{equation}


The first non-zero sample can be find out with the help of the index M:
\begin{equation}\label{eqn: M first non-zero sample}
	M = \lfloor D\rfloor-\frac{N-1}{2} \quad \text { for odd } N
\end{equation}

With the help of this index it can also be said whether the FIR filter is causal or not. For \(M \geq 0\) casual and if  \(M < 0\) noncasual, an so notrealizable. With the assumption that \(N\) is an odd number \(M \) should always be \( 0\) else something went wrong.



%% TO DO : Mention windowing or not ?

\skelpar{Discrete frequency response. Discuss bins, etc.}

\subsection{Statistical model} \label{sec:statistical-model}

Because as mentioned earlier it is difficult to estimate the time-dependent parameters of \(h_l(m)\) in many cases it is easier to model the components of the CIR as stochastic processes, thus greatly reducing the number of parameters. This is especially effective for channels that are constantly changing, because by the central limit theorem the cumulative effect of many small changes tends to a normal statistical distribution.

Recall that \(h_l(m)\) is a function of time because \(c_k\) and \(\tau_k\) change over time. The idea of the statistical model is to replace the cumulative change caused by \(c_k\) and \(\tau_k\) (which are difficult to estimate) by picking the next CIR sample \(h_l(m +1)\) from a \emph{circularly symmetric complex Gaussian distribution}, written as
\begin{equation}
	h_l \sim \mathcal{CN}(0, \sigma^2)
\end{equation} 
for some parameter \(\sigma\). Loosely speaking, the distribution needs to be ``circular'' because \(h_l\) is a complex number, which is two dimensional, it can however be understood as \(\Re{h_l} \sim \mathcal{N}(0, \sigma^2)\) and \(\Im{h_l} \sim \mathcal{N}(\mu, \sigma^2)\), i.e. having each component being normally distributed.


% TO DO : Picture of gaussian distribution
\begin{subequations}
	\begin{align}
		R_{l} (k) &= \E{h_l(m) h_l^*(m+k)}, \\
		0 &= \E{h_l(m) h_k^*(m)} \text { for } l \neq k
	\end{align}
\end{subequations}

\begin{figure}
	\centering
	\begin{subfigure}{.45\linewidth}
		\skelfig
		\caption{NLOS, Rayleigh}
	\end{subfigure}
	\hskip 5mm
	\begin{subfigure}{.45\linewidth}
		\skelfig
		\caption{LOS, Rice}
	\end{subfigure}
	\caption{
		Ring of scattering objects.
		\label{fig:multipath-statistical-models}
	}
\end{figure}

\paragraph{NLOS case}

\skelpar[4]{Explain statistical model with Rayleighan distribution.}
\begin{equation}
	\Re{h_l(n)}, \Im{h_l(n)}
	\sim \mathcal{N} \left(0, \frac{1}{2} \E{|h_l(n)|^2} \right)
\end{equation}
\skelpar[4]

\paragraph{LOS case}

\skelpar[4]{Explain statistical model with Rician distribution.}
\begin{equation}
	\Re{h_l(n)}, \Im{h_l(n)}
	\sim \mathcal{N} \left( \frac{A_l}{\sqrt{2}}, \frac{1}{2} \sigma_l^2 \right)
\end{equation}
\skelpar[4]