Skip to main content
added 169 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143

Resampling the transmit OFDM waveform in the frequency domain by zero-padding the FFT prior to taking the IFFT has the advantage of simplicity and maintaining sub-carrier orthogonality (no inter-carrier interference). This would typically not be done for other waveforms due to excessive out of band emissions (OOBE), but the result here would be the same OOBE level as the original OFDM waveform, and an accepted side effect for the other benefits OFDM provides. Frequency domain resampling (zero-pad and IFFT) would be the go-to approach whenever the new sampling rate is a multiple of the sub-carrier spacing. The equivalent (exact) time domain operation is not to convolve with a Sinc filter, but to do a circular convolution with the Dirichlet Kernel (which is an aliased Sinc functionfunction; for the number of bins given in typical OFDM implementations this quite closely approximates a Sinc except at the band edges where the aliasing effect is more apparent).

Resampling the transmit OFDM waveform in the frequency domain by zero-padding the FFT prior to taking the IFFT has the advantage of simplicity and maintaining sub-carrier orthogonality (no inter-carrier interference). This would typically not be done for other waveforms due to excessive out of band emissions (OOBE), but the result here would be the same OOBE level as the original OFDM waveform, and an accepted side effect for the other benefits OFDM provides. Frequency domain resampling (zero-pad and IFFT) would be the go-to approach whenever the new sampling rate is a multiple of the sub-carrier spacing. The equivalent (exact) time domain operation is not to convolve with a Sinc filter, but to do a circular convolution with the Dirichlet Kernel (which is an aliased Sinc function).

Resampling the transmit OFDM waveform in the frequency domain by zero-padding the FFT prior to taking the IFFT has the advantage of simplicity and maintaining sub-carrier orthogonality (no inter-carrier interference). This would typically not be done for other waveforms due to excessive out of band emissions (OOBE), but the result here would be the same OOBE level as the original OFDM waveform, and an accepted side effect for the other benefits OFDM provides. Frequency domain resampling (zero-pad and IFFT) would be the go-to approach whenever the new sampling rate is a multiple of the sub-carrier spacing. The equivalent (exact) time domain operation is not to convolve with a Sinc filter, but to do a circular convolution with the Dirichlet Kernel (which is an aliased Sinc function; for the number of bins given in typical OFDM implementations this quite closely approximates a Sinc except at the band edges where the aliasing effect is more apparent).

added 801 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143

Alternate approaches for interpolating to other arbitrary sample rates when we do not have a target sampling rate that is a multiple of the bin spacing are to do the resampling using traditional multi-rate sampling rate conversions in the time domain. In this case the restrictive requirement to introduce no inter-carrier interference as described above is instead pushed aside for a requirement to not degrade Tx EVM above a certain limit. For this I recommend using the least squares algorithm (firls in Matlab, Octave and Python scipy.signal) to design the interpolation filter, where filter complexity and overall time delay is traded for meeting the performance objective. (NOTE: I recommend NOT using firpm or equi-ripple techniques for resampling applications of high ratios as the flat stop band results in increased total aliasing noise versus what can be achieved with a filter solution that has a stop-band roll-off such as firls.) The Tx processing in this case would proceed as IFFT on the lower rate FFT samples, add Cyclic Prefix, and then resample the resulting time domain waveform to the desired output rate. The least squares approach results in an optimized filter in the least squares sense and is preferred over a windowed Sinc for minimum error and complexity- further, multi-band filters can be used which minimize resources in resampling applications where multiple alias regions exist and lend themselves well to polyphase implementations.

Additional note for @Fatima who is trying to convert my code to MATLAB, here is the function to calculate the Dirichlet Kernel directly and returns an identical result to the the diric function from scipy:

