Apparatus and method for performing a calculation operation

The invention provides an apparatus and a method for performing a calculation operation with at least one input signal consisting of signal sections, wherein each signal section of said input signal has a constant amplitude. The apparatus comprises a signal transformation unit for transforming at least one input signal into a first intermediary signal having a virtual amplitude with respect to at least one carrier signal. The calculation unit is provided for performing the calculation operation on said first intermediary signal to generate a second intermediary signal. A signal re-transformation unit re-transforms the second intermediary signal into an output signal consisting of signal sections, wherein each signal section of said output signal has a constant amplitude.

The invention relates to an apparatus and a method for performing a calculation operation with at least one input signal consisting of signal sections, wherein each signal section has a constant amplitude.

TECHNICAL BACKGROUND

In many applications there is a need to perform mathematical operations with two-dimensional continuous time signals, such as pulse-width modulated signals. In a two-dimensional continuous time signal the information is encoded into the amplitude as well as into the time location of signal edges of the continuous time signal. A mathematical operation with such signals becomes, for instance, necessary when such a signal is fed back and subtracted from an input signal to close a feedback loop.

There are many different kinds of continuous time signals having at least two discrete amplitude values.

FIG. 1shows four basic pulse modulation techniques according to the state of the art, i. e. pulse amplitude modulation (PAM), pulse-width modulation (PWM), pulse position modulation (PPM) and pulse density modulation (PDM).

Pulse-width modulation is different from PAM in that it provides information in time whereas PAM provides the information in the amplitude. The pulse-width modulated signal as shownFIG. 1Chas two discrete amplitude values. However, there are more complex pulse-width modulated signals, such as phase-shift carrier pulse-width modulated signals having, for example, four amplitude values. In a phase-shift carrier pulse-width modulated signal the information is encoded into discrete amplitude values and into the time location of signal edges of the continuous time signal.

The pulse position modulation (PPM) differs from pulse-width modulation in that the value of each instantaneous sample of a modulation wave causes the variation of the position in time of a pulse relative to its non-modulated time of a occurrence as shown inFIG. 1B.

Pulse density modulation PDM as shown inFIG. 1Dis based on a unity pulse width, height in a constant time of occurrence for the pulse width in the switching period. The modulated parameter is the presence of the pulse. For each sample interval it is determined if the pulse should be present or not, i. e. the density of the pulses is modulated.

Any of the continuous time signals described above can be varied in such that the information is encoded into the time location of the signal edges and into the amplitude values by providing more than two discrete amplitude values.

It is one aspect of the invention to provide an apparatus and a method for performing a calculation operation minimizing the non-linear distortions of the calculated output signal.

SUMMARY OF THE INVENTION

The invention provides an apparatus for performing a calculation operation with at least one input signal consisting of signal sections, wherein each signal section of the input signal has a constant amplitude, wherein the apparatus comprises:

A signal transformation unit for transforming said at least one input signal into a first intermediary signal having a virtual amplitude with respect to at least one carrier signal,

a calculation unit for performing the calculation operation on said first intermediary signal to generate a second intermediary signal, and

a signal retransformation unit for retransforming said second intermediary signal into an output signal consisting of signal sections, wherein each signal section of said output signal has a constant amplitude.

In a preferred embodiment of the apparatus according to the present invention the input signal is a two-dimensional continuous time signal with at least two discrete amplitude values, wherein the information is encoded into the amplitude and into the time location of signal edges of said continuous time signal.

In a preferred embodiment of the apparatus according to the present invention the first intermediary signal is a one-dimensional continuous time signal with a virtual amplitude wherein the information carried by said two-dimensional input signal is encoded into the virtual amplitude of the first intermediary signal.

In a preferred embodiment of the apparatus according to the present invention the second intermediary signal is a one-dimensional continuous time signal with a virtual amplitude.

In a preferred embodiment of the apparatus according to the present invention the calculation unit receives the first intermediary signal from said signal transformation unit and performs the calculation operation with the first intermediary signal and, if appropriate, with one or more further input signals.

In a preferred embodiment of the apparatus according to the present invention the further input signal consists of signal sections, wherein each signal section of the further input signal has a constant amplitude.

In a preferred embodiment of the apparatus according to the present invention the further input signal is a one-dimensional continuous time signal.

In a preferred embodiment of the apparatus according to the present invention the signal transformation unit comprises a carrier signal generator for each carrier signal to generate the carrier signal.

