Piecewise linear approximations of multivariate functions: A multiresolution-based compression...

10
Applied Numerical Mathematics 60 (2010) 924–933 Contents lists available at ScienceDirect Applied Numerical Mathematics www.elsevier.com/locate/apnum Piecewise linear approximations of multivariate functions: A multiresolution-based compression algorithm suitable for circuit implementation Mauro Parodi a , Mauro Gaggero b , Marco Storace a,,1 a Biophysical and Electronic Engineering Department, University of Genoa, Via Opera Pia 11a, Genova, Italy b Department of Production Engineering, Thermoenergetics, and Mathematical Models, University of Genoa, P.le Kennedy, Pad. D, Genova, Italy article info abstract Article history: Received 12 June 2009 Received in revised form 25 March 2010 Accepted 6 May 2010 Available online 8 May 2010 Keywords: Piecewise linear approximation Multiresolution approximation Electronic circuit implementation This paper is concerned with a multiresolution approach to the piecewise-linear approx- imation of multivariate nonlinear continuous functions. The proposed technique has no restrictions on the number of variables the functions depend on, and is based on the use of piecewise-linear “hat” functions. The approximation levels are related to nested func- tion spaces. The multiresolution approach allows one to define a simple model reduction strategy that is based on a proper error definition. The interest in the piecewise-linear approximations and in the hat functions is motivated by the simplicity of their circuit im- plementations. The efficiency of the method is tested via two benchmark examples, one of which concerns the approximation of the vector field of a nonlinear dynamical system. © 2010 IMACS. Published by Elsevier B.V. All rights reserved. 1. Introduction In many applications concerned with electronic systems, it is necessary to automatically evaluate a nonlinear function in real time, and it is not possible (usually due to size limitations) to use a personal computer or another general purpose digital signal processor. For instance, a nonlinear function may be used for information compression/power saving in the nodes of wireless sensor networks by extracting a single indicator as a nonlinear function of different measures [1]. Other applications which may benefit of the availability of electronic circuits implementing multivariate nonlinear func- tions are concerned with the emulation of networks made up of interacting nonlinear dynamical systems [32] modeled by a limited number of ordinary differential equations (ODEs). Examples can be found in many different fields: from biology (neuronal and gene networks) [20], to computer simulation (Internet models) [10], sociology and anthropology (social orga- nizations, group dynamics) [11], economics (heterogeneous agents models) [2], ecology and virology (population dynamics) [21], electrical power grids (blackout modeling) [4], and so forth. Often, general purpose computers are sufficient to emulate the network dynamics, but sometimes hardware implementations of the networks are required. For instance, this is the case of systems controlling locomotion and navigation of biomimetic robots based on animal models, such as lobsters [3]. In these situations, the main concern is usually the realization of the ODEs governing the single unit of the network. In many of the described cases (related to either “static” functions or vector fields of dynamical systems), it is mandatory to look for tailored circuit solutions. Typically, the circuit implementation of a (multivariate) nonlinear function requires, as This work was partially supported by the European Community through the MOBY-DIC project (FP7-INFSO-ICT-248858), by the MIUR, within the PRIN framework (Project No. 2006093814), and by the University of Genoa. * Corresponding author. E-mail address: [email protected] (M. Storace). 1 Questions, comments, or corrections to this document may be sent to corresponding author’s email address. 0168-9274/$30.00 © 2010 IMACS. Published by Elsevier B.V. All rights reserved. doi:10.1016/j.apnum.2010.05.002

Transcript of Piecewise linear approximations of multivariate functions: A multiresolution-based compression...

Applied Numerical Mathematics 60 (2010) 924–933

Contents lists available at ScienceDirect

Applied Numerical Mathematics

www.elsevier.com/locate/apnum

Piecewise linear approximations of multivariate functions:A multiresolution-based compression algorithm suitablefor circuit implementation ✩

Mauro Parodi a, Mauro Gaggero b, Marco Storace a,∗,1

a Biophysical and Electronic Engineering Department, University of Genoa, Via Opera Pia 11a, Genova, Italyb Department of Production Engineering, Thermoenergetics, and Mathematical Models, University of Genoa, P.le Kennedy, Pad. D, Genova, Italy

a r t i c l e i n f o a b s t r a c t

Article history:Received 12 June 2009Received in revised form 25 March 2010Accepted 6 May 2010Available online 8 May 2010

Keywords:Piecewise linear approximationMultiresolution approximationElectronic circuit implementation

This paper is concerned with a multiresolution approach to the piecewise-linear approx-imation of multivariate nonlinear continuous functions. The proposed technique has norestrictions on the number of variables the functions depend on, and is based on the useof piecewise-linear “hat” functions. The approximation levels are related to nested func-tion spaces. The multiresolution approach allows one to define a simple model reductionstrategy that is based on a proper error definition. The interest in the piecewise-linearapproximations and in the hat functions is motivated by the simplicity of their circuit im-plementations. The efficiency of the method is tested via two benchmark examples, one ofwhich concerns the approximation of the vector field of a nonlinear dynamical system.