def dirich(n, N, M, m=0):
    # n: index for resulting time domain samples
    # N: original N samples for DFT
    # M: zero padded out to M total samples
    denom = M * np.sin(n*np.pi/(M))
    result = np.zeros(len(n), dtype = complex)
    result[np.where(denom==0)] = N/M
    result[np.where(denom!=0)] = np.sin(N/M * n* np.pi)[np.where(denom!=0)]/denom[np.where(denom!=0)]
    
    return result * np.exp(1j *(m) *2*np.pi*n/(M))

So replace N/M * diric(n*2*np.pi/M,N) in the code above with dirich(n, N, M) using this function.

Alternate approaches for interpolating to other arbitrary sample rates when we do not have a target sampling rate that is a multiple of the bin spacing are to do the resampling using traditional multi-rate sampling rate conversions in the time domain. In this case the restrictive requirement to introduce no inter-carrier interference as described above is instead pushed aside for a requirement to not degrade Tx EVM above a certain limit. For this I recommend using the least squares algorithm (firls in Matlab, Octave and Python scipy.signal) to design the interpolation filter, where filter complexity and overall time delay is traded for meeting the performance objective. The Tx processing in this case would proceed as IFFT on the lower rate FFT samples, add Cyclic Prefix, and then resample the resulting time domain waveform to the desired output rate. The least squares approach results in an optimized filter in the least squares sense and is preferred over a windowed Sinc for minimum error and complexity- further, multi-band filters can be used which minimize resources in resampling applications where multiple alias regions exist and lend themselves well to polyphase implementations.

Alternate approaches for interpolating to other arbitrary sample rates when we do not have a target sampling rate that is a multiple of the bin spacing are to do the resampling using traditional multi-rate sampling rate conversions in the time domain. In this case the restrictive requirement to introduce no inter-carrier interference as described above is instead pushed aside for a requirement to not degrade Tx EVM above a certain limit. For this I recommend using the least squares algorithm (firls in Matlab, Octave and Python scipy.signal) to design the interpolation filter, where filter complexity and overall time delay is traded for meeting the performance objective. (NOTE: I recommend NOT using firpm or equi-ripple techniques for resampling applications of high ratios as the flat stop band results in increased total aliasing noise versus what can be achieved with a filter solution that has a stop-band roll-off such as firls.) The Tx processing in this case would proceed as IFFT on the lower rate FFT samples, add Cyclic Prefix, and then resample the resulting time domain waveform to the desired output rate. The least squares approach results in an optimized filter in the least squares sense and is preferred over a windowed Sinc for minimum error and complexity- further, multi-band filters can be used which minimize resources in resampling applications where multiple alias regions exist and lend themselves well to polyphase implementations.

Additional note for @Fatima who is trying to convert my code to MATLAB, here is the function to calculate the Dirichlet Kernel directly and returns an identical result to the the diric function from scipy:

def dirich(n, N, M, m=0):
    # n: index for resulting time domain samples
    # N: original N samples for DFT
    # M: zero padded out to M total samples
    denom = M * np.sin(n*np.pi/(M))
    result = np.zeros(len(n), dtype = complex)
    result[np.where(denom==0)] = N/M
    result[np.where(denom!=0)] = np.sin(N/M * n* np.pi)[np.where(denom!=0)]/denom[np.where(denom!=0)]
    
    return result * np.exp(1j *(m) *2*np.pi*n/(M))

So replace N/M * diric(n*2*np.pi/M,N) in the code above with dirich(n, N, M) using this function.

deleted 194 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143

Resampling the transmit OFDM waveform in the frequency domain by zero-padding the FFT prior to taking the IFFT has the advantage of simplicity and maintaining sub-carrier orthogonality (no inter-carrier interference). This would typically not be done for other waveforms due to excessive out of band emissions (OOBE), but the result here would be the same OOBE level as the original OFDM waveform, and an accepted side effect for the other benefits OFDM provides. Frequency domain resampling (zero-pad and IFFT) would be the go-to approach whenever the new sampling rate is a multiple of the sub-carrier spacing. The equivalent (exact) time domain operation is not to convolve with a Sinc filter, but to do a circular convolution with the Dirichlet Kernel (which is an aliased Sinc function).

