You are on page 1of 6

In this paper the author describes a class of filters called the linear constant coefficient filters, these

filters can be represented in a general form by the following equation.


Where x
n
is the input sequence and w
n
represents the output sequence. The author analyzes the error in
the floating point and fixed point arithmetic.
The equations discussed in the previous section tell us how the error can be calculated. To formalize
these equations in HOL we first need the implementation of the sum of a series in HOL. The real library
in HOL contains an expression.
Sum (n m) f
This expression uses lambda notation to add the expression given by f from numbers n till n + m.
The sum expression is enough for us to formalize the ideal digital filter in HOL. The following expression
provides us with the formalization of the ideal digital filter.

The above expression makes use of the sum expression from the real library and uses it twice once for
the input sequence and once for the output sequence.
To do the same for floating point and fixed point arithmetic we need the same function sum of a series
formalized for both floating point and the fixed point arithmetic. The author presents two recursive
functions that implement the sum of series notation for the aforementioned arithmetic.
The floating point sum function is given by,

The above function is the same as the sum function provided by the real library in HOL but instead this
one uses the float sum provided by the float library in HOL.
The fixed point sum function is given by,

Above function uses the function from the fxp library that is a part of HOL-4. It implements the sum of
series for the fixed point case.
As we have defined the sum function now we can formalize the digital filters for the floating point and
the fixed point arithmetic cases. As given by the following formalization.

The formalization of the fixed point arithmetic can also be done in a similar fashion as is given by the
following function,

Up-till now we have defined three digital filter using the ideal specification, the floating point arithmetic
and the fixed point arithmetic.
As we have already shown that the rounding off error can be represented in for each type of arithmetic
by including proper compensating factors. As given by equation (*) The equation that gives us the true
value returned by the floating point arithmetic is given by
We need to formalize this equation to represent the floating point digital filter in HOL. But this requires
a product of series formula, we require the product function to calculate the values using equation (*)
implemented this function is given by,

The formalization of this equation is given below.

This formalization uses lambda notation as well the variables d, p, e, z are used to implement and
.
In a similar way the digital filter for the fixed point arithmetic is also formalized, as is given below.

We have established that the error can be found by subtracting the output of the ideal filter from the
real values of the floating point and fixed point arithmetic being represented by Float_Error and
Fxp_Error respectively whereas the error caused due to the conversion from floating point to fixed point
is reference to as Float_Fxp_Error,. Equations (*) provide us with the accumulative error for both of
these arithmetic which can be computed using these equations. In the next step the author formalizes
the accumulative error equations.

The error analysis for the fixed point arithmetic is formalized as follows.

And the formalization for the transition from floating point to fixed point is given by,

The author proves all the above mentioned lemmas using the fundamental error analysis lemmas
proved in (*) (akhlaqs part refer to the error analysis lemmas)
These lemmas are proved by the author by using induction on the parameters L and M.
The author provides a complete framework for performing error analysis of digital filters. The analysis
performed compares the ideal filter to the floating point arithmetic and the fixed point arithmetic and
then discusses the transition from the floating point to fixed point arithmetic.

You might also like