An alternative approach to shape the spectrum of the OFDM signal is the so called Acitve Interference Cancellation (AIC) as presented in [4] and [5], where $N_\mathrm{c}$ cancellation carriers (CC) are inserted on each notch edge. First we need to disable the respective subcarriers in the range from $n_{\mathrm{F}}-N_{\mathrm{c}}$ to $n_{\mathrm{L}}+N_{\mathrm{c}}$ similar to the previously described tone nulling $$ \tilde{\mathbf{s}}_{k}=\left(s_{k,0},\ldots,s_{k,n_{\mathrm{F}}-N_{\mathrm{c}}-1},0,\ldots,0,s_{k,n_{\mathrm{L}}+N_{\mathrm{c}}+1},\ldots,s_{k,N_{\mathrm{sub}}-1}\right)^{\mathrm{T}} $$ With $\tilde{\mathbf{s}}_{k}$ we can compute the AIC signal ${\mathbf{c}}_{k}$ which contains the complex valued cancellation coefficients $c_{k,n}\in\mathbb{C}$ $$ \mathbf{c}_{k}=\left(0,\ldots,0,c_{k,n_{\mathrm{F}}-N_{\mathrm{c}}},\ldots,c_{k,n_{\mathrm{L}}+N_{\mathrm{c}}},0,\ldots,0\right)^{\mathrm{T}} $$
For the calculation of $\mathbf{c}_k$ we need the by $p$ upsampled spectrum $\mathbf{i}_{k}$ of the sender signal $\mathbf{x}_{k}$. For the elements $i_{k,l}$ with $l=0,1,2,\ldots,p\cdot N_{\mathrm{sub}}-1$ follows $$ i_{k,l}=\frac{1}{\sqrt{N_{\mathrm{sub}}}}\cdot\operatorname{DFT}_{p\cdot N_{\mathrm{sub}}}\left\{ x_{k,m}\right\} $$ The upsampled spectrum is $p$ times longer than $\mathbf{x}_k$, therefore we need to insert $(p-1)\cdot N_{\mathrm{sub}}$ zeros at the end of $\mathbf{x}_k$ before carrying out the transformation (zero padding). After applying the DFT we can shorten the sum to the first $N_\mathrm{sub}$ non-zero elements which leads to the high resolution spectrum $$ i_{k,l}=\frac{1}{\sqrt{N_{\mathrm{sub}}}}\cdot\sum_{m=0}^{N_{\mathrm{sub}}-1}x_{k,m}\cdot e^{-\mathrm{j}2\pi\frac{lm}{pN_{\mathrm{sub}}}} $$ Inserting the formula for the time domain signal leads to $$ i_{k,l}=\frac{1}{N_{\mathrm{sub}}}\cdot\sum_{n=0}^{N_{\mathrm{sub}}-1}\tilde{s}_{k,n}\cdot\sum_{m=0}^{^{N_{\mathrm{sub}}-1}}e^{\mathrm{j}2\pi\frac{m}{N_{\mathrm{sub}}}\left(n-\frac{l}{p}\right)} $$ Now we define an upsampling matrix $\mathbf{P}$ of size $p\cdot N_{\mathrm{sub}}\times N_{\mathrm{sub}}$ to express the computation of the high resolution spectrum in matrix vector notation $$ \mathbf{i}_{k}=\mathbf{P}\cdot\tilde{\mathbf{s}}_{k} $$ the elements $P_{ln}$ of $\mathbf{P}$ can be computed as follows $$ P_{ln}=\frac{1}{N_{\mathrm{sub}}}\cdot\sum_{m=0}^{N_{\mathrm{sub}}-1}e^{\mathrm{j}2\pi\frac{m}{N_{\mathrm{sub}}}\left(n-\frac{l}{p}\right)} $$ This expression can be simplified by using the geometric formula $$ P_{ln}=\begin{cases} \frac{1}{N_{\mathrm{sub}}}\cdot\frac{1-e^{\mathrm{j}2\pi\left(n-\frac{l}{p}\right)}}{1-e^{\mathrm{j}2\pi\frac{1}{N_{\mathrm{sub}}}\left(n-\frac{l}{p}\right)}} & n\ne\frac{l}{p}\\ 1 & n=\frac{l}{p} \end{cases} $$ Because we are interested in the range of the spectrum from $n_{\mathrm{F}}$ to $n_{\mathrm{L}}$ for the cancellation only the elements of $\mathbf{i}_{k}$ in the range $l=p\cdot n_{\mathrm{F}},\ldots,p\cdot n_{\mathrm{L}}$ denoted as $\mathbf{i}_{k}^{'}$ are needed. Therefore only the rows $l=p\cdot n_{\mathrm{F}},\ldots,p\cdot n_{\mathrm{L}}$ of $\mathbf{P}$ denoted as $\mathbf{P}^{'}$ are required for the calculation of $\mathbf{c}_k$ $$ \mathbf{i}_{k}^{'}=\mathbf{P}^{'}\cdot\mathbf{\tilde{s}}_{k} $$ To create a deep notch, the spectrum $\mathbf{i}_{k}^{'}$ needs to be cancelled out by the cancellation carriers. Therefore the high resolution spectrum of $\mathbf{c}_k$ should be contrary to $\mathbf{i}_{k}^{'}$ $$ \mathbf{P}^{'}\cdot\mathbf{c}_{k}=-\mathbf{i}_{k}^{'} $$ Because $\mathbf{c}_{k}$ contains zeros outside of the notch range we can define a smaller vector $\mathbf{c}_{k}^{'}$ who contains the nonzero elements in the range $n=n_{\mathrm{F}}-N_{\mathrm{c}},\ldots,n_{L}+N_{\mathrm{c}}$ $$ \mathbf{c}_{k}=\bigl(0,\ldots,0,\underbrace{c_{k,n_{\mathrm{F}}-N_{\mathrm{c}}},\ldots,c_{k,n_{\mathrm{L}}+N_{\mathrm{c}}}}_{\mathbf{c}_{k}^{'}},0,\ldots,0\bigr)^{\mathrm{T}} $$ For the calculation of the high resolution spectrum of $\mathbf{c}_{k}^{'}$ we define the matrix $\mathbf{P}^{''}$ which contains the colums $n=n_{\mathrm{F}}-N_{\mathrm{c}},\ldots,n_{L}+N_{\mathrm{c}}$ of $\mathbf{P}^{'}$. $$ \mathbf{P}^{''}\cdot\mathbf{c}_{k}^{'}=-\mathbf{i}_{k}^{'} $$ To determine $\mathbf{c}_{k}^{'}$ we seek to minimize the mean squared error $$ \underset{\mathbf{c}_{k}^{'}}{\min}\left\Vert \mathbf{P}^{''}\cdot\mathbf{c}_{k}^{'}+\mathbf{i}_{k}^{'}\right\Vert ^{2} $$ Which leeds to the following equation for $\mathbf{c}_{k}^{'}$ $$ \mathbf{c}_{k}^{'}=-\mathbf{P}^{''+}\cdot\mathbf{i}_{k}^{'} $$ $\mathbf{P}^{''+}$ denotes the Moore-Penrose pseudoinverse [6]. Insertion of $\mathbf{i}_{k}^{'}=\mathbf{P}^{'}\cdot\mathbf{\tilde{s}}_{k}$ finally leads to the desired equation which determines $\mathbf{c}_{k}^{'}$ based on the complex data symbols contained in $\mathbf{\tilde{s}}_{k}$ $$ \mathbf{c}_{k}^{'}=-\mathbf{P}^{''+}\cdot\mathbf{P}^{'}\cdot\mathbf{\tilde{s}}_{k}=\mathbf{C}\cdot\mathbf{\tilde{s}}_{k} $$ Where $\mathbf{C}$ is the AIC matrix. Because it only depends on $n_{\mathrm{F}}$, $n_{\mathrm{L}}$, $p$ and $N_\mathrm{c}$ it can be precomputed and stored. During the modulation only a matrix vector multiplication between $\mathbf{\tilde{s}}_{k}$ and $\mathbf{C}$ needs to be carried out per OFDM symbol.