Alternate approaches for interpolating to other arbitrary sample rates arewhen we do not have a target sampling rate that is a multiple of the bin spacing are to do the resampling using traditional multi-rate sampling rate conversions in the time domain where. In this case the restrictive requirement to introduce no inter-carrier interference as described above is instead pushed aside for a requirement to not degrade Tx EVM above a certain limit. For this I recommend using the least squares algorithm (firls in Matlab, Octave and Python scipy.signal) to design the "sinc"interpolation filter, where filter complexity and overall time delay is traded for meeting the performance objective. The Tx processing in this case would proceed as IFFT on the lower rate FFT samples, add Cyclic Prefix, and then resample the resulting time domain waveform to the desired output rate. The least squares approach results in an optimized filter in the least squares sense and is preferred over a windowed Sinc for minimum error and complexity- further, multi-band filters can be used which minimize resources in resampling applications where multiple alias regions exist and lend themselves well to polyphase implementationspolyphase implementations.

Below, for educational interest only, I further detail the approach of how to do the resampling completely in the time domain using circular convolution with the Dirichlet Kernel, to demonstrate just how straight-forward the frequency domain approach is in comparison. This will provide an equivalent result which would have zero inter-carrier interference in the frequency domain, as the typical processing done of zero-padding the FFT is both simple and maintains carrier orthogonality. This answer is instructive in basic FFT properties but will also demonstrate the simplicity of doing this in the frequency domain whenever this is possible (whenever the interpolated rate is a multiple of the bin spacing). For all other cases as I introduced above, traditional time-domain resampling can be done on the resulting IFFT + CP (cyclic prefix) waveform. Orthogonality will not be maintained, but the error can be designed to be well below any performance requirement at the expense of filter complexity and time delay.

As for detailing the exact equivalent operations to frequency domain zero padding interpolation; zeroZero padding in the frequency domain interpolates more samples in the time domain. The value for each new time domain sample is the result of a circular convolution in the time domain with the Dirichlet Kernel, which generally has a magnitude given as:

The "proper center", and reason for the requirement on an odd length, results in a "zero-phase" interpolation (introducing no additional phase shift) and is understood with the aid of the graphic below, introducing terminology I will use:

Resampling the transmit OFDM waveform in the frequency domain by zero-padding the FFT prior to taking the IFFT has the advantage of simplicity and maintaining sub-carrier orthogonality (no inter-carrier interference). This would typically not be done for other waveforms due to excessive out of band emissions (OOBE), but the result here would be the same OOBE level as the original OFDM waveform, and an accepted side effect for the other benefits OFDM provides. Frequency domain resampling (zero-pad and IFFT) would be the go-to approach whenever the new sampling rate is a multiple of the sub-carrier spacing. The equivalent time domain operation is not to convolve with a Sinc filter, but to do a circular convolution with the Dirichlet Kernel (which is an aliased Sinc function).

Alternate approaches for interpolating to other arbitrary sample rates are to do the resampling using traditional multi-rate sampling rate conversions in the time domain where the restrictive requirement to introduce no inter-carrier interference as described above is instead pushed aside for a requirement to not degrade Tx EVM above a certain limit. For this I recommend using the least squares algorithm (firls in Matlab, Octave and Python scipy.signal) to design the "sinc" filter, where filter complexity and overall time delay is traded for meeting the performance objective. The Tx processing in this case would proceed as IFFT on the lower rate FFT samples, add Cyclic Prefix, and then resample the resulting time domain waveform to the desired output rate. The least squares approach results in an optimized filter in the least squares sense and is preferred over a windowed Sinc for minimum error and complexity- further, multi-band filters can be used which minimize resources in resampling applications where multiple alias regions exist and lend themselves well to polyphase implementations.

