WOLFRAM SYSTEM MODELER
    realFFTsamplePointsReturn number of sample points for a real FFT  | 
     | 

SystemModel["Modelica.Math.FastFourierTransform.realFFTsamplePoints"]

This information is part of the Modelica Standard Library maintained by the Modelica Association.
ns = realFFTsamplePoints(f_max, f_resolution, f_max_factor=5);
From the maximum interested frequency f_max (in [Hz]) and the frequency resolution f_resolution (in [Hz]) the function computes the number of sample points ns that is as small as possible and fulfills the following criteria:
Note, in the original publication about the efficient computation of FFT (Cooley and Tukey, 1965), the number of sample points must be 2^a. However, all newer FFT algorithms do not have this strong restriction and especially not the open source software KissFFT from Mark Borgerding used in this function
ns = realFFTinfo(f_max=170, f_resolution=0.3)
results in the following output:
ns = 5760
| ns | 
         Type: Integer Description: Number of sample points that can be expressed as ns = 2^i*3^j*5^k and ns is even  | 
    
|---|
| Date | Description | 
|---|---|
| Nov. 29, 2015 | Initial version implemented by Martin R. Kuhn and Martin Otter (DLR Institute of System Dynamics and Control. |