In a preferred embodiment of the apparatus according to the present invention the signal transformation unit further comprises a comparator for each carrier signal generator which compares the amplitude of the input signal with the amplitude of the generated carrier signal to generate a logical output signal indicating whether the amplitude of the input signal is higher than the amplitude of the carrier signal.

In a preferred embodiment of the apparatus according to the present invention the signal transformation unit further comprises a sample-and-hold circuit for each comparator which is triggered by the logical output signal of the respective comparator to store temporarily the amplitude of the respective carrier signal at an output terminal of the sample-and-hold circuit.

In a preferred embodiment of the apparatus according to the present invention the sample-and-hold circuit is triggered by a rising edge or a by falling edge of the logical signal output at an output terminal of the respective comparator.

In a preferred embodiment of the apparatus according to the present invention the signal transformation unit further comprises a detector circuit which is connected to the output terminals of the comparators and receives the logical output signal of the comparators to detect which carrier signal has caused a rising edge or a falling edge of a logical output signal.

In a preferred embodiment of the apparatus according to the present invention the signal transformation unit further comprises a multiplexer which is controlled by the detector circuit and which has several inputs connected to the output terminals of the sample-and-hold circuit.

In a preferred embodiment of the apparatus according to the present invention the temporarily stored amplitude of the carrier signal detected by the detector circuit is switched by the multiplexer through as a first intermediary signal to the calculation unit.

In a preferred embodiment of the apparatus according to the present invention each carrier signal generator generates a periodic triangular signal.

In an alternative embodiment of the apparatus according to the present invention each carrier signal generator generates a periodic saw tooth signal.

In a preferred embodiment of the apparatus according to the present invention the carrier signal generator is formed by a counter.

In a preferred embodiment of the apparatus according to the present invention the generated carrier signals are phase shifted with respect to each other.

In a preferred embodiment of the apparatus according to the present invention the phase shift between two carrier signals is 360° divided by a number N of provided carrier signals.

In a preferred embodiment of the apparatus according to the present invention the calculation unit is a subtractor for subtracting a feedback signal from said first intermediary signal to generate the second intermediary signal.

In a preferred embodiment of the apparatus according to the present invention the calculation unit performs a selectable calculation operation.

In a preferred embodiment of the apparatus according to the present invention the input signal is generated by a signal source.

In a preferred embodiment of the apparatus according to the present invention the signal source generates the input signal in response to an analogue signal.

In a preferred embodiment of the apparatus according to the present invention the signal source generates the input signal in response to a PCM signal.

In a preferred embodiment of the apparatus according to the present invention the signal retransformation unit comprises an input terminal for receiving the second intermediary signal from the calculation unit,

a carrier signal generator provided for each carrier signal,

a comparator for each carrier signal generator that compares the second intermediary signal with the respective carrier signal to generate a corresponding comparator output signal,

an adder for adding the comparator output signals to generate a sum signal,

a scaling unit for scaling the generated sum signal, and

an output terminal to output the scaled sum signal as the output signal of said apparatus.

In a preferred embodiment of the apparatus according to the present invention the input signal is a pulse-width modulated signal.

In a preferred embodiment of the apparatus according to the present invention the output signal is performed by a pulse-width modulated signal.

In a preferred embodiment of the apparatus according to the present invention the input signal is a pulse-density modulated signal.

In a preferred embodiment of the apparatus according to the present invention the output signal is a pulse-density modulated signal.

In a preferred embodiment of the apparatus according to the present invention the input signal is a pulse-position modulated signal.

In a preferred embodiment of the apparatus according to the present invention the output signal is a pulse-position signal.

The invention further provides a method for performing a calculation operation with at least one input signal consisting of signal sections wherein each signal section of said input signal has a constant amplitude, wherein the method comprises the following steps:

Transforming said input signal into a first intermediary signal having a virtual amplitude with respect to a carrier signal, performing the calculation operation on said first intermediary signal to generate a second intermediary signal,

retransforming said second intermediary signal into an output signal consisting of signal sections, wherein each signal section of said output signal has a constant amplitude.

The invention further provides a computer program for performing a calculation operation with at least one input signal consisting of signal sections wherein each signal section of said input signal has a constant amplitude, said method comprising the following steps:

Transforming said input signal (S1) into a first intermediary signal (S2) having a virtual amplitude with respect to a carrier signal,

performing the calculation operation on said first intermediary signal (S2) to generate a second intermediary signal (S3),

retransforming said second intermediary signal (S3′) into an output signal (S4) consisting of signal sections, wherein each signal section of said output signal has a constant amplitude.