Below, for educational interest only, I further detail the approach of how to do the resampling completely in the time domain using circular convolution with the Dirichlet Kernel, to demonstrate just how straight-forward the frequency domain approach is in comparison. This will provide an equivalent result which would have zero inter-carrier interference in the frequency domain, as the typical processing done of zero-padding the FFT is both simple and maintains carrier orthogonality. This answer is instructive in basic FFT properties but will also demonstrate the simplicity of doing this in the frequency domain whenever this is possible (whenever the interpolated rate is a multiple of the bin spacing). For all other cases as I introduced above, traditional time-domain resampling can be done on the resulting IFFT + CP (cyclic prefix) waveform. Orthogonality will not be maintained, but the error can be designed to be well below any performance requirement at the expense of filter complexity and time delay.

As for detailing the exact equivalent operations to frequency domain zero padding interpolation; zero padding in the frequency domain interpolates more samples in the time domain. The value for each new time domain sample is the result of a circular convolution in the time domain with the Dirichlet Kernel, which generally has a magnitude given as:

The "proper center" and reason for the requirement on an odd length results in "zero-phase" interpolation (introducing no additional phase shift) and is understood with the aid of the graphic below, introducing terminology I will use:

Resampling the transmit OFDM waveform in the frequency domain by zero-padding the FFT prior to taking the IFFT has the advantage of simplicity and maintaining sub-carrier orthogonality (no inter-carrier interference). This would typically not be done for other waveforms due to excessive out of band emissions (OOBE), but the result here would be the same OOBE level as the original OFDM waveform, and an accepted side effect for the other benefits OFDM provides. Frequency domain resampling (zero-pad and IFFT) would be the go-to approach whenever the new sampling rate is a multiple of the sub-carrier spacing. The equivalent (exact) time domain operation is not to convolve with a Sinc filter, but to do a circular convolution with the Dirichlet Kernel (which is an aliased Sinc function).

Alternate approaches for interpolating to other arbitrary sample rates when we do not have a target sampling rate that is a multiple of the bin spacing are to do the resampling using traditional multi-rate sampling rate conversions in the time domain. In this case the restrictive requirement to introduce no inter-carrier interference as described above is instead pushed aside for a requirement to not degrade Tx EVM above a certain limit. For this I recommend using the least squares algorithm (firls in Matlab, Octave and Python scipy.signal) to design the interpolation filter, where filter complexity and overall time delay is traded for meeting the performance objective. The Tx processing in this case would proceed as IFFT on the lower rate FFT samples, add Cyclic Prefix, and then resample the resulting time domain waveform to the desired output rate. The least squares approach results in an optimized filter in the least squares sense and is preferred over a windowed Sinc for minimum error and complexity- further, multi-band filters can be used which minimize resources in resampling applications where multiple alias regions exist and lend themselves well to polyphase implementations.

Below, for educational interest only, I further detail the approach of how to do the resampling completely in the time domain using circular convolution with the Dirichlet Kernel, to demonstrate just how straight-forward the frequency domain approach is in comparison. This will provide an equivalent result which would have zero inter-carrier interference in the frequency domain, as the typical processing done of zero-padding the FFT is both simple and maintains carrier orthogonality. This answer is instructive in basic FFT properties but will also demonstrate the simplicity of doing this in the frequency domain whenever this is possible (whenever the interpolated rate is a multiple of the bin spacing).

Zero padding in the frequency domain interpolates more samples in the time domain. The value for each new time domain sample is the result of a circular convolution in the time domain with the Dirichlet Kernel, which generally has a magnitude given as:

The "proper center", and reason for the requirement on an odd length, results in a "zero-phase" interpolation (introducing no additional phase shift) and is understood with the aid of the graphic below, introducing terminology I will use:

added 576 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143
Loading
added 330 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143
Loading
added 339 characters in body; added 79 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143
Loading
added 5799 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143
Loading
added 5799 characters in body
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143
Loading
Source Link
Dan Boschen
  • 55k
  • 2
  • 59
  • 143
Loading