Efficient codec for electrical signals
Abstract
A method for compressing a signal, the method comprising: acquiring, via a signal recording module, a primary signal; modelling, via a processor, a model signal of the primary signal by: acquiring, via the processor, a sampled signal; acquiring, via the processor, a windowed signal; and extracting, via the processor: a fundamental frequency waveform having a fundamental magnitude and a fundamental phase; and at least one harmonic frequency waveform having a harmonic magnitude and a harmonic phase; wherein the model signal comprises the fundamental frequency waveform and the at least one harmonic frequency waveform; calculating, via the processor, an error signal between a reconstructed signal and the primary signal; determining, via the processor, an optimal gain from at least; an averaging step providing an average value, a predefined threshold, and a scaled signal.
Claims
exact text as granted — not AI-modifiedThe invention claimed is:
1. A method for compressing a primary signal, the method comprising:
acquiring, via a signal recording module, the primary signal;
modelling, via a processor, a model signal of the primary signal by:
acquiring, via the processor, a sampled signal from the primary signal;
acquiring, via the processor, a windowed signal from the sampled signal; and
extracting from the windowed signal, via the processor:
a fundamental frequency waveform having a fundamental magnitude, a fundamental phase, and a fundamental frequency;
at least one harmonic frequency waveform having a harmonic magnitude, a harmonic phase, and a harmonic frequency; and
recreating the model signal from the fundamental frequency waveform and the at least one harmonic frequency waveform;
calculating, via the processor, an error signal between the model signal and the primary signal;
determining, via the processor, an optimal gain by iteratively:
i) multiplying a historical error signal with a predetermined gain to create a scaled signal;
ii) averaging a difference between the error signal and the scaled signal to obtain an average value;
iii) comparing the average value with a predetermined threshold; and
upon determining that the average value meets the predetermined threshold, setting the optimal gain to the predetermined gain;
upon determining that the average value does not meet the predetermined threshold, adjusting the predetermined gain, and repeating steps i), ii), and iii) with the adjusted predetermined gain;
subtracting the error signal from the historical error signal to create a residual signal; and
vector quantising the residual signal as a number of residual indexes; and
composing, via the processor, a compressed signal, wherein the compressed signal comprises:
the fundamental phase;
the fundamental magnitude;
the fundamental frequency;
the harmonic phase;
the harmonic magnitude;
the harmonic frequency;
the optimal gain; and
the residual indexes.
2. The method of claim 1 , wherein:
the sample signal is acquired by sampling, via the processor, the primary signal at the Nyquist rate;
the windowed signal is acquired by applying, via the processor, a window function to the sampled signal; and
the fundamental frequency waveform and the at least one harmonic frequency waveform are extracted by applying, via the processor, a Fast Fourier Transform to the windowed signal.
3. The method of claim 1 , wherein the predetermined gain is adjusted, via the processor, using a stochastic descent algorithm.
4. The method of claim 1 , wherein the residual signal is vector quantised with respect to a predefined codebook, wherein the predefined codebook is stored in a data store of an energy management system.
5. The method of claim 1 , wherein the residual signal is delta encoded, thereby producing a delta encoded coefficient.
6. A method for decompressing a compressed primary signal obtained through the method as claimed in claim 1 , the method comprising:
extracting, via a processor, the fundamental phase, the fundamental magnitude, the fundamental frequency, the harmonic phase, the harmonic magnitude, the harmonic frequency, the optimal gain, and the residual indexes; and
reconstructing, via the processor, a decompressed primary signal from the fundamental phase, the fundamental magnitude, the fundamental frequency, the harmonic phase, the harmonic magnitude, the harmonic frequency. the optimal gain, and the residual indexes.
7. The method according to claim 6 , further comprising recreating the residual signal by:
comparing, via the processor, the residual indexes to a predefined codebook,
wherein the predefined codebook is stored in a data store; and
recreating, via the processor, the residual signal with respect to the predefined codebook based on the residual indexes.
8. The method according to claim 6 , wherein reconstructing the decompressed primary signal comprises:
summing, via the processor, the residual signal with a historic residual signal multiplied by the optimal gain, thereby creating a summed residual signal;
recreating, via the processor, a sinusoidal component of the decompressed primary signal based on:
the fundamental phase;
the fundamental magnitude;
the fundamental frequency;
the harmonic phase;
the harmonic magnitude; and
the harmonic frequency;
summing, via the processor, the summed residual signal and the sinusoidal component, thereby reconstructing the decompressed primary signal.
9. The method according to claim 8 , wherein the historical residual signal is a previous residual signal from a previous time interval stored in the data store.
10. A system for decompressing a compressed primary signal, the system comprising:
a receiver configured to receive the compressed primary signal;
a data store comprising:
a predefined codebook; and
a historic residual signal; and
a decompression unit comprising a processor, the processor being configured to implement a decompression method as claimed in claim 6 .
11. A system for compressing a primary signal, the system comprising:
a signal recording module configured to acquire the primary signal;
a data store comprising:
a historical error signal;
a predefined codebook; and
a processor configured to: implement a compression method as claimed in claim 1 ; and
a transmitter configured to transmit the compressed primary signal.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.