The invention further provides a data carrier for storing a computer program which performs a method for performing the calculation operation with at least input signal consisting of signal sections, wherein each signal section of the input signal has a constant amplitude, wherein the method comprises the following steps:

Transforming said input signal (S1) into a first intermediary signal (S2) having a virtual amplitude with respect to a carrier signal, performing the calculation operation on said first intermediary signal (S2) to generate a second intermediary signal (S3),

retransforming said second intermediary signal (S3′) into an output signal (S4) consisting of signal sections, wherein each signal section of said output signal has a constant amplitude.

DETAILED DESCRIPTION OF THE DRAWINGS

In the following, preferred embodiments of the apparatus and the method for performing a calculation operation are described with reference to enclosed figures.

As can be seen fromFIG. 2, the calculation apparatus1according to the present invention consists of a signal transformation unit2for transforming an input signal S1into a first intermediary signal S2, a calculation unit3for performing a calculation operation on the first intermediary signal S2to generate a second intermediary signal S3and a signal retransformation unit4for retransforming the second intermediary signal S3output by the calculation unit3into an output signal S4. The calculation apparatus1comprises in a preferred embodiment a first input5for receiving a first input signal S1and a second input6for receiving a second input signal S2′. The output signal generated by the signal retransformation unit4is output at an output terminal7of the calculation apparatus1. The input signal S1applied to the first input terminal5of the calculation apparatus1is a two-dimensional continuous time signal with at least two discrete amplitude values wherein the information is encoded into an amplitude and into the time location of signal edges of the continuous time signal. This input signal is, for instance, a pulse-width modulated signal having at least two discrete amplitude values. The input signal can also be a pulse-density modulated signal or a pulse-position modulated signal. The signal transformation unit2transforms the input signal S1into the first intermediary signal S2which has a virtual amplitude with respect to at least one carrier signal. The calculation unit3performs a calculation operation of the transformed first intermediary signal S2output by the signal transformation unit2to generate the second intermediary signal S3which is supplied to the signal retransformation unit4. The signal retransformation unit4retransforms the second intermediary signal S3into the output signal S4which consists of signal sections, wherein each signal section of the output signal S4has a constant amplitude. The output signal S4is, for example, also a pulse-width modulated signal. In an alternative embodiment, the output signal S4is formed by a pulse-density modulated signal or a pulse-position modulated signal.

The input signal S1can be applied directly to the calculation apparatus1as shown inFIG. 2or is generated by a signal source8in response to an analogue or a PCM signal S0.

A possible embodiment of a signal source8is shown inFIG. 3. The signal source8has a signal input9and a signal output10. An analogue input signal or a PCM input signal is applied to the input terminal and then applied to four subtractors11a,11b,11c,11das shown inFIG. 3. The signal source8as shown inFIG. 3is a signal source for generating a phase shifted carrier signal by means of four carrier signals generated by carrier signal generators12a,12b,12c,12d. The carrier signals are, for instance, triangular signals or saw tooth signals. Each carrier signal is phase shifted with respect to the other carrier signals. The phase shift is, for instance, 360° divided by a number N of provided carrier signals. In this shown embodiment, the number of carrier signals is N=4. From the applied input signal, the different carrier signals are subtracted by means of the subtractors11a-11dand the respective difference signal is compared by a corresponding comparator13a-13dwith a threshold value, e. g. with a threshold value0. The generated pulse-width modulated signals are superimposed with each other by means of an adder14and scaled by a scaling factor 0.25 by a scaling unit15. The phase shift carrier signal with four discrete amplitude values is output by the PWM signal source8via an output terminal10to the input terminal5of the calculation apparatus1according to the present invention. The input signal S1is in any case a two-dimensional continuous time signal having at least two discrete amplitude values wherein the information is encoded in both, in the amplitude and into the time location of the signal edges.

