Finite Impulse Reseponse Interpolator (``firinterp``) ===================================================== .. author jgaeddert Joseph D. Gaeddert .. date January 1, 1975 .. location Boston, MA .. header /doc/firinterp/banner.png .. keywords firinterp, interpolation, resample .. api firinterp_crcf The ``interp`` object implements a basic interpolator with an integer output-to-input resampling ratio. Operation --------- Interpolation in |liquid| is accomplished with a polyphase filter-bank channelizer. An example of the ``interp`` interface is listed below. .. code-block:: c #include int main() { unsigned int M=4; // interpolation factor unsigned int h_len; // interpolation filter length // design filter and create interpolator float h[h_len]; // filter coefficients firinterp_crcf q = firinterp_crcf_create(M,h,h_len); // generate input signal and interpolate float complex x; // input sample float complex y[M]; // output samples // run interpolator (repeat as necessary) { firinterp_crcf_execute(q, x, y); } // destroy the interpolator object firinterp_crcf_destroy(q); } Examples -------- Listed below is the full interface to the ``interp`` family of objects. While each method is listed for ``firinterp_crcf``, the same functionality applies to ``interp_rrrf`` and ``interp_cccf``. .. qplot:: series filter/firinterp_example.c :kwargs: { "format": { "xlabel" : "Time [samples]", "xrange" : [-5, 40], "yrange" : [-1.6, 1.6], "legend" : ["interp","symbols"] }, "plots":[ {"ylabel":"Real", "series":[ ["ty","y-real",".-",{"color":"#aaa"}], ["tx","x-real",".", {"color":"#004080"}] ]}, {"ylabel":"Imag", "series":[ ["ty","y-imag",".-",{"color":"#aaa"}], ["tx","x-imag",".", {"color":"#008040"}] ]} ]} :width: 75% :name: fig-filter-firinterp_crcf :caption: ``firinterp_crcf`` (interpolator) example with :math:`M=4`, compensating for filter delay. A graphical example of the interpolator can be seen in :numref:`fig-filter-firinterp_crcf`. A detailed example program is given in `examples/firinterp_crcf_example.c`, located under the main |liquid| project directory. Interface --------- Listed below is the full interface to the ``firinterp`` family of objects. .. api:: firinterp