Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Constantinides G.A., Cheung P.Y.K., Luk W. - Synthesis and optimization of DSP algorithms (2004)(en).pdf
Скачиваний:
23
Добавлен:
15.08.2013
Размер:
1.54 Mб
Скачать

38 4 Word-Length Optimization

θi for some 1 ≤ i ≤ 2n and θ (0, π). Thus the problem of testing (4.7) in the general case has been reduced to the problem of locating those roots of the numerator polynomial of Fk (z) = numerator(Qk(z) −|Ck (z)|2) that lie on the unit circle. In practice, locating roots can be a computation highly sensitive to numerical error [Act90]. The proposed approach is therefore to locate those ‘approximate’ roots lying in a small annulus around the unit circle, and then to test a single value of θ between the arguments of each successive pair of these roots to complete the feasibility test.

If Qk(z) or Ck (z) have large order, there are well-known problems in locating roots accurately through polynomial deflation [Act90]. Since only those roots near the unit-circle need be located, it is proposed to use a procedure based on root moment techniques [Sta98] to overcome these problems. Root moments may be used to factor the numerator polynomial Fk (z) = Fk1(z)Fk0(z) into two factors, Fk1(z) containing roots within the annulus of interest, and Fk0(z) containing all other roots. Once Fk1(z) has been extracted, Laguerre’s method [PFTV88] may be applied to iteratively locate a

single root z0. The factor (z − z0), (z − z0)(z − z0 ), (z − z0)(z − 1/z0) or (z −z0)(z −z0 )(z −1/z0)(z −1/z0 ), depending on the location of z0, may then

be divided from the remaining polynomial before continuing with extraction of the next root.

This test can be used by the word-length optimization procedures described in Section 4.4 to detect violation of user-specified spectral constraints, and help guide the choice of word-length annotation towards a noise spectrum acceptable to the user.

4.1.3 Extending to Nonlinear Systems

With some modification, some of the results from the preceding section can be carried over to the more general class of nonlinear time-invariant systems containing only di erentiable nonlinearities. In this section we address one possible approach to this problem, deriving from the type of small-signal analysis typically used in analogue electronics [SS91].

Perturbation Analysis

In order to make some of the analytical results on error sensitivity for linear, time-invariant systems [CCL01b] applicable to nonlinear systems, the first step is to linearize these systems. The assumption is made that the quantization errors induced by rounding or truncation are su ciently small not to a ect the macroscopic behaviour of the system. Under such circumstances, each component in the system can be locally linearized, or replaced by its “smallsignal equivalent” [SS91] in order to determine the output behaviour under a given rounding scheme.

We shall consider one such n-input component, the di erentiable function Y [t] = f (X1[t], X2[t], . . . , Xn[t]), where t is a time index. If we denote by xi[t]

∂f
∂X1
∂f
∂X2
∂f
∂Xi
xn[t] ∂f ∂Xn

4.1 Error Estimation

39

a small perturbation on variable Xi[t], then a first-order Taylor approximation for the induced perturbation y[t] on Y [t] is given by y[t] ≈ x1[t] ∂X∂f1 + . . . +

.

Note that this approximation is linear in each xi, but that the coe - cients may vary with time index t since in general is a function of X1, X2, . . . , Xn. Thus by applying such an approximation, we have produced a linear time-varying small-signal model for a nonlinear time-invariant component.

The linearity of the resulting model allows us to predict the error at system outputs due to any scaling of a small perturbation of signal s S analytically, given the simulation-obtained error of a single such perturbation instance at s. Thus the proposed method can be considered to be a hybrid analytic / simulation error analysis.

Simulation is performed at several stages of the analysis, as detailed below. In each case, it is possible to take advantage of the static schedulability of the synchronous data-flow [LM87a] model implied by the algorithm representation, leading to an exceptionally fast simulation compared to event-driven simulation.

Derivative Monitors

In order to construct the small-signal model, we must first evaluate the di erential coe cients of the Taylor series model for nonlinear components. Like other procedures described in this section, this is expressed as a graph transformation.

