Victor M Jimenez-Fernandez1, Maribel Jimenez-Fernandez2, Hector Vazquez-Leal1, Evodio Muñoz-Aguirre3, Hector H Cerecedo-Nuñez4, Uriel A Filobello-Niño1, Francisco J Castro-Gonzalez1. 1. Faculty of Electronic Instrumentation, Universidad Veracruzana, Circuito Gonzalo Aguirre Beltrán S/N, Zona Universitaria, 91000 Xalapa, Veracruz Mexico. 2. Basic Sciences Institute, Universidad Veracruzana, Av. Castelazo Ayala S/N, Col. Industrial Ánimas, 91192 Xalapa, Veracruz Mexico. 3. Faculty of Mathematics, Universidad Veracruzana, Circuito Gonzalo Aguirre Beltrán S/N, Zona Universitaria, 91000 Xalapa, Veracruz Mexico. 4. Faculty of Physics, Universidad Veracruzana, Circuito Gonzalo Aguirre Beltrán S/N, Zona Universitaria, 91000 Xalapa, Veracruz Mexico.
Abstract
A smoothed representation (based on natural exponential and logarithmic functions) for the canonical piecewise-linear model, is presented. The result is a completely differentiable formulation that exhibits interesting properties, like preserving the parameters of the original piecewise-linear model in such a way that they can be directly inherited to the smooth model in order to determine their parameters, the capability of controlling not only the smoothness grade, but also the approximation accuracy at specific breakpoint locations, a lower or equal overshooting for high order derivatives in comparison with other approaches, and the additional advantage of being expressed in a reduced mathematical form with only two types of inverse functions (logarithmic and exponential). By numerical simulation examples, this proposal is verified and well-illustrated.
A smoothed representation (based on natural exponential and logarithmic functions) for the canonical piecewise-linear model, is presented. The result is a completely differentiable formulation that exhibits interesting properties, like preserving the parameters of the original piecewise-linear model in such a way that they can be directly inherited to the smooth model in order to determine their parameters, the capability of controlling not only the smoothness grade, but also the approximation accuracy at specific breakpoint locations, a lower or equal overshooting for high order derivatives in comparison with other approaches, and the additional advantage of being expressed in a reduced mathematical form with only two types of inverse functions (logarithmic and exponential). By numerical simulation examples, this proposal is verified and well-illustrated.
Piecewise-linear models are widely used in diverse fields, such as circuit theory, image processing, system identification, economics and financial analysis, etc (Chua and Ying 1983; Chua and Deng 1985; Hasler and Schnetzler 1989; Yamamura and Ochiai 1992; Russo 2006; Feo and Storace 2004, 2007; Brooks 2008). The factor that prevalently motivates the use of this type of models is the simplicity of their structure which let them be efficiently implemented in both algorithms and hardware. In general, piecewise-linear models looks very appealing for graphical tasks, like curve fitting, interpolation or extrapolation, where a function is constructed to fit or determine new values within or outside the range of a discrete set of known data points (Bian and Menz 1998; Dai et al. 2007; Magnani and Boyd 2009; Misener and Floudas 2010; Jimenez-Fernandez et al. 2014). However, a notorious shortcoming can be distinguished in this type of models when function derivatives are of interest. This is because the first derivatives of piecewise-linear functions are not continuous at breakpoints and the second derivatives do not exist or are vanished inside each linear partition. This fact limits their application in that cases where derivatives are imperatively required, such as device modeling, nonlinear systems simulation, and analysis of experimental data, among others. In that regard, although there are many reported piecewise-linear models (Chua and Kang 1977; Kang and Chua 1978; Chua and Deng 1988; Kahlert and Chua 1990; Guzelis and Goknar 1991; Pospisil 1991; Kevenaar et al. 1994; Leenaerts and Van-Bokhoven 1998; Julian et al. 1999; Li et al. 2001), due to its compact formulation, the most popular is the so-called canonical piecewise-linear representation (Chua and Kang 1977) which is given by the following theorem:
Theorem 1
Any single-valued piecewise-linear function with at mostbreakpoints, can be represented by the expressionwithfor, anddenoting the slope of the i-th constitutive linear segment in the piecewise-linear function.and more generally, for n-dimensional functions, (1) takes the formwhere , , and are n-dimensional vectors, , and are scalars, and “” denotes the inner product of two vectors.As can be seen, this model is expressed by a closed formula with a minimal number of parameters. Nevertheless, due to a sum of absolute-value terms is included in (1) and (2), it is not completely differentiable.Motivated by the fact of merging in a unique piecewise model these two fundamental characteristics: simplicity and differentiability, in this paper an algebraic transformation to smooth the canonical piecewise-linear model, is proposed. Such transformation let it obtain a new formulation which is based on natural exponential and logarithmic functions. It results in a new model that, besides of being smooth and preserving a minimum number of parameters, it makes the native piecewise-linear model completely differentiable. In this concern, it is important to mention that, in accordance with literature such lack of differentiability has been overcome by substituting the basis-function of the piecewise-linear model (in this case, the absolute-value) for its smooth approximation. Illustrative examples of this strategy can be found in (Bacon and Watts 1971; Seber and Wild 1989; Lazaro et al. 2001; Griffiths and Miller 1973), where the functions , , , and are used, respectively. Similarly, our smoothing transformation is based on the same principle but compared to those reported approaches, it reveals significant improvements, for example: (1) a better curve fitting accuracy can be achieved due to the deviation between the piecewise-linear function of reference, and the resulting smooth description, is restrictively focused at the breakpoints, (2) no additional parameters needs to be computed because it uses the same parameters of the original canonical model, and (3) the resulting smooth model exhibits a lower or equal overshooting for their derivatives. The paper is organized as follows. In section 2, the deduction of the smoothing transformation formula is explained in detail. Section 3 describes the transformation strategy by two illustrative examples (for one- and two-dimensional domains). In section 4 a comparative analysis and discussion about the curve fitting accuracy that can be achieved through the proposed transformation as well as the overshooting in derivatives, is exposed. This comparative is done among the most popular smoothing proposals reported in literature. Finally, section 5 presents the concluding remarks of this work.
Deduction of transformation formula
It follows from (Schmidt et al. 2007) that a smooth approximation for the absolute-value function can be expressed in terms of natural logarithms asUsing the property in (3), and simplifying the resulting algebraic expression we haveAfter numerical simulations on (4), a slight deviation from the unity slope of the absolute-value function can be observed. In order to achieve more approximation accuracy, a constant µ is included asbeing an appropriate fitting value.This simplify (5) asProof See Appendix AAfter substituting the absolute-value function of (1) by its equivalent smooth approximation (6), it let us recast the canonical model asHence, performing an algebraic reduction of (7) yields:that hereafter is denoted as the smooth-piecewise model whose parameters (,, and ) are the same as the canonical piecewise-linear model, and the parameter α is incorporated to controls the smoothness. A more formal definition for (8) is expressed by the following theorem:
Theorem 2
Any one-dimensional canonical piecewise-linear function that is characterized by L segments and σ breakpointscan be transformed into smooth-piecewise function expressed aswhere the set ofparameters:can be determined as follows:and the parameter α can be used to preserve a constant smoothness in all the function domain, or to define a specific smoothness gradeat any i-th breakpoint location aswith δ being the deviation between the piecewise-linear and the smooth-piecewise functions atProof See Appendix BWithout loss of generality, for an n-dimensional representation of (9), a smooth transformation is derived from (2) and expressed aswhere both parameters, and , are calculated by using the same equations as for the one-dimensional case (Eqs. (10), (12), respectively), and is determined as follows:Proof See Appendix C
Illustrative examples
With the purpose of exploring (9), we present two application examples; the first shows how to obtain the smooth-piecewise representation of any one-dimensional function, and the second exposes a more practical case where the smoothing transformation is applied into a two-dimensional characterization curve for a n-channel MOS transistor.
Example 1
Consider any one-dimensional piecewise-linear function characterized by the following linear segments:from (16), it can be directly obtained: andAfter substituting the slopes ( for ) and breakpoints ( for ) values, into the parameters of (1) and substituting in (10), (11), and (12), the smooth description (17) can be obtained.In order to exemplify how the smoothness can be controlled by fixing the value of the parameter , a summary of curves (black) for is reported in Fig. 1. As reference, the original piecewise-linear curve , derived from Theorem 1, is also included in this figure (red).
Fig. 1
Smooth-piecewise approximations of for
Smooth-piecewise approximations of forFrom this figure it can be observed that, when the parameter α is small the smoothness of (17) is increased, in contrast, when α is greater it is decreased. From a geometrical interpretation, this means a trade-off between the deviation from the breakpoint coordinate, and the desired smoothness. In Fig. 2 the first and second derivatives of for are contrasted with the corresponding derivatives of As it was expected, the first derivative for yields a discontinuous step curve, and the second and higher order derivatives are always zero. In contrast, it must be highlighted the existence of the first and higher order derivatives for the smooth function.
Fig. 2
First and second derivatives for and ()
First and second derivatives for and ()
Example 2
In order to illustrate the smoothing transformation for a two-dimensional function, the characteristic curves and equilibrium equations of a metal–oxide–semiconductor (MOS) field-effect transistor are considered. This is a four-terminal device: source (S), gate (G), drain (D), and body (B) which is used for amplifying or switching electronic signals.Let us start considering a n-channel MOS transistor connected in the common source configuration with and where , are in volts, and are in microamperes. We assume that the piecewise-linear description follows the Shichman-Hodges model for and it is expressed in the canonical form of the Chua model (Chua and Deng 1986) as follows:The resulting piecewise-linear characteristic is shown in Fig. 3.
Fig. 3
Canonical piecewise-linear approximation for the drain current
Canonical piecewise-linear approximation for the drain currentFrom (19) in reference to (2) is obtained:After applying (10), (12) and (15) for , it resultsFigure 4 shows the characteristic curve of
Fig. 4
Smooth curve that result from the transformation of
Smooth curve that result from the transformation ofWith the aim of estimating the difference between the piecewise-linear function and the smooth-piecewise function , the deviation between their characteristic curves is depicted in Fig. 5 (shadow regions). Similarly, as it happens in the one-dimensional example, the most precise curve fitting is achieved within each linear segment (in the two-dimensional case, each plane) but the deviation (controlled by the smoothing parameter α) only appears near the breakpoints.
Fig. 5
Deviation between the piecewise-linear function (red) and the smooth-piecewise function (blue)
Deviation between the piecewise-linear function (red) and the smooth-piecewise function (blue)
Comparative analysis and discussion
In this section, an analysis and discussion about the curve fitting accuracy and the overshooting in function derivatives due to the smooth-piecewise model (9), is outlined. In order to have a comparative reference, besides of our proposal, other smoothing alternatives are considered and illustrated.
Smooth approximation for the absolute value function
As it was exposed in section 2, the proposed smoothing strategy uses an approximation for the absolute-value function based on a natural logarithmic with a Euler’s exponential argument, for simplicity, such approximation hereafter will be denoted as and it is obtained by recasting (6) as followsAfter simplifying, it resultswithOther reported approximations are, the here denoted, (Lazaro et al. 2001) and (Seber and Wild 1989). The first one based on the natural logarithm of a hyperbolic cosine argument, and the second one directly expressed in terms of a hyperbolic tangent. Both approximations are expressed asFigure 6 shows the absolute-value function and their approximations and In all cases, the same curvature (smoothness) is considered (, and ). This fact can be graphically observed by the circles that are circumscribed at the breakpoint.
Fig. 6
Smooth approximations for : for , for , and for
Smooth approximations for : for , for , and forFor this example, curve fitting deviations of , , and , with respect to the absolute-value function, are shown in Fig. 7 where clearly it can be seen that, in and , a considerable variation is presented, especially far away or in the two quadrants near the breakpoint at . However, in the close proximity of this point the curve deviation is progressively minimized. In contrast, by , the reciprocal behavior can be observed. That is to say, the main deviation is focused at , and it drops to zero as the curve moves away this point.
Fig. 7
Curve fitting deviations in , and , with respect to the absolute-value function. , , and
Curve fitting deviations in , and , with respect to the absolute-value function. , , and
Overshooting in derivatives of the absolute value function approximations
In Figs. 8 and 9 the first and second derivatives of functions: for , for , and for are contrasted with the corresponding derivative of absolute-value function. As it was expected, the first derivative for the absolute-value function yields a step function while their second and higher order derivatives are always zero. We can also see that, in the both cases shown in Figs. 8 and 9, derivatives of exhibit more overshooting than and . Moreover, it can be noted the same overshooting for and .
Fig. 8
First derivatives: of for , of for , and of for
Fig. 9
Second derivatives: of for , of for , and of for
First derivatives: of for , of for , and of forSecond derivatives: of for , of for , and of for
Comparative example
By this example, the two previously discussed characteristics: curve fitting of breakpoints and overshooting for function derivatives, are explored. Hence, consider a piecewise-linear curve defined by two breakpoints: , and three slopes: . In accordance with (1), from these input data the canonical piecewise-linear model description is given bySmoothing transformations of (24) can be now intuitively achieved by replacing the absolute-value function with any of their approximations (, , and ). After applying the corresponding substitutions, we obtainwhere (25), (26), and (27), are the smooth functions that correspond to , , and , respectively. It is important to point that, in order to evaluate these functions under equally conditions, the same smoothness is fixed by the parameters , , and . Plots for these functions are depicted in Fig. 10.
Fig. 10
Smooth-piecewise transformation for . Functions: , and for , , and , respectively
Smooth-piecewise transformation for . Functions: , and for , , and , respectivelyCurve fitting deviations of (25), (26), and (27), with respect to the reference function (24) can be appreciated in Fig. 11. From this figure it can be seen that a minimum deviation corresponds to (25) and the worst case is given by (27).
Fig. 11
Curve fitting deviations of , and , with respect to the absolute-value function. , , and
Curve fitting deviations of , and , with respect to the absolute-value function. , , andFigure 12 shows that similarly as it was observed in Figs. 8 and 9, the most pronounced overshooting is due to the approximation while an equally overshooting corresponds to and .
Fig. 12
Overshooting for the first derivatives of , and
Overshooting for the first derivatives of , and
Conclusion
The proposed transformation was successfully applied to one-dimensional and two-dimensional piecewise-linear functions. By numerical simulations, it was verified that in comparison with other reported strategies, our smooth-piecewise model has important advantages, like preserving the original parameters of its native canonical piecewise-linear representation, the capability of controlling the smoothness by an artificial parameter (α), a lower or equal overshooting for derivatives, and the additional advantage of being expressed in a more reduced mathematical form with only two types of inverse functions (logarithmic and exponential).
Authors: Gerardo Diaz-Arango; Hector Vazquez-Leal; Luis Hernandez-Martinez; Victor Manuel Jimenez-Fernandez; Aurelio Heredia-Jimenez; Roberto C Ambrosio; Jesus Huerta-Chua; Hector De Cos-Cholula; Sergio Hernandez-Mendez Journal: Sensors (Basel) Date: 2020-06-08 Impact factor: 3.576