A preferred embodiment of the signal transformation unit2of the calculation apparatus1according to the present invention is shown inFIG. 4. The signal transformation unit2transforms the input signal S1into a first intermediary signal S2having a virtual amplitude with respect to at least one carrier signal. In this shown embodiment, the signal transformation unit2comprises four carrier signal generators16a,16b,16c,16deach generating a carrier signal. In one embodiment, the carrier signals are triangular signals. In alternative embodiments, the carrier signals have saw tooth form. The carrier signals comprise a phase shift of 360° divided by a number of carrier signal generators N=4. The signal transformation unit2comprises a comparator17for each carrier signal generator as shown inFIG. 4. Each comparator17comprises a subtractor to subtract the carrier signal from the received input signal and a comparator comparing the difference signal with a threshold value0. The comparator17compares the amplitude of the input signal which consists of signal sections, wherein each signal section has a constant amplitude, with the amplitude of the generated carrier signal to generate a logical output signal indicating whether the amplitude of the input signal is higher than the amplitude of said carrier signal. The signal transformation unit2comprises for each comparator17a corresponding sample-and-hold circuit18which is triggered by the logical output signal of the respective comparator17to store temporarily the amplitude of the respective carrier signal at an output terminal of the sample-and-hold circuit18. The sample-and-hold circuit18is triggered by a rising edge or by a falling edge of the logical signal output by an output terminal of the respective comparator17. The output terminals of the sample-and-hold circuits18are connected via lines19to input terminals of a multiplexer20which receives a control signal from a detector circuit21. The detector circuit21is connected to the output terminal of the comparators17and receives the logical output signals of these comparators17to detect which carrier signal has caused a rising edge or a falling edge in the logical output signal. The temporarily stored amplitude of the carrier signal that has caused a rising edge or a falling edge in the corresponding logical output signal is switched by the multiplexer20through as the first intermediary signal S2to the calculation unit3. The intermediary signal S2has a virtual amplitude with respect to the carrier signals generated by the carrier signal generator16a,16b,16c,16d.

FIG. 5shows a generation of the first intermediary signal S2by the signal transformation unit2using four carrier signals CARRIER0, CARRIER1, CARRIER2, CARRIER3generated by the carrier signal generator16a,16b,16c,16d, respectively.

The input signal S1consists of signal section each having a constant amplitude and can be any two-dimensional continuous time signal with at least two discrete amplitude values wherein the information is encoded into the amplitude and into the time location of the signal edges of this continuous time signal S1. InFIG. 5, the continuous time input signal S1is shown as a bold line. By use of carriers C0, C1, C2, C3which are in the given example triangular signals, the continuous time signal S1is transformed into the first intermediary signal S2having a virtual amplitude with respect to the carrier signals as shown inFIG. 5. In the given example, the input signal S1is generated by a signal source8in response to an analogue reference S0being a sine-wave signal. At each crossing point of the continuous time signal S1with a carrier C, a virtual amplitude of the intermediary signal S2is defined being constant for a time frame period TF. The time frame is defined by the crossing of two carrier signals Ci, Cjwherein the time frame period TFis given for a triangular signal as:
TF=1/2·NT·ƒT,

Wherein ƒTis the frequency of the triangular carrier signal and NTis the number of carrier signals.

For a carrier signal that has a saw tooth form, the time frame period TFis given by:
TF=1/NT·ƒT.

As can be seen fromFIG. 5, the generated first intermediary signal S2is a one-dimensional continuous time signal with a virtual amplitude wherein the information carried by the two-dimensional input signal is now encoded only in one dimension, i. e. into the virtual amplitude of the first intermediary signal S2. The intermediary signal S2consists of a plurality of signal sections having a constant amplitude wherein each of these signal sections has a constant time period TF. This corresponds to a PCM signal when the amplitude of the intermediary signal S2is quantized. With the generated intermediary signal S2it is possible to perform mathematical operations without generating distortions in the calculated output signal.

Accordingly, the generated first intermediary signal S2is applied to a calculation unit3as shown inFIG. 2. The calculation unit3can perform any mathematical operation with the applied intermediary signal S2, such as subtracting or adding another signal. Another possibility is that the intermediary signal S2is multiplied with another signal or divided by another signal. It is also possible to perform more complex mathematical operations on the intermediary signal, such as calculating a square root etc. The calculation unit3may perform a mathematical operation only in response to the first intermediary signal S2or a mathematical operation with the first intermediary signal with at least another input signal S2′. The second input signal S2′ can be in a preferred embodiment a feedback signal of a feedback loop. The further input signal S2′ consists also of signal sections wherein each signal section of said further input signal S2, has a constant amplitude. The input signal S2′ is preferably a one-dimensional continuous time signal. Accordingly, the calculation unit3performs a mathematical operation of two one-dimensional continuous time signals to generate a second intermediary signal S3as the calculation result. The calculated resulting intermediary signal S2is applied to the retransformation unit4of the apparatus1as shown inFIG. 2.