© 2010 IMACS. Published by Elsevier B.V. All rights reserved.

1. Introduction

In many applications concerned with electronic systems, it is necessary to automatically evaluate a nonlinear functionin real time, and it is not possible (usually due to size limitations) to use a personal computer or another general purposedigital signal processor. For instance, a nonlinear function may be used for information compression/power saving in thenodes of wireless sensor networks by extracting a single indicator as a nonlinear function of different measures [1].

Other applications which may benefit of the availability of electronic circuits implementing multivariate nonlinear func-tions are concerned with the emulation of networks made up of interacting nonlinear dynamical systems [32] modeled bya limited number of ordinary differential equations (ODEs). Examples can be found in many different fields: from biology(neuronal and gene networks) [20], to computer simulation (Internet models) [10], sociology and anthropology (social orga-nizations, group dynamics) [11], economics (heterogeneous agents models) [2], ecology and virology (population dynamics)[21], electrical power grids (blackout modeling) [4], and so forth. Often, general purpose computers are sufficient to emulatethe network dynamics, but sometimes hardware implementations of the networks are required. For instance, this is thecase of systems controlling locomotion and navigation of biomimetic robots based on animal models, such as lobsters [3].In these situations, the main concern is usually the realization of the ODEs governing the single unit of the network.

In many of the described cases (related to either “static” functions or vector fields of dynamical systems), it is mandatoryto look for tailored circuit solutions. Typically, the circuit implementation of a (multivariate) nonlinear function requires, as

✩ This work was partially supported by the European Community through the MOBY-DIC project (FP7-INFSO-ICT-248858), by the MIUR, within the PRINframework (Project No. 2006093814), and by the University of Genoa.

* Corresponding author.E-mail address: [email protected] (M. Storace).

1 Questions, comments, or corrections to this document may be sent to corresponding author’s email address.

0168-9274/$30.00 © 2010 IMACS. Published by Elsevier B.V. All rights reserved.doi:10.1016/j.apnum.2010.05.002

M. Parodi et al. / Applied Numerical Mathematics 60 (2010) 924–933 925

a first step, an approximation, since the functions that can be exactly implemented by electronic circuits belong to a veryrestricted class. Among possible techniques for the approximation and circuit synthesis of nonlinear functions, we refer toa piecewise-linear (PWL) technique, since it has two main advantages [25,9,30,29]: (i) there exist well-assessed techniquesfor the PWL approximation (with arbitrary accuracy) of multivariate nonlinear functions; (ii) there exists hardware supportwhich is reasonably simple and can be implemented in integrated circuits of small size and low power consumption. Theseare often key features when dealing with electronic circuits, mainly if embedded in more complex systems (e.g., a mobilephone, a digital camera, an automobile, a pacemaker, a biomimetic robot). Other available methods for multiresolution PWLapproximation and compression (see, e.g., [7,23,13]) do not share with the considered method the simplicity of circuitimplementation, since in these cases the simplices are not identical for each resolution level.

The PWL function shape is coded by a set of coefficients that are embedded in the circuit, and one of the main problemsthe circuit designers are concerned with is to minimize the number of coefficients – i.e., to compress the information –since this heavily affects the overall circuit size. This can be fruitfully done by resorting to multiresolution methods.

In this paper, we propose a multiresolution-based compression algorithm for the PWL approximation of multivariatefunctions that is suitable for circuit implementation. In particular, we use in n dimensions the PWL spaces defined in [33]to produce wavelet spaces for dimensions 1 and 2. This allows us to define a compression algorithm suitable for the circuitimplementation of n-variate PWL functions. We remark that the proposed method has been adopted not owing to itscompression performances (other algorithms are more efficient from this standpoint), but since it is much more suitable forcircuit implementation. Then, the technique proposed in this paper has to be considered competitive whenever one needsa circuit synthesis of an n-variate function. At the best of our knowledge, techniques of the same kind are missing.

Besides a toy problem concerning a “static” three-variate function, we propose, as a benchmark example of a nonlineardynamical system, the Hodgkin and Huxley model of a finite-area portion of an axon membrane [14].

The rest of this contribution is organized as follows. In Section 2, the basic elements of the multiresolution PWL ap-proximation method are introduced. A model reduction strategy is proposed in Section 3, and the benchmark examples areprovided in Section 4, together with some concluding remarks.

2. Multiresolution PWL modeling

We shall deal with continuous PWL approximations of a multivariate function f defined over the n-dimensional compactdomain D ⊂ R

n , i.e. f : D → R, where

D = {z ∈ R

n: ai � zi � bi, i = 1, . . . ,n}. (2.1)

