SYSTEM, METHOD, APPARATUS, AND COMPUTER PROGRAM PRODUCT FOR CALCULATING A SAMPLED SIGNAL
20180121387 ยท 2018-05-03
Inventors
- Alexey Grishin (West Vancouver, CA)
- Alexander Zhirkov (West Vancouver, CA)
- Alexey Oraevsky (West Vancouver, CA)
Cpc classification
G06F17/142
PHYSICS
International classification
G06F17/14
PHYSICS
Abstract
A method, apparatus, and computer program product for calculating a sampled signal are disclosed. A method in accordance with the disclosure may include determining discrete samples of a continuous signal having a finite spectrum and using a function series expansion to calculate at least a portion of the continuous signal over the discrete samples. In accordance with some embodiments, an original signal may be calculated over discrete samples with arbitrary accuracy. Polyphase filtering is not used in some embodiments. Some embodiments can be used for arbitrary, including irrational, variation of the sampling rate of the signal with a bounded spectrum. Some embodiments provide for much faster calculation than direct application of the Kotelnikov (Nyquist-Shannon) theorem. In some embodiments, the calculation may be performed according to the disclosed theorem but, instead of discrete signal convolutions with kernels having different phases, a function series expansion may be used.
Claims
1. A method for calculating a sampled signal, the method comprising: determining a plurality of discrete samples of a continuous signal having a finite spectrum; and using a function series expansion to calculate at least a portion of the continuous signal over the plurality of discrete samples.
2. The method of claim 1, wherein using the function series expansion to calculate the continuous signal comprises using a Taylor series expansion to calculate the continuous signal.
3. An apparatus comprising processing circuitry configured to control the apparatus to at least: determine a plurality of discrete samples of a continuous signal having a finite spectrum; and use a function series expansion to calculate at least a portion of the continuous signal over the plurality of discrete samples.
4. The apparatus of claim 3, wherein the processing circuitry is further configured to control the apparatus to use the function series expansion to calculate the continuous signal at least in part by using a Taylor series expansion to calculate the continuous signal.
5. A computer program product comprising at least one non-transitory computer readable storage medium having computer program code stored thereon, the computer program code comprising: program code for determining a plurality of discrete samples of a continuous signal having a finite spectrum; and program code for using a function series expansion to calculate at least a portion of the continuous signal over the plurality of discrete samples.
6. The computer program product of claim 5, wherein the program code for using the function series expansion to calculate the continuous signal comprises program code for using a Taylor series expansion to calculate the continuous signal.
7. An apparatus comprising: means for determining a plurality of discrete samples of a continuous signal having a finite spectrum; and means for using a function series expansion to calculate at least a portion of the continuous signal over the plurality of discrete samples.
8. The apparatus of claim 7, wherein the means for using the function series expansion to calculate the continuous signal comprises means for using a Taylor series expansion to calculate the continuous signal.
Description
BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS
[0022] Having thus described the disclosure in general terms, reference will now be made to the accompanying drawings, which are not necessarily drawn to scale, and wherein:
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
DETAILED DESCRIPTION OF THE DISCLOSURE
[0030] The present disclosure now will be described more fully hereinafter with reference to the accompanying drawings, in which some, but not all aspects of the disclosure are shown. Indeed, the disclosure may be embodied in many different forms and should not be construed as limited to the aspects set forth herein; rather, these aspects are provided so that this disclosure will satisfy applicable legal requirements. Like numbers refer to like elements throughout.
[0031] Aspects of the present disclosure are generally directed to apparatuses and methods for calculating signal values at instants of time T.sub.d.Math.n given the values T.sub.s.Math.k (with possible filtering, at lowering the frequencies). Without loss of generality, the initial period may be assumed as T.sub.s=1. Hereinafter, the time may be measured in the initial sampling periods T.sub.s (see, e.g.,
[0032] In
[0033] Since we assume that the original signal x(t) (as well as filtered {circumflex over (x)}(t)) satisfies the Kotelnikov theorem and has a finite spectrum, it is an infinitely differentiable function. Therefore, the original signal can be expanded using a function series expansion. For example, we can expand the Taylor series of the original signal in the neighborhood of any point with the known derivatives:
[0034] If we take the nearest known point, in whose neighborhood lies the calculated point, as the origin of coordinates, then the expansion will be in the neighborhood of zero.
[0035] To perform the expansion, the derivatives of the calculated signal should be computable. To calculate the signal itself (perhaps, with filtering), using equation (3), it is necessary to perform convolution of the sampled version with sinc-function. Let * denote convolution, Ddifferentiation. According to the properties of the convolution, the following equation is true:
D(f*g)=D(f)*g=f*D(g)(6)
[0036] Note that sinc-function is an infinitely differentiable function. Consider some of its derivatives:
etc. In order not to complicate the equation, the value is not explicitly defined at 0, though it may be assumed that the function may be continued by continuity at 0.
[0037] From equations (3) and (6), the calculation of the derivatives follows. Convolving a sampled signal with the derivatives of sinc-function, the derivatives of the original continuous signal x(t) (or, more exactly, {circumflex over (x)}(t) since a finite sum is present and filtering might have been performed) may be obtained.
Fast Calculation
[0038] In calculation, the values of the function and its derivatives taken only at the integer points are required, so equation (3) can be rewritten as follows:
{circumflex over (x)}.sup.(m)(n)=.sub.k=N/2.sup.N/2x(k).Math.sinc.sup.(m)(K.Math.(nk))(7)
[0039] As in choosing the window size in equations (3) or (7), the infinite series may be bound by a partial sum. Then, equation (5) can be written as follows:
[0040] In practice, when choosing M, account can be taken of the accuracy of the implemented calculations as well as the efficiency/quality ratio (which is often subjective). In this regard, in some example embodiments, M may be selected based at least in part on one or more of a desired threshold accuracy level or a harmonic complexity of the signal.
[0041] Since the derivative values are required only at integer points, and the phases of convolution kernels do not depend on the initial and final sampling rates, it may be unnecessary to calculate a large number of nearly identical kernels, differing only in phase. In accordance with some example embodiments, the convolution kernels may be the same at any increase in the frequency, and with lowering the frequency the convolution kernels may differ only due to the need of filtering. Such example embodiments can provide several benefits, including that the convolution kernels are few in number, do not change during resampling of the entire signal, and no subsequent decimation of the results of convolution optimized with FFT is required. In some instances, the M convolution kernels may be pre-calculated (according to the number of used coefficients of the series). In the course of operation, the convolutions may be computed using FFT, thus giving the derivatives directly in N integer points (e.g., the size of the FFT window), and then the values of samples may be calculated by series summation. Each individual sample requires only M multiplications and additions (hereinafter, operations).
[0042] In some aspects, a more accurate formula describing the total computational costs per sample obtained may be derived. The initial and final frequencies may be denoted as Fs and Fd, respectively. If the signal is processed as pieces, N samples each, then each such piece will result in N*Fd/Fs resampled samples. Calculation of one derivative for N initial samples may cost approximately N+N*log.sub.2(N) operations (point-wise multiplication, inverse FFT). Since M derivatives may be used, as well as calculation of the direct FFT from the source signal, computation of the same for N points may cost N*log.sub.2(N)+(N+N*log.sub.2(N))*M operations. Altogether, for only one point the following operations may be consumed:
[0043] In experiments with some example embodiment, M=9 appeared enough for the result to be better than that of the known sound editors (pure, in terms of spectrum reflection). In these experiments, the convolution window was taken as 8192. It will be appreciated, however, that other values of M and/or other convolution windows may be used in various example embodiments. For example, M may be selected in various implementations based at least in part on a desired threshold accuracy level, a harmonic complexity of the signal, and/or other factors. In using equation (3) directly, N operations per each sample will be required for the convolution only, in addition to the need to calculate sinc-functions. Optimization of the convolution due to the properties of FFT may not work in the general case, as the kernels may be unique for each sample.
[0044] Note that aspects of the method of some example embodiments allow both decreasing and increasing the sampling frequency. For such variation of the sampling frequency, consideration may be taken to account for correct assignment of the coefficient K that is responsible for low-pass filtering. Note that aspects of the method of some example embodiments allow both decreasing and increasing the sampling frequency. For such variation of the sampling frequency, consideration may be taken to account for correct assignment of the coefficient K that is responsible for low-pass filtering. K can, for example, be defined in accordance with equation (4). As can be seen from equation (4), K can differ when decreasing and increasing the sampling rate. If the sampling rate is increased, then there may not be any risk of aliasing, and the current frequency can be taken for the Nyquist frequency. If, however, the sampling rate is reduced, it may be necessary to remove the high frequencies that cannot be transferred at the new (lower) sampling rate. The ratio of Ts/Td describes how many times the Nyquist frequency will change. When reducing the sampling rate, filtering may be needed. Therefore, the sinc-function may be stretched over time by a factor of Ts/Td. Thus, the coefficient K may be used to regulate the frequency range to be resampled, adjusting the frequency range to the new Nyquist frequency.
[0045] When calculating K according to equation (4), the result may be the Kotelnikov (Nyquist) theorem, per se, with increasing sampling rate, whereas decreasing the sampling rate may cause low-pass filtering down to the new Nyquist frequency. If the lower value of K is selected, then the high frequencies that are possible to transfer with the new sampling rate may be removed from signal. In this regard, data loss may occur. If the higher value of K is selected, then spectrum reflection may occur. As an example, consider a signal with a sampling rate of 22,050 Hz. If the sampling rate is lowered to 12,000 Hz, elimination of frequencies above 6,000 Hz may be desired. If the coefficient K is assigned incorrectly and remains equal to , spectrum reflection may occur.
[0046] If N=8192 and M=9 are substituted in equation (9) and Fd/Fs assumed to be close to unity, then 148 operations per sample are obtained. In some aspects, practical applications may allow less accuracy, and may be considered the least optimal option. In some cases it may be possible to reduce computations without calculating obvious null terms of series.
[0047] With decreasing the frequency by a multiple number of times
only the 0.sup.th term of the series will be nonzero, so in this case the operation can be quickened without calculating higher derivatives. Also, with greater decrease in the frequency (more than twofold), in terms of efficiency it appears reasonable to perform two-pass resampling. On the first pass, the frequency decreases by a maximum integer number of times until the frequency higher than the final frequency is achieved. In doing so, the calculation of derivatives is not required, and the whole operation runs almost M times faster than during complete decomposition. The second pass may be used to perform resampling with all its derivatives, but in that case, the initial data is already substantially reduced. For instance, in order to convert the frequency of 44100 to 8000, the amount of data should first be reduced five-fold by lowering the frequency from 44100 to 8820.
[0048]
[0049] Once the Fourier transforms for the convolution kernels have been calculated, the derivatives of the signal itself can be computed, as shown in
[0050] To calculate each new sample, its time relative to the beginning of the block may be determined with the calculated derivatives in the initial periods. If the time is greater than the calculated block, the next 2*N derivatives may then be computed. If the current sample falls within the calculated block, the point in whose neighborhood lies the present sample may be found and calculated according to equation (8).
[0051]
[0052]
[0053] With reference to
[0054] In some example embodiments, the sampling frequency of a primary grid of the discrete samples may be varied, such as with an arbitrary, including irrational, ratio of frequencies. However, the same set of M convolution kernels initialized in operation 500 may be used for resampling of the entirety of the at least a portion of the continuous signal regardless of the variation of sampling frequency.
[0055] It will be understood that each block of the flowcharts in
[0056]
[0057] In some example embodiments, the apparatus 600 may include processing circuitry 610 that is configurable to perform actions in accordance with one or more example embodiments disclosed herein. In this regard, the processing circuitry 610 may be configured to perform and/or control performance of one or more functionalities of apparatus 600 in accordance with various example embodiments. Thus, the processing circuitry 610 may be configured to perform data processing, application execution and/or other processing and management services according to one or more example embodiments. As such, the processing circuitry 610 may provide means for performing resampling and signal calculation methods in accordance with various example embodiments. For example, the processing circuitry 610 and/or one or more other components of the apparatus 600 may provide means for performing one or more of the operations illustrated in and described with respect to
[0058] In some embodiments, the apparatus 600 or a portion(s) or component(s) thereof, such as the processing circuitry 610, may include one or more chipsets, which may each include one or more chips. The processing circuitry 610 and/or one or more further components of the apparatus 600 may therefore, in some instances, be configured to implement an embodiment on a chipset. For example, the apparatus 600, or portion thereof, may be implemented on a sound card, analog-to-digital audio converter, audio processor, or the like.
[0059] In some example embodiments, the processing circuitry 610 may include a processor 612 and, in some embodiments, such as that illustrated in
[0060] The processor 612 may be embodied in a variety of forms. For example, the processor 612 may be embodied as various processing means such as a microprocessor, a coprocessor, a controller or various other computing or processing devices including integrated circuits such as, for example, an ASIC (application specific integrated circuit), an FPGA (field programmable gate array), some combination thereof, or the like. Although illustrated as a single processor, it will be appreciated that the processor 612 may comprise a plurality of processors. The plurality of processors may be in operative communication with each other and may be collectively configured to perform one or more functionalities of the apparatus 600. In embodiments including a plurality of processors, the processors may be implemented on a single computing device, or may be distributed across a plurality of computing devices that may be collectively configured to provide functionality of the apparatus 600 in accordance with some example embodiments. In some example embodiments, the processor 612 may be configured to execute instructions that may be stored in the memory 614 or that may be otherwise accessible to the processor 612. As such, whether configured by hardware or by a combination of hardware and software, the processor 612 capable of performing operations according to various embodiments while configured accordingly.
[0061] In some example embodiments, the memory 614 may include one or more memory devices. In embodiments including multiple memory devices, the memory devices may be implemented on a single computing device, or may be distributed across a plurality of computing devices that may be collectively configured to provide functionality of the apparatus 600 in accordance with some example embodiments. Memory 614 may include fixed and/or removable memory devices. In some embodiments, the memory 614 may provide a non-transitory computer-readable storage medium that may store computer program instructions that may be executed by the processor 612. In this regard, the memory 614 may be configured to store information, data, applications, instructions and/or the like for enabling the apparatus 600 to carry out various functions in accordance with one or more example embodiments. In some embodiments, the memory 614 may be in communication with one or more of the processor 612, communication interface 616, or signal processing module 618 via a bus(es) for passing information among components of the apparatus 600.
[0062] The apparatus 600 may further include a communication interface 616. The communication interface 616 may enable the apparatus 600 to receive a signal that may be sent by another computing device, such as over a network. In this regard, the communication interface 616 may include one or more interface mechanisms for enabling communication with other devices and/or networks. As such, the communication interface 616 may include, for example, an antenna (or multiple antennas) and supporting hardware and/or software for enabling communications with a wireless communication network (e.g., a cellular network, WLAN, and/or the like) and/or a communication modem or other hardware/software for supporting communication via cable, digital subscriber line (DSL), USB, FireWire, Ethernet or other wireline networking methods.
[0063] The apparatus 600 may further include signal processing module 618. The signal processing module 618 may be embodied as various means, such as circuitry, hardware, a computer program product comprising computer readable program instructions stored on a computer readable medium (for example, the memory 614) and executed by a processing device (for example, the processor 612), or some combination thereof. In some embodiments, the processor 612 (or the processing circuitry 610) may include, or otherwise control the signal processing module 618. The signal processing module 618 may be configured to use a function series expansion to calculate at least a portion of a continuous signal in accordance with various embodiments. Thus, for example, the signal processing module 618 may be configured to perform one or more operations illustrated in and described with respect to
[0064]
[0065] The signal source apparatus 704 may comprise a server or other computing device that may be configured to send a signal to the receiving apparatus 702 over the network 706. For example, the signal source apparatus 704 may stream digital audio to the receiving apparatus 702. The receiving apparatus 702 may comprise any computing device configured to receive a signal sent by the signal source apparatus 704. By way of non-limiting example, the receiving apparatus 702 may be embodied as a desktop computer, laptop computer, or a mobile computing device, such as a smart phone, tablet computing device, or other wireless mobile computing device.
[0066] In some example embodiments, the apparatus 600 may be implemented on the receiving apparatus 702. As such, the receiving apparatus 702 may be configured to perform resampling and signal determination operations for a signal received from the signal source apparatus 704 in accordance with various example embodiments. In embodiments in which the receiving apparatus 702 is implemented as a mobile computing device or other computing device that may be power constrained and/or processing power constrained, such as due to size limitations, a finite battery life, and/or other factors, the receiving apparatus 702 may benefit from the technical effect of the computational efficiency provided by various example embodiments. In this regard, the reduced computational complexity provided by some example embodiments may reduce power consumption by such a device. Further, the reduced computational complexity provided by some example embodiments may enable faster, more accurate signal resampling to be performed on mobile devices having relatively limited processing power.
[0067] Many modifications and other embodiments of the inventions set forth herein will come to mind to one skilled in the art to which these inventions pertain having the benefit of the teachings presented in the foregoing descriptions and the associated drawings. Therefore, it is to be understood that the embodiments of the invention are not to be limited to the specific embodiments disclosed and that modifications and other embodiments are intended to be included within the scope of the invention. Moreover, although the foregoing descriptions and the associated drawings describe example embodiments in the context of certain example combinations of elements and/or functions, it should be appreciated that different combinations of elements and/or functions may be provided by alternative embodiments without departing from the scope of the invention. In this regard, for example, different combinations of elements and/or functions than those explicitly described above are also contemplated within the scope of the invention. Although specific terms are employed herein, they are used in a generic and descriptive sense only and not for purposes of limitation.