FIG. 6shows a possible embodiment of such a retransformation unit for retransforming the second intermediary signal S3into an output signal S4. The signal retransformation unit4comprises an input22with an output23connected to the output7of the calculation apparatus1. The retransformation unit4comprises carrier signal generators24provided for each carrier signal. For each carrier signal generator, a comparator25is provided which compares a second intermediary signal S3with the respective carrier signal to generate a corresponding comparator output signal. An adder26adds the comparator output signals to generate a sum signal which is scaled by a scaling unit27to generate the output signal of the calculation apparatus1according to the present invention. The output signal S4consists of signal sections wherein each signal section has a constant amplitude. The output signal S4can be a pulse-width modulated signal, a pulse-density modulated signal or a pulse-position modulated signal.

The carrier signal generator as employed in a signal transformation unit2and the signal retransformation unit4as shown inFIGS. 4,6can be implemented by counters.

The calculation apparatus can be implemented as a hardware circuit. In an alternative embodiment, a microprocessor executes a program which performs the method according to the present invention.

FIG. 10shows a flow chart of a possible embodiment of the method according to the present invention.

After a starting step θ, the input signal S1is transformed in a step1into a first intermediary signal S2having a virtual amplitude with respect to a carrier signal. Then, the calculation operation on the first intermediary signal S2is performed to generate a second intermediary signal S3in a step2. In a third method step, the second intermediary signal S3is retransformed to an output signal which consists of signal sections wherein each signal section of the output signal S4has a constant amplitude.

The calculation apparatus1as shown inFIG. 2can be used in many devices, such as control loops, motor control circuits or digital amplifiers. The calculation apparatus according to the present invention can, in particular, be used for performing a mathematical operation with a feedback signal.

FIG. 7shows a possible use of the calculation apparatus1within a digital amplifier. In this example, the calculation unit3is formed by a subtractor subtracting a PCM feedback signal from the first intermediary signal S2generated by the signal transformation unit2being a pulse modulator.

FIG. 7shows a switching power amplifier which amplifies an input signal and outputs an amplified analogue signal at an output to a load, such as a loudspeaker. The input signal with the power amplifier is either analogue or digital.

The power amplifier as shown inFIG. 7comprises a first signal path and a second reference signal path.

The first signal path comprises a power supply correction unit in a calculation apparatus1according to the present invention, a delay correction unit which compensates the variation of signal edges of the modulated signal, a switching power unit which amplifies the modulated signal to generate an amplified output signal, and finally, a demodulation filter which filters the amplified output signal generated by the switching power unit to generate an analogue output signal output to the load. Parallel to the switching power unit, a signal delay measurement unit is provided which measures the signal delays caused by the switching power unit to generate a delay control signal for the delay correction unit.

Besides the first signal path, a second signal path is provided within the switching power amplifier for generating a reference signal in response to the input signal applied to the signal input of the switching power amplifier. The second signal path comprises a digital adaption signal filter, a digital-to-analogue converter and an analogue low-pass filter. The digital-to-analogue converter comprises an over-sampling unit. Alternatively, the over-sampling is performed within in the digital signal adaption filter. The digital signal adaption filter causes preferably a delay for compensation of a delay intermediate signal path. The digital-to-analogue converter converts the filter digital input signal output by the signal adaption filter to generate an analogue signal which is filtered by a low-path filter to generate a reference signal.

The transfer function of the first signal path is equal to the transfer function of the reference signal path.

The switching power amplifier as shown inFIG. 7including the calculation apparatus1has a sigma-delta feedback loop which comprises an analogue subtractor which subtracts from the output signal the reference signal, an analogue noise shaper for integrating the error signal and a quantizer for converting the integrated error signal into a digital feedback signal which is fed back to the first signal path, i. e. to the subtractor3of the calculation apparatus1according to the present invention.

FIG. 9shows a block diagram of a PCM/PWM converter4of the calculation apparatus1according to the present invention as shown inFIG. 7.

The pulse-width modulated signal S4which forms the output signal of the calculation apparatus1according to the present invention does not contain distortions caused by the mathematical operation performed by the subtractor3within the calculation apparatus1as shown inFIG. 7. Any two-dimensional continuous time signal can be applied to the calculation apparatus1within the power amplifier as shown inFIG. 7. The input signal is a two-dimensional continuous time signal having information encoded in the amplitude and into the time of the signal. The pulse modulator2transforms the input signal into a first intermediate signal S2being a one-dimensional continuous time signal with a virtual amplitude wherein the information which originally was carried by the two-dimensional input signal S, is now encoded into the virtual amplitude of the first intermediate signal S2. The first intermediate signal S2and the feedback signal S2, are both one-dimensional continuous time signals allowing a distortion free mathematical operation by means of the calculation unit3which is formed in the given example by a subtractor.