Through a proper normalization, the domain D can be transformed into an n-dimensional cube Ω and the vector z into ascaled vector x.

A PWL approach proposed in the last years for the approximation and circuit implementation of continuous functions[16,17,26,27,24] is based on an a priori domain partition into n-dimensional simplices through a simple type-1 triangulation(or simplicial partition) obtained by applying the Kuhn’s algorithm [18,19], thus defining N vertices uniformly distributedover Ω . The basic idea of this single-resolution approach is to approximate a given function f (mapped into the domain Ω)with a PWL function h that is continuous and linear affine over each simplex. The main advantage of the simplicial approachlies in its direct circuit implementation, as we shall briefly describe in the following subsection. The interested reader isreferred to [29,30] and the references therein for a deeper discussion. The coefficient reduction (compression) problem wasaddressed in [24] by adopting a single-resolution optimization strategy. In this paper, we adopt a multiresolution strategywith the same target.

2.1. Basic ideas for circuit implementations

We consider a PWL function h(x), x ∈ Ω , which is continuous and linear affine over each triangular subdomain. ThePWL function h can be efficiently implemented by using resources (either analog or digital) much more limited than thoseprovided by a generic computer, provided that the mapping from D to Ω is linear or PWL [22]. In a completely general case,for generic partitions like those considered in [7,23,13], a circuit implementation of the mapping can become unsuitable.

In analog circuit implementations, the function h(x) can be computed as h(x) = ∑Nk=1 hkβk(x), where hk are the values

(embedded a priori in the circuit in controlled sources [29]) of h at the vertices of the simplicial partition, and βk(x) arefunctions that can be easily implemented by using basic electronic structures known as current mirrors. In these cases, thecomputation is parallel and analog.

Fig. 1 shows a two-dimensional example of simplicial partition of a domain Ω suitable for digital implementations. Inthis case, it is important that each vertex of the partition has integer coordinates. Following [6], the function h(x) in ageneric point x ∈ Ω can be computed as the weighted sum h(x) = ∑

j μ jh j , where j is a local index for the simplex xbelongs to, μ j are the barycentric coordinates of x with respect to the vertices of this simplex, and h j are the values ofh at the same vertices. This operation can be efficiently implemented in a circuit by using a limited set of resources, i.e.,fixed-point representation with a given number of bits (12, in the architectures implemented up to now) and limited set ofdigitally efficient mathematical operations (basically, sum and multiplication). In particular, the μ j are obtained by simply

926 M. Parodi et al. / Applied Numerical Mathematics 60 (2010) 924–933

Fig. 1. Example of simplicial partition of a two-dimensional domain.

summing/subtracting the components of the vector δx = x − �x�, whereas the h j are stored in a memory and then retrievedby properly addressing it by using �x� and δx.

The generalization of the circuit aspects of this introductory single-resolution example to higher dimensional domains isstraightforward. In the rest of the paper, we consider the mathematical aspects concerning a multiresolution approximation,in which different simplicial subdivisions – each one corresponding to a different resolution level – are adopted.

2.2. Simplicial partition and refinement procedure

Since the Kuhn’s partition is well known, we just introduce the notation that is used in the following subsection todefine the proposed multiresolution approach.

We define a type-1 triangulation T j in Rn , where the integer j denotes the level of refinement. For the triangulation T j ,

the set of edges is denoted by E j , and V j is the pertinent set of vertices. This defines a selection mechanism for the edgesthat makes unique the triangulation corresponding to a given set of vertices V j [33].

In order to describe the refinement procedure (see [33] for further details), we start from a given triangulation T L in Rn ,

with vertices V L . This triangulation is refined by inserting new vertices at the edge midpoints. As previously stated, thismethod yields a unique kind of refined triangulation, irrespective of the dimension n of the space. Moreover:

• each n-dimensional simplex T ′ ∈ T L+1 is contained in exactly one simplex T of the coarser triangulation T L ;• any vertex of T ′ is either a vertex or an edge midpoint of T ;• for a given refinement level L in R

n , the simplices in T L may differ in shape, but their volumes are equal.

2.3. PWL model definition

The definition of the considered PWL models is based on the nested function spaces constructed for one- and two-dimensional prewavelets in [33]. In this section, we apply the tools proposed in [33] to a particular basis of functions inorder to define a PWL model. The obtained space structure is the basis for the compression algorithm described in the nextsection.

For a given n-dimensional cube Ω , let us consider a j-level triangulation T j with vertices V j . We define the set ofpiecewise linear “hat” functions α

jv(x) (for x ∈ Ω) that are linear over each simplex and such that

αjv(w) = δv w =