In general, methods must be introduced to calculate the di erential of each nonlinear node type. This is performed by applying a graph transformation to the DFG, introducing the necessary extra nodes and outputs to calculate this di erential. The general multiplier is the only nonlinear component considered explicitly in this section, although the approach is general; the graph transformation for multipliers is illustrated in Fig. 4.8. Since f (X1, X2) = X1X2,

= X2 and = X1.

After insertion of the monitors, a (double-precision floating point) simulation may be performed to write-out the derivatives to appropriate data files to be used by the linearization process, to be described below.

Linearization

The construction of the small-signal model may now proceed, again through graph transformation. All linear components (adder, constant-coe cient multiplier, fork, delay, primary input, primary output) remain unchanged as a result of the linearization process. Each nonlinear component is replaced by its Taylor model. Additional primary inputs are added to the DFG to read the Taylor coe cients from the derivative monitor files created by the above large-signal simulation.

40 4 Word-Length Optimization

 

 

 

 

 

b

 

 

 

dc_da

 

b

 

 

a

c

a

c

 

*

 

*

 

 

 

dc_db

(a) multiplier node

 

(b) with derivative

 

 

 

monitors

Fig. 4.8. Local graph transformation to insert derivative monitors

As an example, the Taylor expansion transformation for the multiplier node is illustrated in Fig. 4.9. Note that the graph portion in Fig. 4.9(b) still contains multiplier ‘nonlinear’ components, although one input of each multiplier node is now external to the model. This absence of feedback ensures linearity, although not time-invariance.

 

 

 

a

 

b

dc_da

*

a

* c

 

+ c

 

 

dc_db

*

 

 

 

 

 

 

b

(a) multiplier node

(b) its first-order

 

 

Taylor model

Fig. 4.9. Local graph transformation to produce small-signal model

Noise Injection

In Section 4.1.2, so-called L2-scaling was used to analytically estimate the noise variance at a system output through scaling of the (analytically derived) noise variance injected at each point of quantization. Such a purely analytic technique can be used only for linear time-invariant systems; however in this section we suggest an extension of the approach for nonlinear systems.

4.1 Error Estimation

41

Since the small-signal model is linear, if an output exhibits variance V when excited by an error of variance σ2 injected into any given signal, then the output will exhibit variance αV when excited by a signal of variance ασ2 injected into the same signal (0 < α R). Herein lies the strength of the proposed linearization procedure: if the output response to a noise of known variance can be determined once only through simulation, this response can be scaled with analytically derived coe cients in order to estimate the response to any rounding or truncation scheme.

Thus the next step of the procedure is to transform the graph through the introduction of an additional adder node, and associated signals, and then simulate the graph with a known noise. In our case, to simulate truncation of

a two’s complement signal, the noise is independent and identically distributed

with a uniform distribution over the range [2 3, 0]. This range is chosen to have unit variance, thus making the measured output response an unscaled ‘sensitivity’ measure.

The graph transformation of inserting a noise injection is shown in Fig. 4.10. One of these transformations is applied to a distinct copy of the linearized graph for each signal in the DFG, after which zeros are propagated from the original primary-inputs, to finalize the small-signal model. This is a special case of constant propagation [ASU86] which leads to significantly faster simulation results for nontrivial DFGs.

a

noise

a

 

 

+

(a) original

(b) with noise

signal

injection

Fig. 4.10. Local graph transformation to inject perturbations

The entire process is illustrated for a simple DFG in Fig. 4.11. The original DFG is illustrated in Fig. 4.11(a). The perturbation analysis will be performed for the signals marked (*) and (**) in this figure. After inserting derivative monitors for nonlinear components, the transformed DFG is shown in Fig. 4.11(b). The linearized DFG is shown in Fig. 4.11(c), and its two variants for the signals (*) and (**) are illustrated in Figs. 4.11(d) and (e) respectively. Finally, the corresponding simplified DFGs after zero-propagation are shown in Figs. 4.11(f) and (g) respectively.