1. Field of the Invention
The present invention relates to a parameter generating device and method, especially to a parameter generating device and method capable of generating parameters through addition or subtraction calculation.
2. Description of Related Art
Generally speaking, a circuit needs some predetermined parameters for operation to achieve the performance conforming to expectation. However, as an external condition (e.g. environment temperature) or an internal condition (e.g. operating voltage) changes, these predetermined parameters may become inappropriate, which means that if the circuit keeps working with these parameters, it may not be able to achieve the expected performance. Therefore, once an external or internal condition changes, the circuit has to acquire the update of the parameters or modify the existing parameters to maintain the performance. According to a prior art, the circuit can use a mapping table to store a plurality of parameters in connection with one or more variant conditions and then acquire a proper parameter from the mapping table according to the current state of the variant condition(s). Since the variant condition (e.g. temperature) usually varies continuously, if the parameter is required to be accurate under the variant condition, the mapping table has to store a huge amount of parameters and will become enormous and consume a lot of memory; or the mapping table may only store a few amount of parameters provided that the circuit has to carry out an approximation calculation (e.g. interpolation calculation) with the existing parameters to obtain new parameters for a following procedure in which said approximation calculation will consume the operation resource of the circuit and the new parameters are relatively inaccurate, which are not favorable.
Those who are interested in more detail of the prior art may refer to the U.S. Pat. No. 7,979,219.
In consideration of the problems of the prior art, an object of the present invention is to provide a parameter generating device and method capable of improving the prior art.
Another object of the present invention is to provide a parameter generating device and method capable of generating a parameter through addition or subtraction calculation and thereby simplifying the process of generating parameters.
The present invention discloses a parameter generating device operable to generate a parameter for circuit operation in which the parameter is associated with an N degree polynomial of a characteristic curve while the N is a positive integer. An embodiment of the parameter generating device comprises: a storage circuit operable to store at least N+1 initial values which are determined in accordance with a start value and a unit variation amount; and an parameter calculating circuit, coupled to the storage circuit, operable to carry out addition calculation for at least [(K−1)×N+1] time(s) if a multiple K is positive or subtraction calculation for at least −K×N time(s) if the multiple K is negative, so as to generate the parameter, wherein the multiple K is derived from a difference divided by the unit variation amount while the difference is a current value minus the start value.
The present invention also discloses a parameter generating method carried out by the parameter generating device of the present invention or its equivalent and operable to generate a parameter for circuit operation in which the parameter is associated with an N degree polynomial of a characteristic curve while the N is a positive integer. An embodiment of the parameter generating method comprises the following steps: providing at least N+1 initial values which are determined in accordance with a start value and a unit variation amount; and executing addition calculation for at least [(K−1)×N+1] time(s) if a multiple K is positive or subtraction calculation for at least −K×N time(s) if the multiple K is negative, so as to generate the parameter, wherein the multiple K is derived from a difference divided by the unit variation amount while the difference is a current value minus the start value.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiments that are illustrated in the various figures and drawings.
The following description is written by referring to terms of this invention field. If any term is defined in the specification, such term should be explained accordingly. Besides, the connection between objects or events in the disclosed embodiments can be direct or indirect provided that these embodiments are still applicable under such connection. Said “indirect” means that an intermediate object or a physical space is existed between the objects, or an intermediate event or a time interval is existed between the events.
The present invention comprises a parameter generating device and method capable of generating a parameter for circuit operation. In order to generate the parameter, the present invention adopts Modified Euler's Method to thereby obtain the correct value of an N degree polynomial f(x) through addition or subtraction calculation. The theory and derivation of Euler's Method can be found in the following public reference: James C. Robinson, “AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATION”, p. 201−212, Cambridge University Press, ISBN-10: 0511801203, ISBN-13: 978−0511801204. The Modified Euler's Method is explained in the following paragraphs.
Assuming that f(x) represents an N degree polynomial (f(x)=anxn+an-1xn-1+ . . . +a1x+a0) to be approached, according to the principle of differentiation, the following differential functions (tangent functions) can be derived:
In light of the above-listed functions, since the N-order differential f(n)(x) of the N degree polynomial is a constant, if we turn to secant functions instead of these tangent functions under a unit variation amount Δx, similar equations could be derived as follows:
After rearranging the above-listed equations, a set of recursive equations is obtained as follows:
Accordingly, based on the set of recursive equations, if a start value x0 (a.k.a. basis value) of an N degree polynomial f(x)=anxn+an-1xn-1+ . . . +a1x+a0 is known and N+1 initial values {f(x0), {tilde over (f)}′(x0), {tilde over (f)}″(x0), . . . , {tilde over (f)}(n-1)(x0), {tilde over (f)}(n)(x0)} are determined with the polynomial and the start value x0 in advance, one can find the value of f(x0+k·Δx) through the set of recursive equations in the manner of addition in which the variable k is an integer.
According to the above discussion, for instance, if the N degree polynomial is a 3 degree polynomial f(x)=a3x3+a2x2+a1x+a0, the secant functions thereof can be derived as follows:
{tilde over (f)}′(x)=f(x+Δx)−f(x)=3a3Δx·x2+(3a3Δx2+2a2Δx)x+(a3Δx3+a2Δx2+a1Δx)
{tilde over (f)}″(x)={tilde over (f)}′(x+Δx)−{tilde over (f)}′(x)=6a3Δx2·x+(6a3Δx3+2a2Δx2)
{tilde over (f)}″′(x)={tilde over (f)}″(x+Δx)−{tilde over (f)}″(x)=6a3Δx3 (constant)
After rearranging the above-listed functions, a set of recursive equations is therefore obtained as follows:
{tilde over (f)}′(x)=f(x+Δx)−f(x)=3a3Δx·x2+(3a3Δx2+2a2Δx)x+(a3Δx3+a2Δx2+a1Δx)
{tilde over (f)}″(x)={tilde over (f)}′(x+Δx)−{tilde over (f)}′(x)=6a3Δx2·x+(6a3Δx3+2a2Δx2)
{tilde over (f)}″′(x)={tilde over (f)}″(x+Δx)−{tilde over (f)}″(x)=6a3Δx3 (constant)
Consequently, if the start value x0 of this 3 degree polynomial f(x)=a3x3+a2x2+a1x+a0 is known, provided that (3+1)=4 initial values {f(x0)=a3x03+a2x02+a1x0+a0; {tilde over (f)}′(x0)=3a3Δx·x02+(3a3Δx2+2a2Δx)x0+(a3Δx3+a2Δx2+a1Δx); {tilde over (f)}″(x0)=6a3Δx2·x0+(6a3Δx3+2a2Δx2); {tilde over (f)}″′(x0)=6a3Δx3} has been obtained according to the 3 degree polynomial and the start value x0 in advance, the aforementioned recursive equations can therefore be used to calculate the value f(x0+k·Δx) of the polynomial through addition calculation in which the variant k is an integer. To be more specific; assuming that the 3 degree polynomial is f(x)=x3+12x2+3x+4 (that is to say a3=1; a2=12; a1=3; a0=4) and the start value x0 is 0, the four initial values f(x0), {tilde over (f)}′(x0), {tilde over (f)}″(x0), {tilde over (f)}′″(x0) can be derived as 4, 16, 30, 6 respectively; meanwhile, if the unit variation amount Δx is 1, the value f(x0+k·Δx) of the polynomial can be found through addition calculation as it is explained in the aforementioned description, which is also illustrated in table 1 below.
According to table 1, any f(x0+k·Δx) can be derived from the four initial values f(x0), {tilde over (f)}′(x0), {tilde over (f)}″(x0), {tilde over (f)}′″(x0) through pure addition calculation, and the derived value will be exactly the same as those obtained through formula calculation. For instance, if one is going to find f(3), all she/he needs to do is executing addition calculation with the four initial values for 7 times and taking the last one (i.e. 148) among the 7 addition values 20, 46, 36, 66, 82, 42 and 148 as f(3).
Please note that the start value x0 could be some value other than 0. For instance, if the unit variation amount Δx remains unchanged (i.e. Δx=1) but the start value x0 is 3 (equivalent to the foresaid start value x0=0 plus 3Δx, i.e. 0+3=3), one can find the four initial values 148, 124, 48, 6 (in connection with f(x0+3·Δx) as illustrated in table 1) through any available calculation manner in advance, or can derive the four latest initial values 148, 124, 48, 6 from some existing initial values such as 4, 16, 30, 6 by addition calculation or from some existing initial values such as 272, 172, 54, 6 by subtraction calculation (i.e. one of the four latest initial values is the 3-order differential 6 which is constant, and the other three latest initial values can be derived as follows: 54−6=48, 172−48=124, 272−124=148). On the other hand, please also note that the unit variation amount Δx could be some amount other than 1. For instance, if the amount Δx is 2 while the start value x0 is 0, the four initial values {f(x0)=a3x03+a2x02+a1x0+a0; {tilde over (f)}′(x)=3a3Δx·x02+(3a3Δx2+2a2Δx)x0+(a3Δx3+a2Δx2+a1Δx); {tilde over (f)}″(x)=6a3Δx2·x0+(6a3Δx3+2a2Δx2); {tilde over (f)}′″(x)=6a3Δx3} will be 4, 62, 144, 48 correspondingly, and then the value of f(x0+k·Δx) can then be derived from the four initial values.
In light of the described Modified Euler's Method, Applicant provides a parameter generating device and method capable of simplifying the process of generating a parameter. Please refer to
Please refer to table 1 and
Please refer to table 1 and
Please refer to table 1 and
Please note that since people of ordinary skill in the art can derive more examples from the fore-disclosed description by themselves, repeated or redundant explanation is therefore omitted.
The description above is true provided that the N degree polynomial of a concerned characteristic curve is correct. However, the change of an external or internal condition may cause the N degree polynomial incapable of reflecting the characteristic curve under the changed condition, or the existing N degree polynomial may not directly relate to an interested characteristic curve in connection with a target parameter an asking end asks for; in the meantime, the existing N degree polynomial will not be able to represent the changed or some interested characteristic curve, but an unknown target polynomial will. Therefore, the present invention further discloses a parameter generating device 200 as shown in
or calculate the values of c, d by other known or self-defined algorithms (e.g. Minimax Method). Once the coefficients have been found, if the asking end asks for a target parameter f2(xk), the parameter calculating circuit 120 can find a parameter f1(xk) through addition/subtraction calculation as it is discussed before and then the operation circuit 210 can obtain the target parameter f2(xk)≈f3(xk=c·f1(xk)+d according to the correlation f3(x)=c·f1(x)+d and the parameter f1(xk).
In some applications the correlation between the target polynomial and the N degree polynomial is already known, and thus the operation circuit 210 here need not calculate the coefficient(s) of the correlation, but needs to calculate the target parameter in accordance with the correlation and the parameter from the parameter calculating circuit 120. For instance, if the N degree polynomial f1(x) stands for a characteristic curve reflecting the matching relation between the internal resistance R of an IC and the impedance Z of a signal transmission cable (e.g. the characteristic curve showing the relation between the peak value of a rebounding wave and the arrival time of the rebounding wave) while the target polynomial f2(x) stands for the mismatch relation between the IC internal resistance R and the transmission cable impedance Z, since the voltage of the cable is supposed to be a half of the output voltage V of an operational amplifier in a digital-to-analog converter (DAC OP) under the matching relation and supposed to be (Z˜V)/(R+Z) under the mismatch relation, the correlation between the target polynomial f2(x) and the N degree polynomial f1(x) can be known or determined as f2(x)=2Z/(R+Z)·f1(x) in advance based on the voltage ratio of the two voltages. Consequently, since the correlation, the internal resistance R and the output voltage V of the DAC OP can be known or determined in advance while the impedance Z can be obtained by measuring the cable voltage (Z·V)/(R+Z), if an asking end asks for a target parameter f2(xk), the operation circuit 210 can give it the target parameter f2(xk) through the calculation of f2(xk)=[2Z/(R+Z)]·f1(xk) in accordance with the correlation and the parameter f1(xk) derived by the parameter calculating circuit 120.
In addition to the above-mentioned scenario, there is another scenario that the correlation between the target polynomial and the N degree polynomial is already known, but at least one coefficient of the correlation is associated with a variable (e.g. temperature) and will changes with the variable. In this scenario, although the operation circuit 210 need not calculate the coefficient(s) of the correlation, it still needs to determine the current value of at least one coefficient according to the variable, so as to accurately calculate the target parameter in accordance with the correlation and the parameter from the parameter calculating circuit 120. Accordingly, the present invention further discloses a parameter generating device 300 as shown in
In addition to the above-disclosed device invention, the present invention also discloses a parameter generating method carried out by the device of the present invention or the equivalent thereof and operable to generate a parameter for circuit operation in which the parameter is associated with an N degree polynomial of a characteristic curve while the N is a positive integer. Please refer to
In light of the above, if the multiple K is equal to or more than 1, step S420 includes: a calculation of adding a number M and a number M+1 initial values among the N+1 initial values up according to the sequence of the N+1 initial values in which the M is a positive integer less than the N. Furthermore, if the multiple K is equal to or more than 2, step S420 includes: executing addition calculation for N times to generate N first addition values and then executing addition calculation for [(K−2)×N+1] time(s) according to the N first addition values and a number N+1 initial value of the N+1 initial values, so as to generate the parameter. More specifically, the step of generating the N first addition values includes: adding any adjacent two of the N+1 initial values according to said sequence to generate the N first addition values which also comply with the sequence. Afterwards, these first additional values and the number N+1 initial value can be used to generate the parameter. Moreover, if the multiple K is equal to or more than 3, the step of executing addition calculation for [(K−2)×N+1] time(s) includes: adding any adjacent two of the N first addition values according to the sequence and adding a number N first addition value of the N first addition values and the number N+1 initial value up, so as to generate N second addition values; and then executing addition calculation for [(K−3)×N+1] time(s) according to the N second addition values and the number N+1 initial value to thereby generate the wanted parameter. As to the examples with the multiple K equal to or more than 4, those can be derived according to the above-described examples.
On the other hand, if the multiple K is equal to or less than −1, step S420 includes: a calculation of subtracting a number N+1 initial value of the N+1 initial values from a number N initial value of the N+1 initial values according to the sequence of the N+1 initial values. Furthermore, if the multiple K is equal to or less than −2, step S420 includes: executing subtraction calculation for N times to generate N first subtraction values which also comply with the sequence and then executing subtraction calculation for (−K−1)×N time(s) according to the N first subtraction values and the number N+1 initial value, so as to generate the wanted parameter. More specifically, the step of generating the first subtraction values includes: subtracting the number N+1 initial value from the number N initial value to generate a number N first subtraction value of the N first subtraction values; and then subtracting a number M+1 first subtraction value of the N first subtraction values from a number M initial value of the N+1 initial values according to an integer M varying from N−1 to 1 to thereby generate the rest of the first subtraction values. Moreover, if the multiple K is equal to or less than −3, the step of executing subtraction calculation for (−K−1)×N time(s) includes: subtracting the number N+1 initial value from the number N first subtraction value to thereby generate a number N second subtraction value of N second subtraction values which also comply with the sequence, then subtracting a number M+1 second subtraction value of the N second subtraction values from a number M first subtraction value of the N first subtraction values according to the integer M from N−1 to 1 to thereby generate the rest of the N second subtraction values, and afterwards executing subtraction calculation for (−K−2)×N time(s) according to the N second subtraction values and the number N+1 initial value to generate the parameter. As to the examples with the multiple K equal to or less than −4, those can be derived according to the above-described examples.
Please refer to
Please refer to
Since those of ordinary skill in the art can appreciate the implementation detail and modification thereto of the method invention by referring to the disclosure of the fore-described device invention, repeated and redundant description is therefore omitted provided that the remaining disclosure is still enough for understanding and enablement. Please note that the addition or subtraction calculation in this specification is the calculation of adding two values up or subtraction one value from another, which means that several times of addition or subtraction calculation could be summarized in a single calculation. Therefore, any single calculation that can be divided into several times of calculation also falls within the scope of the aforementioned calculation for several times. Besides, the shape, size, and ratio of any element and the step sequence of any flow chart in the disclosed figures are just exemplary for understanding, not for limiting the scope of this invention. Furthermore, each embodiment in the following description includes one or more features; however, this doesn't mean that one carrying out the present invention should make use of all the features of one embodiment at the same time, or should only carry out different embodiments separately. In other words, if an implementation derived from one or more of the embodiments is applicable, a person of ordinary skill in the art can selectively make use of some or all of the features in one embodiment or selectively make use of the combination of some or all features in several embodiments to have the implementation come true, so as to increase the flexibility of carrying out the present invention.
To sum up. The parameter generating device and method have at least the following advantages: first, only a few initial values, a start value and a unit variation amount need to be stored, which requires no enormous storage space, and the circuit area and cost are thereby saved; second, parameter(s) can be generated through simple addition or subtraction calculation instead of complicated calculation; third, the generated parameter is quite accurate, i.e. the less the unit variation amount, the higher the accuracy of the generated parameter; fourth, the parameter of another polynomial can be derived from the initial values of the existing polynomial through addition or subtraction calculation, which consequently saves more parameter storage space and makes more applications possible.
The aforementioned descriptions represent merely the preferred embodiments of the present invention, without any intention to limit the scope of the present invention thereto. Various equivalent changes, alterations, or modifications based on the claims of present invention are all consequently viewed as being embraced by the scope of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
102129069 | Aug 2013 | TW | national |