{1 for w = v,

0 otherwise,with v, w ∈ V j . (2.2)

This set of functions is a basis for the linear space S j of the piecewise linear functions g :Ω → R, which are linear on eachsimplex in T j and interpolate the values g(v) = gv assigned for any v ∈ V j .

The dimension of S j is the number |V j| of vertices in V j . The support of αjv is given by the union of all the simplices

containing the vertex v . The corresponding set of neighbours of v is denoted by V jv . We point out that the α functions

follow from the original idea proposed by Courant [8,31]. It is well known that these functions allow for a multiresolutionhierarchy with respect to the adopted inner product 〈g1, g2〉 (between two continuous PWL functions g1, g2 :Ω → R)defined, for a given triangulation T j , as

〈g1, g2〉 =∑

j

g1(h)g2(h). (2.3)

h∈V

M. Parodi et al. / Applied Numerical Mathematics 60 (2010) 924–933 927

From this product, it turns out that any pair of distinct α-functions for T j is orthogonal, that is, 〈α jv ,α

jw〉 = δv w .

As a slight generalization, the product between α-functions pertinent to different triangulations, V L and V M , is definedas ⟨

αLv ,αM

w

⟩ = ∑h∈V H , H=max(L,M)

αLv(h)αM

w (h) (2.4)

and yields, in particular, the following result:

⟨α

j−1v ,α

jw⟩ = ∑

h∈V j

αj−1v (h)α

jw(h) = α

j−1v (w) =

⎧⎨⎩

1 for v = w,

12 for w ∈ V j

v ,

0 otherwise.

(2.5)

With this result in mind, let us consider the hat function αj−1v . This PWL function can be viewed as an element of S j

and expressed in terms of the functions αjw for the finer-level vertices w ∈ V j :

αj−1v =

∑w∈V j

⟨α

j−1v ,α

jw⟩α

jw = α

jv + 1

2

∑w∈V j

v

αjw . (2.6)

Since this relation holds for any vertex v ∈ V j−1, it follows that, for any j, S j−1 ⊂ S j . Passing from T j−1 to T j , therefinement set of vertices is V j∗ = V j \ V j−1. The number of vertices of V j∗ will be denoted as |V j∗|.

In Eq. (2.6), the term αj−1v can be viewed as the v-th element of a vector α j−1. Correspondingly, the elements α

jv and

αjw are viewed as elements of a vector α j . This enables us to reformulate the |V j−1| equations (2.6) as

α j−1 = [I∣∣(P j)T ]

α j, (2.7)

where I is the identity matrix of size |V j−1|, P j is a matrix of size |V j∗| × |V j−1|, and α j is partitioned taking first thevector α j

0 of the elements αjv , v ∈ V j−1 and organizing the remaining |V j∗| = |V j| − |V j−1| elements α

jw into a second

vector α j1:

α j =[

α j0

α j1

]. (2.8)

Following Eq. (2.6), the (v, w)-element of the matrix (P j)T is 12 for w ∈ V j

v and 0 otherwise.Let us now consider a continuous function f : Ω → R and two of its PWL approximations, f j−1 and f j , pertinent to the

triangulations T j−1 and T j , respectively. These approximations can be written as

f j−1 = (c j−1)T

α j−1,

f j = (c j)T

α j = (c j

0

)Tα j

0 + (c j

1

)Tα j

1. (2.9)

The terms c j, c j−1, c j0, c j

1 are vectors of coefficients, whose meanings are self-evident.At each vertex of the triangulations, the values of the approximations must be equal to the value of the function f . In

particular, for any h ∈ V j−1, we have α j1(h) = 0 and f j(h) = f j−1(h). Then we obtain

c j0 = c j−1. (2.10)

The relation between f j(x) and f j−1(x) can be written as

f j(x) = f j−1(x) + g j−1(x), (2.11)

where g j−1 is the function pertinent to the refinement set of vertices V j∗ and the corresponding vector α j1 of functions.

Then, we can write:

g j−1 = (c j

g)T

α j1 = [

0∣∣(c j

g)T ]

α j, (2.12)

where c jg is a (column) vector of |V j∗| coefficients, and 0 is a (row) vector with |V j−1| zero elements. Taking into account

Eqs. (2.7), (2.9), and (2.12), expression (2.11) becomes:(c j)T

α j = (c j−1)T [

I∣∣(P j)T ]

α j + [0∣∣(c j

g)T ]

α j, (2.13)

which implies the following relation between the vector coefficients:[c j

0j

]=

[I

P j

]c j−1 +

[0c j

g

]. (2.14)

c1

928 M. Parodi et al. / Applied Numerical Mathematics 60 (2010) 924–933

As a final step, the above relation is split into relations (2.10) and

c j1 = P jc j−1 + c j

g, (2.15)

which sets up the basis for any reconstruction-decomposition procedure [12].If we write Eq. (2.11) for j = 1, . . . , p (where p is the maximum refinement level), we obtain the multiresolution decom-

position:

f p(x) = f 0(x) +p∑

j=1

g j−1(x). (2.16)

The size |V j∗| of c jg in Eq. (2.12) grows with j, that is, with the “local” character of the influence of the α

jv terms.

3. Model reduction (compression)

With reference to the function f p(x) given by Eq. (2.16), we aim to obtain a PWL approximation

f p(x) = f 0(x) +p∑

j=1

g j−1(x) (3.1)

such that, for a given ep � 0,∣∣ f p(x) − f p(x)∣∣ � ep ∀x ∈ Ω. (3.2)

Each PWL function g j−1(x) is built up taking only one subset of the αjv functions in α j . It is obtained from g j−1(x) by

setting to zero the less significant components (c jg)k of the c j

g vector. In order to detail this step, let us consider a terme j > 0 such that

min{∣∣(c j

g)

k

∣∣} � e j � max{∣∣(c j

g)

k

∣∣}. (3.3)

Then, without loss of generality, the elements of c jg can be re-ordered as follows:

c jg =

[c j

g H

c jgL

];

(c j

g H

)k:

∣∣(c jg H

)k

∣∣ > e j,(c j

gL

)k:

∣∣(c jgL

)k

∣∣ � e j .(3.4)

Annihilating the elements of c jgL , we can write

c jg =

[c j

g H

0

]; g j−1(x) = (

c jg)T

α j . (3.5)

Then g j−1(x) is calculated taking into account only the αjv elements multiplying the components of c j

g H . Owing to the

general properties of the αjv functions, for any x ∈ Ω we have∣∣g j−1(x) − g j−1(x)

∣∣ � max∣∣(c j

gL

)k

∣∣ = ∥∥c jgL

∥∥∞ � e j ( j = 1, . . . , p). (3.6)

Hence, recalling Eqs. (2.16) and (3.1),

∣∣ f p(x) − f p(x)∣∣ =

∣∣∣∣∣p∑

j=1

[g j−1(x) − g j−1(x)

]∣∣∣∣∣�

p∑j=1

∣∣g j−1(x) − g j−1(x)∣∣ �

p∑j=1

e j .= ep . (3.7)

Thus, the error ep is given by the sum of the terms e j . Relations (3.6) and (3.7) set up the basis for various reduction strate-gies of the PWL function f p(x). For given f p(x) and ep , in general, different sets of e j elements (i.e., g j−1(x) functions)

can yield the same resulting sum ep . The discrimination between f p functions with the same error term ep can be ob-tained by introducing additional requirements, e.g., the resulting number of pruned α-elements and/or, in the set of prunedα-elements, the prevalence of particular kinds of α-functions, such as the α j pertinent to the highest refinement levels.

To conclude this section, we notice that the considered multiresolution approach shares the same possibility of beingquite easily circuit implemented typical of the single-resolution approach, as described in Section 2.1. Indeed, with respectto the single-resolution case, it is based on the same type of simplicial partitions. This allows one to implement a bank ofcircuits with different resolution levels and working in parallel, as usual for multiresolution structures. We remark that theadvantages of model reduction are particularly evident for analog circuit implementations [29,24].

M. Parodi et al. / Applied Numerical Mathematics 60 (2010) 924–933 929

4. Examples

The benchmark examples shown in the following deal with PWL approximations of two- and three-variate functions.According to the method proposed in Section 2, at the highest resolution level p the domains are partitioned along eachdimension xi with mi = 2p subdivisions. Among the various possible reduction strategies f p → f p , we have chosen toprivilege the pruning of the coefficients corresponding to the highest j levels, which are associated to the largest sets ofα-elements and contain the information about higher-order details of the function.

For a given value ε, the threshold e j used to set to 0 the coefficients c jgL in (3.4) has been defined as

e j = ε

p − j + 1, (4.1)

so that a larger j results in a larger e j . We point out that the choice of ε must fulfil the constraints (3.3) on e j . Moreover,an “optimal” value εopt can be defined as the maximum value of ε such that the relative error term E(ε) = ep

E0, where

E0 = ∑pj=1 ‖c j

g‖∞ , does not exceed a prescribed reference value ETH . In the simplest cases, this goal can be achieved byresorting to brute-force methods, i.e., by varying ε and verifying if E(ε) � ETH . In general, an optimization procedure maybe used that takes into account the discontinuous nature of E(ε).

The efficiency of the reduction procedure can then be evaluated by taking into account the following terms:

• number N of α-functions for the maximum refinement level (i.e., the size of the vector αp);• number N of α-functions after the model reduction;• reference value ETH;• relative error E(εopt).

We remark that, in the proposed approach, the reference for any multiresolution PWL function f j ( j = 1, . . . , p) is thesingle-resolution PWL function f p (corresponding to the maximum refinement level), for which ep = 0 and the number ofα-functions is N .

The first example concerns a three-variate radial chirp function, which constitutes a good benchmark owing its oscillatingnature. Within the limits stated in the introduction (we aim to obtain a circuit-oriented compression), the results point outthe good performances of the compression algorithm: for instance, for ETH = 0.10 the relative error E(ε) is equal to 0.099,whereas the number of coefficients is reduced from 4913 for the original set (single-resolution approximation) to 3313.

The second example concerns the approximation of the vector field of a dynamical system, i.e., the well-known Hodgkin–Huxley nerve membrane model [14]. The models belonging to the Hodgkin and Huxley family take into account the keyproperties of the ionic conductances underlying the nerve action potential and provide the most realistic description ofneuron physiology. At the best of our knowledge, there are no circuits that implement these kinds of models. Many circuitshave been proposed in the last decade to implement single neurons or networks of neurons [15,5,34], but, while all ofthem realize models that show dynamics qualitatively similar to that of neurons, none are biologically plausible. Fromthis standpoint, the Hodgkin–Huxley nerve membrane model is the most accurate model one can choose and then anapproximation suitable for circuit implementations represents an interesting proposal.

As compared with static approximations, the approximation of the vector field of a dynamical system is much morecritical. A procedure for evaluating the structural stability of single-resolution PWL approximations of dynamical systemshas been proposed in [28]. In this paper, the focus is on static approximations, but we think that the advantages of a mul-tiresolution approach (in particular, the possibility of achieving the same approximation accuracy as in the single-resolutioncase with a smaller number of basis functions) may be inherited by “dynamic” approximations too.

We chose p = 4 in the first example and p = 3 in the second one. These values represent a good compromise betweenaccuracy and complexity of the function approximation. Higher values of p would provide a negligible increase in theaccuracy and a remarkable increase in the model complexity.

4.1. Example 1

The first example concerns the following radial chirp function, defined over the domain Ω = [−π,π ]2 × [−1,1]:

f (x) = cos[2πx3

√x2

1 + x22 + 0.5

(x2

1 + x22

)]. (4.2)

The approximation results are summarized in Table 1 and some plots (sections obtained for different values of the oscillationfrequency x3) of the approximate PWL (upper row) and original functions (middle row) are shown in Fig. 2. Such a figureshows also the plots of the difference | f (x)− f p(x)| between the original and approximate PWL functions computed on thepartition corresponding to the finest resolution level (lower row).

930 M. Parodi et al. / Applied Numerical Mathematics 60 (2010) 924–933

Table 1Approximation results for Example 1.

PWL approximation

mi (i = 1,2,3) 16N 4913N 3313ETH 0.10E(εopt) 0.099

Fig. 2. Three sections of the multiresolution PWL approximate function (upper row), the corresponding three sections of the original function (middle row),and the difference | f − f p | between the original and approximate PWL functions computed on the partition corresponding to the finest resolution level(lower row). Columns: (a) x3 = −0.875, (b) x3 = 0, (c) x3 = 0.375.

4.2. Example 2

This example concerns the approximation of the vector field of the dynamical system governing a finite-area portion ofnerve axon membrane [14]:

i = CMdv

dt+ iNa + iK + iL, (4.3)

where i [μA/cm2] is the density of the current entering the finite portion of membrane under consideration, v [mV] is themembrane voltage, CM [μF/cm2] is its capacitance, iNa and iK are the current density terms associated with the sodium andpotassium ions, and iL is the leakage current density of the membrane portion.

The term iL is given by the following linear equation:

iL = (v − V L)gL, (4.4)

where V L [mV] is a reference voltage and gL [mS cm−2] is the conductance of the finite portion of membrane under con-sideration.

The dynamical behaviors of the nonlinear elements iNa and iK are governed by the following equations, where the timesand the voltages are expressed in ms and mV, respectively:

iK = (v − V K )g K n4,

dn = fn(n, v) = 0.01(v + 10)(1 − n)

((v+10)/10)− 0.125e(v/80)n,

dt e − 1

M. Parodi et al. / Applied Numerical Mathematics 60 (2010) 924–933 931

Table 2Approximation results for Example 2.

fnPWL iKPWL fmPWL fhPWL iNaPWL

mi 8 8 8 8 8N 81 81 81 81 729N 38 30 45 39 383ETH 0.02 0.02 0.02 0.02 0.009E(εopt) 0.02 0.0199 0.0199 0.0198 0.009

Fig. 3. Multiresolution PWL approximations of nonlinear functions in the Hodgkin–Huxley nerve axon membrane model. (a) fnPWL (v,n), (b) iKPWL (v,n),(c) fmPWL (v,m), (d) fhPWL (v,h), (e) iNaPWL (v,m,−0.1), (f) iNaPWL (v,m,0.5). The corresponding original functions are omitted for the sake of compactness.

iNa = (v − V Na)gNam3h,

dm

dt= fm(m, v) = 0.1(v + 25)(1 − m)

e((v+25)/10) − 1− 4e(v/18)m,

dh

dt= fh(h, v) = 0.07e(v/20)(1 − h) − h

e((v+30)/10) + 1. (4.5)

The dimensionless variables m, n, and h are used to describe the ions exchanges through the neuron membrane. Theparameters are fixed at the following standard values: gNa = 120 mS cm−2, g K = 36 mS cm−2, gL = 0.3 mS cm−2, V Na =−115 mV, V K = 12 mV, V L = −10.5989 mV, and CM = 1 μF cm−2.

The approximation results concerning the functions fn , iK , fm , fh , and iNa are summarized in Table 2 and some plots areshown in Fig. 3. The function domains are defined by the following ranges for the independent variables: v ∈ [−100,10],n ∈ [0,1], m ∈ [0,1.2], h ∈ [−0.1,0.5].

A high accuracy is required (particularly in the case of the function iNa) in order to ensure a correct dynamical behavior.The values of ETH that we chose (see Table 2) are trade-offs between this need and model complexity reduction purposes.From this perspective, Fig. 4 shows the results of the numerical integration of the Hodgkin–Huxley system in both the orig-inal version (solid curve), single-resolution PWL (dashed line), and multiresolution PWL (dashed-dotted line) approximateversions, in response to a time-varying input. The single-resolution PWL model corresponds to ep = 0 (see the second rowin Table 2).

4.3. Discussion and concluding remarks

In all the proposed examples, we obtained quite accurate PWL approximations by using a number of basis functionslargely reduced with respect to the original single-resolution PWL model. This is mainly due to the very simple definitionof the error related to the coefficient values for each resolution level. Indeed, this definition allows one to easily simplifythe model also for functions defined over multidimensional domains.

Of course, as stated in the introduction, this approach is useful whenever a circuit implementation of the multivariatefunction is required. Otherwise, other methods are undoubtedly more efficient and effective. From this standpoint, the com-pression algorithm is mainly asked to produce PWL approximations corresponding to simple circuit structures. Its efficiencyis considered as a second-order quality factor with respect to the simplicity and efficiency of the corresponding circuit.

932 M. Parodi et al. / Applied Numerical Mathematics 60 (2010) 924–933

Fig. 4. Voltage membrane −v(t) in the original (solid line), single-resolution PWL (dashed line), and multiresolution PWL (dashed-dotted line) models, inresponse to a piecewise-constant input current i (equal to −60 μA/cm2 for t ∈ [0,30] ms and to 0 elsewhere).

This is the reason why comparisons with other more efficient, but not circuit-oriented, compression methods have beendisregarded.

References

[1] Special issue on sensor networks and applications, IEEE Proceedings 91 (8) (2003).[2] W.B. Arthur, Complexity and the economy, Science 284 (5411) (1999) 107–109.[3] J. Ayers, J. Witting, Biomimetic approaches to the control of underwater walking machines, Phil. Trans. R. Soc. A 365 (2007) 273–295.[4] B. Carreras, V. Lynch, I. Dobson, D. Newman, Critical points and transitions in an electric power transmission model for cascading failure blackouts,

Chaos 12 (4) (2002) 985–994.[5] E. Chicca, A. Whatley, P. Lichtsteiner, V. Dante, T. Delbruck, P.D. Giudice, R. Douglas, G. Indiveri, Multi-chip pulse-based neuromorphic systems: a

communication infrastructure and an application example, IEEE Transactions on Circuits and Systems I 54 (5) (2007) 981–993.[6] M. Chien, E. Kuh, Solving nonlinear resistive networks using piecewise-linear analysis and simplicial subdivision, IEEE Transactions on Circuits and

Systems 24 (1977) 305–317.[7] P. Cignoni, L. De Floriani, C. Montani, E. Puppo, R. Scopigno, Multiresolution modeling and visualization of volume data based on simplicial complexes,

in: Proceedings of the 1994 Symposium on Volume Visualization (VVS’94), Tysons Corner, Virginia, USA, 1994, pp. 19–26.[8] R. Courant, Variational methods for the solution of problems of equilibrium and vibration, Bull. Am. Math. Soc. 49 (1943) 1–23.[9] P. Echevarria, M. Martínez, J. Echanobe, I. del Campo, J. Tarela, Digital hardware implementation of high dimensional fuzzy systems, in: Applications of

Fuzzy Sets Theory, in: Lecture Notes in Computer Science, Springer, Berlin, 2007, pp. 245–252.[10] J. Eckmann, E. Moses, Curvature of co-links uncovers hidden thematic layers in the world-wide web, P. Natl. Acad. Sci. USA 99 (9) (2002) 5825–5829.[11] R. Ferrer i Cancho, R. Solé, The small world of human language, P. Roy. Soc. Lond. B Bio. 268 (1482) (2001) 2261–2265.[12] M.S. Floater, E. Quak, M. Reimers, Filter bank algorithms for piecewise linear prewavelets on arbitrary triangulations, Journal of Computational and

Applied Mathematics 119 (2000) 185–207.[13] M.S. Floater, K. Hormann, Surface parameterization: a tutorial and survey, in: N.A. Dodgson, M.S. Floater, M.A. Sabin (Eds.), Advances in Multiresolution

for Geometric Modelling, Springer, Berlin, 2005, pp. 157–186.[14] A. Hodgkin, A. Huxley, A quantitative description of membrane current and its application to conduction and excitation in nerve, J. Physiol.-

London 117 (4) (1952) 500–544.[15] E. Izhikevich, Which model to use for cortical spiking neurons? IEEE Transactions on Neural Networks 15 (5) (2004) 1063–1070.[16] P. Julián, A. Desages, O. Agamennoni, High-level canonical piecewise linear representation using a simplicial partition, IEEE Transactions on Circuits

and Systems I 46 (1999) 463–480.[17] P. Julián, A. Desages, B. D’Amico, Orthonormal high level canonical PWL functions with applications to model reduction, IEEE Transactions on Circuits

and Systems I 47 (2000) 702–712.[18] H. Kuhn, Some combinatorial lemmas in topology, IBM J. of Research and Development 4 (1960) 518–524.[19] H. Kuhn, Simplicial approximation of fixed points, Proc. Nat. Acad. Sci. USA 61 (1968) 1238–1242.[20] T. Mestl, C. Lemay, L. Glass, Chaos in high dimensional neural and gene networks, Physica D 98 (1) (1996) 33–52.[21] J. Montoya, R. Solé, Small world patterns in food webs, J. Theor. Biol. 214 (3) (2002) 405–412.[22] T. Poggi, F. Comaschi, M. Storace, Digital circuit realization of piecewise affine functions with non-uniform resolution: theory and FPGA implementation,

IEEE Transactions on Circuits and Systems II: Transaction Briefs 57 (2) (2010) 131–135.[23] J. Popovic, H. Hoppe, Progressive simplicial complexes, in: Proceedings of the 24th International Conference on Computer Graphics and Interactive

Techniques (SIGGRAPH’97), 1997, pp. 217–224.[24] L. Repetto, M. Storace, M. Parodi, A method for the approximate synthesis of cellular nonlinear networks – Part 2: Circuit reduction, International

Journal of Circuit Theory and Applications 31 (3) (2003) 299–313.[25] R. Rovatti, A. Ferrari, M. Borgatti, Automatic implementation of piecewise-linear fuzzy systems addressing memory-performance trade-off, in: A. Kandel,

G. Langholz (Eds.), Fuzzy Hardware: Architectures and Applications, Kluwer Academic Publishers, Norwell, MA, USA, 1998, pp. 159–179.[26] M. Storace, P. Julián, M. Parodi, Synthesis of nonlinear multiport resistors: a PWL approach, IEEE Transactions on Circuits and Systems I: Fundamental

Theory and Applications 49 (8) (2002) 1138–1149.[27] M. Storace, L. Repetto, M. Parodi, A method for the approximate synthesis of cellular nonlinear networks – Part 1: Circuit definition, International

Journal of Circuit Theory and Applications 31 (3) (2003) 277–297.[28] M. Storace, O. De Feo, Piecewise-linear approximation of nonlinear dynamical systems, IEEE Transactions on Circuits and Systems I: Regular Pa-

pers 51 (4) (2004) 830–842.[29] M. Storace, M. Parodi, Towards analog implementations of PWL two-dimensional non-linear functions, International Journal of Circuit Theory and

Applications 33 (2) (2005) 147–160.

M. Parodi et al. / Applied Numerical Mathematics 60 (2010) 924–933 933

[30] M. Storace, T. Poggi, Digital architectures realizing piecewise-linear multi-variate functions: two FPGA implementations, International Journal of CircuitTheory and Applications 37 (2010), doi:10.1002/cta.610, in press.

[31] G. Strang, Piecewise polynomials and the finite element method, Bull. Am. Math. Soc. 79 (1973) 1128–1137.[32] S. Strogatz, Exploring complex networks, Nature 410 (6825) (2001) 268–276.[33] E. Suter, A strategy for the construction of piecewise linear prewavelets over type-1 triangulations in any space dimension, in: Mathematical Methods

for Curves and Surfaces: Oslo 2000, Vanderbilt University, Nashville, TN, 2001.[34] J. Wijekoon, P. Dudek, Integrated circuit implementation of a cortical neuron, in: Proceedings of the 2008 IEEE International Symposium on Circuits

and Systems (ISCAS’08), Seattle, USA, 2008, pp. 1784–1787.